@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700;800&family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
  --bg: #0b0c10;
  --surface: #12141a;
  --surface-soft: #1a1d24;
  --surface-accent: #d7ff2f;
  --text: #f3f0e8;
  --muted: #8b92a5;
  --side-label: #ffffff;
  --side-copy: #c4cad7;
  --line: #2b2f3a;
  --accent: #d7ff2f;
  --accent-strong: #b9df23;
  --link-fill: #d7ff2f;
  --link-fill-hover: #b9df23;
  --link-fill-text: #0d0d0b;
  --interaction-fill: #d7ff2f;
  --interaction-fill-text: #0b0c10;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --radius-lg: 0;
  --radius-md: 0;
  --radius-sm: 0;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 72px;
  --topbar-height: 92px;
  --topbar-offset-x: 40px;
  --topbar-top-gap: 14px;
  --header-glass-bg: rgb(25 23 25 / 0.88);
  --header-glass-border: rgb(255 255 255 / 0.08);
  --header-glass-blur: blur(20px) saturate(1.2);
  --header-glass-noise-opacity: 0.06;
  --header-glass-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --popup-panel-bg: #12141a;
  --popup-backdrop-bg: rgb(5 6 9 / 0.82);
  --menu-enter-duration: 240ms;
  --menu-item-duration: 220ms;
  --menu-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --popup-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="light"] {
  --bg: #f4f0e7;
  --surface: #f4f0e7;
  --surface-soft: #ebe4d8;
  --surface-accent: #a6a29a;
  --text: #2f2b25;
  --muted: #6a645a;
  --side-label: #2f2b25;
  --side-copy: #514a40;
  --line: #c8bfaf;
  --accent: #8e887e;
  --accent-strong: #787267;
  --link-fill: #d7ff2f;
  --link-fill-hover: #b9df23;
  --link-fill-text: #0d0d0b;
  --interaction-fill: #d7ff2f;
  --interaction-fill-text: #0d0d0b;
  --light-primary-bg: #1f1d19;
  --light-primary-text: #f7f4ee;
  --header-glass-bg: rgb(255 255 255 / 0.52);
  --header-glass-border: rgb(255 255 255 / 0.55);
  --header-glass-blur: blur(20px) saturate(1.45);
  --header-glass-noise-opacity: 0.09;
  --popup-panel-bg: #fffaf1;
  --popup-backdrop-bg: rgb(47 43 37 / 0.58);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(circle at top right, rgba(215, 255, 47, 0.05), transparent 600px);
  color: var(--text);
  font-family: 'Source Serif 4', Georgia, serif;
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: calc(var(--topbar-height) + var(--topbar-top-gap) + env(safe-area-inset-top, 0px) + 18px);
}

h1, h2, h3, h4, h5, h6, section, .section-block {
  scroll-margin-top: calc(var(--topbar-height) + var(--topbar-top-gap) + 40px);
}

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

main p a,
main li a,
main .section-copy a,
main .hero-copy a,
main .level-status a,
main .survey-copy a,
main .survey-status a,
main .muted a,
main p a:visited,
main li a:visited,
main .section-copy a:visited,
main .hero-copy a:visited,
main .level-status a:visited,
main .survey-copy a:visited,
main .survey-status a:visited,
main .muted a:visited {
  display: inline-block;
  padding: 0 6px;
  background: var(--link-fill);
  color: var(--link-fill-text);
}

main p a:hover,
main p a:focus-visible,
main li a:hover,
main li a:focus-visible,
main .section-copy a:hover,
main .section-copy a:focus-visible,
main .hero-copy a:hover,
main .hero-copy a:focus-visible,
main .level-status a:hover,
main .level-status a:focus-visible,
main .survey-copy a:hover,
main .survey-copy a:focus-visible,
main .survey-status a:hover,
main .survey-status a:focus-visible,
main .muted a:hover,
main .muted a:focus-visible {
  background: var(--link-fill-hover);
  color: var(--link-fill-text);
  outline: none;
}

:root[data-theme="light"] main p a,
:root[data-theme="light"] main li a,
:root[data-theme="light"] main .section-copy a,
:root[data-theme="light"] main .hero-copy a,
:root[data-theme="light"] main .level-status a,
:root[data-theme="light"] main .survey-copy a,
:root[data-theme="light"] main .survey-status a,
:root[data-theme="light"] main .muted a,
:root[data-theme="light"] main p a:visited,
:root[data-theme="light"] main li a:visited,
:root[data-theme="light"] main .section-copy a:visited,
:root[data-theme="light"] main .hero-copy a:visited,
:root[data-theme="light"] main .level-status a:visited,
:root[data-theme="light"] main .survey-copy a:visited,
:root[data-theme="light"] main .survey-status a:visited,
:root[data-theme="light"] main .muted a:visited {
  background: var(--link-fill);
  color: var(--link-fill-text);
}

:root[data-theme="light"] main p a:hover,
:root[data-theme="light"] main p a:focus-visible,
:root[data-theme="light"] main li a:hover,
:root[data-theme="light"] main li a:focus-visible,
:root[data-theme="light"] main .section-copy a:hover,
:root[data-theme="light"] main .section-copy a:focus-visible,
:root[data-theme="light"] main .hero-copy a:hover,
:root[data-theme="light"] main .hero-copy a:focus-visible,
:root[data-theme="light"] main .level-status a:hover,
:root[data-theme="light"] main .level-status a:focus-visible,
:root[data-theme="light"] main .survey-copy a:hover,
:root[data-theme="light"] main .survey-copy a:focus-visible,
:root[data-theme="light"] main .survey-status a:hover,
:root[data-theme="light"] main .survey-status a:focus-visible,
:root[data-theme="light"] main .muted a:hover,
:root[data-theme="light"] main .muted a:focus-visible {
  background: var(--link-fill-hover);
  color: var(--link-fill-text);
}
p, li { max-width: 72ch; }
img { max-width: 100%; height: auto; }

main,
section,
article,
aside,
.hero-copy-block,
.section-heading,
.list-body,
.list-side,
.chapter-main,
.lesson-card,
.quiz-question {
  min-width: 0;
}

.page-shell {
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 0 20px 80px;
}

.topbar {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + var(--topbar-top-gap));
  left: max(env(safe-area-inset-left, 0px), var(--topbar-offset-x));
  right: max(env(safe-area-inset-right, 0px), var(--topbar-offset-x));
  z-index: 80;
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: center;
  min-height: var(--topbar-height);
  padding: 13px 27px 19px 33px;
  border: 1px solid var(--header-glass-border);
  border-radius: 52px;
  background: var(--header-glass-bg);
  -webkit-backdrop-filter: var(--header-glass-blur);
  backdrop-filter: var(--header-glass-blur);
  /* No isolation: isolate here — it makes .topbar a backdrop root clipped to
     the header box, which kills the dropdown menu's backdrop-filter (the menu
     overflows below the box). z-index already gives a stacking context. */
  transition: background .35s ease, border-color .35s ease;
}

.topbar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: var(--header-glass-noise-opacity);
  mix-blend-mode: overlay;
  background-image: var(--header-glass-noise);
  background-repeat: repeat;
  background-size: 128px 128px;
}

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

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .topbar {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  :root[data-theme="light"] .topbar {
    background: rgb(255 255 255 / 0.94);
  }

  :root:not([data-theme="light"]) .topbar {
    background: #191719;
  }
}

.brand,
.lesson-label,
.eyebrow,
.button,
.topbar nav,
.text-link,
.survey-legend,
.survey-label,
.manifesto-kicker,
.list-index,
.list-meta,
.tag {
  font-family: 'Space Grotesk', Arial, sans-serif;
}

.brand {
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1;
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex: 0 0 auto;
}

:root[data-theme="light"] .brand-logo {
  opacity: 0.8;
}

.brand-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 30ch;
}

