/* ═══════════════════════════════════════════════════════════════
   doc-shared.css — Shared styles for Brand Style Guide &
   Competitor Brand Analysis (and future doc pages).
   Edit once, applies everywhere.
   ═══════════════════════════════════════════════════════════════ */

/* ── Navbar z-index override for doc pages ─────────────────── */
/* Doc pages render .navbar-docs (via ds-nav.js); marketing pages render
   .navbar-site. The z-index override here scopes specifically to the
   docs surface — marketing pages keep their own stacking context. */
.navbar-docs { z-index: 10000 !important; }

/* Note — an earlier iteration introduced a bespoke `.ds-doc-topnav` block
   here. It was retired once the DS pages moved back to the marketing
   `.navbar` + `.nav-dropdown` primitives (for dropdown parity, backdrop
   blur, and `shared.js` wiring). See `.nav-logo-label` in styles.css
   for the mark-only + monospace-kicker lock-up that now sits on the
   left of the DS navbar. */

/* ══════════════════════════════════════════════════════════════
   HEADER (.doc-header)
   ══════════════════════════════════════════════════════════════ */
/* Hero padding (Apr 2026 v2): 192 px top, 56 px bottom.
   Top — generous breathing room so the breadcrumb + title don't feel
   crammed against the fixed navbar. Earlier iteration cut top to
   144 px to keep tabs/scope-bars within first-fold reach on the
   dashboard / catalog, but designers reported the hero felt cramped;
   the keyword-gradient title is the brand moment of every DS page
   and earns the air. 192 px restores the full-marketing breathing
   room.
   Bottom — kept at 56 px (vs the original 192 px) so the first content
   module after the hero still lands within first-fold reach. The hero
   trio (eyebrow → title → subtitle) sets identity; whatever's below it
   is the actual page work. Asymmetric padding (192 top / 56 bottom)
   is intentional: lots of air above the title, modest gap to the body
   content. Total hero height ~256 px vs the 384 px of the all-192
   marketing default — still room for a second module above the fold.
   Pair with body::before for ambient light — no per-hero background. */
.doc-header {
  color: var(--ink-900);
  /* Apr 2026: bumped from 192/56 → 224/128 so the hero feels less
     crammed top + bottom. Eyebrow has more clearance from the
     navbar; subtitle has real breathing room before the bottom
     seam. Mobile overrides in styles.css media queries still kick
     in for narrow viewports. */
  padding: 224px 0 128px;
  position: relative;
  overflow: hidden;
  /* Faint full-width seam at the bottom of the hero. Anchors the
     sidebar's top edge to the same horizontal line as the main
     content's top edge — without it the sidebar reads as floating.
     Kept at 6% alpha so it's a quiet seam, not a chrome divider. */
  border-bottom: 1px solid color-mix(in oklch, var(--text-primary) 6%, transparent);
}
.doc-header .container {
  display: flex; flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-12); position: relative; z-index: 1;
}
.header-top { display: flex; }
.header-bottom { display: flex; flex-direction: column; align-items: flex-start; }

/* Hero atmospheric light is handled entirely by the body-level
   `body::before` (top-left primary) + `body::after` (bottom-right
   secondary) ambient. Earlier iterations layered a `.doc-header::before`
   radial pair (8–28% mint + 6–22% purple) and a `.hero-gradient` top-
   fade wrapper on top — both retired in Apr 2026 once body-level
   ambient covered every page consistently. Heroes now sit flat on the
   canvas — no per-hero background, same component, every team. */

/* Hero title — line-height 1.18 (vs --lh-display at 1.14) keeps a
   touch of breathing because the 80 px title at 1.14 line-height
   produces a 1.0 ratio, and gradient spans using
   `-webkit-background-clip: text` need real leading to avoid clipping
   descenders on letters like g / y / p when they render as gradient
   fills. 1.18 is tight enough to keep multi-line titles dense but
   gives the descender its pixel back.

   `max-width: none` — the parent .header-content used to cap the
   whole text cluster at 640–720 px, which forced two-word titles
   like "Component Catalog" or "Working with Claude" to wrap mid-
   phrase. The cap was originally chosen for SUBTITLE measure, but
   .header-subtitle has its own 640 px cap (see below) — so the
   parent cap was redundant for the subtitle and only constraining
   the title. The title now owns its own measure: it can run as wide
   as the page container (1280 px - 80 px × 2 padding = 1120 px of
   content area). At hero scale this fits any reasonable DS title
   ("Working with Claude" needs ~760 px) on a single line without
   wrapping prematurely. */
