/* About → the "Why" view: the executive-AI-gap essay.
 *
 * Ported verbatim from the standalone exec-ai-rationale.html, which had the page
 * to itself and could style bare `body`, `header`, `h1`, `h2`, `p`, `*`. Inside
 * show-our-work.html those selectors are live grenades — `header` alone would hit
 * both the app topbar (.ws-page-topbar) and the page masthead (<header class="mast">),
 * repainting them with an 88px pad and a 3px rule.
 *
 * So EVERY selector here is scoped under .view-why. Nothing in this file may match
 * an element outside that container. If you add a rule, scope it — a bare element
 * selector in this file is a bug, not a shortcut.
 *
 * The essay's own tokens (--paper/--ink/--rust/--serif-*) are declared ON .view-why
 * rather than :root for the same reason: show-our-work.html already defines --paper
 * at :root with a different value (#fbfbf9 vs the essay's warmer #faf7f1), and the
 * How view must keep its own.
 */

.view-why {
  --paper: #faf7f1;
  --ink: #1c1a17;
  --ink-soft: #4a453d;
  --ink-faint: #8a8276;
  --rust: #b4472a;
  --rust-soft: rgba(180, 71, 42, 0.08);
  --rule: #d8d1c4;
  --serif-display: 'Fraunces', Georgia, serif;
  --serif-body: 'Newsreader', Georgia, serif;

  /* was `body` */
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 19px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* background + dot grid live on .stage.stage-why (below) so they fill the whole
     scrollport rather than stopping at this container's box. */
  background: transparent;
}

/* The essay owns the whole stage while it's showing: .stage's own --paper (#fbfbf9)
   is a cooler white than the essay's, and the seam between them reads as a band
   across the page. Painting the scrollport keeps it seamless. */
.stage.stage-why {
  background: #faf7f1;
  background-image: radial-gradient(circle at 1px 1px, rgba(28, 26, 23, 0.025) 1px, transparent 0);
  background-size: 22px 22px;
}

/* Anchor jumps (#problem/#solution/#use-cases) scroll .stage, not the window —
   .stage is the scroll container (overflow-y:auto). The How view has no anchors,
   so this is inert there. */
.stage { scroll-behavior: smooth; }

.view-why * { margin: 0; padding: 0; box-sizing: border-box; }

/* was `margin: 0 auto` — the essay was a centred column on a page it owned. Here
   it sits inside .wrap (1080px) under a left-aligned "About" masthead, and
   re-centring a 720px column inside that leaves the essay visibly offset from the
   title above it. Left-aligned keeps the two on the same axis. */
.view-why .page {
  max-width: 720px;
  margin: 0;
  /* left padding zeroed so the essay column starts on the same axis as the
     "About" masthead above it. .jumpnav's negative margin is paired to this —
     change one and you must change the other, or the sticky bar's bleed goes
     lopsided. */
  padding: 0 28px 120px 0;
}

/* ---------- Masthead ---------- */
/* The one deliberate deviation from the original: padding-top was 88px, sized for
   a standalone page where this was the first thing on screen. It now sits under
   the persistent "About" masthead and the Why|How toggle, where 88px reads as a
   hole. Everything else in this file is the original's values. */