.brand-block {
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  align-self: center;
  justify-content: flex-start;
  gap: 14px;
  transform: translateY(2px);
}

.nav-toggle {
  display: none;
  width: 32px;
  height: 24px;
  padding: 0;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--accent);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: currentColor;
  border-radius: 999px;
}

.site-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 8px;
  background: transparent;
  color: inherit;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
  outline: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-family: 'Space Grotesk', Arial, sans-serif;
  letter-spacing: 0.06em;
  text-align: left;
}

.theme-toggle-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.theme-toggle-title,
.theme-toggle-option {
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 700;
}

.theme-toggle-status {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.theme-toggle-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  width: 128px;
  min-width: 128px;
  padding: 4px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.theme-toggle-option {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  color: var(--muted);
  transition: color 160ms ease;
}

.theme-toggle-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: #ffffff;
  border: 1px solid var(--line);
  transition: transform 180ms ease;
}

.theme-toggle[data-theme='light'] .theme-toggle-thumb {
  transform: translateX(100%);
}

.theme-toggle[data-theme='dark'] .theme-toggle-option:first-child,
.theme-toggle[data-theme='light'] .theme-toggle-option:last-of-type {
  color: #09090b;
}

.theme-toggle:hover .theme-toggle-status,
.theme-toggle:focus-visible .theme-toggle-status,
.brand:hover {
  color: var(--accent);
  outline: none;
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

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

.subscribe-copy-block {
  gap: var(--space-3);
}

.subscribe-bullets {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.subscribe-panel {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
  border-left: 0;
  padding-left: 0;
}

.subscribe-panel-title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.05;
}

.subscribe-panel-copy {
  margin: 0;
  color: var(--muted);
}

.subscribe-form {
  display: grid;
  gap: var(--space-3);
}

.subscribe-field {
  display: grid;
  gap: 8px;
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.subscribe-field input {
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1rem;
}

.subscribe-field input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.subscribe-optional {
  color: var(--muted);
  font-size: 0.72rem;
}

.subscribe-submit {
  justify-content: center;
}

.button.primary.subscribe-submit,
:root[data-theme] .button.primary.subscribe-submit {
  background: #fde047;
  border-color: #fde047;
  color: #0d0d0b;
}

.button.primary.subscribe-submit:hover,
.button.primary.subscribe-submit:focus-visible,
:root[data-theme] .button.primary.subscribe-submit:hover,
:root[data-theme] .button.primary.subscribe-submit:focus-visible {
  background: #facc15;
  border-color: #facc15;
  color: #0d0d0b;
}

.subscribe-submit[disabled] {
  opacity: 0.65;
  cursor: wait;
}

.subscribe-status {
  margin: 0;
  min-height: 1.6em;
  color: var(--muted);
}

.subscribe-status[data-tone='success'] {
  color: var(--accent);
}

.subscribe-status[data-tone='error'] {
  color: #ff8f7a;
}

.subscribe-status[data-tone='pending'] {
  color: var(--text);
}

.subscribe-popup {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  justify-items: stretch;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms var(--popup-ease);
}

.subscribe-popup[hidden] {
  display: none;
}

.subscribe-popup.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.subscribe-popup-backdrop {
  position: absolute;
  inset: 0;
  background: var(--popup-backdrop-bg);
  opacity: 0;
  transition: opacity 420ms var(--popup-ease);
}

.subscribe-popup.is-visible .subscribe-popup-backdrop {
  opacity: 1;
}

.subscribe-popup-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  justify-self: center;
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(28px) scale(0.965);
  transform-origin: center bottom;
  transition:
    opacity 420ms var(--popup-ease),
    transform 520ms var(--popup-ease);
  will-change: opacity, transform;
}

.subscribe-popup.is-visible .subscribe-popup-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.button.secondary.subscribe-popup-close {
  width: 100%;
  margin-top: -4px;
  border-color: var(--accent);
  background: #0d0d0b;
  color: #ffffff;
}

.button.secondary.subscribe-popup-close:hover,
.button.secondary.subscribe-popup-close:focus-visible {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #ffffff;
}

.subscribe-popup-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .subscribe-hero {
    gap: var(--space-4);
  }
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.7fr);
  gap: var(--space-5);
  align-items: end;
  padding: 34px 0 18px;
}

.hero--editorial {
  min-height: min(78vh, 860px);
}

.hero--compact {
  min-height: auto;
}

.hero h1,
.chapter-page-title {
  margin: 0;
  font-size: clamp(3.8rem, 9vw, 8.8rem);
  line-height: 0.92;
  font-weight: 600;
  letter-spacing: -0.06em;
  max-width: 10ch;
}

.chapter-page-title {
  max-width: 12ch;
}

.hero-copy,
.section-copy,
.chapter-summary,
.survey-copy,
.survey-status,
.muted,
.brand-note {
  color: var(--muted);
}

.section-copy {
  font-family: 'Space Grotesk', Arial, sans-serif;
}

.section-copy--display {
  grid-column: 1 / -1;
  margin: -20px 0 0;
  color: var(--text);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(3.8rem, 9vw, 8.8rem);
  line-height: 0.92;
  font-weight: 600;
  letter-spacing: -0.06em;
  max-width: 10ch;
}

.hero-copy {
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  margin-top: 20px;
  max-width: 38ch;
}

.hero-inline-image {
  display: block;
  width: min(100%, 720px);
  margin-top: 26px;
  border: 1px solid color-mix(in srgb, var(--line) 20%, transparent);
}

.hero-panel,
.chapter-sidebar,
.lesson-carousel-shell,
.recap-card,
.checkpoint-card,
.quiz-card,
.sources-card,
.next-step-card,
.survey-card,
.tip-box,
.lesson-block--example,
.lesson-remember {
  background: transparent;
  border: 0;
  border-left: 3px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  padding-left: 18px;
}

.hero-panel.subscribe-panel {
  border-left: 0;
  padding-left: 0;
}

.hero-panel.subscribe-popup-panel {
  padding: 28px;
  background: var(--popup-panel-bg);
}

.hero-panel--manifesto {
  align-self: start;
  margin-top: 36px;
}

.manifesto-kicker {
  margin: 0 0 16px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

.manifesto-line {
  margin: 0 0 10px;
  font-size: clamp(1.4rem, 2.3vw, 2rem);
  line-height: 1.1;
  max-width: 18ch;
}

.manifesto-line--accent {
  color: var(--accent);
}

.hero-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

/* Course map button at the top of each chapter page, under the header. */
.chapter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
}

.chapter-actions > .button {
  flex: 0 0 auto;
  width: auto;
}

/* Single download control with dropdown (this chapter / level / whole course). */
.download-menu {
  position: relative;
  flex: 0 0 auto;
}

.download-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.download-menu-caret {
  font-size: 0.85em;
  line-height: 1;
}

.download-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: #ffffff;
  border: 2px solid var(--line);
  border-radius: 16px;
  box-shadow: 4px 4px 0 0 var(--accent);
}

.download-menu-list[hidden] {
  display: none;
}

.download-menu-item {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #09090b;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.download-menu-item:hover,
.download-menu-item:focus-visible {
  background: #f1f1f3;
  color: #09090b;
}

/* Keep the three CTAs on one row above the mobile breakpoint. */
.hero-actions > .button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.level-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.ai-design-options {
  grid-template-columns: minmax(0, 1fr);
}

.ai-design-options .level-option {
  min-height: 180px;
  align-content: center;
}

.assessment-list {
  display: grid;
  gap: 0;
}

.assessment-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 20px;
  padding: 18px 0;
  border-top: 0;
}

.assessment-row:last-child {
  border-bottom: 0;
}

.assessment-index {
  color: var(--accent);
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 4px;
}

