/* Orbit shared themes. Components consume these tokens on every page. */
:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f8f4;
  --panel: #ffffff;
  --ink: #222a24;
  --ink2: #566259;
  --mute: #69756d;
  --line: #dde3d9;
  --accent: #0b6b5c;
  --accent-ink: #ffffff;
  --accent-soft: #ddf1ec;
  --violet: #7353a5;
  --violet-soft: #efeafa;
  --surface-raised: #eff2e9;
  --code-bg: #eef1e9;
  --code-ink: #293329;
  --code-toolbar: #e5eade;
  --code-border: #d4ddcc;
  --code-muted: #59684d;
  --inline-code-bg: #e8eedf;
  --inline-code-ink: #3e5e22;
  --good: #28723b;
  --good-soft: #e4f2e5;
  --bad: #ac3238;
  --bad-soft: #f9e8e9;
  --warn: #925b18;
  --warn-soft: #f7edda;
  --header-h: 76px;
  --shadow: 0 7px 25px #263c1405;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11141b;
  --panel: #1a202a;
  --ink: #f1f3ec;
  --ink2: #b0b8c6;
  --mute: #949eaf;
  --line: #303946;
  --accent: #7ee0c8;
  --accent-ink: #0c2420;
  --accent-soft: #1d3330;
  --violet: #c9b1ff;
  --violet-soft: #312943;
  --surface-raised: #202733;
  --code-bg: #171d27;
  --code-ink: #e3e9f0;
  --code-toolbar: #222b38;
  --code-border: #344052;
  --code-muted: #b1bed0;
  --inline-code-bg: #2a3523;
  --inline-code-ink: #d5eeb0;
  --good: #a2dbac;
  --good-soft: #203829;
  --bad: #ffadb0;
  --bad-soft: #41282e;
  --warn: #edc27d;
  --warn-soft: #3c3021;
  --shadow: 0 7px 25px #00000012;
}
html { scroll-padding-top: calc(var(--header-h) + 22px); }
body { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); }
body > .shell { flex: 1; width: 100%; }
button, input, select, textarea { font-family: var(--sans); }
a, button, input, select, summary { outline-offset: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); }
[hidden] { display: none !important; }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }

/* Identical brand, navigation and theme control across the whole course. */
.top.orbit-header,
.home .top.orbit-header {
  height: var(--header-h); padding: 0 5%; gap: 24px; z-index: 50;
  flex-shrink: 0; background: color-mix(in srgb, var(--bg) 95%, transparent);
  border-bottom: 1px solid var(--line);
}
.orbit-header .product-wordmark,
.course-footer .product-wordmark { color: var(--ink); font-size: 24px; letter-spacing: -.8px; flex-shrink: 0; }
.product-wordmark .wordmark-suffix { color: var(--mute); font-size: 11px; }
.product-wordmark > span:first-child { color: var(--accent); }
.orbit-header .site-nav { display: flex; gap: 25px; margin-left: auto; align-items: center; }
.site-nav a { color: var(--ink2); text-decoration: none; font-size: 12px; padding: 12px 0; position: relative; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }
.site-nav a[aria-current="page"]::after { content: ''; position: absolute; bottom: 2px; height: 2px; background: var(--accent); left: 0; right: 0; border-radius: 2px; }
.orbit-header .prog { border: 0; padding: 0; font: 10px var(--mono); color: var(--mute); }
.orbit-header .theme, .orbit-header .menu, .site-menu {
  width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; font-size: 17px; cursor: pointer;
}
.orbit-header .theme:hover, .orbit-header .menu:hover, .site-menu:hover { border-color: var(--accent); color: var(--accent); }
.orbit-header .menu, .site-menu { display: none; }
.course-footer { padding: 30px 5%; gap: 24px; background: var(--bg); flex-shrink: 0; }
.course-footer .product-wordmark { font-size: 21px; }
.course-footer .product-wordmark > span:first-child { font-size: 28px; }
.course-footer > span { color: var(--mute); font-size: 11px; }
.course-footer nav { margin-left: auto; display: flex; gap: 24px; }
.course-footer nav a { color: var(--ink2); font-size: 11px; text-decoration: none; }
.course-footer nav a:hover { color: var(--accent); }

