:root {
  color-scheme: light;

  /* ── Color: surfaces & ink ────────────────────────────────────── */
  --bg-canvas: #f3f7f2;
  --bg-surface: #ffffff;
  --bg-muted: #e8f0e7;
  --bg-inverse: #102b2c;
  --text-primary: #17201f;
  --text-secondary: #4d5b58;
  --text-tertiary: #76817e;
  --text-inverse: #f8fbf7;
  --line-soft: #dce8dc;
  --line-default: #c4d3ca;
  --line-strong: #78938b;
  --accent-primary: #0f766e;
  --accent-strong: #0e4f57;
  --accent-soft: #d8ece6;
  --accent-warm: #b85d3a;
  --accent-ink: #243b55;
  --state-success: #2f6b4f;
  --state-warning: #91691d;
  --state-error: #9b4334;
  --state-info: #5b6f7f;

  /* ── Shadow: 5-level elevation system ─────────────────────────── *
   * Tone: warm-brown rgba(44, 34, 18, …) — preserves the editorial,
   * book-like character of the brand. (Pre-Slice-1 only had sm + lg;
   * Slice 1 adds xs/md and a focus ring token.) */
  --shadow-xs: 0 1px 3px rgba(44, 34, 18, 0.05), 0 1px 2px rgba(44, 34, 18, 0.04);
  --shadow-sm: 0 10px 28px rgba(44, 34, 18, 0.06);
  --shadow-md: 0 14px 36px rgba(44, 34, 18, 0.07), 0 4px 12px rgba(44, 34, 18, 0.04);
  --shadow-lg: 0 24px 56px rgba(44, 34, 18, 0.08);
  --shadow-focus: 0 0 0 3px rgba(15, 118, 110, 0.22);

  /* ── Spacing scale ────────────────────────────────────────────── */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4.5rem;

  /* ── Type scale ───────────────────────────────────────────────── *
   * Reference values for component-level overrides. Existing h1–h4
   * retain their explicit sizes for now; future slices can migrate
   * them to use these tokens for consistency. */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-md: 1.125rem;    /* 18px */
  --text-lg: 1.25rem;     /* 20px */
  --text-xl: 1.5rem;      /* 24px */
  --text-2xl: 1.875rem;   /* 30px */
  --text-3xl: 2.25rem;    /* 36px */
  --text-4xl: 3rem;       /* 48px */
  --text-5xl: 3.75rem;    /* 60px */

  /* ── Layout: max widths ───────────────────────────────────────── */
  --text-max: 64ch;
  --content-max: 1180px;
  --content-narrow: 960px;

  /* ── Radius: 4 levels (Slice 1 fix — was md=lg=8px) ───────────── */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 14px;       /* was 8px — depth distinction restored */
  --radius-xl: 20px;       /* new — for hero/feature cards */

  /* ── Header ───────────────────────────────────────────────────── */
  --header-height: 4.75rem;

  /* ── Motion ───────────────────────────────────────────────────── */
  --motion-fast: 160ms ease;
  --motion-base: 220ms ease;
  --motion-slow: 380ms ease;
  --motion-reveal: 480ms cubic-bezier(0.16, 1, 0.3, 1);  /* scroll-reveal entry */
  --motion-float: 4s ease-in-out infinite;               /* hero card hover */

  /* ── Z-index scale ────────────────────────────────────────────── *
   * Use these tokens instead of arbitrary numbers so stacking order
   * is intentional and traceable. */
  --z-base: 0;
  --z-raise: 10;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 300;
  --z-toast: 400;

  /* ── Breakpoints (JS-readable reference, not in @media) ───────── *
   * @media queries still use literal px values (CSS limitation). These
   * are exposed as custom props so JS can read them via
   * getComputedStyle to keep breakpoints in sync. */
  --bp-sm: 480px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.07) 0 1px, transparent 1px 12px),
    linear-gradient(180deg, #f7faf6 0%, var(--bg-canvas) 48%, #edf5f0 100%);
  color: var(--text-primary);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl {
  margin: 0;
}

ul,
ol {
  padding-left: 1.25rem;
}

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h1 {
  font-size: 2.75rem;
  font-weight: 650;
}

h2 {
  font-size: 2rem;
  font-weight: 620;
}

h3 {
  font-size: 1.25rem;
  font-weight: 620;
}

p {
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

strong {
  color: var(--text-primary);
}

.copy-en,
.copy-inline-en {
  display: none;
}

html[lang="en"] .copy-vi,
html[lang="en"] .copy-inline-vi {
  display: none;
}

html[lang="en"] .copy-en {
  display: block;
}

html[lang="en"] .copy-inline-en {
  display: inline;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -999px;
  z-index: 200;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: var(--accent-primary);
  color: var(--text-inverse);
}

.skip-link:focus {
  top: 1rem;
}

@media (max-width: 719px) {
  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.65rem;
  }
}
.site-main {
  padding-bottom: var(--space-3xl);
}

.container {
  width: min(100%, var(--content-max));
  margin-inline: auto;
  padding-inline: 1rem;
}

.container-narrow {
  width: min(100%, var(--content-narrow));
  margin-inline: auto;
  padding-inline: 1rem;
}

.section {
  padding-block: var(--space-2xl);
  border-top: 1px solid var(--line-soft);
}

.section:first-child {
  border-top: 0;
  padding-top: var(--space-xl);
}

.hero-grid,
.split-grid,
.grid-two,
.grid-three,
.grid-four {
  display: grid;
  gap: var(--space-lg);
}

.hero-grid > *,
.split-grid > *,
.grid-two > *,
.grid-three > *,
.grid-four > * {
  min-width: 0;
}

.stack-sm,
.stack-md,
.stack-lg {
  display: grid;
}

.stack-sm {
  gap: var(--space-sm);
}

.stack-md {
  gap: var(--space-md);
}

.stack-lg {
  gap: var(--space-lg);
}

.flow > * + * {
  margin-top: var(--space-md);
}

.section-heading {
  display: grid;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  max-width: var(--text-max);
}

.section-heading .lede,
.hero-copy .lede {
  max-width: var(--text-max);
}

.hero-grid {
  align-items: start;
}

.grid-two,
.split-grid,
.grid-three,
.grid-four {
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .container,
  .container-narrow {
    padding-inline: 1.5rem;
  }

  .grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.9fr);
    gap: var(--space-2xl);
  }

  .split-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: var(--space-2xl);
  }

  .grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 241, 231, 0.94);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(12px);
  /* Slice 5: smooth transition between rest and scrolled state. */
  transition:
    box-shadow var(--motion-fast),
    border-color var(--motion-fast),
    background var(--motion-fast);
}

