/* ==========================================================================
   AIDisruption.fyi — Design System v2 (the one stylesheet)
   ==========================================================================
   Extracted pixel-for-pixel from the seven design artboards under
   ~/work/redesign-extract/ (the lan, E, C, F, D2, G and H folders).
   NOTE: never write glob patterns like "E_[star]/Pulse" inside a CSS
   comment — the star-slash ends the comment and eats the rules after it
   (this exact bug made the whole :root token block vanish on 2026-10-06).
   Values replicate the artboards exactly; where the boards disagree the
   resolution is recorded in docs/design-v2-system.md and inline below.

   Naming: every class is prefixed `ax-` (AIDisruption) so this stylesheet
   can never collide with the v1 `frontend/style.css`.

   Structure:
     1. Tokens (CSS custom properties)
     2. Base / reset
     3. Typography
     4. Shell / layout containers
     5. Site nav (bar, dropdowns, badges, nav search)
     6. Sample banner
     7. Search rows (page-level: hero search + search strip)
     8. Buttons, pills, chips, badges, tags
     9. Cards, panels, figures
    10. Tables
    11. Forms
    12. Bars & chart helpers (track/fill, stacked, legends, dumbbells)
    13. Footer (light + dark variants)
    14. Responsive
    15. Utilities
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Color — surfaces */
  --ax-bg: #FBFBFA;            /* page background (all artboards) */
  --ax-surface: #FFFFFF;       /* nav, cards, panels, table shells */
  --ax-surface-alt: #F1F4F2;   /* alt panels, table header strips, hover bg */
  --ax-surface-soft: #F7F9F8;  /* map canvas, insufficient-data box bg */
  --ax-hover: #F1F4F2;         /* row / navitem / opt hover bg */
  --ax-selected: #E8F0EE;      /* selected row bg, geo pills, next-steps bg */

  /* Color — text */
  --ax-text: #1A1F2B;          /* primary text; dark footer bg; national ticks */
  --ax-text-2: #2B3341;        /* soft dark text (card descs, intro paragraphs) */
  --ax-text-3: #3A4352;        /* secondary text (ledes, labels, captions) */
  --ax-text-4: #4A5362;        /* tertiary text (footnotes, footers, axis) */
  --ax-text-5: #5A6663;        /* chart neutral (axis labels, share-of-time) */
  --ax-text-dark-surface: #D3D9E0; /* body text on the dark footer */

  /* Color — brand */
  --ax-teal: #0F5C5C;          /* primary teal: links, accents, focus, charts */
  --ax-teal-dark: #093B3B;     /* link hover; glossary terms; next-step titles */
  --ax-teal-navy: #1E3550;     /* dark dropdown item hover (navitem-d) */
  --ax-teal-soft: #E8F0EE;     /* light teal surface (chips hover, pills) */
  --ax-teal-fill: #BFD5D1;     /* light teal chart fill (bars, bands) */
  --ax-teal-mid: #7DB6B0;      /* map exposure ramp mid */
  --ax-teal-ramp-low: #DCE8E5; /* map exposure ramp low */

  /* Color — data series */
  --ax-automation: #1E3550;    /* deep slate navy (the system's teal-navy):
                                  automated segments, dots, legends. Replaces
                                  the old saturated blue #2A78D6, which fought
                                  the muted v2 palette. */
  --ax-augmentation: #178080;  /* brand teal, lightened per Dan 2026-10-08
                                  (was #0F5C5C — too close to black on the
                                  dark segments): augmented segments. Replaces the
                                  old orange #EB6834. Navy-vs-teal keeps the
                                  two poles distinguishable (hue + ~1.6:1
                                  lightness) without leaving the system. */
  --ax-theoretical: #2F7D77;   /* theoretical-capability numeral (Result) */
  --ax-theoretical-fill: #3E9A94; /* theoretical progress fill */
  --ax-little-ai: #C3C9C6;     /* "little AI use" segment (Result) */
  --ax-no-ai: var(--ax-augmentation); /* alias for stacked-bar remainder where
                                  the artboards use augmentation orange */

  /* Color — status pills (CommunityEmpty state code, now shared) */
  --ax-pill-low-bg: #E3F1E6;   --ax-pill-low-fg: #1E5B2F;
  --ax-pill-mod-bg: #FFF4DC;   --ax-pill-mod-fg: #7A4E0A;
  --ax-pill-high-bg: #F9E3DA;  --ax-pill-high-fg: #8A2A0E;

  /* Color — alerts / accent */
  --ax-warn: #A8741F;          /* coming-soon tool bar; no-match left border */
  --ax-stress: #7A2E0E;        /* current-stress big numeral */
  --ax-error: #8A2A0E;         /* error text (form alerts) */
  --ax-error-bg: #F9E3DA;      /* error pill bg */

  /* Color — success */
  --ax-success-bg: #E3F1E6;    --ax-success-fg: #1E5B2F;
  --ax-success-border: #B5D6BC;

  /* Color — borders */
  --ax-border: #D8DCD8;        /* primary border: nav, cards, panels, dividers */
  --ax-border-row: #EEF0EC;    /* dense row separators, bar tracks */
  --ax-border-row-alt: #E6E9E3;/* jobs-table body rows; chart gridlines */
  --ax-border-input: #7F8B89;  /* form input border (2px) */
  --ax-border-input-lg: #5A6663; /* hero search input/select border (2px) */
  --ax-border-muted: #9AA5A3;  /* neutral buttons/chips border, listbox border */
  --ax-border-grid: #E1E4E0;   /* Result gridlines; Community2 SVG gridlines */
  --ax-border-axis: #B5BCB9;   /* chart axis baseline; dumbbell span bars */
  --ax-border-strong: #1A1F2B; /* "how to read" top rule; zero line */

  /* Color — banner (canonical; Result/Community2 drift #E5CE9B/#4A3510) */
  --ax-banner-bg: #FFF4DC;
  --ax-banner-border: #E8D5A6;
  --ax-banner-text: #4A3A10;

  /* Color — map stress ramp (Pulse) */
  --ax-map-stress-low: #F3E3B3;
  --ax-map-stress-mid: #E0A93B;
  --ax-map-stress-high: #B5651D;

  /* Typography */
  --ax-font-sans: 'Source Sans 3', system-ui, sans-serif;
  --ax-font-serif: 'Source Serif 4', Georgia, serif;
  --ax-body-size: 18px;        /* body base */
  --ax-body-lh: 1.55;

  /* Spacing */
  --ax-pad-x: 32px;            /* every container's side padding */
  --ax-gap-section: 20px;
  --ax-gap-card: 24px;

  /* Radii (scale from the artboards: 2/3/4/6/8 + 999 pills) */
  --ax-r-bar: 2px;             /* bar tops (2px 2px 0 0) */
  --ax-r-swatch: 3px;          /* legend swatches, micro-bars */
  --ax-r-seg: 4px;             /* result stacked-bar segments; bar end caps */
  --ax-r: 6px;                 /* buttons, inputs, navitem, insets, chips */
  --ax-r-lg: 8px;              /* cards, panels, figures, dropdowns, listbox */
  --ax-r-pill: 999px;

  /* Shadows (flat design: the ONLY shadow in the system is the dropdown) */
  --ax-shadow-dropdown: 0 8px 24px rgba(0, 0, 0, 0.14);

  /* Focus ring (global) */
  --ax-focus: 3px solid var(--ax-teal);
  --ax-focus-offset: 2px;

  /* Floating nav height (set from JS by nav.js; fallback = desktop value).
     Sticky anchors (section nav, scroll-margin) key off this var. */
  --ax-nav-h: 84px;
}

