/* BioLean review. One set of tokens for light and dark; system fonts only (no font or CDN may load under the CSP).
   Type scale: 12 / 13 / 14 / 16 / 18 / 22 / 28 px. Spacing: 4 / 8 / 12 / 16 / 24 / 32 / 48 px. */
:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-2: #f0f2f5;
  --ink: #16191d;
  --ink-2: #3c434c;
  --muted: #646d78;
  --line: #e1e5ea;
  --line-2: #cfd5dc;
  --accent: #0b6e69;
  --accent-ink: #ffffff;
  --accent-soft: #e2f2f0;
  --quote-bg: #fbf7ee;
  --quote-bar: #c08a1e;
  --code-bg: #eef0f3;
  --warn-bg: #fff5dc;
  --warn-ink: #6b4a00;
  --conf-bg: #fdecea;
  --conf-ink: #8a1f14;
  --agree: #1d8a52;
  --change: #c46a0a;
  --unsure: #6b5fc7;
  --no: #c23b2e;
  --open: #d3d8de;
  --stale: #c99300;
  --flag: #c2410c;
  --p1: #b91c1c; --p2: #c2410c; --p3: #a16207; --p4: #2563a8; --p5: #6b7280;
  --hl-bar: #d9a300;
  --differ-bg: #fff1e0;
  --hl: #ffe08a;
  --hl-alt: #cfe6ff;
  --diff: #ffd2cc;
  --ins: #cdebd8;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.06);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Songti SC", "Noto Serif CJK SC", "Noto Serif", serif;
  --r: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1215; --panel: #171b20; --panel-2: #1e2329; --ink: #e8ecf0; --ink-2: #c3cad2; --muted: #95a0ab;
    --line: #2a3138; --line-2: #39424b; --accent: #4fc1b6; --accent-ink: #0a1513; --accent-soft: #15302d;
    --quote-bg: #211d14; --quote-bar: #d9a842; --code-bg: #232a31; --warn-bg: #3a2e10; --warn-ink: #f3d68f;
    --conf-bg: #3a1c18; --conf-ink: #f7beb4; --agree: #45c07f; --change: #f0a04b; --unsure: #a99cf5; --no: #f0796b;
    --open: #3a434c; --stale: #e3b23c; --flag: #fb8a50; --p1: #f87171; --p2: #fb923c; --p3: #facc15; --p4: #7fb3ee; --p5: #9ca3af;
    --hl: #6b5a1d; --hl-alt: #1d4560; --diff: #5c2420; --ins: #1c4a33; --hl-bar: #c9a227; --differ-bg: #33230f; --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1215; --panel: #171b20; --panel-2: #1e2329; --ink: #e8ecf0; --ink-2: #c3cad2; --muted: #95a0ab;
  --line: #2a3138; --line-2: #39424b; --accent: #4fc1b6; --accent-ink: #0a1513; --accent-soft: #15302d;
  --quote-bg: #211d14; --quote-bar: #d9a842; --code-bg: #232a31; --warn-bg: #3a2e10; --warn-ink: #f3d68f;
  --conf-bg: #3a1c18; --conf-ink: #f7beb4; --agree: #45c07f; --change: #f0a04b; --unsure: #a99cf5; --no: #f0796b;
  --open: #3a434c; --stale: #e3b23c; --flag: #fb8a50; --p1: #f87171; --p2: #fb923c; --p3: #facc15; --p4: #7fb3ee; --p5: #9ca3af;
  --hl: #6b5a1d; --hl-alt: #1d4560; --diff: #5c2420; --ins: #1c4a33; --hl-bar: #c9a227; --differ-bg: #33230f; --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); -webkit-text-size-adjust: 100%; }
