/* Constructive Alignment Playground — styles */

:root {
  /* text-only shades of the accent colours, 4.5:1 or better on every course background (30 Sep 2026) */
  --text-ochre: #855c15; --text-green: #4c6a3a; --text-brown: #8e4f22;
  --paper: #f5f2ea;
  --card: #fcfaf4;
  --inset: #efeadd;
  --ink: #23261f;
  --ink-soft: #474b40;
  --muted: #6b6557;
  --hair: #ddd6c4;
  --hair-strong: #c9c1ab;
  --danger: #a8442c;
  --danger-soft: #f4e6df;
  --ok: #587d4b;
  --ok-soft: #e9eedd;
  --warn: #b7822f;
  --warn-soft: #f5ecd8;
  --ai: #6c58a8;
  --ai-soft: #ece7f4;
  --c-ilo: #34708b;
  --c-tla: #5d7b49;
  --c-assess: #a25e2e;
  --font-ui: "Schibsted Grotesk", system-ui, sans-serif;
  --font-display: "Newsreader", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

.app { min-height: 100vh; display: flex; flex-direction: column; }
.app.type-editorial { --font-head: var(--font-display); }
.app.type-grotesk { --font-head: var(--font-ui); }

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding: 26px 44px 0 44px;
  border-bottom: 1px solid var(--hair-strong);
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.masthead-id { padding-bottom: 18px; }

.masthead-eyebrow {
  margin: 0 0 4px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.masthead-title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.type-editorial .masthead-title { font-optical-sizing: auto; }

.lens-tabs { display: flex; gap: 4px; }

.lens-tab {
  appearance: none;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 14px 16px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  cursor: pointer;
  color: var(--muted);
  font-family: var(--font-ui);
  transition: color 0.15s ease;
}

.lens-tab:hover { color: var(--ink-soft); }

.lens-tab.is-active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.lens-tab-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.lens-tab-name { font-size: 15.5px; font-weight: 600; }

/* ---------- layout ---------- */

.layout {
  display: grid;
  grid-template-columns: minmax(380px, 5fr) minmax(420px, 6fr);
  gap: 48px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 44px 64px 44px;
  flex: 1;
  align-items: start;
}

.stage {
  position: sticky;
  top: 28px;
}

.stage-caption {
  margin: 6px auto 0 auto;
  max-width: 420px;
  text-align: center;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.panel { min-width: 0; }

.lens-panel { display: flex; flex-direction: column; gap: 18px; }

/* ---------- triangle ---------- */

.tri-svg { width: 100%; height: auto; display: block; }

.tri-ground {
  fill: var(--c-ilo);
  opacity: 0.05;
  transition: fill 0.4s ease, opacity 0.4s ease;
}
.tri-ground.is-broken { fill: var(--danger); opacity: 0.06; }
.tri-mode-genai .tri-ground { fill: var(--ai); opacity: 0.06; }

.tri-edge-hit { stroke: transparent; stroke-width: 30; }
.tri-edge-line {
  stroke: var(--hair-strong);
  stroke-width: 2;
  transition: stroke 0.3s ease, stroke-width 0.3s ease;
}
.tri-edge:hover .tri-edge-line { stroke: var(--ink-soft); }
.tri-edge.is-selected .tri-edge-line { stroke: var(--ink); stroke-width: 3.5; }
.tri-edge.is-dim { opacity: 0.45; }

.tri-edge-flow {
  stroke: var(--muted);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1.5 14;
  opacity: 0.7;
}
.tri-motion .tri-edge-flow { animation: tri-flow 1.8s linear infinite; }
@keyframes tri-flow { to { stroke-dashoffset: -15.5; } }

.tri-edge.is-broken .tri-edge-line {
  stroke: var(--danger);
  stroke-dasharray: 5 7;
  opacity: 0.8;
}

.tri-break-glyph line { stroke: var(--danger); stroke-width: 3.5; stroke-linecap: round; }

/* the fracture glyph and flow dots are always in the SVG; broken state toggles them */
.tri-break-glyph { display: none; }
.tri-edge.is-broken .tri-break-glyph { display: inline; }
.tri-edge.is-broken .tri-edge-flow { display: none; }

.tri-node-dot {
  transition: transform 0.25s ease, fill 0.3s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.tri-node-ilo .tri-node-dot { fill: var(--c-ilo); }
.tri-node-tla .tri-node-dot { fill: var(--c-tla); }
.tri-node-assess .tri-node-dot { fill: var(--c-assess); }

.tri-node-halo {
  fill: none;
  stroke-width: 1.5;
  opacity: 0;
  transition: opacity 0.25s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.tri-node-ilo .tri-node-halo { stroke: var(--c-ilo); fill: var(--c-ilo); fill-opacity: 0.1; }
.tri-node-tla .tri-node-halo { stroke: var(--c-tla); fill: var(--c-tla); fill-opacity: 0.1; }
.tri-node-assess .tri-node-halo { stroke: var(--c-assess); fill: var(--c-assess); fill-opacity: 0.1; }

.tri-node:hover .tri-node-halo { opacity: 0.55; }
.tri-node.is-selected .tri-node-halo { opacity: 1; }
.tri-node.is-selected .tri-node-dot { transform: scale(1.25); }
.tri-node.is-dim { opacity: 0.45; }

.tri-node.is-broken .tri-node-dot { fill: var(--danger); }
.tri-node.is-broken .tri-node-halo { stroke: var(--danger); fill: var(--danger); fill-opacity: 0.1; opacity: 1; }
.tri-node-x {
  fill: #fff;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 16px;
  pointer-events: none;
  display: none;
}
.tri-node.is-broken .tri-node-x { display: inline; }

.tri-node-label {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 17.5px;
  fill: var(--ink);
}
.tri-node.is-broken .tri-node-label { fill: var(--danger); }
.tri-node-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--muted);
}

/* backwash arrows */
.tri-path-teacher path {
  fill: none;
  stroke: var(--c-ilo);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 10 7;
}
.tri-path-student path {
  fill: none;
  stroke: var(--c-assess);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 10 7;
}
.tri-motion .tri-path-teacher path { animation: tri-march 1.4s linear infinite; }
.tri-motion .tri-path-student path { animation: tri-march 1.4s linear infinite; }
@keyframes tri-march { to { stroke-dashoffset: -17; } }

.tri-arrowhead-teach { fill: var(--c-ilo); }
.tri-arrowhead-stud { fill: var(--c-assess); }
.tri-arrowhead-ai { fill: var(--ai); }

.tri-path-label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}
.tri-path-label-teach { fill: var(--c-ilo); }
.tri-path-label-stud { fill: var(--text-brown); }
.tri-path-label-align { fill: var(--muted); }

/* GenAI arrows */
.tri-ai-arrow line {
  stroke: var(--ai);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 5 9;
  opacity: 0.75;
}
.tri-motion .tri-ai-arrow line { animation: tri-press 1.2s linear infinite; }
@keyframes tri-press { to { stroke-dashoffset: -14; } }
.tri-ai-arrow.is-selected line { stroke-width: 4.5; opacity: 1; }

/* ---------- cards & detail ---------- */

.detail-card {
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 26px 28px;
}

.detail-kicker {
  margin: 0 0 6px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.detail-kicker-edge { color: var(--muted); }

.detail-title {
  margin: 0 0 12px 0;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 25px;
  line-height: 1.18;
  letter-spacing: -0.005em;
}

.detail-body {
  margin: 0 0 12px 0;
  font-size: 17px;
  line-height: 1.68;
  color: var(--ink-soft);
}
.detail-body:last-child { margin-bottom: 0; }
.detail-body-tight { margin: 8px 0 18px 0; font-size: 14.5px; }

.detail-craft {
  margin: 0 0 16px 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.detail-craft li {
  position: relative;
  padding-left: 20px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.detail-craft li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 7px;
  height: 7px;
  background: var(--hair-strong);
}

.detail-example {
  background: var(--inset);
  border-radius: 6px;
  padding: 16px 18px;
}
.detail-example-kicker {
  margin: 0 0 6px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.detail-example-text {
  margin: 0;
  font-family: var(--font-head);
  font-size: 17px;
  line-height: 1.5;
  font-style: italic;
}
.type-grotesk .detail-example-text { font-style: normal; font-size: 15.5px; }

.detail-hint {
  margin: 14px 0 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.edge-pair { display: flex; flex-direction: column; gap: 12px; }
.edge-pair-item { display: flex; flex-direction: column; gap: 3px; }
.edge-pair-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.edge-pair-text { font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); }

.footnote {
  margin: 2px 0 0 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
}

.ghost-btn {
  align-self: flex-start;
  appearance: none;
  background: none;
  border: none;
  padding: 4px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  border-bottom: 1px solid var(--hair-strong);
}
.ghost-btn:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- discipline picker ---------- */

.disc-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.disc-pick {
  appearance: none;
  text-align: left;
  background: none;
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  font-family: var(--font-ui);
  color: var(--muted);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.disc-pick:hover { border-color: var(--hair-strong); color: var(--ink-soft); }
.disc-pick.is-active {
  background: var(--card);
  border-color: var(--ink);
  color: var(--ink);
}
.disc-pick-name { font-size: 15px; font-weight: 600; }
.disc-pick-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; }

/* ---------- misalignment ---------- */

.break-controls {
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.break-controls-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.break-switch-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

.break-switch {
  appearance: none;
  background: none;
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.break-switch:hover { border-color: var(--hair-strong); }
.break-switch-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--corner-c);
  transition: background 0.2s ease;
}
.break-switch-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.break-switch-state {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.break-switch.is-broken {
  background: var(--danger-soft);
  border-color: var(--danger);
}
.break-switch.is-broken .break-switch-dot { background: var(--danger); }
.break-switch.is-broken .break-switch-state { color: var(--danger); }

.meter { display: flex; flex-direction: column; gap: 7px; }
.meter-head { display: flex; justify-content: space-between; align-items: baseline; }
.meter-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.meter-label { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; }
.meter-label-0 { color: var(--text-green); }
.meter-label-1 { color: var(--text-ochre); }
.meter-label-2, .meter-label-3 { color: var(--danger); }
.meter-track {
  height: 6px;
  border-radius: 3px;
  background: var(--inset);
  overflow: hidden;
}
.meter-fill { height: 100%; border-radius: 3px; transition: width 0.55s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.4s ease; }
.meter-fill-0 { background: var(--ok); }
.meter-fill-1 { background: var(--warn); }
.meter-fill-2, .meter-fill-3 { background: var(--danger); }

.aligned-rows { display: flex; flex-direction: column; gap: 14px; margin-bottom: 4px; }
.aligned-row { display: flex; flex-direction: column; gap: 3px; }
.aligned-row-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.aligned-row-text { font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); }

.break-card {
  background: var(--card);
  border: 1px solid color-mix(in oklab, var(--danger) 38%, var(--hair));
  border-radius: 8px;
  padding: 24px 26px;
}
.break-card-kicker {
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.break-card-tag {
  background: var(--danger);
  color: #fdf8f3;
  border-radius: 3px;
  padding: 2px 7px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
}
.break-card-quote {
  margin: 0 0 16px 0;
  font-family: var(--font-head);
  font-style: italic;
  font-size: 19px;
  line-height: 1.45;
}
.type-grotesk .break-card-quote { font-style: normal; font-size: 17px; font-weight: 500; }

.break-card-row { padding: 12px 0 0 0; margin-top: 12px; border-top: 1px solid var(--hair); }
.break-card-head {
  margin: 0 0 4px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.break-card-text { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); }
.break-card-repair .break-card-head { color: var(--text-green); }
.break-card-repair { border-top-color: color-mix(in oklab, var(--ok) 35%, var(--hair)); }

/* ---------- backwash ---------- */

.detail-card-intro .path-strip { margin-top: 14px; }

.path-strip {
  border-radius: 6px;
  padding: 13px 16px;
  background: var(--inset);
}
.path-strip-teach { box-shadow: inset 3px 0 0 var(--c-ilo); }
.path-strip-stud { box-shadow: inset 3px 0 0 var(--c-assess); }
.path-strip-title {
  margin: 0 0 7px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.path-strip-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.path-strip-item {
  font-size: 15px;
  font-weight: 600;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 99px;
  padding: 4px 12px;
}
.path-strip-stud .path-strip-item { border-color: color-mix(in oklab, var(--c-assess) 40%, var(--hair)); }
.path-strip-teach .path-strip-item { border-color: color-mix(in oklab, var(--c-ilo) 40%, var(--hair)); }
.path-strip-arrow { color: var(--muted); font-size: 14px; }

.sim-block {
  border-top: 1px solid var(--hair-strong);
  padding-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sim-kicker {
  margin: 0 0 -8px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.sim-block .detail-title { margin-bottom: 0; }

.exam-picker { display: flex; flex-direction: column; gap: 8px; }
.exam-pick {
  appearance: none;
  text-align: left;
  background: none;
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 13px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.exam-pick:hover { border-color: var(--hair-strong); }
.exam-pick.is-active { background: var(--card); border-color: var(--ink); }
.exam-pick-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.exam-pick-desc { font-size: 15px; line-height: 1.5; color: var(--muted); }

.sim-result {
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sim-result-head {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.study-bars { display: flex; flex-direction: column; gap: 9px; }
.study-bar {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) 2fr 38px;
  align-items: center;
  gap: 12px;
}
.study-bar-label { font-size: 13px; line-height: 1.3; color: var(--ink-soft); }
.study-bar-track {
  display: block;
  height: 14px;
  border-radius: 3px;
  background: var(--inset);
  overflow: hidden;
}
.study-bar-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--ink-soft);
}
.motion-on .study-bar-fill { animation: bar-grow 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
@keyframes bar-grow { from { width: 0; } }
.study-bar:first-child .study-bar-fill { background: var(--ink); }
.study-bar-pct {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.verdict { border-radius: 6px; padding: 14px 17px; }
.verdict-positive { background: var(--ok-soft); box-shadow: inset 3px 0 0 var(--ok); }
.verdict-partial { background: var(--warn-soft); box-shadow: inset 3px 0 0 var(--warn); }
.verdict-negative { background: var(--danger-soft); box-shadow: inset 3px 0 0 var(--danger); }
.verdict-line { margin: 0 0 8px 0; font-size: 14.5px; font-weight: 600; line-height: 1.5; }
.verdict-positive .verdict-line { color: var(--text-green); }
.verdict-partial .verdict-line { color: var(--text-ochre); }
.verdict-negative .verdict-line { color: var(--danger); }
.verdict-learned { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-soft); }

.bq { margin: 0; padding: 4px 0 0 0; }
.bq p {
  margin: 0 0 8px 0;
  font-family: var(--font-head);
  font-style: italic;
  font-size: 19px;
  line-height: 1.5;
}
.bq cite {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- genai ---------- */

.detail-card-ai { border-color: color-mix(in oklab, var(--ai) 30%, var(--hair)); }

.pressure-stack { display: flex; flex-direction: column; gap: 10px; }

.pressure-card {
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.pressure-card.is-open { border-color: var(--corner-c); }

.pressure-head {
  appearance: none;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "corner title chevron" "corner claim chevron";
  column-gap: 14px;
  row-gap: 2px;
  align-items: center;
  cursor: pointer;
  font-family: var(--font-ui);
}
.pressure-corner {
  grid-area: corner;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--corner-c);
  border: 1px solid color-mix(in oklab, var(--corner-c) 45%, var(--hair));
  border-radius: 99px;
  padding: 4px 10px;
}
.pressure-title {
  grid-area: title;
  font-family: var(--font-head);
  font-size: 18.5px;
  font-weight: 500;
  color: var(--ink);
}
.pressure-claim { grid-area: claim; font-size: 15px; color: var(--muted); }
.pressure-chevron {
  grid-area: chevron;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--muted);
}

.pressure-body { padding: 0 20px 20px 20px; }
.pressure-moves-head {
  margin: 14px 0 8px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--corner-c);
}
.pressure-body .detail-craft { margin-bottom: 0; }
.pressure-body .detail-craft li::before { background: color-mix(in oklab, var(--corner-c) 55%, var(--hair)); }

/* roads-to-rome note + modal */
.roads-note {
  appearance: none;
  text-align: left;
  width: 100%;
  background: var(--ai-soft);
  border: 1px solid color-mix(in oklab, var(--ai) 35%, var(--hair));
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.roads-note:hover { border-color: var(--ai); }
.roads-note-kicker {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ai);
}
.roads-note-text { font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); }
.roads-note-cta {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--ai);
}

.roads-overlay {
  position: fixed;
  inset: 0;
  background: rgba(35, 38, 31, 0.45);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.roads-modal {
  position: relative;
  background: var(--card);
  border: 1px solid var(--hair-strong);
  border-radius: 10px;
  padding: 30px 34px;
  max-width: 640px;
  width: 100%;
  max-height: min(82vh, 760px);
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(35, 38, 31, 0.25);
}
.roads-close {
  position: absolute;
  top: 14px;
  right: 16px;
  appearance: none;
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
}
.roads-close:hover { color: var(--ink); }
.roads-list { display: flex; flex-direction: column; }
.roads-item { border-top: 1px solid var(--hair); padding: 14px 0; }
.roads-item:first-child { border-top: none; padding-top: 4px; }
.roads-item-name {
  margin: 0 0 5px 0;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 500;
}
.roads-item-body { margin: 0; font-size: 14px; line-height: 1.65; color: var(--ink-soft); }
.roads-closing {
  margin: 4px 0 12px 0;
  border-top: 1px solid var(--hair);
  padding-top: 14px;
  font-size: 14px;
  line-height: 1.6;
  font-style: italic;
  font-family: var(--font-head);
  color: var(--ink-soft);
}
.type-grotesk .roads-closing { font-style: normal; font-family: var(--font-ui); }

/* redesign table */
.redesign {
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.redesign-cols {
  display: grid;
  grid-template-columns: 1fr 24px 1fr;
  gap: 12px;
}
.redesign-col-head {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.redesign-col-head-after { grid-column: 3; color: var(--ai); }
.redesign-row {
  display: grid;
  grid-template-columns: 1fr 24px 1fr;
  gap: 12px;
  align-items: start;
  border-top: 1px solid var(--hair);
  padding-top: 13px;
}
.redesign-before { font-size: 15px; line-height: 1.55; color: var(--muted); }
.redesign-arrow { text-align: center; color: var(--ai); font-size: 14px; padding-top: 1px; }
.redesign-after { font-size: 15px; line-height: 1.55; color: var(--ink); }

/* reflections */
.reflections { display: flex; flex-direction: column; gap: 16px; }
.reflection {
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.reflection-prompt {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
  font-weight: 500;
}
.reflection-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ai);
  padding-top: 2px;
}
.reflection-input {
  width: 100%;
  resize: vertical;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 6px;
  padding: 11px 13px;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  min-height: 64px;
}
.reflection-input:focus {
  outline: none;
  border-color: var(--ai);
}
.reflection-input::placeholder { color: var(--muted); opacity: 0.8; }

/* download block */
.download-block {
  border: 1px solid var(--hair);
  background: var(--inset);
  border-radius: 8px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.download-copy { flex: 1 1 280px; }
.download-title {
  margin: 0 0 4px 0;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 500;
}
.download-desc { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-soft); }
.download-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.dl-btn {
  appearance: none;
  background: var(--card);
  border: 1px solid var(--hair-strong);
  border-radius: 6px;
  padding: 9px 16px;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.dl-btn:hover { border-color: var(--ink); }
.dl-btn-primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.dl-btn-primary:hover { background: var(--ink-soft); }

/* ---------- colophon ---------- */

.colophon {
  border-top: 1px solid var(--hair-strong);
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 18px 44px 26px 44px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.colophon p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- responsive ---------- */

@media (max-width: 1020px) {
  .layout { grid-template-columns: 1fr; gap: 24px; padding: 24px 24px 48px 24px; }
  .stage { position: static; max-width: 480px; margin: 0 auto; }
  .masthead { padding: 22px 24px 0 24px; }
  .lens-tabs { overflow-x: auto; width: 100%; }
  .colophon { padding: 16px 24px 22px 24px; }
}

@media (max-width: 560px) {
  .masthead-title { font-size: 27px; }
  .lens-tab { padding: 10px 10px 12px 10px; }
  .lens-tab-name { font-size: 14px; }
  .break-switch-row { grid-template-columns: 1fr; }
  .disc-picker { grid-template-columns: 1fr; }
  .study-bar { grid-template-columns: 1fr; gap: 4px; }
  .study-bar-pct { display: none; }
  .redesign-cols { display: none; }
  .redesign-row { grid-template-columns: 1fr; gap: 6px; }
  .redesign-arrow { text-align: left; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .tri-edge-flow, .tri-path-teacher path, .tri-path-student path, .tri-ai-arrow line {
    animation: none !important;
  }
  .study-bar-fill { animation: none !important; }
}
