/* Assignment "labs": a claim, a live experiment that trains in the browser,
   and a verdict. Loaded after site.css and notes.css. */

.lab { padding-bottom: var(--space-5); }
.lab-head { padding: var(--space-6) 0 var(--space-4); max-width: 52rem; }
.lab-head h1 { font-size: clamp(2.2rem, 1.3rem + 3.4vw, 3.8rem); line-height: 1.05; margin-bottom: var(--space-3); }
.lab-head .lede { font-size: 1.15rem; color: var(--muted); max-width: 44rem; margin: 0; }

/* Claim / build / proof */
.cbp { display: grid; gap: .8rem; margin: 0 0 var(--space-5); }
@media (min-width: 900px) { .cbp { grid-template-columns: repeat(3, 1fr); } }
.cbp > div { border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1rem; background: color-mix(in srgb, var(--surface) 88%, transparent); font-size: .95rem; line-height: 1.5; }
.cbp .label { display: block; margin-bottom: .35rem; }

/* The experiment */
.stage { display: grid; gap: 1rem; }
@media (min-width: 800px) { .stage.two { grid-template-columns: 1fr 1fr; } .stage.three { grid-template-columns: repeat(3, 1fr); } }
.panel { border: 1px solid var(--border); border-radius: 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); overflow: hidden; display: flex; flex-direction: column; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; padding: .7rem 1rem; border-bottom: 1px solid var(--border); }
.panel-head b { font-weight: 650; }
.panel-head small { font-family: var(--font-mono); font-size: .7rem; color: var(--muted); }
.panel canvas.square { display: block; width: 100%; aspect-ratio: 1; }
.panel-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; border-top: 1px solid var(--border); margin-top: auto; }
.big { font-family: var(--font-serif); font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.big.good { color: var(--pos); }
.big.bad { color: var(--neg); }
.big small { font-family: var(--font-mono); font-size: .7rem; color: var(--muted); display: block; margin-top: .3rem; letter-spacing: .04em; }
.mini { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); text-align: right; line-height: 1.6; }
.mini b { color: var(--text); font-weight: 600; }

.chart { display: block; width: 100%; height: 11rem; }
.chart-box { border: 1px solid var(--border); border-radius: 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); padding: .8rem 1rem; margin-top: 1rem; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font-family: var(--font-mono); font-size: .72rem; color: var(--muted); margin-bottom: .4rem; }
.legend i { display: inline-block; width: 1.1rem; height: 2px; vertical-align: middle; margin-right: .4rem; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 1rem 0; }
.toolbar .ctl { min-width: 12rem; }

/* Verdict */
.verdict { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; align-items: center; border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.2rem; margin: 1rem 0 var(--space-5); background: color-mix(in srgb, var(--surface) 92%, transparent); transition: border-color .4s ease, background .4s ease; }
.verdict .mark { width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem; border: 1px solid var(--border); color: var(--muted); }
.verdict p { margin: 0; }
.verdict .label { display: block; margin-bottom: .2rem; }
.verdict.is-pass { border-color: var(--pos); background: color-mix(in srgb, var(--pos) 8%, var(--surface)); }
.verdict.is-pass .mark { border-color: var(--pos); color: var(--pos); }
.verdict.is-fail { border-color: var(--neg); }
.verdict.is-fail .mark { border-color: var(--neg); color: var(--neg); }

/* Lower notes */
.lab-notes { display: grid; gap: var(--space-4); }
@media (min-width: 900px) { .lab-notes { grid-template-columns: 1fr 1fr; } }
.lab-notes h2 { font-size: 1.3rem; margin: 0 0 .6rem; }
.lab-notes ul { margin: 0; padding-left: 1.1rem; }
.lab-notes li { margin-bottom: .4rem; }
.spec { font-family: var(--font-mono); font-size: .78rem; line-height: 1.8; color: var(--muted); }
.spec b { color: var(--text); font-weight: 500; }

