/* Solar System Formation. Everything is scoped under .ssf so it cannot collide with the shared site shell (.tlg-*).
   The simulation view is always dark (space); the text panel follows the site's light/dark theme. */

.ssf {
  --ssf-bg: #f5f6f1;
  --ssf-surface: #ffffff;
  --ssf-surface-2: #f1f3ec;
  --ssf-ink: #15191f;
  --ssf-muted: #3f4754;
  --ssf-line: #dfe2d8;
  --ssf-line-2: #aeb6a8;
  --ssf-accent: #b45309;
  --ssf-accent-ink: #ffffff;
  --ssf-accent-hover: #92400e;
  --ssf-test: #1d4ed8;
  --ssf-good: #0f7a4a;
  --ssf-good-bg: #e6f5ec;
  --ssf-bad: #b42318;
  --ssf-bad-bg: #fdecea;
  --ssf-focus: #1d4ed8;
  --ssf-space: #05070d;
  --ssf-hud: rgba(8, 12, 24, .84);
  --ssf-hud-line: rgba(255, 255, 255, .18);
  --ssf-font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ssf-font-head: "Bricolage Grotesque", "Atkinson Hyperlegible", system-ui, sans-serif;
  --ssf-blue: #56b4e9;
  --ssf-orange: #e69f00;
  --ssf-yellow: #ffe066;
}
html[data-theme="dark"] .ssf {
  --ssf-bg: #10171d;
  --ssf-surface: #19232c;
  --ssf-surface-2: #212d38;
  --ssf-ink: #f5f7f5;
  --ssf-muted: #c3ccd5;
  --ssf-line: #35414b;
  --ssf-line-2: #55636f;
  --ssf-accent: #f59e0b;
  --ssf-accent-ink: #1b1406;
  --ssf-accent-hover: #fbbf24;
  --ssf-test: #93b4ff;
  --ssf-good: #6fd3a6;
  --ssf-good-bg: #173427;
  --ssf-bad: #ff9a85;
  --ssf-bad-bg: #3a1d19;
  --ssf-focus: #ffd66b;
}
body.ssf-page { margin: 0; background: #f5f6f1; }
html[data-theme="dark"] body.ssf-page { background: #10171d; }

.ssf, .ssf * { box-sizing: border-box; }
.ssf {
  display: block; max-width: 1400px; margin: 0 auto; padding: 12px 16px 28px;
  font: 400 17px/1.5 var(--ssf-font); color: var(--ssf-ink); background: var(--ssf-bg);
  -webkit-font-smoothing: antialiased;
}
.ssf h1, .ssf h2, .ssf h3 { margin: 0; line-height: 1.15; }
.ssf p { margin: 0; }
.ssf button, .ssf input, .ssf select { font: inherit; color: inherit; }
.ssf [hidden] { display: none !important; }
.ssf :focus-visible { outline: 3px solid var(--ssf-focus); outline-offset: 2px; }
.ssf output, .ssf .ssf-num { font-variant-numeric: tabular-nums; }

/* ── Buttons ───────────────────────────────────────────── */
.ssf .ssf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border-radius: 10px; cursor: pointer;
  background: var(--ssf-surface); color: var(--ssf-ink); border: 1.5px solid var(--ssf-line-2);
  font-weight: 700; text-decoration: none; white-space: nowrap;
}
.ssf .ssf-btn:hover:not(:disabled) { border-color: var(--ssf-accent); }
.ssf .ssf-btn:disabled { opacity: .45; cursor: not-allowed; }
.ssf .ssf-btn--primary { background: var(--ssf-accent); color: var(--ssf-accent-ink); border-color: var(--ssf-accent); }
.ssf .ssf-btn--primary:hover:not(:disabled) { background: var(--ssf-accent-hover); border-color: var(--ssf-accent-hover); }
.ssf .ssf-btn--test { background: var(--ssf-test); color: #fff; border-color: var(--ssf-test); }
html[data-theme="dark"] .ssf .ssf-btn--test { color: #0b1020; }
.ssf .ssf-btn--quiet { background: transparent; border-color: transparent; padding: 0 10px; font-weight: 700; color: var(--ssf-muted); }
.ssf .ssf-btn--quiet:hover:not(:disabled) { color: var(--ssf-ink); border-color: var(--ssf-line); }
.ssf .ssf-btn--danger { background: var(--ssf-bad); color: #fff; border-color: var(--ssf-bad); }
html[data-theme="dark"] .ssf .ssf-btn--danger { color: #1b0a06; }
.ssf .ssf-btn--big { min-height: 52px; font-size: 18px; padding: 0 24px; }
.ssf .ssf-btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.ssf .ssf-linkbtn { background: none; border: 0; padding: 6px 2px; color: var(--ssf-accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }
html[data-theme="dark"] .ssf .ssf-linkbtn { color: var(--ssf-accent); }

/* ── Start screen ──────────────────────────────────────── */
.ssf-hero { position: relative; overflow: hidden; border-radius: 22px; min-height: 300px; background: var(--ssf-space); color: #fff; display: flex; align-items: flex-end; }
.ssf-hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ssf-hero-copy { position: relative; padding: 32px 32px 30px; max-width: 640px; background: linear-gradient(90deg, rgba(5,7,13,.86) 0%, rgba(5,7,13,.55) 75%, rgba(5,7,13,0) 100%); }
.ssf-eyebrow { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; color: #f3cf83; }
.ssf-hero h1 { font-family: var(--ssf-font-head); font-weight: 800; font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -.02em; margin-top: 6px; }
.ssf-hero-sub { font-size: 21px; color: #f3cf83; font-weight: 700; margin-top: 2px; }
.ssf-hero-text { margin-top: 12px; color: #e7ecf4; max-width: 56ch; }
.ssf-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.ssf-mode { background: var(--ssf-surface); border: 1px solid var(--ssf-line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.ssf-mode h2 { font-family: var(--ssf-font-head); font-size: 26px; font-weight: 800; }
.ssf-mode p { color: var(--ssf-muted); flex: 1; }
.ssf-signin-note { flex: 0 !important; padding: 8px 12px; border-radius: 10px; background: var(--ssf-surface-2); font-size: 15px; }
.ssf-last-test { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding: 12px 16px; border-radius: 14px; background: var(--ssf-surface); border: 1.5px solid var(--ssf-test); font-weight: 700; }
.ssf-start-extra { margin-top: 8px; text-align: center; }

/* ── Learn: top bar + progress ─────────────────────────── */
.ssf-learn-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ssf-progress { position: relative; flex: 1; min-width: 0; }
.ssf-progress-track { position: absolute; left: 22px; right: 22px; top: 20px; height: 4px; border-radius: 4px; background: var(--ssf-line); }
.ssf-progress-track i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--ssf-accent); transition: width .3s; }
.ssf-progress ol { position: relative; list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; gap: 2px; }
.ssf-step { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 44px; min-height: 44px; padding: 0 2px; background: none; border: 0; cursor: pointer; color: var(--ssf-muted); }
.ssf-step-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ssf-surface); border: 2px solid var(--ssf-line-2); font-weight: 800; font-size: 16px; color: var(--ssf-ink); transition: background .2s, border-color .2s; }
.ssf-step-label { font-size: 13px; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.ssf-step.is-visited .ssf-step-num { border-color: var(--ssf-accent); }
.ssf-step.is-current .ssf-step-num { background: var(--ssf-accent); border-color: var(--ssf-accent); color: var(--ssf-accent-ink); }
.ssf-step.is-current .ssf-step-label { color: var(--ssf-ink); }
.ssf-step:hover .ssf-step-num { border-color: var(--ssf-accent); }

/* ── Learn: stage layout ───────────────────────────────── */
.ssf-stage { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
.ssf-viz-col { position: sticky; top: 77px; min-width: 0; }   /* below the site's 69px sticky header */
.ssf-screen, .ssf-test-root { scroll-margin-top: 80px; }
.ssf-viz { position: relative; height: clamp(340px, calc(100vh - 205px), 640px); border-radius: 16px; overflow: hidden; background: var(--ssf-space); box-shadow: 0 10px 30px -18px rgba(0,0,0,.6); }
.ssf-canvas { display: block; width: 100%; height: 100%; }
.ssf-canvas.ssf-draggable { cursor: grab; touch-action: none; }
.ssf-canvas.ssf-draggable:active { cursor: grabbing; }
.ssf-learn-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; }
.ssf-panel { background: var(--ssf-surface); border: 1px solid var(--ssf-line); border-radius: 16px; padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ssf-kicker { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ssf-accent); }
html[data-theme="dark"] .ssf-kicker { color: var(--ssf-accent); }
.ssf-stage-title { font-family: var(--ssf-font-head); font-weight: 800; font-size: 26px; letter-spacing: -.01em; margin-top: -8px; }
.ssf-stage-title:focus { outline: none; }
.ssf-jump { align-self: flex-start; margin-top: -8px; font-weight: 700; font-size: 15px; color: var(--ssf-accent); }
.ssf-panel-nav { display: flex; justify-content: flex-end; }
.ssf-panel-nav[hidden] { display: none; }
.ssf-explain { display: flex; flex-direction: column; gap: 10px; }
.ssf-time { display: flex; gap: 8px; align-items: baseline; padding: 8px 12px; border-radius: 10px; background: var(--ssf-surface-2); font-weight: 700; font-size: 15px; }

/* glossary terms */
.ssf .ssf-term { display: inline; padding: 0; margin: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; cursor: help; text-decoration: underline; text-decoration-style: dotted; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--ssf-accent); }
.ssf .ssf-term:hover { color: var(--ssf-accent); }
.ssf-tip { position: absolute; z-index: 2000; max-width: 320px; padding: 10px 12px; border-radius: 10px; background: #111827; color: #fff; font: 400 15px/1.4 "Atkinson Hyperlegible", system-ui, sans-serif; box-shadow: 0 10px 28px rgba(0,0,0,.35); }
.ssf-tip strong { color: #f3cf83; margin-right: 4px; }

/* explore controls */
.ssf-explore { border: 1.5px solid var(--ssf-line); border-radius: 12px; overflow: hidden; }
.ssf-explore-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 0 14px; border: 0; background: var(--ssf-surface-2); font-weight: 800; cursor: pointer; text-align: left; }
.ssf-explore-toggle:hover { background: var(--ssf-line); }
.ssf-chev { width: 10px; height: 10px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); margin-top: -4px; transition: transform .2s; }
.ssf-explore-toggle[aria-expanded="true"] .ssf-chev { transform: rotate(-135deg); margin-top: 4px; }
.ssf-explore-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 14px; }
.ssf-explore-note { color: var(--ssf-muted); font-size: 15px; }
.ssf-ctl { display: flex; flex-direction: column; gap: 4px; }
.ssf-ctl label { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; font-size: 15px; }
.ssf-ctl output { font-weight: 400; color: var(--ssf-muted); text-align: right; }
.ssf-ctl input[type=range] { width: 100%; min-height: 32px; accent-color: var(--ssf-accent); cursor: pointer; }
.ssf-switch { flex-direction: row !important; align-items: center; justify-content: flex-start !important; gap: 10px !important; cursor: pointer; min-height: 36px; font-weight: 700; font-size: 15px; }
.ssf-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ssf-switch-ui { position: relative; flex: 0 0 auto; width: 44px; height: 26px; border-radius: 26px; background: var(--ssf-line-2); transition: background .2s; }
.ssf-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.ssf-switch input:checked + .ssf-switch-ui { background: var(--ssf-accent); }
.ssf-switch input:checked + .ssf-switch-ui::after { transform: translateX(18px); }
.ssf-switch input:focus-visible + .ssf-switch-ui { outline: 3px solid var(--ssf-focus); outline-offset: 2px; }
.ssf-choice-set { border: 0; padding: 0; margin: 0; min-width: 0; }
.ssf-choice-set legend { font-weight: 700; font-size: 15px; padding: 0; margin-bottom: 6px; }
.ssf-choice-set legend small { font-weight: 400; color: var(--ssf-muted); }
.ssf-segs { display: flex; flex-wrap: wrap; gap: 6px; }
.ssf-segopt { position: relative; cursor: pointer; }
.ssf-segopt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ssf-segopt span { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 12px; border-radius: 999px; border: 1.5px solid var(--ssf-line-2); font-size: 15px; font-weight: 700; background: var(--ssf-surface); }
.ssf-segopt input:checked + span { background: var(--ssf-accent); color: var(--ssf-accent-ink); border-color: var(--ssf-accent); }
.ssf-segopt input:focus-visible + span { outline: 3px solid var(--ssf-focus); outline-offset: 2px; }

/* check yourself */
.ssf-check { border-top: 1px solid var(--ssf-line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.ssf-check h3, .ssf-finish h3 { font-family: var(--ssf-font-head); font-size: 19px; font-weight: 800; }
.ssf-check-q { font-weight: 700; }
.ssf-check-choices { display: flex; flex-direction: column; gap: 8px; }
.ssf-check-choice { text-align: left; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--ssf-line-2); background: var(--ssf-surface); cursor: pointer; font-size: 16px; line-height: 1.35; }
.ssf-check-choice:hover { border-color: var(--ssf-accent); }
.ssf-check-choice.is-right { border-color: var(--ssf-good); background: var(--ssf-good-bg); }
.ssf-check-choice.is-wrong { border-color: var(--ssf-bad); background: var(--ssf-bad-bg); }
.ssf-feedback { font-size: 16px; font-weight: 700; }
.ssf-feedback.is-right { color: var(--ssf-good); }
.ssf-feedback.is-wrong { color: var(--ssf-bad); }
.ssf-finish { border-top: 1px solid var(--ssf-line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }

/* ── HUD boxes over the simulation ─────────────────────── */
.ssf-overlay { position: absolute; inset: 0; pointer-events: none; color: #fff; font-size: 14px; line-height: 1.35; }
.ssf-hud { position: absolute; max-width: min(290px, 42%); padding: 10px 12px; border-radius: 12px; background: var(--ssf-hud); border: 1px solid var(--ssf-hud-line); backdrop-filter: blur(2px); }
.ssf-hud--tl { top: 10px; left: 10px; }
.ssf-hud--tr { top: 10px; right: 10px; }
.ssf-hud--bl { bottom: 10px; left: 10px; }
.ssf-hud--br { bottom: 10px; right: 10px; }
.ssf-hud-title { font-weight: 800; font-size: 13px; letter-spacing: .03em; text-transform: uppercase; color: #f3cf83; margin-bottom: 4px; }
.ssf-hud-sub { margin-top: 6px; font-weight: 700; color: #f3cf83; font-size: 13px; }
.ssf-hud p { margin: 0; }
.ssf-hud small { display: block; color: #cfd6e2; margin-top: 4px; font-size: 13px; }
.ssf-big { display: block; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ssf-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.ssf-row strong { font-variant-numeric: tabular-nums; text-align: right; }
.ssf-hint { font-size: 13px; color: #dfe6f0; }

.ssf-gp { width: 290px; }
.ssf-gp-bar { display: flex; height: 26px; border-radius: 6px; overflow: hidden; font-size: 12px; font-weight: 800; }
.ssf-gp-bar span { display: flex; align-items: center; white-space: nowrap; overflow: hidden; padding: 0 6px; transition: width .25s; min-width: 0; }
.ssf-gp-p { background: #e69f00; color: #1b1406; }
.ssf-gp-g { background: #56b4e9; color: #06202e; justify-content: flex-end; }
.ssf-bar-key { display: flex; justify-content: space-between; gap: 8px; margin-top: 3px; font-size: 12px; font-weight: 700; color: #dfe6f0; }
.ssf-gp-verdict { margin-top: 6px; font-weight: 700; }

.ssf-inset { width: 210px; }
.ssf-inset-canvas { display: block; width: 100%; height: 190px; }
.ssf-inset-cap { font-weight: 700; text-align: center; }
.ssf-readout { width: 280px; }

.ssf-legend { width: 118px; }
.ssf-legend-body { position: relative; display: flex; gap: 8px; height: 200px; }
.ssf-legend-bar { width: 18px; height: 100%; border-radius: 4px; border: 1px solid rgba(255,255,255,.4); }
.ssf-legend-ticks { position: relative; flex: 1; }
.ssf-legend-ticks span { position: absolute; left: 0; transform: translateY(-50%); font-size: 12px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ssf-probe { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 0; background: transparent; cursor: ew-resize; pointer-events: auto; touch-action: none; padding: 0; }
.ssf-probe span { position: absolute; inset: 9px; border-radius: 50%; background: #ffe066; border: 3px solid #1b1406; box-shadow: 0 0 0 3px rgba(255,224,102,.35); }
.ssf-probe:focus-visible { outline: 3px solid #ffd66b; }
.ssf-probe-card { width: 290px; }
.ssf-compare { width: 300px; }
.ssf-cmp-row { margin-top: 6px; }
.ssf-cmp-row span { font-size: 13px; font-weight: 700; }
.ssf-cmp-bar { display: flex; height: 16px; background: rgba(255,255,255,.08); border-radius: 4px; overflow: hidden; margin-top: 2px; }
.ssf-cmp-bar i, .ssf-cmp-key i { display: block; height: 100%; }
.ssf-cmp-bar i.m, .ssf-cmp-key i.m { background: #aab4c0; }
.ssf-cmp-bar i.r, .ssf-cmp-key i.r { background: #b88a68; }
.ssf-cmp-bar i.i, .ssf-cmp-key i.i { background: #cfe8ff; }
.ssf-cmp-key { display: flex; gap: 12px; margin-top: 6px; font-size: 12px; }
.ssf-cmp-key span { display: inline-flex; align-items: center; gap: 4px; }
.ssf-cmp-key i { width: 10px; height: 10px; border-radius: 2px; }

.ssf-scale { width: 200px; }
.ssf-scale-bar { width: 100px; height: 10px; border: 2px solid #fff; border-top: 0; margin: 6px 0 4px; }
.ssf-force { width: 320px; }
.ssf-force-bar { display: flex; height: 24px; border-radius: 6px; overflow: hidden; font-size: 12px; font-weight: 800; }
.ssf-force-bar span { display: flex; align-items: center; padding: 0 6px; white-space: nowrap; overflow: hidden; transition: width .3s; min-width: 0; }
.ssf-force-bar .e { background: #e69f00; color: #1b1406; }
.ssf-force-bar .g { background: #56b4e9; color: #06202e; justify-content: flex-end; }
.ssf-done strong { color: #ffe066; }

.ssf-tracker { width: 260px; }
.ssf-tracker ol { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.ssf-tracker li { position: relative; padding-left: 22px; font-size: 14px; color: #aab4c4; }
.ssf-tracker li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #aab4c4; }
.ssf-tracker li.done { color: #fff; }
.ssf-tracker li.done::before { background: #56b4e9; border-color: #56b4e9; }
.ssf-tracker li.now { color: #ffe066; font-weight: 800; }
.ssf-tracker li.now::before { background: #ffe066; border-color: #ffe066; box-shadow: 0 0 0 3px rgba(255,224,102,.3); }
.ssf-tracker small { display: inline; color: inherit; font-size: 12px; }

.ssf-thermo { width: 200px; }
.ssf-thermo-body { display: flex; gap: 10px; align-items: stretch; }
.ssf-thermo-tube { position: relative; width: 16px; height: 120px; border-radius: 8px; border: 2px solid #fff; overflow: hidden; background: rgba(255,255,255,.08); flex: 0 0 auto; }
.ssf-thermo-tube i { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(to top, #56b4e9, #e69f00 50%, #ff5a36); transition: height .2s; }
.ssf-thermo-tube b { position: absolute; left: -2px; right: -2px; height: 2px; background: #ffe066; }
.ssf-thermo-body strong { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.ssf-density { width: 280px; }
.ssf-den-row { display: grid; grid-template-columns: 112px 1fr 30px; gap: 6px; align-items: center; font-size: 13px; margin-top: 4px; }
.ssf-den-row > div { height: 12px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; }
.ssf-den-row i { display: block; height: 100%; }

.ssf-gauges { width: 270px; }
.ssf-gauges .ssf-hud-title:not(:first-child) { margin-top: 8px; }
.ssf-gauge { position: relative; height: 12px; background: rgba(255,255,255,.12); border-radius: 6px; }
.ssf-gauge i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #e69f00, #ffe066); }
.ssf-gauge--gas i { background: #8fa8ff; }
.ssf-gauge--jup i { background: #d8b48a; }
.ssf-gauge b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #fff; }

/* timeline strip */
.ssf-tl-caption { max-width: min(380px, 60%); }
.ssf-tl-caption strong { display: block; font-size: 18px; }
.ssf-tl-strip { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 12px; padding: 10px 14px 8px; border-radius: 12px; background: var(--ssf-hud); border: 1px solid var(--ssf-hud-line); pointer-events: auto; }
.ssf .ssf-tl-play { min-width: 92px; }
.ssf-tl-track { position: relative; flex: 1; min-width: 0; padding-bottom: 20px; }
.ssf-tl-range { width: 100%; min-height: 32px; accent-color: #ffe066; cursor: pointer; margin: 0; }
.ssf-tl-axis { position: absolute; left: 8px; right: 8px; bottom: 0; height: 18px; }
.ssf-tl-axis span { position: absolute; transform: translateX(-50%); font-size: 12px; color: #cfd6e2; white-space: nowrap; }
.ssf-tl-axis span:first-child { transform: none; }
.ssf-tl-axis span:last-child { transform: translateX(-100%); }
.ssf-tl-events { position: absolute; left: 8px; right: 8px; top: -8px; height: 12px; }
.ssf-tl-dot { position: absolute; width: 22px; height: 22px; margin-left: -11px; top: -6px; border: 0; background: transparent; cursor: pointer; padding: 0; }
.ssf-tl-dot::after { content: ""; position: absolute; left: 6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: #56627a; border: 2px solid #fff; }
.ssf-tl-dot.is-past::after { background: #ffe066; }

/* ── Test ──────────────────────────────────────────────── */
.ssf-test-root { max-width: 920px; margin: 0 auto; }
.ssf-test-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.ssf-test-count { font-weight: 800; white-space: nowrap; }
.ssf-test-bar { flex: 1; height: 8px; border-radius: 8px; background: var(--ssf-line); overflow: hidden; }
.ssf-test-bar i { display: block; height: 100%; background: var(--ssf-test); }
.ssf-exit-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 12px; border-radius: 12px; background: var(--ssf-bad-bg); border: 1.5px solid var(--ssf-bad); font-weight: 700; }
.ssf-q { background: var(--ssf-surface); border: 1px solid var(--ssf-line); border-radius: 16px; padding: 20px 22px; }
.ssf .ssf-q-prompt { font-size: 22px; font-weight: 800; line-height: 1.3; margin-bottom: 16px; }
.ssf-q-prompt:focus { outline: none; }
.ssf .ssf-q-sub { color: var(--ssf-muted); font-size: 15px; margin: 8px 0; }
.ssf-scene { display: block; width: 100%; height: 230px; border-radius: 12px; margin-bottom: 14px; background: var(--ssf-space); }
.ssf-choices { display: flex; flex-direction: column; gap: 8px; }
.ssf-choice { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--ssf-line-2); border-radius: 12px; cursor: pointer; background: var(--ssf-surface); }
.ssf-choice:hover { border-color: var(--ssf-test); }
.ssf-choice input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--ssf-test); margin: 0; }
.ssf-choice:has(input:checked) { border-color: var(--ssf-test); background: color-mix(in srgb, var(--ssf-test) 10%, var(--ssf-surface)); }
.ssf-q-nav { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 14px; }
.ssf-q-hint { color: var(--ssf-muted); font-size: 15px; }
.ssf-order { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; touch-action: none; }
.ssf-order-item { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 8px 6px 12px; border: 1.5px solid var(--ssf-line-2); border-radius: 12px; background: var(--ssf-surface); cursor: grab; user-select: none; }
.ssf-order-item.is-dragging { border-color: var(--ssf-test); box-shadow: 0 6px 18px rgba(0,0,0,.18); cursor: grabbing; }
.ssf-grip { font-size: 22px; color: var(--ssf-muted); }
.ssf-order-num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ssf-surface-2); font-weight: 800; font-size: 14px; flex: 0 0 auto; }
.ssf-order-text { flex: 1; font-weight: 700; }
.ssf-order-btns { display: flex; gap: 4px; }
.ssf .ssf-mini { width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid var(--ssf-line-2); background: var(--ssf-surface); cursor: pointer; font-size: 14px; }
.ssf .ssf-mini:disabled { opacity: .35; cursor: default; }
.ssf-diagram { position: relative; }
.ssf-diagram-canvas { display: block; width: 100%; height: 240px; border-radius: 12px; background: var(--ssf-space); touch-action: none; cursor: pointer; }
.ssf-diagram-canvas--short { height: 170px; cursor: default; }
.ssf-frost-marker { position: absolute; top: 6px; bottom: 36px; width: 44px; margin-left: -22px; border: 0; background: transparent; cursor: ew-resize; touch-action: none; padding: 0; }
.ssf-frost-marker::before { content: ""; position: absolute; left: 20px; top: 0; bottom: 0; width: 4px; background: #ffe066; border-radius: 2px; box-shadow: 0 0 0 1px #1b1406; }
.ssf-frost-marker span { position: absolute; top: -2px; left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: 999px; background: #ffe066; color: #1b1406; font-weight: 800; font-size: 12px; white-space: nowrap; }
.ssf-mini-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--ssf-muted); }
.ssf-mini-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ssf-mini-legend i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--ssf-line-2); }
.ssf-classify { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ssf-classify-row { display: grid; grid-template-columns: 100px 1fr 1fr; gap: 8px; align-items: center; }
.ssf-classify-name { font-weight: 800; }
.ssf-seg { min-height: 44px; padding: 6px 10px; border-radius: 10px; border: 1.5px solid var(--ssf-line-2); background: var(--ssf-surface); cursor: pointer; font-weight: 700; font-size: 15px; }
.ssf-seg[aria-pressed="true"] { background: var(--ssf-test); border-color: var(--ssf-test); color: #fff; }
html[data-theme="dark"] .ssf-seg[aria-pressed="true"] { color: #0b1020; }
.ssf-label-rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.ssf-label-row { display: flex; align-items: center; gap: 8px; }
.ssf-label-letter { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #ffe066; color: #1b1406; font-weight: 800; flex: 0 0 auto; }
.ssf-label-row select { flex: 1; min-width: 0; min-height: 44px; padding: 0 8px; border-radius: 10px; border: 1.5px solid var(--ssf-line-2); background: var(--ssf-surface); }

.ssf-results { background: var(--ssf-surface); border: 1px solid var(--ssf-line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.ssf-results h2 { font-family: var(--ssf-font-head); font-size: 28px; font-weight: 800; }
.ssf-results h2:focus { outline: none; }
.ssf-results h3 { font-size: 19px; font-weight: 800; margin-top: 6px; }
.ssf-score { display: flex; align-items: baseline; gap: 14px; }
.ssf-score strong { font-size: 46px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ssf-score span { font-size: 22px; font-weight: 700; color: var(--ssf-muted); }
.ssf-breakdown { width: 100%; border-collapse: collapse; font-size: 15px; }
.ssf-breakdown th, .ssf-breakdown td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--ssf-line); vertical-align: top; }
.ssf-breakdown thead th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ssf-muted); }
.ssf-breakdown td:nth-child(2) { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.ssf-ok { color: var(--ssf-good); font-weight: 700; }
.ssf-review { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }
.ssf-review-item { padding: 12px 14px; border-radius: 12px; background: var(--ssf-surface-2); display: flex; flex-direction: column; gap: 6px; }
.ssf-review-q { font-weight: 800; }
.ssf-review-why { color: var(--ssf-muted); font-size: 15px; }
.ssf-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; margin-right: 6px; }
.ssf-tag--bad { background: var(--ssf-bad-bg); color: var(--ssf-bad); border: 1px solid var(--ssf-bad); }
.ssf-tag--good { background: var(--ssf-good-bg); color: var(--ssf-good); border: 1px solid var(--ssf-good); }
.ssf-turnin-slot:empty { display: none; }
.ssf-turnin-note { color: var(--ssf-muted); font-size: 15px; }
.ssf-results-actions { display: flex; flex-wrap: wrap; gap: 10px; }


/* ── Build your own solar system (stage 10) ────────────── */
.ssf-modes { grid-template-columns: repeat(3, 1fr); }
.ssf-mode--build { border-color: var(--ssf-accent); box-shadow: inset 0 0 0 1px var(--ssf-accent); }
.ssf-step--extra .ssf-step-num { font-size: 18px; }

.ssf-bld-choose {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(560px, calc(100% - 24px));
  padding: 16px 18px 18px; border-radius: 16px; background: var(--ssf-hud); border: 1px solid var(--ssf-hud-line);
  pointer-events: auto; display: grid; gap: 10px; backdrop-filter: blur(3px);
}
.ssf-bld-choose h3 { font-family: var(--ssf-font-head); font-size: 22px; font-weight: 800; color: #fff; }
.ssf-bld-slider { display: grid; gap: 4px; font-weight: 700; color: #f3cf83; font-size: 14px; }
.ssf-bld-slider input { width: 100%; min-height: 32px; accent-color: #ffe066; cursor: pointer; margin: 0; }
.ssf-bld-pred { color: #e7ecf4; font-size: 15px; min-height: 42px; }
.ssf-bld-pred strong { color: #fff; }
.ssf-bld-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.ssf .ssf-bld-presets .ssf-btn { min-height: 40px; padding: 0 14px; background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.3); font-size: 15px; }
.ssf .ssf-bld-presets .ssf-btn:hover { border-color: #ffe066; }
.ssf .ssf-bld-choose > .ssf-btn--primary { justify-self: start; }

.ssf-bld-star { width: 236px; }
.ssf-bld-star-top { display: flex; gap: 10px; align-items: center; }
.ssf-bld-star-top i { flex: none; width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 14px rgba(255,255,255,.35); }
.ssf-bld-star-top strong { display: block; font-size: 15px; line-height: 1.2; }
.ssf-bld-star dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 8px 0 0; font-size: 13px; }
.ssf-bld-star dt { color: #cfd6e2; }
.ssf-bld-star dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

.ssf-bld-strip { gap: 10px; }
.ssf-bld-zoom { flex: none; gap: 4px; }
.ssf-bld-zoom button {
  min-height: 40px; padding: 0 10px; border-radius: 999px; cursor: pointer; font: 700 13px/1 var(--ssf-font);
  color: #fff; background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.3);
}
.ssf-bld-zoom button[aria-pressed="true"] { background: #ffe066; color: #1b1406; border-color: #ffe066; }
.ssf-bld-actions { position: absolute; right: 10px; bottom: 84px; display: flex; gap: 8px; pointer-events: auto; }
.ssf .ssf-bld-mini { min-height: 40px; padding: 0 12px; font-size: 14px; background: var(--ssf-hud); color: #fff; border-color: var(--ssf-hud-line); }
.ssf .ssf-bld-mini[aria-expanded="true"] { border-color: #ffe066; }

.ssf-bld-report {
  position: absolute; top: 10px; right: 10px; bottom: 134px; width: min(400px, calc(100% - 20px)); overflow: auto;
  padding: 12px 14px; border-radius: 12px; background: rgb(8, 12, 24); border: 1px solid var(--ssf-hud-line);
  pointer-events: auto; font-size: 14px; display: grid; gap: 10px; align-content: start; z-index: 2;
}
.ssf-bld-report:focus { outline: none; }
.ssf-bld-report:focus-visible { outline: 3px solid var(--ssf-focus); }
.ssf-bld-report-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ssf-bld-report h3 { font-family: var(--ssf-font-head); font-size: 19px; font-weight: 800; }
.ssf-bld-facts { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; }
.ssf-bld-facts dt { color: #cfd6e2; }
.ssf-bld-facts dd { margin: 0; font-weight: 700; }
.ssf-bld-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.ssf-bld-table caption { text-align: left; font-weight: 800; color: #f3cf83; padding-bottom: 4px; }
.ssf-bld-table th, .ssf-bld-table td { padding: 3px 6px; border-bottom: 1px solid rgba(255,255,255,.12); text-align: left; }
.ssf-bld-table thead th { color: #cfd6e2; font-weight: 700; }
.ssf-bld-table tr.is-sel td, .ssf-bld-table tr.is-sel th { background: rgba(255,224,102,.14); }
.ssf-bld-hist tr.is-ref td { color: #cfd6e2; font-style: italic; }
.ssf-bld-pick { min-width: 36px; min-height: 32px; border-radius: 8px; border: 1.5px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: #fff; font-weight: 800; cursor: pointer; }
.ssf-bld-sel { padding: 8px 10px; border-radius: 10px; background: rgba(255,224,102,.1); border: 1px solid rgba(255,224,102,.4); }

/* ── Smaller screens ───────────────────────────────────── */
@media (max-width: 1100px) {
  .ssf-stage { grid-template-columns: minmax(0, 1fr) 360px; }
  .ssf-step-label { display: none; }
}
@media (max-width: 900px) {
  .ssf-stage { grid-template-columns: 1fr; }
  .ssf-viz-col { position: static; }
  .ssf-viz { height: clamp(300px, 62vw, 520px); }
  .ssf-modes { grid-template-columns: 1fr; }
  .ssf-hud { max-width: 46%; font-size: 12px; }
  .ssf-bld-report { bottom: 10px; }
  .ssf-gp, .ssf-force, .ssf-tracker, .ssf-probe-card, .ssf-compare, .ssf-gauges, .ssf-density, .ssf-readout { width: auto; }
  .ssf-label-rows { grid-template-columns: 1fr; }
  .ssf-classify-row { grid-template-columns: 1fr 1fr; }
  .ssf-classify-name { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .ssf { padding: 8px 10px 20px; }
  .ssf-learn-top { flex-wrap: wrap; }
  .ssf-progress { flex-basis: 100%; }
  .ssf-progress-track { left: 15px; right: 15px; top: 14px; }
  .ssf-step-num { width: 30px; height: 30px; font-size: 13px; }
  .ssf-step { min-width: 30px; min-height: 30px; padding: 0; }
  .ssf-hero-copy { padding: 20px; }
  .ssf-tl-strip { flex-wrap: wrap; }
  .ssf-bld-zoom { width: 100%; justify-content: center; }
  .ssf-bld-actions { bottom: 128px; }
  .ssf-bld-star { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ssf *, .ssf *::before, .ssf *::after { transition: none !important; }
}
