:root {
  color-scheme: light;
  --bg: #f2f0e8;
  --surface: #fffdf6;
  --surface-raised: #ffffff;
  --surface-soft: #e8ebe3;
  --ink: #17201d;
  --ink-soft: #37423d;
  --muted: #6c756f;
  --faint: #5f6b64;
  --line: #d8ddd5;
  --line-strong: #bcc4bb;
  --navy: #142b38;
  --navy-2: #1c3b49;
  --teal: #1f7566;
  --teal-bright: #5fc4ac;
  --orange: #e9603c;
  --orange-dark: #b94226;
  --action: #a73c25;
  --action-hover: #872e1c;
  --on-action: #ffffff;
  --lime: #c9e66b;
  --amber: #f1bc5b;
  --red: #bd4538;
  --green: #2f7d58;
  --shadow-sm: 0 1px 2px rgb(23 32 29 / 6%);
  --shadow-md: 0 12px 34px rgb(23 32 29 / 10%);
  --shadow-lg: 0 30px 80px rgb(18 33 40 / 22%);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --topbar-height: 72px;
  --safe-top: env(safe-area-inset-top, 0px);
  --sidebar-width: 258px;
  --font-ui: Inter, "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Bahnschrift SemiCondensed", "Arial Narrow", var(--font-ui);
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1514;
  --surface: #151d1b;
  --surface-raised: #1a2421;
  --surface-soft: #202b27;
  --ink: #edf2ed;
  --ink-soft: #cbd3cc;
  --muted: #99a59e;
  --faint: #aeb8b2;
  --line: #2d3934;
  --line-strong: #445149;
  --navy: #102832;
  --navy-2: #183946;
  --teal: #58b49f;
  --teal-bright: #75d3bb;
  --orange: #f27855;
  --orange-dark: #fd9376;
  --action: #a73c25;
  --action-hover: #c34a30;
  --on-action: #ffffff;
  --lime: #c8df77;
  --amber: #edbd69;
  --red: #ef7d6f;
  --green: #75c99d;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 20%);
  --shadow-md: 0 12px 34px rgb(0 0 0 / 25%);
  --shadow-lg: 0 30px 80px rgb(0 0 0 / 48%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

a {
  color: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--orange) 45%, transparent);
  outline-offset: 2px;
}

::selection {
  background: color-mix(in srgb, var(--lime) 58%, transparent);
  color: var(--ink);
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
  text-decoration: none;
}

.skip-link:focus {
  transform: none;
}

.topbar {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto 0;
  height: calc(var(--topbar-height) + var(--safe-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--safe-top) max(22px, env(safe-area-inset-right, 0px)) 0 max(22px, env(safe-area-inset-left, 0px));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(18px);
}

.topbar__left,
.topbar__actions,
.top-progress,
.brand,
.search-trigger,
.top-action {
  display: flex;
  align-items: center;
}

.topbar__left {
  gap: 10px;
}

.topbar__actions {
  gap: 9px;
}

.brand {
  width: calc(var(--sidebar-width) - 22px);
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand__mark {
  width: 32px;
  height: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 3px;
  padding: 5px;
  border-radius: 8px;
  background: var(--navy);
  transform: rotate(-2deg);
}

.brand__mark i {
  display: block;
  border-radius: 2px 2px 1px 1px;
  background: var(--lime);
}

.brand__mark i:nth-child(1) {
  height: 42%;
}

.brand__mark i:nth-child(2) {
  height: 80%;
}

.brand__mark i:nth-child(3) {
  height: 60%;
  background: var(--orange);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.05;
}

.brand strong {
  font: 800 16px/1 var(--font-display);
  letter-spacing: 0.08em;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.19em;
}

.icon-button,
.top-action,
.search-trigger {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--surface-raised);
  cursor: pointer;
}

.icon-button {
  width: 44px;
  justify-content: center;
  border-radius: 12px;
  font-size: 18px;
}

.top-action {
  gap: 7px;
  padding: 0 13px;
  border-radius: 12px;
  font-weight: 650;
}

.search-trigger {
  width: min(31vw, 360px);
  gap: 10px;
  padding: 0 10px 0 13px;
  border-radius: 12px;
  color: var(--muted);
  text-align: left;
}

.search-trigger__icon {
  color: var(--ink);
  font-size: 20px;
}

.search-trigger > span:nth-child(2) {
  flex: 1;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 22px;
  padding: 0 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font: 600 11px/1 var(--font-ui);
}

.top-progress {
  gap: 10px;
  margin-left: 6px;
  padding-left: 15px;
  border-left: 1px solid var(--line);
}

.top-progress__ring {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--navy) 82%, white);
  background: var(--navy);
  color: #f8fbf7;
  font-size: 10px;
  font-weight: 800;
}

.top-progress__copy small,
.top-progress__copy strong {
  display: block;
  line-height: 1.2;
}

.top-progress__copy small {
  color: var(--muted);
  font-size: 10px;
}

.top-progress__copy strong {
  margin-top: 3px;
  font-size: 13px;
}

.sidebar {
  position: fixed;
  z-index: 40;
  inset: calc(var(--topbar-height) + var(--safe-top)) auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 14px 16px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.nav-label,
.nav-label-row {
  margin: 0;
  color: var(--faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-label {
  padding: 0 12px 8px;
}

.nav-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 8px;
}

.nav-label-row .nav-label {
  padding: 0;
}

.nav-label-row span {
  font-variant-numeric: tabular-nums;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 11px;
  padding: 0 11px;
  border-radius: 11px;
  color: var(--ink-soft);
  font-weight: 620;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.nav-item:hover {
  background: var(--surface-soft);
  color: var(--ink);
  transform: translateX(2px);
}

.nav-item.is-active {
  background: var(--navy);
  color: #f8fbf7;
}

.nav-icon {
  width: 20px;
  color: currentColor;
  text-align: center;
  font-size: 17px;
  line-height: 1;
}

.nav-pulse {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 99px;
  background: var(--action);
  color: var(--on-action);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.nav-count {
  min-width: 20px;
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 99px;
  background: var(--amber);
  color: #17201d;
  font-size: 9px;
  text-align: center;
}

.nav-separator {
  height: 1px;
  margin: 18px 10px;
  background: var(--line);
}

.stage-nav {
  display: grid;
  gap: 2px;
}

.stage-nav__item {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
}

.stage-nav__item:hover,
.stage-nav__item.is-active {
  background: var(--surface-soft);
  color: var(--ink);
}

.stage-nav__item.is-current .stage-nav__code {
  background: var(--orange);
  color: white;
}

.stage-nav__code {
  width: 28px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
  color: var(--muted);
  font: 800 9px/1 var(--font-ui);
}

.stage-nav__name {
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-nav__status {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}

.stage-nav__item.is-current .stage-nav__status {
  background: var(--lime);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 22%, transparent);
}

.sidebar__footer {
  margin-top: 28px;
}

.authority-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--amber) 45%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--amber) 12%, var(--surface));
}