/* --------------------------------------------------------------------------
   2. BASE / RESET
   -------------------------------------------------------------------------- */
.ax-page,
body.ax-page {
  margin: 0;
  background: var(--ax-bg);
  color: var(--ax-text);
  font-family: var(--ax-font-sans);
  font-size: var(--ax-body-size);
  line-height: var(--ax-body-lh);
}

.ax-page a { color: var(--ax-teal); }
.ax-page a:hover { color: var(--ax-teal-dark); }

.ax-page button:focus-visible,
.ax-page a:focus-visible,
.ax-page input:focus-visible,
.ax-page select:focus-visible,
.ax-page summary:focus-visible,
.ax-page circle:focus-visible {
  outline: var(--ax-focus);
  outline-offset: var(--ax-focus-offset);
}
/* 2026-10-06 community polish: `.ax-page button` above was missing its
   :focus-visible qualifier, painting a permanent 3px focus outline on
   every button (the "larger than the header" green boxes on the community
   sortable headers). Fixed here globally; the community page's local
   workaround is now redundant but harmless. */

/* Dropdown <details>/<summary> base (artboard helmet CSS) */
.ax-page details > summary { list-style: none; cursor: pointer; }
.ax-page details > summary::-webkit-details-marker { display: none; }

.ax-page input[type="range"] { width: 100%; accent-color: var(--ax-teal); }
.ax-page input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--ax-teal); }

.ax-page .ax-card { transition: border-color .15s; }

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY
   -------------------------------------------------------------------------- */
/* Kicker: all uppercase, tracked, bold (ls .08em page-level, .06em component) */
.ax-kicker {
  font-size: 15px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ax-teal);
}
.ax-kicker--sm { font-size: 14px; }
.ax-kicker--gray { color: var(--ax-text-3); }
.ax-kicker--soft { color: var(--ax-text-4); letter-spacing: 0.05em; }

/* Uppercase component label (card labels, stat headers) */
.ax-label {
  font-size: 14px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ax-text-3);
}
.ax-label--15 { font-size: 15px; letter-spacing: 0.05em; }
.ax-label--soft { color: var(--ax-text-4); }

/* Headings — Source Serif 4, weight 700 only */
.ax-page h1, .ax-page h2, .ax-page h3,
.ax-serif { font-family: var(--ax-font-serif); font-weight: 700; }

.ax-h1 {  /* H1 on all pages except landing: 48/1.1, ls -0.01em */
  font-family: var(--ax-font-serif); font-weight: 700;
  font-size: 48px; line-height: 1.1; letter-spacing: -0.01em; margin: 0;
  max-width: 820px;
}
.ax-h1--hero { font-size: 52px; line-height: 1.1; }        /* landing hero */
.ax-h1--pulse { font-size: 44px; line-height: 1.12; margin: 8px 0 14px; } /* Pulse */

.ax-h2 {  /* section H2 — 30px is the empty-state/Scenarios baseline */
  font-family: var(--ax-font-serif); font-weight: 700;
  font-size: 30px; line-height: 1.2; margin: 0;
}
.ax-h2--34 { font-size: 34px; line-height: 1.15; }   /* Community2 sections */
.ax-h2--32 { font-size: 32px; line-height: 1.2; margin: 0 0 6px; } /* Pulse */
.ax-h2--38 { font-size: 38px; line-height: 1.15; }   /* landing big sections */
.ax-h2--28 { font-size: 28px; line-height: 1.2; }    /* detail panel, next steps */
.ax-h2--26 { font-size: 26px; }                      /* sources / how-to-read */

.ax-title {  /* card / panel / figure titles: 22px serif */
  font-family: var(--ax-font-serif); font-weight: 700;
  font-size: 22px; line-height: 1.25;
}
.ax-title--20 { font-size: 20px; line-height: 1.25; } /* field-card titles */
.ax-title--24 { font-size: 24px; line-height: 1.2; }
.ax-title--26 { font-size: 26px; }

/* Numerals — big serif stats */
.ax-stat { font-family: var(--ax-font-serif); font-weight: 700; font-size: 40px; line-height: 1.05; }
.ax-stat--36 { font-size: 36px; line-height: 1.1; }
.ax-stat--44 { font-size: 44px; line-height: 1.05; }
.ax-stat--64 { font-size: 64px; line-height: 1; }

/* Leads and prose */
.ax-lede { font-size: 21px; color: var(--ax-text-3); max-width: 700px; margin: 0; }
.ax-lede--20 { font-size: 20px; max-width: 760px; }       /* Pulse intro */
.ax-lede--hero { max-width: 560px; }
.ax-prose { color: var(--ax-text-3); margin: 0; }
.ax-prose--2 { color: var(--ax-text-2); }
.ax-meta { font-size: 15px; color: var(--ax-text-4); }
.ax-note { font-size: 14px; font-style: italic; color: var(--ax-text-4); }
.ax-note--13 { font-size: 13px; }

/* --------------------------------------------------------------------------
   4. SHELL / LAYOUT
   -------------------------------------------------------------------------- */
.ax-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--ax-pad-x);
  box-sizing: border-box;
}
.ax-container--wide { max-width: 1280px; }  /* Pulse page (map + drawer) */

.ax-band { padding: 64px var(--ax-pad-x) 8px; }       /* hero blocks */
.ax-band--48 { padding: 48px var(--ax-pad-x) 8px; }   /* Result/Community2 title */
.ax-band--56 { padding: 56px var(--ax-pad-x) 0; }
.ax-band--40 { padding: 40px var(--ax-pad-x) 16px; }
.ax-band--44 { padding: 44px 0 8px; }                 /* Pulse title (inside container) */
.ax-stack { display: flex; flex-direction: column; }
.ax-stack--16 { gap: 16px; }
.ax-stack--20 { gap: 20px; }
.ax-stack--22 { gap: 22px; }

.ax-cols { display: flex; flex-wrap: wrap; }          /* generic wrapping row */
.ax-row { display: flex; flex-wrap: wrap; align-items: center; }

/* Section header row with kicker + optional pill (Scenarios hero pattern) */
.ax-title-row {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}

/* "How to read" / sources band: dark 2px top rule */
.ax-rule-strong {
  border-top: 2px solid var(--ax-border-strong);
  padding-top: 28px;
  display: flex; flex-wrap: wrap; gap: 20px 56px;
}

/* --------------------------------------------------------------------------
   5. SITE NAV
   -------------------------------------------------------------------------- */
.ax-nav {
  position: sticky; top: 0; z-index: 60;   /* floating: stays on top while scrolling */
  border-bottom: 1px solid var(--ax-border);
  background: var(--ax-surface);
}
.ax-nav__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px var(--ax-pad-x);
  display: flex; flex-wrap: wrap; gap: 12px 32px;
  align-items: center; justify-content: space-between;
}
.ax-nav__inner--wide { max-width: 1280px; } /* Pulse */

.ax-logo {
  font-family: var(--ax-font-serif); font-weight: 700; font-size: 24px;
  color: var(--ax-text); text-decoration: none;
}
.ax-logo:hover { color: var(--ax-text); }
.ax-logo .ax-logo-dot { color: var(--ax-teal); }

.ax-nav__links {
  display: flex; flex-wrap: wrap; gap: 4px 28px;
  align-items: center;
  font-size: 16px; font-weight: 600;
}