.assessment-body h3 {
  margin: 0 0 12px;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.assessment-options,
.assessment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.assessment-actions {
  margin-top: 18px;
}

.assessment-option {
  min-width: 96px;
  min-height: 42px;
  padding: 0 14px;
  border: 2px solid var(--line);
  background:
    linear-gradient(135deg, var(--interaction-fill) 0 46%, transparent 58%) left top / 0% 100% no-repeat,
    transparent;
  color: var(--text);
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background-size 220ms ease, border-color 180ms ease, color 180ms ease;
}

.assessment-option--active,
.assessment-option:hover,
.assessment-option:focus-visible {
  border-color: var(--accent);
  color: var(--interaction-fill-text);
  background-size: 220% 100%, auto;
  outline: none;
}

.level-option {
  display: grid;
  gap: 8px;
  text-align: left;
  min-height: 120px;
  padding: 16px 18px;
  border: 2px solid var(--line);
  background:
    linear-gradient(135deg, var(--interaction-fill) 0 46%, transparent 58%) left top / 0% 100% no-repeat,
    transparent;
  color: var(--text);
  border-radius: 0;
  transition: background-size 240ms ease, border-color 180ms ease, color 180ms ease;
}

.level-option:hover,
.level-option:focus-visible {
  border-color: var(--accent);
  background-size: 220% 100%, auto;
  outline: none;
}

.level-option--active {
  border-color: var(--accent);
  background-size: 220% 100%, auto;
  color: var(--interaction-fill-text);
}

a.level-option {
  background: var(--link-fill);
  border-color: var(--link-fill);
  color: var(--link-fill-text);
}

a.level-option:visited {
  color: var(--link-fill-text);
}

a.level-option:hover,
a.level-option:focus-visible {
  background: var(--link-fill-hover);
  border-color: var(--link-fill-hover);
  color: var(--link-fill-text);
}

.level-option-label {
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  transition: color 180ms ease;
}

.level-option-description {
  color: var(--muted);
  margin: 0;
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.35;
  transition: color 180ms ease;
}

.level-option:hover .level-option-label,
.level-option:focus-visible .level-option-label,
.level-option--active .level-option-label,
.level-option:hover .level-option-description,
.level-option:focus-visible .level-option-description,
.level-option--active .level-option-description,
a.level-option .level-option-label,
a.level-option .level-option-description {
  color: var(--interaction-fill-text);
}

.level-status {
  display: grid;
  justify-items: start;
  gap: 12px;
  margin: 18px 0 0;
  color: var(--muted);
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.level-status p {
  margin: 0;
}

.track-map-button {
  min-height: 42px;
  padding-inline: 16px;
  font-size: 0.82rem;
}

.hero-copy a.button.track-map-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-block: 0;
  background:
    linear-gradient(135deg, var(--interaction-fill) 0 46%, transparent 58%) left top / 0% 100% no-repeat,
    transparent;
  color: var(--accent);
}

.hero-copy a.button.track-map-button:visited {
  color: var(--accent);
}

.hero-copy a.button.track-map-button:hover,
.hero-copy a.button.track-map-button:focus-visible {
  background-size: 220% 100%, auto;
  color: var(--interaction-fill-text);
}

:root[data-theme="light"] main .hero-copy a.button.track-map-button {
  background:
    linear-gradient(135deg, var(--interaction-fill) 0 46%, transparent 58%) left top / 0% 100% no-repeat,
    transparent;
  color: var(--accent);
}

:root[data-theme="light"] main .hero-copy a.button.track-map-button:hover,
:root[data-theme="light"] main .hero-copy a.button.track-map-button:focus-visible {
  background-size: 220% 100%, auto;
  color: var(--interaction-fill-text);
}

.level-status .track-map-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

main .level-status a.button.track-map-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-block: 0;
  background:
    linear-gradient(135deg, var(--interaction-fill) 0 46%, transparent 58%) left top / 0% 100% no-repeat,
    transparent;
  color: var(--accent);
}

main .level-status a.button.track-map-button:visited {
  color: var(--accent);
}

main .level-status a.button.track-map-button:hover,
main .level-status a.button.track-map-button:focus-visible {
  background-size: 220% 100%, auto;
  color: var(--interaction-fill-text);
}

:root[data-theme="light"] main .level-status a.button.track-map-button {
  background:
    linear-gradient(135deg, var(--interaction-fill) 0 46%, transparent 58%) left top / 0% 100% no-repeat,
    transparent;
  color: var(--accent);
}

:root[data-theme="light"] main .level-status a.button.track-map-button:hover,
:root[data-theme="light"] main .level-status a.button.track-map-button:focus-visible {
  background-size: 220% 100%, auto;
  color: var(--interaction-fill-text);
}

/* Course map buttons: white base so the outline pill reads on dark backgrounds. */
.hero-copy a.button.track-map-button,
main .level-status a.button.track-map-button,
:root[data-theme="light"] main .hero-copy a.button.track-map-button,
:root[data-theme="light"] main .level-status a.button.track-map-button {
  background-color: #ffffff;
}

.gateway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.gateway-card {
  display: grid;
  gap: 8px;
  min-height: 220px;
  padding: 18px;
  border: 2px solid var(--line);
  color: var(--text);
}

a.gateway-card {
  background: var(--link-fill);
  border-color: var(--link-fill);
  color: var(--link-fill-text);
}

a.gateway-card:visited {
  color: var(--link-fill-text);
}

a.gateway-card .eyebrow {
  color: var(--link-fill-text);
}

.gateway-card--static {
  cursor: default;
}

