/* Layout: a pathology worklist. Index rail on the left; the front page reads as a summary sheet (headline figures,
   the curation pipeline as numbered stages), then the research-topic dossiers, then datasets. Hematoxylin violet is the
   accent, eosin pink the second series; neutrals are tinted toward the accent. System fonts only (hospital PCs are
   offline): YaHei for text, Bahnschrift for figures, Cascadia/Consolas for specimen codes. */
:root {
  --paper: #f4f2f7; --sheet: #ffffff; --sheet2: #f0edf5; --rule: #e0dae8; --grid: #ebe7f0;
  --ink: #1b1625; --ink2: #463f55; --muted: #6f6680;
  --hema: #3d2b73; --hema-soft: #e9e3f7; --eosin: #c4417a; --eosin-soft: #fae4ee;
  --good: #23764f; --good-soft: #e0f1e8; --warn: #9a5f0c; --warn-soft: #fbefd9; --crit: #b42318; --crit-soft: #fde7e5;
  --s1: #5b3a8e; --s2: #d9668f; --heat0: #f3eff9; --heat1: #34205f; --track: #ece8f2; --hatch: #b8afc6; --mark: #ffe28a; --mark-ink: #1b1625;
  --shadow: 0 1px 2px rgba(27, 22, 37, .05), 0 6px 18px rgba(27, 22, 37, .05);
  --f-ui: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  --f-num: "Bahnschrift", "DIN Alternate", "Segoe UI Variable Display", "Segoe UI", "Microsoft YaHei UI", sans-serif;
  --f-code: "Cascadia Mono", "Consolas", "SFMono-Regular", monospace;
  --r: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121019; --sheet: #1b1724; --sheet2: #231e2e; --rule: #332c3f; --grid: #2a2435;
    --ink: #efeaf6; --ink2: #c8c0d6; --muted: #9b92ab;
    --hema: #a998ec; --hema-soft: #2c2547; --eosin: #ee82a9; --eosin-soft: #3b2232;
    --good: #5cc28a; --good-soft: #17301f; --warn: #e3a64a; --warn-soft: #33270f; --crit: #f07a70; --crit-soft: #3a1a18;
    --s1: #9272d4; --s2: #e0628e; --heat0: #221d2c; --heat1: #c9b6f5; --track: #2a2435; --hatch: #5d5370; --mark: #6b5a17; --mark-ink: #fff6d6;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121019; --sheet: #1b1724; --sheet2: #231e2e; --rule: #332c3f; --grid: #2a2435;
  --ink: #efeaf6; --ink2: #c8c0d6; --muted: #9b92ab;
  --hema: #a998ec; --hema-soft: #2c2547; --eosin: #ee82a9; --eosin-soft: #3b2232;
  --good: #5cc28a; --good-soft: #17301f; --warn: #e3a64a; --warn-soft: #33270f; --crit: #f07a70; --crit-soft: #3a1a18;
  --s1: #9272d4; --s2: #e0628e; --heat0: #221d2c; --heat1: #c9b6f5; --track: #2a2435; --hatch: #5d5370; --mark: #6b5a17; --mark-ink: #fff6d6;
  --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 17px/1.6 var(--f-ui); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--hema); }
.muted { color: var(--muted); }
.small { font-size: 14.5px; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.code { font-family: var(--f-code); font-size: .92em; letter-spacing: .01em; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--eosin); outline-offset: 2px; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 18px; padding: 10px 22px;
  background: var(--sheet); border-bottom: 1px solid var(--rule); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo { width: 30px; height: 30px; border-radius: 50%; flex: none; background: radial-gradient(circle at 34% 36%, var(--eosin) 0 28%, transparent 29%), var(--hema); }
.brand-title { font-weight: 700; font-size: 18px; letter-spacing: .01em; }
.brand-sub { font-size: 13.5px; color: var(--muted); }
.status { flex: 1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; font-size: 15px; color: var(--ink2); }
.actions { display: flex; gap: 8px; align-items: center; }
.btn { border: 1px solid var(--hema); background: var(--hema); color: var(--sheet); border-radius: 8px; padding: 7px 15px; cursor: pointer;
  font-weight: 650; font-size: 15.5px; white-space: nowrap; }
.btn.ghost { background: transparent; color: var(--ink2); border-color: var(--rule); }
.btn.ok { background: var(--good); border-color: var(--good); }
.btn:disabled { opacity: .45; cursor: default; }
.pill, .chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; white-space: nowrap; font-weight: 650; }
.pill { padding: 2px 11px 2px 9px; font-size: 14.5px; border: 1.5px solid currentColor; }
.pill.good { color: var(--good); } .pill.warn { color: var(--warn); } .pill.crit { color: var(--crit); } .pill.idle { color: var(--muted); }
.chip { padding: 2px 10px; font-size: 13.5px; background: var(--sheet2); color: var(--ink2); }
.chip.hema { background: var(--hema-soft); color: var(--hema); } .chip.eosin { background: var(--eosin-soft); color: var(--eosin); }
.chip.good { background: var(--good-soft); color: var(--good); } .chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.crit { background: var(--crit-soft); color: var(--crit); }

