/* Light is the default; [data-theme="dark"] is set on <html> by the theme switch. */
:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --ink: #17212e;
  --ink-2: #475569;
  --ink-3: #7a8699;
  --rule: #e1e6ed;
  --rule-2: #eef1f5;
  --accent: #0f5f66;
  --accent-hover: #0c4f55;
  --accent-ink: #ffffff;
  --accent-soft: #e4f1f1;
  --focus: #2f7fd1;
  --shadow: 0 1px 2px rgba(23, 33, 46, .05);
  --overlay: rgba(15, 23, 33, .42);

  --st-accepted: #22764a;   --st-accepted-bg: #e1f3e8;
  --st-revision: #9a5f0c;   --st-revision-bg: #fcf0da;
  --st-review: #24609f;     --st-review-bg: #e3edf9;
  --st-submitted: #4f5f78;  --st-submitted-bg: #eaeef4;
  --st-rejected: #a03a3a;   --st-rejected-bg: #f8e5e4;
  --st-closed: #778194;     --st-closed-bg: #eff1f4;
  --st-problem: #6f45a0;    --st-problem-bg: #f0e8f9;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 10px;
  --side-w: 232px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #11161d;
  --surface: #181f28;
  --surface-2: #1c2430;
  --ink: #e6ebf2;
  --ink-2: #b2bdcc;
  --ink-3: #8090a4;
  --rule: #2b3543;
  --rule-2: #222b37;
  --accent: #55b6bb;
  --accent-hover: #6cc5ca;
  --accent-ink: #0b1a1c;
  --accent-soft: #19343a;
  --shadow: none;
  --overlay: rgba(0, 0, 0, .6);
  --st-accepted: #6fcf97;   --st-accepted-bg: #163222;
  --st-revision: #f0b55a;   --st-revision-bg: #382a13;
  --st-review: #84b5f0;     --st-review-bg: #172b44;
  --st-submitted: #a9b6c9;  --st-submitted-bg: #243040;
  --st-rejected: #ef8b85;   --st-rejected-bg: #3b1e1e;
  --st-closed: #8e98a8;     --st-closed-bg: #252c37;
  --st-problem: #c9a6ef;    --st-problem-bg: #2e2240;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.boot { padding: 40px; color: var(--ink-3); }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
code { font-size: 13px; }

/* ---------- layout: sidebar + content ---------- */
.layout { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 18px;
  background: var(--surface); border-right: 1px solid var(--rule); padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; color: var(--ink); padding: 0 8px; }
.brand svg { flex: none; }
.nav { display: grid; gap: 2px; }
.nav-label { font-size: 12px; color: var(--ink-3); padding: 0 10px 4px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px;
  color: var(--ink-2); text-decoration: none; font-weight: 500;
}
.nav a svg { flex: none; opacity: .8; }
.nav a:hover { background: var(--rule-2); color: var(--ink); }
.nav a.on { background: var(--accent-soft); color: var(--accent); }
.nav a.on svg { opacity: 1; }
.nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; display: grid; gap: 10px; border-top: 1px solid var(--rule); padding-top: 14px; }
.who { display: flex; align-items: center; gap: 10px; padding: 0 6px; text-decoration: none; color: var(--ink); min-width: 0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; }
.who-text { min-width: 0; }
.who-text b { display: block; font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-text span { display: block; font-size: 12px; color: var(--ink-3); }
.side-actions { display: flex; gap: 6px; align-items: center; padding: 0 4px; }
.content { min-width: 0; }
main { max-width: 1200px; margin: 0 auto; padding: 28px 32px 80px; }
.badge { background: var(--accent); color: var(--accent-ink); border-radius: 10px; font-size: 11px; font-weight: 600; padding: 0 6px; line-height: 18px; }
.badge.warn { background: var(--st-revision); color: #fff; }

/* theme switch */
.seg { display: inline-flex; background: var(--rule-2); border-radius: 8px; padding: 2px; gap: 2px; }
.seg button { border: 0; background: none; border-radius: 6px; padding: 4px 9px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 500; }
:root[data-theme="dark"] .seg button[aria-pressed="true"] { background: var(--rule); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); max-width: 68ch; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink);
  padding: 7px 14px; border-radius: 7px; cursor: pointer; font-weight: 500; text-decoration: none; font-size: 14px; line-height: 1.3;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--st-rejected); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--rule-2); color: var(--ink); }