/* Slice 5: scrolled state engaged when window.scrollY > 40 (see
 * bindHeaderScrollState in public-shell.js). Adds depth so users
 * have a clear visual signal the page has scrolled past the hero. */
.site-header[data-scrolled="true"] {
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--line-default);
  background: rgba(246, 241, 231, 0.985);
}

.header-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.65rem, 2vw, 1.25rem);
  flex-wrap: nowrap;
  padding-block: 0.65rem;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  flex: 1 1 auto;
  max-width: min(42vw, 26rem);
}

.brand-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  flex: 0 0 auto;
  border-radius: 1rem;
  color: var(--accent-strong);
  background:
    radial-gradient(circle at 30% 30%, rgba(184, 93, 58, 0.22), transparent 36%),
    linear-gradient(135deg, rgba(212, 232, 226, 0.95), rgba(246, 241, 231, 0.9));
  border: 1px solid rgba(120, 147, 139, 0.32);
  box-shadow: 0 12px 30px rgba(44, 61, 55, 0.08);
}

.brand-symbol svg {
  width: 1.45rem;
  height: 1.45rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-symbol circle {
  fill: var(--accent-warm);
  stroke: none;
}

.brand-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.brand-mark {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-subline {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition:
    background var(--motion-fast),
    color var(--motion-fast),
    border-color var(--motion-fast);
}

.nav-link:hover,
.nav-link:focus-visible {
  background: var(--bg-surface);
  color: var(--text-primary);
  outline: none;
}

.nav-link.is-active {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: nowrap;
  min-width: 0;
  margin-left: auto;
}

.account-state {
  display: none;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.account-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--line-soft);
  color: var(--text-secondary);
  font-size: 0.95rem;
  min-width: 0;
  max-width: min(18rem, 32vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
}

.lang-switch button {
  border: 0;
  background: transparent;
  min-width: 3rem;
  min-height: 2.25rem;
  padding: 0.45rem 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--motion-fast), color var(--motion-fast);
}

.lang-switch button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

.mobile-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
  white-space: nowrap;
}

