/**
 * CurioChat Design System
 * =======================
 * Complete component library extracted from:
 *   - curiochat.ai  src/css/curio.css
 *   - curiochat.com src/css/curio.css, src/css/lab-portal.css
 *   - curiochat_blog themes/curio/static/css/style.css
 *   - curiochat.ai  src/css/academy-learn.css
 *   - Sales pages   src/software-engineer/foundation/default.php (inline CSS)
 *
 * Structure
 * ---------
 *  1. Reset & Base
 *  2. Typography
 *  3. Layout utilities
 *  4. Navigation
 *  5. Buttons
 *  6. Badges / Chips / Pills
 *  7. Cards & Sections
 *  8. Hero sections
 *  9. Forms
 * 10. Callout / Content boxes (academy)
 * 11. Code blocks
 * 12. Tables
 * 13. Footer
 * 14. Blog components
 * 15. Academy / Lesson layout
 * 16. Sales page components
 * 17. Narrative, journey & legal components (v1.3.0)
 * 18. Site-wide primitives                 (v1.4.0)
 * 19. Sales-page primitives                (v1.4.0)
 * 20. Editorial neighbours                 (v1.4.0)
 * 21. Utility classes                      (renumbered from 18 in v1.4.0)
 * 22. Accessibility helpers                (renumbered from 19 in v1.4.0)
 * 23. Print                                (renumbered from 20 in v1.4.0)
 *
 * Note: the pre-v1.4.0 TOC was out of sync with the body — it omitted
 * §8 (Hero sections) and the §17 Narrative section added in v1.3.0.
 * The TOC above now matches the body banner numbers exactly. v1.4.0
 * added §18/§19/§20 for the promoted primitives and renumbered the
 * legacy Utility / Accessibility / Print trio to §21/§22/§23 per
 * `specs/v1.4.0-promotion.md` §8.
 *
 * Requires: tokens.css (imported before this file)
 *
 * v1.5.0 @layer architecture
 * ---------------------------
 * Cascade order (low → high priority on equal specificity):
 *   reset   — (reserved; no rules ship here today, but the layer exists
 *              so future reset/normalize-style overrides drop in cleanly)
 *   tokens  — (reserved; raw + semantic custom-property declarations
 *              live in tokens.css, which is loaded before this file)
 *   base    — §1 Reset & Base, §2 Typography (root-level element styling)
 *   components — §3–§20 (all component selectors)
 *   utilities — §21 Utility classes, §22 Accessibility helpers
 *
 * §23 Print is intentionally outside any @layer — `@media print` is its
 * own cascade and applying a layer wrapper there would force the print
 * rules below `components` and reduce them to a fight with body-text
 * `color` declarations.
 */

@layer reset, tokens, base, components, utilities;

@layer base {

/* ════════════════════════════════════════════════════════════════════
   1. RESET & BASE
   ════════════════════════════════════════════════════════════════════ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--line-height);
  color: var(--ink);
  background-color: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--navy);
}

ul,
ol {
  padding-left: 1.5em;
}

/* ════════════════════════════════════════════════════════════════════
   2. TYPOGRAPHY
   ════════════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--text-h1);
  font-weight: var(--weight-heading);
}

h2 {
  font-size: var(--text-h2);
  font-weight: var(--weight-heading);
}

h3 {
  font-size: var(--text-h3);
  font-weight: var(--weight-subhead);
}

h4 {
  font-size: var(--text-h4);
  font-weight: var(--weight-subhead);
}

h5, h6 {
  font-size: 1rem;
  font-weight: var(--weight-semi);
}

p {
  margin-bottom: var(--space-3);
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 700;
  color: inherit;
}

em {
  font-style: italic;
}

small {
  font-size: 0.875rem;
}

blockquote {
  border-left: 4px solid var(--sky);
  padding: var(--space-2) var(--space-3);
  margin: var(--space-4) 0;
  color: var(--slate);
  font-style: italic;
  background: var(--mist);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Lead / intro paragraph */
.lead {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  color: var(--graphite);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

/* Sub-heading / descriptor text */
.sub {
  font-size: 0.95rem;
  color: var(--slate);
  margin-top: calc(var(--space-1) * -1);
  margin-bottom: var(--space-3);
}

/* Muted / caption text */
.muted {
  font-size: 0.875rem;
  color: var(--slate);
}

}  /* end @layer base */

@layer components {

/* ════════════════════════════════════════════════════════════════════
   3. LAYOUT UTILITIES
   ════════════════════════════════════════════════════════════════════ */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (max-width: 600px) {
  .container {
    padding-inline: var(--space-3);
  }
}

.section {
  /* v1.6.0 Phase 4 — worked example for --space-fluid-* (docs/utility-doctrine.md
     does not classify --space-fluid-* as a utility; it's a token consumed by
     components). On narrow viewports padding compresses to 1.5rem (vs the
     pre-v1.6.0 fixed 4rem from --space-6) — more usable on mobile. On wide
     viewports it grows up to 3rem. The fixed --space-6 is still available
     for components that need a stable rhythm.                              */
  padding-block: var(--space-fluid-lg);
}

.section--sm {
  padding-block: var(--space-5);
}

.section--lg {
  padding-block: calc(var(--space-6) * 1.5);
}

/* Two-column responsive grid */
.twocol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: center;
}

@media (max-width: 768px) {
  .twocol {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

/* Three-column card grid */
.threecol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

@media (max-width: 960px) {
  .threecol {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .threecol {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════════════════════════════════════════════
   4. NAVIGATION
   ════════════════════════════════════════════════════════════════════ */

.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: var(--white);
  box-shadow: var(--shadow-1);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: var(--space-2) var(--space-4);
  gap: var(--space-3);
}

.nav__logo {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  font-size: 1.25rem;
  color: var(--navy);
  text-decoration: none;
  flex-shrink: 0;
}

.nav__logo:hover {
  color: var(--navy);
  opacity: 0.85;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav__links a {
  font-size: 0.95rem;
  font-weight: var(--weight-semi);
  color: var(--graphite);
  text-decoration: none;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--navy);
}

/* Mobile hamburger toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  color: var(--navy);
}

@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .nav__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
  }

  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: var(--space-3) var(--space-4);
    box-shadow: var(--shadow-2);
    gap: var(--space-2);
  }

  .nav__links.is-open {
    display: flex;
  }
}

/* ════════════════════════════════════════════════════════════════════
   5. BUTTONS
   ════════════════════════════════════════════════════════════════════ */

/* Base button — apply to <a> or <button> */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.75em 1.75em;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;   /* WCAG touch target */
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn:active {
  transform: translateY(1px);
}

/* v1.5.0 — state architecture (audit §2.7). See docs/state-matrix.md.   */
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;       /* suppress :hover / :active lift */
  box-shadow: none;
}

.btn[aria-busy="true"] {
  position: relative;
  color: transparent;
  pointer-events: none;
  /* Default spinner colour matches the navy text variants. Overridden
     below for variants whose label is white (or other contrast). The
     `color: transparent` above suppresses the label visually but
     leaves it in the DOM for AT.                                      */
  --btn-busy-color: var(--navy);
}
/* White-label variants — spinner must contrast against the dark bg.   */
.btn--navy[aria-busy="true"],
.btn--ghost-on-dark[aria-busy="true"] {
  --btn-busy-color: var(--white);
}
/* Ghost-ink uses graphite text on a light surface — keep the spinner
   matched to the label colour rather than navy.                       */
.btn--ghost-ink[aria-busy="true"] {
  --btn-busy-color: var(--graphite);
}
.btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.1em;
  height: 1.1em;
  border: 2px solid var(--btn-busy-color);
  border-top-color: transparent;
  border-radius: 50%;
  animation: ds-spinner 0.8s linear infinite;
}
/* Reduced-motion fallback — text indicator instead of spinning ring.   */
@media (prefers-reduced-motion: reduce) {
  .btn[aria-busy="true"]::after {
    content: "…";
    border: none;
    width: auto;
    height: auto;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--btn-busy-color);
    animation: none;
  }
}

@keyframes ds-spinner {
  to { transform: rotate(360deg); }
}

/* Motion choreography keyframes (v1.6.0 Phase 2).
   Trigger via the .anim-* utility classes in @layer utilities. Each
   honours `prefers-reduced-motion: reduce` at the utility level (the
   utility animation drops; the keyframe itself stays defined).
   See docs/motion-choreography.md for tier / easing / when-to-use.     */
@keyframes ds-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@keyframes ds-slide-from-left {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: none; }
}

@keyframes ds-pulse-once {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Primary — warm orange.
   Uses navy text (5.55:1 on warm, 3.90:1 on warm-hover) instead of white
   (which would be 2.06:1 — fails WCAG AA). */
.btn--orange {
  background: var(--warm);
  color: var(--navy);
  border-color: var(--warm);
}

.btn--orange:hover {
  background: var(--warm-hover);
  border-color: var(--warm-hover);
  color: var(--navy);
}

/* Teal — navy text for WCAG AA (5.28:1). White on teal is only 2.17:1. */
.btn--teal {
  background: var(--teal);
  color: var(--navy);
  border-color: var(--teal);
}

.btn--teal:hover {
  background: var(--teal-hover);
  border-color: var(--teal-hover);
  color: var(--navy);
}

/* Navy */
.btn--navy {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.btn--navy:hover {
  background: var(--navy-hover);
  border-color: var(--navy-hover);
  color: var(--white);
}

/* Ghost (navy outline on white bg) */
.btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn--ghost:hover {
  background: var(--navy);
  color: var(--white);
}

/* Ghost ink (graphite outline on white bg) */
.btn--ghost-ink {
  background: transparent;
  color: var(--graphite);
  border-color: var(--light);
}

.btn--ghost-ink:hover {
  background: var(--mist);
  border-color: var(--slate);
  color: var(--navy);
}

/* Ghost on dark — for use ON dark hero/offer-band backgrounds.
   Use this instead of inline `style="color:var(--white)"` overrides. */
.btn--ghost-on-dark {
  background: transparent;
  color: var(--white);
  border-color: var(--overlay-white-strong);
}

.btn--ghost-on-dark:hover {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}

/* Outline (mist bg, navy border) */
.btn--outline {
  background: var(--mist);
  color: var(--navy);
  border-color: var(--light);
}

.btn--outline:hover {
  background: var(--light);
  border-color: var(--slate);
}

/* Sizes */
.btn--sm {
  padding: 0.5em 1.25em;
  font-size: 0.875rem;
  min-height: 36px;
}

.btn--lg {
  padding: 1em 2.25em;
  font-size: 1.125rem;
  min-height: 52px;
}

/* Full-width */
.btn--full {
  width: 100%;
}

/* ════════════════════════════════════════════════════════════════════
   6. BADGES / CHIPS / PILLS
   ════════════════════════════════════════════════════════════════════ */

/* Badge — label with color band */
.badge {
  display: inline-block;
  padding: 0.25em 0.75em;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 100px;
  background: var(--amber);
  color: var(--navy);
  white-space: nowrap;
}

/* Badge variants — text colors chosen for WCAG AA (4.5:1+). */
.badge--teal  { background: var(--teal);      color: var(--navy);  }  /* 5.28:1 */
.badge--green { background: var(--sage);      color: var(--navy);  }  /* 5.07:1 */
.badge--sky   { background: var(--sky);       color: var(--navy);  }  /* 6.70:1 */
.badge--navy  { background: var(--navy);      color: var(--white); }  /* 11.45:1 */
.badge--rust  { background: var(--rust-dark); color: var(--white); }  /* 4.87:1 */

/* Chip — inline tag / category label */
.chip {
  display: inline-block;
  padding: 0.25em 0.75em;
  font-size: 0.8rem;
  font-weight: var(--weight-semi);
  background: var(--mist);
  color: var(--slate);
  border: 1px solid var(--light);
  border-radius: 100px;
  white-space: nowrap;
}

/* Pill — like chip but with brand color fill */
.pill {
  display: inline-block;
  padding: 0.3em 1em;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--sky);
  color: var(--navy);
  border-radius: 100px;
  white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════════════
   7. CARDS & SECTIONS
   ════════════════════════════════════════════════════════════════════ */

/* Default card */
/* .card consumes the semantic intermediaries shipped in v1.5.0 Phase 2
   (--surface-default resolves to --white; --border-subtle resolves to
   --rule-color). Visual: zero change. The point is to give the semantic
   layer a real consumer so a future theme override (docs/theming.md)
   has a known migration path. See docs/token-pipeline.md for the export.

   v1.7.0 primitive recipe: .surface-elevated.stack-sm (the elevated surface
   primitive carries the same background + shadow + radius; .stack-sm carries
   the vertical gap that consumers usually paired with .card via .mt-* / .gap-*
   utilities). See docs/primitives.md §3.                                      */
.card {
  background: var(--surface-default);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  /* v1.6.0 Phase 4 — logical-properties worked example. Pre-v1.6.0 was
     `padding: var(--space-4)` (shorthand; physical block + inline). In
     LTR locales this is zero visual change; the logical-property form
     is forward-compatible with vertical-writing-mode / RTL futures.
     Full sweep across the system is v1.7.0+; .card is the worked one.   */
  padding-block: var(--space-4);
  padding-inline: var(--space-4);
  transition: box-shadow var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-2);
}

/* Soft section — mist background panel */
.soft-section {
  background: var(--mist);
  border-radius: var(--radius);
  padding: var(--space-5) var(--space-4);
}

/* Brand card — navy top accent border */
/* @deprecated v1.5.0 → removed v2.0.0; use .card--brand */
.brand-card,
.card--brand {
  background: var(--white);
  border-radius: var(--radius);
  border-top: 4px solid var(--amber);
  box-shadow: var(--shadow-2);
  padding: var(--space-4);
}

/* Bundle card — for pricing/offer cards */
/* @deprecated v1.5.0 → removed v2.0.0; use .card--bundle */
.bundle-card,
.card--bundle {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  padding: var(--space-5) var(--space-4);
  text-align: center;
}

/* @deprecated v1.5.0 → removed v2.0.0; use .card--bundle--featured */
.bundle-card--featured,
.card--bundle--featured {
  border: 2px solid var(--teal);
}

/* v1.6.0 Phase 4 — Container-query host for bundle-card grids. Consumers
   opt in by adding `.bundle-grid` alongside whatever layout class they're
   using (`.threecol`, custom grid, etc.). When the slot drops below 320px
   the bundle card compresses its padding so it remains usable in narrow
   columns (e.g., a pricing grid embedded in a sidebar).                   */
.bundle-grid {
  container-type: inline-size;
  container-name: bundle-grid;
}

@container bundle-grid (max-width: 320px) {
  .card--bundle,
  .bundle-card {
    padding: var(--space-3) var(--space-3);
  }
}

/* Note / tip box — light.
   v1.7.0 primitive recipe: .surface-soft.stack-sm.frame-left-accent.accent-sky
   (with the .frame-left-accent inherited padding-inline-start replaced by the
   custom padding here, and `--mist` as the equivalent of --surface-soft for
   this rule). The class body stays as a recipe; v1.8.0+ may flip consumers to
   the primitive composition. See docs/primitives.md §3.                       */
.note {
  background: var(--mist);
  border-left: 4px solid var(--sky);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-2) var(--space-3);
  font-size: 0.95rem;
  color: var(--graphite);
}

/* Offer band — full-width CTA strip */
.offer-band {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: var(--space-5) var(--space-4);
  border-radius: var(--radius);
}

.offer-band h2,
.offer-band h3 {
  color: var(--amber);
}

/* ════════════════════════════════════════════════════════════════════
   8. HERO SECTIONS
   ════════════════════════════════════════════════════════════════════ */

.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--gradient-hero-mid) 100%);
  color: var(--white);
  padding-block: var(--space-6);
}

