/* The same styles serve the local training monitor and the published release. */
:root {
  color-scheme: light;
  --paper: #f8faf8; --surface: #fff; --ink: #152e34; --muted: #4b6269;
  --line: #cdd9d7; --teal: #0c625b; --pale: #dcedea; --amber: #965212;
  --serif: Baskervville, Georgia, serif; --sans: Inter, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.1rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.5 var(--sans); }
a { color: var(--teal); text-decoration-thickness: .075em; text-underline-offset: .22em; }
a:hover { color: #05433d; }
button, select { font: inherit; }
button, select, summary { cursor: pointer; }
:is(a, button, select, summary, [tabindex]):focus-visible { outline: 3px solid #227db7; outline-offset: 3px; }
.frame { width: min(81rem, 100%); margin-inline: auto; padding-inline: clamp(1.05rem, 4vw, 3.8rem); }
.masthead { border-bottom: 1px solid var(--line); background: var(--surface); }
.bar, .links, .pager, nav { display: flex; align-items: center; gap: 1.25rem; }
.bar { justify-content: space-between; min-height: 4.2rem; }
.wordmark, nav a { text-decoration: none; }
.wordmark { display: flex; align-items: center; gap: .68rem; color: var(--ink); font-size: 1.15rem; font-weight: 700; letter-spacing: -.025em; }
.mark { display: grid; grid-template-columns: repeat(2, 8px); gap: 3px; transform: rotate(-6deg); }
.mark i { width: 8px; height: 8px; border-radius: 2px; background: var(--teal); }
.mark i:nth-child(2) { border: 1px solid var(--teal); background: transparent; }
nav a { font-size: .94rem; font-weight: 600; color: var(--muted); }
.intro { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-block: clamp(2.7rem, 6vw, 5.2rem); }
.eyebrow { margin: 0 0 .65rem; color: var(--teal); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.08; letter-spacing: -.045em; overflow-wrap: break-word; }
h1 { font-size: clamp(2.7rem, 4.55vw, 4.5rem); margin: 0; max-width: 13.5em; }
h1 em { color: var(--teal); font-weight: 400; }
.lede, .section-copy { color: var(--muted); }
.lede { font-size: clamp(1rem, 1.35vw, 1.15rem); max-width: 36em; margin: 1.15rem 0 1.6rem; }
.links { flex-wrap: wrap; font-size: .95rem; font-weight: 600; row-gap: .7rem; }
.primary-link { padding: .58rem .9rem; border-radius: .4rem; background: var(--teal); color: #fff; text-decoration: none; }
.primary-link:hover { background: #084d48; color: #fff; }
.architecture { margin: 0; min-width: 0; }
.architecture img { display: block; width: 100%; height: auto; }
figcaption { margin-top: .55rem; font-size: .85rem; line-height: 1.45; color: var(--muted); }
.section { border-top: 1px solid var(--line); padding-block: clamp(2.2rem, 4.5vw, 4rem); }
.section-heading, .panel-title, .curve-head { display: flex; justify-content: space-between; align-items: end; gap: 1.4rem; }
.section-heading h2 { font-size: clamp(2.05rem, 3.15vw, 3.1rem); margin: 0; }
.section-copy { margin: .9rem 0; max-width: 58em; }
.release { text-align: right; flex-shrink: 0; }
.release p, .live-note, .readout { font-size: .9rem; margin: .1rem 0 .35rem; color: var(--muted); }
.release button { background: transparent; border: 0; padding: 0; font-size: .9rem; color: var(--teal); text-decoration: underline; text-underline-offset: .18em; }
.release-status { color: var(--teal); margin: .8rem 0; overflow-wrap: anywhere; }
.release-status:empty { display: none; }
.filters, .chart-controls { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; }
.filters { margin: 1.3rem 0 1rem; }
label { display: flex; flex-direction: column; min-width: 0; gap: .25rem; color: var(--muted); font-size: .88rem; font-weight: 600; }
select { max-width: 100%; appearance: none; border: 1px solid #aebfbc; border-radius: .35rem; color: var(--ink); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='9' viewBox='0 0 12 9'%3E%3Cpath d='m2 2 4 4 4-4' fill='none' stroke='%234b6269' stroke-width='1.5'/%3E%3C/svg%3E") right .7rem center / .75rem no-repeat; padding: .46rem 2rem .46rem .7rem; font-size: .94rem; font-weight: 500; text-overflow: ellipsis; }
select:disabled, button:disabled { opacity: .63; cursor: default; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: .8rem; overflow: hidden; min-width: 0; }
.panel-title, .curve-head { padding: 1.12rem 1.35rem; align-items: center; flex-wrap: wrap; }
.panel-title { border-bottom: 1px solid #e6eceb; }
.panel-title h3 { margin: 0; font-size: 1.08rem; }
.unit { color: var(--muted); font-size: .88rem; }
.empty { padding: clamp(1.3rem, 3vw, 2.4rem); color: var(--muted); margin: 0; background: linear-gradient(110deg, #f8fcfb, #fff); border-left: 3px solid #8cc6b8; }
details { border-top: 1px solid var(--line); }
summary { padding: .85rem 1.35rem; font-weight: 600; color: var(--teal); font-size: .94rem; }
.scroll { overflow: auto; max-height: 30rem; }
.scroll.short { max-height: 13rem; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; font-variant-numeric: tabular-nums; }
th, td { padding: .52rem .76rem; border-top: 1px solid #e2eae8; text-align: left; vertical-align: middle; white-space: nowrap; }
th { color: var(--muted); background: #f3f7f6; position: sticky; top: 0; z-index: 1; }
td { color: var(--ink); }
.effect-chart { padding: 1rem 1.35rem; }
.effect-row { display: grid; grid-template-columns: minmax(8rem, 22%) minmax(6rem, 1fr) 4.8rem; gap: .8rem; align-items: center; min-height: 2.55rem; }
.effect-row + .effect-row { border-top: 1px solid #e9efee; }
.effect-label { font-size: .9rem; overflow-wrap: anywhere; font-weight: 600; }
.effect-label small { display: block; font-size: .78rem; color: var(--muted); font-weight: 400; }
.effect-value { text-align: right; font-size: .94rem; font-variant-numeric: tabular-nums; }
.ruler { position: relative; height: 2.4rem; min-width: 0; }
.ruler::before, .threshold, .whisker, .point { position: absolute; }
.ruler::before { content: ''; left: 50%; top: 0; bottom: 0; border-left: 1px solid #8c9fa1; }
.threshold { top: 0; bottom: 0; border-left: 2px dashed #aa6d2d; }
.whisker { top: calc(50% - 1px); height: 2px; background: var(--teal); }
.whisker::before, .whisker::after { content: ''; position: absolute; top: -4px; height: 10px; border-left: 2px solid var(--teal); }
.whisker::before { left: 0; } .whisker::after { right: 0; }
.point { width: 10px; height: 10px; background: var(--teal); border: 1px solid #fff; border-radius: 50%; transform: translate(-50%, -50%); top: 50%; }
.scale { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.legend { color: var(--muted); font-size: .86rem; margin: .55rem 0 .2rem; }
.legend b { color: var(--amber); }
.symbol-panel { margin-top: 1.15rem; }
.symbol-panel .panel-title label { width: min(25rem, 100%); }
.symbol-content, .symbol-rules { padding: .8rem 1.35rem 1rem; }
.symbol-content > p, .symbol-rules p { margin: .25rem 0; color: var(--muted); font-size: .9rem; }
.symbol-totals { display: flex; flex-wrap: wrap; column-gap: 2rem; row-gap: .4rem; margin: 0 0 .7rem; }
.symbol-totals dt { font-size: .84rem; color: var(--muted); }
.symbol-totals dd { margin: 0; font-size: 1.05rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.symbol-list { display: grid; list-style: none; padding: 0; margin: .65rem 0 .15rem; gap: .28rem; max-width: 46rem; }
.symbol-list li { display: grid; grid-template-columns: 5.4rem minmax(2rem, 1fr) minmax(7.7rem, max-content); align-items: center; gap: .55rem; }
.symbol-list code, #symbol-rows th { font: .9rem/1.35 "IBM Plex Mono", Consolas, monospace; }
.symbol-track { height: .42rem; background: #e4efec; border-radius: .2rem; overflow: hidden; }
.symbol-track i { display: block; height: 100%; background: var(--teal); }
.symbol-readout { text-align: right; color: var(--muted); font-size: .87rem; font-variant-numeric: tabular-nums; }
.symbol-rules { border-top: 1px solid var(--line); background: #f7faf9; }
.symbol-rules h4 { font-size: .96rem; margin: 0 0 .25rem; }
.symbol-rules .supported-rule { font-weight: 600; color: var(--ink); }
#symbol-rows th { position: static; background: white; }
.curve-head, .pager { row-gap: .8rem; }
.curve-head { border-bottom: 1px solid #e6eceb; }
.readout { font-variant-numeric: tabular-nums; }
.plot { padding: .6rem 1rem .1rem; }
.plot svg { width: 100%; height: auto; display: block; overflow: visible; }
.plot text { font-family: var(--sans); fill: var(--muted); }
.pager { gap: .65rem; font-size: .9rem; font-variant-numeric: tabular-nums; }
.pager button { border: 1px solid #aebfbc; border-radius: .35rem; color: var(--teal); background: #fff; padding: .4rem .65rem; }
.example-body { padding: 1.2rem 1.35rem; }
.example-meta { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; color: var(--muted); font-size: .88rem; }
.state { display: inline-block; border-radius: .3rem; padding: .15rem .45rem; font-weight: 700; }
.state.correct { color: #215443; background: #e0f1e7; }
.state.incorrect { color: #853b26; background: #fbe9e2; }
.state.unscored { color: #47575b; background: #edf2f2; }
.example-body h3 { font-size: .94rem; margin: 1rem 0 .4rem; }
.prompt, .tokens, .answer-grid dd { overflow-wrap: anywhere; }
.prompt { white-space: pre-wrap; line-height: 1.58; margin: 0; }
.tokens { display: flex; flex-wrap: wrap; gap: .34rem; list-style: none; padding: 0; margin: .3rem 0; }
.tokens li { background: #eaf3f1; color: #174e48; border-radius: .3rem; padding: .2rem .4rem; white-space: pre-wrap; font: .9rem/1.35 "IBM Plex Mono", Consolas, monospace; max-width: 100%; }
.answer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .65rem; margin: 1.15rem 0 0; }
.answer-grid div { border-left: 2px solid #abc8c0; padding-left: .6rem; }
.answer-grid dt { color: var(--muted); font-size: .82rem; }
.answer-grid dd { margin: .15rem 0 0; font-weight: 600; }
footer.frame { display: flex; gap: 1rem; justify-content: space-between; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-block: 1.4rem 2.6rem; color: var(--muted); font-size: .94rem; }
footer p { margin: 0; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip:focus, .noscript { position: fixed; top: .5rem; left: .5rem; z-index: 10; padding: .6rem; background: #fff; }
[hidden] { display: none !important; }
@media (max-width: 780px) {
  .intro { grid-template-columns: 1fr; gap: 1.7rem; }
  .architecture { max-width: 38rem; } .section-heading { align-items: flex-start; }
  .section-heading:has(.live-note) { flex-wrap: wrap; gap: .5rem; }
}
@media (max-width: 540px) {
  .bar, nav { gap: .65rem; } nav a { font-size: .83rem; } .wordmark { font-size: 1rem; gap: .4rem; }
  .section-heading { flex-wrap: wrap; gap: .55rem; } .release { display: flex; gap: .65rem; align-items: center; text-align: left; }
  .release p { margin: 0; } .filters, .chart-controls { gap: .55rem; width: 100%; }
  .filters label { flex: 1 1 8rem; } .chart-controls label { flex: 1 1 9rem; }
  .panel-title, .curve-head, .example-body, .symbol-content, .symbol-rules { padding: .9rem; } .effect-chart { padding-inline: .8rem; }
  .effect-row { grid-template-columns: minmax(5rem, 27%) minmax(3rem, 1fr) 3.4rem; gap: .45rem; }
  .effect-value { font-size: .82rem; } .effect-label { font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
