/* ==========================================================================
   reidEXA — style-guide.css
   Brand Standards page styles. Loaded after site.css.

   Sections:
       1. Container override (narrower than site default)
       2. Secondary nav band (TOC + back link)
       3. Hero
       4. Section + heading shells (.sg-section, .sg-label, .sg-heading, .sg-intro)
       5. Grids (.sg-grid-2/3/4)
       6. Foundation — principle cards, voice/tone pills
       7. Color — swatch cards + WCAG contrast matrix
       8. Typography — font cards + type-row scale
       9. Spacing scale + radius demos
      10. Component preview cards (shared chrome)
      11. Demo CTAs (Actions group)
      12. Demo metric, pill, badge, tooltip, progress (Information group)
      13. Demo inputs, textarea, check/radio (Inputs group)
      14. Demo navigation (section label, nav link, breadcrumb)
      15. Whole-site Do/Don't (rules-grid)
      16. Logo demos
      17. Info rows + token tables
      18. Dimensional refactor demos (elevation ladder, glass, atmosphere)
      19. Card hover lift (consolidated)
      20. Section atmosphere (consolidated)
      21. Footer override
      22. Utility classes (margin-bottom, sg-intro--note)
      23. Mobile (consolidated ≤900px)

   Note: this page is meant as recruiter-grade evidence of system rigor.
   Every demo value (color, type scale, spacing token, radius, progress
   percentage, hover state) is encoded as a modifier class — the page
   ships with zero inline style attributes. The class taxonomy below IS
   the brand system in machine-readable form.
   ========================================================================== */


/* ==========================================================================
   1. Container override
   The style guide uses a narrower container than the rest of the site.
   ========================================================================== */

.container { max-width: 1040px; }


/* ==========================================================================
   2. Secondary nav band — sticky beneath the primary nav
   In-page TOC + "back to home" affordance for the long brief.
   ========================================================================== */

.sg-toc-band {
  position: sticky;
  top: 71px;          /* sits flush below the primary .nav (18px*2 padding + 36px logo - 1px border) */
  z-index: 90;
  padding: 14px 0;
  background: var(--midnight-2);
  border-bottom: 1px solid var(--midnight-4);
}
.sg-toc-band-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.sg-toc-band-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--electric);
  white-space: nowrap;
}
.sg-toc-band-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-dim);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out);
}
.sg-toc-band-back:hover { color: var(--white); }
.sg-toc-band-back svg { transition: transform var(--dur-base) var(--ease-out); }
.sg-toc-band-back:hover svg { transform: translateX(-2px); }

.sg-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sg-toc a {
  color: var(--slate-light);
  transition: color var(--dur-fast) var(--ease-out);
}
.sg-toc a:hover { color: var(--white); }


/* ==========================================================================
   3. Hero — Midnight base with atmospheric wash
   ========================================================================== */

.sg-hero {
  padding: 70px 0 80px;
  background:
    radial-gradient(900px 620px at 8% 0%,
      hsl(var(--electric-hsl) / 0.10), transparent 60%),
    radial-gradient(800px 540px at 100% 100%,
      hsl(var(--midnight-3-hsl) / 0.82), transparent 55%),
    var(--midnight);
}
.sg-hero-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--electric);
}
.sg-hero-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--electric);
}
.sg-hero-title {
  max-width: 760px;
  margin-bottom: 20px;
  font-family: var(--display);
  font-size: 54px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--white);
}
.sg-hero-title em {
  font-style: normal;
  font-weight: 700;
  color: var(--electric);
}
.sg-hero-sub {
  max-width: 620px;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--slate-dim);
}


/* ==========================================================================
   4. Section + heading shells
   ========================================================================== */

.sg-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--cloud);
  scroll-margin-top: 140px; /* clears sticky nav + sg-toc-band on jump */
}
.sg-section.dark {
  border-bottom: 1px solid var(--midnight-4);
  background:
    radial-gradient(900px 620px at 0% 0%,
      hsl(var(--electric-hsl) / 0.08), transparent 60%),
    radial-gradient(800px 540px at 100% 100%,
      hsl(var(--midnight-3-hsl) / 0.78), transparent 55%),
    var(--midnight);
}
.sg-section.paper {
  background:
    radial-gradient(800px 500px at 100% 0%,
      hsl(var(--electric-hsl) / 0.04), transparent 60%),
    radial-gradient(700px 460px at 0% 100%,
      hsl(var(--cloud-hsl) / 0.6), transparent 60%),
    var(--paper);
}

