/* Sink or Bob - galvanised steel, tub-water blue, apple red and a little autumn amber. */
:root {
  --bg: #eef3f6; --paper: #ffffff; --ink: #17232d; --muted: #4f5f6c; --line: #cfdbe3; --accent: #c8302a; --accent-ink: #fff;
  --steel: #2c3e4c; --water: #2f7fb3; --soft: #e2ebf1;
  --v-bobs: #b8291f; --v-low: #8f5400; --v-sinks: #44566a; --v-dep: #6f44a8; --declined: #625d59;
  --hit: #2e7a3a; --miss: #9b2c22; --warn-bg: #fff2cc; --err-bg: #f9ddd6;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f171d; --paper: #16222b; --ink: #e9f1f7; --muted: #a9b9c6; --line: #2b3b47; --accent: #ff6b5e; --accent-ink: #0f171d;
  --steel: #0a1116; --water: #6fbbe8; --soft: #1c2b35;
  --v-bobs: #ff8a7e; --v-low: #f2b75e; --v-sinks: #b3c4d6; --v-dep: #cfadf6; --declined: #c3bcb6;
  --hit: #8fd69a; --miss: #ff9f94; --warn-bg: #3a3116; --err-bg: #47231e;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.55 "Avenir Next", "Segoe UI", Roboto, Helvetica, Arial, sans-serif; overflow-x: hidden; }
a { color: var(--water); }
h1, h2, h3, h4 { font-family: Rockwell, "Roboto Slab", "Courier New", Georgia, serif; }
button, input, textarea { font-family: inherit; }
.hidden { display: none !important; }
.small { font-size: 14px; } .muted { color: var(--muted); } .mono { font-family: ui-monospace, Menlo, monospace; }
.bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--steel); color: #f1f6f9; position: sticky; top: 0; z-index: 5; flex-wrap: wrap; border-bottom: 4px solid #6fa8c9; }
.bar .back { color: #f1f6f9; text-decoration: none; font-size: 14px; white-space: nowrap; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 20px; flex: 1; min-width: 0; font-family: Rockwell, "Roboto Slab", Georgia, serif; }
.brand strong { white-space: nowrap; }
.logo { width: 28px; height: 28px; flex: none; }
.lg-tub { fill: #9aa6b1; } .lg-water { fill: #5aa7d6; } .lg-apple { fill: #e0473c; } .lg-leaf { stroke: #6fbf5a; stroke-width: 1.8; fill: none; stroke-linecap: round; }
.session { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pill { border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 6px 14px; font-size: 14px; cursor: pointer; text-decoration: none; display: inline-block; min-height: 34px; }
.bar .pill { background: transparent; color: #f1f6f9; border-color: rgba(241,246,249,.45); }
.pill:hover:not(:disabled) { border-color: var(--accent); }
.pill.solid, .bar .pill.solid { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pill.ghost { cursor: default; background: transparent; }
.pill.tiny { padding: 3px 11px; font-size: 13px; min-height: 30px; }
.pill.big { padding: 11px 24px; font-size: 16px; }
.pill:disabled { opacity: .5; cursor: not-allowed; }
main { max-width: 1000px; margin: 0 auto; padding: 0 16px 40px; }
.hero { padding: 28px 0 8px; }
.kicker { color: var(--muted); font-size: 15px; margin: 0 0 8px; max-width: 720px; }
h1 { font-size: clamp(2.1rem, 7vw, 3.4rem); line-height: 1.02; margin: 0 0 10px; color: var(--steel); }
:root[data-theme="dark"] h1 { color: var(--ink); }
.h1b { display: block; font-size: .46em; color: var(--accent); margin-top: 6px; }
.lede { font-size: 18px; max-width: 720px; margin: 0 0 14px; }
.samples { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { border: 1px dashed var(--water); background: transparent; color: var(--ink); border-radius: 999px; padding: 5px 12px; font-size: 14px; cursor: pointer; min-height: 34px; }
.chip.on { background: var(--water); color: var(--paper); border-style: solid; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 16px 0; }
.ph { font-size: 21px; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.step-no { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--steel); color: #f1f6f9; font-size: 15px; flex: none; }
:root[data-theme="dark"] .step-no { background: #34505f; }
.free { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; border: 1px solid var(--water); color: var(--water); border-radius: 999px; padding: 1px 8px; font-family: "Avenir Next", sans-serif; }
.flab { font-weight: 600; font-size: 14px; }
.waterrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; flex: none; }
.segb { border: 0; border-right: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 6px 12px; font-size: 14px; cursor: pointer; min-height: 36px; }
.segb:last-child { border-right: 0; }
.segb.on { background: var(--steel); color: #f1f6f9; font-weight: 600; }
:root[data-theme="dark"] .segb.on { background: #6fbbe8; color: #0f171d; }
.cardrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.note { background: var(--warn-bg); border-radius: 8px; padding: 8px 10px; }
.items { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.irow { display: grid; grid-template-columns: 30px 1fr auto auto; gap: 8px; align-items: center; }
.idel { font-size: 18px; line-height: 1; padding: 3px 10px; }
.ino { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--soft); font-weight: 700; font-size: 14px; }
.iname { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font-size: 16px; }
.iname:focus, .segb:focus-visible, .pill:focus-visible, .chip:focus-visible { outline: 2px solid var(--water); outline-offset: 1px; }
.tgrid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.tubwrap svg { width: 100%; height: auto; display: block; }
.sub { font-size: 16px; margin: 0 0 6px; }
.freelist { margin: 0; padding-left: 18px; font-size: 14px; }
.freelist li { margin: 3px 0; }
.runrow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.gate { background: var(--warn-bg); border-radius: 8px; padding: 8px 10px; margin: 10px 0 0; }
.steps { list-style: none; padding: 0; margin: 8px 0; }
.step { color: var(--muted); padding: 2px 0; } .step.active { color: var(--ink); font-weight: 600; } .step.done { color: var(--hit); }
.step-ic { display: inline-block; width: 16px; font-family: ui-monospace, monospace; }
.raw { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; background: var(--bg); padding: 10px; border-radius: 8px; }
.res-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.res-kick { margin: 0; color: var(--muted); }
.badge { border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 13px; letter-spacing: .04em; border: 2px solid var(--line); color: var(--muted); }
.badge.v-tally { border-color: var(--water); color: var(--water); }
.badge.v-declined { border-color: var(--declined); color: var(--declined); }
.reason { font-size: 17px; }
.rline { font-size: 19px; font-weight: 600; margin: 10px 0 4px; font-family: Rockwell, "Roboto Slab", Georgia, serif; }
.rscore { margin: 0 0 8px; font-weight: 600; color: var(--water); }
.icards { list-style: none; padding: 0; margin: 10px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.icards > li.none { color: var(--muted); }
.icard { border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg); }
.icard.v-bobs { border-left-color: var(--v-bobs); } .icard.v-rides-low { border-left-color: var(--v-low); } .icard.v-sinks { border-left-color: var(--v-sinks); } .icard.v-depends { border-left-color: var(--v-dep); border-left-style: dashed; }
.chead { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ctitle { font-weight: 700; overflow-wrap: anywhere; }
.tag { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 9px; border: 1.5px solid currentColor; white-space: nowrap; }
.tag.v-bobs { color: var(--v-bobs); } .tag.v-rides-low { color: var(--v-low); } .tag.v-sinks { color: var(--v-sinks); } .tag.v-depends { color: var(--v-dep); border-style: dashed; } .tag.v-none { color: var(--muted); }
.csub { margin: 2px 0 6px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.call { font-weight: 600; } .call.hit { color: var(--hit); } .call.miss { color: var(--miss); } .call.open { color: var(--v-dep); }
.hunch { margin: 4px 0; font-style: italic; }
.hunch b, .dep b { font-style: normal; }
.axioms { margin: 4px 0; padding-left: 18px; font-size: 14px; }
.why { margin: 6px 0 0; }
.dep { margin: 6px 0 0; color: var(--v-dep); }
.wbox { border: 1px dashed var(--water); border-radius: 10px; padding: 8px 12px; margin: 10px 0; }
.wbox h4 { margin: 0 0 4px; font-size: 15px; }
.wbox p { margin: 0; } .wbox p.none { color: var(--muted); }
.closing { font-style: italic; margin: 8px 0; }
.recon { padding-left: 18px; font-size: 14px; }
.recon li.warn { background: var(--warn-bg); border-radius: 6px; padding: 2px 6px; margin: 3px 0; }
.recon li.err { background: var(--err-bg); border-radius: 6px; padding: 2px 6px; margin: 3px 0; }
.recon li.none { color: var(--muted); }
.exports { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.saved { list-style: none; padding: 0; margin: 10px 0 0; }
.hrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.hrow.none { color: var(--muted); border-top: 0; }
.hdot { width: 12px; height: 12px; border-radius: 50%; background: var(--line); flex: none; }
.hdot.v-tally { background: var(--water); } .hdot.v-declined { background: var(--declined); }
.hinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.hbtns { display: flex; gap: 6px; flex: none; }
.foot { max-width: 1000px; margin: 0 auto; padding: 10px 16px 40px; font-size: 14px; color: var(--muted); }
.toasts { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 20; width: min(92vw, 520px); }
.toast { background: var(--steel); color: #f1f6f9; padding: 10px 14px; border-radius: 10px; font-size: 14px; transition: opacity .5s; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.toast.err { background: #8a2a22; } .toast.gone { opacity: 0; } .toast a { color: #ffd9a8; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes low { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.tubwrap .tk-b { animation: bob 2.6s ease-in-out infinite; }
.tubwrap .tk-l { animation: low 3.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .tubwrap .tk-b, .tubwrap .tk-l { animation: none; } }
@media (max-width: 720px) {
  .tgrid { grid-template-columns: 1fr; }
  .irow { grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 6px; }
  .segb { padding: 6px 10px; }
  .back-t { display: none; }
  .brand { font-size: 18px; }
}
@media print {
  .bar, .samples, .askbox, .histbox, .exports, .toasts, .cardrow { display: none !important; }
  body { background: #fff; color: #000; } .panel { border: 1px solid #999; break-inside: avoid; }
}