.authority-card__icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--amber) 65%, var(--line));
  border-radius: 50%;
  color: var(--ink);
  font: 800 12px/1 var(--font-ui);
}

.authority-card strong,
.authority-card p {
  display: block;
  margin: 0;
}

.authority-card strong {
  font-size: 11px;
}

.authority-card p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.snapshot {
  margin: 12px 4px 0;
  color: var(--faint);
  font-size: 9px;
  text-align: center;
}

.sidebar-scrim {
  display: none;
}

.main-content {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding-top: calc(var(--topbar-height) + var(--safe-top));
}

.page {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 34px clamp(24px, 4vw, 64px) 80px;
}

.page--narrow {
  max-width: 1080px;
}

.boot-state {
  min-height: calc(100vh - var(--topbar-height));
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--muted);
}

.boot-state__mark {
  width: 36px;
  height: 36px;
  border: 3px solid var(--line);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  font: 780 clamp(34px, 4.5vw, 64px)/0.98 var(--font-display);
  letter-spacing: -0.035em;
}

.page-lead {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 18px);
}

.section {
  margin-top: 34px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.section-header h2 {
  margin: 0;
  font: 750 clamp(22px, 2.4vw, 31px)/1.1 var(--font-display);
  letter-spacing: -0.02em;
}

.section-header p {
  max-width: 590px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  border: 0;
  background: none;
  color: var(--teal);
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.text-link:hover {
  color: var(--orange-dark);
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--action);
  color: var(--on-action);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--action) 24%, transparent);
}

.button--primary:hover {
  background: var(--action-hover);
}

.button--dark {
  border-color: color-mix(in srgb, white 10%, transparent);
  background: #f7faf5;
  color: var(--navy);
}

.button--outline {
  border-color: var(--line-strong);
  background: var(--surface-raised);
  color: var(--ink);
}

.button--quiet {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

.task-hero {
  position: relative;
  min-height: 390px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: #f7fbf6;
  box-shadow: var(--shadow-md);
}

.task-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-image:
    linear-gradient(rgb(255 255 255 / 9%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 9%) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(90deg, #000, transparent 72%);
  pointer-events: none;
}

.task-hero__copy,
.task-hero__principle {
  position: relative;
  z-index: 1;
}

.task-hero__copy {
  align-self: center;
  padding: clamp(32px, 5vw, 62px);
}

.task-hero__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: rgb(247 251 246 / 68%);
  font: 750 10px/1.4 var(--font-mono);
  letter-spacing: 0.04em;
}

.task-hero__meta .status-pill--current {
  background: var(--lime);
  color: #17201d;
}

.task-hero h1 {
  max-width: 760px;
  margin: 19px 0 0;
  font: 790 clamp(40px, 5vw, 70px)/0.98 var(--font-display);
  letter-spacing: -0.04em;
}

.task-hero__copy > p {
  max-width: 680px;
  margin: 18px 0 0;
  color: rgb(247 251 246 / 76%);
  font-size: clamp(14px, 1.4vw, 17px);
}

.task-hero__evidence {
  max-width: 680px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  padding: 11px 13px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 11px;
  background: rgb(255 255 255 / 7%);
  color: rgb(247 251 246 / 82%);
  font: 650 11px/1.45 var(--font-mono);
}

.task-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.task-hero__actions .button--outline {
  border-color: rgb(255 255 255 / 26%);
  background: rgb(255 255 255 / 7%);
  color: white;
}

.task-hero__principle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(30px, 4vw, 50px);
  border-left: 1px solid rgb(255 255 255 / 11%);
  background:
    radial-gradient(circle at 90% 0%, rgb(95 196 172 / 24%), transparent 43%),
    rgb(255 255 255 / 3%);
}

.task-hero__principle .eyebrow {
  color: var(--teal-bright);
}

.task-hero__principle h2 {
  margin: 8px 0 0;
  font: 780 clamp(28px, 3vw, 43px)/1.02 var(--font-display);
  letter-spacing: -0.03em;
}

.task-hero__principle h2 em {
  color: var(--lime);
  font-style: normal;
}

.task-hero__principle > p:not(.eyebrow) {
  margin: 15px 0 0;
  color: rgb(247 251 246 / 66%);
  font-size: 12px;
}

.task-window-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgb(255 255 255 / 12%);
}

.task-window-status strong {
  font: 800 31px/1 var(--font-display);
}

.task-window-status span {
  color: rgb(247 251 246 / 64%);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.05em;
}

.authority-strip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
  padding: 17px 19px;
  border-color: color-mix(in srgb, var(--amber) 45%, var(--line));
  background: color-mix(in srgb, var(--amber) 8%, var(--surface));
}

.authority-strip__mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--amber) 65%, var(--line));
  border-radius: 50%;
  font-weight: 850;
}

.authority-strip strong,
.authority-strip p {
  margin: 0;
}

.authority-strip p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.dashboard-hero {
  position: relative;
  min-height: 378px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: #f7fbf6;
  box-shadow: var(--shadow-md);
}