.sg-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--electric);
}
.sg-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--electric);
}
.sg-section.dark .sg-label { color: var(--electric); }

.sg-heading {
  margin-bottom: 16px;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--midnight);
}
.sg-heading em {
  font-style: normal;
  font-weight: 700;
  color: var(--electric);
}
.sg-section.dark .sg-heading { color: var(--white); }

.sg-intro {
  max-width: 640px;
  margin-bottom: 40px;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--slate);
}
.sg-section.dark .sg-intro { color: var(--slate-dim); }
/* Compact note variant — used after the contrast matrix to explain the rule. */
.sg-intro--note {
  margin-top: 16px;
  margin-bottom: 0;
  font-size: 13px;
}

.sg-subhead {
  margin: 0 0 16px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--midnight);
}
.sg-section.dark .sg-subhead { color: var(--white); }
.sg-subhead--spaced { margin-top: 40px; }


/* ==========================================================================
   5. Grids
   ========================================================================== */

.sg-grid-2 { display: grid; grid-template-columns: 1fr 1fr;            gap: 16px; }
.sg-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr);     gap: 16px; }
.sg-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr);     gap: 14px; }


/* ==========================================================================
   6. Foundation — principle cards + voice/tone descriptor pills
   ========================================================================== */

.principle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 12px;
}
.principle-card {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--cloud);
  border-left: 2px solid var(--electric);
  border-radius: var(--r-md);
  box-shadow: var(--elev-1), var(--bevel-dark);
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.principle-card:hover { box-shadow: var(--elev-2), var(--bevel-dark); }
.principle-card-num {
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--electric);
}
.principle-card-title {
  margin-bottom: 8px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--midnight);
}
.principle-card-body {
  font-size: 13px;
  line-height: 1.65;
  color: var(--slate);
}
.principle-card-body strong {
  font-weight: 500;
  color: var(--midnight);
}

/* Voice/tone descriptor pill row */
.tone-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.tone-pill {
  padding: 8px 14px;
  background: var(--midnight);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--white);
  border-radius: var(--r-sm);
}
.tone-pill.outline {
  background: transparent;
  color: var(--slate);
  border: 1px solid var(--cloud);
}


/* ==========================================================================
   7. Color — swatch cards
   Each chip is a small modifier class corresponding 1:1 to a token. The
   class taxonomy below IS the documented palette in machine-readable form;
   adding a new color to the system means adding both a token in site.css
   AND a chip modifier here.
   ========================================================================== */

.swatch-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--cloud);
  border-radius: var(--r-md);
}
.swatch-chip { height: 130px; }

/* Token-mapped swatch fills */
.swatch-chip--midnight       { background: var(--midnight); }
.swatch-chip--midnight-2     { background: var(--midnight-2); }
.swatch-chip--midnight-3     { background: var(--midnight-3); }
.swatch-chip--midnight-4     { background: var(--midnight-4); }
.swatch-chip--electric       { background: var(--electric); }
.swatch-chip--electric-soft  { background: var(--electric-soft); }
.swatch-chip--slate          { background: var(--slate); }
.swatch-chip--slate-light    { background: var(--slate-light); }
.swatch-chip--slate-dim      { background: var(--slate-dim); }
.swatch-chip--paper          { background: var(--paper); }
.swatch-chip--cloud          { background: var(--cloud); }
/* White on white needs a Cloud bottom border so the chip is visible. */
.swatch-chip--white-bordered {
  background: var(--white);
  border-bottom: 1px solid var(--cloud);
}

/* Radius demo swatches — token-mapped to the 4 documented radius values. */
.swatch-chip--r3 { background: var(--electric); border-radius: 3px 3px 0 0; }
.swatch-chip--r4 { background: var(--electric); border-radius: 4px 4px 0 0; }
.swatch-chip--r6 { background: var(--electric); border-radius: 6px 6px 0 0; }
.swatch-chip--r8 { background: var(--electric); border-radius: 8px 8px 0 0; }