/* Top-level nav links + dropdown summaries */
.ax-navlink,
.ax-navsum {
  color: var(--ax-text); text-decoration: none;
  padding: 10px 0;
  border-bottom: 3px solid transparent;
  display: inline-block;
}
.ax-navlink:hover { color: var(--ax-text); }
.ax-navsum { font-weight: 600; list-style: none; cursor: pointer; }
.ax-navsum::-webkit-details-marker { display: none; }
.ax-navlink.is-active,
.ax-navsum.is-active { border-bottom: 3px solid var(--ax-teal); }

.ax-caret { font-size: 12px; }

/* Dropdown <details> wrapper */
.ax-navdrop { position: relative; }
.ax-navdrop[open] > .ax-navsum { border-bottom-color: var(--ax-teal); }
.ax-navpanel {
  position: absolute; top: 100%; left: 0; z-index: 40;
  min-width: 260px;
  background: var(--ax-surface);
  border: 1px solid var(--ax-border);
  border-radius: var(--ax-r-lg);
  box-shadow: var(--ax-shadow-dropdown);
  padding: 8px;
}
/* Narrow viewports: the panel must never extend past the right edge (the
   result-page nav trigger sits far enough right that a left-anchored
   260px panel overflowed 375px screens by ~300px). Anchor to the right
   edge and cap the width instead. */