.unlock, .login { background: var(--sheet2); border-bottom: 1px solid var(--rule); padding: 16px 22px; }
.unlock form, .login form { max-width: 560px; display: grid; gap: 8px; }
.unlock label, .login label { font-weight: 650; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
input[type=password], input[type=text], input[type=number], input[type=search], select, textarea {
  min-width: 0; padding: 8px 11px; border-radius: 8px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); }
textarea { width: 100%; min-height: 96px; resize: vertical; line-height: 1.6; }

/* layout */
.layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: calc(100vh - 57px); }
.nav { border-right: 1px solid var(--rule); padding: 18px 12px; background: var(--sheet); }
.nav h4 { margin: 18px 10px 6px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
.nav a { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 10px; border-radius: 8px;
  color: var(--ink2); text-decoration: none; font-size: 16px; line-height: 1.4; }
.nav a:hover { background: var(--sheet2); }
.nav a.on { background: var(--hema-soft); color: var(--hema); font-weight: 700; }
.nav .count { font-size: 14px; color: var(--muted); font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.nav a.on .count { color: var(--hema); }
.nav .count.alert { color: var(--eosin); font-weight: 700; }
.main { padding: 26px 32px 72px; min-width: 0; overflow-wrap: anywhere; max-width: 1640px; }

h1 { font-size: 32px; line-height: 1.25; margin: 0 0 6px; font-weight: 700; letter-spacing: .005em; }
.lead { color: var(--ink2); margin: 0 0 20px; max-width: 70ch; }
.section { margin-top: 38px; }
.section > h2 { font-size: 24px; margin: 0 0 4px; font-weight: 700; }
.section > .note { color: var(--muted); font-size: 15.5px; margin: 0 0 14px; max-width: 80ch; }
.eyebrow { font-size: 13.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 650; }

/* summary sheet (front page) */
.sheet { background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--shadow); }
.summary { padding: 26px 28px 22px; display: grid; gap: 22px; }
.summary-head { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: flex-end; }
.summary-head h1 { margin: 2px 0 2px; font-size: 34px; }
.summary-head .sub { color: var(--ink2); font-size: 16.5px; max-width: 70ch; }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border-top: 1px solid var(--rule); }
.figure { padding: 16px 18px 4px 0; display: grid; gap: 2px; }
.figure + .figure { padding-left: 18px; border-left: 1px solid var(--rule); }
.figure .v { font-family: var(--f-num); font-size: 44px; font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--ink); }
.figure .v small { font-size: 20px; color: var(--muted); margin-left: 3px; }
.figure .l { font-size: 15.5px; color: var(--ink2); }
.figure .s { font-size: 13.5px; color: var(--muted); }
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.stage { background: var(--sheet2); border-radius: 10px; padding: 12px 14px; display: grid; gap: 4px; align-content: start; }
.stage .n { font-family: var(--f-num); font-size: 13px; color: var(--muted); letter-spacing: .06em; }
.stage .t { font-weight: 700; font-size: 16px; }
.stage .v { font-family: var(--f-num); font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stage .d { font-size: 14px; color: var(--ink2); line-height: 1.45; }
.stage .bar { height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; margin-top: 4px; }
.stage .bar i { display: block; height: 100%; background: var(--hema); }
.stage.attn { background: var(--eosin-soft); } .stage.attn .bar i { background: var(--eosin); }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.kpi { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 14px 16px; }
.kpi .k-label { font-size: 15px; color: var(--muted); }
.kpi .k-value { font-family: var(--f-num); font-size: 36px; font-weight: 600; line-height: 1.2; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .k-value.text { font-family: var(--f-ui); font-size: 19px; font-weight: 650; margin-top: 8px; }
.kpi .k-unit { font-size: 17px; color: var(--muted); font-weight: 500; margin-left: 3px; }
.kpi .k-sub { font-size: 14.5px; color: var(--ink2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi.status-good .k-value { color: var(--good); } .kpi.status-warning .k-value { color: var(--warn); } .kpi.status-critical .k-value { color: var(--crit); }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(470px, 1fr)); gap: 16px; }
.card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 18px 20px 16px; min-width: 0; }
.card.wide { grid-column: 1 / -1; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.card-title { font-weight: 700; font-size: 19px; line-height: 1.35; }
.card-sub { font-size: 14.5px; color: var(--muted); margin-top: 2px; }
.tabbtn { border: 1px solid var(--rule); background: transparent; color: var(--muted); border-radius: 6px; font-size: 14px; padding: 2px 11px; cursor: pointer; flex: none; }
.tabbtn[aria-pressed="true"] { color: var(--ink); border-color: var(--ink2); }
.card-foot { margin-top: 12px; font-size: 14.5px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.complete { display: flex; align-items: center; gap: 8px; }
.complete .bar { flex: 0 0 90px; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.complete .bar i { display: block; height: 100%; background: var(--ink2); opacity: .55; }

/* horizontal bars */
.hbars { display: grid; grid-template-columns: minmax(90px, 38%) minmax(0, 1fr) auto; column-gap: 12px; row-gap: 3px; align-items: center; }
.hbars .lab { font-size: 16px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 0; }
.hbars .trk { position: relative; height: 24px; }
.hbars .val { font-family: var(--f-num); font-size: 16.5px; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbars .val small { color: var(--muted); font-size: 14px; margin-left: 5px; }
.hbars .fill { position: absolute; left: 0; top: 3px; bottom: 3px; background: var(--s1); border-radius: 0 4px 4px 0; min-width: 2px; }
.hbars .fill.rate { background: var(--s2); }
.hbars .fill.sup { width: 10px; background: repeating-linear-gradient(135deg, var(--hatch) 0 2px, transparent 2px 5px); }
.hbars .trk.scaled::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; bottom: 3px; background: var(--track); border-radius: 0 4px 4px 0; }
.hbars [data-tip]:hover .fill { opacity: .85; }
svg text { fill: var(--ink2); font-size: 15px; font-family: var(--f-ui); }
svg .val-t, svg .numt { fill: var(--ink); font-family: var(--f-num); font-variant-numeric: tabular-nums; }
svg .axis-t { fill: var(--muted); font-size: 13.5px; font-family: var(--f-num); }
svg .grid-l { stroke: var(--grid); stroke-width: 1; }
svg .base-l { stroke: var(--rule); stroke-width: 1; }
svg .ref-l { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 4 4; }
svg .col { fill: var(--s1); }
svg .hit { fill: transparent; }
svg .s1 { stroke: var(--s1); fill: none; stroke-width: 2.5; } svg .s2 { stroke: var(--s2); fill: none; stroke-width: 2.5; }
svg .a1 { fill: var(--s1); opacity: .08; }
svg .d1 { fill: var(--s1); stroke: var(--sheet); stroke-width: 2; } svg .d2 { fill: var(--s2); stroke: var(--sheet); stroke-width: 2; }
svg .ci { stroke: var(--s1); stroke-width: 2.5; stroke-linecap: round; } svg .ci.low { stroke: var(--hatch); }

/* tables */
.tablewrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: 15.5px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 7px 10px; text-align: right; border-bottom: 1px solid var(--rule); white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data th { color: var(--muted); font-weight: 650; font-size: 14.5px; }
table.heat { border-collapse: separate; border-spacing: 3px; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; }
table.heat th { font-weight: 650; color: var(--muted); padding: 4px 8px; text-align: center; white-space: nowrap; }
table.heat th.rowh { text-align: left; color: var(--ink2); font-weight: 600; }
table.heat td { text-align: center; padding: 8px 6px; border-radius: 5px; min-width: 64px; font-family: var(--f-num); font-size: 16px; }
.legend-ramp { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-top: 8px; }
.legend-ramp i { display: inline-block; width: 140px; height: 9px; border-radius: 5px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14.5px; color: var(--ink2); margin-top: 6px; }
.legend span::before { content: ""; display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: var(--s1); }
.legend span.e::before { background: var(--s2); }
.legend span.r::before { background: transparent; border-top: 2px dashed var(--muted); height: 0; }
.err { color: var(--crit); font-size: 15.5px; }

/* front page: topics + datasets */
.topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(540px, 1fr)); gap: 18px; }
.topic { display: grid; gap: 16px; align-content: start; padding: 22px 24px; }
.topic .t-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.topic .t-title { font-size: 22px; font-weight: 700; line-height: 1.3; }
.topic .t-q { font-size: 17px; color: var(--ink); }
.topic .t-guide { font-size: 15px; color: var(--ink2); background: var(--sheet2); border-radius: 8px; padding: 9px 12px; }
.topic .t-n { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.topic .t-n b { font-family: var(--f-num); font-size: 54px; font-weight: 600; color: var(--hema); font-variant-numeric: tabular-nums; line-height: 1; }
.topic .t-n span { font-size: 16.5px; color: var(--ink2); }
.topic h3 { font-size: 15px; margin: 0 0 8px; color: var(--muted); font-weight: 650; letter-spacing: .04em; }
.topic .t-model { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 15.5px; color: var(--ink2); background: var(--hema-soft); border-radius: 8px; padding: 9px 12px; }
.topic .t-model b { font-family: var(--f-num); font-size: 19px; color: var(--hema); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.stack { display: grid; gap: 16px; }
.funnel { display: grid; grid-template-columns: minmax(0, 1fr) 92px; row-gap: 5px; column-gap: 10px; align-items: center; }
.funnel .f-lab { font-size: 15.5px; position: relative; padding: 5px 10px; border-radius: 6px; overflow: hidden; z-index: 0; color: var(--ink); white-space: nowrap; text-overflow: ellipsis; }
.funnel .f-lab i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--hema-soft); z-index: -1; border-radius: 6px; }
.funnel .f-n { font-family: var(--f-num); font-size: 19px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.ready { display: grid; gap: 7px; }
.ready .r-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 150px; gap: 8px; align-items: center; font-size: 15.5px; }
.ready .r-ico { font-weight: 800; text-align: center; }
.ready .r-ico.ok { color: var(--good); } .ready .r-ico.part { color: var(--warn); } .ready .r-ico.no { color: var(--crit); }
.ready .r-v { text-align: right; font-family: var(--f-num); font-variant-numeric: tabular-nums; color: var(--ink2); }
.needs { margin: 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.needs li { font-size: 15px; color: var(--ink2); padding-left: 20px; position: relative; }
.needs li::before { content: ""; position: absolute; left: 3px; top: .55em; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--eosin); }
.t-link { justify-self: start; font-weight: 700; font-size: 16.5px; color: var(--hema); text-decoration: none; padding: 8px 14px; border: 1.5px solid var(--hema); border-radius: 8px; }
.t-link:hover { background: var(--hema-soft); }
.ds-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.ds-card { text-decoration: none; color: inherit; display: grid; gap: 6px; }
.ds-card:hover { border-color: var(--hema); }
.ds-card .big { font-family: var(--f-num); font-size: 36px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ds-card .row { justify-content: space-between; align-items: baseline; }
.tag { font-size: 13px; color: var(--muted); border: 1px solid var(--rule); border-radius: 5px; padding: 0 7px; }
.disk { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 12px; align-items: center; margin: 6px 0; font-size: 15.5px; }
.disk .trk { height: 10px; background: var(--track); border-radius: 5px; overflow: hidden; }
.disk .trk i { display: block; height: 100%; background: var(--hema); }
.privacy { font-size: 15.5px; color: var(--ink2); } .privacy li { margin: 4px 0; }

/* model panel */
.model-io { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.model-io h3 { font-size: 15px; color: var(--muted); margin: 0 0 8px; letter-spacing: .04em; }
.model-io p { margin: 0 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.metric { background: var(--sheet2); border-radius: 9px; padding: 11px 13px; }
.metric .v { font-family: var(--f-num); font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.15; }
.metric .l { font-size: 14.5px; color: var(--ink2); }
.metric .s { font-size: 13.5px; color: var(--muted); }
.confusion { border-collapse: separate; border-spacing: 4px; font-variant-numeric: tabular-nums; }
.confusion th { font-size: 14px; color: var(--muted); font-weight: 650; padding: 4px 8px; }
.confusion td { width: 120px; height: 66px; text-align: center; border-radius: 8px; font-family: var(--f-num); font-size: 22px; font-weight: 600; }
.confusion td small { display: block; font-family: var(--f-ui); font-size: 12.5px; font-weight: 500; }
.arms { display: grid; grid-template-columns: minmax(150px, 26%) minmax(0, 1fr) 230px; gap: 8px 14px; align-items: center; }
.arms .a-lab { font-size: 16px; font-weight: 600; }
.arms .a-meta { font-size: 14.5px; color: var(--ink2); text-align: right; font-variant-numeric: tabular-nums; }
.caveats { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--ink2); font-size: 15px; }

/* review */
.review { display: grid; grid-template-columns: minmax(330px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.r-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.r-list { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; max-height: calc(100vh - 220px); overflow-y: auto; }
.r-item { display: grid; gap: 4px; padding: 11px 14px; border-bottom: 1px solid var(--rule); cursor: pointer; text-decoration: none; color: inherit; }
.r-item:hover { background: var(--sheet2); }
.r-item.on { background: var(--hema-soft); }
.r-item .top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.r-item .fld { font-weight: 700; font-size: 16px; }
.r-item .vals { display: flex; gap: 5px; flex-wrap: wrap; font-size: 13.5px; }
.r-detail { display: grid; gap: 14px; min-width: 0; }
.readers { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.reader { background: var(--sheet2); border-radius: 9px; padding: 10px 12px; }
.reader .who { font-size: 13.5px; color: var(--muted); }
.reader .what { font-family: var(--f-num); font-size: 21px; font-weight: 600; overflow-wrap: anywhere; }
.reader.now { background: var(--hema-soft); }
.report h3 { font-size: 15px; color: var(--muted); margin: 12px 0 6px; letter-spacing: .04em; }
.report .txt { white-space: pre-wrap; line-height: 1.85; font-size: 16.5px; background: var(--sheet2); border-radius: 9px; padding: 12px 14px; max-height: 340px; overflow: auto; }
mark { background: var(--mark); color: var(--mark-ink); border-radius: 3px; padding: 0 2px; }
.suggest { border: 2px solid var(--hema); border-radius: 12px; padding: 16px 18px; display: grid; gap: 10px; background: var(--sheet); }
.suggest .by { font-size: 14px; color: var(--muted); }
.suggest .reason { font-size: 15px; color: var(--ink2); background: var(--sheet2); border-radius: 8px; padding: 8px 11px; }
.suggest label { font-weight: 650; font-size: 15px; }
.decision { border-radius: 10px; padding: 12px 14px; background: var(--good-soft); color: var(--ink); }
.empty { color: var(--muted); padding: 24px; text-align: center; }

/* tooltip */
.tip { position: fixed; z-index: 20; pointer-events: none; background: var(--ink); color: var(--paper); padding: 8px 11px; border-radius: 8px;
  font-size: 15px; line-height: 1.45; max-width: 340px; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); font-variant-numeric: tabular-nums; }
.tip b { font-weight: 700; }

@media (max-width: 1100px) {
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-io { grid-template-columns: minmax(0, 1fr); }
  .review { grid-template-columns: minmax(0, 1fr); }
  .r-list { max-height: 360px; }
}
@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; padding: 10px 16px; gap: 8px 12px; }
  .status { order: 3; flex-basis: 100%; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .nav { min-width: 0; border-right: 0; border-bottom: 1px solid var(--rule); padding: 8px 12px; display: flex; gap: 6px; overflow-x: auto; }
  .nav h4, .nav .count { display: none; }
  .nav a { flex: none; }
  .main { padding: 16px 16px 48px; }
  .grid, .topics, .split { grid-template-columns: minmax(0, 1fr); }
  .summary { padding: 18px; } .summary-head h1 { font-size: 26px; }
  .figure + .figure { border-left: 0; padding-left: 0; }
  .pipeline { grid-template-columns: minmax(0, 1fr); }
  .readers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arms { grid-template-columns: minmax(0, 1fr); }
  .arms .a-meta { text-align: left; }
  .ready .r-row { grid-template-columns: 22px minmax(0, 1fr) 100px; }
}
@media (forced-colors: active) { .hbars .fill, svg .col { forced-color-adjust: none; background: CanvasText; fill: CanvasText; } }

/* review: why a field needs a doctor; password panel (23 Oct 2026) */
.r-why { border: 1px solid var(--rule); border-radius: 10px; padding: 8px 12px; margin: 10px 0; background: var(--sheet2); }
.r-why .who { font-size: 13px; color: var(--ink2); margin-bottom: 4px; font-weight: 650; }
.r-why ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.r-why li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
#pwbox input[type=password] { max-width: 420px; }