.gateway-card h3 {
  margin: 0;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.gateway-card .eyebrow {
  font-family: 'Space Grotesk', Arial, sans-serif;
}

.gateway-card p {
  margin: 0;
  font-family: 'Source Serif 4', Georgia, serif;
}

.gateway-card:hover,
.gateway-card:focus-visible {
  border-color: var(--link-fill-hover);
  background: var(--link-fill-hover);
  color: var(--link-fill-text);
  outline: none;
}

.gateway-card--static:hover,
.gateway-card--static:focus-visible {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}

.gateway-grid--four-up {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.job-risk-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.job-risk-card {
  display: grid;
  gap: 10px;
  min-height: 220px;
  padding: 18px;
  border: 2px solid var(--line);
}

.job-risk-kicker {
  margin: 0;
  color: var(--accent);
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.job-risk-card h3 {
  margin: 0;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.job-risk-label {
  margin: 0;
  color: var(--muted);
  font-family: 'Space Grotesk', Arial, sans-serif;
}

.job-risk-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.job-risk-list li + li {
  margin-top: 10px;
}

.job-risk-note-block {
  margin-top: 18px;
  border-left: 3px solid var(--line);
  padding-left: 18px;
}

.job-risk-disclaimer {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.helpful-link-card {
  gap: 14px;
}

.helpful-link-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  border: 2px solid var(--line);
}

.button {
  appearance: none;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 2px solid var(--accent);
  border-radius: 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-size 220ms ease, border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}

.button:visited {
  color: var(--accent);
}

.button.primary {
  background:
    linear-gradient(135deg, var(--interaction-fill) 0 46%, transparent 58%) left top / 0% 100% no-repeat,
    var(--accent);
  color: #0d0d0b;
}

.button.primary:visited {
  color: #0d0d0b;
}

.button.primary:hover,
.button.primary:focus-visible {
  background-size: 220% 100%, auto;
  background-color: var(--accent-strong);
  border-color: var(--accent-strong);
}
.button.secondary {
  background:
    linear-gradient(135deg, var(--interaction-fill) 0 46%, transparent 58%) left top / 0% 100% no-repeat,
    transparent;
  color: var(--accent);
}

.button.secondary:visited {
  color: var(--accent);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background-size: 220% 100%, auto;
  color: var(--interaction-fill-text);
}

.eyebrow {
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.76rem;
  color: var(--accent);
  font-weight: 700;
}

.section-block { padding-top: 42px; }
.is-hidden { display: none !important; }
.section-block--tight { padding-top: 18px; }
.section-block--news-lead { padding-top: 22px; }
.section-block--news-lead .list-row { border-top: 0; }
.section-block--editorial { border-top: 2px solid color-mix(in srgb, var(--line) 12%, transparent); }
.section-block--no-top-rule { border-top: 0; }

body:has(.hero-copy-block #hero-title) .topbar {
  border-color: color-mix(in srgb, var(--header-glass-border) 100%, rgb(255 255 255 / 0.1) 0%);
}

body:has(.hero-copy-block #hero-title) .section-block--editorial:not(.section-block--no-top-rule) {
  border-top-color: color-mix(in srgb, var(--line) 45%, var(--text) 55%);
}
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
  gap: var(--space-4);
  align-items: end;
  margin-bottom: 22px;
}
.section-heading--stack-mobile {
  align-items: start;
}
.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  max-width: 12ch;
  padding-bottom: 50px;
}

.section-title-small {
  font-size: clamp(1.2rem, 2vw, 1.7rem) !important;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.news-community-pulse {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.news-comment-list {
  margin: 14px 0 0;
  padding-left: 20px;
}

.news-comment-list li + li {
  margin-top: 12px;
}

.news-comment-meta {
  color: var(--muted);
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: 0.92rem;
}

.editorial-list {
  display: grid;
  gap: 0;
}

.list-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1.5fr) minmax(180px, 0.7fr);
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 12%, transparent);
  align-items: start;
}

.list-row:last-child {
  border-bottom: 1px solid color-mix(in srgb, var(--line) 12%, transparent);
}

.list-row--step {
  grid-template-columns: 96px minmax(0, 1.5fr) 120px;
}

.list-row--chapter {
  grid-template-columns: 96px minmax(0, 1.5fr) 140px 120px;
}

.list-row--article {
  grid-template-columns: 120px minmax(0, 1.5fr) minmax(150px, 0.45fr);
}

.list-index,
.list-meta {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 4px;
}

.list-meta-secondary {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  margin-top: 6px;
}

.list-body h3,
.lesson-card h3,
.recap-card h3,
.checkpoint-card h3,
.sources-card h3,
.next-step-card h3,
.survey-card h3 {
  margin: 0 0 12px;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(1.45rem, 2.4vw, 2.3rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.section-block--news-lead .list-body h3 {
  line-height: 1.2;
}

.list-body p,
.list-side p {
  margin: 0 0 8px;
}

.list-side {
  color: var(--muted);
}

.list-side p {
  color: var(--side-copy);
}

.list-side p strong {
  color: var(--side-label);
}

.list-link {
  justify-self: end;
  align-self: center;
}

.list-row--active .list-body h3,
.list-row--active .list-link {
  color: var(--accent);
}

.tag {
  display: inline-flex;
  margin-top: 12px;
  padding: 4px 0;
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 32px;
  padding: 0 8px;
  background: var(--link-fill);
  color: var(--link-fill-text);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
}

.text-link:visited {
  color: var(--link-fill-text);
}

.list-row--active .text-link.list-link,
.list-row--active .text-link.list-link:visited {
  color: var(--link-fill-text);
}

.text-link:hover,
.text-link:focus-visible {
  background: var(--link-fill-hover);
  color: var(--link-fill-text);
  outline: none;
}

.news-all-button {
  display: flex;
  width: fit-content;
  min-height: 40px;
  margin-top: 12px;
  padding-inline: 14px;
}

.editorial-list--articles .list-row:first-child {
  border-top-color: var(--accent);
}

.editorial-list--articles .list-body h3 {
  line-height: 1.1;
}

.button.news-all-button {
  background-color: #ffffff;
}

.news-controls,
.news-more-wrap,
.news-pagination,
.news-page-list {
  display: flex;
  gap: 14px;
}

.news-controls,
.news-more-wrap {
  justify-content: space-between;
  margin-bottom: 18px;
}

.news-more-wrap {
  justify-content: flex-start;
  margin-top: 18px;
}

.news-pagination {
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.news-page-list {
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.news-page-button {
  min-width: 44px;
  padding-inline: 12px;
}

.news-page-button.is-active {
  background: var(--interaction-fill);
  color: var(--interaction-fill-text);
}

.news-week-heading {
  margin-bottom: 8px;
}

.news-sources ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.news-sources li {
  margin-bottom: 6px;
}

.sources-list {
  margin: 0;
  padding-left: 1.2rem;
}

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

.chapter-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
}

.chapter-sidebar {
  height: fit-content;
  position: sticky;
  top: 24px;
}

.chapter-main {
  display: grid;
  gap: 26px;
}

.goal-list,
#recap-list {
  padding-left: 18px;
  margin: 0;
}

.goal-list li,
#recap-list li {
  margin-bottom: 10px;
}

.tip-box--editorial {
  margin-top: 24px;
}

.lesson-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}

.lesson-toolbar h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.lesson-controls {
  display: none;
  align-items: center;
  gap: 10px;
}

.lesson-nav-button {
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  border-radius: 0;
  width: 46px;
  height: 46px;
  font-size: 1rem;
  font-weight: 700;
}
.lesson-nav-button:disabled {
  opacity: 0.3;
  border-color: var(--line);
  color: var(--line);
}

.lesson-position {
  min-width: 62px;
  text-align: center;
  color: var(--muted);
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-weight: 700;
}

.lesson-track {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.lesson-slide {
  min-width: 0;
}

.lesson-card {
  padding-bottom: 10px;
}

.lesson-block {
  margin-bottom: 18px;
}

.lesson-block--example,
.lesson-remember {
  margin-top: 18px;
}

.lesson-label {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.survey-form {
  display: grid;
  gap: 14px;
}

.quiz-form {
  display: grid;
  gap: 16px;
}

.quiz-question {
  border: 0;
  margin: 0;
  padding: 0;
}

.quiz-options {
  display: grid;
  gap: 8px;
}

.quiz-option {
  width: 100%;
  text-align: left;
  min-height: 48px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
}

.quiz-option:hover,
.quiz-option:focus-visible,
.quiz-option--active {
  border-color: var(--accent);
  outline: none;
}

.quiz-explanation {
  margin: 10px 0 0;
  color: var(--muted);
}

.quiz-explanation--correct {
  color: var(--accent);
}

.quiz-explanation--wrong {
  color: #ff9d7a;
}

.quiz-explanation--empty {
  color: var(--muted);
}

.survey-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.survey-legend,
.survey-label {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.survey-rating {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.rating-pill {
  min-height: 72px;
  padding: 12px 8px;
  border-radius: 0;
  border: 2px solid var(--line);
  background: transparent;
  color: var(--text);
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
}

.rating-pill-number {
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1;
}

.rating-pill-text {
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: 0.68rem;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rating-pill--active {
  background: var(--accent);
  color: #0d0d0b;
  border-color: var(--accent);
}

.survey-textarea {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 0;
  padding: 14px 16px;
  font: inherit;
  resize: vertical;
  background: transparent;
  color: var(--text);
}

.survey-textarea::placeholder {
  color: #8f897b;
}

.survey-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.survey-button {
  min-width: 170px;
}

.survey-skip {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-weight: 700;
  min-height: 44px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.survey-status {
  min-height: 24px;
  margin: 0;
}

@media (max-width: 980px) {
  :root {
    --topbar-height: 84px;
    --topbar-offset-x: 28px;
    --topbar-top-gap: 12px;
  }

  .page-shell {
    padding: 0 14px 56px;
  }

  .topbar {
    align-items: center;
    gap: 10px;
    padding: 13px 27px 19px 33px;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    display: flex;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    padding: 12px 14px;
    background:
      linear-gradient(135deg, var(--header-glass-highlight), transparent 24%),
      linear-gradient(315deg, color-mix(in srgb, var(--header-glass-highlight) 28%, transparent), transparent 32%),
      var(--menu-glass-bg);
    border: 1px solid var(--header-glass-border);
    border-radius: 20px;
    -webkit-backdrop-filter: var(--header-glass-blur);
    backdrop-filter: var(--header-glass-blur);
    box-shadow:
      inset 0 1px 0 color-mix(in srgb, var(--header-glass-highlight) 78%, transparent),
      inset 0 -1px 0 color-mix(in srgb, var(--header-glass-border) 72%, transparent),
      0 18px 48px var(--header-glass-shadow);
    isolation: isolate;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px) scale(0.985);
    transform-origin: top center;
    transition:
      opacity var(--menu-enter-duration) var(--menu-ease),
      transform var(--menu-enter-duration) var(--menu-ease),
      visibility 0s linear var(--menu-enter-duration);
  }

  .site-nav::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: calc(var(--header-glass-noise-opacity) * 0.78);
    mix-blend-mode: overlay;
    background-image: var(--header-glass-noise);
    background-repeat: repeat;
    background-size: 128px 128px;
  }

  .site-nav::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
      radial-gradient(130% 90% at 12% -24%, color-mix(in srgb, var(--header-glass-highlight) 72%, transparent), transparent 38%),
      radial-gradient(95% 105% at 100% 118%, color-mix(in srgb, var(--header-glass-highlight) 25%, transparent), transparent 48%);
    mix-blend-mode: screen;
    opacity: 0.74;
  }

  .site-nav > * {
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(8px);
    transition:
      opacity var(--menu-item-duration) var(--menu-ease),
      transform var(--menu-item-duration) var(--menu-ease);
  }

  .site-nav > *:nth-child(1) { transition-delay: 0ms; }
  .site-nav > *:nth-child(2) { transition-delay: 24ms; }
  .site-nav > *:nth-child(3) { transition-delay: 48ms; }
  .site-nav > *:nth-child(4) { transition-delay: 72ms; }
  .site-nav > *:nth-child(5) { transition-delay: 96ms; }
  .site-nav > *:nth-child(6) { transition-delay: 120ms; }
  .site-nav > *:nth-child(7) { transition-delay: 144ms; }

  body.nav-open .site-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition:
      opacity var(--menu-enter-duration) var(--menu-ease),
      transform var(--menu-enter-duration) var(--menu-ease),
      visibility 0s linear 0s;
  }

  body.nav-open .site-nav > * {
    opacity: 1;
    transform: translateY(0);
  }

  .site-nav a,
  .theme-toggle {
    min-height: 44px;
    width: 100%;
  }

  .site-nav a {
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
  }

  .site-nav a:hover,
  .site-nav a:focus-visible {
    transform: translateX(4px);
  }

  .nav-toggle span {
    transform-origin: center;
    transition:
      transform 180ms var(--menu-ease),
      opacity 140ms ease,
      background-color 160ms ease;
  }

  body.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }

  body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0.4);
  }

  body.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }

  .theme-toggle {
    justify-content: space-between;
    padding: 12px 0 0;
    border-top: 1px solid var(--line);
    margin-top: 8px;
  }

  .theme-toggle-track {
    width: 120px;
    min-width: 120px;
  }

  .subscribe-popup {
    align-items: start;
    padding: calc(env(safe-area-inset-top, 0px) + 18px) 16px calc(env(safe-area-inset-bottom, 0px) + 18px);
    overflow-y: auto;
  }

  .subscribe-popup-backdrop {
    position: fixed;
    background: var(--popup-backdrop-bg);
  }

  .hero-panel.subscribe-popup-panel {
    max-width: none;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 36px);
    margin: auto 0;
    overflow-y: auto;
    padding: 24px 18px 20px;
    background: var(--popup-panel-bg);
  }

  .hero,
  .section-heading,
  .chapter-layout,
  .list-row,
  .list-row--step,
  .list-row--chapter,
  .list-row--news,
  .assessment-row {
    grid-template-columns: 1fr;
  }

  .hero-panel--manifesto,
  .chapter-sidebar,
  .lesson-carousel-shell,
  .recap-card,
  .checkpoint-card,
  .quiz-card,
  .next-step-card,
  .survey-card,
  .tip-box,
  .lesson-block--example,
  .lesson-remember {
    padding-left: 14px;
  }

  .list-link {
    justify-self: start;
  }

  .list-side {
    margin-top: 4px;
  }

  .chapter-sidebar {
    position: static;
  }

  .level-options,
  .gateway-grid,
  .gateway-grid--four-up,
  .job-risk-result-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav,
  .site-nav > *,
  .site-nav a,
  .nav-toggle span,
  .subscribe-popup,
  .subscribe-popup-backdrop,
  .subscribe-popup-panel {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 0 12px 48px;
  }

  .hero {
    min-height: auto;
    gap: 22px;
    padding-top: 24px;
  }

  .hero h1,
  .chapter-page-title,
  .section-copy--display {
    font-size: clamp(2.5rem, 14vw, 4rem);
    max-width: 100%;
  }

  .hero-copy,
  .section-copy,
  .chapter-summary {
    font-size: 1rem;
  }

  .section-heading {
    gap: 14px;
    margin-bottom: 18px;
  }

  .section-heading h2,
  .lesson-toolbar h2,
  .list-body h3,
  .lesson-card h3,
  .recap-card h3,
  .checkpoint-card h3,
  .next-step-card h3,
  .survey-card h3 {
    max-width: 100%;
  }

  .hero-actions,
  .survey-actions,
  .assessment-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button,
  .survey-button,
  .survey-skip {
    width: 100%;
    justify-content: center;
  }

  .news-pagination {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }

  .news-pagination .button,
  .news-pagination .news-page-button {
    flex: 0 0 auto;
    width: auto;
  }

  .news-page-list {
    flex: 0 0 auto;
    flex-wrap: nowrap;
  }

  .assessment-option,
  .level-option,
  .gateway-card,
  .job-risk-card,
  .quiz-option {
    min-width: 0;
  }

  .assessment-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .level-option,
  .gateway-card,
  .job-risk-card {
    min-height: auto;
  }

  .list-row {
    gap: 10px;
    padding: 16px 0;
  }

  .lesson-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .lesson-controls {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 16px;
    padding: 10px 12px;
    background: #ffffff;
    border: 2px solid var(--line);
    box-shadow: 4px 4px 0 0 var(--accent);
  }

  /* White-card controls: buttons read as black-on-white chips. */
  .lesson-controls .lesson-nav-button {
    border-color: #09090b;
    color: #09090b;
    background: #ffffff;
  }

  .lesson-controls .lesson-position {
    color: #09090b;
  }

  .lesson-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }
  .lesson-track::-webkit-scrollbar { display: none; }

  .lesson-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
  }

  .survey-rating {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .rating-pill {
    min-height: 58px;
    padding: 12px 10px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
  }

  .rating-pill-text {
    font-size: 0.72rem;
    text-align: left;
  }
}

