/* Lights Low - a street after dark: dusk-blue paper by day, warm amber for lamplight and a cool steel blue for the pull
 * that moths follow; a deep night sky in dark mode. */
:root { --bg: #eef1f7; --card: #ffffff; --ink: #1b2236; --soft: #535d74; --line: #d6dcea; --accent: #2f4a8a; --accent-ink: #ffffff; --mark: #9a4f0c; --mark-bg: #fbecd8;
  --free: #2f4a8a; --free-bg: #e2e8f5; --ok-bg: #e3f0e6; --warn-bg: #f7edd6; --bad-bg: #f9e0e3;
  --strong: #9c2f22; --strong-bg: #fbe2dc; --some: #8a5a00; --some-bg: #f8ebcc; --faint: #2c6a45; --faint-bg: #dcefe2; --fix: #2f4a8a; --fix-bg: #e2e8f5;
  --keep: #2c6a45; --keep-bg: #dcefe2; --none: #505a6c; --none-bg: #e4e8f0; --wood: #c98a3a;
  --shadow: 0 1px 0 rgba(37, 29, 51, .05), 0 10px 24px rgba(37, 29, 51, .08); color-scheme: light; }
:root[data-theme="dark"] { --bg: #0f1320; --card: #171c2c; --ink: #e9ecf5; --soft: #a9b1c7; --line: #2a3249; --accent: #ffb867; --accent-ink: #1b1206; --mark: #ffc785; --mark-bg: #33270f;
  --free: #b9c9f2; --free-bg: #232c47; --ok-bg: #1a3022; --warn-bg: #3a2f14; --bad-bg: #44202a;
  --strong: #ffb4a6; --strong-bg: #4a1e18; --some: #f3cf83; --some-bg: #3b2d0f; --faint: #9fdcb3; --faint-bg: #173523; --fix: #b9c9f2; --fix-bg: #232c47;
  --keep: #9fdcb3; --keep-bg: #173523; --none: #d0d5e0; --none-bg: #2c3344; --wood: #a8742f;
  --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(--mark); }
h1, h2, h3, h4, .brand strong, .headline { font-family: Georgia, "Iowan Old Style", "Palatino Linotype", 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-a { fill: var(--accent); } .lg-b { fill: var(--accent); opacity: .85; } .lg-a { fill: var(--wood); } .lg-line { stroke: var(--wood); stroke-width: 2; stroke-linecap: round; fill: none; }
.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(--mark); 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(--mark); 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; line-height: 1.3; }
.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(--mark-bg); border: 1px solid var(--mark); 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(--mark); color: #fff; font-size: .85rem; font-weight: 700; }
.free { font-size: .72rem; font-weight: 700; color: var(--free); background: var(--free-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(--mark); 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%; }
.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; }
.ruleline { font-weight: 700; } .nextline { background: var(--free-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(--mark); 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; }
.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(--mark); } .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(--free-bg); margin: 10px 0; } .notebox h4 { margin: 0 0 4px; }
.notebox.move { background: var(--mark-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; }
.twhat { width: 100%; margin-bottom: 8px; }
.sortlist { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.sortlist li { display: flex; gap: 8px; align-items: baseline; font-size: .88rem; } .sortlist .none { color: var(--soft); }
.stext { min-width: 0; overflow-wrap: anywhere; }
.sbadge { flex: none; border-radius: 999px; padding: 2px 10px; font-size: .74rem; font-weight: 800; letter-spacing: .03em; white-space: nowrap; }
.v-strong, .v-beacon { background: var(--strong-bg); color: var(--strong); } .v-some, .v-glow { background: var(--some-bg); color: var(--some); } .v-faint, .v-low, .v-keep { background: var(--keep-bg); color: var(--keep); } .v-aim-down, .v-curtain, .v-timer, .v-warm-bulb { background: var(--fix-bg); color: var(--fix); } .v-none { background: var(--none-bg); color: var(--none); }
.hdot.v-beacon { background: var(--strong); border-color: var(--strong); } .hdot.v-glow { background: var(--some); border-color: var(--some); } .hdot.v-low { background: var(--keep); border-color: var(--keep); }
.trow.side-outdoor { border-left-color: var(--mark); } .trow.side-window { border-left-color: var(--accent); border-left-style: dashed; }
.rcard.picked { border: 2px solid var(--accent); }
.result .notebox.move { border-left: 4px solid var(--wood); }
.rcheck { margin: 4px 0 0; font-size: .9rem; color: var(--soft); }
.rhead { flex-wrap: wrap; justify-content: space-between; } .rnum { min-width: 0; overflow-wrap: anywhere; }
.rmove { margin: 6px 0 0; font-size: .92rem; }
.must { margin: 4px 0 8px; padding-left: 20px; }
.prompt { white-space: pre-wrap; word-break: break-word; background: var(--card); border: 1px dashed var(--mark); padding: 10px; border-radius: 10px; font: .88rem/1.5 ui-monospace, Menlo, monospace; margin: 4px 0 8px; }
.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(--mark); 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: 5fr 6fr; column-gap: 16px; align-items: start; } 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; } }
.tgrid label:last-child { grid-column: 1 / -1; }
#items .twhat { margin-top: 8px; }
.panel, .hero { scroll-margin-top: 72px; }
.tlab { display: flex; flex-direction: column; gap: 2px; font-size: .78rem; color: var(--soft); font-weight: 600; margin: 6px 0; } .tlab .twhat { width: 100%; box-sizing: border-box; font-weight: 400; font-size: 1rem; }
.todolist { list-style: none; padding: 0; margin: 6px 0 0; } .todolist .todohead { font-weight: 700; } .todolist .todorow { padding-left: 12px; }