@media (max-width: 640px) {
  .ax-navpanel {
    left: auto;
    right: 0;
    max-width: calc(100vw - 16px);
  }
}
.ax-navitem {
  display: block;
  padding: 10px 12px;
  border-radius: var(--ax-r);
  color: var(--ax-text); text-decoration: none;
  font-weight: 600; font-size: 16px; white-space: nowrap;
}
.ax-navitem:hover { background: var(--ax-hover); color: var(--ax-text); }
.ax-navitem--dark:hover { background: var(--ax-teal-navy); color: #FFFFFF; }
.ax-navdivider { height: 1px; background: var(--ax-border); margin: 6px 8px; }

/* "Soon" badge in the nav */
.ax-soon {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; margin-left: 6px;
  padding: 1px 7px; border-radius: var(--ax-r-pill);
  border: 1px solid var(--ax-teal); color: var(--ax-teal);
}

/* Nav-embedded search (Pulse only) */
.ax-navsearch {
  display: flex; gap: 8px;
}

/* Sticky in-page section nav (Pulse). Anchors below the floating nav via
   --ax-nav-h (kept current by nav.js). */
.ax-sectionnav {
  position: sticky;
  top: var(--ax-nav-h);
  z-index: 5;
  background: var(--ax-bg);
  border-bottom: 1px solid var(--ax-border);
  display: flex; flex-wrap: wrap; gap: 6px 22px;
  font-size: 16px; font-weight: 600;
}
.ax-sectionnav a { text-decoration: none; padding: 8px 0; }
.ax-navsearch .ax-input {
  height: 44px; width: 240px; max-width: 100%;
  padding: 0 14px; font: inherit; font-size: 16px;
  border: 2px solid var(--ax-border-muted);
  border-radius: var(--ax-r); background: var(--ax-surface);
}

/* --------------------------------------------------------------------------
   6. SAMPLE BANNER
   -------------------------------------------------------------------------- */
.ax-banner {
  background: var(--ax-banner-bg);
  border-bottom: 1px solid var(--ax-banner-border);
}
.ax-banner__inner {
  max-width: 1160px; margin: 0 auto;
  padding: 10px var(--ax-pad-x);
  font-size: 15px; color: var(--ax-banner-text);
}

/* --------------------------------------------------------------------------
   7. SEARCH ROWS (page-level)
   -------------------------------------------------------------------------- */
/* Hero search (Occupations / CommunityEmpty): 60px input + button */
.ax-search {
  display: flex; flex-wrap: wrap; gap: 10px;
  max-width: 760px;
}
.ax-search__col { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.ax-search__label { font-weight: 700; font-size: 17px; }
.ax-search .ax-input--lg { flex: 1 1 320px; height: 60px; padding: 0 18px; font: inherit; font-size: 19px; }
.ax-search .ax-btn--lg { height: 60px; padding: 0 28px; font: inherit; font-size: 18px; }

/* Suggestion listbox (role=listbox) */
.ax-listbox {
  background: var(--ax-surface);
  border: 1px solid var(--ax-border-muted);
  border-radius: var(--ax-r-lg);
  overflow: hidden;
}
.ax-opt {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 8px;
  width: 100%; text-align: left; box-sizing: border-box;
  min-height: 52px; padding: 8px 18px;
  font-size: 18px; color: var(--ax-text); font-family: inherit;
  border: 0; border-bottom: 1px solid var(--ax-border-row);
  cursor: pointer; background: var(--ax-surface);
}
.ax-opt:last-child { border-bottom: 0; }
.ax-opt:hover { background: var(--ax-hover); }
.ax-opt__meta { font-size: 15px; color: var(--ax-text-4); }

/* No-match status */
.ax-nomatch {
  background: var(--ax-surface);
  border: 1px solid var(--ax-border);
  border-left: 4px solid var(--ax-warn);
  border-radius: var(--ax-r-lg);
  padding: 16px 20px;
  font-size: 17px; color: var(--ax-text-2);
}

/* Example chips */
.ax-chips {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  max-width: 900px; padding-top: 18px;
}
.ax-chips__label { font-size: 16px; font-weight: 700; }
.ax-chip {
  height: 44px; padding: 0 16px;
  font-size: 16px; font-weight: 600; font-family: inherit;
  border: 2px solid var(--ax-border-muted);
  background: var(--ax-surface); color: var(--ax-text);
  border-radius: var(--ax-r-pill); cursor: pointer;
}
.ax-chip:hover { background: var(--ax-teal-soft); }

/* Search strip (Result / Community2 top band): 48px input + link-button */
.ax-strip {
  background: var(--ax-surface);
  border-bottom: 1px solid var(--ax-border);
}
.ax-strip__inner {
  max-width: 1160px; margin: 0 auto;
  padding: 20px var(--ax-pad-x);
  display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center;
}
.ax-strip .ax-input { flex: 1 1 280px; max-width: 480px; min-width: 0; height: 48px; padding: 0 16px; font: inherit; font-size: 17px; }
.ax-breadcrumb { font-size: 15px; color: var(--ax-text-4); }
.ax-breadcrumb__current { color: var(--ax-text); font-weight: 600; }

/* --------------------------------------------------------------------------
   8. BUTTONS / PILLS / BADGES / TAGS
   Grammar: 2px border, weight 700, radius 6px (rect) or 999px (pill).
   Heights: 44 (cards/tables) · 48 (forms/strips) · 54 (hero) · 60 (hero search).
   -------------------------------------------------------------------------- */
.ax-btn {
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box;
  font-family: inherit; font-weight: 700; text-decoration: none;
  border-radius: var(--ax-r); cursor: pointer;
  height: 44px; padding: 0 14px; font-size: 15px;
}
.ax-btn--48 { height: 48px; padding: 0 22px; font-size: 17px; }
.ax-btn--54 { height: 54px; padding: 0 28px; font-size: 18px; }
.ax-btn--60 { height: 60px; padding: 0 28px; font-size: 18px; }
.ax-btn--56 { height: 56px; padding: 0 24px; font-size: 18px; }  /* Scenarios notify form */
.ax-btn--icon { width: 44px; padding: 0; font-size: 22px; line-height: 1; }

.ax-btn--primary {
  border: 2px solid var(--ax-teal);
  background: var(--ax-teal); color: #FFFFFF;
}
.ax-btn--primary:hover { background: var(--ax-teal-dark); border-color: var(--ax-teal-dark); color: #FFFFFF; }

.ax-btn--outline {           /* teal outline on white/transparent */
  border: 2px solid var(--ax-teal);
  background: var(--ax-surface); color: var(--ax-teal);
}
.ax-btn--outline:hover { background: var(--ax-teal-soft); }

.ax-btn--outline-plain {     /* "How we measure this" (transparent bg) */
  border: 2px solid var(--ax-teal);
  background: transparent; color: var(--ax-teal);
}

.ax-btn--neutral {
  border: 2px solid var(--ax-border-muted);
  background: var(--ax-surface); color: var(--ax-text);
}
.ax-btn--neutral:hover { background: var(--ax-hover); }

/* Pill toggles (Pulse/Result sort + mode toggles) — 999px radius */
.ax-pill {
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box;
  height: 44px; padding: 0 18px;
  font-family: inherit; font-size: 16px; font-weight: 700;
  border-radius: var(--ax-r-pill); cursor: pointer;
}
.ax-pill.is-on {
  border: 2px solid var(--ax-teal);
  background: var(--ax-teal); color: #FFFFFF;
}
.ax-pill.is-off {
  border: 2px solid var(--ax-border-muted);
  background: var(--ax-surface); color: var(--ax-text);
}
.ax-pill.is-off:hover { background: var(--ax-hover); }

/* Status pills (Low / Moderate / High stress; LOW badge) */
.ax-status {
  font-size: 13px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--ax-r-pill); padding: 2px 10px;
}
.ax-status--low { background: var(--ax-pill-low-bg); color: var(--ax-pill-low-fg); }
.ax-status--mod { background: var(--ax-pill-mod-bg); color: var(--ax-pill-mod-fg); }
.ax-status--high { background: var(--ax-pill-high-bg); color: var(--ax-pill-high-fg); }

/* "Coming soon" banner pill (Scenarios hero) */
.ax-soon-banner {
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: #7A4E0A;
  background: var(--ax-banner-bg);
  border: 1px solid var(--ax-banner-border);
  border-radius: var(--ax-r-pill);
  padding: 3px 12px;
}

/* Geography tag pill (Community2) */
.ax-geo-tag {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ax-teal-dark);
  background: var(--ax-teal-soft);
  border: 1px solid var(--ax-teal-fill);
  border-radius: var(--ax-r-pill); padding: 2px 10px;
  vertical-align: middle;
}

/* Pre-trend check chip (Result evidence) */
.ax-check {
  border: 2px solid var(--ax-teal);
  border-radius: var(--ax-r-pill); padding: 4px 14px;
  font-size: 15px; font-weight: 700; color: var(--ax-teal-dark);
}

/* Text link with weight */
.ax-link { font-weight: 600; color: var(--ax-teal); text-decoration: none; }
.ax-link--strong { font-weight: 700; font-size: 17px; }
.ax-link:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   9. CARDS / PANELS / FIGURES
   -------------------------------------------------------------------------- */
.ax-cardgrid { display: flex; flex-wrap: wrap; gap: 20px; }

/* Headline stat card (Pulse/Community2) — 2px border, teal when open */
.ax-statcard {
  flex: 1 1 240px; min-width: 240px;
  background: var(--ax-surface);
  border: 2px solid var(--ax-border);
  border-radius: var(--ax-r-lg);
  padding: 22px;
  display: flex; flex-direction: column; gap: 8px;
}
.ax-statcard.is-open { border-color: var(--ax-teal); }
.ax-statcard:hover { border-color: var(--ax-teal); }
.ax-statcard__desc { font-size: 16px; color: var(--ax-text-2); line-height: 1.4; min-height: 46px; }

/* Generic card (1px border): panels, figures, listboxes, tables */
.ax-panel {
  background: var(--ax-surface);
  border: 1px solid var(--ax-border);
  border-radius: var(--ax-r-lg);
  padding: 24px;
}
.ax-panel--28 { padding: 28px; }
.ax-panel--32 { padding: 32px; }
.ax-panel--alt { background: var(--ax-surface-alt); } /* recent lookups, caution */

/* Tool card with colored top bar (Guided tools) */
.ax-toolcard {
  flex: 1 1 300px;
  background: var(--ax-surface);
  border: 1px solid var(--ax-border);
  border-top: 4px solid var(--ax-teal);
  border-radius: var(--ax-r-lg);
  padding: 28px;
  display: flex; flex-direction: column; gap: 10px;
}
.ax-toolcard--soon { border-top-color: var(--ax-warn); }

/* Hero tool card (Guided right column) */
.ax-herocard {
  flex: 1 1 380px;
  background: var(--ax-surface-alt);
  border: 1px solid var(--ax-border);
  border-radius: var(--ax-r-lg);
  padding: 32px;
  display: flex; flex-direction: column; gap: 18px;
}

/* Placeholder / preview box (dashed) */
.ax-placeholder {
  background: var(--ax-surface);
  border: 1px dashed var(--ax-border-muted);
  border-radius: var(--ax-r-lg);
  padding: 28px;
  display: flex; flex-direction: column; gap: 22px;
}

/* Success / status alert (Scenarios email confirm) */
.ax-alert-success {
  background: var(--ax-success-bg);
  border: 1px solid var(--ax-success-border);
  border-radius: var(--ax-r-lg);
  padding: 18px 20px;
  font-size: 18px; color: var(--ax-success-fg);
}

/* Figure (charts inside cards) */
.ax-figure {
  flex: 1 1 520px; margin: 0;
  background: var(--ax-surface);
  border: 1px solid var(--ax-border);
  border-radius: var(--ax-r-lg);
  padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.ax-figcaption { font-family: var(--ax-font-serif); font-weight: 700; font-size: 22px; line-height: 1.25; }
.ax-figcaption__sub { font-size: 15px; color: var(--ax-text-3); font-family: var(--ax-font-sans); font-weight: 400; }

/* Chart inset (inside stat cards): padded well with bars */
.ax-inset {
  border: 1px solid var(--ax-border);
  border-radius: var(--ax-r);
  background: var(--ax-bg);
  padding: 12px 12px 8px;
}
.ax-inset--96 { padding: 14px 14px 10px; }

/* Legend rows */
.ax-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; padding-top: 6px; font-size: 13px; color: var(--ax-text-2); }
.ax-legend--15 { font-size: 15px; gap: 8px 24px; }
.ax-swatch { width: 12px; height: 12px; border-radius: var(--ax-r-swatch); flex: 0 0 12px; }
.ax-swatch--14 { width: 14px; height: 14px; flex: 0 0 14px; }
.ax-swatch--line { width: 22px; height: 0; border-top: 3px solid var(--ax-teal); flex: 0 0 22px; }
.ax-swatch--dot-open { border-radius: 50%; border: 2px solid var(--ax-text-5); background: var(--ax-surface); }
.ax-swatch--dot-closed { border-radius: 50%; background: var(--ax-teal); }

/* --------------------------------------------------------------------------
   10. TABLES (grid tables — all data tables in the system are CSS grids)
   -------------------------------------------------------------------------- */
.ax-table {
  background: var(--ax-surface);
  border: 1px solid var(--ax-border);
  border-radius: var(--ax-r-lg);
  overflow-x: auto;
}
.ax-table__inner { min-width: 680px; }
.ax-table__head {
  padding: 0 20px;
  background: var(--ax-surface-alt);
  border-top: 1px solid var(--ax-border);
  border-bottom: 1px solid var(--ax-border);
  display: grid; gap: 0 16px; align-items: center;
  font-size: 14px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--ax-text-3);
}
/* Column templates used by the artboards — pick one per table: */
.ax-table__head--metros { grid-template-columns: minmax(200px,2fr) minmax(110px,1fr) minmax(130px,1fr) minmax(170px,1.2fr); }
.ax-table__head--jobs   { grid-template-columns: minmax(240px,2.4fr) minmax(110px,1fr) minmax(190px,1.6fr) minmax(170px,1.3fr) 120px; }
.ax-table__head--tasks  { grid-template-columns: 44px minmax(220px,2.2fr) minmax(190px,1.5fr) minmax(120px,1fr) minmax(120px,1fr) minmax(150px,1.2fr) 84px; }
.ax-table__head--breakdown { display: grid; grid-template-columns: minmax(150px,1.3fr) 2fr 130px; gap: 14px; }
.ax-table__head--signals { display: grid; grid-template-columns: 44px minmax(180px,2.2fr) 120px 110px 140px; gap: 12px; }