.dashboard-hero::before,
.dashboard-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.dashboard-hero::before {
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(rgb(255 255 255 / 9%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 9%) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(90deg, #000, transparent 78%);
}

.dashboard-hero::after {
  width: 370px;
  height: 370px;
  right: -160px;
  top: -180px;
  border: 70px solid color-mix(in srgb, var(--teal-bright) 25%, transparent);
  border-radius: 50%;
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: clamp(30px, 5vw, 62px);
}

.hero-copy .eyebrow {
  color: var(--lime);
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0;
  font: 780 clamp(38px, 5.2vw, 74px)/0.94 var(--font-display);
  letter-spacing: -0.045em;
}

.hero-copy h1 em {
  color: var(--lime);
  font-style: normal;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 650px;
  margin: 20px 0 0;
  color: rgb(240 246 241 / 74%);
  font-size: clamp(14px, 1.5vw, 17px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 27px;
}

.hero-side {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 34px;
  border-left: 1px solid rgb(255 255 255 / 10%);
  background: rgb(255 255 255 / 3%);
}

.progress-orbit {
  position: relative;
  width: min(260px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.progress-orbit::before,
.progress-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.progress-orbit::before {
  inset: 0;
  border: 1px dashed rgb(255 255 255 / 27%);
  animation: orbit 22s linear infinite;
}

.progress-orbit::after {
  inset: 21px;
  background:
    radial-gradient(circle at center, var(--navy-2) 58%, transparent 60%),
    conic-gradient(var(--lime) var(--progress, 0%), rgb(255 255 255 / 12%) 0);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 10%);
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

.progress-orbit__dot {
  position: absolute;
  z-index: 2;
  top: 2px;
  width: 14px;
  height: 14px;
  border: 4px solid var(--navy);
  border-radius: 50%;
  background: var(--orange);
}

.progress-orbit__value {
  position: relative;
  z-index: 3;
  text-align: center;
}

.progress-orbit__value strong,
.progress-orbit__value span {
  display: block;
}

.progress-orbit__value strong {
  font: 800 54px/1 var(--font-display);
  letter-spacing: -0.04em;
}

.progress-orbit__value span {
  margin-top: 7px;
  color: rgb(255 255 255 / 60%);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.progress-orbit__label {
  position: absolute;
  z-index: 3;
  right: -4px;
  bottom: 34px;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--orange);
  color: white;
  font-size: 10px;
  font-weight: 800;
  transform: rotate(-4deg);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(290px, 0.6fr);
  gap: 20px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.panel__head h2,
.panel__head h3 {
  margin: 0;
  font: 750 19px/1.2 var(--font-display);
}

.panel__head small {
  color: var(--muted);
}

.resume-card {
  position: relative;
  padding: 24px;
  overflow: hidden;
  background: var(--surface-raised);
}

.resume-card--review {
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--amber) 12%, transparent), transparent 52%),
    var(--surface-raised);
}

.resume-card::after {
  content: attr(data-day);
  position: absolute;
  top: 8px;
  right: 16px;
  color: color-mix(in srgb, var(--line) 68%, transparent);
  font: 850 64px/1 var(--font-display);
  letter-spacing: -0.05em;
  pointer-events: none;
}

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

.resume-card__meta,
.task-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.status-pill,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-pill--current {
  background: color-mix(in srgb, var(--orange) 14%, var(--surface));
  color: var(--orange-dark);
}

.status-pill--planned {
  background: var(--surface-soft);
  color: var(--muted);
}

.status-pill--current::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--orange);
}

.resume-card h3 {
  max-width: 580px;
  margin: 15px 0 0;
  font: 770 clamp(24px, 3vw, 36px)/1.08 var(--font-display);
  letter-spacing: -0.025em;
}

.resume-card > p {
  max-width: 600px;
  margin: 11px 0 0;
  color: var(--muted);
}

.resume-card__evidence {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font: 600 11px/1.4 var(--font-mono);
}

.resume-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.quick-stat {
  min-height: 112px;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.quick-stat:nth-child(even) {
  border-right: 0;
}

.quick-stat:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.quick-stat__icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  margin-bottom: 11px;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--teal);
  font-weight: 800;
}

.quick-stat strong,
.quick-stat small {
  display: block;
}

.quick-stat strong {
  font: 750 19px/1.1 var(--font-display);
}

.quick-stat small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.route-card {
  padding: 24px 20px 20px;
}

.route-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(9, minmax(54px, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.route-track::before {
  content: "";
  position: absolute;
  top: 20px;
  right: 5%;
  left: 5%;
  height: 2px;
  background: var(--line);
}

.route-node {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  text-align: center;
}

.route-node__dot {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font: 800 10px/1 var(--font-ui);
  transition: transform 150ms ease, border-color 150ms ease;
}

.route-node:hover .route-node__dot {
  transform: translateY(-3px);
  border-color: var(--teal);
}

.route-node.is-current .route-node__dot {
  border-color: var(--orange);
  background: var(--orange);
  color: white;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--orange) 12%, transparent);
}

.route-node__name {
  max-width: 90px;
  font-size: 9px;
  line-height: 1.2;
}

.task-list {
  display: grid;
  gap: 10px;
}

.task-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.task-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.task-card.is-complete {
  background: color-mix(in srgb, var(--green) 6%, var(--surface));
}

.task-check {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-raised);
  color: transparent;
  cursor: pointer;
}

.task-card.is-complete .task-check {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.task-card h3 {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.25;
}

.task-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.task-open {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--teal);
  text-decoration: none;
}

.freshness-list {
  display: grid;
}