/* Main course surfaces. */
.side { top: var(--header-h); height: calc(100vh - var(--header-h)); background: var(--bg); padding: 22px 14px; }
.side-search input { background: var(--panel); border-color: var(--line); min-height: 42px; font-size: 12px; }
.side summary { font-size: 12px; font-weight: 500; }
.topics a { font-size: 12px; padding: 8px 10px; }
.nav-backdrop { display: none; }
.main { padding: 44px 36px 70px; }
.reading { max-width: 800px; }
.reading h1 { font-size: clamp(30px, 3.4vw, 43px); }
.reading .meta { color: var(--mute); }
.chip { background: var(--panel); border-color: var(--line); color: var(--ink2); }
.btn, .done, .lab-tag, .lb.primary { background: var(--accent); color: var(--accent-ink); }
.btn:hover { box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 10%, transparent); }
.btn.ghost { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.module { background: var(--panel); box-shadow: none; }
.module summary { min-height: 265px; }
.module h3 { font-size: 17px; }
.module summary > p { font-size: 12px; }
.module-count, .module-bottom { font-size: 11px; }
.course-filters button { font-size: 12px; min-height: 40px; }
.course-filters button.active { background: var(--accent); color: var(--accent-ink); }
.catalog-page .curriculum-section { padding: 58px 6% 80px; }
.lab-head { gap: 12px; flex-wrap: wrap; }
.lab-title { line-height: 1.5; }
.lab-body { overflow-wrap: anywhere; }
.lab input[type="range"] { max-width: 100%; }
.lab .row > * { max-width: 100%; }
.lab .mono, .lab pre { overflow-wrap: anywhere; white-space: pre-wrap; }
.qopt { min-height: 43px; }
.qopt:disabled { cursor: default; }
.code pre { font-size: 13px; }
.code-bar button { min-height: 32px; }
.py-out .err { color: var(--bad); }

/* The marketing page follows the same theme rather than forcing its own. */
.home h2 > span { color: var(--ink2); }
.home .product-button { background: var(--accent); color: var(--accent-ink); }
.home .product-button:hover { background: color-mix(in srgb, var(--accent) 87%, var(--panel)) !important; }
.hero-reassurance, .product-proof > div span, .product-proof > p { color: var(--mute); }
.hero-reassurance { font-size: 10px; }
.possibility-card, .experience-grid > article { background: var(--panel); border-color: var(--line); }
.possibility-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.possibility-copy > span, .path-stages small { color: var(--mute); }
.product-playground { background: var(--panel); border-color: var(--line); }
.scenario-picker button { color: var(--ink2); border-color: var(--line); }
.scenario-picker button.selected { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.scenario-picker button:hover { border-color: var(--accent); }
.progress-decoration i { background: var(--accent); }
.progress-decoration i:nth-child(n+4) { background: var(--line); }
.progress-decoration span, .check-decoration { color: var(--mute); }
.stage-number { color: var(--accent); opacity: .7; }
.path-stages > a:hover { background: var(--panel); }
.product-studio, .experiment-panel {
  --accent: #7ee0c8; --accent-ink: #0c2420; color: #f1f3ec;
}
.studio-result p { color: #bfd0cb; }
.experiment-panel p { color: #b0b8c6; }
.product-studio .studio-title h2 { color: #f1f3ec; }
.product-studio .studio-name { color: #f1f3ec; }
.product-studio a { text-decoration: none; }
.product-studio .studio-result small { color: #b7c99e; }
.product-studio .studio-bottom { color: #9ca7ba; }
.product-studio .tiny-label, .product-studio .canvas-label { color: #a4aec0; }
.product-studio .studio-prompt p { color: #d1d4de; }
.product-studio .studio-float { color: #282034; }
.product-studio .studio-float small { color: #655970; }
.experiment-panel .experiment-bar, .experiment-panel .experiment-question > span,
.experiment-panel .experiment-steps small, .experiment-panel .experiment-run > span { color: #aab5c7; }
.experiment-panel #experiment-lesson { color: #d2d9e5; }
.possibility-art { color: #edf3e8; }
.experience-icon { color: var(--accent); }
.home .product-finale { background: #7ee0c8; color: #0c2420; }
.home .product-finale h2 { color: #0c2420; }
.home .product-finale h2 > span { color: #4b652c; }
.home .product-finale .product-button { background: #0c2420; color: #eff8df; }
.home .product-finale .product-button:hover { background: #2d3d23 !important; }
.home .product-finale > p { color: #44572d; }
.home .product-finale .product-eyebrow { color: #44572d !important; }

/* Playground discovery. */
.labs-page .shell { display: block; }
.labs-page .main { padding: 0; }
.labs-library { max-width: 1320px; margin: auto; padding: 58px 6% 80px; }
.library-intro { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 50px; padding-bottom: 35px; }
.library-intro h1 { font: 600 clamp(38px, 4.8vw, 61px)/1.08 var(--sans); letter-spacing: -2.5px; margin: 17px 0 22px; }
.library-intro h1 span { color: var(--accent); }
.library-intro > div > p:last-child { color: var(--ink2); font-size: 14px; line-height: 1.85; max-width: 48ch; }
.library-counter { position: relative; min-width: 215px; background: var(--accent-soft); border: 1px solid var(--line); border-radius: 14px; padding: 25px 30px; }
.library-counter .counter-icon { position: absolute; top: 14px; right: 20px; color: var(--accent); font-size: 30px; }
.library-counter strong { display: block; color: var(--ink); font-size: 58px; font-weight: 500; letter-spacing: -3px; line-height: 1.3; }
.library-counter > span:not(.counter-icon) { font-size: 12px; color: var(--ink2); }
.library-counter small { display: block; color: var(--mute); font-size: 10px; margin-top: 10px; }
.library-toolbar { display: flex; align-items: stretch; flex-wrap: wrap; gap: 12px; padding: 23px 0; border-block: 1px solid var(--line); }
.library-search { display: flex; align-items: center; gap: 10px; flex: 1 1 300px; min-width: 0; border: 1px solid var(--line); background: var(--panel); padding: 0 15px; border-radius: 8px; }
.library-search:focus-within { border-color: var(--accent); }
.library-search > span { font-size: 24px; color: var(--accent); }
.library-search input { background: transparent; border: 0; outline: none; width: 100%; min-width: 0; padding: 14px 0; color: var(--ink); font-size: 13px; }
.library-search input::placeholder { color: var(--mute); }
.library-unit { flex: 0 1 290px; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; border: 1px solid var(--line); background: var(--panel); padding: 7px 12px; border-radius: 8px; }
.library-unit > span { color: var(--mute); font-size: 9px; }
.library-unit select { width: 100%; min-width: 0; background: var(--panel); color: var(--ink); border: 0; font-size: 12px; padding: 3px 0; }
.library-reset { padding: 12px; background: transparent; color: var(--ink2); font-size: 11px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.library-reset:hover { color: var(--accent); border-color: var(--accent); }
.library-info { display: flex; gap: 20px; justify-content: space-between; color: var(--mute); font-size: 10px; padding: 20px 0; }
#lab-result-count { color: var(--ink2); white-space: nowrap; }
.labs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lab-tile { display: flex; flex-direction: column; min-height: 210px; padding: 23px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); background: var(--panel); }
.lab-tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.lab-tile-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.lab-unit { background: var(--accent-soft); color: var(--accent); font: 10px var(--mono); padding: 5px 8px; border-radius: 4px; }
.lab-launch { color: var(--mute); font-size: 17px; }
.lab-tile h2 { font-size: 17px; line-height: 1.4; letter-spacing: -.4px; font-weight: 550; margin: 20px 0 8px; }
.lab-tile p { color: var(--ink2); font-size: 11px; margin: 0 0 20px; line-height: 1.7; }
.lab-tile-bottom { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); color: var(--mute); font-size: 9px; }
.lab-tile-bottom > span { color: var(--accent); margin-right: 5px; }
.library-empty { text-align: center; padding: 70px 20px; border: 1px dashed var(--line); border-radius: 10px; }
.library-empty > span { color: var(--accent); font-size: 35px; }
.library-empty h2 { font-size: 26px; letter-spacing: -.7px; }
.library-empty p { color: var(--ink2); font-size: 13px; }
.library-empty .btn { margin-top: 15px; }

@media (max-width: 1100px) {
  .orbit-header .wordmark-suffix { display: none; }
  .orbit-header .site-nav { gap: 20px; }
  .orbit-header .prog { display: none; }
}
@media (max-width: 980px) {
  .orbit-header .menu { display: grid; }
  .side { top: var(--header-h); height: calc(100dvh - var(--header-h)); z-index: 40; width: min(87vw, 330px); background: var(--panel); visibility: hidden; }
  body.nav-open .side { visibility: visible; transform: none; }
  .nav-backdrop { position: fixed; inset: var(--header-h) 0 0; z-index: 35; border: 0; background: #080b1280; cursor: pointer; }
  body.nav-open .nav-backdrop { display: block; }
  body.nav-open { overflow: hidden; }
  .main { padding: 34px 25px 65px; }
  .labs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  :root, :root[data-theme] { --header-h: 66px; }
  .top.orbit-header, .home .top.orbit-header { padding: 0 5%; gap: 12px; }
  .orbit-header .product-wordmark { font-size: 23px; }
  .orbit-header .product-wordmark > span:first-child { font-size: 29px; }
  .orbit-header .theme { margin-left: auto; }
  .site-menu { display: grid; }
  .orbit-header .site-nav { display: none; position: absolute; top: calc(var(--header-h) - 1px); left: 0; right: 0; padding: 12px 5% 18px; margin: 0; background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: 0 14px 20px #00000016; }
  body.main-nav-open .site-nav { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { padding: 13px 10px; font-size: 14px; border-radius: 6px; }
  .site-nav a[aria-current="page"] { background: var(--accent-soft); }
  .site-nav a[aria-current="page"]::after { display: none; }
  .course-footer { padding: 25px 6%; gap: 18px; flex-wrap: wrap; }
  .course-footer .wordmark-suffix { display: none; }
  .course-footer > span { order: 3; width: 100%; font-size: 10px; }
  .course-footer nav { gap: 16px; }
  .course-footer nav a { font-size: 10px; }
  .catalog-page .curriculum-section { padding: 38px 6% 60px; }
  .module summary { min-height: 245px; }
  .module summary > p { font-size: 11px; }
  .library-intro { grid-template-columns: 1fr; gap: 20px; padding-bottom: 26px; }
  .labs-library { padding: 36px 6% 60px; }
  .library-intro h1 { font-size: 43px; letter-spacing: -1.8px; }
  .library-intro > div > p:last-child { font-size: 13px; }
  .library-counter { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 16px 20px; }
  .library-counter strong { font-size: 35px; letter-spacing: -1px; }
  .library-counter .counter-icon { position: static; order: 4; margin-left: auto; font-size: 27px; }
  .library-counter small { display: none; }
  .library-counter > span:not(.counter-icon) { font-size: 11px; }
  .library-search { flex-basis: 100%; }
  .library-unit { flex: 1 1 150px; }
  .library-info { flex-direction: column; gap: 8px; font-size: 10px; }
  .lab-tile { padding: 19px; min-height: 210px; }
  .lab-tile h2 { font-size: 16px; }
  .hero-reassurance { flex-wrap: wrap; font-size: 9px; gap: 8px 14px; }
  .main { padding: 28px 6% 55px; }
  .reading h1 { font-size: 32px; }
}
@media (max-width: 480px) {
  .labs-grid { grid-template-columns: 1fr; }
  .lab-tile { min-height: 200px; padding: 22px; }
  .lab-tile h2 { font-size: 19px; }
  .lab-tile p { font-size: 12px; }
  .module-grid { grid-template-columns: 1fr; }
  .module summary { min-height: 230px; }
  .module h3 { font-size: 18px; }
  .module summary > p { font-size: 12px; }
  .orbit-header .menu, .orbit-header .theme, .site-menu { width: 35px; height: 38px; }
  .orbit-header .product-wordmark { gap: 6px; font-size: 21px; }
  .orbit-header .product-wordmark > span:first-child { font-size: 26px; }
  .library-reset { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .lab-tile:hover { transform: none; }
}

/* Reading scaffolding and computed experiments share the course theme. */
.course-audience { max-width: 830px; margin: 0 0 28px; font-size: 14px; line-height: 1.85; color: var(--ink2); }
.learning-goal { padding: 18px 22px; margin: 24px 0 12px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; background: var(--panel); }
.learning-goal > span { font: 10px var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: .1em; }
.learning-goal p { margin: 7px 0 0; font-size: 15px; line-height: 1.65; color: var(--ink); }
.prose h2 { scroll-margin-top: calc(var(--header-h) + 20px); }
.workbench-controls { min-width: 0; border: 1px solid var(--line); border-radius: 8px; margin: 15px 0; padding: 14px; }
.workbench-controls legend { padding: 0 7px; font-size: 12px; color: var(--ink2); }
.workbench-control { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 180px) 55px; gap: 14px; align-items: center; margin: 10px 0; font-size: 13px; }
.workbench-control > span { overflow-wrap: anywhere; }
.workbench-control input { width: 100%; accent-color: var(--accent); min-width: 0; }
.workbench-control input[type="checkbox"] { width: 20px; height: 20px; justify-self: end; }
.workbench-control select { min-width: 0; width: 100%; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 5px; padding: 8px; }
.workbench-control output { text-align: right; color: var(--ink2); font-size: 11px; }
.workbench-result { margin-top: 15px; }
.workbench-line { display: grid; grid-template-columns: minmax(100px, .7fr) minmax(0, 1.3fr); gap: 12px; border-bottom: 1px solid var(--line); padding: 9px 0; font-size: 13px; overflow-wrap: anywhere; }
.workbench-line b { font-weight: 500; color: var(--ink2); }
.workbench-result .fb { line-height: 1.75; }
.spotter-sentence { display: inline; font: inherit; color: inherit; text-align: left; line-height: inherit; background: transparent; border: 0; cursor: pointer; padding: 2px 3px; border-radius: 4px; }
.spotter-sentence[aria-pressed="true"] { background: var(--warn-soft); outline: 1px solid var(--warn); }
.spotter-sentence:focus-visible, .workbench-controls :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 540px) {
  .learning-goal { padding: 15px 17px; }
  .workbench-control { grid-template-columns: minmax(0, 1fr) 48px; gap: 7px; margin: 15px 0; }
  .workbench-control > span { grid-column: 1 / -1; }
  .workbench-control input[type="checkbox"] { justify-self: start; }
  .workbench-line { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- Recall retrieval labs ---------- */
.rl-h { margin: 18px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); }
.rl-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin-right: 10px; }
.rl-doc { margin: 8px 0; }
.rl-doc-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rl-doc-text { font-size: 14px; color: var(--ink2); margin-top: 4px; line-height: 1.6; }
.rl-doc-text mark, .rl-out mark { background: var(--accent-soft); color: var(--ink); border-bottom: 2px solid var(--accent); padding: 0 1px; border-radius: 2px; }
.rl-id { font: 600 11px var(--mono); padding: 2px 6px; border-radius: 5px; background: var(--violet-soft); color: var(--violet); }
.rl-score { margin-left: auto; font: 12px var(--mono); color: var(--mute); }
.rl-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 6px 0 10px; color: var(--mute); }
.rl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 8px 0; }
.rl-cat { text-align: left; }
.rl-cat small { color: var(--mute); }
.rl-answer { border-color: var(--accent); }
.rl-pipe > div { margin: 8px 0; }
.rl-pipe small { display: block; font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.rl-tok { display: inline-block; font: 12.5px var(--mono); padding: 1px 6px; margin: 2px 3px 2px 0; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); }
.rl-tok.hit { border-color: var(--accent); background: var(--accent-soft); }
.rl-tok.exp { border-style: dashed; }
.rl-index { border: 1px solid var(--line); border-radius: 10px; max-height: 300px; overflow: auto; font-size: 13px; }
.rl-index-head, .rl-index-row { display: grid; grid-template-columns: minmax(90px, 1fr) 4fr; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); align-items: center; }
.rl-index-head { position: sticky; top: 0; background: var(--panel); font-weight: 600; color: var(--mute); font-size: 12px; }
.rl-post { display: inline-block; font: 12px var(--mono); padding: 1px 6px; margin: 2px 4px 2px 0; border-radius: 5px; background: var(--accent-soft); }
.rl-post small { margin-left: 4px; color: var(--mute); font-size: 10px; }
.rl-steps { margin: 10px 0 0 18px; padding: 0; font-size: 13px; }
.rl-sliders { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 18px; margin: 8px 0; }
.rl-slider { display: grid; grid-template-columns: 1fr; gap: 2px; font-size: 13.5px; }
.rl-slider output { font-size: 12px; color: var(--mute); }
.rl-chart svg { width: 100%; max-width: 420px; height: auto; display: block; }
.rl-rank { display: grid; grid-template-columns: 34px minmax(120px, 1.4fr) 2fr 64px; gap: 10px; align-items: center; width: 100%; text-align: left; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; margin: 6px 0; cursor: pointer; }
.rl-rank:hover, .rl-rank.open { border-color: var(--accent); }
.rl-pos { font: 600 12px var(--mono); color: var(--mute); }
.rl-title { font-size: 14px; min-width: 0; }
.rl-bar { display: flex; height: 10px; background: color-mix(in srgb, var(--line) 50%, transparent); border-radius: 5px; overflow: hidden; }
.rl-bar i { display: block; height: 100%; }
.rl-num { text-align: right; }
.rl-break table { font-size: 13px; }
.rl-qbox { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; }
.rl-qbox small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); }
.rl-judge { list-style: none; margin: 0; padding: 0; }
.rl-judge-row { display: grid; grid-template-columns: 26px 1fr auto auto; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; margin: 5px 0; opacity: .55; }
.rl-judge-row.in { opacity: 1; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.rl-move { display: flex; gap: 4px; }
.rl-move .lb { padding: 3px 8px; }
.rl-grade { font-size: 12.5px; border-radius: 99px; padding: 3px 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink2); cursor: pointer; white-space: nowrap; }
.rl-grade.g1 { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.rl-grade.g2 { background: var(--good-soft); color: var(--good); border-color: transparent; }
.rl-grade.g3 { background: var(--good); color: var(--bg); border-color: transparent; font-weight: 600; }
.rl-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.rl-metric { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg); }
.rl-metric small { display: block; font-size: 12px; color: var(--mute); }
.rl-metric b { display: block; font: 600 22px var(--mono); margin: 2px 0; }
.rl-metric .note { font-size: 12px; }
.rl-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; }
.rl-badge { margin-left: auto; font-size: 12px; padding: 2px 8px; border-radius: 99px; font-weight: 600; }
.rl-badge.good { background: var(--good-soft); color: var(--good); }
.rl-badge.info { background: var(--violet-soft); color: var(--violet); }
.rl-badge.bad { background: var(--bad-soft); color: var(--bad); }
.rl-why { margin: 6px 0 0; padding-left: 0; list-style: none; font-size: 13px; color: var(--ink2); }
.rl-q { border: 0; padding: 0; margin: 8px 0; }
.rl-q legend { font-size: 14px; font-weight: 600; padding: 0; }
.rl-rail { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 6px; margin: 12px 0; }
.rl-node { text-align: left; font: inherit; font-size: 13px; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
.rl-node small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); }
.rl-node.on { border-style: dashed; }
.rl-node.done { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.rl-node.cur { background: var(--accent-soft); border-color: var(--accent); border-style: solid; font-weight: 600; }
.rl-node.broken { box-shadow: inset 0 -3px 0 var(--bad); }
.rl-artifact { white-space: pre-wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-top: 8px; font-size: 12.5px; line-height: 1.55; }
.rl-artifact.broken { border-color: var(--bad); }
@media (max-width: 640px) {
  .rl-two { grid-template-columns: 1fr; }
  .rl-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rl-rank { grid-template-columns: 30px 1fr 56px; }
  .rl-rank .rl-bar { grid-column: 1 / -1; grid-row: 2; }
  .rl-judge-row { grid-template-columns: 22px 1fr; }
  .rl-judge-row .rl-grade, .rl-judge-row .rl-move { grid-column: 2; justify-self: start; }
  .rl-artifact { white-space: pre; overflow-x: auto; }
}

.rl-step { display: flex; align-items: center; gap: 8px; margin: 14px 0 4px; font-weight: 600; font-size: 14px; }
.rl-step span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 12px; }
.rl-mini { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.rl-mini .card { transition: border-color .2s, background .2s; }
.rl-mini .card.rl-on { border-color: var(--accent); background: var(--accent-soft); }
.rl-index { max-height: none; }
.rl-index-row.hit { background: var(--accent-soft); }
.rl-list { margin: 4px 0 8px 20px; padding: 0; font-size: 14px; }
.rl-list li.rl-good { color: var(--good); font-weight: 600; }
.rl-rank { cursor: default; }
@media (max-width: 640px) { .rl-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rl-plot svg { width: 100%; max-width: 440px; height: auto; display: block; }
.rl-chunks { display: grid; gap: 6px; margin: 8px 0; }
.rl-chunk { border: 1px solid var(--line); border-left: 4px solid var(--violet); border-radius: 8px; padding: 8px 10px; font-size: 13.5px; line-height: 1.55; background: var(--bg); }
.rl-chunk small { display: block; font: 11px var(--mono); color: var(--mute); margin-bottom: 2px; }
.rl-chunk.part { border-left-color: var(--warn); }
.rl-chunk.full { border-left-color: var(--good); background: var(--good-soft); }
.rl-chunk mark { background: var(--accent-soft); color: var(--ink); border-bottom: 2px solid var(--accent); }
.rl-pick { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 6px 0; cursor: pointer; }
.rl-pick.on { border-color: var(--accent); background: var(--accent-soft); }
.rl-meter { height: 12px; border-radius: 6px; background: color-mix(in srgb, var(--line) 60%, transparent); overflow: hidden; margin-top: 8px; }
.rl-meter i { display: block; height: 100%; }
.rl-list li.rl-bad { color: var(--bad); font-weight: 600; }
.rl-metric.hl { border-color: var(--accent); }