.hero h1,
.hero h2,
.hero h3 {
  color: var(--white);
}

.hero .lead {
  color: var(--overlay-white-text-soft);
}

/* Two-column hero with image/media on right */
.hero--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: center;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (max-width: 768px) {
  .hero--split {
    grid-template-columns: 1fr;
  }
}

/* Centered hero variant */
.hero--centered {
  text-align: center;
  max-width: 780px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.hero-cta {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

.hero--centered .hero-cta {
  justify-content: center;
}

/* ════════════════════════════════════════════════════════════════════
   9. FORMS
   ════════════════════════════════════════════════════════════════════ */

.form-fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}

.field label {
  font-size: 0.9rem;
  font-weight: var(--weight-semi);
  color: var(--text-secondary);   /* v1.6.0 Phase 3: semantic intermediary (= --graphite). */
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.7em 1em;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);     /* v1.6.0 Phase 3: semantic intermediary (= --ink). */
  background: var(--surface-default);   /* = --white */
  border: 1.5px solid var(--border-strong);   /* = --light */
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  min-height: 44px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: var(--focus-ring);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--slate);
  opacity: 0.7;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

/* v1.5.0 — state architecture (audit §2.7). See docs/state-matrix.md.   */
.field input:disabled,
.field select:disabled,
.field textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--surface-soft);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--danger);
}
.field input[aria-invalid="true"]:focus,
.field select[aria-invalid="true"]:focus,
.field textarea[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px var(--focus-ring-tint-danger);
}

/* Companion error-message paired with [aria-invalid] + aria-describedby.
   Pattern: <input aria-invalid="true" aria-describedby="email-err">
            <p class="field__error-message" id="email-err">...</p>      */
.field__error-message {
  font-size: 0.85rem;
  color: var(--danger-text);
  margin-top: 0.25rem;
}

/* Inline form (email + button side by side) */
.form--inline {
  display: flex;
  gap: var(--space-2);
}

.form--inline input {
  flex: 1;
}

@media (max-width: 500px) {
  .form--inline {
    flex-direction: column;
  }
}

/* Form feedback messages */
.form-message {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: var(--weight-semi);
}

.form-message--success {
  background: var(--tint-teal-soft);
  color: var(--success-text);
  border: 1px solid var(--tint-teal-border);
}

.form-message--error {
  background: var(--tint-rust-soft);
  color: var(--danger-text);
  border: 1px solid var(--tint-rust-border);
}

/* ════════════════════════════════════════════════════════════════════
   10. CALLOUT / CONTENT BOXES (Academy)
   ════════════════════════════════════════════════════════════════════ */

/* Shared callout base */
.info-box,
.callout-box,
.action-box,
.reflection-box,
.quote-box,
.framework-box,
.research-box {
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  margin-block: var(--space-4);
}

/* Info box — blue, informational */
.info-box {
  background: var(--tint-sky-soft);
  border-left: 4px solid var(--sky);
  color: var(--graphite);
}

.info-box__title {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--space-1);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Callout box — amber, key insight */
.callout-box {
  background: var(--tint-amber-soft);
  border-left: 4px solid var(--amber);
}