.swatch-body { padding: 16px 18px; }
.swatch-name {
  margin-bottom: 4px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--midnight);
}
.swatch-var {
  margin-bottom: 2px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--slate);
}
.swatch-hex {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--slate-light);
}
.swatch-use {
  margin-top: 8px;
  padding-top: 8px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--slate);
  border-top: 1px solid var(--cloud);
}

/* WCAG contrast matrix */
.contrast-table {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--cloud);
  border-radius: var(--r-md);
  box-shadow: var(--elev-1), var(--bevel-dark);
}
.contrast-row {
  display: grid;
  grid-template-columns: 220px 220px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--cloud);
}
.contrast-row:last-child { border-bottom: none; }
.contrast-row.head {
  background: var(--paper);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}
.contrast-pair {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--midnight);
}
.contrast-swatch {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1px solid hsl(var(--midnight-hsl) / 0.10);
  border-radius: 4px;
}
/* Contrast-swatch token mapping — same set of tokens used in the matrix. */
.contrast-swatch--midnight    { background: var(--midnight); }
.contrast-swatch--midnight-3  { background: var(--midnight-3); }
.contrast-swatch--electric    { background: var(--electric); }
.contrast-swatch--slate       { background: var(--slate); }
.contrast-swatch--slate-light { background: var(--slate-light); }
.contrast-swatch--slate-dim   { background: var(--slate-dim); }
.contrast-swatch--white       { background: var(--white); }
.contrast-swatch--paper       { background: var(--paper); }

.contrast-ratio {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--midnight);
}
.contrast-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.wcag-badge {
  padding: 3px 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  white-space: nowrap;
  border-radius: 3px;
}
.wcag-badge.pass    { background: hsl(var(--electric-hsl) / 0.10); color: var(--electric); }
.wcag-badge.partial { background: hsl(45 90% 50% / 0.14);          color: hsl(35 80% 35%); }
.wcag-badge.fail    { background: hsl(0 70% 50% / 0.10);           color: #c0392b; }


/* ==========================================================================
   8. Typography — font cards + type-row scale
   ========================================================================== */

.font-card {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--cloud);
  border-top: 2px solid var(--electric);
  border-radius: var(--r-md);
}
.font-card-name {
  margin-bottom: 4px;
  font-family: var(--display);    /* default font is the display family */
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--midnight);
}
/* Per-card font modifier — name displays in the typeface it documents. */
.font-card-name--sans { font-family: var(--sans); font-weight: 500; }
.font-card-name--mono { font-family: var(--mono); font-weight: 500; }

.font-card-use {
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--slate);
}
.font-card-sample {
  margin-bottom: 16px;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--midnight);
}
.font-card-sample--display { font-family: var(--display); font-weight: 600; }
.font-card-sample--sans    { font-family: var(--sans);    font-weight: 400; }
.font-card-sample--mono    { font-family: var(--mono);    font-weight: 500; }

.font-card-desc {
  padding-top: 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--slate);
  border-top: 1px solid var(--cloud);
}
.font-card-rationale {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--electric);
}

/* Type-scale display rows — each modifier matches one role on the site. */
.type-row {
  padding: 28px 0;
  border-bottom: 1px solid var(--cloud);
}
.type-row:last-child { border-bottom: none; }
.type-sample {
  margin-bottom: 12px;
  color: var(--midnight);
}
.type-sample em {
  font-style: normal;
  font-weight: 700;
  color: var(--electric);
}

/* Five documented type roles (hero / section / pillar / body / label).
   Modifying these here is the same as modifying the site's type ramp —
   keep them token-driven by referencing the same rules used on each page. */
.type-sample--hero {
  font-family: var(--display);
  font-size: 68px;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.type-sample--section {
  font-family: var(--display);
  font-size: 48px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.type-sample--pillar {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.type-sample--body {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--midnight);
}
.type-sample--label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--electric);
}

.type-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.type-meta-item {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--slate);
}
.type-meta-item span {
  font-weight: 500;
  color: var(--midnight);
}


/* ==========================================================================
   9. Spacing scale + radius demos
   The spacing-bar widths ARE the spacing tokens. Adding a new token to
   the system means adding both a value here AND a corresponding row of
   evidence in the page markup.
   ========================================================================== */

