/* Who Spun It - a home lab bench: cream paper, walnut, slate-blue glass and a warm copper accent; a dim workshop by night. */
:root { --bg: #f4efe6; --card: #fffdf8; --ink: #22313f; --soft: #5c6773; --line: #e2d9ca; --accent: #2f5d7c; --accent-ink: #ffffff; --copper: #b4512a; --copper-bg: #f9e4d8;
  --glass: #2f6f96; --glass-bg: #e1eef6; --warm: #a8431c; --warm-bg: #fbe3d6; --breath: #3d6b84; --breath-bg: #e3eef3; --room: #2b6a8f; --room-bg: #dcebf4;
  --none: #59616b; --none-bg: #e8e6e1; --pair: #7a5a12; --pair-bg: #f6ebcd; --ok-bg: #e2efe4; --warn-bg: #f8eed5; --bad-bg: #fbe1d9;
  --shadow: 0 1px 0 rgba(34, 49, 63, .05), 0 10px 24px rgba(34, 49, 63, .07); color-scheme: light; }
:root[data-theme="dark"] { --bg: #121821; --card: #1a222d; --ink: #e6edf3; --soft: #a9b4bf; --line: #2e3a48; --accent: #8cc4e4; --accent-ink: #10202c; --copper: #f08a4f; --copper-bg: #43261a;
  --glass: #8cc4e4; --glass-bg: #1d3446; --warm: #ffab7d; --warm-bg: #4a2717; --breath: #a9d0e4; --breath-bg: #213744; --room: #9fd0ef; --room-bg: #1c3547;
  --none: #ccd3da; --none-bg: #2c333c; --pair: #f0d48a; --pair-bg: #3b3218; --ok-bg: #1d3226; --warn-bg: #3a2e14; --bad-bg: #44201f;
  --shadow: 0 1px 0 rgba(0, 0, 0, .45); color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--copper); }