.callout-box__title {
  font-weight: 700;
  color: var(--callout-text);
  margin-bottom: var(--space-1);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Action box — warm orange, do this */
.action-box {
  background: var(--tint-warm-soft);
  border-left: 4px solid var(--warm);
}

.action-box__title {
  font-weight: 700;
  color: var(--action-text);
  margin-bottom: var(--space-1);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Reflection box — sage green, reflect */
.reflection-box {
  background: var(--tint-sage-soft);
  border-left: 4px solid var(--sage);
}

.reflection-box__title {
  font-weight: 700;
  color: var(--reflection-text);
  margin-bottom: var(--space-1);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Quote box — navy, testimonial/pullquote */
.quote-box {
  background: var(--shadow-tint-navy-faint);
  border-left: 4px solid var(--navy);
  font-style: italic;
}

.quote-box__attribution {
  font-style: normal;
  font-size: 0.85rem;
  color: var(--slate);
  margin-top: var(--space-2);
}

/* Research box — purple, study/evidence */
.research-box {
  background: var(--tint-purple-soft);
  border-left: 4px solid var(--research-border);
}

.research-box__title {
  font-weight: 700;
  color: var(--research-text);
  margin-bottom: var(--space-1);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Framework box — step-based learning */
.framework-box {
  background: var(--mist);
  border: 1px solid var(--light);
}

.framework-box__title {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  color: var(--navy);
  margin-bottom: var(--space-3);
}

.framework-step {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin-bottom: var(--space-3);
}

.framework-step:last-child {
  margin-bottom: 0;
}

.step-badge {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
}

.step-badge--amber { background: var(--amber); color: var(--navy); }  /* 6.71:1 */
.step-badge--teal  { background: var(--teal);  color: var(--navy); }  /* 5.28:1 — was white (2.17:1 FAIL) */

/* ════════════════════════════════════════════════════════════════════
   11. CODE BLOCKS
   ════════════════════════════════════════════════════════════════════ */

.code-block {
  background: var(--code-bg);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  margin-block: var(--space-4);
  overflow-x: auto;
  position: relative;
}

.code-block code,
.code-block pre {
  font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--code-text);
  background: none;
  padding: 0;
  border: none;
}

.code-label {
  display: inline-block;
  background: var(--overlay-white-faint);
  color: var(--code-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2em 0.6em;
  border-radius: 3px;
  margin-bottom: var(--space-2);
}

.copy-btn {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  background: var(--overlay-white-trace);
  color: var(--code-muted);
  border: 1px solid var(--overlay-white-soft);
  border-radius: 4px;
  padding: 0.3em 0.75em;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.copy-btn:hover {
  background: var(--overlay-white-mid);
  color: var(--white);
}

/* Inline code */
code {
  font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
  font-size: 0.875em;
  background: var(--shadow-tint-navy);
  color: var(--navy);
  padding: 0.1em 0.4em;
  border-radius: 3px;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* ════════════════════════════════════════════════════════════════════
   12. TABLES
   ════════════════════════════════════════════════════════════════════ */

/* Academy data table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-block: var(--space-4);
}

.data-table th {
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  text-align: left;
  padding: var(--space-2) var(--space-3);
  letter-spacing: 0.03em;
}

.data-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--light);
  color: var(--graphite);
  vertical-align: top;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover td {
  background: var(--mist);
}

/* Comparison / sales table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-block: var(--space-4);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

.comparison-table th {
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  padding: var(--space-2) var(--space-3);
  text-align: center;
}

.comparison-table th:first-child {
  text-align: left;
}

.comparison-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--light);
  text-align: center;
}

.comparison-table td:first-child {
  text-align: left;
  font-weight: var(--weight-semi);
}

/* Responsive table wrapper */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ════════════════════════════════════════════════════════════════════
   13. FOOTER
   ════════════════════════════════════════════════════════════════════ */

.footer {
  background: var(--sky);
  border-top: 3px solid var(--navy);
  padding-block: var(--space-6);
  color: var(--navy);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-4);
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer__brand {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: var(--space-2);
}

.footer__col-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
  margin-bottom: var(--space-2);
}

.footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.footer__links a {
  font-size: 0.9rem;
  color: var(--navy);
  text-decoration: none;
  opacity: 0.85;                      /* effective 4.86:1 on --sky (AA); 0.80 fell to 4.33:1 */
  transition: opacity var(--transition-fast);
}

.footer__links a:hover {
  opacity: 1;
  color: var(--navy);
}

.footer__bottom {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: var(--space-4) var(--space-4) 0;
  border-top: 1px solid var(--shadow-tint-navy-soft);
  margin-top: var(--space-5);
  font-size: 0.85rem;
  color: var(--navy);
  opacity: 0.85;                      /* effective 4.86:1 on --sky (AA); 0.70 fell to 3.53:1 */
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ── Minimal footer variant — for legal & sales pages ──────────────
   Single horizontal row: copyright (left) · compliance links (right).
   Pattern from /terms/, /workshop-upgrade/, /privacy/, /disclaimer/,
   /cookie-policy/, /accessibility/ — same .footer chrome with a
   slimmer payload. Reuses .footer-grid (overridden to two-up).      */
.footer--minimal {
  padding-block: var(--space-3);
}
.footer--minimal .footer-grid {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-3);
}
@media (max-width: 600px) {
  .footer--minimal .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.footer-copyright {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--navy);                /* 6.70:1 on --sky */
  opacity: 0.85;
}

/* Tight horizontal link list — used inside .footer for legal pages.
   Pairs with .footer--minimal but works independently if you want
   tight legal links inside the standard four-column footer too.    */
.footer-links--tight {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links--tight a {
  font-size: 0.9rem;
  color: var(--navy);
  text-decoration: none;
  opacity: 0.85;
  border-bottom: 1px solid transparent;
  transition: opacity var(--transition-fast),
              border-color var(--transition-fast);
}
.footer-links--tight a:hover {
  opacity: 1;
  border-bottom-color: var(--navy);
}
.footer-links--tight a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 2px;
}
@media (max-width: 600px) {
  .footer-links--tight {
    justify-content: center;
  }
}

/* ════════════════════════════════════════════════════════════════════
   14. BLOG COMPONENTS
   ════════════════════════════════════════════════════════════════════ */

/* Blog grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-4);
  /* v1.5.0 Phase 8 — container query host. .post-card responds to its
     slot width via @container blog-grid; see rules below. The existing
     @media fallbacks stay as the @container-unsupported path.          */
  container-type: inline-size;
  container-name: blog-grid;
}

/* Post card */
.post-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.post-card:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(var(--lift-hover));
}

.post-card__image {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

.post-card__body {
  padding: var(--space-3);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card__category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--teal-text);   /* 5.20:1 on white. Brand --teal would be 2.17:1. */
  margin-bottom: var(--space-1);
}

.post-card__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.post-card__excerpt {
  font-size: 0.9rem;
  color: var(--slate);
  line-height: 1.5;
  flex: 1;
  margin-bottom: var(--space-2);
}

.post-card__meta {
  font-size: 0.8rem;
  color: var(--slate);
  display: flex;
  align-items: center;
  gap: 1em;
  margin-top: auto;
}

/* v1.5.0 Phase 8 — container query: when the .post-card's slot is narrow
   (e.g., placed inside a sidebar at 320px width), drop the title size by
   one step and tighten the padding so the card stays legible. The card
   responds to its OWN slot, not the viewport — same component, two
   parent grids, two layouts.                                           */
@container blog-grid (max-width: 360px) {
  .post-card__title {
    font-size: 1rem;
    line-height: 1.25;
  }
  .post-card__body {
    padding: var(--space-2);
  }
  .post-card__excerpt {
    font-size: 0.85rem;
  }
}

/* Article / blog post content */
.article-content {
  max-width: 720px;
  margin-inline: auto;
}

.article-content h2 {
  margin-top: var(--space-5);
  margin-bottom: var(--space-3);
}

.article-content h3 {
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}

.article-content p + p {
  margin-top: var(--space-3);
}

.article-content ul,
.article-content ol {
  margin-block: var(--space-3);
  line-height: 1.7;
}

.article-content li + li {
  margin-top: 0.5em;
}

.article-content img {
  border-radius: var(--radius-sm);
  margin-block: var(--space-4);
}

/* Table of contents */
.table-of-contents {
  background: var(--mist);
  border: 1px solid var(--light);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  margin-block: var(--space-4);
  font-size: 0.9rem;
}

.table-of-contents__title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
  margin-bottom: var(--space-2);
}

.table-of-contents ol,
.table-of-contents ul {
  padding-left: 1.25em;
  margin: 0;
}

.table-of-contents li + li {
  margin-top: 0.4em;
}

.table-of-contents a {
  color: var(--slate);
  text-decoration: none;
}

.table-of-contents a:hover {
  color: var(--navy);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding-block: var(--space-5);
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding-inline: 0.75em;
  border: 1.5px solid var(--light);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: var(--weight-semi);
  color: var(--navy);
  text-decoration: none;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.pagination a:hover {
  background: var(--mist);
  border-color: var(--navy);
  color: var(--navy);
}

.pagination .is-current {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

/* Related articles strip */
.related-articles {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 2px solid var(--light);
}

.related-articles__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--space-4);
}

/* Section summary (blog section intro) */
.section-summary {
  max-width: 620px;
  font-size: 1.05rem;
  color: var(--slate);
  line-height: 1.65;
  margin-bottom: var(--space-4);
}

/* Article CTA strip */
.article-cta {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  text-align: center;
  margin-block: var(--space-6);
}

.article-cta h3 {
  color: var(--amber);
  margin-bottom: var(--space-2);
}

.article-cta p {
  color: var(--overlay-white-text);
  margin-bottom: var(--space-4);
}

/* Permission / access card */
/* @deprecated v1.5.0 → removed v2.0.0; use .card--permission */
.permission-card,
.card--permission {
  background: var(--white);
  border: 2px solid var(--light);
  border-radius: var(--radius);
  padding: var(--space-4);
  text-align: center;
}

/* @deprecated v1.5.0 → removed v2.0.0; use .card--permission--locked */
.permission-card--locked,
.card--permission--locked {
  border-color: var(--rust);
  background: var(--tint-rust-faint);
}

/* @deprecated v1.5.0 → removed v2.0.0; use .card--permission--unlocked */
.permission-card--unlocked,
.card--permission--unlocked {
  border-color: var(--sage);
  background: var(--tint-sage-faint);
}

/* ════════════════════════════════════════════════════════════════════
   15. ACADEMY / LESSON LAYOUT
   ════════════════════════════════════════════════════════════════════ */

.lesson-container {
  max-width: 840px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.lesson-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-3);
  border-top: 2px solid var(--light);
  margin-top: var(--space-5);
  gap: var(--space-3);
}

.lesson-nav__prev,
.lesson-nav__next {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-weight: var(--weight-semi);
  color: var(--navy);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.lesson-nav__prev:hover,
.lesson-nav__next:hover {
  color: var(--teal-text);   /* 5.20:1 on white card bg */
}

.completion-box {
  background: var(--tint-sage-mid);
  border: 2px solid var(--sage);
  border-radius: var(--radius);
  padding: var(--space-4);
  text-align: center;
  margin-top: var(--space-5);
}

.completion-box h3 {
  color: var(--reflection-text);
  margin-bottom: var(--space-2);
}

/* ════════════════════════════════════════════════════════════════════
   16. SALES PAGE COMPONENTS
   ════════════════════════════════════════════════════════════════════ */

/* Sales page container — narrow, high-conversion reading width */
.sales-container {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: var(--space-4);
  font-family: var(--font-body);
  color: var(--sales-text);
  font-size: 1.1rem;
  line-height: 1.75;
}

/* CTA block — pricing + button group */
.cta-block {
  background: var(--mist);
  border-radius: var(--radius);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  margin-block: var(--space-5);
  border: 1px solid var(--light);
}

.cta-block__price {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: var(--space-1);
}

.cta-block__price--original {
  font-size: 1.2rem;
  color: var(--slate);
  text-decoration: line-through;
  font-weight: 400;
  margin-bottom: var(--space-1);
}

.cta-block__savings {
  font-size: 0.9rem;
  color: var(--teal-text);   /* 4.56:1 on mist. Brand --teal would be 1.90:1. */
  font-weight: 700;
  margin-bottom: var(--space-4);
}

/* Sales CTA button — electric blue, high contrast */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 1em 2.5em;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--white);
  background: var(--cta-blue);
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  min-height: 52px;
  min-width: 200px;
  transition:
    background-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.cta-btn:hover {
  background: var(--cta-blue-hover);
  color: var(--white);
  transform: translateY(var(--lift-hover));
  box-shadow: 0 6px 20px var(--cta-blue-shadow);
}

.cta-btn:active {
  transform: translateY(0);
}

.cta-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring-tint-blue);
}