.view-why header {
  padding: 40px 0 56px;
  border-bottom: 3px solid var(--ink);
  animation: aboutWhyRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.view-why .kicker {
  font-family: var(--serif-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 26px;
}

/* was `h1`. The page's only <h1> is now the persistent "About" masthead, so the
   essay's hero is an <h2 class="why-hero"> — same pixels, one <h1> per page.
   Specificity (0,2,0) intentionally beats `.view-why h2` (0,1,1) below. */
.view-why .why-hero {
  font-family: var(--serif-display);
  font-size: clamp(40px, 7vw, 62px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin-bottom: 30px;
}

.view-why .why-hero em {
  font-style: italic;
  font-weight: 500;
  color: var(--rust);
}

/* Not ported: .dek, .controls/.ctrl/.ctrl-sep, .uc-label. All four styled markup
   that does not exist in the essay — dead rules in the original. Carried forward
   they'd read as load-bearing. */

/* ---------- Jump nav ---------- */
.view-why .jumpnav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 0;
  align-items: stretch;
  /* paired with .page's padding above: bleed right only, since the column no
     longer has left padding to cancel. */
  margin: 0 -28px 0 0;
  padding: 0 28px 0 0;
  background: rgba(250, 247, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--ink);
  animation: aboutWhyRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.05s;
}
.view-why .jumpnav a {
  position: relative;
  font-family: var(--serif-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-decoration: none;
  padding: 16px 22px 14px;
  margin-bottom: -2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.view-why .jumpnav a:hover { color: var(--ink); }
.view-why .jumpnav a.active {
  color: var(--rust);
  border-bottom-color: var(--rust);
}

/* ---------- Part dividers ---------- */
.view-why .part-head {
  scroll-margin-top: 60px;
  margin-top: 64px;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--ink);
  animation: aboutWhyRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.view-why .part-num {
  font-family: var(--serif-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 12px;
}
.view-why .part-title {
  font-family: var(--serif-display);
  font-size: clamp(34px, 6vw, 48px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}

/* ---------- Sections ---------- */
.view-why .section {
  padding-top: 56px;
  animation: aboutWhyRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* strip native disclosure triangle */
.view-why summary { list-style: none; outline: none; cursor: pointer; }
.view-why summary::-webkit-details-marker { display: none; }

.view-why summary.section-head {
  display: grid;
  grid-template-columns: 96px 1fr 28px;
  gap: 24px;
  align-items: baseline;
  cursor: pointer;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  transition: border-color 0.2s ease;
}
.view-why summary.section-head:hover { border-top-color: var(--rust); }
.view-why summary.section-head:hover h2 { color: var(--rust); }

.view-why summary.section-head::after {
  content: "+";
  grid-column: 3;
  justify-self: end;
  font-family: var(--serif-display);
  font-size: 30px;
  font-weight: 300;
  color: var(--rust);
  line-height: 1;
}
.view-why .section[open] > summary.section-head::after { content: "\2013"; }

.view-why summary.section-head .head-text { grid-column: 2; }

.view-why .numeral {
  font-family: var(--serif-display);
  font-size: 64px;
  font-weight: 300;
  font-style: italic;
  color: var(--rust);
  line-height: 1;
  text-align: right;
}

.view-why h2 {
  font-family: var(--serif-display);
  font-size: 31px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.view-why .metaphor-line {
  font-family: var(--serif-body);
  font-size: 17px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 10px 0 0;
  max-width: 52ch;
}

.view-why .section-body {
  padding-left: 120px;
  padding-top: 22px;
}

.view-why p { margin-bottom: 1.2em; }
.view-why p:last-child { margin-bottom: 0; }

.view-why strong { font-weight: 500; }

.view-why .lede-line {
  font-size: 21px;
  color: var(--ink-soft);
  font-style: italic;
}

/* ---------- The three doors ---------- */
.view-why .doors { margin: 36px 0 8px; }

.view-why .door {
  border-top: 1px solid var(--rule);
  padding: 26px 0;
}
.view-why .door:last-child { border-bottom: 1px solid var(--rule); }

.view-why .door-label {
  font-family: var(--serif-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}

.view-why .door-label span {
  color: var(--rust);
  margin-right: 10px;
}

.view-why .door h3 {
  font-family: var(--serif-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
}

.view-why .door p { font-size: 18px; color: var(--ink-soft); }

/* ---------- Pull quote ---------- */
.view-why .pull {
  margin: 52px 0;
  padding: 8px 0 8px 32px;
  border-left: 3px solid var(--rust);
  font-family: var(--serif-display);
  font-size: 26px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.35;
  color: var(--ink);
}

/* ---------- Aside ---------- */
.view-why .aside {
  background: var(--rust-soft);
  border-radius: 2px;
  padding: 22px 26px;
  margin: 30px 0;
  font-size: 17px;
  color: var(--ink-soft);
}

.view-why .aside .aside-label {
  font-family: var(--serif-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust);
  display: block;
  margin-bottom: 8px;
}

/* ---------- Solution requirements ---------- */
.view-why .implications {
  margin-top: 8px;
  padding-top: 8px;
  animation: aboutWhyRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.view-why .implications > summary {
  cursor: pointer;
  position: relative;
  padding-right: 40px;
}
.view-why .implications > summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: -4px;
  font-family: var(--serif-display);
  font-size: 30px;
  font-weight: 300;
  color: var(--rust);
  line-height: 1;
}
.view-why .implications[open] > summary::after { content: "\2013"; }
.view-why .implications > summary:hover h2 { color: var(--rust); }

.view-why .implications .kicker { margin-bottom: 18px; }

.view-why .implications h2 {
  font-size: 36px;
  margin-bottom: 0;
}

.view-why .implications .impl-intro {
  margin: 28px 0 34px;
  color: var(--ink-soft);
}

.view-why .req {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}
.view-why .req:last-of-type { border-bottom: 1px solid var(--rule); }

.view-why .req-num {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 52px;
  color: var(--rust);
  line-height: 1.45;
}

.view-why .req p { font-size: 18px; }
.view-why .req p strong {
  font-family: var(--serif-display);
  font-weight: 600;
  display: block;
  font-size: 31px;
  margin-bottom: 4px;
}

.view-why .req-from {
  display: block;
  font-family: var(--serif-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 8px;
}
.view-why .req-from span { color: var(--ink-faint); }

.view-why footer {
  margin-top: 72px;
  font-size: 15px;
  color: var(--ink-faint);
  font-style: italic;
}

/* ---------- Use cases ---------- */
.view-why .usecases {
  margin-top: 8px;
  padding-top: 8px;
  animation: aboutWhyRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.view-why .usecases > .kicker { margin-bottom: 18px; }

.view-why .usecases > h2 {
  font-size: 36px;
  margin-bottom: 0;
}

.view-why .uc-intro {
  margin: 28px 0 18px;
  color: var(--ink-soft);
}

.view-why .uc { padding-top: 8px; }

.view-why .uc > summary.uc-head {
  display: grid;
  grid-template-columns: 96px 1fr 28px;
  gap: 24px;
  align-items: baseline;
  cursor: pointer;
  padding: 22px 0 18px;
  border-top: 1px solid var(--rule);
  transition: border-color 0.2s ease;
}
.view-why .uc:last-of-type > summary.uc-head { border-bottom: 1px solid var(--rule); }
.view-why .uc[open] > summary.uc-head { border-bottom: none; }
.view-why .uc > summary.uc-head:hover { border-top-color: var(--rust); }
.view-why .uc > summary.uc-head:hover h3 { color: var(--rust); }
.view-why .uc > summary.uc-head::after {
  content: "+";
  justify-self: end;
  font-family: var(--serif-display);
  font-size: 30px;
  font-weight: 300;
  color: var(--rust);
  line-height: 1;
}
.view-why .uc[open] > summary.uc-head::after { content: "\2013"; }

.view-why .uc-num {
  font-family: var(--serif-display);
  font-size: 38px;
  font-weight: 300;
  font-style: italic;
  color: var(--rust);
  line-height: 1;
  text-align: right;
}

.view-why .uc h3 {
  font-family: var(--serif-display);
  font-size: 27px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.view-why .uc-tag {
  font-family: var(--serif-body);
  font-size: 17px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 10px 0 0;
  max-width: 54ch;
}

.view-why .uc-body {
  padding-top: 22px;
  padding-bottom: 8px;
}

.view-why .capabilities {
  margin: 26px 0 6px;
  border-top: 1px solid var(--rule);
}

.view-why .cap {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

.view-why .cap-name {
  font-family: var(--serif-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.view-why .cap-name span {
  display: block;
  font-family: var(--serif-body);
  font-size: 13px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.04em;
  color: var(--rust);
  margin-top: 4px;
}

.view-why .cap p {
  font-size: 17px;
  color: var(--ink-soft);
  margin-bottom: 0;
}

/* Renamed from `rise`: @keyframes are global no matter which file declares them,
   so a generic name here could collide with any app animation added later. */
@keyframes aboutWhyRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .view-why .cap { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 640px) {
  .view-why { font-size: 17px; }
  .view-why summary.section-head { grid-template-columns: 52px 1fr 22px; gap: 14px; }
  .view-why .numeral { text-align: left; font-size: 44px; }
  .view-why h2 { font-size: 26px; }
  .view-why summary.section-head .head-text { grid-column: 2; }
  .view-why .section-body { padding-left: 0; }
  .view-why .pull { font-size: 22px; }
  .view-why .jumpnav { padding: 0 14px 0 0; margin: 0 -14px 0 0; }
  .view-why .jumpnav a { padding: 14px 12px 12px; font-size: 11px; letter-spacing: 0.08em; }
  .view-why .uc > summary.uc-head { grid-template-columns: 52px 1fr 22px; gap: 14px; }
  .view-why .uc-num { text-align: left; font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .view-why header,
  .view-why .controls,
  .view-why .jumpnav,
  .view-why .part-head,
  .view-why .section,
  .view-why .implications,
  .view-why .usecases { animation: none !important; }
  .stage { scroll-behavior: auto; }
}

/* The Why|How toggle now lives in the shared public/view-toggle.css, so the
   Capabilities tab can use the same component instead of forking it. */