.btn.link { border: 0; background: none; padding: 0; color: var(--accent); }
.btn:disabled { opacity: .55; cursor: default; }
input[type=text], input[type=email], input[type=date], input[type=search], input[type=password], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 7px; background: var(--surface);
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 84px; }
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; cursor: pointer; }
.check input { margin-top: 4px; }

/* ---------- status pill ---------- */
.st {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 500; line-height: 1; padding: 5px 9px 5px 8px; border-radius: 99px;
  color: var(--c); background: var(--b); white-space: nowrap;
}
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.st-accepted { --c: var(--st-accepted); --b: var(--st-accepted-bg); }
.st-revision { --c: var(--st-revision); --b: var(--st-revision-bg); }
.st-review { --c: var(--st-review); --b: var(--st-review-bg); }
.st-submitted { --c: var(--st-submitted); --b: var(--st-submitted-bg); }
.st-rejected { --c: var(--st-rejected); --b: var(--st-rejected-bg); }
.st-closed { --c: var(--st-closed); --b: var(--st-closed-bg); }
.st-problem { --c: var(--st-problem); --b: var(--st-problem-bg); }

/* ---------- journal trail (the signature element) ---------- */
.trail { display: flex; flex-wrap: wrap; align-items: center; row-gap: 8px; margin-top: 10px; }
.stop {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 8px; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface);
  font-size: 12.5px; color: var(--ink-2); max-width: 260px;
}
.stop span.j { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stop i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.stop.closed { color: var(--ink-3); border-style: dashed; background: transparent; }
.stop.closed span.j { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-3) 60%, transparent); }
.stop.live { border-color: color-mix(in srgb, var(--c) 45%, transparent); color: var(--ink); background: var(--b); font-weight: 500; }
.trail .sep { width: 12px; height: 1px; background: var(--rule); flex: none; }