/* v1.5.0 — state architecture (audit §2.7). See docs/state-matrix.md.   */
.cta-btn:disabled,
.cta-btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.cta-btn[aria-busy="true"] {
  position: relative;
  color: transparent;
  pointer-events: none;
}
.cta-btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.25em;
  height: 1.25em;
  border: 2px solid var(--white);
  border-top-color: transparent;
  border-radius: 50%;
  animation: ds-spinner 0.8s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .cta-btn[aria-busy="true"]::after {
    content: "…";
    border: none;
    width: auto;
    height: auto;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--white);
    animation: none;
  }
}

/* Guarantee badge */
.guarantee-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--white);
  border: 2px solid var(--sage);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  font-size: 0.9rem;
  color: var(--graphite);
  margin-top: var(--space-3);
}

.guarantee-badge__icon {
  font-size: 1.5rem;
}

/* Social proof strip */
.proof-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding-block: var(--space-4);
  font-size: 0.9rem;
  color: var(--slate);
}

.proof-strip__item {
  display: flex;
  align-items: center;
  gap: 0.4em;
}

/* FAQ accordion */
.faq-item {
  border-bottom: 1px solid var(--light);
}

.faq-item:first-child {
  border-top: 1px solid var(--light);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-3);
  font-weight: var(--weight-semi);
  color: var(--navy);
  cursor: pointer;
  list-style: none;
  font-size: 1rem;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--slate);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

details[open] .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding-bottom: var(--space-3);
  color: var(--graphite);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ════════════════════════════════════════════════════════════════════
   17. NARRATIVE, JOURNEY & LEGAL COMPONENTS
   ────────────────────────────────────────────────────────────────────
   Patterns harvested from curiochat.com/lab, /workshop-upgrade,
   /ecosystem, /the-way-of-the-weary, /terms (audited 2026-04-28).

   17.1  Path Cards            — three-up tier selector with "you are here"
   17.2  Persona Split         — Seeker / Driver self-id with quote
   17.3  Fit Lists             — Yes / No qualification (✓ / ✕)
   17.4  Numbered Steps        — large-numeral process flow
   17.5  Timeline Acts         — multi-act phased journey (Act I/II/III)
   17.6  Workshop Flow         — pre-work / live / after with durations
   17.7  Metric Arrow          — before → after metric pair
   17.8  Value Stack           — itemized deliverables + strike total
   17.9  Founding Banner       — limited-time tier indicator
   17.10 Named Concept         — bolded term with definition (Drift Tax)
   17.11 Scenario              — italic future-state narrative
   17.12 Audience Card         — "For: [persona]" tagged product card
   17.13 Arrow Link            — text + animated → utility
   17.14 Essay / Long-Form     — lede, dropcap, pullquote, byline
   17.15 Legal Document        — doc-meta, ToC, def-list, anchored sections
   ════════════════════════════════════════════════════════════════════ */

/* ── 17.1 Path Cards ─────────────────────────────────────────────── */
.path-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin: var(--space-4) 0;
  /* v1.5.0 Phase 8 — container query host. .path-card lockup compresses
     in narrow slots (e.g., a sidebar journey-tier preview). The viewport
     @media below stays as the @container-unsupported fallback.          */
  container-type: inline-size;
  container-name: path-grid;
}
@media (max-width: 768px) {
  .path-grid { grid-template-columns: 1fr; }
}
@container path-grid (max-width: 320px) {
  .path-card {
    padding: var(--space-3);
  }
  .path-card h3 {
    font-size: 1.05rem;
  }
  .path-card__price {
    font-size: 1.2rem;
  }
  .path-card__body {
    font-size: 0.9rem;
  }
}
.path-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--light);
  border-radius: var(--radius);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
}
.path-card__eyebrow {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: var(--space-1);
}
.path-card h3 {
  font-size: 1.25rem;
  margin: 0 0 var(--space-1) 0;
  color: var(--navy);
}
.path-card__price {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--navy);
  font-size: 1.4rem;
  margin: var(--space-1) 0;
}
.path-card__meta {
  font-size: 0.95rem;
  color: var(--slate);
  margin-bottom: var(--space-2);
}
.path-card__body {
  margin-bottom: var(--space-3);
  flex: 1;
  color: var(--graphite);
}
.path-card .arrow-link {
  margin-top: auto;
  align-self: flex-start;             /* prevent cross-axis stretch in flex-column parent */
}
.path-card--current {
  border-color: var(--navy);
  border-width: 2px;
  background: linear-gradient(180deg, var(--path-cream) 0%, var(--white) 60%);
  box-shadow: var(--shadow-2);
}
.path-card--current::before {
  content: "You are here";
  position: absolute;
  top: -0.7rem;
  left: var(--space-3);
  background: var(--navy);
  color: var(--amber);                /* 6.71:1 on navy */
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

/* ── 17.2 Persona Split ──────────────────────────────────────────── */
.persona-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin: var(--space-4) 0 var(--space-2);
  /* v1.6.0 Phase 4 — @container host. .persona-card compresses below
     400px slot width. @media fallback below covers @container-unsupported
     browsers (~6% globally as of 2026-05). */
  container-type: inline-size;
  container-name: persona-split;
}
@media (max-width: 768px) {
  .persona-split { grid-template-columns: 1fr; }
}
@container persona-split (max-width: 400px) {
  .persona-card { padding: var(--space-2) var(--space-3); }
  .persona-card h3 { font-size: 1.05rem; }
}
.persona-card {
  background: var(--white);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: var(--space-3) var(--space-4);
}
.persona-card:nth-child(2) { border-left-color: var(--warm); }
.persona-card h3 {
  margin: 0 0 var(--space-1) 0;
  color: var(--navy);
  font-size: 1.2rem;
}
.persona-card__quote {
  font-style: italic;
  color: var(--graphite);
  margin: 0 0 var(--space-2) 0;
  position: relative;
  padding-left: 1.1rem;
}
.persona-card__quote::before {
  content: "\201C";                   /* curly left-double-quote */
  position: absolute;
  left: -0.1rem;
  top: -0.4rem;
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--teal-text);
  line-height: 1;
}
.persona-resolve {
  text-align: center;
  font-style: italic;
  color: var(--slate);
  margin: 0 0 var(--space-3) 0;
}

/* ── 17.3 Fit Lists ──────────────────────────────────────────────── */
.fit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin: var(--space-3) 0;
}
@media (max-width: 768px) {
  .fit-grid { grid-template-columns: 1fr; }
}
.fit-list {
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  margin: 0;
}
.fit-list h4 {
  margin: 0 0 var(--space-2) 0;
  font-size: 1.05rem;
  color: var(--navy);
}
.fit-list ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.fit-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: var(--space-1);
  line-height: 1.55;
}
.fit-list li::before {
  position: absolute;
  left: 0;
  top: 0.05em;
  font-weight: 800;
  font-size: 1.05rem;
  width: 1.25rem;
  text-align: center;
}
.fit-list--yes {
  background: var(--bg-sage-soft);
  border-left: 4px solid var(--sage);
}
.fit-list--yes li::before {
  content: "\2713";                   /* ✓ */
  color: var(--reflection-text);      /* 5.4:1 on sage-soft */
}
.fit-list--no {
  background: var(--bg-rust-soft);
  border-left: 4px solid var(--rust-dark);
}
.fit-list--no li::before {
  content: "\2715";                   /* ✕ */
  color: var(--rust-text);            /* 6.11:1 on bg-rust-soft (full AA) */
}