.hamburger-icon {
  display: inline-grid;
  gap: 0.22rem;
  width: 1.05rem;
  flex: 0 0 auto;
}

.hamburger-icon span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition:
    transform var(--motion-fast),
    opacity var(--motion-fast);
}

.mobile-toggle[data-mobile-toggle="open"] .hamburger-icon span:nth-child(1) {
  transform: translateY(0.36rem) rotate(42deg);
}

.mobile-toggle[data-mobile-toggle="open"] .hamburger-icon span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle[data-mobile-toggle="open"] .hamburger-icon span:nth-child(3) {
  transform: translateY(-0.36rem) rotate(-42deg);
}

.mobile-panel {
  border-top: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(246, 241, 231, 0.98)),
    var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.mobile-panel[hidden] {
  display: none;
}

.mobile-panel-inner {
  padding-block: 0.85rem 1rem;
  display: grid;
  gap: 0.35rem;
}

.mobile-panel .nav-link {
  min-height: 2.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid transparent;
}

.hero {
  padding: var(--space-2xl);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
}

.hero-copy {
  display: grid;
  gap: var(--space-md);
  min-width: 0;
}

.eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-strong);
}

.lede {
  font-size: 1.05rem;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-aside,
.surface,
.card,
.route-card,
.summary-block,
.form-card,
.info-list li,
.step-list li {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
}

.hero-aside,
.surface,
.summary-block,
.form-card {
  padding: var(--space-lg);
  min-width: 0;
}

.card,
.route-card {
  padding: 1.25rem;
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

.card-media {
  display: block;
  margin: -1.25rem -1.25rem 0.15rem;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--bg-muted);
}

.card-media img,
.route-media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.95) contrast(1.04);
}

.route-media-section {
  padding-block: var(--space-xl);
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.05), rgba(184, 93, 58, 0.04)),
    rgba(255, 255, 255, 0.22);
}

.route-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: var(--space-lg);
}

.route-media-card {
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(120, 147, 139, 0.34);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  box-shadow: 0 18px 44px rgba(16, 43, 44, 0.08);
}

.route-media-section[data-route-media-count="1"] .route-media-card {
  aspect-ratio: 21 / 9;
}

.card-kicker,
.meta-line,
.status-line {
  font-size: 0.92rem;
  color: var(--text-tertiary);
}

.status-line.is-success {
  color: var(--state-success);
}

.status-line.is-warning {
  color: var(--state-warning);
}

.status-line.is-error {
  color: var(--state-error);
}

.status-badge,
.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.85rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line-default);
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.button,
.button-ghost,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-default);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
  line-height: 1.35;
  transition:
    background var(--motion-fast),
    border-color var(--motion-fast),
    color var(--motion-fast),
    transform var(--motion-fast);
}

/* Slice 4: subtle depth feedback on button hover. Shadow uses --shadow-sm
 * (lighter than the card --shadow-md) so buttons stay visually quieter
 * than card lift. Focus-visible adds --shadow-focus ring on top. */
.button:hover,
.button-ghost:hover,
.button-link:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  outline: none;
}

.button:focus-visible,
.button-ghost:focus-visible,
.button-link:focus-visible {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm), var(--shadow-focus);
  outline: none;
}

.button-primary {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--text-inverse);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.button-ghost {
  background: transparent;
}

.header-actions .button-ghost,
.account-state .button-ghost {
  flex: 0 0 auto;
  white-space: nowrap;
  overflow-wrap: normal;
  text-align: center;
}

.account-state > * {
  min-width: 0;
}

.button[disabled],
.button-primary[disabled],
.button-ghost[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.button-link {
  border-color: transparent;
  padding-inline: 0;
  min-height: auto;
  background: transparent;
  color: var(--accent-strong);
  justify-content: flex-start;
}

.nav-link,
.account-pill,
.status-badge,
.tag,
.footer-copy,
.footer-list a {
  overflow-wrap: anywhere;
}

.feature-list,
.info-list,
.step-list,
.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list {
  display: grid;
  gap: 0.75rem;
}

.feature-list li {
  display: grid;
  gap: 0.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line-soft);
}

.feature-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.step-list {
  display: grid;
  gap: 0.75rem;
}

.step-list li {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1rem 1rem 3rem;
  position: relative;
}

.step-list li::before {
  content: attr(data-step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
}

.section-band {
  background: var(--bg-surface);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

/* Slice 7: subtle teal radial-gradient overlay for sections that represent
 * the ecosystem / platform map. Composited over --bg-surface so it stays
 * readable in both light and (future) dark modes. */
/* ── Slice 6: SVG icon system ────────────────────────────────────────────────
 * Icons are inline SVG <use> references pointing to #icon-NAME symbols
 * loaded via /assets/icons.svg (injected into <body> by public-shell.js).
 * .icon inherits color so it follows text and accent color automatically. */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.12em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

/* Card kickers: icon sits left of the text label */
.card-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.card-kicker .icon {
  width: 1.15em;
  height: 1.15em;
  color: var(--accent-strong);
  opacity: 0.9;
}

/* Route-card icon badge above the heading */
.route-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent-strong);
  margin-bottom: 0.25rem;
}

.route-card-icon .icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Nav link icons */
.nav-link .icon {
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.25em;
  opacity: 0.65;
  transition: opacity var(--motion-fast);
}

.nav-link:hover .icon,
.nav-link.is-active .icon {
  opacity: 1;
}

.section-tint {
  background:
    radial-gradient(ellipse at 68% 38%, rgba(15, 118, 110, 0.09) 0%, transparent 58%),
    radial-gradient(ellipse at 22% 72%, rgba(15, 118, 110, 0.06) 0%, transparent 46%),
    var(--bg-surface);
  border-color: rgba(15, 118, 110, 0.13);
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--space-lg);
  color: var(--text-tertiary);
  font-size: 0.92rem;
}

.breadcrumb-current {
  color: var(--text-secondary);
}

.site-footer {
  background: var(--bg-inverse);
  color: var(--text-inverse);
  margin-top: var(--space-3xl);
}

.footer-inner {
  padding-block: var(--space-2xl);
  display: grid;
  gap: var(--space-xl);
}

.footer-grid {
  display: grid;
  gap: var(--space-lg);
}

.footer-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-inverse);
  margin-bottom: 0.5rem;
}

.footer-copy {
  color: rgba(250, 247, 241, 0.74);
  max-width: 48ch;
}

.footer-list li + li {
  margin-top: 0.5rem;
}

.footer-list a {
  color: rgba(250, 247, 241, 0.82);
}

.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(250, 247, 241, 0.14);
  color: rgba(250, 247, 241, 0.58);
  font-size: 0.92rem;
}

.auth-shell {
  display: grid;
  gap: var(--space-lg);
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.auth-status {
  min-height: 1.5rem;
}

.catalog-list,
.lesson-list {
  display: grid;
  gap: 0.75rem;
}

.catalog-card {
  width: 100%;
  appearance: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color var(--motion-fast),
    background var(--motion-fast),
    transform var(--motion-fast),
    box-shadow var(--motion-fast);
}

.catalog-card:hover,
.catalog-card:focus-visible {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  outline: none;
}

.catalog-card.is-active {
  border-color: var(--accent-primary);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-primary) 55%, transparent);
}

.catalog-card-heading,
.lesson-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.lesson-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
}

.proof-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line-default);
  color: var(--text-secondary);
  font-size: 0.82rem;
  background: var(--bg-surface);
}

.proof-badge.is-pending {
  color: var(--state-warning);
}

.proof-badge.is-confirmed {
  color: var(--state-success);
}

.proof-badge.is-rejected,
.proof-badge.is-error {
  color: var(--state-error);
}

.helper-note {
  font-size: 0.92rem;
  color: var(--text-tertiary);
}

@media (min-width: 960px) {
  .header-inner {
    padding-block: 0;
  }

  .nav-desktop {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .mobile-panel-inner {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    padding-block: 1rem 1.15rem;
  }

  .mobile-panel .nav-link {
    justify-content: flex-start;
    border-color: rgba(120, 147, 139, 0.16);
    background: rgba(255, 255, 255, 0.42);
  }

  .account-state {
    display: flex;
    flex-wrap: nowrap;
  }

  .header-actions {
    flex-wrap: nowrap;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 0.7fr));
  }
}
.field-grid {
  display: grid;
  gap: var(--space-md);
}