.header-title {
  font-size: var(--text-hero); font-weight: var(--fw-extrabold); letter-spacing: var(--tracking-tighter);
  line-height: 1.18;
  color: var(--ink-900);
  max-width: none;
}
/* Keyword gradient — every DS hero title carries a brand-rich gradient
   on its operative noun. The pattern: solid Ink for the framing words,
   gradient on the keyword. The keyword is almost always the last word
   of the title because DS page titles are noun-phrases ("Component
   Catalog", "Working with Claude", "Brand Style Guide") — the noun is
   what identifies the page; the qualifying words are framing.

   Markup contract:
     <h1 class="header-title">Component <span class="grad">Catalog</span></h1>
     <h1 class="header-title">Working with <span class="grad">Claude</span></h1>
     <h1 class="header-title">Brand Style <span class="grad">Guide</span></h1>

   The descender-padding pair (`display: inline-block` + 0.04em
   vertical padding) is non-negotiable: `-webkit-background-clip: text`
   clips the painted gradient at the inline element's bounding box,
   which by default ends at the cap-height. Without this, descenders
   on g / y / p / Q would render mid-stroke. The 0.08em right padding
   keeps italic-leaning terminal strokes from clipping at the right
   edge; left padding stays 0 so the gradient start aligns with the
   preceding solid-ink word's edge.

   `line-height: inherit` so the inline-block doesn't introduce its
   own taller line-box; the title's existing 1.18 line-height carries.

   Full anatomy + the larger "display line-height & gradient
   descenders" rule lives in `design.md §03 → Typography`. */
.header-title .grad {
  background: linear-gradient(var(--accent-primary), var(--accent-primary)); /* TEMP solid — gradient text paused */
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  padding: 0.04em 0.08em 0.04em 0;
  line-height: inherit;
}
/* Version number kicker — accent-colored, slightly larger than the
   surrounding title. Used on doc heros that ship a version (e.g. the
   brand guide). Solid accent fill, NOT gradient — version numbers are
   functional metadata; the gradient treatment is reserved for the
   keyword span (.grad) above. */
.header-title .version-num {
  font-size: 1.15em; font-weight: var(--fw-black); letter-spacing: var(--tracking-tighter);
  color: var(--accent-primary);
  margin-left: 0.08em;
}
.header-subtitle {
  font-size: var(--text-body); color: var(--ink-400); line-height: var(--lh-body);
  max-width: 640px; margin-top: var(--sp-4); font-weight: var(--fw-regular);
}

/* ── Compact header variant ──────────────────────────────────
   For DS surfaces that already have a persistent top nav +
   sidebar; the 192px hero padding is overkill when every click
   lands you back in the same chrome. Compact hero clears the
   pill-style .navbar (fixed at 20px, ~72px tall → 92px bottom
   edge) and lands the title + stats row in the top viewport
   without demanding a scroll.

   Pair with: <header class="doc-header doc-header--compact">
*/
.doc-header--compact {
  /* Apr 2026: bumped from 128/56 → 160/96 to match the base hero's
     loosened breathing room (proportionally tighter than base since
     compact is meant to be... compact). */
  padding: 160px 0 96px;
}
.doc-header--compact .container {
  gap: 12px;
}
/* Title font-size override REMOVED (Apr 2026): the variant only
   shortens vertical padding — title size stays at the canonical
   `--text-hero` (80px) so every DS hero reads at the same scale.
   Earlier override pinned it to `--text-display` (56px) which made
   the catalog "Components" title visibly smaller than every other
   page; that drift is what triggered the unification. */
.doc-header--compact .header-subtitle {
  margin-top: var(--space-8);
  max-width: 680px;
}