/* ── 17.4 Numbered Steps ─────────────────────────────────────────── */
.numbered-steps {
  display: grid;
  gap: var(--space-3);
  counter-reset: step;
  margin: var(--space-4) 0;
  padding: 0;
  list-style: none;
}
.numbered-step {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: var(--space-3);
  align-items: start;
}
.numbered-step::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--teal-text);
  background: var(--bg-light);
  border-radius: var(--radius);
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.numbered-step h3 {
  margin: 0 0 var(--space-1) 0;
  color: var(--navy);
  font-size: 1.2rem;
}
.numbered-step__body { margin: 0; color: var(--graphite); }

/* ── 17.5 Timeline Acts ──────────────────────────────────────────── */
.timeline-acts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin: var(--space-4) 0;
}
@media (max-width: 768px) {
  .timeline-acts { grid-template-columns: 1fr; }
}
.timeline-act {
  background: var(--white);
  border-radius: var(--radius);
  border-top: 4px solid var(--navy);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-1);
}
.timeline-act:nth-child(2) { border-top-color: var(--teal); }
.timeline-act:nth-child(3) { border-top-color: var(--warm); }
.timeline-act__range {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: var(--space-1);
}
.timeline-act h3 {
  margin: 0 0 var(--space-2) 0;
  color: var(--navy);
  font-size: 1.2rem;
}
.timeline-act h3 small {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate);
  margin-top: 0.15rem;
}
.timeline-act ul {
  padding-left: 1.1rem;
  margin: 0 0 var(--space-2) 0;
}
.timeline-act li { margin-bottom: 0.4rem; }
.timeline-act__deliverable {
  margin: var(--space-2) 0 0;
  padding: var(--space-2);
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.timeline-act__deliverable strong { color: var(--navy); }

/* ── 17.6 Workshop Flow ──────────────────────────────────────────── */
.workshop-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: var(--space-4) 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--light);
  background: var(--white);
}
@media (max-width: 768px) {
  .workshop-flow { grid-template-columns: 1fr; }
}
.flow-stage {
  padding: var(--space-3) var(--space-4);
  border-right: 1px solid var(--light);
}
.flow-stage:last-child { border-right: none; }
@media (max-width: 768px) {
  .flow-stage { border-right: none; border-bottom: 1px solid var(--light); }
  .flow-stage:last-child { border-bottom: none; }
}
.flow-stage__label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-text);
  margin-bottom: 0.25rem;
}
.flow-stage__duration {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--navy);
  font-size: 1.4rem;
  margin: 0 0 var(--space-1);
}
.flow-stage h4 {
  margin: 0 0 var(--space-1) 0;
  color: var(--navy);
  font-size: 1.05rem;
}
.flow-stage p {
  margin: 0;
  color: var(--graphite);
  font-size: 0.95rem;
}

/* ── 17.7 Metric Arrow ───────────────────────────────────────────── */
.metric-arrow {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--navy);
}
.metric-arrow__before {
  color: var(--slate);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--rust-dark);
}
.metric-arrow__arrow {
  color: var(--teal-text);
  font-weight: 800;
}
.metric-arrow__after { color: var(--navy); }
.metric-arrow__unit {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--slate);
}

/* ── 17.8 Value Stack ────────────────────────────────────────────── */
.value-stack {
  background: var(--white);
  border: 1px solid var(--light);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-3) 0;
}
.value-stack__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule-color);
}
.value-stack__row:last-of-type { border-bottom: none; }
.value-stack__label { flex: 1; color: var(--graphite); }
.value-stack__label strong {
  display: block;
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.value-stack__amount {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}
.value-stack__total {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 2px solid var(--navy);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
}
.value-stack__total-label {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--navy);
}
.value-stack__total-amount {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--navy);
}
.value-stack__total-amount s {
  color: var(--slate);              /* 7.9:1 on white */
  margin-right: 0.5rem;
  font-weight: 600;
  font-size: 1.1rem;
}

/* ── 17.9 Founding Banner ────────────────────────────────────────── */
.founding-banner {
  background: var(--bg-amber-soft);
  border: 1px solid var(--amber);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-3) 0;
}
.founding-banner__label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);                /* 6.71:1 on amber */
  background: var(--amber);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-1);
}
.founding-banner h4 {
  margin: 0 0 var(--space-1) 0;
  color: var(--navy);
  font-size: 1.1rem;
}
.founding-banner__why {
  margin: var(--space-1) 0 0 0;
  font-size: 0.95rem;
  color: var(--graphite);
}
.founding-banner__why strong { color: var(--navy); }

/* ── 17.10 Named Concept ─────────────────────────────────────────── */
.named-concept {
  background: var(--mist);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-3) 0;
  border-left: 4px solid var(--navy);
}
.named-concept__term {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--navy);
  margin: 0 0 var(--space-1) 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.named-concept__term::before {
  content: "\00A7";                   /* § */
  color: var(--teal-text);
  font-weight: 700;
}
.named-concept__def { margin: 0; color: var(--graphite); }
.named-concept__def strong { color: var(--navy); }

/* ── 17.11 Scenario ──────────────────────────────────────────────── */
/* v1.7.0 primitive recipe: .surface-soft.stack-sm.frame-left-accent.accent-sky
   plus font-style: italic. The bg-sky-soft fills the role of --surface-soft
   for this rule (sky-tinted near-white), and the ::before "Imagine" prefix
   is the recipe-specific decoration — not part of the primitive surface.
   See docs/primitives.md §3.                                                 */
.scenario {
  background: var(--bg-sky-soft);
  border-left: 4px solid var(--sky);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  font-style: italic;
  color: var(--graphite);
  margin: var(--space-3) 0;
}
.scenario::before {
  content: "Imagine";
  display: block;
  font-family: var(--font-heading);
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: var(--space-1);
}
.scenario p { margin: 0 0 var(--space-1) 0; }
.scenario p:last-child { margin-bottom: 0; }

/* ── 17.12 Audience Card ─────────────────────────────────────────── */
.audience-card {
  background: var(--white);
  border: 1px solid var(--light);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
}
.audience-card__for {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-text);
  margin-bottom: var(--space-1);
}
.audience-card__for::before { content: "For: "; color: var(--slate); }
.audience-card h3 {
  margin: 0 0 var(--space-1) 0;
  color: var(--navy);
  font-size: 1.15rem;
}
.audience-card__price {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--navy);
  margin: var(--space-1) 0;
}
.audience-card__body {
  flex: 1;
  margin-bottom: var(--space-2);
  color: var(--graphite);
}
.audience-card .arrow-link {
  align-self: flex-start;             /* prevent cross-axis stretch in flex-column parent */
}

/* ── 17.13 Arrow Link ────────────────────────────────────────────── */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--link-color);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast);
}
.arrow-link::after {
  content: "\2192";                   /* → */
  display: inline-block;
  transition: transform var(--transition-fast);
}
.arrow-link:hover {
  border-bottom-color: var(--link-color);
}
.arrow-link:hover::after {
  transform: translateX(3px);
}
.arrow-link:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 2px;
}
.arrow-link--lg { font-size: 1.05rem; }

/* ── 17.14 Essay / Long-Form Layout ──────────────────────────────── */
.essay {
  max-width: var(--essay-maxw);
  margin: 0 auto;
  padding: var(--space-4) var(--space-3);
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--ink);
}
.essay > p { margin: 0 0 var(--space-3) 0; }
.essay h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
  color: var(--navy);
}
.essay h3 {
  font-size: 1.25rem;
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
  color: var(--navy);
}
.essay__lede {
  font-size: 1.25rem;
  line-height: 1.65;
  color: var(--graphite);
  margin-bottom: var(--space-4);
}
.essay__lede--dropcap::first-letter {
  font-family: var(--font-heading);
  float: left;
  font-size: 4rem;
  line-height: 0.9;
  font-weight: 800;
  color: var(--navy);
  padding: 0.2rem 0.6rem 0 0;
  margin-top: 0.1rem;
}
.essay__divider {
  border: none;
  text-align: center;
  margin: var(--space-5) 0;
  height: 1rem;
}
.essay__divider::before {
  content: "* * *";
  letter-spacing: 0.6em;
  font-size: 0.9rem;
  color: var(--slate);
}
.pullquote {
  margin: var(--space-4) 0;
  padding: var(--space-2) var(--space-4);
  border-left: 3px solid var(--amber);
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--navy);
  font-style: normal;
}
.pullquote cite {
  display: block;
  margin-top: var(--space-1);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  font-style: normal;
  color: var(--slate);
}
.pullquote cite::before { content: "\2014\00A0"; }   /* em-dash + nbsp */
.byline {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-3) 0 var(--space-4) 0;
  padding: var(--space-2) 0;
  border-top: 1px solid var(--rule-color);
  border-bottom: 1px solid var(--rule-color);
}
.byline__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--mist);
  flex-shrink: 0;
  object-fit: cover;
}
.byline__name {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--navy);
  margin: 0;
  font-size: 0.95rem;
}
.byline__meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--slate);
}

