/* Mega-menu + mobile drawer. Consumes the tokens in homepage.css; adds no new
   colour. Interaction values (120/200 ms intent, 160 ms fade) live in nav.js —
   the transition here is the fade only. */

/* ---------- bar ---------- */
nav.top .links { align-items: center; }
/* page.html loads homepage.css + nav.css only; the light-theme logo invert
   lives in sections.css, so it is repeated here for the stub pages. */
:root[data-theme="light"] nav.top .logo { filter: invert(1) brightness(.28); }
/* Pillar pages have bright article images; a scrim nav smears over them.
   The translucent bar is a homepage-hero effect — solid everywhere else. */
body[data-page="stub"] nav.top { background: var(--ink-1); backdrop-filter: none; }
body[data-page="stub"] { background: var(--ink-0); }
.nav-link {
  background: transparent; border: none; cursor: pointer; padding: 8px 2px;
  font: inherit; font-size: 14.5px; color: var(--muted); text-decoration: none;
  display: inline-flex; align-items: center; gap: 5px;
}
.nav-link:hover, .nav-link[aria-expanded="true"] { color: var(--text); }
.nav-link:focus-visible { outline: 2px solid var(--brand-lift); outline-offset: 3px; border-radius: 4px; }
.nav-item { display: inline-flex; align-items: center; gap: 1px; }
.nav-item.open .nav-link, .nav-item:hover .nav-link { color: var(--text); }
.caret-btn { background: transparent; border: none; cursor: pointer; padding: 8px 3px;
  color: var(--muted); display: inline-flex; }
.caret-btn:focus-visible { outline: 2px solid var(--brand-lift); outline-offset: 2px; border-radius: 4px; }
.caret { font-size: 9px; opacity: .6; transition: transform .16s ease; }
.caret-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }
nav.top[data-scrolled="true"] { border-bottom-color: var(--line); }
#navCtas { display: flex; align-items: center; gap: 10px; }
@media (max-width: 900px) { #navCtas .btn-sec { display: none; } }

/* ---------- panels ---------- */
.mega {
  position: fixed; z-index: 39; left: 0; right: 0; top: 0; padding-top: 62px;
  background: var(--ink-1); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}
.mega[data-open="true"] {
  opacity: 1; visibility: visible; transform: none; transition-delay: 0s;
}
@media (prefers-reduced-motion: reduce) { .mega { transition: none; } }
/* Flex rails, not an equal-column grid: the display column gets the width its
   27px links need to sit one per line, the small columns get a readable
   measure, and the feature card is pushed to the right rail and top-aligned —
   the auto-grid centred it in dead space and squeezed the middle column. */
.mega-inner {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 38px 40px;
  padding-top: 34px; padding-bottom: 46px;
}
.mega-col { flex: 1 1 200px; max-width: 330px; }
.mega-col:first-of-type { flex: 0 1 340px; max-width: none; }
.mega-feature { flex: 0 1 280px; margin-left: auto; }
.mega-title { display: block; color: var(--muted); margin-bottom: 14px; }
.mega-item { display: block; text-decoration: none; padding: 8px 10px; margin: 0 -10px;
  border-radius: 8px; }
.mega-item:hover { background: var(--nav-hov); }
.mega-item b { display: block; color: var(--text); font-family: var(--sans);
  font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.mega-item span { display: block; color: var(--muted); font-size: 13px; line-height: 1.45;
  margin-top: 2px; }
/* SCALE PLAY (2026-09-03, after the OpenAI mega-menu): the panel's FIRST
   column is the display column — few links, set HUGE, no notes, no hover
   pill — and the remaining columns stay small under their tiny mono
   eyebrows. The size gap is the hierarchy; boxes would only dilute it. */
.mega-col:first-of-type .mega-item { padding: 9px 0; margin: 0; border-radius: 0; }
.mega-col:first-of-type .mega-item:hover { background: none; }
.mega-col:first-of-type .mega-item b {
  font-size: 27px; font-weight: 650; letter-spacing: -.022em; line-height: 1.12;
  transition: color .14s ease; }
.mega-col:first-of-type .mega-item:hover b { color: var(--brand-lift); }
.mega-col:first-of-type .mega-item span { display: none; }
.mega-col:first-of-type .mega-title { margin-bottom: 10px; }
.mega-feature {
  display: flex; flex-direction: column; gap: 10px; justify-content: flex-start;
  text-decoration: none; padding: 22px 24px; border-radius: var(--radius);
  /* A real card in BOTH themes — in light mode the bare surface class left it
     floating as loose text in white space. */
  background: var(--ink-2); border: 1px solid var(--line);
}
.mega-feature .lbl { color: var(--data); }
.mega-feature p { color: var(--text); font-size: 14.5px; line-height: 1.5; margin: 0; }
/* Same one mono label spec as pillar.css (values in homepage.css, .lbl). */
.mega-feature .go {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
}
.mega-feature .go { color: var(--brand-lift); }
.mega-feature:hover { border-color: var(--brand-lift); }
@media (max-width: 900px) { .mega { display: none; } }

/* ---------- mobile drawer additions ---------- */
.sheet-group {
  display: flex; justify-content: space-between; align-items: center;
  background: transparent; border: none; cursor: pointer; font: inherit;
  padding: 14px 4px; min-height: 44px; color: var(--text); font-size: 16px;
  border-bottom: 1px solid var(--line-soft); text-align: left; width: 100%;
}
.sheet-group .caret { font-size: 10px; color: var(--muted); transition: transform .16s ease; }
.sheet-group[aria-expanded="true"] .caret { transform: rotate(180deg); }
.sheet-sub { display: flex; flex-direction: column; padding: 2px 0 6px; }
.sheet-sub a { padding: 10px 18px !important; font-size: 15px !important;
  color: var(--muted) !important; border-bottom: none !important; }
.sheet-sub a:active { color: var(--text) !important; }
.nav-sheet { max-height: 100dvh; overflow-y: auto; }

/* (The "all of X" row was cut 2026-09-04 — the top-level label already links
   to the pillar page.) */