.spacing-scale {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.spacing-row {
  display: grid;
  grid-template-columns: 80px 1fr 220px;
  gap: 16px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--cloud);
}
.spacing-row:last-child { border-bottom: none; }
.spacing-name {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--midnight);
}
.spacing-bar {
  height: 20px;
  background: var(--electric);
  border-radius: 3px;
}
/* Spacing token modifiers — width is the documented value. */
.spacing-bar--xs   { width:   4px; }
.spacing-bar--sm   { width:   8px; }
.spacing-bar--md   { width:  12px; }
.spacing-bar--lg   { width:  16px; }
.spacing-bar--xl   { width:  24px; }
.spacing-bar--2xl  { width:  36px; }
.spacing-bar--3xl  { width:  60px; }
.spacing-bar--4xl  { width:  80px; }
.spacing-bar--5xl  { width: 110px; }
.spacing-bar--6xl  { width: 140px; }

.spacing-meta {
  font-family: var(--mono);
  font-size: 11px;
  text-align: right;
  color: var(--slate);
}


/* ==========================================================================
   10. Component preview cards (shared chrome for all component sections)
   ========================================================================== */

.component-card {
  margin-bottom: 18px;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--cloud);
  border-radius: var(--r-md);
}
.component-card-title {
  margin-bottom: 6px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--midnight);
}
.component-card-meta {
  margin-bottom: 20px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--slate);
}
.component-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 28px;
  background: var(--paper);
  border-radius: 8px;
}
.component-preview.dark { background: var(--midnight); }
.component-preview.column { flex-direction: column; align-items: stretch; }
/* Wider gap variant — used in the nav-link demo where 16px feels cramped. */
.component-preview--gap-lg { gap: 24px; }

.component-specs {
  margin-bottom: 14px;
  padding: 16px 20px;
  background: var(--midnight);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  color: var(--slate-dim);
  border-radius: 6px;
}
.component-specs span { color: var(--electric); }

/* Per-component Do/Don't (compact, lives inside .component-card) */
.component-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px dashed var(--cloud);
}
.component-rule {
  padding: 12px 14px;
  background: var(--paper);
  font-size: 12px;
  line-height: 1.65;
  color: var(--slate);
  border-left: 2px solid var(--electric);
  border-radius: 6px;
}
.component-rule.dont { border-left-color: #c0392b; }
.component-rule-label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--electric);
}
.component-rule.dont .component-rule-label { color: #c0392b; }

/* State demo grouping (Default / Hover / Focus / Disabled labels above each preview) */
.state-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
/* Tighter gap for vertically stacked checkbox/radio rows. */
.state-stack--tight { gap: 10px; }
/* Used between two state-stacks in the same preview to add breathing room. */
.state-stack--spaced { margin-top: 18px; }

.state-label {
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate-light);
}


/* ==========================================================================
   11. Demo CTAs (Actions group)
   Each variant has explicit modifier classes for hover and focus states,
   so the page documents persistent state previews without relying on
   :hover or :focus-visible (which only fire on user interaction).
   ========================================================================== */

.demo-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 6px;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.demo-cta-primary {
  background: var(--electric);
  color: var(--white);
  border-color: var(--electric);
}
.demo-cta-primary:hover,
.demo-cta-primary.demo-cta--state-hover {
  background: var(--electric-soft);
  border-color: var(--electric-soft);
}

.demo-cta-secondary {
  background: transparent;
  color: var(--midnight);
  border: 1px solid var(--slate);
}
.demo-cta-secondary:hover,
.demo-cta-secondary.demo-cta--state-hover {
  background: var(--midnight);
  color: var(--white);
  border-color: var(--midnight);
}

.demo-cta-ghost {
  padding: 14px 8px;
  background: transparent;
  color: var(--electric);
  border-color: transparent;
}
.demo-cta-ghost:hover,
.demo-cta-ghost.demo-cta--state-hover {
  background: hsl(var(--electric-hsl) / 0.06);
  color: var(--midnight);
}

/* Persistent focus-state demo — applies the focus ring via outline so the
   docs reader can see what the focus state looks like without tabbing to it. */
.demo-cta--state-focus,
.demo-cta:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 3px;
}

.demo-cta.disabled,
.demo-cta[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}


/* ==========================================================================
   12. Demo metric, pill, badge, tooltip, progress (Information group)
   ========================================================================== */