.freshness-row {
  display: grid;
  grid-template-columns: 46px minmax(150px, 0.7fr) auto minmax(240px, 1.5fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 70px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

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

.freshness-stage {
  color: var(--faint);
  font: 800 10px/1 var(--font-ui);
}

.freshness-resource strong,
.freshness-resource small {
  display: block;
}

.freshness-resource strong {
  font-size: 13px;
}

.freshness-resource small {
  margin-top: 3px;
  color: var(--faint);
  font-size: 9px;
}

.freshness-state {
  min-width: 62px;
  display: inline-flex;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.freshness-state--current {
  background: color-mix(in srgb, var(--green) 13%, var(--surface));
  color: var(--green);
}

.freshness-state--updated {
  background: color-mix(in srgb, var(--orange) 14%, var(--surface));
  color: var(--orange-dark);
}

.freshness-state--watch {
  background: color-mix(in srgb, var(--amber) 18%, var(--surface));
  color: color-mix(in srgb, var(--amber) 65%, var(--ink));
}

.freshness-note {
  color: var(--muted);
  font-size: 11px;
}

.external-link {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--teal);
  text-decoration: none;
}

.external-link:hover {
  background: var(--surface-soft);
}

.stage-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.55fr);
  gap: 24px;
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.stage-hero__code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.stage-hero h1 {
  max-width: 720px;
  margin: 10px 0 0;
  font: 780 clamp(38px, 5vw, 68px)/0.96 var(--font-display);
  letter-spacing: -0.04em;
}

.stage-hero__english {
  margin: 8px 0 0;
  color: var(--faint);
  font: 650 16px/1.2 var(--font-display);
  letter-spacing: 0.04em;
}

.stage-hero__summary {
  max-width: 680px;
  margin: 21px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.stage-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.stage-hero__side {
  display: grid;
  align-content: center;
  gap: 10px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.stage-fact {
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.stage-fact small,
.stage-fact strong {
  display: block;
}

.stage-fact small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stage-fact strong {
  margin-top: 6px;
  font-size: 13px;
}

.topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.topic-chip {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface-raised);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
}

.outcome-card {
  position: relative;
  overflow: hidden;
  padding: 24px 24px 24px 74px;
  border-radius: var(--radius-md);
  background: var(--navy);
  color: #f5f9f4;
}

.outcome-card::before {
  content: "✓";
  position: absolute;
  top: 24px;
  left: 24px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--lime);
  color: var(--navy);
  font-weight: 900;
}

.outcome-card h2 {
  margin: 0;
  font: 750 18px/1.2 var(--font-display);
}

.outcome-card p {
  margin: 8px 0 0;
  color: rgb(255 255 255 / 72%);
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.roadmap-stage {
  position: relative;
  min-height: 222px;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.roadmap-stage:hover {
  transform: translateY(-3px);
  border-color: var(--teal);
  box-shadow: var(--shadow-md);
}

.roadmap-stage.is-current {
  border-color: color-mix(in srgb, var(--orange) 60%, var(--line));
  background: color-mix(in srgb, var(--orange) 4%, var(--surface));
}

.roadmap-stage__number {
  color: var(--line-strong);
  font: 850 58px/0.9 var(--font-display);
  letter-spacing: -0.07em;
}

.roadmap-stage.is-current .roadmap-stage__number {
  color: var(--orange);
}

.roadmap-stage h2 {
  margin: 0;
  font: 750 24px/1.1 var(--font-display);
}

.roadmap-stage h2 small {
  display: block;
  margin-top: 5px;
  color: var(--faint);
  font: 600 11px/1.2 var(--font-ui);
}

.roadmap-stage p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.roadmap-stage__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  color: var(--faint);
  font-size: 10px;
}

.roadmap-stage__arrow {
  color: var(--teal);
  font-size: 18px;
}

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  margin-top: 25px;
}

.library-search {
  position: relative;
}

.library-search span {
  position: absolute;
  top: 50%;
  left: 15px;
  color: var(--muted);
  transform: translateY(-50%);
}

.library-search input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 43px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-chip {
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.filter-chip.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: white;
}

.library-count {
  margin: 15px 0;
  color: var(--muted);
  font-size: 11px;
}

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

.document-card {
  min-height: 184px;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.document-card:hover {
  transform: translateY(-2px);
  border-color: var(--teal);
  box-shadow: var(--shadow-sm);
}

.document-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--faint);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.document-card__read {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
}

.document-card.is-read .document-card__read {
  background: var(--green);
}

.document-card h2 {
  margin: 14px 0 0;
  font: 730 17px/1.2 var(--font-display);
}

.document-card p {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.document-card__path {
  margin-top: auto;
  padding-top: 14px;
  overflow: hidden;
  color: var(--faint);
  font: 600 9px/1.2 var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-page {
  padding-right: clamp(20px, 3vw, 44px);
  padding-left: clamp(20px, 3vw, 44px);
}

.doc-toolbar {
  max-width: 1180px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto 16px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.breadcrumb a {
  color: var(--teal);
  text-decoration: none;
}

.breadcrumb span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-actions {
  display: flex;
  gap: 8px;
}

.doc-layout {
  max-width: 1180px;
  display: grid;
  grid-template-columns: minmax(0, 860px) 240px;
  align-items: start;
  gap: 28px;
  margin: 0 auto;
}

.doc-paper {
  min-width: 0;
  padding: clamp(26px, 5vw, 62px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.doc-paper__header {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.doc-paper__header h1 {
  margin: 8px 0 0;
  font: 780 clamp(34px, 4vw, 54px)/1.02 var(--font-display);
  letter-spacing: -0.035em;
}

.doc-path {
  margin: 13px 0 0;
  color: var(--faint);
  font: 600 10px/1.4 var(--font-mono);
  word-break: break-all;
}

.markdown-body {
  font-size: 15px;
  line-height: 1.78;
}

.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  position: relative;
  scroll-margin-top: 96px;
  font-family: var(--font-display);
  letter-spacing: -0.018em;
}

.markdown-body h2 {
  margin: 45px 0 15px;
  padding-top: 10px;
  font-size: 29px;
  line-height: 1.12;
}

.markdown-body h3 {
  margin: 31px 0 11px;
  font-size: 21px;
  line-height: 1.2;
}

.markdown-body h4 {
  margin: 24px 0 8px;
  font-size: 17px;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol {
  color: var(--ink-soft);
}

.markdown-body li + li {
  margin-top: 5px;
}

.markdown-body a {
  color: var(--teal);
  font-weight: 650;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.markdown-body blockquote {
  margin: 22px 0;
  padding: 13px 18px;
  border-left: 4px solid var(--orange);
  border-radius: 0 10px 10px 0;
  background: var(--surface-soft);
}

.markdown-body blockquote p {
  margin: 0;
}

.markdown-body code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--orange-dark);
  font: 0.88em/1.5 var(--font-mono);
}

.markdown-body pre {
  position: relative;
  max-width: 100%;
  margin: 20px 0;
  overflow: auto;
  border: 1px solid color-mix(in srgb, white 8%, transparent);
  border-radius: 12px;
  background: #12202a;
  color: #eef5f0;
  box-shadow: inset 0 1px rgb(255 255 255 / 5%);
}

.markdown-body pre code {
  display: block;
  min-width: max-content;
  padding: 18px;
  border: 0;
  background: none;
  color: inherit;
  font-size: 12px;
}

.copy-code {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 7px;
  background: rgb(255 255 255 / 7%);
  color: rgb(255 255 255 / 70%);
  font-size: 9px;
  cursor: pointer;
}

.markdown-body table {
  width: 100%;
  margin: 22px 0;
  border-collapse: collapse;
  border: 1px solid var(--line);
  font-size: 12px;
}

.markdown-body th,
.markdown-body td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.markdown-body th {
  background: var(--surface-soft);
  font-weight: 750;
}

.markdown-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 24px auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.markdown-body hr {
  height: 1px;
  margin: 34px 0;
  border: 0;
  background: var(--line);
}

.mermaid-card {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--teal) 35%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--teal) 6%, var(--surface));
}

.mermaid-card__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--navy);
  color: var(--lime);
  font-weight: 850;
}

.mermaid-card strong,
.mermaid-card small {
  display: block;
}

.mermaid-card small {
  margin-top: 3px;
  color: var(--muted);
}

.doc-toc {
  position: sticky;
  top: calc(var(--topbar-height) + 22px);
  max-height: calc(100vh - var(--topbar-height) - 44px);
  padding: 16px;
  overflow-y: auto;
  border-left: 1px solid var(--line);
}

.doc-toc__label {
  margin: 0 0 10px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.doc-toc a {
  display: block;
  padding: 5px 8px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-decoration: none;
}

.doc-toc a[data-level="3"] {
  padding-left: 18px;
}

.doc-toc a:hover,
.doc-toc a.is-active {
  border-left-color: var(--orange);
  color: var(--ink);
}

.doc-footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.doc-footer-nav a {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  text-decoration: none;
}

.doc-footer-nav a:last-child {
  text-align: right;
}

.doc-footer-nav small,
.doc-footer-nav strong {
  display: block;
}

.doc-footer-nav small {
  color: var(--faint);
  font-size: 9px;
}

.doc-footer-nav strong {
  margin-top: 4px;
  font-size: 11px;
}

.quiz-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 20px;
  margin-top: 26px;
}

.quiz-card {
  min-height: 430px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.quiz-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.quiz-progress__bar {
  height: 5px;
  flex: 1;
  overflow: hidden;
  border-radius: 99px;
  background: var(--line);
}

.quiz-progress__bar i {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--orange);
  transition: width 200ms ease;
}

.quiz-card h2 {
  max-width: 740px;
  margin: 30px 0 0;
  font: 750 clamp(24px, 3vw, 35px)/1.16 var(--font-display);
  letter-spacing: -0.025em;
}

.quiz-options {
  display: grid;
  gap: 9px;
  margin-top: 25px;
}

.quiz-option {
  min-height: 52px;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-raised);
  color: var(--ink-soft);
  text-align: left;
  cursor: pointer;
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--teal);
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-option__letter {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 800;
}

.quiz-option.is-correct {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 8%, var(--surface));
}