a { color: var(--accent); text-underline-offset: 2px; }
code, kbd, pre, .mono { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--code-bg); padding: 0.05em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
kbd { border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 0 0.35em; background: var(--panel); font-size: 0.78em; color: var(--muted); }
pre { background: var(--code-bg); padding: 10px 12px; border-radius: 8px; overflow-x: auto; white-space: pre; line-height: 1.45; margin: 8px 0; }
h1 { font-size: 22px; line-height: 1.3; margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h2 { font-size: 16px; line-height: 1.35; margin: 0; font-weight: 650; }
h3 { font-size: 14px; margin: 16px 0 4px; font-weight: 650; }
p { margin: 8px 0; }
button, .button {
  font: inherit; font-size: 14px; cursor: pointer; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink);
  padding: 7px 14px; border-radius: 8px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; line-height: 1.3;
}
button:hover, .button:hover { border-color: var(--accent); }
button.primary, .button, .page .button { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.button.secondary, button.secondary { background: var(--panel); color: var(--accent); border-color: var(--accent); }
button.ghost { background: transparent; color: var(--ink-2); }
button.danger { color: var(--no); }
button.ok { background: var(--agree); border-color: var(--agree); color: #fff; }
button.linkish { background: none; border: 0; padding: 0; color: var(--accent); font-size: 13px; }
button.linkish:hover { text-decoration: underline; }
button:disabled { opacity: 0.5; cursor: default; }
.small-btn { padding: 4px 10px; font-size: 13px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input, textarea, select { font: inherit; font-size: 14px; color: var(--ink); background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; max-width: 100%; }
textarea { width: 100%; resize: vertical; line-height: 1.5; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.notice { background: var(--warn-bg); color: var(--warn-ink); padding: 8px 12px; border-radius: 8px; }
.pre { white-space: pre-wrap; }
.scrollx { overflow-x: auto; max-width: 100%; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic .fillc { fill: currentColor; stroke: none; }

/* ---------------- the BioLean mark: one version per colour scheme */
.logo { display: block; flex: none; }
.logo-d { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-l { display: none; }
  :root:not([data-theme="light"]) .logo-d { display: block; }
}
:root[data-theme="dark"] .logo-l { display: none; }
:root[data-theme="dark"] .logo-d { display: block; }
.wordmark { font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.wordmark .lean { color: #14b8a6; }

/* ---------------- server-rendered pages */
body.page {
  display: flex; align-items: center; justify-content: center; min-height: 100vh; min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.page > .card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px 28px; max-width: 26rem; width: 100%; box-shadow: var(--shadow); }
.page .card.wide { max-width: 42rem; }
.page .card .brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0 0 20px; font-size: 22px; }
.page .card .brand .logo { width: 56px; height: 56px; }
.page .card.wide .brand { flex-direction: row; font-size: 18px; }
.page .card.wide .brand .logo { width: 36px; height: 36px; }
.page .card h1 { text-align: center; font-size: 20px; margin: 0 0 6px; }
.page .card.wide h1 { text-align: left; }
.page .lede { text-align: center; color: var(--ink-2); margin: 0 0 20px; }
.page .note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.page .notice { margin: 12px 0; }
.page .card ul { padding-left: 20px; }
.page .card li { margin: 6px 0; }
.buttons { display: flex; flex-direction: column; gap: 12px; margin: 16px 0 0; }
.buttons .button, .buttons button { justify-content: center; min-height: 48px; padding: 10px 16px; width: 100%; }
.page form { margin: 0; }
.page form.buttons { margin-top: 16px; }
.idbox { background: var(--panel-2); border-radius: 12px; padding: 12px 14px; margin: 16px 0 0; }
.idbox .note:first-child { margin: 0 0 6px; }
code.identity { font-size: 15px; user-select: all; padding: 6px 10px; display: inline-block; border: 1px dashed var(--line-2); overflow-wrap: anywhere; }
/* Sign-in buttons after each provider's guidelines: Google's light / dark button with its four-colour G and the
   label "Sign in with Google"; GitHub's mark on a black button (white in dark mode). Pill shape, 48 px tall. */
.signin { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 16px 0 12px; border-radius: 999px;
  font: 500 15px/1 Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; letter-spacing: 0.1px; text-decoration: none; border: 1px solid transparent; }
.signin .pmark { width: 20px; height: 20px; flex: none; }
.signin-google { background: #ffffff; color: #1f1f1f; border-color: #747775; }
.signin-google:hover { background: #f8faff; }
.signin-github { background: #000000; color: #ffffff; border-color: #000000; }
.signin-github:hover { background: #24292f; }
@media (prefers-color-scheme: dark) {
  .signin-google { background: #131314; color: #e3e3e3; border-color: #8e918f; }
  .signin-google:hover { background: #1f1f20; }
  .signin-github { background: #ffffff; color: #24292f; border-color: #ffffff; }
  .signin-github:hover { background: #f0f0f0; }
}

/* ---------------- app shell */
.top { display: flex; align-items: center; gap: 16px; height: 52px; padding: 0 16px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; white-space: nowrap; font-size: 16px; }
.narrow-only { display: none !important; }
.menu-pop a.menu-small { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 4px; border-radius: 0 0 6px 6px; }
.tabs { display: flex; gap: 2px; flex: 1; min-width: 0; }
.tabs a { padding: 6px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: 14px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); background: var(--panel-2); }
.tabs a.active { color: var(--ink); background: var(--accent-soft); font-weight: 600; }
.tools { display: flex; align-items: center; gap: 6px; }
.tbtn { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; height: 32px; min-width: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink-2); font-size: 13px; cursor: pointer; list-style: none; justify-content: center; }
.tbtn:hover { background: var(--panel-2); border-color: transparent; }
summary.tbtn::-webkit-details-marker { display: none; }
.avatar { width: 32px; padding: 0; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: 38px; min-width: 200px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14); padding: 6px; z-index: 30; display: flex; flex-direction: column; }
.menu-pop a, .menu-pop button.linkish { padding: 8px 10px; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 14px; text-align: left; display: flex; justify-content: space-between; align-items: center; }
.menu-pop a:hover, .menu-pop button.linkish:hover { background: var(--panel-2); text-decoration: none; }
.menu-who { margin: 4px 10px 8px; font-size: 13px; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--flag); color: #fff; font-size: 11px; font-weight: 700; text-align: center; line-height: 18px; margin-left: 4px; }
.badge.soft { background: var(--panel-2); color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 1; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); background: var(--panel); white-space: nowrap; }
.pill.soft { background: var(--panel-2); border-color: transparent; }
.pill.conf { background: var(--conf-bg); color: var(--conf-ink); border-color: transparent; font-weight: 600; cursor: help; }
.pill.conf::before { content: "●"; font-size: 8px; }
.pill.flag { color: var(--flag); border-color: var(--flag); }
.pill.stale { color: var(--warn-ink); background: var(--warn-bg); border-color: transparent; }
.pill.trbtn { cursor: pointer; font: inherit; font-size: 12px; line-height: 1; padding: 4px 10px; color: var(--accent); border-color: var(--accent); background: var(--panel); }
.pill.trbtn[aria-pressed="true"] { background: var(--accent-soft); }
.terms { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.termchip { font-size: 12px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-2); gap: 6px; }
.termchip .qm-mini { display: inline-flex; width: 16px; height: 16px; border-radius: 50%; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; background: var(--panel); color: var(--accent); border: 1px solid var(--line-2); }
.newhere { display: flex; align-items: center; gap: 8px; justify-content: space-between; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 12px; padding: 4px 6px 4px 14px; margin: 0 0 12px; font-weight: 600; }
.newhere a { text-decoration: none; }
a.xcard.xlink { align-self: start; display: block; text-decoration: none; color: var(--ink); }
.question { margin: 0 0 8px; font-size: 16px; font-weight: 600; color: var(--ink); background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; }
.question .q-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); margin-bottom: 2px; }
a.cite { text-decoration: none; white-space: nowrap; }
a.cite:hover code { text-decoration: underline; }
.ctx-btn { font-size: 12px; margin-top: 4px; }
pre.ctx-lines { font-size: 12px; line-height: 1.5; margin: 6px 0 0; background: var(--panel); white-space: pre-wrap; overflow-wrap: anywhere; }
pre.ctx-lines .cl { display: block; color: var(--muted); }
pre.ctx-lines .cl.hit { color: var(--ink); background: var(--hl); }
pre.ctx-lines .ln { display: inline-block; min-width: 3.2em; color: var(--muted); user-select: none; }
a.xref { text-decoration: underline dotted; text-underline-offset: 3px; }
a.xref code { color: inherit; }
.menu-note { font-size: 12px; color: var(--muted); margin: 4px 10px 6px; line-height: 1.4; }
.pill.v { color: #fff; border-color: transparent; }
.pill.v-agree, .pill.v-matches, .pill.v-not_defect { background: var(--agree); }
.pill.v-change { background: var(--change); }
.pill.v-unsure { background: var(--unsure); }
.pill.v-does_not_match, .pill.v-real { background: var(--no); }
.pill.prio { font-weight: 700; color: #fff; border-color: transparent; }
.p-P1 { background: var(--p1) !important; } .p-P2 { background: var(--p2) !important; } .p-P3 { background: var(--p3) !important; }
.p-P4 { background: var(--p4) !important; } .p-P5 { background: var(--p5) !important; }
.pill.kind { cursor: help; padding: 2px 8px 2px 4px; }
.iid { font-family: var(--mono); font-size: 12px; color: var(--muted); }
main { padding: 0 16px 96px; }
.loading { padding: 32px 0; color: var(--muted); text-align: center; }
.tabbar { display: none; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 8px 16px; border-radius: 14px; width: max-content; text-align: center; font-size: 14px; z-index: 40; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); max-width: calc(100vw - 32px); }
.hint { margin-left: 4px; }
.hint-line { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
@media (hover: none) { .hint, .hint-line { display: none; } }

/* ---------------- dots, bars, rings, legend */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--open); flex: none; }
.dot.v-agree, .dot.v-matches, .dot.v-not_defect { background: var(--agree); }
.dot.v-change { background: var(--change); }
.dot.v-unsure { background: var(--unsure); }
.dot.v-does_not_match, .dot.v-real { background: var(--no); }
.dot.stale { background: var(--stale); }
.stack { display: flex; height: 8px; border-radius: 999px; background: var(--open); overflow: hidden; min-width: 60px; }
.stack.thin { height: 5px; }
.stack.mini { width: 80px; flex: none; }
.seg { height: 100%; }
.seg.v-agree, .seg.v-matches, .seg.v-not_defect { background: var(--agree); }
.seg.v-change { background: var(--change); }
.seg.v-unsure { background: var(--unsure); }
.seg.v-does_not_match, .seg.v-real { background: var(--no); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.lg { display: inline-flex; align-items: center; gap: 4px; }
.lg b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.ring { flex: none; }
.ring-bg { fill: none; stroke: var(--open); stroke-width: 3.2; }
.ring-fg { fill: none; stroke: var(--agree); stroke-width: 3.2; stroke-linecap: round; }
.ring-t { font: 700 8.5px var(--sans); fill: var(--ink); }

/* ---------------- home */
main.home, main.wide { max-width: 1040px; margin: 24px auto; }
.hero { display: flex; align-items: center; gap: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; box-shadow: var(--shadow); }
.hero-txt { flex: 1; min-width: 0; }
.hero .big { font-size: 22px; font-weight: 650; margin: 0; font-variant-numeric: tabular-nums; }
.one { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 4px 0 0; }
.big-btn { padding: 12px 22px; font-size: 16px; border-radius: 10px; }
.tiles3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.tile { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
a.tile:hover { border-color: var(--accent); }
.tile-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.tile-head h2, .tile-head h3 { flex: 1; min-width: 0; margin: 0; }
.tile-head h3 { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-head .ic { color: var(--accent); }
.num { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.num.ok { color: var(--agree); }
.sec-h { margin: 28px 0 10px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.area-tile { padding: 12px 14px; }
.area-tile .tile-head { margin-bottom: 8px; }
.area-tile.flag { border-color: var(--flag); background: linear-gradient(0deg, var(--panel), var(--panel)) padding-box; }
.flag-ic { color: var(--flag); }
details.explain { margin: 24px 0 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; }
details.explain > summary { font-weight: 600; font-size: 14px; }
.explain-body { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.explain-body p { flex: 1 1 220px; margin: 0; color: var(--ink-2); }
.foot { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
summary { cursor: pointer; color: var(--accent); }

/* ---------------- review flow */
main.flow, main.examples { max-width: 860px; margin: 16px auto; }
.scopebar { position: sticky; top: 52px; z-index: 5; background: var(--bg); padding: 8px 0 10px; }
.scope-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.area-sel { flex: 0 1 auto; min-width: 0; max-width: 240px; padding: 5px 8px; font-size: 13px; }
.segmented { display: inline-flex; background: var(--panel-2); border-radius: 9px; padding: 2px; gap: 2px; }
.segmented button { border: 0; background: transparent; padding: 4px 12px; font-size: 13px; border-radius: 7px; color: var(--muted); }
.segmented button.on { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.segmented .cnt { color: var(--muted); font-weight: 400; font-size: 12px; }
#list-btn { margin-left: auto; }
.prog-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.prog-row .stack { flex: 1; }
.prog-t { font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.prog-t b { font-weight: 600; }
.toggle { font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px; }
.card-item { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px 22px; box-shadow: var(--shadow); }
.card-head { margin-bottom: 14px; }
.card-head .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.card-head .sub { margin: 6px 0 0; font-size: 13px; }
.flagnote { background: var(--warn-bg); color: var(--warn-ink); padding: 8px 12px; border-radius: 8px; font-size: 13px; }
figure { margin: 0; }
figure.quote { margin: 0 0 14px; background: var(--quote-bg); border-left: 3px solid var(--quote-bar); border-radius: 0 10px 10px 0; padding: 12px 16px; }
figure.quote blockquote { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.5; color: var(--ink); }
figure.quote figcaption { margin-top: 6px; font-size: 12px; color: var(--muted); }
figure.quote figcaption code { background: none; padding: 0; }
figure.quote.unpinned { border-left-style: dashed; }
.pics { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; align-items: stretch; }
.pic { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; max-width: 100%; min-width: 0; }
.pic.wide { width: 100%; margin-bottom: 14px; }
.seqfig .seqcap { margin: 10px 0 4px; font-size: 12px; color: var(--ink-2); white-space: pre-wrap; }
.seqfig .seqcap:first-child { margin-top: 0; }
.pic figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; max-width: 30ch; }
.pic figcaption code { background: none; padding: 0; color: var(--ink-2); }
.kind-pic { display: flex; align-items: center; gap: 10px; }
.kind-pic figcaption { margin: 0; font-size: 13px; color: var(--ink-2); max-width: 22ch; }
.chips-pic figcaption { margin: 0 0 6px; }
.codechips { display: flex; flex-wrap: wrap; gap: 6px; }
.chipc { background: var(--panel); border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; font-size: 13px; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 0 0 12px; }
.choice { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; background: var(--panel); }
.choice.ours { border: 2px solid var(--accent); background: var(--accent-soft); }
.choice-h { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 4px; }
.choice.ours .choice-h { color: var(--accent); }
.dotc { width: 8px; height: 8px; border-radius: 50%; border: 2px solid currentColor; }
.choice.ours .dotc { background: currentColor; }
.use-alt { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; }
.choice p { margin: 0; }
/* a reading in the explained form: background, what is unclear, the readings in short, the cases */
.rd-sec { margin: 0 0 14px; }
.rd-h { margin: 0 0 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.rd-sec > p { margin: 0; font-size: 15px; }
.rd-unclear { border-left: 3px solid var(--hl-bar); padding: 2px 0 2px 12px; }
mark.hl { background: var(--hl); color: inherit; padding: 1px 2px; border-radius: 3px; box-shadow: 0 0 0 1px var(--hl-bar) inset; }
.short { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) auto; gap: 2px 10px; align-items: baseline; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; font-size: 14px; }
.short.ours { border: 2px solid var(--accent); background: var(--accent-soft); }
.short-h, .vwho { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.short.ours .short-h, .vrow.ours .vwho { color: var(--accent); }
.short.ours .dotc, .vrow.ours .dotc, .lg.ours .dotc { background: currentColor; }
.short .use-alt { margin-left: 0; }
.cases-legend { margin: 0 0 8px; }
.cases-legend .lg { display: flex; align-items: flex-start; gap: 6px; }
.cases-legend .lg .dotc { flex: none; margin-top: 0.45em; }
.cases-legend .lg.ours { color: var(--accent); }
.caselist { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }
.case { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--panel); min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.case-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 14px; }
.case-n { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-ink); background: var(--accent); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.case-s { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.case-what { margin: 0; font-size: 15px; }
.case .pic.in-case { padding: 8px 10px; }
.case .pic.in-case .scrollx { overflow-x: auto; }
.case .pic figcaption { max-width: none; }
.verdicts { display: grid; gap: 4px; margin-top: auto; }
.vrow { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 0 10px; align-items: baseline; padding: 6px 10px; border-radius: 8px; border-left: 4px solid var(--line-2); background: var(--panel-2); font-size: 14px; }
.vrow .vtext { font-weight: 700; overflow-wrap: anywhere; }
/* the reason for a verdict, under it */
.vrow .vwhy { grid-column: 2; font-weight: 400; color: var(--ink-2); overflow-wrap: anywhere; }
.vrow .vmark { grid-column: 2; font-size: 11px; color: var(--muted); }
.vrow.ours { border-left-color: var(--accent); background: var(--accent-soft); }
.vrow.ours .vmark.chk { color: var(--agree); }
.vrow.ours .vmark.unchk { color: var(--warn-ink); background: var(--warn-bg); border-radius: 4px; padding: 0 5px; justify-self: start; font-weight: 600; }
.vrow.alt.differs { border-left-color: var(--change); background: var(--differ-bg); }
.vrow.alt.differs .vmark.neq { color: var(--change); font-weight: 700; }
ol.alts-full { margin: 4px 0 8px; padding-left: 1.6em; font-size: 14px; }
ol.alts-full li { margin: 4px 0; }
details.backing { border-top: 0; padding-top: 4px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.clamp.open { display: block; -webkit-line-clamp: unset; overflow: visible; }
.more { margin-top: 2px; }
details.more-det, details.field, details.others, details.ctx { border-top: 1px solid var(--line); padding: 10px 0 2px; margin: 0; }
details.more-det > summary, details.field > summary, details.others > summary, details.ctx > summary { font-size: 14px; font-weight: 500; }
details.more-det p { font-size: 14px; }
.provenance { font-size: 12px; margin: 10px 0 0; }
.provenance code { background: none; padding: 0; }
.fields { margin-top: 8px; }
.rtext { font-size: 14px; }
.rtext p { margin: 6px 0; }
.rtext pre { font-size: 12px; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 8px 0; font-size: 14px; }
dl.facts dt { color: var(--muted); font-size: 13px; }
dl.facts dd { margin: 0; min-width: 0; }
dl.facts dd code { margin-right: 4px; }
.versus { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin: 0 0 14px; }
.vs { border-radius: 10px; padding: 10px 12px; border: 1px solid var(--line); }
.vs-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.vs.exp .vs-h { color: var(--agree); }
.vs.obs { border-color: var(--no); }
.vs.obs .vs-h { color: var(--no); }

/* verdict */
form.verdict { margin: 16px 0 6px; padding: 16px 0 0; border-top: 1px solid var(--line); }
.vbtns { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.vbtn { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 15px; background: var(--panel); user-select: none; }
.vbtn input { position: absolute; opacity: 0; pointer-events: none; }
.vbtn .vic { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; background: var(--panel-2); }
.vbtn .hint { position: absolute; right: 8px; top: 6px; }
.vbtn:hover { border-color: var(--ink-2); }
.vbtn:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.vbtn.v-agree .vic, .vbtn.v-matches .vic, .vbtn.v-not_defect .vic { color: var(--agree); }
.vbtn.v-change .vic { color: var(--change); }
.vbtn.v-unsure .vic { color: var(--unsure); }
.vbtn.v-real .vic, .vbtn.v-does_not_match .vic { color: var(--no); }
.vbtn:has(input:checked) { color: #fff; }
.vbtn:has(input:checked) .vic { background: rgba(255, 255, 255, 0.25); color: #fff; }
.vbtn:has(input:checked) .hint { color: #fff; border-color: rgba(255, 255, 255, 0.5); background: transparent; }
.vbtn.v-agree:has(input:checked), .vbtn.v-matches:has(input:checked), .vbtn.v-not_defect:has(input:checked) { background: var(--agree); border-color: var(--agree); }
.vbtn.v-change:has(input:checked) { background: var(--change); border-color: var(--change); }
.vbtn.v-unsure:has(input:checked) { background: var(--unsure); border-color: var(--unsure); }
.vbtn.v-real:has(input:checked), .vbtn.v-does_not_match:has(input:checked) { background: var(--no); border-color: var(--no); }
.prio-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.chipbtn { padding: 4px 10px; border-radius: 999px; font-size: 13px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink-2); }
.chipbtn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.fieldwrap { margin-top: 12px; }
.field-label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 4px; font-weight: 500; }
.vactions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.vactions .spacer { flex: 1; }
.save-msg { color: var(--muted); font-size: 13px; }
.pager { display: flex; align-items: center; justify-content: space-between; margin: 14px 0; }
.pager .pos { font-size: 13px; font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 48px 0; }
.others table { width: 100%; font-size: 13px; }
.others .dot { margin-left: 2px; }

/* drawer, help */
.overlay { position: fixed; inset: 0; background: rgba(10, 14, 18, 0.35); z-index: 50; display: flex; }
.overlay.right { justify-content: flex-end; }
.overlay.center { align-items: center; justify-content: center; padding: 16px; }
.overlay.side { justify-content: flex-end; background: rgba(10, 14, 18, 0.15); }
.drawer { width: min(420px, 100vw); height: 100%; background: var(--panel); display: flex; flex-direction: column; box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15); }
.drawer-h { display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); }
.drawer-h input { flex: 1; }
.items { list-style: none; margin: 0; padding: 4px 8px 24px; overflow-y: auto; flex: 1; }
.items li.group { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 12px 8px 4px; font-weight: 600; }
.items li.item a { display: flex; gap: 8px; align-items: baseline; padding: 6px 8px; text-decoration: none; color: var(--ink); border-radius: 6px; font-size: 14px; }
.items li.item a:hover { background: var(--panel-2); }
.items li.current a { background: var(--accent-soft); }
.items .dot { align-self: center; }
.ititle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.help-card { background: var(--panel); border-radius: 14px; padding: 20px 24px; max-width: 26rem; width: 100%; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25); }
.help-card h2 { margin-bottom: 10px; }
table { border-collapse: collapse; }
.keys { margin-bottom: 14px; width: 100%; }
.keys td { padding: 4px 12px 4px 0; vertical-align: top; font-size: 14px; }
.keys td:first-child { white-space: nowrap; }

/* ---------------- diagrams */
.seqsvg { display: block; font-family: var(--mono); }
.seqsvg .rlab { font: 11px var(--sans); fill: var(--muted); }
.seqsvg .oplab { font: 600 10px var(--mono); fill: var(--ink-2); }
.seqsvg .ruler { font: 9px var(--mono); fill: var(--muted); }
.seqsvg .ruler.at { fill: var(--ink); font-weight: 700; }
.seqsvg .base { font: 600 11px var(--mono); fill: var(--ink); }
.seqsvg .cell { fill: var(--panel); stroke: var(--line-2); stroke-width: 1; }
.seqsvg .cell.q, .seqsvg .cell.r { fill: var(--hl-alt); stroke: none; }
.seqsvg .cell.r { fill: var(--line-2); }
.seqsvg .cell.op-I { fill: var(--change); }
.seqsvg .cell.op-S { fill: var(--open); }
.seqsvg .cell.op-D { fill: var(--no); opacity: 0.55; }
.seqsvg .cell.op-X { fill: var(--no); }
.seqsvg .cell.op-eq { fill: var(--agree); }
.seqsvg .cell.refc, .seqsvg .cell.refseq { fill: var(--hl); stroke: none; }
.seqsvg .cell.refseq { fill: var(--panel); stroke: var(--line-2); }
.seqsvg .cell.altc { fill: var(--hl-alt); stroke: none; }
.seqsvg .cell.appc { fill: var(--panel); stroke: var(--line); }
.seqsvg .cell.diff { fill: var(--diff); }
/* a record: what each base of REF and ALT is (shared, deleted, inserted, changed); the legend uses the same marks */
.seqsvg .cell.r-none { fill: var(--code-bg); stroke: var(--line-2); }
.seqsvg .cell.r-sh { fill: var(--panel); stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 3 2; }
.seqsvg .cell.r-del { fill: var(--diff); stroke: var(--no); }
.seqsvg .cell.r-ins { fill: var(--ins); stroke: var(--agree); }
.seqsvg .cell.r-chg { fill: var(--hl); stroke: var(--change); }
.seqsvg .cell.badc { stroke: var(--no); stroke-width: 2.4; stroke-dasharray: none; }
.seqsvg .base.struck { text-decoration: line-through; }
.seqsvg .gapc { font: 700 11px var(--mono); fill: var(--muted); }
.seqsvg .ring { fill: none; stroke-width: 2; }
.seqsvg .fbline { fill: none; stroke-width: 1.5; }
.seqsvg .ring.ok, .seqsvg .fbline.ok { stroke: var(--agree); }
.seqsvg .ring.no, .seqsvg .fbline.no { stroke: var(--no); }
.seqsvg .fbtext { font: 700 10px var(--sans); }
.seqsvg .fbtext.ok { fill: var(--agree); }
.seqsvg .fbtext.no { fill: var(--no); }
.pic-legend { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.pic-legend .lgi { display: inline-flex; align-items: center; gap: 5px; }
.sw { display: inline-block; flex: none; box-sizing: border-box; width: 12px; height: 12px; border-radius: 2px; border: 1px solid var(--line-2); background: var(--panel); position: relative; }
.sw-sh { border: 1.5px dashed var(--accent); }
.sw-del { border-color: var(--no); background: var(--diff); }
.sw-del::after { content: ""; position: absolute; left: 1px; right: 1px; top: 50%; border-top: 1px solid var(--ink); }
.sw-ins { border-color: var(--agree); background: var(--ins); }
.sw-chg { border-color: var(--change); background: var(--hl); }
.sw-bad { border: 2px solid var(--no); }
.sw-gap { border: 0; background: none; width: auto; height: auto; font: 700 12px var(--mono); color: var(--muted); }
.pic-first { display: block; margin-top: 4px; color: var(--ink-2); }
.pic-first.ok b { color: var(--agree); }
.pic-first.no b { color: var(--no); }
.seqsvg .gap { stroke: var(--line-2); stroke-width: 1.5; stroke-dasharray: 2 2; }
.seqsvg .skip { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 3; }
.seqsvg .pair { stroke: var(--line-2); stroke-width: 1; }
.seqsvg .op-mark { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 1 3; }
.seqsvg .seqcap { font: 11px var(--mono); fill: var(--ink-2); }
.seqsvg .seqnote { font: 11px var(--sans); fill: var(--warn-ink); }
.kindsvg { display: block; }
.kindsvg.big { width: 150px; height: 84px; flex: none; }
.k-ours { fill: var(--accent); fill-opacity: 0.22; stroke: var(--accent); stroke-width: 2; }
.k-alt { fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 4 3; }
.k-skip { fill: var(--muted); fill-opacity: 0.12; stroke: var(--muted); stroke-dasharray: 2 3; }
.k-track { fill: var(--panel); stroke: var(--line-2); }
.k-in { fill: var(--panel); stroke: var(--ink-2); }
.k-arrow { fill: none; stroke: var(--ink-2); stroke-width: 1.5; }
.k-arrow.a { stroke-dasharray: 4 3; }
.klab { font: 600 11px var(--sans); fill: var(--ink-2); }
.klab.o { fill: var(--accent); }
.kindsvg:not(.big) .k-ours { stroke-width: 6; }
.kindsvg:not(.big) .k-alt { stroke-width: 5; stroke-dasharray: 10 8; }
.kindsvg:not(.big) .k-arrow, .kindsvg:not(.big) .k-in, .kindsvg:not(.big) .k-skip, .kindsvg:not(.big) .k-track { stroke-width: 5; }

/* ---------------- explainers */
.qm { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; padding: 0; margin-left: 4px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1; cursor: help; vertical-align: middle; }
.qm:hover { color: var(--accent); border-color: var(--accent); }
.xpanel { position: fixed; right: 16px; top: 68px; width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 84px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18); padding: 10px 14px 14px; z-index: 35; }
.xpanel-h { display: flex; justify-content: space-between; align-items: center; }
.xcard h3 { margin: 4px 0 8px; font-size: 15px; }
.xcard p { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); }
.xgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.xgrid .xcard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.xfig { background: var(--panel-2); border-radius: 10px; padding: 8px; }
.xsvg { display: block; width: 100%; height: auto; }
.xt { font: 12px var(--sans); fill: var(--ink); }
.xt.xs { font-size: 12px; }
.xt.xm { font: 11px var(--mono); fill: var(--muted); }
.xt.xb { font: 600 12px var(--mono); fill: var(--ink); }
.xt.xbig { font-size: 20px; font-weight: 700; fill: var(--ink-2); }
.xt.xex { font: italic 9px var(--sans); fill: var(--muted); }
.xt.b { font-weight: 700; }
.xt.o { fill: var(--accent); }
.xq { fill: var(--quote-bg); stroke: var(--quote-bar); }
.xours { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; }
.xalt { fill: var(--panel); stroke: var(--ink-2); stroke-dasharray: 4 3; }
.xok { fill: color-mix(in srgb, var(--agree) 18%, var(--panel)); stroke: var(--agree); }
.xbad { fill: color-mix(in srgb, var(--no) 18%, var(--panel)); stroke: var(--no); }
.xshared { fill: var(--warn-bg); stroke: var(--stale); }
.xcell { fill: var(--panel); stroke: var(--line-2); }
.xcell.faint { fill: transparent; stroke: var(--line); }
.xhl { fill: var(--hl); stroke: none; }
.xhl.o { fill: color-mix(in srgb, var(--accent) 35%, var(--panel)); }
.xl { fill: none; stroke: var(--ink-2); stroke-width: 1.4; }
.xl.o { stroke: var(--accent); stroke-width: 1.8; }
.xl.dash { stroke-dasharray: 4 3; }
.xl.dot { stroke-dasharray: 1 3; stroke: var(--muted); }
.xtick { stroke: var(--line-2); stroke-width: 1; }
.xdiff { fill: color-mix(in srgb, var(--change) 22%, transparent); stroke: var(--accent); stroke-width: 2; }
.xstd { fill: var(--panel); stroke: var(--ink-2); stroke-width: 1.4; }
.xstd.xdiff2 { fill: color-mix(in srgb, var(--change) 22%, transparent); }
.xoursfill { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; }
.xtable { font-size: 13px; margin-top: 8px; width: 100%; }
.xtable th { font-size: 11px; color: var(--muted); text-align: left; font-weight: 600; padding: 2px 6px; }
.xtable td { padding: 2px 6px; border-top: 1px solid var(--line); }
.xtable td.c { text-align: center; color: var(--agree); font-weight: 700; }
.xcigar .pic { background: none; padding: 0; }
.scope-row .spacer { flex: 1; }
/* The explainer sits beside the content. Where both fit side by side they are centred as one group,
   the panel 16px from the column; on narrower windows the column only makes room for the panel. */
@media (min-width: 1100px) { body.xopen main.flow, body.xopen main.examples, body.xopen main.wide, body.xopen main.home { margin-right: 412px; margin-left: 16px; } }
@media (min-width: 1288px) {
  body.xopen main.flow, body.xopen main.examples { margin-left: calc(50vw - 628px); margin-right: auto; }
  body.xopen:has(main.flow) .xpanel, body.xopen:has(main.examples) .xpanel { left: calc(50vw - 628px + 876px); right: auto; }
}
@media (min-width: 1468px) {
  body.xopen main.wide, body.xopen main.home { margin-left: calc(50vw - 718px); margin-right: auto; }
  body.xopen:has(main.wide) .xpanel, body.xopen:has(main.home) .xpanel { left: calc(50vw - 718px + 1056px); right: auto; }
}

/* ---------------- examples table */
.exsec { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin: 12px 0; overflow: hidden; box-shadow: var(--shadow); }
.exsec-h { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.exsec-h h2 { flex: 1; font-size: 14px; }
.exsec details.ctx { padding: 8px 14px; border-top: 0; border-bottom: 1px solid var(--line); }
.exsec > p { padding: 0 14px; }
.exrow-wrap { border-bottom: 1px solid var(--line); }
.exrow-wrap:last-child { border-bottom: 0; }
.exrow-wrap.focus { box-shadow: inset 3px 0 0 var(--accent); }
.exrow-wrap.st-done { background: linear-gradient(90deg, transparent, transparent); }
.exrow { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 14px; }
.exid { font-family: var(--mono); font-size: 12px; color: var(--ink-2); justify-content: flex-start; white-space: nowrap; }
.car { color: var(--muted); font-size: 10px; }
.exlabel { font-size: 14px; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.exrow-wrap.open .exlabel { display: block; overflow: visible; }
.pol { font-size: 12px; white-space: nowrap; padding: 2px 8px; border-radius: 999px; font-weight: 600; cursor: help; }
.pol-h { color: var(--agree); background: color-mix(in srgb, var(--agree) 12%, transparent); }
.pol-n { color: var(--no); background: color-mix(in srgb, var(--no) 12%, transparent); }
.pol-c { color: var(--unsure); background: color-mix(in srgb, var(--unsure) 12%, transparent); }
.exchips { display: flex; gap: 4px; align-items: center; }
.exchips .chipbtn { padding: 4px 10px; }
.exchips .chipbtn.c-ok.on { background: var(--agree); border-color: var(--agree); color: #fff; }
.exchips .chipbtn.c-no.on { background: var(--no); border-color: var(--no); color: #fff; }
.has-c { font-size: 12px; cursor: help; }
.exbody { padding: 0 14px 12px 88px; }
.exbody .excomment { margin-top: 8px; }
.exbar { margin-bottom: 4px; }
pre.lean { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------------- owner pages */
.page-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 12px 0; box-shadow: var(--shadow); }
.panel h2 { margin-bottom: 4px; }
table.grid { width: 100%; font-size: 14px; }
table.grid th { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
table.grid th, table.grid td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: middle; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.barcell { min-width: 140px; }
td.barcell .stack { margin-top: 4px; }
table.grid.ov td.barcell { width: 40%; }
tr.st-revoked td { color: var(--muted); }
tr.st-revoked strong { text-decoration: line-through; }
.acts { white-space: nowrap; text-align: right; }
.acts button { margin-left: 4px; }
.pill.st-awaiting-approval { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.pill.st-approved { background: color-mix(in srgb, var(--agree) 15%, transparent); color: var(--agree); border-color: transparent; }
.ident { font-size: 12px; }
.pending-box:empty { display: none; }
.pending-box { background: var(--warn-bg); border: 1px solid var(--stale); border-radius: 12px; padding: 14px 16px; margin: 0 0 12px; }
.pending-box h2 { display: flex; align-items: center; color: var(--warn-ink); }
.pending-box > p { color: var(--warn-ink); margin: 4px 0 10px; }
.pend { display: flex; align-items: center; gap: 12px; background: var(--panel); border-radius: 10px; padding: 12px 14px; margin-top: 8px; flex-wrap: wrap; }
.pend-who { flex: 1; min-width: 0; }
.pend-who p { margin: 6px 0 0; }
.pend-act { display: flex; gap: 8px; }
.inv-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0 0; }
.inv-form input[type="text"] { flex: 1 1 220px; }
.inv-form .days { display: inline-flex; align-items: center; gap: 6px; }
.inv-form input[type="number"] { width: 72px; }
.linkbox { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; margin-top: 12px; }
.linkrow { display: flex; gap: 8px; }
.linkrow input { flex: 1; min-width: 0; }
.disagree { border-bottom: 1px solid var(--line); padding: 8px 0; }
.disagree ul { list-style: none; padding: 0; margin: 4px 0; }
.disagree li { margin: 4px 0; font-size: 14px; }

/* ---------------- phone (360 to 430 px and up to 760) */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .wide-only { display: none !important; }
  .narrow-only { display: flex !important; }
  .top { gap: 4px; height: calc(52px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(8px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); }
  .tabs { display: none; }
  .brand { min-height: 44px; }
  .tools { margin-left: auto; gap: 2px; }
  .tbtn { height: 44px; min-width: 44px; }
  .tbtn .lbl { display: none; }
  .avatar { width: 44px; height: 44px; background: radial-gradient(circle, var(--accent-soft) 15px, transparent 16px); }
  .tools .pill.conf { padding: 0; width: 44px; height: 44px; justify-content: center; background: transparent; }
  .tools .pill.conf .conf-t { display: none; }
  .tools .pill.conf::before { font-size: 12px; color: var(--conf-ink); }
  .termchip { min-height: 36px; font-size: 13px; }
  .pill.trbtn { min-height: 32px; padding: 6px 12px; position: relative; }
  .pill.trbtn::after { content: ""; position: absolute; inset: -6px -2px; }
  .menu-pop { position: fixed; top: calc(56px + env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right)); min-width: 220px; }
  .menu-pop a, .menu-pop button.linkish { min-height: 44px; font-size: 15px; gap: 8px; justify-content: flex-start; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--panel); border-top: 1px solid var(--line);
    padding: 2px max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-left)); }
  .tabbar a { flex: 1; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--muted); text-decoration: none; border-radius: 10px; }
  .tabbar a.active { color: var(--accent); font-weight: 600; }
  .tabbar .ic { width: 22px; height: 22px; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); max-width: calc(100vw - 24px); }
  main { padding: 0 max(12px, env(safe-area-inset-right)) calc(88px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  main.home, main.wide { margin: 12px auto; }
  /* no zoom on focus: inputs at 16 px */
  input, textarea, select { font-size: 16px; }
  /* touch targets of at least 44 px */
  button, .button, select, input[type="text"], input[type="number"], input[type="search"], .segmented button, .chipbtn { min-height: 44px; }
  button.linkish { min-height: 44px; display: inline-flex; align-items: center; }
  .qm { position: relative; width: 20px; height: 20px; min-height: 0; font-size: 11px; }
  .qm::after { content: ""; position: absolute; inset: -12px; }
  details:not(.menu) > summary { min-height: 44px; display: flex; align-items: center; gap: 6px; list-style: none; }
  details:not(.menu) > summary::before { content: "▸"; font-size: 11px; }
  details:not(.menu)[open] > summary::before { content: "▾"; }
  details:not(.menu) > summary::-webkit-details-marker { display: none; }
  .hero { flex-wrap: wrap; gap: 12px; padding: 14px; }
  .hero .big { font-size: 18px; }
  .hero .big-btn { width: 100%; justify-content: center; min-height: 52px; }
  .tiles3 { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .areas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .area-tile { padding: 10px 12px; min-height: 64px; }
  .area-tile .tile-head { flex-wrap: wrap; gap: 2px 8px; }
  .area-tile .tile-head h3 { flex-basis: 100%; }
  .scopebar { position: static; padding-top: 10px; }
  .scope-row { gap: 6px; }
  .area-sel { flex: 1 1 100%; max-width: none; }
  .segmented { flex: 1; }
  .segmented button { flex: 1; padding: 4px 8px; }
  .prog-row { flex-wrap: wrap; gap: 4px 12px; }
  .prog-row .stack { flex-basis: 100%; }
  .card-item { padding: 16px; border-radius: 14px; }
  h1 { font-size: 19px; }
  figure.quote { padding: 10px 12px; }
  figure.quote blockquote { font-size: 16px; }
  /* pictures scroll sideways inside their own box, never the page */
  .pics { flex-direction: column; }
  .pic { width: 100%; max-width: 100%; }
  .pic .scrollx { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .kind-pic .kindsvg.big { width: 130px; height: 73px; }
  .choices { grid-template-columns: minmax(0, 1fr); }
  .caselist { grid-template-columns: minmax(0, 1fr); }
  .short { grid-template-columns: minmax(0, 1fr) auto; }
  .short .short-t { grid-column: 1 / -1; grid-row: 2; }
  .short .use-alt { grid-column: 2; grid-row: 1; min-height: 32px; }
  .vrow { grid-template-columns: 6.5em minmax(0, 1fr); padding: 8px 10px; }
  /* on a phone the reason and the mark use the whole width, under "who" and the verdict */
  .vrow .vwhy, .vrow .vmark { grid-column: 1 / -1; }
  .vrow .vwhy { margin-top: 2px; }
  .versus { grid-template-columns: minmax(0, 1fr); }
  pre { max-width: 100%; }
  /* the verdict buttons sit in a bar at the bottom, within reach of the thumb */
  main.flow { padding-bottom: calc(160px + env(safe-area-inset-bottom)); }
  main.flow .vbtns { position: fixed; left: 0; right: 0; bottom: calc(56px + env(safe-area-inset-bottom)); z-index: 9; margin: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 8px max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left));
    background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.08); }
  body:has(main.flow .vbtns) .toast { bottom: calc(132px + env(safe-area-inset-bottom)); }
  .vbtn { flex-direction: column; gap: 2px; padding: 6px 4px; min-height: 56px; font-size: 13px; border-radius: 12px; }
  .vbtn .vic { width: 22px; height: 22px; }
  form.verdict { padding-top: 8px; }
  .pager button { min-height: 44px; }
  .exrow { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "id label label" "pol pol chips"; row-gap: 4px; padding: 6px 10px; }
  .exid { grid-area: id; min-height: 44px; }
  .exlabel { grid-area: label; align-self: center; }
  .pol { grid-area: pol; justify-self: start; align-self: center; }
  .exchips { grid-area: chips; gap: 6px; }
  .exchips .chipbtn { min-width: 48px; justify-content: center; }
  .exchips .chipbtn { padding: 4px 10px; }
  .exbody { padding: 0 10px 12px; }
  .exsec-h { flex-wrap: wrap; }
  dl.facts { grid-template-columns: minmax(0, 1fr); }
  .pend-act { width: 100%; }
  .pend-act button { flex: 1; justify-content: center; }
  .inv-form input[type="text"] { flex-basis: 100%; }
  .inv-form button { flex: 1; justify-content: center; }
  .acts button { margin: 2px 6px 2px 0; }
  .area-tile.flag .flag-ic { display: none; }
  /* the invitations table as one block per invitation */
  table.grid.inv thead { display: none; }
  table.grid.inv, table.grid.inv tbody, table.grid.inv tr, table.grid.inv td { display: block; width: 100%; }
  table.grid.inv tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  table.grid.inv tr:last-child { border-bottom: 0; }
  table.grid.inv td { border: 0; padding: 2px 0; }
  table.grid.inv td.acts { text-align: left; padding-top: 6px; }
  table.grid.revs, table.grid.revs tbody, table.grid.revs tr, table.grid.revs td { display: block; width: 100%; }
  table.grid.revs tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.grid.revs td { border: 0; padding: 3px 0; }
  table.grid.ov th:first-child, table.grid.ov td:first-child, table.grid.ov th:nth-child(5), table.grid.ov td:nth-child(5) { display: none; }
  table.grid.ov td, table.grid.ov th { padding: 8px 6px; }
  td.barcell { min-width: 80px; }
  .pic figcaption { max-width: none; }
  /* the explainer is a bottom sheet */
  .xpanel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 75vh; border-radius: 18px 18px 0 0; z-index: 45;
    padding: 6px max(16px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25); }
  .xpanel::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 4px auto 6px; }
  .xpanel-h .tbtn { width: 44px; height: 44px; }
  .xgrid { grid-template-columns: minmax(0, 1fr); }
  .drawer { width: 100vw; padding-top: env(safe-area-inset-top); }
  .drawer .items li.item a { min-height: 44px; align-items: center; }
  .help-card { max-height: 85vh; overflow-y: auto; }
  /* login and the other server pages */
  .page > .card { padding: 28px 20px 22px; border-radius: 18px; }
}
@media (max-width: 380px) {
  .brand-rest { display: none; }
  .exchips .ctx-l { display: none; }
  .areas { grid-template-columns: minmax(0, 1fr); }
}

/* A verdict given on an earlier text: its own category in every bar and count (hatched amber, so
   that it is not taken for "change"), and a box on the card that shows it with the two actions. */
.seg.v-stale { background: repeating-linear-gradient(45deg, var(--stale) 0 4px, var(--warn-bg) 4px 8px); }
.dot.stale { box-shadow: inset 0 0 0 2px var(--warn-bg); outline: 1px solid var(--stale); }
.stale-line { color: var(--warn-ink); margin: 2px 0 0; }
.num.stale-n { color: var(--warn-ink); background: var(--warn-bg); border-radius: 999px; padding: 0 8px; margin-right: 6px; }
.earlier { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--stale); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.earlier p { margin: 0 0 8px; }
.earlier .earlier-text { background: var(--panel); color: var(--ink); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; }
.earlier-act { display: flex; flex-wrap: wrap; gap: 8px; }
.earlier-act button { min-height: 44px; }
button.pill.stale.reconfirm { cursor: pointer; font: inherit; font-size: 12px; min-height: 28px; }
@media (max-width: 760px) { button.pill.stale.reconfirm { min-height: 44px; } }