.demo-metric-card {
  max-width: 220px;
  padding: 24px 22px;
  background: var(--paper);
  border-left: 2px solid var(--electric);
  border-radius: 8px;
}
.demo-metric-num {
  font-family: var(--display);
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--midnight);
}
.demo-metric-num em {
  font-style: normal;
  font-weight: 700;
  color: var(--electric);
}
.demo-metric-label {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
}

.demo-pill {
  display: inline-block;
  margin: 3px;
  padding: 7px 14px;
  background: var(--paper);
  font-size: 13px;
  color: var(--midnight);
  border-radius: 4px;
  cursor: default;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}
.demo-pill:hover { background: var(--electric); color: var(--white); }
.demo-pill.intl {
  background: var(--midnight);
  color: var(--white);
}
.demo-pill.intl:hover { background: var(--electric); }

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 3px;
}
.demo-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}
.demo-badge.live  { background: hsl(var(--electric-hsl) / 0.12); color: var(--electric); }
.demo-badge.draft { background: hsl(var(--slate-hsl) / 0.10);    color: var(--slate); }
.demo-badge.warn  { background: hsl(45 90% 50% / 0.16);          color: hsl(35 80% 30%); }
.demo-badge.error { background: hsl(0 70% 50% / 0.10);           color: #c0392b; }

/* Tooltip wrapper — gives the absolute-positioned tooltip a positioning
   context plus enough top padding so the tooltip doesn't overflow the
   preview-card boundary. */
.demo-tooltip-wrap {
  position: relative;
  display: inline-block;
  padding-top: 36px;
}
.demo-tooltip-host {
  position: relative;
  display: inline-block;
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--slate);
  border-bottom: 1px dotted var(--slate-light);
  cursor: help;
}
.demo-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  background: var(--midnight);
  font-family: var(--sans);
  font-size: 11px;
  white-space: nowrap;
  color: var(--white);
  border-radius: 4px;
  box-shadow: var(--elev-3);
  pointer-events: none;
}
.demo-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: var(--midnight);
}

.demo-progress {
  overflow: hidden;
  width: 100%;
  max-width: 320px;
  height: 6px;
  background: var(--cloud);
  border-radius: 3px;
}
.demo-progress-fill {
  height: 100%;
  background: var(--electric);
  border-radius: 3px;
}
/* Progress fill demo values — explicit modifier per documented sample. */
.demo-progress-fill--72 { width: 72%; }
.demo-progress-fill--40 { width: 40%; }

.demo-progress-meta {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
}


/* ==========================================================================
   13. Demo inputs, textarea, check/radio (Inputs group)
   ========================================================================== */

.demo-input-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 360px;
}
.demo-input-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}
.demo-input,
.demo-textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--white);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--midnight);
  border: 1px solid var(--cloud);
  border-radius: 6px;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}
.demo-input:hover,
.demo-textarea:hover { border-color: var(--slate-light); }
.demo-input:focus,
.demo-textarea:focus {
  outline: none;
  border-color: var(--electric);
  box-shadow: 0 0 0 3px hsl(var(--electric-hsl) / 0.18);
}
.demo-input.error { border-color: #c0392b; }
.demo-input:disabled {
  background: var(--paper);
  color: var(--slate-light);
  cursor: not-allowed;
}
.demo-textarea { min-height: 90px; resize: vertical; }

.demo-input-hint {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--slate-light);
}
.demo-input-hint.error { color: #c0392b; }

/* Checkboxes & radios — custom-styled, accessible */
.demo-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--midnight);
  cursor: pointer;
}
.demo-check-row input[type="checkbox"],
.demo-check-row input[type="radio"] {
  position: relative;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--white);
  border: 1px solid var(--slate-light);
  border-radius: 3px;
  cursor: pointer;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}
.demo-check-row input[type="radio"] { border-radius: 50%; }
.demo-check-row input:hover { border-color: var(--electric); }
.demo-check-row input:checked {
  background: var(--electric);
  border-color: var(--electric);
}
.demo-check-row input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.demo-check-row input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 4px;
  width: 6px;
  height: 6px;
  background: var(--white);
  border-radius: 50%;
}
.demo-check-row input:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 2px;
}


/* ==========================================================================
   14. Demo navigation (section label, nav link, breadcrumb)
   ========================================================================== */

.demo-section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--electric);
}
.demo-section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--electric);
}