@media (max-width: 420px) {
  :root {
    --topbar-height: 78px;
    --topbar-top-gap: 10px;
  }

  .topbar {
    align-items: center;
    padding: 13px 27px 19px 33px;
  }

  .brand {
    font-size: 0.9rem;
  }

  .hero h1,
  .chapter-page-title,
  .section-copy--display {
    font-size: clamp(2.2rem, 13vw, 3.2rem);
  }

  .assessment-options {
    grid-template-columns: 1fr;
  }

  .lesson-nav-button {
    width: 42px;
    height: 42px;
  }

  .subscribe-popup {
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px calc(env(safe-area-inset-bottom, 0px) + 12px);
  }

  .hero-panel.subscribe-popup-panel {
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 24px);
    padding: 22px 18px 18px;
  }

  .subscribe-popup-panel .subscribe-field input {
    padding-left: 18px;
    padding-right: 18px;
  }

}


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

.export-shell {
  width: min(1100px, 100%);
}

.export-root {
  display: grid;
  gap: 32px;
  padding-top: 24px;
}

.export-chapter {
  border-top: 2px solid var(--line);
  padding-top: 24px;
  break-inside: avoid;
}

.export-section {
  margin-top: 20px;
}

.export-section h3,
.export-lesson h4 {
  margin: 0 0 10px;
  letter-spacing: -0.03em;
}