.field-row {
  display: grid;
  gap: var(--space-md);
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field label,
.field legend {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-default);
  border-radius: var(--radius-md);
  background: #fffdfa;
  color: var(--text-primary);
  padding: 0.8rem 0.9rem;
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast);
}

.field textarea {
  min-height: 10rem;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(31, 106, 114, 0.12);
}

.field-hint {
  font-size: 0.92rem;
  color: var(--text-tertiary);
}

.turnstile-slot {
  min-height: 4.5rem;
}

.form-feedback {
  min-height: 1.5rem;
  font-size: 0.95rem;
}

.form-feedback.is-success {
  color: var(--state-success);
}

.form-feedback.is-error {
  color: var(--state-error);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .field-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.muted {
  color: var(--text-tertiary);
}

.text-max {
  max-width: var(--text-max);
}

.surface-muted {
  background: var(--bg-muted);
}

.inverse-copy {
  color: var(--text-inverse);
}

.chat-log {
  display: grid;
  gap: var(--space-sm);
  max-height: 24rem;
  min-height: 18rem;
  overflow: auto;
  padding: var(--space-md);
  border: 1px solid var(--line-default);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
}

.chat-row {
  display: grid;
  gap: 0.3rem;
}

.chat-role {
  color: var(--text-tertiary);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.chat-bubble {
  color: var(--text-primary);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  padding: 0.75rem 0.85rem;
  white-space: pre-wrap;
}

.chat-input {
  width: 100%;
  min-height: 8rem;
  border: 1px solid var(--line-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  padding: 0.8rem 0.9rem;
  resize: vertical;
}

.chat-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(31, 106, 114, 0.12);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Duplicate .site-header block removed in Slice 5b — shadow and background
 * are now owned exclusively by the Slice 5 definition above (~line 353)
 * which applies box-shadow only when [data-scrolled="true"] is set. */

.brand-mark {
  display: block;
}

.brand-mark::before {
  content: none;
}

.section {
  border-top-color: rgba(120, 147, 139, 0.2);
}

.section-band {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(232, 240, 231, 0.9)),
    var(--bg-surface);
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(232, 240, 231, 0.76)),
    var(--bg-surface);
  border-color: rgba(120, 147, 139, 0.32);
  box-shadow: var(--shadow-lg);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -12% -42% 18%;
  height: 62%;
  background:
    linear-gradient(90deg, transparent, rgba(15, 118, 110, 0.16), rgba(184, 93, 58, 0.12), transparent);
  transform: rotate(-3deg);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 4.75rem);
  line-height: 1.02;
  max-width: 12ch;
}

.hero-copy .lede {
  font-size: clamp(1.05rem, 1.6vw, 1.24rem);
}

body[data-page-key="home"] .hero h1 {
  max-width: 15ch;
}

body[data-page-key="home"] .hero > .hero-aside > .feature-list {
  display: none;
}

body[data-page-key="home"] .hero .visual-image-wrap {
  aspect-ratio: 16 / 9;
}

.hero-aside,
.surface,
.card,
.route-card,
.summary-block,
.form-card,
.info-list li,
.step-list li {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 44px rgba(16, 43, 44, 0.07);
}

.hero-visual-card {
  display: grid;
  gap: 0.7rem;
  margin: 0 0 var(--space-md);
  padding: 0.55rem;
  border: 1px solid rgba(120, 147, 139, 0.34);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 48px rgba(16, 43, 44, 0.12);
}

.visual-image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  isolation: isolate;
}

.visual-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.96) contrast(1.04);
  transform: scale(1.01);
}

.visual-tint {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(16, 43, 44, 0.06), rgba(16, 43, 44, 0.34)),
    linear-gradient(90deg, rgba(15, 118, 110, 0.24), transparent 56%);
}

.system-map {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.95;
}

.system-map::before,
.system-map::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 14%;
  top: 28%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.72), rgba(255,255,255,0));
  transform: rotate(17deg);
}

.system-map::after {
  top: 58%;
  transform: rotate(-14deg);
  opacity: 0.75;
}

.system-map span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 0.68rem;
  height: 0.68rem;
  border-radius: 999px;
  background: #ffffff;
  box-shadow:
    0 0 0 0.38rem rgba(255, 255, 255, 0.16),
    0 0 1.4rem rgba(255, 255, 255, 0.55);
  animation: nodePulse 2.4s ease-in-out infinite;
  animation-delay: var(--delay);
}

.visual-caption {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.45;
}

.card,
.route-card,
.surface,
.step-list li {
  transition:
    transform var(--motion-base),
    box-shadow var(--motion-base),
    border-color var(--motion-base),
    background var(--motion-base);
}

/* Slice 4: card hover & focus parity. Lift increased -3 → -4px; shadow
 * uses the Slice-1 `--shadow-md` token so future shadow-tone tweaks
 * propagate everywhere. `:focus-visible` mirrors `:hover` (visual
 * affordance for keyboard users) plus adds the `--shadow-focus` ring. */
.card:hover,
.card:focus-visible,
.route-card:hover,
.route-card:focus-visible,
.surface:hover,
.surface:focus-visible,
.step-list li:hover,
.step-list li:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: var(--shadow-md);
  outline: none;
}

.card:focus-visible,
.route-card:focus-visible,
.surface:focus-visible,
.step-list li:focus-visible {
  box-shadow: var(--shadow-md), var(--shadow-focus);
}

.card-kicker,
.eyebrow {
  letter-spacing: 0;
}

.button-primary {
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.18);
}

.button:not(.button-primary):hover,
.button-ghost:hover,
.button-link:hover {
  color: var(--accent-strong);
}

.motion-reveal {
  opacity: 0;
  transform: translateY(16px);
  /* Slice 3: switch to --motion-reveal token (480ms cubic-bezier "outBack-ish")
   * for a softer settle than the previous flat ease. Hover/focus transitions
   * still use --motion-base so component micro-interactions stay snappy. */
  transition:
    opacity var(--motion-reveal),
    transform var(--motion-reveal),
    box-shadow var(--motion-base),
    border-color var(--motion-base),
    background var(--motion-base);
  transition-delay: var(--reveal-delay, 0ms);
}

.motion-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 99 Cuts launch surface */
.section-cuts-intro .container-narrow,
.section-cuts-messages .container-narrow,
.section-cuts-cta .container-narrow {
  width: min(100%, 44rem);
}

.section-cuts-intro h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 620;
  color: var(--text-primary);
}

.cuts-subtitle {
  color: var(--text-primary);
  font-size: 1.12rem;
  line-height: 1.75;
}

.cuts-product-note {
  display: grid;
  gap: 0.45rem;
}

.cuts-product-note p {
  color: var(--text-secondary);
}

.cuts-messages {
  display: grid;
  gap: 1.25rem;
}

.cuts-message {
  margin: 0;
  max-width: 44ch;
  font-family: "Iowan Old Style", "Times New Roman", Georgia, serif;
  font-size: clamp(1.14rem, 2.8vw, 1.4rem);
  line-height: 1.8;
  color: var(--text-primary);
}

.cuts-closing {
  display: grid;
  gap: 0.5rem;
}

.cuts-closing p {
  color: var(--text-primary);
}

.cuts-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@keyframes nodePulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0.72;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.18);
    opacity: 1;
  }
}

@media (min-width: 960px) {
  .hero-aside {
    align-self: stretch;
  }

  .hero-visual-card {
    margin-bottom: var(--space-lg);
  }
}

@media (max-width: 719px) {
  .hero {
    padding: var(--space-lg);
  }

  .hero h1 {
    max-width: 100%;
  }

  .visual-image-wrap {
    aspect-ratio: 16 / 10;
  }
}

/* Slice 5: hero summary-block floating motion. Desktop-only so phone
 * users (who don't have hover state to anchor against) aren't distracted.
 * The global @media (prefers-reduced-motion: reduce) below neutralizes
 * the animation-duration to 0.001ms for users who prefer reduced motion. */
@keyframes floatCard {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@media (min-width: 1024px) {
  .hero-aside .summary-block {
    animation: floatCard var(--motion-float);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .motion-reveal {
    opacity: 1;
    transform: none;
  }
}