.quiz-option.is-correct .quiz-option__letter {
  background: var(--green);
  color: white;
}

.quiz-option.is-wrong {
  border-color: var(--red);
  background: color-mix(in srgb, var(--red) 7%, var(--surface));
}

.quiz-option.is-wrong .quiz-option__letter {
  background: var(--red);
  color: white;
}

.quiz-feedback {
  margin-top: 17px;
  padding: 13px 15px;
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 12px;
}

.quiz-feedback strong {
  color: var(--ink);
}

.quiz-next {
  margin-top: 18px;
}

.quiz-side {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.quiz-side h3 {
  margin: 0;
  font: 740 17px/1.2 var(--font-display);
}

.quiz-score {
  margin: 18px 0;
  padding: 18px;
  border-radius: 13px;
  background: var(--navy);
  color: white;
  text-align: center;
}

.quiz-score strong,
.quiz-score small {
  display: block;
}

.quiz-score strong {
  font: 800 45px/1 var(--font-display);
}

.quiz-score small {
  margin-top: 5px;
  color: rgb(255 255 255 / 60%);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.quiz-disclaimer {
  padding: 12px;
  border-left: 3px solid var(--amber);
  background: color-mix(in srgb, var(--amber) 10%, var(--surface));
  color: var(--muted);
  font-size: 10px;
}

.quiz-feedback small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font: 650 10px/1.4 var(--font-mono);
}

.quiz-complete-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.research-preview .panel__head > div p:last-child {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

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

.research-preview .research-grid {
  padding: 16px;
}

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

.research-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.research-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.research-card--conflict {
  border-color: color-mix(in srgb, var(--amber) 62%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--amber) 10%, transparent), transparent 52%),
    var(--surface-raised);
}

.research-card.is-watched::after {
  content: "WATCHED";
  position: absolute;
  right: 14px;
  bottom: 13px;
  color: color-mix(in srgb, var(--green) 55%, transparent);
  font: 800 9px/1 var(--font-mono);
  letter-spacing: 0.12em;
  pointer-events: none;
}

.research-card.is-highlighted {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 18%, transparent), var(--shadow-md);
  animation: source-highlight 1.2s ease both;
}

@keyframes source-highlight {
  0% { transform: translateY(7px); }
}

.research-card__top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.platform-pill,
.source-stage,
.source-state {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 99px;
  font: 750 8px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.platform-pill--youtube {
  background: color-mix(in srgb, #ff0033 12%, var(--surface));
  color: color-mix(in srgb, #d6002b 84%, var(--ink));
}

.platform-pill--x {
  background: var(--ink);
  color: var(--surface);
}

.platform-pill--github {
  background: color-mix(in srgb, var(--navy) 13%, var(--surface));
  color: var(--navy-2);
}

[data-theme="dark"] .platform-pill--github {
  color: var(--ink);
}

.platform-pill--official {
  background: color-mix(in srgb, var(--teal) 13%, var(--surface));
  color: var(--teal);
}

.source-stage {
  border: 1px solid var(--line);
  color: var(--muted);
}

.source-state {
  margin-left: auto;
  background: var(--surface-soft);
  color: var(--muted);
}

.source-state--watched,
.source-state--updated {
  background: color-mix(in srgb, var(--green) 13%, var(--surface));
  color: var(--green);
}

.source-state--conflict {
  background: color-mix(in srgb, var(--amber) 19%, var(--surface));
  color: color-mix(in srgb, var(--orange-dark) 75%, var(--ink));
}

.source-state--reference {
  background: color-mix(in srgb, var(--navy) 10%, var(--surface));
  color: var(--muted);
}

.research-card h3 {
  margin: 15px 0 0;
  font: 760 21px/1.12 var(--font-display);
  letter-spacing: -0.015em;
}

.research-card > p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.research-card .research-card__meta {
  margin-top: 7px;
  color: var(--faint);
  font: 650 9px/1.4 var(--font-mono);
}

.research-decision {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  margin-top: 14px;
  padding: 11px 12px;
  border-left: 3px solid var(--teal);
  background: color-mix(in srgb, var(--teal) 7%, var(--surface));
  color: var(--ink-soft);
  font-size: 11px;
}

.research-decision strong {
  color: var(--teal);
  font: 750 9px/1.5 var(--font-mono);
  text-transform: uppercase;
}

.timestamp-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.timestamp-list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 700;
  text-decoration: none;
}

.timestamp-list a:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
}

.timestamp-list a span {
  color: var(--orange);
}

.timestamp-list a small {
  color: var(--faint);
  font-family: var(--font-mono);
}

.research-card__footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: auto;
  padding-top: 16px;
}

.source-checked {
  color: var(--faint);
  font: 650 8px/1.4 var(--font-mono);
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-links a,
.source-open {
  color: var(--teal);
  font-size: 9px;
  font-weight: 750;
  text-decoration: none;
}

.source-links a:hover,
.source-open:hover {
  text-decoration: underline;
}

.source-watch {
  min-height: 44px;
  margin-left: auto;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}

.source-watch[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--green) 42%, var(--line));
  background: color-mix(in srgb, var(--green) 9%, var(--surface));
  color: var(--green);
}

.radar-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 34px;
  padding: clamp(28px, 5vw, 54px);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 82% 12%, rgb(95 196 172 / 22%), transparent 31%),
    linear-gradient(135deg, var(--navy), #0e2028);
  color: white;
  box-shadow: var(--shadow-md);
}

.radar-hero .eyebrow,
.radar-hero .page-lead {
  color: rgb(255 255 255 / 68%);
}