.demo-nav-link {
  position: relative;
  padding: 6px 0;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--slate-light);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out);
}
.demo-nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--electric);
  transition: width var(--dur-base) var(--ease-out);
}
.demo-nav-link:hover { color: var(--white); }
.demo-nav-link:hover::after { width: 100%; }
/* Persistent hover-state demo — shows what hover looks like without
   requiring the docs reader to actually hover. The underline is set via
   the regular :hover rule above, so this just locks in the color shift. */
.demo-nav-link--state-hover { color: var(--white); }
.demo-nav-link--state-hover::after { width: 100%; }

.demo-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--slate);
}
.demo-breadcrumb-link { color: var(--slate); cursor: pointer; }
.demo-breadcrumb-link:hover { color: var(--electric); }
.demo-breadcrumb-sep { color: var(--cloud); }
.demo-breadcrumb-current { font-weight: 500; color: var(--midnight); }


/* ==========================================================================
   15. Whole-site Do/Don't (rules-grid)
   ========================================================================== */

.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.rules-block {
  padding: 24px;
  background: var(--paper);
  border-top: 2px solid;
  border-radius: 8px;
}
.rules-block.do   { border-top-color: var(--electric); }
.rules-block.dont { border-top-color: #c0392b; }
.rules-block-label {
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.rules-block.do   .rules-block-label { color: var(--electric); }
.rules-block.dont .rules-block-label { color: #c0392b; }
.rules-list {
  font-size: 13px;
  line-height: 1.9;
  color: var(--midnight);
}


/* ==========================================================================
   16. Logo demos
   ========================================================================== */

.logo-demo {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 40px;
  background: var(--midnight);
  border-radius: var(--r-md);
  box-shadow: var(--elev-dark-2), var(--bevel-light);
}
.logo-demo.light {
  background: var(--paper);
  box-shadow: var(--elev-2), var(--bevel-dark);
}
.logo-mark { width: 42px; height: 42px; }
.logo-name {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--white);
}
.logo-name span { color: var(--electric); }
.logo-demo.light .logo-name { color: var(--midnight); }

/* Small mono caption above each logo demo (Dark/Light) */
.logo-demo-label {
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
}


/* ==========================================================================
   17. Info rows + token tables (key/value pairs used throughout)
   ========================================================================== */

.info-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--cloud);
}
.info-row:last-child { border-bottom: none; }
.info-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--slate);
}
.info-value {
  font-size: 14px;
  line-height: 1.55;
  color: var(--midnight);
}
.info-value code {
  padding: 2px 6px;
  background: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--electric);
  border-radius: 3px;
}

.token-table {
  overflow: hidden;
  margin-bottom: 24px;
  background: var(--white);
  border: 1px solid var(--cloud);
  border-radius: var(--r-md);
  box-shadow: var(--elev-1), var(--bevel-dark);
}
.token-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 14px 22px;
  border-bottom: 1px solid var(--cloud);
}
.token-row:last-child { border-bottom: none; }
.token-row.head {
  background: var(--paper);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}
.token-name {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--electric);
}
.token-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--midnight);
}
.token-desc code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--slate);
}


/* ==========================================================================
   18. Dimensional refactor demos
   Self-documenting — these tiles use the same elevation, glass, and
   atmosphere tokens they're documenting.
   ========================================================================== */

.elev-ladder {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.elev-tile {
  padding: 36px 18px;
  background: var(--white);
  text-align: center;
  border: 1px solid hsl(var(--cloud-hsl) / 0.7);
  border-radius: var(--r-md);
}
.elev-tile.t0 { box-shadow: var(--elev-0); }
.elev-tile.t1 { box-shadow: var(--elev-1), var(--bevel-dark); }
.elev-tile.t2 { box-shadow: var(--elev-2), var(--bevel-dark); }
.elev-tile.t3 { box-shadow: var(--elev-3), var(--bevel-dark); }
.elev-tile.t4 { box-shadow: var(--elev-4), var(--bevel-dark); }
.elev-tile-name {
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--electric);
}
.elev-tile-token {
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--slate);
}
.elev-tile-use {
  font-size: 12px;
  line-height: 1.55;
  color: var(--slate);
}