.ax-table__title-row {
  padding: 18px 20px 6px;
  display: flex; flex-wrap: wrap; gap: 4px 16px;
  justify-content: space-between; align-items: baseline;
}

.ax-th {
  min-height: 44px; padding: 0 4px;
  font: inherit; font-size: 14px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--ax-text);
  background: transparent; border: 0; text-align: inherit;
}
.ax-th--head { color: var(--ax-text-3); padding: 14px 6px 8px; }  /* plain (non-button) header cell */
.ax-th--sort { cursor: pointer; }

.ax-tr {
  display: grid; gap: 0 16px; align-items: center;
  padding: 6px 20px; min-height: 56px;
  border-bottom: 1px solid var(--ax-border-row);
  font-size: 17px; color: var(--ax-text);
  text-decoration: none;
}
.ax-tr--tasks { padding: 16px 20px; font-size: 16px; border-bottom-color: var(--ax-border-row-alt); }
.ax-tr--breakdown { grid-template-columns: minmax(150px,1.3fr) 2fr 130px; gap: 14px; padding: 9px 6px; min-height: 0; font-size: 16px; }
.ax-tr--signals { grid-template-columns: 44px minmax(180px,2.2fr) 120px 110px 140px; gap: 12px; padding: 8px 0; min-height: 56px; }
.ax-tr.is-selected { background: var(--ax-selected); }
a.ax-tr:hover, button.ax-tr:hover { background: var(--ax-hover); }
.ax-tr__name { font-weight: 700; }
.ax-tr__name--600 { font-weight: 600; }
.ax-tr__num { text-align: right; }
.ax-tr__num--teal { font-weight: 700; color: var(--ax-teal); }

.ax-table__foot { padding: 12px 20px 16px; font-size: 14px; font-style: italic; color: var(--ax-text-4); }

/* --------------------------------------------------------------------------
   11. FORMS
   -------------------------------------------------------------------------- */
.ax-field { display: flex; flex-direction: column; gap: 6px; }
.ax-field__label { font-weight: 700; font-size: 17px; }
.ax-field__label--15 { font-size: 15px; }

.ax-input,
.ax-select,
.ax-textarea {
  box-sizing: border-box; width: 100%;
  height: 48px; padding: 0 14px;
  font-family: inherit; font-size: 17px;
  border: 2px solid var(--ax-border-input);
  border-radius: var(--ax-r);
  background: var(--ax-surface); color: var(--ax-text);
}
.ax-select { padding: 0 10px; }
.ax-input--lg { height: 60px; padding: 0 18px; font-size: 19px; border-color: var(--ax-border-input-lg); }
.ax-select--lg { height: 52px; padding: 0 14px; font-size: 18px; border-color: var(--ax-border-input-lg); }
.ax-input--56 { height: 56px; padding: 0 16px; font-size: 18px; border-color: var(--ax-border-input-lg); }  /* Scenarios notify form */

.ax-error { font-size: 16px; color: var(--ax-error); }

/* --------------------------------------------------------------------------
   12. BARS & CHART HELPERS
   -------------------------------------------------------------------------- */
/* Track + fill progress bar with optional national-comparator tick */
.ax-bar {
  position: relative; height: 12px;
  border-radius: var(--ax-r);
  background: #E3E7E4;
  overflow: visible;
}
.ax-bar__fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  border-radius: var(--ax-r);
  background: var(--ax-teal);
}
.ax-bar__tick {
  position: absolute; top: -4px;
  width: 3px; height: 20px;
  background: var(--ax-border-strong);
}
.ax-bar--8 { height: 8px; border-radius: var(--ax-r-seg); }
.ax-bar--14 { height: 14px; border-radius: 7px; }  /* Scenarios community bars */
.ax-bar--16 { height: 16px; border-radius: var(--ax-r-swatch); background: var(--ax-border-row); }
.ax-bar--16 .ax-bar__fill { border-radius: 0 var(--ax-r-seg) var(--ax-r-seg) 0; }

/* Stacked auto/aug bars: blue automated + orange augmented, 2px gap */
.ax-stacked { display: flex; gap: 2px; height: 28px; }
.ax-stacked--14 { height: 14px; }
.ax-stacked--10 { height: 10px; }
.ax-stacked__auto { background: var(--ax-automation); border-radius: var(--ax-r-swatch) 0 0 var(--ax-r-swatch); }
.ax-stacked__aug { background: var(--ax-augmentation); border-radius: 0 var(--ax-r-swatch) var(--ax-r-swatch) 0; }
.ax-stacked--28 .ax-stacked__seg { border-radius: var(--ax-r-seg); }

/* Mini bar charts (flex columns) */
.ax-bars { display: flex; align-items: flex-end; gap: 2px; height: 72px; }
.ax-bars--96 { height: 96px; }
.ax-bars--48 { height: 48px; gap: 3px; }
.ax-bars__bar { flex: 1 1 0; border-radius: var(--ax-r-bar) var(--ax-r-bar) 0 0; background: var(--ax-teal-fill); }
.ax-bars__bar--latest { background: var(--ax-teal); }
.ax-bars__bar--past { opacity: 0.55; }

/* Dumbbell rows */
.ax-dumbbell { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--ax-border-row); }
.ax-dumbbell__label { flex: 0 0 84px; font-size: 16px; font-weight: 600; }
.ax-dumbbell__rail { flex: 1 1 0; position: relative; height: 24px; }
.ax-dumbbell__baseline { position: absolute; top: 11px; left: 0; right: 0; height: 2px; background: #E3E7E4; }
.ax-dumbbell__span { position: absolute; top: 10px; height: 4px; border-radius: var(--ax-r-bar); background: var(--ax-border-axis); }
.ax-dumbbell__then {
  position: absolute; top: 4px; width: 16px; height: 16px;
  border-radius: 50%; border: 2px solid var(--ax-text-5);
  background: var(--ax-surface); margin-left: -8px;
}
.ax-dumbbell__now {
  position: absolute; top: 4px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--ax-teal);
  border: 2px solid var(--ax-surface); margin-left: -8px;
}
.ax-dumbbell__delta { flex: 0 0 96px; text-align: right; font-size: 15px; font-weight: 600; }

/* Method-rail (Result methods agreement) — same grammar as dumbbell */
.ax-rail { position: relative; height: 24px; }
.ax-rail__dot {
  position: absolute; top: 4px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--ax-teal);
  border: 2px solid var(--ax-surface); margin-left: -8px;
}