h1, h2, h3, h4, .brand strong, .headline { font-family: ui-rounded, "Trebuchet MS", system-ui, sans-serif; letter-spacing: .005em; }
.hidden { display: none !important; }
.small { font-size: .9rem; } .muted { color: var(--soft); } .mono { font-family: ui-monospace, Menlo, monospace; }
.bar { display: flex; align-items: center; gap: 10px; padding: 9px 16px; background: var(--card); border-bottom: 2px solid var(--line); position: sticky; top: 0; z-index: 5; }
.back { text-decoration: none; color: var(--soft); white-space: nowrap; }
.brand { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; font-size: 1.08rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo { width: 26px; height: 26px; flex: none; }
.lg-vane { fill: var(--card); stroke: var(--copper); stroke-width: 1.8; stroke-linejoin: round; } .lg-pin { stroke: var(--soft); stroke-width: 1.8; stroke-linecap: round; }
.session { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pill { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: .86rem; cursor: pointer; text-decoration: none; display: inline-block; }
.pill:hover:not(:disabled) { border-color: var(--ink); }
.pill.solid { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.pill.solid:hover:not(:disabled) { border-color: var(--copper); color: var(--accent-ink); }
.pill.ghost { cursor: default; } .pill.tiny { padding: 3px 11px; font-size: .8rem; } .pill.big { padding: 10px 24px; font-size: 1rem; }
.pill:disabled { opacity: .5; cursor: not-allowed; }
main { max-width: 1080px; margin: 0 auto; padding: 8px 16px 40px; }
.hero { padding: 26px 0 8px; text-align: left; max-width: 760px; }
.kicker { margin: 0 0 6px; color: var(--copper); font-weight: 700; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2.1rem, 7vw, 3.1rem); line-height: 1.05; font-weight: 800; }
.h1b { display: block; font-size: 1.12rem; font-weight: 500; color: var(--soft); margin-top: 6px; }
.lede { max-width: 640px; margin: 10px 0; }
.samples { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { border: 1px dashed var(--soft); background: transparent; color: var(--ink); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .85rem; cursor: pointer; }
.chip:hover { border-style: solid; }
.chip.on { background: var(--copper-bg); border: 1px solid var(--copper); color: var(--ink); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 14px 0; box-shadow: var(--shadow); }
.ph { margin: 0 0 10px; font-size: 1.18rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.step-no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--copper); color: #fff; font-size: .85rem; font-weight: 700; }
.free { font-size: .72rem; font-weight: 700; color: var(--glass); background: var(--glass-bg); border-radius: 999px; padding: 2px 9px; letter-spacing: .04em; text-transform: uppercase; }
.lab { display: block; font-weight: 600; font-size: .92rem; margin: 10px 0 4px; }
.inp, .sel { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; max-width: 100%; }
.inp.wide { width: 100%; } .sel { padding: 5px 8px; font-size: .88rem; }
.inp:focus, .sel:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.trials { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 10px; }
.trow { border: 1px solid var(--line); border-left: 4px solid var(--copper); border-radius: 12px; padding: 10px 12px; background: var(--bg); }
.trow-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 700; }
.trow-h .rm { margin-left: auto; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.tgrid label { display: flex; flex-direction: column; gap: 2px; font-size: .78rem; color: var(--soft); font-weight: 600; min-width: 0; }
.tgrid .sel { width: 100%; }
.tnote { width: 100%; margin-top: 8px; }
.note { background: var(--warn-bg); border-radius: 10px; padding: 7px 10px; }
.cardrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.sheetwrap svg { width: 100%; height: auto; display: block; border-radius: 12px; }
.wheel.l1 { animation: wob 1.6s ease-in-out infinite; } .wheel.l2 { animation: turn 2.4s linear infinite; } .wheel.l3 { animation: turn 0.9s linear infinite; }
.warm { animation: rise 2.2s ease-in-out infinite; }
@keyframes wob { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes turn { 0% { transform: scaleX(1); } 25% { transform: scaleX(.12); } 50% { transform: scaleX(-1); } 75% { transform: scaleX(-.12); } 100% { transform: scaleX(1); } }
@keyframes rise { 0%, 100% { opacity: .35; transform: translateY(4px); } 50% { opacity: .9; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .wheel, .warm { animation: none !important; } }
.suspects { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.suspects li { border-radius: 999px; padding: 4px 12px; font-size: .84rem; border: 1px solid var(--line); background: var(--none-bg); color: var(--none); }
.suspects li.st-points { background: var(--warm-bg); color: var(--warm); border-color: var(--warm); font-weight: 700; }
.suspects li.st-flat { background: var(--glass-bg); color: var(--glass); }
.suspects li.st-odd { background: var(--pair-bg); color: var(--pair); }
.ruleline { font-weight: 700; } .nextline { background: var(--glass-bg); color: var(--ink); border-radius: 10px; padding: 8px 10px; }
.runrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.gate { background: var(--warn-bg); border-radius: 10px; padding: 8px 10px; }
.steps { list-style: none; padding: 0; margin: 8px 0; } .step { padding: 2px 0; color: var(--soft); } .step.done { color: var(--ink); } .step.active { color: var(--copper); font-weight: 700; }
.step-ic { display: inline-block; width: 1.2em; font-family: ui-monospace, Menlo, monospace; }
.raw { white-space: pre-wrap; word-break: break-word; background: var(--bg); padding: 10px; border-radius: 10px; font-size: .85rem; }
.result.empty { opacity: .9; }
.res-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.res-kick { margin: 0; color: var(--soft); }
.badge { border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: .8rem; letter-spacing: .05em; background: var(--none-bg); color: var(--none); white-space: nowrap; }
.v-warm-hands { background: var(--warm-bg); color: var(--warm); } .v-your-breath { background: var(--breath-bg); color: var(--breath); }
.v-room-air, .v-moving-air { background: var(--room-bg); color: var(--room); } .v-need-a-pair { background: var(--pair-bg); color: var(--pair); } .v-no-spin { background: var(--none-bg); color: var(--none); }
.headline { font-size: 1.3rem; font-weight: 700; margin: 10px 0; }
.readings { padding-left: 0; list-style: none; display: grid; gap: 8px; }
.rcard { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--bg); }
.rhead { display: flex; gap: 8px; align-items: baseline; } .rnum { font-weight: 800; color: var(--copper); } .rline { margin: 4px 0 0; }
.readings .none, .recon .none, .saved .none { color: var(--soft); list-style: none; }
.notebox { border-radius: 12px; padding: 10px 12px; background: var(--glass-bg); margin: 10px 0; } .notebox h4 { margin: 0 0 4px; }
.notebox.move { background: var(--copper-bg); }
.closing { font-style: italic; }
.recon { padding-left: 18px; } .recon .bad { background: var(--bad-bg); } .recon .warn { background: var(--warn-bg); } .recon li { border-radius: 8px; padding: 3px 8px; margin: 3px 0; }
.exports { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.saved { list-style: none; padding: 0; } .hrow { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.hinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; } .hinfo b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hdot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--none-bg); border: 2px solid var(--line); }
.hbtns { display: flex; gap: 4px; }
.foot { max-width: 1080px; margin: 0 auto; padding: 10px 16px 40px; color: var(--soft); font-size: .88rem; }
.toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); display: grid; gap: 6px; z-index: 20; width: min(92vw, 520px); }
.toast { background: var(--ink); color: var(--bg); border-radius: 12px; padding: 9px 14px; font-size: .9rem; transition: opacity .5s; }
.toast.err { background: var(--copper); color: #fff; } .toast.gone { opacity: 0; } .toast a { color: inherit; font-weight: 700; }
@media (min-width: 900px) { main:not(.doc) { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; } main > .hero, main > .askbox, main > .progress, main > #how, main > #rawResult, main > .result, main > .histbox, main > .aboutbox { grid-column: 1 / -1; } }
@media (max-width: 640px) { .tgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .back-t { display: none; } .bar { gap: 6px; padding: 8px 10px; } .pill { padding: 5px 10px; } }
@media print { .bar, .samples, .askbox, .histbox, .exports, .toasts, .cardrow { display: none !important; } body { background: #fff; } .panel { box-shadow: none; } }