/* ── 17.15 Legal Document Layout ─────────────────────────────────── */
.legal-doc {
  max-width: 44rem;
  margin: 0 auto;
  padding: var(--space-4) var(--space-3);
  color: var(--ink);
}
.legal-doc h1 {
  margin-bottom: var(--space-2);
  color: var(--navy);
}
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  align-items: center;
  padding: var(--space-1) var(--space-2);
  background: var(--mist);
  border-radius: var(--radius-sm);
  margin: var(--space-2) 0 var(--space-4) 0;
  font-size: 0.9rem;
  color: var(--slate);
}
.doc-meta strong { color: var(--navy); font-weight: 700; }
.doc-meta__item { display: inline-flex; gap: 0.35rem; }

.legal-toc {
  background: var(--bg-light);
  border: 1px solid var(--light);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-3) 0 var(--space-4) 0;
}
.legal-toc h2 {
  margin: 0 0 var(--space-2) 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
}
.legal-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
  column-gap: var(--space-4);
  counter-reset: toc;
}
@media (max-width: 600px) {
  .legal-toc ol { columns: 1; }
}
.legal-toc li {
  counter-increment: toc;
  margin-bottom: 0.35rem;
  break-inside: avoid;
}
.legal-toc li::before {
  content: counter(toc) ".";
  display: inline-block;
  width: 1.8rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--slate);
  text-align: right;
  margin-right: 0.4rem;
}
.legal-toc a {
  color: var(--link-color);
  text-decoration: none;
  border-bottom: 1px dotted var(--light);
}
.legal-toc a:hover { border-bottom-style: solid; }

.numbered-section {
  scroll-margin-top: 5rem;
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  border-top: 1px solid var(--rule-color);
}
.numbered-section > h2 {
  font-size: 1.3rem;
  color: var(--navy);
  margin: 0 0 var(--space-2) 0;
}
.numbered-section .anchor-link {
  opacity: 0;
  margin-left: 0.4rem;
  font-size: 0.85em;
  color: var(--slate);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}
.numbered-section:hover .anchor-link,
.numbered-section .anchor-link:focus-visible { opacity: 1; }
.numbered-section p { margin: 0 0 var(--space-2) 0; }

.def-list { margin: var(--space-2) 0; }
.def-list dt {
  font-weight: 700;
  color: var(--navy);
  margin-top: var(--space-2);
}
.def-list dt:first-child { margin-top: 0; }
.def-list dd {
  margin: 0.25rem 0 var(--space-2) 0;
  padding-left: var(--space-2);
  color: var(--graphite);
}

.legal-ack {
  font-style: italic;
  background: var(--bg-amber-soft);
  border-left: 3px solid var(--amber);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  margin: var(--space-2) 0;
  color: var(--graphite);
}

/* ════════════════════════════════════════════════════════════════════
   18. SITE-WIDE PRIMITIVES
   ────────────────────────────────────────────────────────────────────
   v1.4.0: promoted from curiochat.ai/src/css/marketing-pages.css.
   Each class below appeared identically under 3+ body.page-* scopes
   in marketing-pages.css (cross-page reuse signal, see
   specs/v1.4.0-promotion.md §3). Promoted verbatim with the
   body.page-* prefix dropped.

   18.1  Hero eyebrow         — small uppercase label above .hero h1
   18.2  Hero lede            — magic-message paragraph under .hero h1
   18.3  Reading column       — long-form prose container (sibling of .essay)
   18.4  Concept span         — inline canonical-vocabulary marker
   18.5  Beat                 — single rhythmic-paragraph primitive
   18.6  Promise              — closing-section narrative block + __signoff
   18.7  Subtypes / subtype   — inline taxonomy / sub-category enumeration
   ════════════════════════════════════════════════════════════════════ */

/* ── 18.1 Hero eyebrow ─────────────────────────────────────────────
   Top-level utility, not BEM-nested under .hero — used standalone
   above .hero h1 across page-home, page-sw-engineer, page-ai-powered,
   page-solopreneur, page-foundation, page-mastery (6 namespaces). */
.hero-eyebrow {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-text);             /* 5.20:1 on white */
  margin-bottom: var(--space-2);
}

/* ── 18.2 Hero lede ────────────────────────────────────────────────
   The bigger paragraph just under .hero h1. BEM-scoped under .hero
   because it is never used outside one.

   WCAG contract (v1.6.0 audit): the body text uses var(--ink), which
   FAILS WCAG AA against the canonical navy .hero (1.65:1). The rule is
   correct ONLY when .hero has been inline-overridden to a light gradient
   (the curiochat.ai ACM sales-page pattern, demonstrated twice in the
   kitchen-sink index.html). A consumer using <p class="hero__lede"> on a
   canonical navy hero must override the colour. v1.7.0+ may either rename
   this to .lede-light or add a guard via @supports (...) — flagged in
   specs/done/v1.6.0-audit-report.md §3.                                         */
.hero__lede {
  font-size: 1.18rem;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 1.4rem;
  max-width: 640px;
}
.hero__lede strong { color: var(--navy); font-weight: 700; }

/* ── 18.3 Reading column ───────────────────────────────────────────
   Long-form prose container. Sibling of v1.3.0's .essay — but simpler
   (no drop cap, no pull-quote, no divider). Use .reading for prose
   inside marketing/sales sections; reach for .essay when the rhythm
   needs the full editorial typography. */
.reading {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}
.reading p {
  margin: 0 0 1.4rem;
  color: var(--graphite);
  font-size: 1.075rem;
  line-height: 1.75;
}
.reading p strong { color: var(--navy); font-weight: 700; }

@media (max-width: 600px) {
  .reading { padding: 0 1.25rem; }
}

/* ── 18.4 Concept span ─────────────────────────────────────────────
   Inline canonical-vocabulary marker — used to flag a phrase that is
   load-bearing in the surrounding prose. Distinct from v1.3.0's
   .named-concept (which is block-level with __term/__def). */
.concept { color: var(--navy); font-weight: 700; }

/* ── 18.5 Beat ─────────────────────────────────────────────────────
   Single rhythmic-paragraph primitive — used inside scenario blocks
   and promise sections to deliver one short, declarative line. */
.beat {
  margin: 1.75rem 0;
  padding: 0.4rem 0 0.4rem 1.25rem;
  border-left: 4px solid var(--amber);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.18rem;
  line-height: 1.45;
  color: var(--navy);
}

@media (max-width: 600px) {
  .beat { font-size: 1.05rem; padding-left: 1rem; }
}

/* ── 18.6 Promise (closing narrative block) ────────────────────────
   Closing-section narrative block + __signoff child. The signoff is
   the small "from Pierre" attribution line. Page-foundation,
   page-mastery, page-ai-powered (3 namespaces). */
.promise {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}
.promise h2 {
  text-align: center;
  margin-bottom: 1.75rem;
}
.promise p {
  margin: 0 0 1.4rem;
  color: var(--graphite);
  font-size: 1.075rem;
  line-height: 1.75;
}
.promise__signoff {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--navy);
  margin-top: 1.5rem;
}
.promise__signoff small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--slate);
  margin-top: 0.25rem;
}

/* ── 18.7 Subtypes / subtype ───────────────────────────────────────
   3-card grid enumerating sub-categories of a path/role. Sibling of
   v1.3.0's .path-grid / .path-card — use .subtypes when the cards
   carry short paragraph content, not full path-card metadata. */
.subtypes {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin: 1.75rem 0 0.5rem;
}

.subtype {
  background: var(--white);
  border: 1px solid var(--light);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-3) 1.4rem;
  box-shadow: var(--shadow-1);
  border-left: 4px solid var(--amber);
}

.subtype h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--navy);
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.005em;
}

.subtype p {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--graphite);
}

.subtype p:last-child { margin-bottom: 0; }

@media (min-width: 720px) {
  .subtypes { grid-template-columns: repeat(3, 1fr); }
}


/* ════════════════════════════════════════════════════════════════════
   19. SALES-PAGE PRIMITIVES
   ────────────────────────────────────────────────────────────────────
   v1.4.0: promoted from curiochat.ai/src/css/marketing-pages.css
   (page-foundation + page-mastery scope today, Solopreneur-imminent —
   see specs/v1.4.0-promotion.md §4).

   19.1  Section eyebrow        — numbered uppercase eyebrow above section h2
   19.2  Stats row              — three-column credibility display
   19.3  Founding badge         — inline / chip form of .founding-banner
   19.4  Artifact card family   — proof / deliverable card grid
   19.5  Audience grid          — qualify-in / objection-rebuttal grid
   19.6  Author card            — about-the-instructor block (avatar + bio)
   19.7  Hero window            — scarcity / explainer card inside .hero
   19.8  Timeline list          — sales-page vertical phase list
   19.9  Scenario block         — tinted future-state vignette (card form)
   19.10 Step-badge time variant — extension of .step-badge
   19.11 Code-block demo variant — extension of .code-block
   19.12 Proof-strip headshot   — extension of .proof-strip
   ════════════════════════════════════════════════════════════════════ */

/* ── 19.1 Section eyebrow ──────────────────────────────────────────
   Magazine-pattern numbered eyebrow above section h2. Promoted
   alongside .hero-eyebrow — same typographic shape, mid-page scope. */
.section-eyebrow {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-text);
  margin-bottom: 0.65rem;
}

.section-eyebrow .num {
  /* v1.6.0 post-Phase-5 audit fix: pre-fix used --amber (the bright
     brand token) as text on the page body, computing 1.71:1 — hard
     WCAG AA fail. --amber is a background-only token per README § Key
     Design Decisions ("Bright brand colors are NOT text colors"); the
     accessible text variant is --amber-text, 6.67:1 on white.           */
  color: var(--amber-text);
  margin-right: 0.4rem;
}