.lab-nav { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--border); margin-top: var(--space-5); padding-top: var(--space-3); font-family: var(--font-mono); font-size: .8rem; }
.lab-nav a { color: var(--muted); text-decoration: none; }
.lab-nav a:hover { color: var(--accent); }

/* ---------- Session pages: several labs on one page ---------- */
.lab-head .toc-cards { display: grid; gap: .6rem; margin-top: var(--space-4); }
@media (min-width: 720px) { .lab-head .toc-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .lab-head .toc-cards { grid-template-columns: repeat(4, 1fr); } }
.toc-card { display: grid; gap: .35rem; align-content: start; padding: .8rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--text); text-decoration: none; transition: border-color .3s ease, transform .3s cubic-bezier(.16, 1, .3, 1); }
.toc-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.toc-card b { font-weight: 650; line-height: 1.3; }
.status-chip { justify-self: start; font-family: var(--font-mono); font-size: .68rem; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: .15rem .55rem; }
.status-chip.pass { color: var(--pos); border-color: var(--pos); }
.status-chip.fail { color: var(--neg); border-color: var(--neg); }

/* Each assignment is a chapter: its own card, numbered, with a bridge from the last */
.lab-sec { position: relative; margin-top: var(--space-6); padding: clamp(1rem, 3vw, 2.4rem); border: 1px solid var(--border); border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 55%, transparent); scroll-margin-top: 7rem; }
.lab-sec::before { content: ""; position: absolute; left: clamp(1rem, 3vw, 2.4rem); right: clamp(1rem, 3vw, 2.4rem); top: -1px; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 70%); border-radius: 2px; }
.chapter-top { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .4rem; }
.chapter-no { font-family: var(--font-serif); font-size: clamp(3rem, 2rem + 4vw, 5rem); line-height: .9; color: transparent; -webkit-text-stroke: 1px var(--accent); }
.chapter-of { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); letter-spacing: .04em; }
.bridge { font-size: .95rem; color: var(--muted); border-left: 2px solid var(--border); padding-left: .8rem; margin: 0 0 var(--space-3); max-width: 46rem; }
.bridge b { color: var(--text); font-weight: 600; }
.sec-end { margin: var(--space-4) 0 0; font-family: var(--font-mono); font-size: .72rem; color: var(--muted); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px dashed var(--border); padding-top: .8rem; }
.sec-end a { color: var(--muted); text-decoration: none; }
.sec-end a:hover { color: var(--accent); }

/* Sticky chapter bar */
.chapter-bar { position: sticky; top: 3.5rem; z-index: 30; margin: var(--space-5) 0 0; display: flex; gap: .3rem; overflow-x: auto; padding: .45rem; border: 1px solid var(--border); border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); scrollbar-width: none; }
.chapter-bar a { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: .45rem; padding: .4rem .8rem; border-radius: 999px; font-family: var(--font-mono); font-size: .72rem; color: var(--muted); text-decoration: none; white-space: nowrap; transition: background .3s ease, color .3s ease; }
.chapter-bar a:hover { color: var(--text); }
.chapter-bar a.is-active { background: var(--surface-2); color: var(--text); }
.chapter-bar .dot { width: .45rem; height: .45rem; border-radius: 50%; border: 1px solid var(--muted); }
.chapter-bar .dot.pass { background: var(--pos); border-color: var(--pos); }
.chapter-bar .dot.fail { background: var(--neg); border-color: var(--neg); }