.radar-hero .page-title {
  max-width: 820px;
  margin-top: 10px;
  color: white;
}

.radar-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  align-self: end;
  min-width: 330px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 15px;
  background: rgb(255 255 255 / 6%);
  backdrop-filter: blur(12px);
}

.radar-stats span {
  display: grid;
  gap: 3px;
  padding: 15px;
  border-right: 1px solid rgb(255 255 255 / 12%);
}

.radar-stats span:last-child {
  border-right: 0;
}

.radar-stats strong {
  font: 800 28px/1 var(--font-display);
}

.radar-stats small {
  color: rgb(255 255 255 / 58%);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.provenance-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.provenance-step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.provenance-step b {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  font-size: 8px;
}

.provenance-strip > i {
  color: var(--line-strong);
  font-style: normal;
}

.provenance-strip .text-link {
  margin-left: auto;
}

.radar-toolbar {
  align-items: flex-end;
}

.review-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.review-summary > div {
  display: grid;
  gap: 4px;
  padding: 19px;
  border-right: 1px solid var(--line);
}

.review-summary > div:last-child {
  border-right: 0;
}

.review-summary strong {
  font: 800 30px/1 var(--font-display);
}

.review-summary span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.review-empty .button {
  margin-top: 18px;
}

.review-caught-up {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 22px;
}

.review-caught-up__mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--green) 13%, var(--surface));
  color: var(--green);
  font-size: 24px;
}

.review-caught-up h2,
.review-caught-up p {
  margin: 0;
}

.review-caught-up p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.review-list {
  display: grid;
  gap: 12px;
}

.review-card {
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.review-card.is-revealed {
  border-color: color-mix(in srgb, var(--teal) 42%, var(--line));
}

.review-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  color: var(--faint);
  font: 700 8px/1.4 var(--font-mono);
}

.review-card h3 {
  max-width: 800px;
  margin: 14px 0 0;
  font: 760 22px/1.25 var(--font-display);
}

.review-reveal {
  margin-top: 18px;
}

.review-answer {
  margin-top: 18px;
  padding: 15px;
  border-left: 3px solid var(--teal);
  background: color-mix(in srgb, var(--teal) 7%, var(--surface));
}

.review-answer strong {
  color: var(--teal);
}

.review-answer p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 13px;
}

.scheduled-review > div:last-child {
  display: grid;
}

.scheduled-review > div:last-child > span {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.scheduled-review > div:last-child > span:first-child {
  border-top: 0;
}

.scheduled-review strong {
  color: var(--ink-soft);
  font-family: var(--font-mono);
}

.local-data-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 22px;
}

.local-data-card h2,
.local-data-card p {
  margin: 0;
}

.local-data-card h2 {
  font: 760 22px/1.2 var(--font-display);
}

.local-data-card p:not(.eyebrow) {
  max-width: 680px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.local-data-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-state {
  padding: 54px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  color: var(--ink);
  font: 750 21px/1.2 var(--font-display);
}

.empty-state p {
  margin: 8px 0 0;
}

.command-dialog,
.focus-dialog {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.command-dialog::backdrop,
.focus-dialog::backdrop {
  background: rgb(8 18 23 / 66%);
  backdrop-filter: blur(7px);
}

.command-box {
  width: min(760px, calc(100% - 28px));
  max-height: min(680px, calc(100vh - 80px));
  margin: 10vh auto 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-lg);
}

.command-input-wrap {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px 17px;
  border-bottom: 1px solid var(--line);
}

.command-input-wrap > span {
  font-size: 23px;
}

.command-input-wrap input {
  min-width: 0;
  height: 38px;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
}

.command-input-wrap input::placeholder {
  color: var(--faint);
}

.command-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}

.command-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 17px;
  background: var(--surface-soft);
  color: var(--faint);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.command-results {
  max-height: 490px;
  padding: 9px;
  overflow-y: auto;
}

.command-result {
  width: 100%;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.command-result:hover,
.command-result.is-selected {
  background: var(--surface-soft);
}

.command-result__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--teal);
  font-weight: 800;
}

.command-result strong,
.command-result small {
  display: block;
}

.command-result strong {
  font-size: 12px;
}

.command-result small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-result__type {
  color: var(--faint);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.focus-panel {
  position: relative;
  width: min(500px, calc(100% - 28px));
  margin: 10vh auto 0;
  padding: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.dialog-close {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}

.focus-panel h2 {
  margin: 0;
  font: 780 34px/1.1 var(--font-display);
}

.focus-intro {
  margin: 11px auto 0;
  color: var(--muted);
  font-size: 11px;
}

.timer {
  margin: 31px 0 24px;
  font: 800 clamp(64px, 15vw, 88px)/0.9 var(--font-mono);
  letter-spacing: -0.08em;
  font-variant-numeric: tabular-nums;
}

.timer-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.timer-presets button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.timer-presets button.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: white;
}

.timer-actions {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 24px;
}

.toast-region {
  position: fixed;
  z-index: 120;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 8px;
}

.toast {
  max-width: 360px;
  padding: 12px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--shadow-md);
  font-size: 11px;
  animation: toast-in 180ms ease both;
}

.noscript-card {
  position: fixed;
  z-index: 200;
  inset: calc(var(--topbar-height) + var(--safe-top)) 0 0 0;
  display: grid;
  place-content: center;
  padding: 32px;
  background: var(--surface);
  color: var(--ink);
  text-align: center;
}

.noscript-card h1,
.noscript-card p {
  margin: 0;
}

.noscript-card h1 {
  font: 780 42px/1 var(--font-display);
}

.noscript-card p {
  max-width: 620px;
  margin-top: 14px;
  color: var(--muted);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

.index-return {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-raised);
  color: var(--ink-soft);
  text-decoration: none;
}

.index-return > span:first-child {
  color: var(--teal);
  font-size: 17px;
}

.index-return > span:last-child {
  display: grid;
}

.index-return strong {
  font-size: 11px;
}

.index-return small {
  color: var(--muted);
  font-size: 9px;
}

.index-return:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.mobile-tabbar {
  display: none;
}

.learning-loop-intro {
  padding: 22px;
}

.learning-loop-intro__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

.learning-loop-intro__head h2 {
  margin: 0;
  font: 760 clamp(24px, 2.7vw, 36px)/1.05 var(--font-display);
  letter-spacing: -0.03em;
}

.learning-loop-intro__head p:not(.eyebrow) {
  max-width: 660px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.learning-loop-intro__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 22px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  list-style: none;
  overflow: hidden;
}

.learning-loop-intro__steps li {
  min-height: 102px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 15px 17px;
  background: var(--surface-raised);
}

.learning-loop-intro__steps li + li {
  border-left: 1px solid var(--line);
}

.learning-loop-intro__steps span {
  color: var(--orange-dark);
  font: 800 9px/1 var(--font-mono);
}

.learning-loop-intro__steps strong {
  font-size: 13px;
}

.learning-loop-intro__steps small {
  color: var(--muted);
  font-size: 10px;
}

.task-card.is-next {
  border-color: color-mix(in srgb, var(--orange) 72%, var(--line));
  box-shadow: inset 3px 0 0 var(--orange);
}

.task-card__meta b {
  margin-left: 4px;
  padding: 2px 6px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--orange) 15%, var(--surface));
  color: var(--orange-dark);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.task-card__evidence {
  display: block;
  margin-top: 7px;
  color: var(--faint);
  font: 600 9px/1.45 var(--font-mono);
  overflow-wrap: anywhere;
}

.session-page {
  max-width: 1180px;
}

.session-breadcrumb {
  margin: 0 0 16px;
}

.session-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: #f7fbf6;
  box-shadow: var(--shadow-md);
}

.session-hero__copy {
  align-self: center;
  padding: clamp(30px, 5vw, 58px);
}

.session-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgb(247 251 246 / 68%);
  font: 750 10px/1.4 var(--font-mono);
}

.session-kicker span {
  padding: 4px 8px;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 99px;
}

.session-hero h1 {
  max-width: 720px;
  margin: 20px 0 0;
  font: 790 clamp(40px, 5.4vw, 68px)/0.98 var(--font-display);
  letter-spacing: -0.04em;
}

.session-hero__copy > p {
  max-width: 680px;
  margin: 18px 0 0;
  color: rgb(247 251 246 / 76%);
  font-size: 15px;
}

.session-hero__actions,
.session-finish__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.session-hero__actions .button--outline {
  border-color: rgb(255 255 255 / 26%);
  background: rgb(255 255 255 / 7%);
  color: white;
}

.session-deliverable {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 44px);
  border-left: 1px solid rgb(255 255 255 / 12%);
  background:
    radial-gradient(circle at 90% 5%, rgb(201 230 107 / 18%), transparent 42%),
    rgb(255 255 255 / 4%);
}

.session-deliverable .eyebrow {
  color: var(--lime);
}

.session-deliverable h2 {
  margin: 4px 0 18px;
  font: 760 27px/1.05 var(--font-display);
  letter-spacing: -0.025em;
}

.session-deliverable code {
  display: block;
  padding: 12px 14px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 10px;
  background: rgb(0 0 0 / 18%);
  color: #f2f7ec;
  font: 650 11px/1.5 var(--font-mono);
  overflow-wrap: anywhere;
}

.session-deliverable .text-link {
  align-self: flex-start;
  min-height: 44px;
  margin-top: 8px;
  color: var(--teal-bright);
}

.session-deliverable > small {
  margin-top: 16px;
  color: rgb(247 251 246 / 61%);
  font-size: 10px;
}

.session-loop__progress {
  min-width: 70px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--teal);
  font: 800 13px/1 var(--font-mono);
  text-align: center;
}

.session-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.session-step {
  min-height: 132px;
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: start;
  gap: 15px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.session-step:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.session-step.is-complete {
  border-color: color-mix(in srgb, var(--green) 65%, var(--line));
  background: color-mix(in srgb, var(--green) 7%, var(--surface));
}

.session-step__number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface-raised);
  color: var(--orange-dark);
  font: 800 10px/1 var(--font-mono);
}

.session-step.is-complete .session-step__number {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.session-step > span:last-child {
  display: grid;
  gap: 8px;
}

.session-step strong {
  font-size: 15px;
}

.session-step small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.reflection-card__body {
  padding: 20px;
}

.reflection-card__body label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 750;
}

.reflection-card__body textarea {
  width: 100%;
  min-height: 128px;
  resize: vertical;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface-raised);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}

.reflection-card__body textarea::placeholder {
  color: var(--faint);
}

.reflection-card__body > p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.session-finish {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 24px;
}

.session-finish.is-complete {
  border-color: color-mix(in srgb, var(--green) 52%, var(--line));
  background: color-mix(in srgb, var(--green) 7%, var(--surface));
}

.session-finish h2 {
  margin: 0;
  font: 760 27px/1.08 var(--font-display);
}

.session-finish p:not(.eyebrow) {
  max-width: 590px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.session-finish__actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-top: 0;
}

.mobile-only {
  display: none;
}