/* Insufficient-data box */
.ax-nodata {
  border: 1px dashed var(--ax-border-muted);
  border-radius: var(--ax-r);
  padding: 6px 12px;
  background: var(--ax-surface-soft);
  font-size: 15px; color: var(--ax-text-4);
}

/* --------------------------------------------------------------------------
   13. FOOTER
   -------------------------------------------------------------------------- */
/* Light footer (Scenarios, Occupations, CommunityEmpty, Pulse) */
.ax-footer {
  border-top: 1px solid var(--ax-border);
  background: var(--ax-surface);
  margin-top: 64px;
}
.ax-footer__inner {
  max-width: 1160px; margin: 0 auto;
  padding: 28px var(--ax-pad-x);
  display: flex; flex-wrap: wrap; gap: 10px 32px;
  justify-content: space-between;
  font-size: 15px; color: var(--ax-text-4);
}

/* Dark footer (Guided, Result, Community2) */
.ax-footer--dark {
  margin-top: 40px;
  background: var(--ax-text);
  color: var(--ax-text-dark-surface);
  border-top: 0;
}
.ax-footer--dark .ax-footer__inner {
  padding: 40px var(--ax-pad-x);
  gap: 24px 48px;
  font-size: 16px; color: var(--ax-text-dark-surface);
}
.ax-footer__brand {
  font-family: var(--ax-font-serif); font-weight: 700;
  font-size: 22px; color: var(--ax-surface);
}
.ax-footer__links {
  display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: flex-start;
}
.ax-footer--dark a { color: var(--ax-surface); text-decoration: none; }
.ax-footer--dark a:hover { color: var(--ax-surface); text-decoration: underline; }

/* --------------------------------------------------------------------------
   14. RESPONSIVE
   The artboards specify desktop only (1360 preview) with flex-wrap
   everywhere; these breakpoints formalize the wrap behavior.
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .ax-h1 { font-size: 38px; }
  .ax-h1--hero { font-size: 40px; }
  .ax-h1--pulse { font-size: 36px; }
  .ax-h2--38 { font-size: 32px; }
  .ax-h2--34 { font-size: 30px; }
  .ax-stat { font-size: 34px; }
  .ax-stat--64 { font-size: 48px; }
  .ax-band, .ax-band--48, .ax-band--56 { padding-top: 40px; }
  .ax-nav__inner { gap: 8px 16px; padding: 14px 16px; }
  .ax-nav__links { gap: 2px 18px; font-size: 15px; }
  .ax-banner__inner, .ax-strip__inner, .ax-footer__inner { padding-left: 16px; padding-right: 16px; }
  .ax-container { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 640px) {
  .ax-h1 { font-size: 30px; max-width: none; }
  .ax-h1--hero { font-size: 32px; }
  .ax-h1--pulse { font-size: 30px; }
  .ax-h2, .ax-h2--34 { font-size: 26px; }
  .ax-h2--38 { font-size: 28px; }
  .ax-stat { font-size: 30px; }
  .ax-stat--44 { font-size: 34px; }
  .ax-stat--64 { font-size: 40px; }
  .ax-lede { font-size: 18px; }
  .ax-band, .ax-band--48, .ax-band--56 { padding: 32px 16px 8px; }
  .ax-container { padding: 0 16px; }
  .ax-search .ax-input--lg, .ax-search .ax-btn--lg { flex: 1 1 100%; width: 100%; }
  .ax-strip .ax-input { max-width: none; flex: 1 1 100%; }
  .ax-btn--54 { width: 100%; }
  .ax-panel, .ax-panel--28, .ax-panel--32, .ax-figure, .ax-herocard { padding: 20px; }
  .ax-figcaption { font-size: 20px; }
  .ax-dumbbell__label { flex-basis: 64px; font-size: 14px; }
  .ax-dumbbell__delta { flex-basis: 72px; }
  .ax-table__inner { min-width: 520px; }
  .ax-footer--dark .ax-footer__inner { padding: 28px 16px; }
  .ax-navsearch .ax-input { width: 100%; }
  .ax-navsearch { width: 100%; }
}

/* --------------------------------------------------------------------------
   15. UTILITIES
   -------------------------------------------------------------------------- */
.ax-sr-only {
  position: absolute; left: -9999px;
}
.ax-gap-10 { gap: 10px; }
.ax-gap-14 { gap: 14px; }
.ax-nowrap { white-space: nowrap; }
.ax-mt-6 { margin-top: 6px; }
.ax-mt-20 { margin-top: 20px; }

/* --------------------------------------------------------------------------
   16. OVERLAYS — SLIDE-OVER DRAWER (window.axDrawer) + TOOLTIP (window.axTip)
   Shared components rendered by /assets/nav.js. The drawer is a right-side
   slide-over: it NEVER compresses or pushes page content. Dismiss: backdrop
   click, Escape, or the close button. Focus moves in on open and returns on
   close; the panel is an aria-modal dialog.
   -------------------------------------------------------------------------- */
.ax-drawer-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(26, 31, 43, 0.4);   /* --ax-text at 40% */
  border: 0; padding: 0;               /* it is a <button> for a11y sizing */
}
.ax-drawer {
  position: fixed; top: var(--ax-nav-h, 0px); right: 0; bottom: 0; z-index: 100;
  width: min(420px, 92vw);
  box-sizing: border-box;
  background: var(--ax-surface);
  border-left: 2px solid var(--ax-teal);
  border-radius: 0;
  overflow-y: auto;
  padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  transform: translateX(100%);
  transition: transform 0.2s ease-out;
  outline: none;
}
.ax-drawer.is-open { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) {
  .ax-drawer { transition: none; }
}
.ax-drawer__kicker { letter-spacing: 0.07em; }
.ax-drawer__title {
  font-family: var(--ax-font-serif); font-weight: 700;
  font-size: 30px; line-height: 1.15; margin: 0;
}
.ax-drawer__subtitle { font-size: 16px; color: var(--ax-text-2); margin-top: -6px; }
.ax-drawer__chart {
  border: 1px solid var(--ax-border);
  border-radius: var(--ax-r);
  background: var(--ax-bg);
  padding: 12px 12px 8px;
}
.ax-drawer__chart svg { display: block; width: 100%; }
.ax-drawer__chart .ax-drawer__bar { fill: var(--ax-teal-fill); }
.ax-drawer__chart .ax-drawer__bar--latest { fill: var(--ax-teal); }
.ax-drawer__chart .ax-drawer__zero { stroke: var(--ax-border-axis); stroke-width: 1; }
.ax-drawer__body { display: flex; flex-direction: column; gap: 14px; }

/* Custom tooltip (window.axTip). Dark surface, high contrast, no native
   title attribute involved. Newlines in data-tip break lines; lines that
   start with "* " render as bulleted rows (multi-series format). */