/* Concept players: stage on the left, numbered steps on the right */
.concept-grid { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 860px) { .concept-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.concept-stage { min-width: 0; overflow: hidden; border-radius: 10px; }
.concept-stage canvas { display: block; width: 100%; aspect-ratio: 1; max-width: 30rem; margin: 0 auto; border-radius: 10px; }
.concept-steps { list-style: none; margin: 0; padding: 0; counter-reset: st; display: grid; gap: .35rem; }
.concept-steps li { counter-increment: st; }
.concept-steps button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 1.6rem 1fr; gap: .1rem .5rem; width: 100%; padding: .55rem .7rem; border-radius: 10px; border: 1px solid transparent; color: var(--muted); transition: background .3s ease, color .3s ease, border-color .3s ease; }
.concept-steps button::before { content: counter(st, decimal-leading-zero); font-family: var(--font-mono); font-size: .7rem; padding-top: .2rem; grid-row: span 2; }
.concept-steps b { font-weight: 600; font-size: .95rem; }
.concept-steps span { font-size: .85rem; line-height: 1.45; grid-column: 2; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .4s ease, opacity .4s ease; }
.concept-steps .is-on button { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.concept-steps .is-on button::before { color: var(--accent); }
.concept-steps .is-on span { max-height: 12rem; opacity: 1; }
.concept-steps .is-on span { color: var(--muted); }
.concept-steps button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.player-ctl { display: flex; gap: .4rem; }
.player-ctl button { font: 500 .7rem/1 var(--font-mono); color: var(--muted); background: none; border: 1px solid var(--border); border-radius: 999px; padding: .3rem .6rem; cursor: pointer; }
.player-ctl button:hover { color: var(--text); border-color: var(--muted); }
.progress-line { height: 2px; background: var(--border); border-radius: 2px; margin-top: .6rem; overflow: hidden; }
.progress-line i { display: block; height: 100%; width: 0; background: var(--accent); }
.concept-readout { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); text-align: center; margin: .5rem 0 0; min-height: 1.2em; }
.concept-readout b { color: var(--text); font-weight: 500; }
.exp-label { margin: var(--space-4) 0 .8rem; }

/* Concept animations */
.concept { margin: 0 0 var(--space-3); border: 1px solid var(--border); border-radius: 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); overflow: hidden; }
.concept-body { padding: 1rem; }
.concept svg { display: block; width: 100%; height: auto; }
.concept svg text { font-family: var(--font-mono); }
.concept svg text:not([fill]) { fill: var(--text); }
.concept svg .muted { fill: var(--muted); }
.concept-note { font-size: .92rem; color: var(--muted); margin: .6rem 0 0; max-width: 46rem; }
.concept-ticker { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); margin: 0 0 .6rem; }
.concept-ticker b { color: var(--text); font-weight: 500; }
.concept-split { display: grid; gap: 1rem; align-items: center; }
@media (min-width: 720px) { .concept-split { grid-template-columns: minmax(0, 22rem) 1fr; } }
.concept-split canvas { display: block; width: 100%; aspect-ratio: 1; border-radius: 10px; }
.concept-side .big { margin: 0 0 .6rem; }
.mx-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem; min-height: 8.5rem; }
.mx { display: grid; justify-items: center; gap: .3rem; animation: mx-in .5s cubic-bezier(.16, 1, .3, 1) both; }
.mx .mx-cell { display: block; width: calc(var(--c) * .55rem); height: calc(var(--r) * .55rem); border: 1px solid var(--border); border-radius: 3px;
  background: linear-gradient(90deg, var(--border) 1px, transparent 1px) 0 0 / .55rem .55rem, linear-gradient(var(--border) 1px, transparent 1px) 0 0 / .55rem .55rem, var(--surface-2); }
.mx.prod .mx-cell { border-color: var(--accent); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 35%, transparent) 1px, transparent 1px) 0 0 / .55rem .55rem, linear-gradient(color-mix(in srgb, var(--accent) 35%, transparent) 1px, transparent 1px) 0 0 / .55rem .55rem, color-mix(in srgb, var(--accent) 22%, var(--surface-2)); }
.mx small { font-family: var(--font-mono); font-size: .66rem; color: var(--muted); text-align: center; line-height: 1.3; }
.mx.prod small { color: var(--accent); }
.mx-op { font-family: var(--font-mono); color: var(--accent); }
.mx-op.relu { font-size: .7rem; border: 1px solid var(--neg); color: var(--neg); border-radius: 999px; padding: .1rem .4rem; }
@keyframes mx-in { from { opacity: 0; transform: scale(.85); } }
.heat.cnt { grid-template-columns: 3.4rem repeat(9, minmax(0, 1fr)); }
.heat.cnt > span { min-height: 1.4rem; transition: background-color .25s linear; }
.heat.cnt .col { justify-items: center; font-size: .6rem; overflow: hidden; }
.k0 { color: var(--accent) !important; } .k1 { color: var(--pos) !important; } .k2 { color: var(--c4) !important; }
@media (max-width: 30rem) { .heat.cnt .col { writing-mode: vertical-rl; transform: rotate(180deg); } }

/* s1-2 */
#s1-2 .collapse { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .6rem; font-family: var(--font-mono); font-size: .75rem; }
#s1-2 .collapse .m { display: grid; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 6px; }
#s1-2 .collapse .m span { width: .7rem; height: .7rem; border-radius: 2px; }
#s1-2 .collapse .lbl { color: var(--muted); text-align: center; font-size: .65rem; margin-top: .2rem; }
#s1-2 .collapse .op { color: var(--accent); font-size: 1rem; padding: 0 .2rem; }
#s1-2 .collapse .res span { width: 3.4rem; height: 1.6rem; display: grid; place-items: center; color: var(--text); font-size: .72rem; }

/* s1-3 */
#s1-3 .k0 { color: var(--accent); } .k1 { color: var(--pos); } .k2 { color: var(--c4); }
#s1-3 .swatches { display: flex; flex-wrap: wrap; gap: .2rem .9rem; font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }
#s1-3 .swatches i { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .35rem; vertical-align: baseline; }
#s1-3 .nn-wrap { padding: .4rem 1rem .6rem; flex: 1; }
#s1-3 .nn { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: .82rem; font-variant-numeric: tabular-nums; }
#s1-3 .nn th { font-weight: 500; font-size: .68rem; color: var(--muted); text-align: left; padding: .35rem .3rem; border-bottom: 1px solid var(--border); }
#s1-3 .nn td { padding: .32rem .3rem; border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent); }
#s1-3 .nn tr:last-child td { border-bottom: 0; }
#s1-3 .nn td:nth-child(3), #s1-3 .nn th:nth-child(3) { text-align: right; color: var(--muted); }
#s1-3 .nn td:last-child, #s1-3 .nn th:last-child { text-align: center; width: 2rem; }
#s1-3 .nn .ok { color: var(--pos); } .nn .no { color: var(--neg); }
#s1-3 .heat-wrap { padding: .8rem 1rem; }
#s1-3 .heat.nt { grid-template-columns: 3.2rem repeat(9, minmax(0, 1fr)); }
#s1-3 .heat.nt > span { min-height: 1.5rem; font-size: .6rem; transition: background-color .2s linear; }
#s1-3 .heat.nt .col { justify-items: center; padding: 0 0 .2rem; align-self: end; overflow: hidden; }
#s1-3 .grammar { padding: .8rem 1rem; font-size: .92rem; line-height: 1.6; }
#s1-3 .grammar p { margin: 0 0 .6rem; }
#s1-3 .grammar code { white-space: nowrap; }
#s1-3 .grammar pre { margin: 0; font-family: var(--font-mono); font-size: .78rem; line-height: 1.7; color: var(--muted); background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px; padding: .6rem .8rem; overflow-x: auto; }
@media (max-width: 30rem) { #s1-3 .heat.nt .col { writing-mode: vertical-rl; transform: rotate(180deg); justify-items: start; padding: .2rem 0; } }

/* s1-4 */
#s1-4 .panel-foot { flex-wrap: wrap; gap: .6rem 1rem; }
#s1-4 .panel-foot .big { font-size: 1.8rem; }
#s1-4 .chart.gap { height: 14rem; }
#s1-4 .chart-row { display: grid; gap: 0 1rem; }
@media (min-width: 900px) { #s1-4 .chart-row { grid-template-columns: 3fr 2fr; } }
#s1-4 .legend .dash { background: none !important; border-top: 2px dashed var(--muted); height: 0; }
#s1-4 .toolbar .seed { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); }

/* ---------- Session 2: tokenizer write-up + widget ---------- */
.s2 .submit-card { display: grid; gap: 1rem; margin-top: var(--space-4); padding: 1.1rem 1.2rem; border: 1px solid var(--accent); border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
@media (min-width: 860px) { .s2 .submit-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; } }
.s2 .submit-score { display: grid; gap: .2rem; }
.s2 .score-num { font-family: var(--font-serif); font-size: clamp(2.4rem, 1.6rem + 3.4vw, 3.8rem); line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.s2 .score-sub { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }
.s2 .submit-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.s2 .submit-links a { display: flex; align-items: baseline; gap: .8rem; padding: .55rem .8rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .3s ease; }
.s2 .submit-links a:hover { border-color: var(--accent); }
.s2 .submit-links .cat-kind { min-width: 5.5rem; text-align: left; }
.s2 .submit-links .cat-go { margin-left: auto; color: var(--muted); }

.s2 .table-wrap { overflow-x: auto; margin: 0 0 var(--space-3); }
.s2 table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
.s2 .data th { font: 500 .7rem/1.3 var(--font-mono); color: var(--muted); text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.s2 .data td { padding: .5rem .6rem; border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); vertical-align: top; }
.s2 .data .num { text-align: right; font-family: var(--font-mono); font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.s2 .data.design td:first-child { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); white-space: nowrap; }
.s2 .data .lo { color: var(--c4); } .s2 .data .hi { color: var(--accent); }
.s2 .ok { color: var(--pos); } .s2 .bad { color: var(--neg); }
.s2 .calc { font-family: var(--font-mono); font-size: .8rem; line-height: 1.75; background: var(--code-bg); border: 1px solid var(--border); border-radius: 10px; padding: .8rem 1rem; overflow-x: auto; white-space: pre; margin: 0 0 var(--space-3); }
.s2 .calc b { color: var(--accent); font-weight: 600; }
.s2 .checks { list-style: none; padding: 0; margin: 0 0 var(--space-4); display: grid; gap: .3rem; }
.s2 .checks b { color: var(--pos); margin-right: .45rem; }

.s2 .prose { max-width: 48rem; }
.s2 .prose h3 { font-size: 1.15rem; margin: var(--space-4) 0 .5rem; }
.s2 .prose p { margin: 0 0 .8rem; }
.s2 .prose code, .s2 .data code { font-size: .85em; }
.s2 .findings { padding-left: 1.2rem; display: grid; gap: .7rem; margin: var(--space-3) 0; }
.s2 .files { padding-left: 1.1rem; margin: 0; }
.s2 .files li { margin-bottom: .35rem; overflow-wrap: anywhere; }

.s2 .w-panel { margin-bottom: 1rem; }
.s2 .w-body { padding: 1rem; }
.s2 .w-body .aside { margin: .6rem 0; }
.s2 .play-input { margin: .7rem 0 .5rem; min-height: 6rem; resize: vertical; line-height: 1.6; font-family: var(--font-body); font-size: 1rem; }
.s2 .tok-out { display: flex; flex-wrap: wrap; gap: 3px; margin-top: .6rem; font-family: var(--font-mono); font-size: .82rem; }
.s2 .tk { display: inline-grid; justify-items: center; padding: .15rem .35rem; border-radius: 5px; border: 1px solid transparent; white-space: pre; }
.s2 .tk small { font-size: .62rem; color: var(--muted); }
.s2 .tk0 { background: color-mix(in srgb, var(--c4) 22%, var(--surface)); }
.s2 .tk1 { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.s2 .tk2 { background: color-mix(in srgb, var(--pos) 22%, var(--surface)); }
.s2 .tk3 { background: color-mix(in srgb, var(--c3) 22%, var(--surface)); }
.s2 .tk4 { background: color-mix(in srgb, var(--neg) 18%, var(--surface)); }
.s2 .tk-byte { border-color: var(--muted); border-style: dashed; background: var(--surface-2); font-size: .7rem; }
.s2 .tk-nl { color: var(--muted); padding: .15rem .2rem; flex-basis: 100%; height: 0; overflow: hidden; }
.s2 .ids-toggle { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); gap: .4rem; }
.s2 .vocab-search { max-width: 26rem; }
.s2 .vgrid { display: flex; flex-wrap: wrap; gap: 4px; max-height: 22rem; overflow-y: auto; padding: .2rem; }
.s2 .vtok { display: inline-grid; justify-items: center; font-family: var(--font-mono); font-size: .8rem; padding: .2rem .4rem; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); white-space: pre; }
.s2 .vtok small { font-size: .6rem; color: var(--muted); }

/* Session 2 v2: downloads and journey */
.s2 .dl-grid { display: grid; gap: .8rem; }
@media (min-width: 760px) { .s2 .dl-grid { grid-template-columns: repeat(2, 1fr); } }
.s2 .dl-card { display: grid; gap: .3rem; padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--text); text-decoration: none; transition: border-color .3s ease, transform .3s cubic-bezier(.16, 1, .3, 1); }
.s2 .dl-card:hover, .s2 .dl-card:focus-visible { border-color: var(--accent); transform: translateY(-2px); }
.s2 .dl-card.primary { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.s2 .dl-kind { font-family: var(--font-mono); font-size: .7rem; color: var(--muted); text-transform: lowercase; }
.s2 .dl-card b { font-family: var(--font-mono); font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; }
.s2 .dl-desc { font-size: .9rem; color: var(--muted); }
.s2 .dl-meta { font-family: var(--font-mono); font-size: .7rem; color: var(--muted); }
.s2 .dl-go { font-family: var(--font-mono); font-size: .8rem; color: var(--accent); }
.s2 .journey { list-style: none; margin: 0 0 var(--space-4); padding: 0 0 0 .4rem; border-left: 2px solid var(--border); display: grid; gap: .2rem; max-width: 52rem; }
.s2 .journey li { position: relative; display: grid; grid-template-columns: 7.5rem 1fr; gap: .2rem 1rem; padding: .7rem 0 .7rem 1rem; }
.s2 .journey li::before { content: ""; position: absolute; left: -.62rem; top: 1.05rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--bg); border: 2px solid var(--muted); }
.s2 .journey li.j-turn::before { border-color: var(--accent); background: var(--accent); }
.s2 .journey li.j-fail::before { border-color: var(--neg); }
.s2 .j-score { font-family: var(--font-mono); font-size: .8rem; color: var(--accent); text-align: right; padding-top: .15rem; font-variant-numeric: tabular-nums; }
.s2 .j-fail .j-score { color: var(--neg); text-decoration: line-through; }
.s2 .journey li > div { font-size: .95rem; }
.s2 .journey li.j-turn > div { background: color-mix(in srgb, var(--accent) 7%, transparent); border-radius: 10px; padding: .5rem .7rem; margin: -.5rem 0; }
@media (max-width: 560px) { .s2 .journey li { grid-template-columns: 1fr; } .s2 .j-score { text-align: left; } }
.s2 .rev-h { margin: var(--space-5) 0 .5rem; font-size: 1.1rem; }
/* v2.0 review fixes for the S2 page */
.s2 .lede code, .s2 .prose code, .s2 .dl-meta code { overflow-wrap: anywhere; }
.s2 code.sum { font-size: .66rem; word-break: break-all; }
.s2 .submit-actions { display: grid; gap: .55rem; }
.s2 .big-btn { display: block; text-align: center; padding: .85rem 1rem; font-size: .85rem; border-radius: 12px; text-decoration: none; }
.s2 .small-link { font-family: var(--font-mono); font-size: .75rem; text-align: center; }
@media (max-width: 480px) {
  .s2 #s2-result .data :is(th, td):nth-child(3), .s2 #s2-result .data :is(th, td):nth-child(5) { display: none; }
  .s2 .calc { white-space: pre-wrap; overflow-wrap: anywhere; }
}