/* ---------- panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px 12px; border-bottom: 1px solid var(--rule-2); }
.panel > header p { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); }
.panel-body { padding: 14px 18px 16px; }
.stack { display: grid; gap: 20px; align-content: start; }

/* ---------- overview ---------- */
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.tile {
  display: block; text-align: left; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 14px 16px; text-decoration: none; color: inherit; cursor: pointer; box-shadow: var(--shadow); border-top: 3px solid var(--c, var(--rule));
}
.tile:hover { border-color: var(--ink-3); border-top-color: var(--c, var(--ink-3)); }
.tile b { display: block; font-family: var(--serif); font-size: 30px; line-height: 1.1; font-weight: 600; }
.tile span { display: block; font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.tile[aria-pressed="true"] { outline: 2px solid var(--c, var(--accent)); outline-offset: -1px; }
.overview { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
.tabs button {
  border: 0; background: none; padding: 12px 10px 10px; cursor: pointer; color: var(--ink-2); font-weight: 500; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 6px;
}
.tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.tabs .count { background: var(--rule-2); color: var(--ink-2); border-radius: 10px; font-size: 12px; padding: 0 7px; line-height: 18px; }
.tabs button[aria-selected="true"] .count { background: var(--accent-soft); color: var(--accent); }
.tab-hint { margin: 0; padding: 10px 18px 0; font-size: 13px; color: var(--ink-3); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li + li { border-top: 1px solid var(--rule-2); }
.rows a.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; padding: 11px 18px; text-decoration: none; color: inherit; align-items: center; }
.rows a.row:hover { background: var(--surface-2); }
.rows .t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .s { font-size: 13px; color: var(--ink-3); grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .empty { padding: 16px 18px 18px; color: var(--ink-3); font-size: 14px; }
.bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--rule-2); margin: 2px 0 14px; gap: 2px; }
.bar span { background: var(--c); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.legend li a { display: flex; align-items: center; gap: 8px; padding: 4px 6px; margin: 0 -6px; border-radius: 6px; color: inherit; text-decoration: none; font-size: 14px; }
.legend li a:hover { background: var(--surface-2); color: var(--accent); }
.legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.legend b { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.about summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style-position: inside; }
.about dl { margin: 0; padding: 0 18px 16px; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: 14px; }
.about dt { color: var(--ink-3); }
.about dd { margin: 0; color: var(--ink-2); }

/* ---------- papers ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar input[type=search] { max-width: 360px; flex: 1 1 220px; }
.toolbar select { width: auto; }
.toolbar .grow { flex: 1; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  border: 1px solid var(--rule); background: var(--surface); border-radius: 99px; padding: 4px 12px; font-size: 13px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2);
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--ink-3)); }
.chip b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { border-color: var(--c, var(--accent)); background: var(--b, var(--accent-soft)); color: var(--ink); }
.papers { list-style: none; margin: 0; padding: 0; }
.paper { display: grid; grid-template-columns: 40px minmax(0, 1fr); padding: 16px 18px 16px 8px; text-decoration: none; color: inherit; }
.papers li + li .paper { border-top: 1px solid var(--rule-2); }
.paper:hover { background: var(--surface-2); }
.paper .num { text-align: right; padding-right: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 13px; padding-top: 2px; }
.paper .name { font-weight: 600; }
.paper .title { font-family: var(--serif); color: var(--ink-2); font-size: 15px; margin-top: 2px; }
.paper .meta { font-size: 13px; color: var(--ink-3); margin-top: 8px; display: flex; gap: 14px; flex-wrap: wrap; }
.sort-btn { border: 0; background: none; padding: 0; cursor: pointer; color: inherit; font: inherit; font-weight: 500; display: inline-flex; gap: 4px; align-items: center; }
.sort-btn[aria-sort="ascending"]::after { content: "▲"; font-size: 9px; }
.sort-btn[aria-sort="descending"]::after { content: "▼"; font-size: 9px; }

/* ---------- study page ---------- */
.crumb { font-size: 13px; margin-bottom: 10px; display: inline-flex; gap: 6px; text-decoration: none; }
.study-title { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.25; max-width: 34em; margin: 4px 0 10px; }
.study-sub { color: var(--ink-2); display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: 14px; }
.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 18px 0 6px; }
.summary-strip > div { padding: 12px 16px; }
.summary-strip > div + div { border-left: 1px solid var(--rule-2); }
.summary-strip span { display: block; font-size: 12.5px; color: var(--ink-3); }
.summary-strip b { display: block; font-weight: 600; margin-top: 2px; }
.study-grid { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 24px; margin-top: 22px; align-items: start; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 12px; gap: 10px; }
.section-head h2 span { color: var(--ink-3); font-weight: 400; }
.subs { display: grid; gap: 12px; }
.sub { background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--c, var(--rule)); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.sub-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.sub-top h3 { font-size: 16px; }
.sub-top .pub { font-size: 13px; color: var(--ink-3); font-weight: 400; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--ink-2); margin: 8px 0 0; }
.facts b { font-weight: 500; color: var(--ink); }
.deadline-soon { color: var(--st-revision); font-weight: 600; }
.sub details { margin-top: 8px; }
.sub summary { cursor: pointer; font-size: 13px; color: var(--accent); }
.sub .evidence { white-space: pre-wrap; font-size: 13.5px; color: var(--ink-2); margin: 8px 0 0; max-width: 72ch; }
.sub .missing { background: var(--st-problem-bg); color: var(--ink); border-radius: 7px; padding: 8px 10px; font-size: 13px; margin-top: 10px; white-space: pre-wrap; }
.sub-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sub-actions select { width: auto; max-width: 250px; padding: 4px 8px; font-size: 13px; }
.closed-group { margin-top: 16px; }
.closed-group > summary { cursor: pointer; font-weight: 600; padding: 8px 0; color: var(--ink-2); }
.closed-group .subs { margin-top: 8px; }
.sub.closed { background: var(--surface-2); box-shadow: none; }
.note { padding: 12px 0; }
.note + .note { border-top: 1px solid var(--rule-2); }
.note-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.note-head b { font-weight: 600; }
.note-body { white-space: pre-wrap; margin: 4px 0; font-size: 14.5px; }
.to { font-size: 12.5px; color: var(--ink-3); }
.to .read { color: var(--st-accepted); }
.picker { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.picker label { display: inline-flex; gap: 5px; align-items: center; border: 1px solid var(--rule); border-radius: 99px; padding: 3px 10px; font-size: 13px; cursor: pointer; }
.picker input { margin: 0; }
.picker label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.history { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.history li { padding: 9px 0; }
.history li + li { border-top: 1px solid var(--rule-2); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: 13px; padding: 10px 14px; border-bottom: 1px solid var(--rule); white-space: nowrap; background: var(--surface-2); }
td { padding: 10px 14px; border-top: 1px solid var(--rule-2); vertical-align: top; }
tbody tr:hover td { background: var(--surface-2); }
td select { width: auto; padding: 4px 8px; }
tr.off td { color: var(--ink-3); }
tr.link-row { cursor: pointer; }

/* ---------- inbox ---------- */
.inbox { list-style: none; margin: 0; padding: 0; }
.inbox li { padding: 14px 18px; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; }
.inbox li + li { border-top: 1px solid var(--rule-2); }
.inbox .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: transparent; }
.inbox li.unread .dot { background: var(--accent); }
.inbox li.done { opacity: .6; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty-state b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* ---------- people ---------- */
.pending-box { border: 1px solid color-mix(in srgb, var(--st-revision) 45%, transparent); background: var(--st-revision-bg); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px; }
.pending-box ul { list-style: none; margin: 8px 0 0; padding: 0; }
.pending-box li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 0; }
.pending-box li + li { border-top: 1px solid color-mix(in srgb, var(--st-revision) 25%, transparent); }
.pending-box li .who-p { flex: 1; min-width: 200px; }
.role-help { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-3); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 410px; }
.login-card h1 { font-family: var(--serif); font-size: 30px; margin: 18px 0 6px; }
.login-card > p { color: var(--ink-2); margin: 0 0 22px; }
.login-card form { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.login-card .tabs { padding: 0; margin-bottom: 14px; }
.login-foot { display: flex; justify-content: center; margin-top: 16px; }
.err { color: var(--st-rejected); font-size: 14px; margin: 8px 0 0; min-height: 1em; }
.notice { background: var(--accent-soft); color: var(--ink); border-radius: 7px; padding: 10px 12px; margin: 0 0 14px; font-size: 14px; }

/* ---------- modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; background: var(--overlay); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: var(--surface); border-radius: 12px; width: 100%; max-width: 580px; max-height: calc(100vh - 32px); overflow: auto; padding: 22px; box-shadow: 0 18px 50px rgba(0, 0, 0, .22); }
.modal h2 { margin-bottom: 16px; font-size: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-size: 14px; transition: .2s; pointer-events: none; z-index: 60; max-width: calc(100vw - 32px); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--st-rejected); color: #fff; }
pre.code { background: var(--rule-2); border-radius: 7px; padding: 10px 12px; overflow-x: auto; font-size: 12.5px; white-space: pre-wrap; word-break: break-all; }
.secret { border: 1px solid var(--st-revision); background: var(--st-revision-bg); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px; }
.help ol { padding-left: 20px; }
.help li { margin-bottom: 10px; }
.section-title { margin: 30px 0 10px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview, .study-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side {
    position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center;
    gap: 6px 10px; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--rule);
  }
  .brand { padding: 0; }
  .brand b { display: none; }
  .nav { display: flex; order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; gap: 2px; }
  .nav-label { display: none; }
  .nav a { white-space: nowrap; padding: 6px 10px; }
  .nav a svg { display: none; }
  .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; display: flex; align-items: center; gap: 8px; }
  .who-text { display: none; }
  .seg button span { display: none; }
  main { padding: 20px 16px 60px; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .summary-strip > div:nth-child(3) { border-left: 0; }
  .summary-strip > div:nth-child(n+3) { border-top: 1px solid var(--rule-2); }
}
@media (max-width: 560px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: 1fr; }
  .study-title { font-size: 21px; }
  .paper { grid-template-columns: 28px minmax(0, 1fr); padding-right: 12px; }
  .tile b { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }
