:root {
  /* DrBull's look (drbull.in, website/index.html): dark ground, bone text, the horn red. The creator, 2026-09-29: "run it
     as same UI as drbull.in website". The report keeps a light sheet (.report below): tables read better on it, and its
     hidden mark (2%-dark cells) and visible watermark need a light ground. drbull.in's fonts (Barlow, Barlow Semi
     Condensed, IBM Plex Mono) are served from fonts/ (fonts.css, made by tools/get_fonts.py; the CSP allows no Google
     Fonts); Bahnschrift stands in if they don't load. */
  --paper: #0c0a0b; --card: #161213; --ink: #efe9e6; --muted: #a3999b; --rule: #2c2426;
  --accent: #e2262c; --accent-hi: #ff4d45; --accent-ink: #ffffff; --link: #ff6b64;
  --safe: #5cc98a; --likely: #e3b64e; --reach: #ff7d63;
  --safe-bg: #14261b; --likely-bg: #2c2311; --reach-bg: #331817; --test: #3a2d0c; --test-ink: #ffd66b;
  --live: #efe9e6; --live-bg: #2c2426;
  --field: #0f0c0d; --soft: #1d1719; --tint: #231b1d; --read: #241d1f; --warm-bg: #261e12; --warm-rule: #4b3b1d;
  --err: #ff6b62; --shade: rgba(0, 0, 0, 0.68);
  --display: "Barlow Semi Condensed", Bahnschrift, "Arial Narrow", sans-serif;
  --body: Barlow, Bahnschrift, "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", Consolas, "Courier New", monospace;
  font-family: var(--body);
  color-scheme: dark;
}
* { box-sizing: border-box; }
/* .modal sets display:grid, which beat the browser's own [hidden] rule and left an empty pop-up over the page */
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 15px; line-height: 1.5; }
a { color: var(--link); }
h1, h2, h3, legend { font-family: var(--display); letter-spacing: 0.01em; }
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 16px; background: rgba(12, 10, 11, 0.94); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* drbull.in's header: the bull mark, DR BULL with BULL in the horn red, then the product's name */
.brand .home { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.brand .home img { height: 34px; width: auto; }
.brand .word { font: 700 22px/1 var(--display); letter-spacing: 0.01em; }
.brand .word b { color: var(--accent); }
.brand .product { font: 600 14px/1 var(--display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 10px; }
.brand .product::before { content: ""; width: 22px; height: 2px; background: var(--accent); }
.badge { font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; letter-spacing: 0.02em; }
.badge.test { background: var(--test); color: var(--test-ink); }
.badge.soon { background: var(--live-bg); color: var(--live); margin-left: 4px; white-space: nowrap; }   /* an exam not open yet */
label.check:has(input:disabled) { color: var(--muted); cursor: not-allowed; }
.acct { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.92rem; }
.credits { font-weight: 700; font-variant-numeric: tabular-nums; }
/* M3 UI-1 (creator 10-04): on a phone the bar is one compact row, fully opaque (at 375 px it wrapped to 4 lines, 192 px,
   stayed on screen and let report text show through). Words in .wide drop out there ("Buy credits" -> "Buy"). */
@media (max-width: 640px) {
  .top { flex-wrap: nowrap; gap: 8px; padding: 6px 10px; background: var(--paper); }
  .brand { flex-wrap: nowrap; gap: 6px; min-width: 0; }
  .brand .home { gap: 5px; }
  .brand .home img { height: 24px; }
  .brand .word { font-size: 14px; }
  .brand .product { font-size: 11px; letter-spacing: 0.12em; gap: 6px; }
  .brand .product::before { display: none; }
  .badge.test { font-size: 0.6rem; padding: 2px 5px; white-space: nowrap; }
  .acct { flex-wrap: wrap; justify-content: flex-end; gap: 4px; font-size: 0.78rem; min-width: 0; }
  .acct > a { max-width: 7ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .acct button { padding: 3px 6px; white-space: nowrap; }
  .wide { display: none; }
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 20px 16px 60px; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 18px; }
.panel h2 { margin: 0 0 4px; font-size: 1.1rem; }
.panel p { margin: 0 0 12px; }
form { display: flex; flex-direction: column; gap: 10px; }
label { font-size: 0.86rem; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); }
input, select { font: inherit; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--field); color: var(--ink); }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
button { font: inherit; font-weight: 600; padding: 9px 14px; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent);
  color: var(--accent-ink); cursor: pointer; }
button:hover:not(:disabled) { background: var(--accent-hi); border-color: var(--accent-hi); }
button.ghost { background: transparent; color: var(--link); }
button.ghost:hover:not(:disabled) { background: var(--tint); color: var(--link); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
a.btn { display: inline-block; font-weight: 600; padding: 9px 14px; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent);
  color: var(--accent-ink); text-decoration: none; white-space: nowrap; }   /* a link that looks like a button (the sample report) */
a.btn:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
/* the sample report's Basic / Advanced tabs (app.js sampleBanner), and its data-error refund line */
.stabs { display: flex; gap: 6px; margin-bottom: 8px; }
.stabs a { padding: 4px 14px; border: 1px solid var(--rule); border-radius: 999px; background: var(--card); color: var(--ink);
  font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.stabs a:hover { border-color: var(--accent); }
.stabs a.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.upgrade .usp { margin: 8px 0 0; }
.codebox { font-family: ui-monospace, Consolas, monospace; font-size: 1.1rem; letter-spacing: 0.08em; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > label { flex: 1 1 150px; min-width: 0; }
label > select, label > input:not([type=checkbox]):not([type=radio]) { max-width: 100%; min-width: 0; }  /* a long option can't push the page sideways */
.err { color: var(--err); font-size: 0.9rem; min-height: 1.2em; }
.secret { font: 700 1.15rem/1.4 ui-monospace, Consolas, monospace; background: var(--test); color: var(--test-ink); padding: 10px 12px;
  border-radius: 6px; letter-spacing: 0.04em; word-break: break-all; }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 12px 0; }
.pack { border: 1px solid var(--rule); border-radius: 8px; padding: 14px; text-align: center; background: var(--soft); }
.pack .price { font-size: 1.5rem; font-weight: 700; }
.pack .price .was { font-size: 1rem; font-weight: 400; color: var(--muted); }   /* the same credits bought one by one */
.list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--rule);
  border-radius: 6px; background: var(--soft); flex-wrap: wrap; }
.modal { position: fixed; inset: 0; background: var(--shade); display: grid; place-items: center; padding: 16px; z-index: 20; }
.dialog { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 20px; max-width: 460px; width: 100%; }
.dialog h3 { margin: 0 0 8px; }
.actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px;
  border-radius: 8px; z-index: 30; }
/* the report: on screen only. A light sheet on the dark page, with its own tokens (the shop's light palette before
   2026-09-29, with DrBull's red), so everything inside reads dark on white, and the hidden mark's 2%-dark cells and the
   watermark keep the ground they were tuned on (tests/test_mark_real.py) */
.report { --paper: #f3f5f8; --card: #ffffff; --ink: #18202b; --muted: #5b6574; --rule: #dde2e9;
  --accent: #c41d23; --accent-hi: #e2262c; --accent-ink: #ffffff; --link: #b0181e;
  --safe: #1d7a46; --likely: #9a6a00; --reach: #b4441c; --safe-bg: #e3f3ea; --likely-bg: #fbf0d4; --reach-bg: #fbe5dc;
  --live: #1f5aa6; --live-bg: #e4edf8; --field: #ffffff; --soft: #f6f8fb; --tint: #eef4fb; --read: #eef1f5;
  --warm-bg: #fffaf0; --warm-rule: #efdcae; --err: #a3261b; color-scheme: light; color: var(--ink);
  position: relative; background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 18px;
  user-select: none; -webkit-user-select: none; overflow: hidden; }
.report::after { content: ""; position: absolute; inset: 0; background-image: var(--wm); pointer-events: none; z-index: 2; }
/* the hidden mark: faint 5 px cells that encode the report id (app.js dotMark); the tile is 80 x 60 px, both multiples of 4,
   so it lands on whole device pixels at 125%, 150% and 175% zoom too */
.report::before { content: ""; position: absolute; inset: 0; background-image: var(--dots, none); background-size: 80px 60px;
  pointer-events: none; z-index: 2; }
.report h2 { margin: 0 0 2px; font-size: 1.2rem; }
.report h3 { margin: 22px 0 4px; font-size: 1.05rem; }
.summary { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.9rem; color: var(--muted); margin-bottom: 8px; }
.group { margin-top: 14px; }
.group h4 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; font-size: 0.95rem; }
.chip { font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.chip.safe { background: var(--safe-bg); color: var(--safe); } .chip.likely { background: var(--likely-bg); color: var(--likely); }
.chip.reach { background: var(--reach-bg); color: var(--reach); }
.seat { border-top: 1px solid var(--rule); padding: 10px 0; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 4px 16px; }
.seat .name { font-weight: 600; }
.seat .meta { font-size: 0.84rem; color: var(--muted); }
.closes { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.closes b { font-weight: 700; }
/* a closing rank drawn with the report's code behind its digits (app.js cnum, paintNum): its foot sits 0.22em below the
   line's baseline, where the canvas has the digits' baseline */
.report canvas.cn { display: inline-block; vertical-align: -0.22em; }
.rc { white-space: nowrap; }   /* the report's code (app.js rcHTML): never split at its hyphen */
/* each seat card's mark (app.js cardMark): the buyer's username and the report's code in a strip at the card's foot */
.report .seat { padding-bottom: 24px; background-image: var(--cardmark, none); background-repeat: no-repeat; background-position: right 0 bottom 5px; }
/* a counselling year still in progress (build/live.json): its rounds so far, apart from the finished years */
.live { margin-top: 4px; font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.lockbox { margin: 10px 0; padding: 10px 12px 10px 30px; border-radius: 8px; background: var(--likely-bg); font-variant-numeric: tabular-nums; }
.lockbox li { margin: 2px 0; }
.updated { margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: var(--live-bg); color: var(--ink); }
.livetag { font-size: 0.72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--live-bg); color: var(--live); }
.src { font-size: 0.78rem; color: var(--muted); }
.none { font-size: 0.9rem; color: var(--muted); padding: 6px 0; }
@media (max-width: 640px) { .seat { grid-template-columns: minmax(0, 1fr); } }
@media print { body:not(.printable) * { display: none !important; } body:not(.printable)::after { content: "Reports can be viewed on the website only."; display: block; padding: 40px; } }
/* what does print: a receipt (app.js viewReceipt) and the legal pages (server.py page_html), without the site's frame */
@media print { body.printable .noprint, body.printable header.top, body.printable footer.foot { display: none !important; } body.printable .panel { border: 0; }
  :root { color-scheme: light !important; } html, body.printable, body.printable .panel { background: #fff !important; } body.printable * { color: #000 !important; border-color: #999 !important; } }
.receipt { max-width: 640px; }
/* the legal pages and Pricing (server.py page_html, md_html) */
.legal { max-width: 860px; margin: 0 auto; line-height: 1.55; }
.legal h2 { font-size: 1.45rem; margin: 2px 0 6px; }
.legal h3 { font-size: 1.08rem; margin: 22px 0 6px; }
.legal table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 8px 0 14px; font-size: 0.92rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--rule); }
.legal thead th { color: var(--muted); font-weight: 600; }
.legal ul { padding-left: 20px; }
.receipt .stamp { display: inline-block; margin: 0 0 8px; padding: 2px 8px; border: 1px solid var(--rule); border-radius: 4px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.receipt .rc-from { font-size: 0.92rem; line-height: 1.5; }
.receipt tfoot th { text-align: left; border-top: 1px solid var(--rule); }
.receipt tfoot th.num { text-align: right; }

/* report form filters */
fieldset { border: 1px solid var(--rule); border-radius: 8px; padding: 10px 12px 12px; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
legend { font-weight: 700; font-size: 0.9rem; padding: 0 4px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.scrollbox { max-height: 190px; overflow-y: auto; border: 1px solid var(--rule); border-radius: 6px; padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; background: var(--field); }
.scrollbox.states { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; margin-top: 8px; }
.kind { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; }
.kt { grid-column: 1 / -1; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
/* the buyer's numbering beside each ticked branch and state (app.js numChecks) */
.numrow { display: flex; align-items: center; gap: 6px; min-width: 0; }
.numrow label.check { flex: 1 1 auto; min-width: 0; }
button.numb { flex: 0 0 auto; min-width: 2.1em; padding: 1px 6px; font-size: 0.8rem; font-variant-numeric: tabular-nums;
  background: var(--field); color: var(--muted); border: 1px dashed var(--rule); border-radius: 999px; }
button.numb.on { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }
button.numb.full { opacity: 0.35; }   /* all 5 numbers used: pressing says so */
.numline { margin: 0; }
.numhelp { margin: 0; }
.btns { display: flex; gap: 6px; flex-wrap: wrap; }
button.sm { padding: 4px 10px; font-size: 0.82rem; }
.howto { background: var(--soft); border: 1px solid var(--rule); border-radius: 8px; padding: 10px 14px; margin-top: 14px; }
.howto ul { margin: 6px 0 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 5px; }
/* report */
.brief { background: var(--tint); border-radius: 8px; padding: 12px 14px; margin: 10px 0; }
.rsec { margin-top: 18px; }
.gdesc { margin: -4px 0 6px; }
.grec { margin: -2px 0 8px; font-style: italic; }   /* the rule's past record (label_record) */
p.warn { background: var(--likely-bg); color: var(--likely); padding: 6px 10px; border-radius: 6px; }   /* a merit list's shifts */
.facts { margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--rule); display: flex; flex-direction: column; gap: 6px; font-size: 0.86rem; }
.facts .fk { display: inline-block; min-width: 4.6em; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.stars { color: var(--likely); letter-spacing: 0.08em; font-size: 0.95rem; }
.stars .off { color: var(--rule); }
.ins { margin: 6px 0 0; padding-left: 1.1em; font-size: 0.86rem; display: flex; flex-direction: column; gap: 2px; }
/* a seat's Round-1 reading (server.py r1_reading), coloured like its label */
.r1line { font-size: 0.8rem; margin-top: 4px; padding-left: 6px; border-left: 3px solid var(--rule); }
.r1line.safe { border-color: var(--safe); } .r1line.likely { border-color: var(--likely); } .r1line.reach { border-color: var(--reach); }
.likeno { display: inline-block; min-width: 1.5em; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-size: 0.78rem; text-align: center; font-variant-numeric: tabular-nums; }
/* one branch at a time: headlines with counts; only the open one draws its seats */
.brlist { display: flex; flex-direction: column; margin-top: 8px; border-top: 1px solid var(--rule); }
.br { border-bottom: 1px solid var(--rule); }
button.brhead { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; text-align: left; padding: 10px 4px;
  background: transparent; color: var(--ink); border: 0; border-radius: 0; font-weight: 600; scroll-margin-top: 120px; }
button.brhead:hover { background: var(--soft); }
.brhead .chev { width: 1em; color: var(--link); }
.brhead .bn { flex: 1 1 12em; min-width: 0; }
.brhead .bc { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-weight: 400; }
.br.open > button.brhead { background: var(--tint); }
.brpanel { padding: 0 4px 12px; }
/* the advice box: inside the report only, closed until opened */
.advice { background: var(--warm-bg); border: 1px solid var(--warm-rule); border-radius: 8px; padding: 10px 14px; margin-top: 14px; }
.advice h4 { margin: 12px 0 4px; font-size: 0.92rem; }
.advice ol { margin: 4px 0 0; padding-left: 1.6em; display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; }
.advice ul { margin: 4px 0 0; padding-left: 1.2em; }
.tbl { overflow-x: auto; max-width: 100%; }
.tbl table { border-collapse: collapse; font-size: 0.85rem; min-width: 320px; }
.tbl th, .tbl td { text-align: left; padding: 4px 12px 4px 0; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.tbl th { color: var(--muted); font-weight: 600; }

/* choice lists */
.listbar { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; background: var(--tint);
  border-radius: 8px; padding: 8px 12px; margin: 8px 0; font-size: 0.9rem; }
button.addc { margin-top: 8px; position: relative; z-index: 4; }
button.addc.on { background: var(--safe-bg); border-color: var(--safe); color: var(--safe); }
button.addall { margin-left: auto; position: relative; z-index: 4; }
.group h4 { flex-wrap: wrap; }
.clsec { margin-top: 18px; }
.chk { border-radius: 6px; padding: 8px 10px; margin: 6px 0; font-size: 0.88rem; }
.chk.bad { background: var(--reach-bg); color: var(--reach); } .chk.warn { background: var(--likely-bg); color: var(--likely); }
.chk.info { background: var(--tint); color: var(--ink); }
.auto { border: 1px solid var(--rule); border-radius: 8px; padding: 10px 12px; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.brchip { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--rule); border-radius: 999px; padding: 1px 4px 1px 8px; margin: 2px 2px; background: var(--field); }
.clist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; }
.clist li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto; gap: 8px 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--rule); }
.pos { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--link); text-align: right; }
.cbtn { display: flex; gap: 4px; flex-wrap: wrap; position: relative; z-index: 4; }
button.mini { padding: 2px 8px; font-size: 0.85rem; background: var(--field); color: var(--link); border: 1px solid var(--rule); border-radius: 5px; }
button.mini.rm { color: var(--reach); }
/* the seat held after a round, and the seats under it that can't be an upgrade */
.clist li.held { background: var(--tint); }
.clist li.below { opacity: 0.45; }
@media (max-width: 640px) { .clist li { grid-template-columns: 2em minmax(0, 1fr); } .cbtn { grid-column: 2; } }

/* account page */
.kv { display: grid; grid-template-columns: minmax(0, 1fr); margin: 6px 0 4px; font-size: 0.92rem; }
.kv dt { color: var(--muted); font-size: 0.8rem; margin-top: 10px; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.panel h3 { margin: 18px 0 6px; font-size: 1rem; }
button.danger { background: #a3261b; border-color: #a3261b; color: #fff; }
button.ghost.rm { color: var(--reach); border-color: var(--rule); }
.acct a { font-weight: 600; color: var(--link); }
.tbl.fit table { min-width: 0; width: 100%; }
/* the named rest (app.js restBlock): every other seat within reach, closed until opened */
.restbox { margin-top: 14px; border-top: 1px solid var(--rule); padding-top: 8px; }
.restbox summary { cursor: pointer; font-size: 0.92rem; }
.restbox p { margin: 6px 0; }
.tbl.rest td { vertical-align: top; }
.tbl.rest td .src { font-size: 0.78rem; color: var(--muted); }
.tbl.rest td.rs { white-space: nowrap; }
.tbl.rest td.rs .addn { margin-left: 6px; padding: 2px 8px; }
.restbox .addall { margin: 2px 0 6px; }
.tbl.fit td.pid { overflow-wrap: anywhere; }
.tbl.fit td.num { white-space: nowrap; }
.foot { max-width: 1040px; margin: 0 auto; padding: 0 16px 32px; font-size: 0.8rem; color: var(--muted); }

/* the rank and category fixed to the account */
.lock { background: var(--soft); border: 1px solid var(--rule); border-radius: 6px; padding: 8px 10px; color: var(--ink); }
.lock button { margin-left: 4px; }
/* a state's rule box (state_rules.json), shown when a state is picked, with its tick */
.rulebox { background: var(--soft); border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 6px;
  padding: 10px 12px; color: var(--ink); font-size: 0.9rem; }
.rulebox p { margin: 6px 0; }
.rulebox a { overflow-wrap: anywhere; }
.rb-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; justify-content: space-between; }
.rb-status { font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--safe-bg); color: var(--safe); }
.rb-status.rb-older { background: var(--likely-bg); color: var(--likely); }
.rb-status.rb-not_confirmed { background: var(--reach-bg); color: var(--reach); }
input[readonly], select:disabled { background: var(--read); color: var(--ink); opacity: 1; }
/* Cloudflare's bot check sits here: 300 x 65 px, or 150 x 140 px where the form is narrower than 300 px */
.bot { min-height: 65px; }
/* a Basic report's offer to upgrade */
.upgrade { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; background: var(--tint);
  border-radius: 8px; padding: 10px 12px; margin: 8px 0; font-size: 0.9rem; position: relative; z-index: 4; }
.upgrade > div { flex: 1 1 260px; }

/* the shop manager (admin) */
.adminlink { font-weight: 700; }
.adminhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.adminhead h2 { margin: 0; font-size: 1.25rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
#adm-find { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
#adm-find > label { flex: 1 1 220px; }
.stat { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 12px 14px; }
.stat .big { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
#app > .panel + .panel, #app > .panel + .grid2, #app > .grid2 + .panel, #app > .grid2 + .grid2 { margin-top: 18px; }
.panel h3 { margin: 0 0 10px; font-size: 1rem; }
.panel h4 { margin: 14px 0 8px; font-size: 0.9rem; color: var(--muted); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.tabs button.on { background: var(--accent); color: var(--accent-ink); }
.pager { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; }
.log li { border-bottom: 1px solid var(--rule); padding-bottom: 6px; overflow-wrap: anywhere; }
.badge.st-active { background: var(--safe-bg); color: var(--safe); }
.badge.st-held, .badge.st-paused { background: var(--likely-bg); color: var(--likely); }
.badge.st-closed { background: var(--reach-bg); color: var(--reach); }
.badge.st-admin { background: var(--live-bg); color: var(--live); }
.tbl td.num, .tbl th.num { text-align: right; padding-right: 12px; }

/* the review box (app.js loadReviewBox; the creator, 2026-09-30: "a review box in medical way"): a clinical note on the
   dark ground, a monitor's trace across its top that beats when the next review comes in, and the rating read out like
   a vital sign. Still where the viewer asks for less motion. */
.rvbox, .rvall { position: relative; margin-top: 18px; background: var(--card); border: 1px solid var(--rule); border-radius: 10px;
  padding: 50px 18px 14px; overflow: hidden; }
.rv-ecg { position: absolute; top: 4px; left: 0; width: 100%; height: 44px; }
.rv-ecg path, .rv-mini path { fill: none; stroke: var(--accent); stroke-width: 1.6; vector-effect: non-scaling-stroke; opacity: 0.8;
  stroke-dasharray: 100; stroke-dashoffset: 0; }
.rv-ecg.beat path { animation: rv-trace 1.4s ease-out; }
@keyframes rv-trace { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.rv-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; margin: 6px 0 10px; }
.rv-kicker { font: 500 0.74rem/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.rv-vitals { font: 500 0.86rem/1.3 var(--mono); color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rv-vitals b { color: var(--accent-hi); font-size: 1.1rem; }
.rv-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(226, 38, 44, 0.6);
  animation: rv-pulse 0.8s infinite; }   /* 75 a minute, as the trace */
@keyframes rv-pulse { 0% { box-shadow: 0 0 0 0 rgba(226, 38, 44, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(226, 38, 44, 0); } 100% { box-shadow: 0 0 0 0 rgba(226, 38, 44, 0); } }
.rv-card { margin: 0; min-height: 7.5em; border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; }
.rv-card.in { animation: rv-in 0.45s ease-out; }
@keyframes rv-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.rv-card blockquote { margin: 6px 0 8px; font-size: 1.08rem; line-height: 1.5; max-width: 65ch; }
.rv-card figcaption { font-size: 0.84rem; color: var(--muted); }
.rv-card figcaption b { color: var(--ink); font-family: var(--mono); font-weight: 500; }
.rv-stars { color: var(--accent-hi); letter-spacing: 0.08em; }
.rv-stars .off { color: var(--rule); }
.rv-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.rv-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.rv-dot { width: 9px; height: 9px; min-height: 0; padding: 0; border-radius: 50%; border: 1px solid var(--muted); background: transparent; cursor: pointer; }
.rv-dot.on { background: var(--accent); border-color: var(--accent); }
.rv-note { margin: 10px 0 0; }
.rvall h2 { margin-top: 6px; }
.rv-big { font: 700 1.8rem/1 var(--display); color: var(--accent-hi); }
.rv-spread { display: grid; gap: 4px; max-width: 420px; margin: 8px 0 14px; }
.rv-bar { display: grid; grid-template-columns: 3em 1fr 3em; align-items: center; gap: 8px; font: 0.84rem var(--mono); }
.rv-track { height: 8px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.rv-track span { display: block; height: 100%; background: var(--accent); }
.rv-bar .num { text-align: right; font-variant-numeric: tabular-nums; }
.rv-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.rv-list li { border-top: 1px solid var(--rule); padding-top: 10px; }
.rv-mini { display: block; width: 150px; max-width: 100%; height: 22px; margin-bottom: 2px; }
.rv-list li p { margin: 4px 0; max-width: 70ch; }
.rvask { border-left: 3px solid var(--accent); }
.rv-pick { border: 0; padding: 0; margin: 0 0 8px; display: flex; flex-flow: row wrap; align-items: center; gap: 4px; }
.rv-pick legend { margin-bottom: 4px; }
.rv-pick label { display: inline-flex; flex-direction: row; width: auto; margin: 0; cursor: pointer; font-size: 1.7rem; line-height: 1; color: var(--rule); }
.rv-pick legend { width: 100%; }
.rv-pick label.on { color: var(--accent-hi); }
.rv-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rv-pick input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .rv-ecg.beat path, .rv-card.in, .rv-pulse { animation: none; }
}