/* ── 19.2 Stats row ────────────────────────────────────────────────
   Three-column credibility display. Sibling of v1.3.0's .metric-arrow
   (before→after pair) — use .stats-row for 3-up at-a-glance numbers. */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 1.75rem 0;
  padding: var(--space-4) var(--space-2);
  background: linear-gradient(180deg, var(--white) 0%, var(--bg-light) 100%);
  border-radius: var(--radius);
  border: 1px solid var(--light);
  position: relative;
  overflow: hidden;
}

.stats-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal) 0%, var(--amber) 100%);
}

.stats-row .stat {
  text-align: center;
  padding: 0 0.5rem;
  position: relative;
}

.stats-row .stat + .stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 1px;
  background: var(--shadow-tint-navy-mid);
}

.stats-row .stat-num {
  display: block;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2.25rem, 5vw, 3rem);
  color: var(--navy);
  line-height: 1;
  letter-spacing: -0.03em;
}

.stats-row .stat-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  margin-top: 0.5rem;
}

@media (max-width: 600px) {
  .stats-row { gap: 0.5rem; padding: 1.25rem 0.75rem; }
  .stats-row .stat-num { font-size: 1.85rem; }
}

/* ── 19.3 Founding badge ───────────────────────────────────────────
   Inline chip form of v1.3.0's .founding-banner (full bar). Use the
   badge when status fact ("Founding rate") is a glance signal next to
   a price; use the banner when the same fact needs a full ribbon. */
.founding-badge {
  display: inline-block;
  background: var(--bg-amber-soft);
  color: var(--amber-text);             /* 6.45:1 on bg-amber-soft */
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}

/* ── 19.4 Artifact card family ─────────────────────────────────────
   Proof / deliverable card grid. Inner .framework-step (v1.3.0)
   composes naturally. Use --accent for the centerpiece card in the
   grid (amber flip on border-top, faint amber wash); use --wide on
   the row where the card spans both columns. */
.artifact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin: 1.75rem 0 var(--space-4);
  /* v1.6.0 Phase 4 — @container host. .artifact-card compresses below
     380px slot width (rare in current consumer layouts, common when the
     grid is dropped into a sidebar or narrow column).                  */
  container-type: inline-size;
  container-name: artifact-grid;
}

@media (min-width: 760px) {
  .artifact-grid { grid-template-columns: 1fr 1fr; }
  .artifact-grid .artifact-card--wide { grid-column: 1 / -1; }
}

@container artifact-grid (max-width: 380px) {
  .artifact-card { padding: var(--space-2) var(--space-3) var(--space-3); }
  .artifact-card__heading { font-size: 1.05rem; }
  .artifact-card__lede { font-size: 0.9rem; }
}

.artifact-card {
  background: var(--white);
  border: 1px solid var(--light);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-3) 1.4rem;
  box-shadow: var(--shadow-1);
  position: relative;
  border-top: 3px solid var(--teal);
}

.artifact-card--accent {
  border-top-color: var(--amber);
  background: linear-gradient(180deg, var(--bg-amber-faint) 0%, var(--white) 100%);
}

.artifact-card__heading {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-text);
  margin: 0 0 1rem 0;
}

.artifact-card--accent .artifact-card__heading { color: var(--amber-text); }

.artifact-card__lede {
  margin: 0 0 1rem 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--graphite);
}

.artifact-card .framework-step {
  align-items: flex-start;
  padding: 0.7rem 0;
  border-top: 1px solid var(--rule-color);
}

.artifact-card .framework-step:first-of-type { border-top: none; padding-top: 0; }
.artifact-card .framework-step:last-child    { padding-bottom: 0; }

.artifact-step__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  color: var(--navy);
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.005em;
}

.artifact-step__body {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--graphite);
}

/* ── 19.5 Audience grid ────────────────────────────────────────────
   Qualify-in / objection-rebuttal grid. Sibling of v1.3.0's .fit-grid
   (✓/✗ short bullets) and .persona-split (two-archetype self-id).
   Use .audience-grid for paragraph-form audiences and the --objection
   variant for "Common objection / Honest answer" rebuttal pairs. */
.audience-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  margin: 1.75rem 0;
  /* v1.6.0 Phase 4 — @container host. .audience-block compresses below
     360px slot width. The .audience-grid is single-column at viewport
     widths today; the @container rule applies when the grid is dropped
     into a constrained slot (sidebar, embedded card).                   */
  container-type: inline-size;
  container-name: audience-grid;
}

@container audience-grid (max-width: 360px) {
  .audience-block { padding: var(--space-2) var(--space-2); }
  .audience-block h3 { font-size: 0.98rem; }
  .audience-block p { font-size: 0.9rem; }
}

.audience-block {
  background: var(--bg-light);
  border: 1px solid var(--light);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius-sm);
  padding: 1.25rem var(--space-3) var(--space-2);
}

.audience-block h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.005em;
}

.audience-block p {
  margin: 0 0 0.6rem 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--graphite);
}

.audience-block p:last-child { margin-bottom: 0; }

.audience-block--objection {
  background: var(--bg-amber-soft);
  border-left-color: var(--amber);
}

@media (min-width: 720px) {
  .audience-grid { grid-template-columns: 1fr 1fr; }
}

/* ── 19.6 Author card ──────────────────────────────────────────────
   About-the-instructor block — avatar + name + bio paragraph. Richer
   than v1.3.0's .byline (inline article byline). Use .author-card on
   sales pages where the bio sells the instructor; keep .byline for
   inline article attributions. */
.author-card {
  max-width: 720px;
  margin: 2.5rem auto 0;
}

.author-card h2 {
  margin-top: 0;
  font-size: 1.25rem;
  text-align: left;
}

.author-card p:last-child { margin-bottom: 0; }

.author-card__layout {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.author-card__layout .proof-strip__headshot,
.author-card__layout .proof-headshot {
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.author-card__bio { flex: 1; min-width: 0; }

@media (max-width: 600px) {
  .author-card__layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .author-card__layout .proof-strip__headshot,
  .author-card__layout .proof-headshot {
    width: 120px;
    height: 120px;
  }
}

/* ── 19.7 Hero window ──────────────────────────────────────────────
   Dashed-border scarcity / explainer card placed inside .hero. BEM
   under .hero — never used outside one.

   WCAG contract (v1.6.0 audit): .hero__window has its own background
   (var(--overlay-white-glow), an rgba over the parent) which composites
   to near-white when .hero is the canonical navy gradient, and stays
   near-white when .hero is inline-overridden to a light gradient. The
   child .hero__window h3 (var(--navy)) and .hero__window p (var(--graphite))
   read against this near-white surface (10.61:1 and ~9:1 respectively) —
   PASS in both .hero contexts.                                            */
.hero__window {
  text-align: center;
  max-width: 640px;
  margin: 2rem auto 0;
  padding: var(--space-3) var(--space-3);
  border: 1px dashed var(--navy);
  border-radius: var(--radius);
  background: var(--overlay-white-glow);
}

.hero__window h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.hero__window p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--graphite);
  margin: 0;
}

/* ── 19.8 Timeline list ────────────────────────────────────────────
   Sales-page vertical phase list. Composes .framework-step (v1.3.0)
   for each row. Distinct from v1.3.0's .timeline-acts / .timeline-act
   (multi-act phased programs) — renamed from bare .timeline on
   promotion to disambiguate. */
.timeline-list { margin: 1.75rem 0; }

.timeline-list .framework-step {
  align-items: flex-start;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--rule-color);
}

.timeline-list .framework-step:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.timeline-list .step-content { flex: 1; min-width: 0; }
.timeline-list .step-content p { margin: 0; }

/* ── 19.9 Scenario block ───────────────────────────────────────────
   Card-shaped future-state vignette inside .reading. Distinct from
   v1.3.0's .scenario (italic "Imagine" prefix). Pick by shape: italic
   prose -> .scenario · tinted card -> .scenario-block. */
.scenario-block {
  background: var(--bg-sky-soft);
  border-left: 4px solid var(--cta-blue);
  border-radius: var(--radius-sm);
  padding: 1.25rem var(--space-3) 0.5rem;
  margin: 1.75rem 0;
}

.scenario-block p:last-child { margin-bottom: 1rem; }

/* ── 19.10 Step badge — time variant ────────────────────────────────
   Extends the existing .step-badge (Section 11 of v1.3.0). Wider
   than the round --teal / --amber variants so it can fit "20 min"
   style labels. Pair with .timeline-list. */
.step-badge--time {
  width: auto;
  min-width: 4.5rem;
  height: auto;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--bg-amber-soft);
  color: var(--amber-text);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ── 19.11 Code block — demo variant ───────────────────────────────
   Extends the existing .code-block (Section 11). The --demo modifier
   tints the .code-label teal to signal "this is an illustrative
   example, not copy-paste-ready production code". */
.code-block--demo .code-label {
  background: var(--tint-teal-strong);
  /* v1.6.0 post-Phase-5 audit fix: pre-fix used --teal as text on the
     teal-tinted dark composite (4.76:1 — marginal AA but perceptually
     poor because both fg and bg share the same hue family). Switched to
     --teal-light (the lighter shade in the brand-extended palette);
     6.03:1 on the same composite, clearly differentiated luminance. */
  color: var(--teal-light);
}

/* ── 19.12 Proof strip — headshot ───────────────────────────────────
   Circular bio variant. Adds a face to the existing .proof-strip
   row, or stands alone inside .author-card. */
.proof-strip__headshot {
  display: block;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--white);
  box-shadow: var(--shadow-3);
}