.export-lesson {
  margin-top: 16px;
}

.export-page .hero {
  min-height: auto;
}

.no-print {
  display: flex;
}

@media print {
  body {
    background: #fff;
    color: #111;
    overflow: visible;
  }

  .no-print {
    display: none !important;
  }

  .page-shell,
  .export-shell {
    width: 100%;
    padding: 0;
  }

  .hero-panel--manifesto,
  .chapter-sidebar,
  .lesson-carousel-shell,
  .recap-card,
  .checkpoint-card,
  .quiz-card,
  .next-step-card,
  .survey-card,
  .tip-box,
  .lesson-block--example,
  .lesson-remember {
    border-left: 0;
    padding-left: 0;
  }

  .eyebrow,
  .tag,
  .brand {
    color: #111 !important;
  }

  a {
    text-decoration: none;
  }
}


.release-list {
  display: grid;
  gap: 0;
}

.release-row {
  background: rgba(215, 255, 47, 0.03);
  padding-left: 18px;
  padding-right: 18px;
}

@media (max-width: 640px) {
  .release-row {
    padding-left: 12px;
    padding-right: 12px;
  }
}

.special-track-grid {
  margin-top: 6px;
}

:root[data-theme="light"] .button.primary {
  background: var(--light-primary-bg);
  color: var(--light-primary-text);
  border-color: var(--light-primary-bg);
}

:root[data-theme="light"] .button.primary:hover,
:root[data-theme="light"] .button.primary:focus-visible {
  background: #11100d;
  border-color: #11100d;
  color: var(--light-primary-text);
}

:root[data-theme="light"] .level-option--active:not(a) {
  border-color: var(--light-primary-bg);
  background: var(--light-primary-bg);
  color: var(--light-primary-text);
}

:root[data-theme="light"] .level-option--active:not(a) .level-option-label,
:root[data-theme="light"] .level-option--active:not(a) .level-option-description {
  color: var(--light-primary-text);
}

.subscribe-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ============================================================
   INDUSTRIAL BRUTALIST STREETWEAR — Swiss Neobrutalist Override
   ============================================================ */

/* --- Color system: Zinc palette, safety accents --- */
:root {
  --bg: #09090b;
  --surface: #18181b;
  --surface-soft: #27272a;
  --surface-accent: #3f3f46;
  --text: #fafafa;
  --muted: #a1a1aa;
  --side-label: #fafafa;
  --side-copy: #d4d4d8;
  --line: #3f3f46;
  --accent: #fde047;
  --accent-strong: #ca8a04;
  --link-fill: #fde047;
  --link-fill-hover: #facc15;
  --link-fill-text: #09090b;
  --interaction-fill: #fde047;
  --interaction-fill-text: #09090b;
  --shadow: 0 0 0 transparent;
  --radius-lg: 0;
  --radius-md: 0;
  --radius-sm: 0;
  --header-glass-bg: rgba(20, 20, 24, 0.38);
  --header-glass-border: rgba(250, 250, 250, 0.24);
  --header-glass-blur: blur(6px) saturate(1.7) brightness(1.12);
  /* Clear glass: content shows through and bends; tint only steadies contrast. */
  --menu-glass-bg: rgba(20, 20, 24, 0.42);
  --header-glass-noise-opacity: 0.035;
  --header-glass-highlight: rgba(250, 250, 250, 0.34);
  --header-glass-shadow: rgba(0, 0, 0, 0.36);
  --brut-shadow-dark: 4px 4px 0px 0px rgba(250,250,250,1);
  --brut-shadow-dark-sm: 2px 2px 0px 0px rgba(250,250,250,1);
}

:root[data-theme="light"] {
  --bg: #fafafa;
  --surface: #fafafa;
  --surface-soft: #f4f4f5;
  --surface-accent: #e4e4e7;
  --text: #09090b;
  --muted: #52525b;
  --side-label: #09090b;
  --side-copy: #3f3f46;
  --line: #09090b;
  --accent: #09090b;
  --accent-strong: #27272a;
  --link-fill: #fde047;
  --link-fill-hover: #facc15;
  --link-fill-text: #09090b;
  --interaction-fill: #fde047;
  --interaction-fill-text: #09090b;
  --header-glass-bg: rgba(255, 255, 255, 0.34);
  --header-glass-border: rgba(255, 255, 255, 0.74);
  --header-glass-blur: blur(6px) saturate(1.7) brightness(1.08);
  --menu-glass-bg: rgba(255, 255, 255, 0.45);
  --header-glass-noise-opacity: 0.025;
  --header-glass-highlight: rgba(255, 255, 255, 0.92);
  --header-glass-shadow: rgba(39, 39, 42, 0.18);
  --brut-shadow-dark: 4px 4px 0px 0px rgba(9,9,11,1);
  --brut-shadow-dark-sm: 2px 2px 0px 0px rgba(9,9,11,1);
  --light-primary-bg: #09090b;
  --light-primary-text: #fafafa;
}

/* --- Dot matrix background --- */
body {
  background-color: var(--bg);
  background-image: radial-gradient(#27272a 1.5px, transparent 1.5px);
  background-size: 24px 24px;
}

:root[data-theme="light"] body {
  background-image: radial-gradient(#e4e4e7 1.5px, transparent 1.5px);
}

/* --- Typography: Mono-first system --- */
body {
  font-family: 'Space Grotesk', Arial, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'JetBrains Mono', 'Space Grotesk', monospace;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

.hero h1,
.chapter-page-title {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.section-copy--display {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.section-heading h2 {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.list-body h3,
.lesson-card h3,
.recap-card h3,
.checkpoint-card h3,
.sources-card h3,
.next-step-card h3,
.survey-card h3,
.gateway-card h3 {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.04em;
}

.eyebrow,
.lesson-label,
.list-index,
.list-meta,
.tag,
.manifesto-kicker,
.brand {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* --- Topbar: liquid glass inspired by nikdelvin/liquid-glass (MIT) --- */
.topbar {
  overflow: visible;
  width: calc(100vw - 32px);
  max-width: calc(100vw - 32px);
  min-width: 0;
  border-radius: 52px;
  border: 1px solid var(--header-glass-border);
  /* No backdrop-filter on the element itself: it would become a backdrop
     root clipped to the header box, killing the dropdown menu's own
     backdrop-filter (the menu overflows below the header). Glass lives on
     ::before instead, which is a sibling layer — not an ancestor of the menu. */
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--header-glass-highlight) 78%, transparent),
    inset 0 -1px 0 color-mix(in srgb, var(--header-glass-border) 72%, transparent),
    0 14px 42px var(--header-glass-shadow);
  top: 10px;
  left: 16px;
  right: 16px;
  transition:
    border-color 320ms var(--menu-ease),
    box-shadow 320ms var(--menu-ease);
}

.topbar::before {
  display: block;
  z-index: 0;
  opacity: 1;
  mix-blend-mode: normal;
  background:
    linear-gradient(135deg, var(--header-glass-highlight), transparent 24%),
    linear-gradient(315deg, color-mix(in srgb, var(--header-glass-highlight) 28%, transparent), transparent 32%),
    var(--header-glass-bg);
  backdrop-filter: var(--header-glass-blur);
  -webkit-backdrop-filter: var(--header-glass-blur);
}

.topbar::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(130% 90% at 12% -24%, color-mix(in srgb, var(--header-glass-highlight) 72%, transparent), transparent 38%),
    radial-gradient(95% 105% at 100% 118%, color-mix(in srgb, var(--header-glass-highlight) 25%, transparent), transparent 48%);
  mix-blend-mode: screen;
  opacity: 0.74;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .topbar {
    background: var(--header-glass-bg);
  }
}

/* Aave-style refraction layer (injected by nav.js). Sits above the frosted
   ::before glass and below the content, bending the backdrop via the SVG
   feDisplacementMap so the panel refracts the page behind it like real glass.
   Chromium only; a no-op where SVG backdrop filters are unsupported. */
.glass-refract {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  overflow: hidden;
  /* wprod's liquid glass composition (codepen.io/wprod/pen/raVpwJL):
     backdrop-filter blurs, and the SVG displacement runs as a normal CSS
     filter over that snapshot for older engines; nav.js moves the url()
     into backdrop-filter on engines that render it there. No isolation
     here — isolate would make this layer its own backdrop root and the
     filter would sample nothing. */
  -webkit-backdrop-filter: blur(3px) saturate(1.4);
  backdrop-filter: blur(3px) saturate(1.4);
  filter: url(#glass-distortion);
}

/* Safari fallback: CSS filter: url() doesn't warp backdrop-filter output in
   WebKit. Skip distortion entirely — just a strong blur with opaque tint. */
.topbar.glass-safari::before {
  -webkit-backdrop-filter: blur(14px) saturate(1.8);
  backdrop-filter: blur(14px) saturate(1.8);
  mix-blend-mode: normal;
  background: rgba(9, 9, 11, 0.82);
}
:root[data-theme="light"] .topbar.glass-safari::before {
  background: rgba(255, 255, 255, 0.88);
}
@media (max-width: 980px) {
  .site-nav.glass-safari {
    -webkit-backdrop-filter: blur(14px) saturate(1.8);
    backdrop-filter: blur(14px) saturate(1.8);
    background: rgba(9, 9, 11, 0.86);
  }
  :root[data-theme="light"] .site-nav.glass-safari {
    background: rgba(255, 255, 255, 0.92);
  }
}

/* Lens active (set by nav.js only after verifying the browser accepts url()
   in backdrop-filter): the element's heavy 36px frost would pre-blur the
   backdrop into mush before the lens can bend it. Lighten it to a 10px frost
   + tint — enough structure survives for the rim refraction to read, and if
   the lens still renders nothing the bar remains proper frosted glass. */
/* Lens active: ONLY the .glass-refract layer may carry backdrop-filter, and
   no sibling may blend. Chromium ignores a backdrop-filter layer stacked over
   a sibling (or under an ancestor) that also has one, and any sibling with a
   non-normal mix-blend-mode isolates the parent into a backdrop root — both
   silently kill the distortion. Pseudos keep only a normal-blend tint; the
   filter's feSpecularLighting supplies the sheen instead of ::after. */
.glass-lens-active::after {
  display: none;
}

.topbar.glass-lens-active::before {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  mix-blend-mode: normal;
  /* 40% white wash over a dark base — less transparent, still reads as glass. */
  background:
    linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)),
    rgba(9, 9, 11, 0.34);
}

:root[data-theme="light"] .topbar.glass-lens-active::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)),
    rgba(255, 255, 255, 0.34);
}

@media (max-width: 980px) {
  .site-nav.glass-lens-active {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background:
      linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)),
      rgba(9, 9, 11, 0.42);
  }

  :root[data-theme="light"] .site-nav.glass-lens-active {
    background:
      linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)),
      rgba(255, 255, 255, 0.42);
  }

  /* The menu's ::before is a blend-mode noise texture — another isolator. */
  .site-nav.glass-lens-active::before {
    display: none;
  }
}

/* The nav's own refract layer is for the mobile dropdown panel only. On
   desktop the nav is inline in the topbar: its links are static, so a
   positioned refract span would paint over them and blur them. The topbar's
   refract layer already covers the whole bar there. */
.site-nav > .glass-refract {
  display: none;
}

/* Keep every nav item painting above any refract layer at all widths. */
.site-nav > a,
.site-nav > .theme-toggle {
  position: relative;
  z-index: 1;
}

@media (max-width: 980px) {
  .site-nav > .glass-refract {
    display: block;
  }
}

@media (max-width: 980px) {
  .site-nav {
    border-radius: 22px;
  }
}

/* --- Borders: 2px solid, razor-sharp --- */
.section-block--editorial:not(.section-block--no-top-rule) {
  border-top: 2px solid var(--line);
}

.list-row {
  border-top: 1px solid var(--line);
}

.list-row:last-child {
  border-bottom: 1px solid var(--line);
}

.hero-panel,
.chapter-sidebar,
.lesson-carousel-shell,
.recap-card,
.checkpoint-card,
.quiz-card,
.sources-card,
.next-step-card,
.survey-card,
.tip-box,
.lesson-block--example,
.lesson-remember {
  border-left: 3px solid var(--line);
}

/* --- Buttons: neobrutalist offset shadow --- */
.button {
  border: 2px solid var(--line);
  border-radius: 0;
  box-shadow: var(--brut-shadow-dark);
  transition: transform 150ms ease-in-out, box-shadow 150ms ease-in-out, background-color 150ms ease, color 150ms ease;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.button:hover,
.button:focus-visible {
  transform: translate(2px, 2px);
  box-shadow: var(--brut-shadow-dark-sm);
  outline: none;
}

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

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

.button.secondary {
  background: #ffffff;
  color: var(--text);
  border-color: var(--line);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: var(--accent);
  color: var(--interaction-fill-text);
  border-color: var(--accent);
}

/* Light theme: --accent is near-black, so hover/active text must be white. */
:root[data-theme="light"] .button.primary,
:root[data-theme="light"] .button.primary:hover,
:root[data-theme="light"] .button.primary:focus-visible {
  color: #ffffff;
}
:root[data-theme="light"] .button.secondary:hover,
:root[data-theme="light"] .button.secondary:focus-visible {
  color: #ffffff;
}

/* ALL NEWS + news page buttons: white base so the outline reads on light bg. */
.button.news-all-button {
  background-color: #ffffff;
}
.button.news-page-button {
  background-color: #ffffff;
}

/* Dark mode: white buttons keep a white bg + black text in every state.
   var(--text) is near-white in dark, so without this the label vanishes,
   and the default accent-fill hover would flip the text light again. */
:root:not([data-theme="light"]) .button.secondary,
:root:not([data-theme="light"]) .button.secondary:hover,
:root:not([data-theme="light"]) .button.secondary:focus-visible,
:root:not([data-theme="light"]) .button.news-all-button,
:root:not([data-theme="light"]) .button.news-all-button:hover,
:root:not([data-theme="light"]) .button.news-all-button:focus-visible,
:root:not([data-theme="light"]) .button.news-page-button:not(.is-active),
:root:not([data-theme="light"]) .button.news-page-button:not(.is-active):hover,
:root:not([data-theme="light"]) .button.news-page-button:not(.is-active):focus-visible {
  background: #ffffff;
  color: #09090b;
  border-color: var(--line);
}

/* --- Gateway cards: neobrutalist with tactical ribbon --- */
.gateway-card {
  position: relative;
  border: 2px solid var(--line);
  border-radius: 0;
  box-shadow: var(--brut-shadow-dark);
  overflow: hidden;
  transition: transform 150ms ease-in-out, box-shadow 150ms ease-in-out;
}

a.gateway-card {
  background: #ffffff;
  border-color: var(--accent);
  color: #09090b;
  box-shadow: 4px 4px 0px 0px var(--accent);
}

a.gateway-card .eyebrow {
  color: var(--accent);
}

a.gateway-card:visited {
  color: #09090b;
}

/* White card like the white buttons: stays white with black text on hover,
   keeping only the neobrutalist shadow/translate for tactile feedback. */
a.gateway-card:hover,
a.gateway-card:focus-visible {
  background: #ffffff;
  border-color: var(--accent);
  color: #09090b;
  box-shadow: 2px 2px 0px 0px var(--accent);
  transform: translate(2px, 2px);
}

a.gateway-card:hover .eyebrow,
a.gateway-card:focus-visible .eyebrow {
  color: var(--accent);
}

/* Tactical left ribbon on cards */
.gateway-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
}