@media (max-width: 1180px) {
  .dashboard-hero {
    grid-template-columns: 1fr 320px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

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

  .freshness-row {
    grid-template-columns: 40px minmax(150px, 0.8fr) auto minmax(200px, 1fr) auto;
  }

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

  .radar-hero {
    grid-template-columns: 1fr;
  }

  .radar-stats {
    min-width: 0;
  }
}

@media (max-width: 920px) {
  :root {
    --sidebar-width: 280px;
  }

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

  .mobile-search-button {
    display: none;
  }

  .brand {
    width: auto;
  }

  .sidebar {
    transform: translateX(-105%);
    box-shadow: var(--shadow-lg);
    transition: transform 190ms ease;
  }

  .menu-open .sidebar {
    transform: none;
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 35;
    inset: calc(var(--topbar-height) + var(--safe-top)) 0 0 var(--sidebar-width);
    border: 0;
    background: rgb(7 16 20 / 48%);
  }

  .menu-open .sidebar-scrim {
    display: block;
  }

  .main-content {
    margin-left: 0;
  }

  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .task-hero {
    grid-template-columns: 1fr;
  }

  .task-hero__principle {
    border-top: 1px solid rgb(255 255 255 / 11%);
    border-left: 0;
  }

  .session-hero {
    grid-template-columns: 1fr;
  }

  .session-deliverable {
    border-top: 1px solid rgb(255 255 255 / 12%);
    border-left: 0;
  }

  .hero-side {
    display: none;
  }

  .stage-hero {
    grid-template-columns: 1fr;
  }

  .stage-hero__side {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0;
    border: 0;
  }

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

  .doc-toc {
    display: none;
  }

  .quiz-shell {
    grid-template-columns: 1fr;
  }

  .research-grid {
    grid-template-columns: 1fr;
  }

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

  .radar-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  :root {
    --topbar-height: 68px;
  }

  body {
    font-size: 16px;
  }

  .mobile-search-button {
    display: inline-flex;
  }

  .topbar {
    padding: var(--safe-top) max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px));
  }

  .brand small,
  .search-trigger,
  .top-progress__copy,
  .desktop-label {
    display: none;
  }

  .brand strong {
    font-size: 14px;
  }

  .topbar__actions {
    gap: 6px;
  }

  .top-action {
    width: 44px;
    justify-content: center;
    padding: 0;
  }

  .top-progress {
    margin-left: 0;
    padding-left: 7px;
  }

  .page {
    padding: 24px 15px calc(106px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-tabbar {
    position: fixed;
    z-index: 45;
    inset: auto 0 0 0;
    min-height: calc(68px + env(safe-area-inset-bottom, 0px));
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 5px max(7px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(7px, env(safe-area-inset-left, 0px));
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 95%, transparent);
    backdrop-filter: blur(18px);
  }

  .mobile-tabbar a,
  .mobile-tabbar button {
    position: relative;
    min-width: 0;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    padding: 4px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    cursor: pointer;
  }

  .mobile-tabbar a.is-active {
    background: var(--surface-soft);
    color: var(--ink);
  }

  .mobile-tabbar a > span,
  .mobile-tabbar button > span {
    font-size: 19px;
    line-height: 1;
  }

  .mobile-tabbar small {
    font-size: 9px;
    font-weight: 750;
  }

  .mobile-tabbar b {
    position: absolute;
    top: 6px;
    left: calc(50% + 7px);
    min-width: 17px;
    padding: 2px 5px;
    border-radius: 99px;
    background: var(--amber);
    color: #17201d;
    font-size: 8px;
    line-height: 1.2;
  }

  .task-hero {
    min-height: 0;
  }

  .task-hero__copy,
  .task-hero__principle {
    padding: 25px 21px;
  }

  .task-hero h1 {
    margin-top: 15px;
    font-size: clamp(38px, 11vw, 48px);
  }

  .task-hero__copy > p {
    margin-top: 14px;
    font-size: 15px;
  }

  .task-hero__evidence {
    align-items: flex-start;
    font-size: 10px;
    overflow-wrap: anywhere;
  }

  .task-hero__actions .button {
    flex: 1 1 auto;
  }

  .task-hero__principle h2 {
    font-size: 29px;
  }

  .task-window-status {
    margin-top: 18px;
    padding-top: 16px;
  }

  .authority-strip {
    grid-template-columns: auto 1fr;
  }

  .authority-strip .text-link {
    grid-column: 1 / -1;
    margin-left: 53px;
  }

  .dashboard-hero {
    min-height: 430px;
  }

  .hero-copy {
    align-self: end;
    padding: 28px 22px 31px;
  }

  .hero-copy h1 {
    font-size: clamp(42px, 13vw, 60px);
  }

  .hero-actions .button {
    flex: 1 1 auto;
  }

  .section-header {
    align-items: flex-start;
  }

  .section-header .text-link {
    margin-top: 5px;
    font-size: 11px;
  }

  .route-card {
    overflow-x: auto;
  }

  .route-track {
    min-width: 670px;
  }

  .task-card {
    grid-template-columns: auto 1fr auto;
  }

  .learning-loop-intro {
    padding: 19px;
  }

  .learning-loop-intro__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .learning-loop-intro__steps {
    grid-template-columns: 1fr;
  }

  .learning-loop-intro__steps li {
    min-height: 82px;
  }

  .learning-loop-intro__steps li + li {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .session-hero__copy,
  .session-deliverable {
    padding: 25px 21px;
  }

  .session-hero h1 {
    font-size: clamp(38px, 11vw, 48px);
  }

  .session-hero__actions .button {
    flex: 1 1 auto;
  }

  .session-steps {
    grid-template-columns: 1fr;
  }

  .session-step {
    min-height: 126px;
    padding: 18px;
  }

  .session-finish {
    align-items: flex-start;
    flex-direction: column;
  }

  .session-finish__actions {
    width: 100%;
    justify-content: stretch;
  }

  .session-finish__actions .button {
    flex: 1 1 auto;
  }

  .task-open {
    display: grid;
  }

  .freshness-row {
    grid-template-columns: 38px 1fr auto;
    gap: 9px;
  }

  .freshness-note {
    grid-column: 2 / -1;
  }

  .freshness-row .external-link {
    display: none;
  }

  .stage-hero {
    padding: 26px 20px;
  }

  .stage-hero__side {
    grid-template-columns: 1fr;
  }

  .roadmap-grid,
  .document-grid {
    grid-template-columns: 1fr;
  }

  .roadmap-stage {
    min-height: 195px;
    grid-template-columns: 54px 1fr;
    padding: 20px;
  }

  .roadmap-stage__number {
    font-size: 46px;
  }

  .library-toolbar {
    grid-template-columns: 1fr;
  }

  .filter-chips {
    flex-wrap: nowrap;
    padding-bottom: 4px;
    overflow-x: auto;
  }

  .filter-chip {
    min-height: 44px;
    white-space: nowrap;
  }

  .doc-toolbar {
    align-items: flex-start;
  }

  .doc-actions .button span {
    display: none;
  }

  .doc-paper {
    padding: 23px 18px 30px;
  }

  .markdown-body {
    font-size: 14px;
  }

  .markdown-body h2 {
    font-size: 24px;
  }

  .markdown-body table {
    display: block;
    overflow-x: auto;
  }

  .doc-footer-nav {
    grid-template-columns: 1fr;
  }

  .doc-footer-nav a:last-child {
    text-align: left;
  }

  .command-box {
    margin-top: 2dvh;
    max-height: 94dvh;
  }

  .command-hint span:last-child {
    display: none;
  }

  .focus-panel {
    margin-top: 4vh;
    padding: 32px 20px;
  }

  .timer {
    font-size: 64px;
  }

  .research-grid--compact {
    grid-template-columns: 1fr;
  }

  .radar-hero {
    gap: 24px;
    padding: 28px 22px;
  }

  .radar-hero .page-title {
    font-size: clamp(38px, 12vw, 54px);
  }

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

  .radar-stats span {
    min-width: 0;
    padding: 12px 8px;
  }

  .radar-stats strong {
    font-size: 23px;
  }

  .provenance-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .provenance-strip > i {
    display: none;
  }

  .provenance-strip .text-link {
    margin: 5px 0 0;
  }

  .source-state {
    margin-left: 0;
  }

  .source-watch {
    margin-left: 0;
  }

  .review-summary {
    grid-template-columns: 1fr;
  }

  .review-summary > div {
    grid-template-columns: auto 1fr;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .review-summary > div:last-child {
    border-bottom: 0;
  }

  .review-caught-up {
    grid-template-columns: auto 1fr;
  }

  .review-caught-up .button {
    grid-column: 1 / -1;
  }

  .scheduled-review > div:last-child > span {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .local-data-card {
    grid-template-columns: 1fr;
  }

  .local-data-card__actions .button {
    flex: 1 1 auto;
  }
}

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