/* ── Centered hero variant ────────────────────────────────────
   For DS surfaces where the hero needs to read as an anchor
   (dashboard, showcase landing) — the title sits center-stage,
   scales up to `hero`, and the meta chips row auto-centers
   below it. Pair with `.doc-header--compact` so the whole hero
   stays taller than the nav but shorter than the marketing
   192px-padded default.  */
.doc-header--center {
  text-align: center;
  /* Generous vertical breathing room so the title stands alone
     as an anchor — no eyebrow or subtitle to crutch against.
     Top clears the pill navbar with room to spare; bottom gives
     the sidebar + content section-heading air to read.
     Apr 2026: bumped from 200/160 → 232/192 to match the base
     hero's loosened rhythm. */
  padding-top: 232px;
  padding-bottom: 192px;
}
.doc-header--center .container {
  align-items: center;
}
/* Title styling inherits the base unchanged — the variant only
   centers alignment; size + line-height stay canonical.
   Apr 2026: removed `line-height: var(--lh-display)` (a fixed 64 px
   value) which was producing a sub-1.0 ratio against the 80 px font
   and clipping descenders ("Claude" overlapping "efficiently" on the
   AI hero). Per `design.md §03 → Display line-height & gradient
   descenders`, display-scale titles must use a unitless literal —
   the base `.header-title` already does (1.18). */
.doc-header--center .doc-header-meta,
.doc-header--center .dash-header-meta {
  justify-content: center;
}
@media (max-width: 600px) {
  .doc-header--center {
    padding-top: 120px;
    padding-bottom: 48px;
  }
  .doc-header--center .header-title {
    font-size: var(--text-h1);
  }
}

/* DEPRECATED — .doc-header-meta was a stat-chip row rendered below the
   subtitle (component count, tokens, "+37 this week"). It was retired in
   the Hero merge: heroes set the page identity, not freshness signals. If
   you need to surface counts or "what's new", put them in the body of the
   page (dashboard cards, changelog) where they have room to breathe. The
   class definition is kept here so existing consumers don't break, but
   nothing in the codebase ships it anymore as of the Hero unification. */
.doc-header-meta {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: var(--space-8);
  margin-top: var(--space-20);
}

@media (max-width: 600px) {
  .doc-header--compact { padding: 84px 0 40px; }
}

/* ══════════════════════════════════════════════════════════════
   HERO SUB-COMPONENTS — slots consumed by `.doc-header` variants
   ══════════════════════════════════════════════════════════════
   The hero is built from five slots:

     .header-eyebrow   small uppercase kicker       (optional)
     .header-title     h1 display/hero type          (required)
     .header-subtitle  description paragraph         (optional)
     .header-actions   CTA button row                (optional)
     .header-visual    full-bleed visual asset slot  (optional)

   Ordering and layout are governed by the `.doc-header--*` modifier:
   base / --compact / --center / --split / --showcase. See each
   variant's rules below for how the slots get arranged.

   Note — earlier versions had a sixth slot `.doc-header-meta` for
   stat chips; it was retired in the Hero merge (heroes set identity,
   not freshness). The class still exists as deprecated CSS above for
   backwards compatibility. See #hero rule 8 in design-system/index.html.
*/

/* Unified eyebrow — mono, uppercase, accent-colored. Replaces the
   per-page eyebrow implementations (`.eyebrow-word`, `.anim-eyebrow`,
   inline `.eyebrow-code` on headers). Keep the older classes where
   they already ship; this one is for new consumers going forward. */
/* One member of the unified Eyebrow family — see #eyebrow in
   design-system/index.html for the family doc, and the comment block
   above .ds-doc-eyebrow in styles.css for the full member list. The
   family shares ONE typography recipe (mono · 12px · 700 · uppercase
   · --tracking-wider); this member's job is the hero-context color
   treatment: --accent-primary-mid parent + optional --accent-secondary
   leaf via .header-eyebrow-accent.

   Aligned to --tracking-wider in May 2026 — was --tracking-wide
   (1.2px), which created a 0.48px gap against the section + pane
   members of the family (both --tracking-wider / 1.68px). Same
   recipe across every surface is the point of the family. */