/* ════════════════════════════════════════════════════════════════════
   20. EDITORIAL NEIGHBOURS
   ────────────────────────────────────────────────────────────────────
   v1.4.0: typographic rhythm primitives used in the same long-form
   register as v1.3.0's .essay / .pullquote / .byline. ACM-only today
   (page-foundation + page-mastery) but documented as DS surface so
   future sales pages reach for the same vocabulary.

   20.1  Staccato         — short rhythmic-line stack
   20.2  Circular return  — closing call-back with amber rule
   ════════════════════════════════════════════════════════════════════ */

/* ── 20.1 Staccato ─────────────────────────────────────────────────
   Used at the rhetorical close of a sales-page essay — a stack of
   one-line declaratives. Sets each <p> tight against its neighbour. */
.staccato {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--navy);
  line-height: 1.45;
  margin: 2rem 0 1rem;
}

.staccato p { margin: 0.25rem 0; }

/* ── 20.2 Circular return ──────────────────────────────────────────
   The closing line that returns to the lede's framing. Amber rule
   echoes the .beat opening primitive — the rhythm closes the loop. */
.circular-return {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--navy);
  line-height: 1.4;
  margin: 1.25rem 0 1.75rem;
  padding-left: 1rem;
  border-left: 4px solid var(--amber);
}

/* ════════════════════════════════════════════════════════════════════
   20.5  LAYOUT PRIMITIVES (v1.7.0)
   ════════════════════════════════════════════════════════════════════
   The "Every Layout" surface — Heydon Pickering's stack / cluster /
   switcher / sidebar / reel / flow set — plus surface / frame / accent
   primitives. All ship as tier `experimental` per
   docs/component-maturity-matrix.md (the API may evolve in v1.8.0+).

   Recipe contract (docs/primitives.md): existing component classes
   (.note / .card / .scenario / etc.) keep their bodies; this section
   documents the primitive equivalent each component composes. Three
   worked examples land in v1.7.0 (.note / .card / .scenario CSS-comment
   recipes); the rest of the 38 component recipes migrate component-by-
   component in v1.8.0+.                                                  */

/* ── 20.5.1  Stack — vertical rhythm ───────────────────────────────── */
.stack-xs { display: flex; flex-direction: column; gap: var(--space-1); }
.stack-sm { display: flex; flex-direction: column; gap: var(--space-2); }
.stack-md { display: flex; flex-direction: column; gap: var(--space-3); }
.stack-lg { display: flex; flex-direction: column; gap: var(--space-4); }
.stack-xl { display: flex; flex-direction: column; gap: var(--space-5); }

/* ── 20.5.2  Cluster — horizontal flex-wrap with gap ────────────────── */
.cluster-xs { display: flex; flex-wrap: wrap; gap: var(--space-1); align-items: center; }
.cluster-sm { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.cluster-md { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.cluster-lg { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }
.cluster-xl { display: flex; flex-wrap: wrap; gap: var(--space-5); align-items: center; }

/* ── 20.5.3  Switcher — single-row → stacked at threshold ───────────── */
.switcher {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.switcher > * {
  flex: 1 1 var(--switcher-threshold, 20rem);
}

/* ── 20.5.4  Sidebar — narrow asymmetric layout ─────────────────────── */
.sidebar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.sidebar > :first-child { flex: 1 1 var(--sidebar-width, 18rem); }
.sidebar > :last-child  { flex: 999 1 var(--sidebar-content-min, 50%); }

/* ── 20.5.5  Reel — horizontal overflow scroll with snap points ─────── */
.reel {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding-block-end: var(--space-1);   /* room for the scrollbar */
}
.reel > * {
  scroll-snap-align: start;
  flex: 0 0 var(--reel-item, 18rem);
}

/* ── 20.5.6  Flow — prose rhythm between siblings (Lobotomized Owl) ─── */
.flow > * + * {
  margin-block-start: var(--flow-space, var(--space-3));
}

/* ── 20.5.7  Surface — visual fill + (for -elevated) shadow + radius ── */
.surface-default  { background: var(--surface-default); }
.surface-soft     { background: var(--surface-soft); }
.surface-emphasis { background: var(--surface-emphasis); }
.surface-inverse  {
  background: var(--navy);
  color: var(--white);
}
.surface-elevated {
  background: var(--surface-default);
  box-shadow: var(--shadow-1);
  border-radius: var(--radius);
}

/* ── 20.5.8  Frame — border-radius / accent strips / aspect ratio ───── */
.frame-rounded     { border-radius: var(--radius); overflow: hidden; }
.frame-left-accent {
  border-left: 4px solid var(--frame-accent, currentColor);
  padding-inline-start: var(--space-3);
}
.frame-top-accent  {
  border-top: 4px solid var(--frame-accent, currentColor);
}
.frame-aspect-16-9 {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

/* ── 20.5.9  Accent — set --frame-accent for the frame-* primitives ──
   Sets a custom property the frame primitives read; lets accent + frame
   compose without a class explosion.                                    */
.accent-teal   { --frame-accent: var(--teal); }
.accent-amber  { --frame-accent: var(--amber); }
.accent-sage   { --frame-accent: var(--sage); }
.accent-rust   { --frame-accent: var(--rust); }
.accent-sky    { --frame-accent: var(--sky); }
.accent-navy   { --frame-accent: var(--navy); }
.accent-purple { --frame-accent: var(--research-border); }

}  /* end @layer components */

@layer utilities {

/* ════════════════════════════════════════════════════════════════════
   21. UTILITY CLASSES
   ════════════════════════════════════════════════════════════════════ */

/* Text alignment */
.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* Text color */
.text-navy     { color: var(--navy); }
.text-amber    { color: var(--amber); }
.text-teal     { color: var(--teal); }
.text-slate    { color: var(--slate); }
.text-white    { color: var(--white); }
.text-success  { color: var(--success); }
.text-danger   { color: var(--danger); }

/* Background color */
.bg-navy   { background-color: var(--navy); }
.bg-sky    { background-color: var(--sky); }
.bg-mist   { background-color: var(--mist); }
.bg-white  { background-color: var(--white); }

/* Spacing utilities — logical properties (v1.6.0 Phase 2). In LTR locales
   block-start == top and block-end == bottom (zero visual change from
   the pre-v1.6.0 physical-property version); the logical-property form
   is forward-compatible with future RTL / writing-mode support.        */
.mt-0 { margin-block-start: 0; }
.mt-1 { margin-block-start: var(--space-1); }
.mt-2 { margin-block-start: var(--space-2); }
.mt-3 { margin-block-start: var(--space-3); }
.mt-4 { margin-block-start: var(--space-4); }
.mt-5 { margin-block-start: var(--space-5); }
.mt-6 { margin-block-start: var(--space-6); }

.mb-0 { margin-block-end: 0; }
.mb-1 { margin-block-end: var(--space-1); }
.mb-2 { margin-block-end: var(--space-2); }
.mb-3 { margin-block-end: var(--space-3); }
.mb-4 { margin-block-end: var(--space-4); }
.mb-5 { margin-block-end: var(--space-5); }
.mb-6 { margin-block-end: var(--space-6); }

/* Display */
.hidden         { display: none !important; }
.sr-only        { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }
.not-sr-only    { position: static; width: auto; height: auto; padding: 0; margin: 0; overflow: visible; clip: auto; white-space: normal; }

/* Flex helpers */
.flex           { display: flex; }
.flex-col       { display: flex; flex-direction: column; }
.items-center   { align-items: center; }
.justify-center { justify-content: center; }
.justify-between{ justify-content: space-between; }
.gap-1          { gap: var(--space-1); }
.gap-2          { gap: var(--space-2); }
.gap-3          { gap: var(--space-3); }
.gap-4          { gap: var(--space-4); }
.gap-5          { gap: var(--space-5); }
.gap-6          { gap: var(--space-6); }
.flex-wrap      { flex-wrap: wrap; }

/* Motion choreography — animation utilities (v1.6.0 Phase 2).
   See docs/motion-choreography.md for tier/easing rationale and the
   keyframe definitions (live in @layer components alongside ds-spinner).
   Each utility honours `prefers-reduced-motion: reduce` below.          */
.anim-fade-up         { animation: ds-fade-up var(--transition-normal) var(--ease-out) both; }
.anim-slide-from-left { animation: ds-slide-from-left var(--transition-normal) var(--ease-out) both; }
.anim-pulse-once      { animation: ds-pulse-once var(--transition-slow) var(--ease-snap) 1; }

/* Stagger parent — children with `--ds-stagger-index` apply a per-child
   transition-delay so a group of .anim-* siblings reveal sequentially.  */
.ds-stagger > * {
  animation-delay: calc(var(--ds-stagger-step, 60ms) * var(--ds-stagger-index, 0));
}

@media (prefers-reduced-motion: reduce) {
  .anim-fade-up,
  .anim-slide-from-left,
  .anim-pulse-once {
    animation: none;
  }
}

/* ════════════════════════════════════════════════════════════════════
   22. ACCESSIBILITY HELPERS
   ════════════════════════════════════════════════════════════════════ */

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus-visible: only show ring on keyboard nav */
:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--focus-ring-color);
  outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-2);
  background: var(--navy);
  color: var(--white);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  z-index: var(--z-skip-link);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-2);
}

/* High-contrast mode support */
@media (forced-colors: active) {
  .btn,
  .cta-btn {
    border: 2px solid ButtonText;
  }

  .badge,
  .chip,
  .pill {
    border: 1px solid ButtonText;
  }
}

}  /* end @layer utilities */

/* ════════════════════════════════════════════════════════════════════
   23. PRINT
   ════════════════════════════════════════════════════════════════════ */

@media print {
  .nav,
  .footer,
  .cta-btn,
  .btn,
  .cookie-banner {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  h1, h2, h3, h4 {
    page-break-after: avoid;
    color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.75em;
  }
}