.ax-tip {
  position: fixed; z-index: 110; left: 0; top: 0;
  max-width: 300px;
  box-sizing: border-box;
  background: var(--ax-text);
  color: #FBFBFA;
  border: 1px solid var(--ax-border-strong);
  border-radius: var(--ax-r);
  padding: 8px 12px;
  font-family: var(--ax-font-sans);
  font-size: 14px; line-height: 1.45;
  pointer-events: none;
  box-shadow: var(--ax-shadow-dropdown);
}
.ax-tip:empty { display: none; }
.ax-tip__row { white-space: pre; }
.ax-tip__series { font-weight: 700; color: #FFFFFF; }
.ax-tip__bullet { display: flex; gap: 6px; }
.ax-tip__bullet::before { content: "•"; color: #BFD5D1; }

/* ==========================================================================
   National Pulse drawers — the ported v1 sidebars (feat/np-sidebar-content)
   --------------------------------------------------------------------------
   The v1 sidebars' .exsb-* card chrome (frontend/style.css ~6980-7160) and
   the v1 metro sidebar's .metro-sidebar-* rules (frontend/style.css
   ~3275-3435, 4770-4900) scoped under the shared .ax-drawer slide-over.
   v1 tokens mapped to the design system:
     var(--border)      -> var(--ax-border)
     var(--text)        -> var(--ax-text)
     var(--text-muted)  -> var(--ax-text-4)
     var(--accent)      -> var(--ax-teal)
     var(--card-bg)     -> var(--ax-surface)
   Chart fill/stroke colors and badge colors are the approved mock's, kept
   identical to v1. The drawer body is the scroll container (the .ax-drawer
   itself scrolls); SVGs are width:100% so nothing overflows horizontally.
   ========================================================================== */

/* ---- shared v1 chrome: skeleton + data states ---- */
.ax-drawer .loading,
.ax-drawer .no-data {
  color: var(--ax-text-4);
  font-size: 0.85rem;
  font-style: italic;
}
.ax-drawer .skeleton-num {
  display: inline-block;
  min-height: 1em;
  min-width: 2.5em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg,
    var(--ax-surface-alt) 0%, var(--ax-border) 50%, var(--ax-surface-alt) 100%);
  background-size: 200% 100%;
  animation: ax-skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 3px;
  vertical-align: baseline;
}
@keyframes ax-skeleton-shimmer {
  0%, 100% { background-position: 200% 0; }
  50% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ax-drawer .skeleton-num { animation: none; }
}

/* ---- .exsb-* card chrome (the four headline-measure drawers) ---- */
.ax-drawer .exsb-card {
  border: 1px solid var(--ax-border);
  border-radius: 10px;
  padding: 14px;
  margin-top: 0; /* the drawer body's flex gap owns the card spacing */
  background: var(--ax-surface);
}
.ax-drawer .exsb-headline {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.ax-drawer .exsb-headline .lvl {
  font-size: 13px;
  font-weight: 700;
  color: var(--ax-text-4);
  margin-left: 8px;
}
.ax-drawer .exsb-sub { color: var(--ax-text-4); margin-top: 4px; }
.ax-drawer .exsb-srcs { margin-top: 10px; font-size: 13px; line-height: 1.55; }
.ax-drawer .exsb-srcs a {
  color: var(--ax-teal);
  text-decoration: none;
  border-bottom: 1px solid var(--ax-teal-soft);
}
.ax-drawer .exsb-srcs a:hover { border-bottom-color: var(--ax-teal); }
.ax-drawer .exsb-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--ax-text-4);
}
.ax-drawer .exsb-card h3 { margin: 2px 0 8px; font-size: 13px; }
.ax-drawer .exsb-card h4 { margin: 2px 0 8px; font-size: 13px; }
.ax-drawer .exsb-interp { font-size: 12.5px; margin-top: 10px; line-height: 1.55; }
.ax-drawer .exsb-interp em { color: var(--ax-text-4); font-style: normal; }
.ax-drawer .exsb-legend { margin-top: 8px; font-size: 12px; line-height: 1.9; }
.ax-drawer .exsb-sw {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  vertical-align: -2px;
  margin-right: 6px;
}
.ax-drawer .exsb-sw--dot { border-radius: 50%; }
.ax-drawer .exsb-foot {
  margin-top: 12px;
  font-size: 11px;
  color: var(--ax-text-4);
  border-top: 1px solid var(--ax-border);
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.ax-drawer .exsb-foot a { color: var(--ax-teal); text-decoration: none; }
.ax-drawer .exsb-foot a:hover { text-decoration: underline; }
.ax-drawer .exsb-card svg rect[data-t],
.ax-drawer .exsb-card svg circle[data-t] { cursor: crosshair; }
.ax-drawer .exsb-card svg { max-width: 100%; height: auto; }

/* The v1 pointer tooltip (data-t attributes; appended to <body>, not
 * inside the drawer, so it is not .ax-drawer-scoped). */
.exsb-tooltip {
  position: fixed;
  pointer-events: none;
  background: #1a1d21;
  color: #fff;
  font-size: 11.5px;
  padding: 6px 9px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity .08s;
  max-width: 260px;
  z-index: 510;
}

/* ---- adoption sidebar: era divider + footnote (DEC-38 revision) ---- */
.ax-drawer .era-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ax-text-4);
  font-size: 0.66rem;
  margin: 10px 0 4px;
}
.ax-drawer .era-divider::before,
.ax-drawer .era-divider::after {
  content: "";
  flex: 1;
  border-top: 1px dashed var(--ax-border);
}
.ax-drawer .exsb-footnote {
  font-size: 0.72rem;
  font-style: italic;
  color: var(--ax-text-4);
  margin: 4px 0 10px;
}

/* ---- labor sidebar: Pearson details box, grouped test list,
 *      ongoing-research list ---- */
.ax-drawer .exsb-details { margin-top: 10px; }
.ax-drawer .exsb-details summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ax-teal);
  text-decoration: none;
  border-bottom: 1px solid var(--ax-teal-soft);
  display: inline-block;
  list-style: none;
}
.ax-drawer .exsb-details summary::-webkit-details-marker { display: none; }
.ax-drawer .exsb-details summary::after {
  content: " \25B8";
  margin-left: 5px;
  color: var(--ax-text-4);
  font-size: 11px;
}
.ax-drawer .exsb-details[open] summary::after { content: " \25BE"; }
.ax-drawer .exsb-details[open] summary {
  color: var(--ax-text);
  border-bottom-color: transparent;
}
.ax-drawer .exsb-formula {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--ax-surface-soft);
  border: 1px solid var(--ax-border);
  border-radius: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
}
.ax-drawer .exsb-f-head {
  font-family: var(--ax-font-sans, sans-serif);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--ax-text-4);
  margin-bottom: 6px;
}
.ax-drawer .exsb-f-math { text-align: center; font-size: 16px; font-style: italic; }
.ax-drawer .exsb-formula sub { font-size: 10px; }
.ax-drawer .exsb-frac {
  display: inline-block;
  vertical-align: middle;
  text-align: center;
  margin: 0 4px;
}
.ax-drawer .exsb-frac-num {
  display: block;
  padding: 0 6px;
  border-bottom: 1.5px solid var(--ax-text);
}
.ax-drawer .exsb-frac-den { display: block; padding: 0 6px; font-size: 14px; }
.ax-drawer .exsb-f-plain {
  margin-top: 8px;
  font-family: var(--ax-font-sans, sans-serif);
  font-size: 12px;
  line-height: 1.55;
}
.ax-drawer .exsb-f-plain em { color: var(--ax-text-4); font-style: normal; }
.ax-drawer .exsb-r { color: var(--ax-teal); font-weight: 700; }

/* ---- National Pulse early-warning signal grid (3x3 at desktop,
   2026-10): one compact clickable card per signal — name, hint, mini
   history chart, latest + change + as-of — collapsing to 2 columns
   below 1100px and 1 column below 640px. ---- */