.header-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--accent-primary-mid);
  margin-bottom: 16px;
}
.header-eyebrow-accent {
  color: var(--accent-secondary);
  margin-left: 8px;
  font-weight: var(--fw-semibold);
}

/* ── .header-eyebrow--breadcrumb — path-style eyebrow ───────────
   Reads as a 2-segment path with a ` / ` separator between
   every direct child. PURELY VISUAL — not functional navigation.
   Use plain <span>s, not <a> links; the wrapper is a <div>,
   not a <nav>. The pattern signals "you are here in the system"
   without making the parent a clickable affordance.

   Earlier iteration had it as <nav><a><span></nav> with the
   parent linking back to the catalog. Designers said the link
   affordance over-promised — the parent is context, not a
   destination. Stripped to a visual-only path treatment.

   Color recipe — single accent.
     · Parent + slash separator → quiet muted chrome
       (color-mix text-primary 50% transparent)
     · Child (.header-eyebrow-accent) → --accent-primary
   The whole breadcrumb feels like one element with the leaf
   pulled forward; parent + slash recede as supporting chrome
   instead of competing as a second accent.

   Use this on every DS sub-page hero (Components, Dashboard,
   Brand Guide, Motion, Art, AI, Competitors) so the eyebrow
   doubles as a "you are here in the system" affordance. The
   plain default variant (label + accent, no slashes) stays
   useful for marketing heroes with no parent surface.

   Markup
     <div class="header-eyebrow header-eyebrow--breadcrumb">
       <span>Design System</span>
       <span class="header-eyebrow-accent">Components</span>
     </div>
*/
.header-eyebrow--breadcrumb {
  /* Stay inline so the wrapper doesn't grow to fill the hero's
     content width — the path is content-sized. */
  display: inline-block;
  /* Quiet path color — parent + slash render as muted chrome
     so the accent leaf is the only emphasized element. */
  color: color-mix(in oklch, var(--text-primary) 50%, transparent);
}
.header-eyebrow--breadcrumb > * + *::before {
  content: " / ";
  display: inline-block;
  margin: 0 8px;
  /* Inherit from the breadcrumb's muted color — separator and
     parent share the same tone, so they read as one unit. */
  color: inherit;
  font-weight: var(--fw-bold);
  pointer-events: none;
}
.header-eyebrow--breadcrumb .header-eyebrow-accent {
  /* Override the base accent (which uses --accent-secondary).
     The leaf is the single accent of the breadcrumb. */
  color: var(--accent-primary);
  /* The base accent has 8px margin-left; inside a breadcrumb the
     separator owns the inter-segment spacing. Drop it. */
  margin-left: 0;
}

/* Content cluster — groups eyebrow + title + subtitle + meta + actions
   so the whole text block can be flex-aligned (left/center) independent
   of a sibling .header-visual slot. Used by --split and --showcase;
   optional but encouraged elsewhere for markup clarity.

   Apr 2026 v2 — the parent cap was retired entirely. Earlier iterations
   capped the cluster at 640 px (subtitle measure) → bumped to 720 px to
   fit "Component Catalog" → kept hitting the same problem with longer
   DS titles ("Working with Claude" runs ~760 px). The cap was
   originally chosen for subtitle readability, but .header-subtitle has
   its own max-width: 640 px (see above), so the parent cap was
   redundant for the subtitle and only constraining the title. Removing
   it lets each child own its own measure: title runs to container
   width (1120 px content area), subtitle stays capped at 640 px,
   eyebrow flows freely.
   The `--split` and `--center` variants below set their own caps for
   their own layout reasons; this base rule no longer competes. */
.header-content {
  display: flex; flex-direction: column;
  align-items: flex-start;
  max-width: none;
}
.doc-header--center .header-content {
  align-items: center;
  max-width: 720px;
}

/* Actions row — sits below the subtitle. Buttons wrap on narrow
   viewports so primary + secondary CTAs stack cleanly on phones. */
.header-actions {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin-top: 24px;
}

/* ⌘K trigger in a flat doc-page hero — pages WITHOUT a catalog
   sidebar (brand-guide / competitors / dashboard / ai / lab /
   personas / partners) mount their .search-trigger as the last
   child of .header-content instead of inside #dsSidebar. The base
   primitive is width:100% (a column affordance); cap it so it reads
   as a search field, not a hero-wide bar. */
.header-content > .search-trigger {
  max-width: var(--w-6);
  margin-top: var(--space-24);
}

/* Visual slot — intentionally styleless. Pages bring their own asset
   (3D coin stack, illustration, screenshot) and target `.header-visual`
   as the positioning context. Variants `--split` and `--showcase` place
   it; `--compact` / --center pages simply omit it. */
.header-visual {
  display: flex; align-items: center; justify-content: center;
  position: relative;
}

/* ══════════════════════════════════════════════════════════════
   HERO VARIANT — .doc-header--split
   ══════════════════════════════════════════════════════════════
   Two-column hero: copy on the left, visual asset on the right.
   Used by the Brand Style Guide (coin-stack hero) and any DS page
   where the visual IS the brand moment but the copy still leads.
   Collapses to a single column with the visual below the text
   on tablet (≤900px) so nothing gets squeezed.
*/
.doc-header--split .container {
  display: grid;
  /* Apr 2026 — was `1fr auto` which let the visual claim its
     intrinsic width (a 480 px coin stack), squeezing the content
     column down to ~190 px of effective text width. The 80 px
     title was forced to wrap one word per line.
     `3fr 2fr` rebalances to a 60/40 split: at 1200 px container
     the content side renders ~700 px, enough for "Brand Style" +
     "Guide" on two lines, matching Competitors' rhythm.
     Gap was --sp-8 (32 px); bumped to --sp-16 (64 px) so the visual
     column never crowds long display titles — text + visual read as
     two anchored zones, not a single squeezed row. */
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: var(--sp-16);
  align-items: center;
}
.doc-header--split .header-content { max-width: 720px; }
.doc-header--split .header-visual {
  justify-self: end;
  /* Cap the visual size so it can't push past its 2fr column on
     ultra-wide viewports — keeps the 60/40 rhythm intact. */
  max-width: 100%;
}

@media (max-width: 900px) {
  .doc-header--split .container {
    grid-template-columns: 1fr;
  }
  .doc-header--split .header-content { max-width: 100%; }
  .doc-header--split .header-visual {
    justify-self: center;
    margin-top: var(--sp-6);
  }
}

/* (Retired Apr 2026) — `.doc-header--showcase` was a stacked-center
   hero variant with an integrated visual slot beneath the text. It
   was removed when Motion + Art (its only consumers) were migrated
   to the canonical default `.doc-header` shape — left-aligned, no
   visual inside the hero — with the page-leading visual moved into
   a separate `.hero-showcase` section below the hero. The pattern
   read as drift compared to Components / Dashboard / Brand Guide.
   See `.hero-showcase` further down + the catalog `#hero` section
   for the replacement. */

/* ── Alignment helpers — .doc-header--compact honors the content slot
   alignment so split/center play nicely together. */
.doc-header--compact .header-content {
  max-width: 680px;
}

/* ══════════════════════════════════════════════════════════════
   HERO SHOWCASE — page-leading visual section below the hero
   ══════════════════════════════════════════════════════════════
   Replaces the legacy `.doc-header--showcase` integrated visual
   slot. Pages that have a page-leading visual asset (Motion's coin
   stack, Art's generative canvas) used to embed the visual inside
   the hero via `--showcase`, which centered the eyebrow + title +
   subtitle and made those heroes look different from the standard
   left-aligned shape used by Components / Dashboard / Brand Guide.

   Now the hero is always standard (left-aligned, no visual), and
   the visual lives in this `.hero-showcase` section directly below.
   The page-local CSS that sizes `.header-visual--coin-stack` /
   `.header-visual--art` etc. continues to work — only the wrapping
   changed. */
.hero-showcase {
  padding: 0 0 var(--sp-12);
}
.hero-showcase > .container {
  display: flex;
  justify-content: center;
}
.hero-showcase .header-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
}

/* ══════════════════════════════════════════════════════════════
   META TAG (glass-morphism chip)
   ══════════════════════════════════════════════════════════════ */
.meta-tag {
  display: inline-flex; align-items: center; gap: 20px;
  padding: 16px 28px 16px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(0,0,0,0.15),
    inset 1px 0 0 rgba(255,255,255,0.08),
    0 8px 40px rgba(0,0,0,0.35),
    0 2px 8px rgba(0,0,0,0.2),
    0 0 0 1px color-mix(in oklch, var(--accent-primary) 8%, transparent);
  white-space: nowrap;
  position: relative;
}
.meta-tag::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 20px;
  background: radial-gradient(ellipse 80% 60% at 10% 0%, color-mix(in oklch, var(--accent-primary) 12%, transparent) 0%, transparent 60%);
  pointer-events: none;
}
.meta-tag-icon {
  width: var(--space-32); height: var(--space-32); border-radius: var(--space-12);
  background: linear-gradient(135deg, color-mix(in oklch, var(--accent-primary) 50%, transparent) 0%, color-mix(in oklch, var(--accent-secondary) 30%, transparent) 100%);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px color-mix(in oklch, var(--accent-primary) 30%, transparent);
}
.meta-tag-icon svg { display: block; }
.meta-tag-text {
  font-size: var(--text-body); font-weight: var(--fw-bold); letter-spacing: var(--tracking-tight);
  background: linear-gradient(rgba(255,255,255,0.95), rgba(255,255,255,0.95)); /* TEMP solid — gradient text paused */
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.meta-tag-divider {
  width: 1px; height: var(--space-20);
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.25), transparent);
  flex-shrink: 0;
}
.meta-tag-sub {
  font-family: var(--font-mono); font-size: var(--text-caption); font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-wider); text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

/* Dark-mode meta-tag overrides */
[data-theme="dark"] .meta-tag {
  border-color: color-mix(in oklch, var(--accent-primary) 12%, transparent);
  background: color-mix(in oklch, var(--accent-primary) 4%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    inset 0 -1px 0 rgba(0,0,0,0.06),
    0 4px 24px color-mix(in oklch, var(--accent-primary) 8%, transparent),
    0 0 0 1px color-mix(in oklch, var(--accent-primary) 6%, transparent);
}
[data-theme="dark"] .meta-tag::before {
  background: radial-gradient(ellipse 80% 60% at 10% 0%, color-mix(in oklch, var(--accent-primary) 6%, transparent) 0%, transparent 60%);
}
[data-theme="dark"] .meta-tag-text {
  background: linear-gradient(rgba(0,0,0,0.85), rgba(0,0,0,0.85)); /* TEMP solid — gradient text paused */
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="dark"] .meta-tag-divider { background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.15), transparent); }
[data-theme="dark"] .meta-tag-sub { color: rgba(0,0,0,0.3); }
[data-theme="dark"] .meta-tag-icon {
  background: linear-gradient(135deg, color-mix(in oklch, var(--accent-primary) 15%, transparent) 0%, color-mix(in oklch, var(--accent-secondary) 10%, transparent) 100%);
  box-shadow: none;
}

/* Dark-mode header glow override removed with the base rule above — the
   body::before ambient already follows theme intensity, so no doc-page
   override is needed. */

/* ══════════════════════════════════════════════════════════════
   THEME TOGGLE BUTTON
   Uses standard .btn-tertiary .btn-icon .btn-borderless
   from the button system. Only the icon-swap animation is custom.
   ══════════════════════════════════════════════════════════════ */
.theme-toggle { flex-shrink: 0; margin-left: var(--sp-4); position: relative; }
.theme-toggle svg {
  position: absolute;
  transition: opacity 0.2s, transform 0.25s;
}
.theme-toggle .icon-sun  { opacity: 1; transform: rotate(0deg) scale(1); }
.theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.7); }

[data-theme="dark"] .theme-toggle .icon-sun  { opacity: 0; transform: rotate(90deg) scale(0.7); }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }

/* ══════════════════════════════════════════════════════════════
   MATERIAL SYMBOLS ICON FONT
   ══════════════════════════════════════════════════════════════ */
.ms {
  font-family: 'Material Symbols Outlined';
  font-size: inherit; line-height: 1;
  letter-spacing: var(--tracking-normal); text-transform: none;
  display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap; word-wrap: normal; direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle; user-select: none;
}
.ms-filled { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }

/* ══════════════════════════════════════════════════════════════
   SHARED RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .theme-toggle svg { transition: none !important; }
}

@media (max-width: 900px) {
  .header-title { font-size: var(--text-display); }
  /* Scale down the hero top-padding on tablet, but keep enough
     clearance for the fixed 72px navbar + 20px gutter (92px min).
     At 900px the desktop 192px is overkill but 48px collided with
     the logo — 120px is the sweet spot. */
  .doc-header { padding: 120px 0 80px; }
}
@media (max-width: 600px) {
  .header-title { font-size: var(--text-h1); }
  .doc-header { padding: 104px 0 64px; }
  .meta-tag { white-space: normal; }
}

/* ═══════════════════════════════════════════════════════════════
   Callouts — intent-tinted info boxes for docs
   Promoted from design-system.html's inline <style> so every DS
   destination page (dashboard, brand guide, AI, etc.) can use the
   same primitive. Variants: note · tip · warn · do · dont.
   Structure:
     <div class="callout callout--note">
       <span class="callout-icon">…</span>
       <div class="callout-body">
         <div class="callout-title">Title</div>
         <div class="callout-text">Body copy.</div>
       </div>
     </div>
═══════════════════════════════════════════════════════════════ */
.callout {
  display: flex; gap: var(--space-16); align-items: flex-start;
  padding: var(--space-16); border-radius: 12px;
  background: color-mix(in oklch, var(--text-primary) 4%, transparent);
  border-left: 3px solid color-mix(in oklch, var(--text-primary) 30%, transparent);
  margin: 0 0 var(--space-16);
  max-width: 640px;
}
.callout-icon {
  flex-shrink: 0;
  width: var(--space-20); height: var(--space-20);
  display: inline-flex; align-items: center; justify-content: center;
  color: color-mix(in oklch, var(--text-primary) 70%, transparent);
  margin-top: 0;
}
.callout-icon svg { width: var(--space-20); height: var(--space-20); }
.callout-body { flex: 1; min-width: 0; }
.callout-title {
  font-size: var(--text-sm); font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  letter-spacing: var(--tracking-normal);
}
.callout-text {
  font-size: var(--text-sm); line-height: var(--lh-sm);
  color: var(--text-muted);
}
.callout-text code {
  background: color-mix(in oklch, var(--text-primary) 8%, transparent);
  padding: var(--space-4) var(--space-8); border-radius: var(--space-4);
  font-size: 0.88em; font-family: var(--font-mono);
}
.callout-text strong { color: var(--text-secondary); font-weight: var(--fw-semibold); }

/* Note — neutral informational (default look above) */
.callout--note .callout-icon { color: var(--accent-primary-mid); }
.callout--note { border-left-color: var(--accent-primary-mid); }

/* Tip — palette accent, brand-tied hint */
.callout--tip {
  background: color-mix(in oklch, var(--accent-secondary) 8%, transparent);
  border-left-color: var(--accent-secondary);
}
.callout--tip .callout-icon { color: var(--accent-secondary); }

/* Warn — cautionary, uses --danger semantic token */
.callout--warn {
  background: color-mix(in oklch, var(--danger) 8%, transparent);
  border-left-color: var(--danger);
}
.callout--warn .callout-icon { color: var(--danger); }

/* Do — positive guidance, uses --success */
.callout--do {
  background: color-mix(in oklch, var(--success) 8%, transparent);
  border-left-color: var(--success);
}
.callout--do .callout-icon { color: var(--success); }
.callout--do .callout-title { color: var(--success); }

/* Don't — negative guidance, uses --danger */
.callout--dont {
  background: color-mix(in oklch, var(--danger) 8%, transparent);
  border-left-color: var(--danger);
}
.callout--dont .callout-icon { color: var(--danger); }
.callout--dont .callout-title { color: var(--danger); }