.glass-demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 24px;
}
.glass-demo-tile {
  min-height: 160px;
  padding: 36px 28px;
  border-radius: var(--r-md);
}
.glass-demo-tile.light {
  background: var(--glass-tint-light);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  color: var(--midnight);
  border: 1px solid var(--glass-edge-light);
  box-shadow: var(--elev-2), var(--bevel-light-strong);
}
.glass-demo-tile.dark {
  background: var(--glass-tint-dark);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  color: var(--white);
  border: 1px solid var(--glass-edge-dark);
  box-shadow: var(--elev-dark-2), var(--bevel-light);
}
.glass-demo-name {
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--electric);
}
.glass-demo-desc { font-size: 13px; line-height: 1.6; }

.atmos-demo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.atmos-demo-tile {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 180px;
  padding: 36px 24px;
  border-radius: var(--r-md);
  box-shadow: var(--bevel-dark);
}
.atmos-demo-tile.light {
  background: var(--mesh-light);
  color: var(--midnight);
}
.atmos-demo-tile.paper {
  background:
    radial-gradient(900px 500px at 100% 0%,
      hsl(var(--electric-hsl) / 0.04), transparent 60%),
    radial-gradient(700px 460px at 0% 100%,
      hsl(var(--cloud-hsl) / 0.7), transparent 60%),
    var(--paper);
  color: var(--midnight);
}
.atmos-demo-tile.dark {
  background: var(--mesh-dark);
  color: var(--white);
  box-shadow: var(--bevel-light);
}
.atmos-demo-name {
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--electric);
}
.atmos-demo-desc { font-size: 13px; line-height: 1.6; }


/* ==========================================================================
   19. Card hover lift — consolidated for every card type on this page.
   The page uses elevation hover both as decoration and as evidence: the
   cards on the brand-standards page are the same dimensional tiles
   documented in the Dimensional Layer section.
   ========================================================================== */

.swatch-card,
.font-card,
.component-card,
.demo-metric-card,
.rules-block {
  box-shadow: var(--elev-2), var(--bevel-dark);
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.swatch-card:hover,
.font-card:hover,
.component-card:hover,
.demo-metric-card:hover,
.rules-block:hover {
  box-shadow: var(--elev-3), var(--bevel-dark);
}


/* ==========================================================================
   20. Footer override — slimmer than the homepage footer (this page already
   has a long form-rich body, so the footer carries less visual weight).
   ========================================================================== */

.footer { padding: 28px 0; border-top: none; }


/* ==========================================================================
   21. Utility classes — margin-bottom values matching the documented 8pt
   scale. Used on grids and intros to inject explicit vertical rhythm.
   ========================================================================== */

.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-40 { margin-bottom: 40px; }
.mb-48 { margin-bottom: 48px; }


/* ==========================================================================
   22. Mobile (consolidated ≤900px breakpoint)
   ========================================================================== */

@media (max-width: 900px) {
  /* Secondary nav band: stack tighter, hide the in-page TOC (the primary
     nav links also hide on mobile, so the back-to-home link is the
     critical wayfinding affordance). */
  .sg-toc-band       { top: 0; }
  .sg-toc-band-inner { gap: 12px; }
  .sg-toc            { display: none; }

  /* Hero + heading sizes step down */
  .sg-hero-title { font-size: 38px; }
  .sg-heading    { font-size: 26px; }
  .sg-section    { padding: 60px 0; }

  /* All multi-column grids collapse to one column */
  .sg-grid-2,
  .sg-grid-3,
  .sg-grid-4,
  .principle-grid,
  .rules-grid,
  .elev-ladder,
  .glass-demo,
  .atmos-demo,
  .component-rules { grid-template-columns: 1fr; }

  /* Key/value rows stack value below label */
  .info-row,
  .token-row,
  .spacing-row,
  .contrast-row { grid-template-columns: 1fr; gap: 6px; }

  /* The contrast matrix header isn't useful when rows are stacked */
  .contrast-row.head { display: none; }
}


/* ==========================================================================
   23. Reduced motion
   site.css already nukes most animations and transitions globally, but
   the elev hover transform/shadow combo deserves an explicit override so
   the docs reader sees the same final state regardless of motion pref.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .swatch-card,
  .font-card,
  .component-card,
  .demo-metric-card,
  .rules-block,
  .principle-card {
    transition: none;
  }
}