.np-siggrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.np-sigcell {
  display: flex; flex-direction: column; gap: 6px; align-items: stretch;
  text-align: left; font: inherit; color: var(--ax-text);
  background: var(--ax-surface-soft);
  border: 1px solid var(--ax-border-row-alt); border-radius: 6px;
  padding: 14px 16px; cursor: pointer; min-width: 0;
}
.np-sigcell:hover { border-color: var(--ax-teal); background: var(--ax-hover); }
.np-sigcell:focus-visible { outline: 2px solid var(--ax-teal); outline-offset: 2px; }
.np-sigcell__name { font-weight: 600; font-size: 16px; }
.np-sigcell__hint { font-size: 13px; color: var(--ax-text-4); }
.np-sigcell__chart { display: block; width: 100%; height: 56px; }
.np-sigcell__row {
  display: flex; justify-content: space-between; gap: 10px;
  align-items: baseline; font-size: 13px; color: var(--ax-text-4);
}
.np-sigcell__latest { font-weight: 700; font-size: 17px; color: var(--ax-text); }
@media (max-width: 1099px) { .np-siggrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .np-siggrid { grid-template-columns: 1fr; } }
.ax-drawer .exsb-formula small {
  display: block;
  margin-top: 6px;
  color: var(--ax-text-4);
  font-family: var(--ax-font-sans, sans-serif);
  font-size: 10.5px;
  line-height: 1.5;
}
.ax-drawer .exsb-tests { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; line-height: 1.6; }
.ax-drawer .exsb-tests li { margin-top: 6px; }
.ax-drawer .exsb-tests ul { margin: 4px 0 0; padding-left: 16px; }
.ax-drawer .exsb-testgroup { font-weight: 700; }
.ax-drawer .exsb-tests a {
  color: var(--ax-teal);
  text-decoration: none;
  border-bottom: 1px solid var(--ax-teal-soft);
}
.ax-drawer .exsb-future li { margin-top: 8px; }

/* ---- stress sidebar: the watchlist note boxes ---- */
.ax-drawer .stsb-watch {
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--ax-surface-soft);
  border: 1px solid var(--ax-border);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
}
.ax-drawer .stsb-watch b {
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--ax-text-4);
}
.ax-drawer .stsb-watch:first-of-type { margin-top: 0; }

/* ---- metro sidebar (.metro-sidebar-*), ported from frontend/style.css ---- */
.ax-drawer .metro-sidebar-section { margin-bottom: 1.5rem; }
.ax-drawer .metro-sidebar-section h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--ax-border);
}
.ax-drawer .metro-sidebar-section-caption {
  font-size: 0.78rem;
  color: var(--ax-text-4);
  margin: 0 0 0.5rem 0;
  font-style: italic;
}
.ax-drawer .metro-sidebar-impact-container {
  border: 1px solid var(--ax-border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--ax-surface);
}
.ax-drawer .metro-sidebar-impact-header {
  padding: 1rem 0;
  margin-bottom: 0.5rem;
}
.ax-drawer .metro-sidebar-impact-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.ax-drawer .metro-sidebar-impact-score-display {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.ax-drawer .metro-sidebar-impact-score-value {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
.ax-drawer .metro-sidebar-impact-score-label {
  font-size: 0.75rem;
  color: var(--ax-text-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.15rem;
}
.ax-drawer .metro-sidebar-impact-badge { flex-shrink: 0; }
.ax-drawer .metro-sidebar-severity-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ax-drawer .metro-sidebar-severity-badge.severity-high {
  background: rgba(220, 38, 38, 0.2);
  color: #f87171;
  border: 1px solid rgba(220, 38, 38, 0.3);
}
.ax-drawer .metro-sidebar-severity-badge.severity-elevated {
  background: rgba(217, 119, 6, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(217, 119, 6, 0.3);
}
.ax-drawer .metro-sidebar-severity-badge.severity-moderate {
  background: rgba(74, 111, 165, 0.2);
  color: #6b9fd6;
  border: 1px solid rgba(74, 111, 165, 0.3);
}
.ax-drawer .metro-sidebar-severity-badge.severity-low {
  background: rgba(42, 90, 58, 0.2);
  color: #4ade80;
  border: 1px solid rgba(42, 90, 58, 0.3);
}
.ax-drawer .metro-sidebar-severity-badge.severity-none {
  background: rgba(138, 138, 160, 0.2);
  color: #8a8aa0;
  border: 1px solid rgba(138, 138, 160, 0.3);
}
.ax-drawer .metro-sidebar-rank {
  font-size: 0.85rem;
  color: var(--ax-text-4);
  margin-top: 0.5rem;
}
.ax-drawer .metro-sidebar-rank strong { color: var(--ax-text); }
.ax-drawer .metro-sidebar-driver-bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.8rem;
}
.ax-drawer .metro-sidebar-driver-bar-name {
  flex: 0 0 42%;
  color: var(--ax-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ax-drawer .metro-sidebar-driver-bar-track {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: rgba(128, 128, 160, 0.18);
  overflow: hidden;
}
.ax-drawer .metro-sidebar-driver-bar-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: #e8a33d;
}
.ax-drawer .metro-sidebar-driver-bar-fill--multiplier { background: #4a6fa5; }
.ax-drawer .metro-sidebar-driver-bar-score {
  flex: 0 0 3.2em;
  text-align: right;
  font-weight: 600;
  color: var(--ax-text);
}
.ax-drawer .metro-sidebar-driver-bar-row--multiplier .metro-sidebar-driver-bar-name {
  color: var(--ax-text-4);
  font-style: italic;
}
.ax-drawer .metro-sidebar-provenance {
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.ax-drawer .metro-sidebar-provenance.provenance-measured {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}
.ax-drawer .metro-sidebar-provenance.provenance-derived {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}
.ax-drawer .metro-sidebar-provenance.provenance-modeled {
  background: rgba(107, 159, 214, 0.15);
  color: #6b9fd6;
  border: 1px solid rgba(107, 159, 214, 0.3);
}
.ax-drawer .metro-sidebar-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--ax-border);
  font-size: 0.85rem;
  gap: 1rem;
}
.ax-drawer .metro-sidebar-metric-row:last-child { border-bottom: none; }
.ax-drawer .metro-sidebar-metric-name {
  color: var(--ax-text);
  font-weight: 500;
  flex: 1;
}
.ax-drawer .metro-sidebar-metric-why {
  font-size: 0.78rem;
  color: var(--ax-text-4);
  margin-top: 0.15rem;
  line-height: 1.35;
}
.ax-drawer .metro-sidebar-metric-value {
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}
.ax-drawer .metro-sidebar-metric-row.null-data .metro-sidebar-metric-value {
  color: var(--ax-text-4);
}
.ax-drawer .metro-sidebar-metric-period {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--ax-text-4);
}
.ax-drawer .metro-sidebar-not-counted {
  font-size: 0.8rem;
  color: var(--ax-text-4);
  line-height: 1.45;
}
.ax-drawer .metro-sidebar-recompute-note {
  font-size: 0.75rem;
  color: var(--ax-text-4);
  margin-top: 0.5rem;
}
.ax-drawer .metro-sidebar-recompute-note--mismatch { color: #fbbf24; }
.ax-drawer .metro-sidebar-plain-summary {
  font-size: 0.82rem;
  line-height: 1.4;
  margin-top: 0.5rem;
  color: var(--ax-text);
  opacity: 0.85;
  padding: 0.5rem 0.6rem;
  background: var(--ax-surface-soft);
  border-radius: 6px;
  border-left: 3px solid var(--ax-teal);
}