a.gateway-card::before {
  background: currentColor;
  opacity: 0.3;
}

/* L-shaped crop marks via ::after overlay */
.gateway-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  pointer-events: none;
}

/* --- Assessment & level options: brutalist --- */
.assessment-option,
.level-option,
.quiz-option {
  border: 2px solid var(--line);
  border-radius: 0;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
  box-shadow: var(--brut-shadow-dark);
}

.assessment-option:hover,
.assessment-option:focus-visible,
.assessment-option--active {
  border-color: var(--accent);
  transform: translate(1px, 1px);
  box-shadow: var(--brut-shadow-dark-sm);
}

.level-option:hover,
.level-option:focus-visible,
.level-option--active {
  border-color: var(--accent);
  transform: translate(1px, 1px);
  box-shadow: var(--brut-shadow-dark-sm);
}

.quiz-option:hover,
.quiz-option:focus-visible,
.quiz-option--active {
  border-color: var(--accent);
}

/* --- Text links: yellow highlight --- */
.text-link {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--accent);
  color: var(--interaction-fill-text);
}

.text-link:hover,
.text-link:focus-visible {
  background: var(--accent-strong);
  color: var(--interaction-fill-text);
}

/* --- Status tags: tactical safety colors --- */
.tag {
  border: 1px solid var(--line);
  padding: 2px 8px;
  font-size: 0.65rem;
}

/* --- Brand name: mono treatment --- */
.brand {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent);
}

/* Dark header: brand wordmark + hamburger read white, not accent yellow. */
:root:not([data-theme="light"]) .brand,
:root:not([data-theme="light"]) .nav-toggle {
  color: #fafafa;
}

/* Dark menu: nav links full white. */
:root:not([data-theme="light"]) .site-nav a {
  color: #ffffff;
}

/* --- Survey components --- */
.survey-textarea,
.subscribe-field input {
  border: 2px solid var(--line);
  border-radius: 0;
  font-family: 'Space Grotesk', Arial, sans-serif;
}

.survey-textarea:focus-visible,
.subscribe-field input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.rating-pill {
  border: 2px solid var(--line);
  border-radius: 0;
  font-family: 'JetBrains Mono', monospace;
  box-shadow: 2px 2px 0px 0px var(--line);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.rating-pill:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px 0px var(--line);
}

.rating-pill--active {
  background: var(--accent);
  color: #09090b;
  border-color: var(--accent);
  box-shadow: 2px 2px 0px 0px #09090b;
}

/* --- Diagnostic status bar on news card --- */
.list-row:first-child .list-index::before {
  content: '▶ ';
  color: #10b981;
}

/* --- News controls --- */
.news-page-button.is-active {
  background: var(--accent);
  color: #09090b;
  border-color: var(--accent);
  box-shadow: 2px 2px 0px 0px var(--line);
}

/* --- Chapter sidebar tactical ribbon --- */
.chapter-sidebar {
  border-left: 4px solid var(--accent);
  padding-left: 18px;
}

/* --- Section headings: uppercase rule line --- */
.section-heading::after {
  content: '';
  display: block;
  grid-column: 1 / -1;
  height: 2px;
  background: var(--line);
  margin-top: 4px;
}

/* --- Hero inline image: hard border --- */
.hero-inline-image {
  border: 2px solid var(--line);
}

/* --- Popup panel: hard bordered --- */
.subscribe-popup-panel {
  border: 2px solid var(--line);
  border-radius: 0;
  box-shadow: 8px 8px 0px 0px var(--line);
}

/* --- Remove soft theme-toggle radius --- */
.theme-toggle-track {
  border-radius: 0;
}

.theme-toggle-thumb {
  border-radius: 0;
}

/* --- Light mode explicit accent for buttons/options --- */
:root[data-theme="light"] .button.primary {
  background: var(--light-primary-bg);
  color: var(--light-primary-text);
  border-color: var(--light-primary-bg);
  box-shadow: 4px 4px 0px 0px rgba(9,9,11,0.4);
}

:root[data-theme="light"] .button.primary:hover,
:root[data-theme="light"] .button.primary:focus-visible {
  background: #27272a;
  border-color: #27272a;
}

:root[data-theme="light"] a.gateway-card {
  border-color: #09090b;
  box-shadow: 4px 4px 0px 0px rgba(9,9,11,1);
  color: #09090b;
}

:root[data-theme="light"] a.gateway-card .eyebrow {
  color: #09090b;
}

:root[data-theme="light"] a.gateway-card:hover,
:root[data-theme="light"] a.gateway-card:focus-visible {
  background: #09090b;
  color: #fafafa;
  border-color: #09090b;
  box-shadow: 2px 2px 0px 0px rgba(9,9,11,1);
}

:root[data-theme="light"] a.gateway-card:hover .eyebrow,
:root[data-theme="light"] a.gateway-card:focus-visible .eyebrow {
  color: #fde047;
}

/* --- Reduced motion: kill transforms only --- */
@media (prefers-reduced-motion: reduce) {
  .button,
  .gateway-card,
  .assessment-option,
  .level-option,
  .rating-pill {
    transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease !important;
    transform: none !important;
  }
}

/* --- Platform updates and company pulse (news sections) --- */

.news-platform-updates {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.news-platform-updates > p:first-child {
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 16px;
}

.platform-update {
  margin-bottom: 20px;
  padding: 16px;
  background: var(--surface-soft);
  border-left: 3px solid var(--accent);
}

.platform-update--hermes {
  border-left-color: #ff6b6b;
}

.platform-update .eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}

.platform-update-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.platform-update-header .eyebrow {
  margin-bottom: 0;
}

/* Platform logos ship transparent, so sit them on white to read on the dark card. */
.platform-logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: #ffffff;
  border-radius: 6px;
  padding: 4px;
  box-sizing: border-box;
  object-fit: contain;
}

.platform-update h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
}

.platform-update ul {
  margin-top: 10px;
  padding-left: 18px;
}

.platform-update ul li {
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--side-copy);
}

.news-company-pulse {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.news-company-pulse > p:first-child {
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 16px;
}

.company-pulse-entry {
  margin-bottom: 20px;
  padding: 16px;
  background: var(--surface-soft);
  border-left: 3px solid var(--muted);
}

.company-pulse-entry .eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}

.company-pulse-entry h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
}

.news-sources-inline {
  margin-top: 10px;
  font-size: 12px;
}

.news-sources-inline a {
  color: var(--link-fill);
  text-decoration: underline;
}

.news-sources-inline a:hover {
  color: var(--link-fill-hover);
}

/* --- Company pulse logo layout --- */

.company-pulse-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.company-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: white;
  border-radius: 4px;
  padding: 4px;
  box-sizing: border-box;
}

.company-pulse-meta {
  flex: 1;
}

.company-pulse-meta .eyebrow {
  margin-bottom: 4px;
}

.company-pulse-meta h4 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.company-pulse-summary {
  margin-top: 8px;
  line-height: 1.5;
}

/* --- Why it matters section --- */

.news-why-it-matters {
  margin-top: 20px;
  padding: 16px;
  background: var(--surface-soft);
  border-left: 3px solid var(--accent);
}

.news-why-it-matters > p:first-child {
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 8px;
}

.news-why-it-matters p:last-child {
  color: var(--side-copy);
  line-height: 1.5;
}
