/* Dake Library — calm editorial workspace. System fonts only; no external requests (CSP: style-src 'self'). */
:root {
  --paper: #fbf8f1;
  --ivory: #f4efe3;
  --card: #fffdf8;
  --ink: #1f2430;
  --navy: #1b2940;
  --navy-deep: #131e30;
  --muted: #5a5e69;
  --rule: #e2dac8;
  --rule-strong: #cfc4ab;
  --gold: #a07d45;
  --gold-soft: #c9ad7c;
  --focus: #2f5f9e;
  --olive: #3f5f2f; --olive-bg: #e6eedb;
  --amber: #7d520e; --amber-bg: #f6e9cf;
  --terra: #93381f; --terra-bg: #f6e0d7;
  --slate: #3f4a5c; --slate-bg: #e5e8ef;
  --inkt: #26344d; --inkt-bg: #e7ebf2;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(27, 41, 64, .05), 0 6px 18px rgba(27, 41, 64, .06);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; }
a { color: var(--navy); text-underline-offset: .18em; }
a:hover { color: #0f1a2c; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.2; font-weight: 600; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; margin-top: 1.1em; }
p { margin: 0 0 .8em; }
ul, ol { padding-left: 1.2rem; }
blockquote { margin: .6rem 0; padding: .4rem .9rem; border-left: 3px solid var(--gold-soft); background: var(--ivory); font-family: var(--serif); }
details > summary { cursor: pointer; font-weight: 600; color: var(--navy); min-height: 32px; display: flex; align-items: center; }
details > summary::-webkit-details-marker { color: var(--gold); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: var(--radius); }
.skip-link:focus { top: .75rem; color: #fff; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.empty { color: var(--muted); font-style: italic; }
.boot, .loading { padding: 3rem 1.5rem; text-align: center; color: var(--muted); }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 42px; padding: .55rem 1.1rem;
  font: 600 .93rem/1.2 var(--sans); letter-spacing: .01em; color: #fff; background: var(--navy); border: 1px solid var(--navy);
  border-radius: var(--radius); text-decoration: none; cursor: pointer; }
.btn:hover { background: #0f1a2c; color: #fff; }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-small { min-height: 36px; padding: .4rem .8rem; font-size: .86rem; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--rule-strong); }
.btn-ghost:hover { background: var(--ivory); color: var(--navy); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover { background: #8a6a37; border-color: #8a6a37; color: #fff; }
.btn-on-dark { background: transparent; border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-on-dark:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .6rem 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--navy); text-decoration: underline; cursor: pointer; font: inherit; }

/* ---------- pills */
.pill { display: inline-block; padding: .18rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; line-height: 1.4; white-space: nowrap; vertical-align: middle; }
.tone-olive { background: var(--olive-bg); color: var(--olive); }
.tone-amber { background: var(--amber-bg); color: var(--amber); }
.tone-terra { background: var(--terra-bg); color: var(--terra); }
.tone-slate { background: var(--slate-bg); color: var(--slate); }
.tone-ink { background: var(--inkt-bg); color: var(--inkt); }
.tone-unknown { background: transparent; color: var(--muted); border: 1px dashed #a39b88; }
.swatch { width: .8rem; height: .8rem; border-radius: 3px; flex: none; }
.swatch.tone-olive { background: var(--olive); } .swatch.tone-amber { background: #c08a2c; } .swatch.tone-terra { background: var(--terra); }
.swatch.tone-slate { background: var(--slate); } .swatch.tone-ink { background: var(--inkt); } .swatch.tone-unknown { background: transparent; }

/* ---------- sign-in page */
.page-auth { background: var(--ivory); min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 1rem 3rem; }
.auth-card { width: min(100%, 560px); background: var(--card); border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow); padding: 2.2rem clamp(1.2rem, 5vw, 2.6rem); }
.auth-brand { display: flex; gap: .8rem; align-items: center; margin-bottom: 1.6rem; }
.brand-mark { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; background: var(--navy); color: var(--gold-soft);
  font: 700 1.35rem/1 var(--serif); flex: none; }
.brand-name { display: block; font: 600 1.15rem/1.2 var(--serif); color: var(--navy); }
.brand-sub { display: block; font-size: .8rem; color: var(--muted); }
.auth-lede { color: var(--muted); font-size: 1.02rem; }
.btn-google { width: 100%; min-height: 50px; font-size: 1rem; margin: .8rem 0 .4rem; }
.g-mark { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: var(--navy); font: 700 .9rem/1 var(--sans); }
.auth-fine { font-size: .85rem; color: var(--muted); }
.auth-notice { padding: .75rem .95rem; border-radius: var(--radius); font-size: .95rem; }
.auth-notice-warn { background: var(--amber-bg); color: #5c3c07; }
.auth-notice-info { background: var(--inkt-bg); color: var(--inkt); }
.auth-romans { margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.auth-romans h2 { font-size: 1.1rem; }
.auth-foot { margin-top: 1.4rem; font-size: .9rem; }

/* ---------- app shell */
.top { background: var(--navy); color: #e9e4d8; position: sticky; top: 0; z-index: 20; }
.top-inner { max-width: 1240px; margin: 0 auto; padding: .6rem 1.25rem; display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.top .brand { display: flex; gap: .65rem; align-items: center; text-decoration: none; color: #fff; }
.top .brand-mark { background: var(--gold); color: #fff; width: 36px; height: 36px; font-size: 1.15rem; }
.top .brand-name { color: #fff; font-size: 1.05rem; }
.top .brand-sub { color: #b9c0cc; }
.top-nav { flex: 1; }
.top-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .15rem; margin: 0; padding: 0; }
.top-nav a { display: block; padding: .5rem .75rem; border-radius: var(--radius); color: #e9e4d8; text-decoration: none; font-weight: 500; font-size: .95rem; }
.top-nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.top-nav a[aria-current="page"] { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 -2px 0 var(--gold-soft); }
.top-nav .nav-romans { color: var(--gold-soft); }
.top :focus-visible { outline-color: var(--gold-soft); }
.who { display: flex; align-items: center; gap: .6rem; }
.who-name { font-size: .9rem; color: #fff; }
.who-role { margin-left: .4rem; font-size: .72rem; padding: .1rem .45rem; border-radius: 999px; background: rgba(201, 173, 124, .25); color: var(--gold-soft); }
.top .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.top .btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.update-bar { position: sticky; top: 58px; z-index: 15; background: var(--amber-bg); color: #4a3105; padding: .5rem 1.25rem; text-align: center; border-bottom: 1px solid #e5cf9f; }
main { outline: none; }
.page { max-width: 1240px; margin: 0 auto; padding: 1.8rem 1.25rem 3rem; }
.page-head { margin-bottom: 1.4rem; max-width: 60rem; }
.eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: .4rem; }
.lede { font-size: 1.08rem; color: var(--muted); }
.foot { max-width: 1240px; margin: 0 auto; padding: 1.5rem 1.25rem 2.5rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--rule); }
.toast { position: fixed; right: 1rem; bottom: 1rem; z-index: 40; max-width: min(92vw, 420px); background: var(--navy); color: #fff; padding: .75rem 1rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.toast-ok { background: var(--olive); }
.toast-warn { background: var(--terra); }
.overlay { position: fixed; inset: 0; background: rgba(19, 30, 48, .55); z-index: 50; display: grid; place-items: center; padding: 1rem; }
.overlay-card { background: var(--card); border-radius: 10px; padding: 1.6rem; max-width: 460px; box-shadow: var(--shadow); }

.block { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 1.2rem 1.35rem; margin: 1.1rem 0; }
.block-head { margin-bottom: .7rem; }
.block-head h2 { margin-bottom: .2rem; }
.block-sub { color: var(--muted); font-size: .92rem; margin: 0; }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 1rem 1.1rem; }
.more { display: inline-block; margin-top: .6rem; font-weight: 600; font-size: .92rem; }
.notice { padding: .8rem 1rem; border-radius: var(--radius); margin: .8rem 0; border-left: 4px solid; }
.notice-warn { background: var(--amber-bg); border-color: #c08a2c; color: #4a3105; }
.notice-info { background: var(--inkt-bg); border-color: var(--inkt); color: var(--inkt); }

/* ---------- home */
.romans-card { background: var(--navy); color: #e3e6ec; border-radius: 12px; padding: clamp(1.3rem, 3vw, 2rem); margin: 0 0 1.3rem; position: relative; overflow: hidden;
  border-top: 4px solid var(--gold); }
.romans-card h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); }
.romans-card .eyebrow { color: var(--gold-soft); }
.romans-card strong { color: #fff; }
.romans-card p { max-width: 52rem; }
.questions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.q-card { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 1.2rem 1.25rem; position: relative; }
.q-num { position: absolute; top: .9rem; right: 1.1rem; font: 600 2rem/1 var(--serif); color: var(--gold-soft); margin: 0; }
.q-card h2 { padding-right: 2rem; }
.q-sub { color: var(--muted); font-size: .92rem; }
.q-rows { list-style: none; padding: 0; margin: .4rem 0; }
.q-row { display: flex; align-items: center; gap: .6rem; padding: .5rem .4rem; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); border-radius: 4px; }
.q-row:hover { background: var(--ivory); }
.q-label { flex: 1; }
.q-count { font: 600 1.15rem/1 var(--serif); color: var(--navy); min-width: 2ch; text-align: right; }
.q-foot { font-size: .84rem; color: var(--muted); margin-top: .6rem; }
.q-big { display: flex; gap: 1.2rem; padding: .6rem 0 .4rem; }
.q-big > div { flex: 1; background: var(--ivory); border-radius: 8px; padding: .55rem .7rem; }
.q-big-num { display: block; font: 600 1.6rem/1.1 var(--serif); color: var(--navy); }
.q-big-label { font-size: .8rem; color: var(--muted); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.two-col .block { margin: 1.1rem 0 0; }
.mini-list { list-style: none; padding: 0; margin: 0; }
.mini-row { display: grid; grid-template-columns: 1fr auto; gap: .1rem .8rem; padding: .6rem .4rem; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); border-radius: 4px; }
.mini-row:hover { background: var(--ivory); }
.mini-title { font-weight: 600; color: var(--navy); }
.mini-meta { grid-column: 1; font-size: .85rem; color: var(--muted); }
.mini-row .pill { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.ws-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: .9rem; }
.ws h3 { margin-top: 0; }
.ws p { font-size: .93rem; }
.activity { list-style: none; padding: 0; margin: 0; }
.activity li { display: grid; grid-template-columns: 11.5rem 1fr; gap: .8rem; padding: .5rem 0; border-bottom: 1px solid var(--rule); font-size: .93rem; }
.activity time { color: var(--muted); font-size: .85rem; }

/* ---------- books list */
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .4rem; }
.tabs button { min-height: 40px; padding: .4rem .85rem; border: 1px solid var(--rule-strong); background: var(--card); color: var(--navy); border-radius: 999px; font: 500 .92rem var(--sans); cursor: pointer; }
.tabs button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.tab-count { margin-left: .45rem; font-size: .8rem; opacity: .8; }
.view-hint { color: var(--muted); font-size: .9rem; }
.filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: .7rem; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: .9rem; margin: .6rem 0 .8rem; }
.field { display: flex; flex-direction: column; gap: .25rem; margin: .4rem 0; }
.field label { font-size: .84rem; font-weight: 600; color: var(--navy); }
.field input, .field select, .field textarea { font: inherit; font-size: .97rem; padding: .5rem .65rem; min-height: 42px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: #fff; color: var(--ink); width: 100%; }
.field textarea { min-height: 90px; resize: vertical; }
.hint { font-size: .82rem; color: var(--muted); margin: .2rem 0 0; }
.chip-row { font-size: .92rem; }
.count { font-size: .88rem; color: var(--muted); }
.list-head, .book-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, .8fr); gap: .8rem; align-items: start; }
.list-head { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 .9rem .4rem; }
.book-list { list-style: none; padding: 0; margin: 0; }
.book-row { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: .85rem .9rem; margin-bottom: .5rem; position: relative; }
.book-row:hover { border-color: var(--gold-soft); }
.br-link { font: 600 1.05rem/1.3 var(--serif); color: var(--navy); text-decoration: none; }
.br-link::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
.br-link:focus-visible { outline: none; }
.br-link:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 2px; }
.br-title { display: flex; flex-direction: column; gap: .2rem; }
.code { font-size: .78rem; color: var(--muted); font-weight: 600; letter-spacing: .05em; }
.alt { font-size: .84rem; color: var(--muted); }
.flags { display: flex; flex-wrap: wrap; gap: .3rem; }
.flag { font-size: .74rem; padding: .08rem .45rem; border-radius: 4px; background: var(--ivory); border: 1px solid var(--rule); color: var(--muted); }
.br-cell { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; font-size: .92rem; }
.br-label { display: none; }
.progress-text { font-size: .82rem; color: var(--muted); }
.chips { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.chip { position: relative; z-index: 1; font-size: .78rem; padding: .12rem .5rem; border-radius: 999px; border: 1px solid var(--rule-strong); background: #fff; text-decoration: none; color: var(--navy); }
.chip:hover { background: var(--ivory); }
.empty-state { text-align: center; padding: 2rem 1rem; background: var(--card); border: 1px dashed var(--rule-strong); border-radius: 10px; }

/* ---------- book detail */
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: .8rem; }
.book-head .flags { margin-top: .3rem; }
.scope-note { background: var(--slate-bg); color: var(--slate); padding: .5rem .8rem; border-radius: var(--radius); display: inline-block; font-size: .92rem; }
.who-bar { display: grid; grid-template-columns: repeat(2, minmax(200px, 280px)) 1fr; gap: .4rem 1rem; align-items: start; background: var(--card);
  border: 1px solid var(--rule); border-radius: 10px; padding: .7rem 1rem; margin-bottom: 1rem; }
.who-meta { color: var(--muted); font-size: .85rem; margin: 1.9rem 0 0; justify-self: end; text-align: right; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 1.1rem 1.2rem; }
.panel > h2 { display: flex; align-items: center; gap: .55rem; font-size: 1.2rem; }
.panel-num { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--navy); color: var(--gold-soft); font-size: .95rem; flex: none; }
.panel h3 { font-family: var(--sans); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 1rem 0 .4rem; }
.listings { list-style: none; padding: 0; margin: 0; }
.listing { border: 1px solid var(--rule); border-radius: 8px; padding: .6rem .75rem; margin-bottom: .6rem; }
.listing details p { font-size: .87rem; }
.callout { background: var(--ivory); border-radius: 8px; padding: .3rem .8rem .5rem; margin-top: .8rem; }
.callout h3 { margin-top: .6rem; }
.callout li { font-size: .9rem; }
.link-list { list-style: none; padding: 0; }
.link-list li { padding: .25rem 0; font-size: .93rem; }
.cl-group h3 { font-family: var(--sans); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.cl-items { list-style: none; padding: 0; margin: 0; }
.cl-item { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .5rem .6rem; border-bottom: 1px solid var(--rule); border-left: 4px solid transparent; }
.cl-done { border-left-color: var(--olive); background: #f3f7ee; }
.cl-in_progress { border-left-color: #c08a2c; background: #fcf7ec; }
.cl-fact { border-left-color: var(--olive); }
.cl-label { flex: 1; }
.cl-meta { display: block; font-size: .78rem; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden; flex: none; }
.seg button { min-height: 36px; padding: .3rem .65rem; border: 0; border-right: 1px solid var(--rule-strong); background: #fff; color: var(--ink); font: 500 .82rem var(--sans); cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"].seg-not_started { background: var(--slate-bg); color: var(--slate); font-weight: 700; }
.seg button[aria-pressed="true"].seg-in_progress { background: var(--amber-bg); color: var(--amber); font-weight: 700; }
.seg button[aria-pressed="true"].seg-done { background: var(--olive); color: #fff; font-weight: 700; }
.seg button:disabled { cursor: progress; opacity: .6; }
.evidence { white-space: pre-wrap; }
.check { display: flex; gap: .4rem; align-items: flex-start; }
.notes { list-style: none; padding: 0; margin: 0 0 .8rem; }
.note { border-left: 3px solid var(--gold-soft); padding: .4rem .8rem; margin-bottom: .7rem; background: #fffefb; }
.note-imported { border-left-style: dashed; }
.note-meta { font-size: .84rem; color: var(--muted); margin-bottom: .2rem; }
.note-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.audit summary { font-family: var(--serif); font-size: 1.1rem; }

/* ---------- decisions */
.decision-list { list-style: none; padding: 0; display: grid; gap: .8rem; }
.decision-top { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.decision h2 a { text-decoration: none; }

/* ---------- Romans */
.checks { list-style: none; padding: 0; margin: 0; }
.check-item { display: flex; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid var(--rule); }
.check-mark { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; flex: none; font-weight: 700; }
.is-ok .check-mark { background: var(--olive); color: #fff; }
.is-open .check-mark { border: 2px solid var(--rule-strong); color: var(--muted); }
.check-title { font-weight: 600; margin-bottom: .1rem; }
.page-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.page-tile { display: flex; flex-direction: column; padding: .55rem .7rem; border: 1px solid var(--rule); border-radius: 8px; background: #fff; text-decoration: none; color: var(--ink); font-size: .9rem; }
.page-tile.is-ok { border-color: var(--olive); background: #f3f7ee; }
.pt-num { font: 600 1.05rem var(--serif); color: var(--navy); }
.reading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; margin: 1rem 0; }
.scan-wrap { max-height: 75vh; overflow: auto; border: 1px solid var(--rule); border-radius: 6px; background: #eee; }
.scan { width: 100%; height: auto; display: block; }
.transcription { font-family: var(--serif); font-size: 1.05rem; line-height: 1.75; white-space: pre-wrap; max-height: 75vh; overflow: auto; padding: .4rem .2rem; }
.mark { font: inherit; color: inherit; border: 0; padding: 0 .1em; border-radius: 3px; cursor: pointer; background: #fbefb5; border-bottom: 2px solid #d9b62b; }
.mark.orange { background: #fbdcb8; border-bottom-color: #d9822b; }
.mark.red { background: #f6c9c0; border-bottom-color: #c0392b; }
.mark.missing { background: #e4e0f2; border-bottom-color: #6a5acd; }
.mark.resolved { background: #e3eed9; border-bottom-color: var(--olive); }
.mark.selected { outline: 2px solid var(--focus); }
.mark sup { font-family: var(--sans); font-size: .65em; margin-left: .1em; color: var(--muted); }
.review-grid { display: grid; grid-template-columns: minmax(200px, 280px) 1fr; gap: 1rem; }
.issue-list { list-style: none; padding: 0; margin: 0; max-height: 70vh; overflow: auto; }
.issue-list button { width: 100%; text-align: left; padding: .5rem .6rem; margin-bottom: .3rem; border: 1px solid var(--rule); border-radius: 6px; background: #fff; cursor: pointer; font: inherit; }
.issue-list button[aria-pressed="true"] { border-color: var(--navy); background: var(--inkt-bg); }
.evidence-box { background: var(--ivory); border-radius: 8px; padding: .5rem .8rem; margin-bottom: .6rem; }
.review-forms { border-top: 1px solid var(--rule); padding-top: .6rem; margin-top: .6rem; }
.review-status { border: 1px solid var(--rule); padding: 1rem; border-radius: 8px; margin-bottom: 1rem; }
.review-status p { margin-bottom: 0; }
.discussion blockquote { white-space: pre-wrap; }
.mobile-reading-tabs { display: none; }
#review-actions { scroll-margin-top: 1rem; }
.mark.resolved { background: #dcebdc; color: #24432a; border-bottom: 2px solid #406c47; }
.discussion, .reading > *, .review-forms { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .mobile-reading-tabs { display: flex; }
  .mobile-reading-tabs .btn { flex: 1; min-height: 48px; }
  .mobile-view-text > :first-child, .mobile-view-original > :last-child { display: none; }
  .transcription { max-height: none; }
  .issue-list { display: flex; overflow-x: auto; gap: .5rem; padding-bottom: .5rem; }
  .issue-list li { flex: 0 0 150px; }
  .review-forms textarea, .review-forms select { font-size: 16px; width: 100%; }
  .review-forms .btn { min-height: 48px; width: 100%; white-space: normal; }
}

/* ---------- help */
.help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.help-group dl { margin: 0; }
.help-group dt { margin-top: .6rem; }
.help-group dd { margin: .2rem 0 0; font-size: .9rem; color: var(--muted); }

/* ---------- responsive */
@media (max-width: 1080px) {
  .questions, .three, .help-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .field-search { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .two-col, .reading, .review-grid { grid-template-columns: 1fr; }
  .list-head { display: none; }
  .book-row { grid-template-columns: 1fr 1fr; }
  .br-title { grid-column: 1 / -1; }
  .br-label { display: block; width: 100%; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .who-bar { grid-template-columns: 1fr; }
  .who-meta { justify-self: start; text-align: left; }
  .top-nav { order: 3; flex-basis: 100%; }
  .update-bar { top: 0; position: relative; }
  .top { position: relative; }
  .activity li { grid-template-columns: 1fr; gap: .1rem; }
}
@media (max-width: 520px) {
  .filters { grid-template-columns: 1fr; }
  .book-row { grid-template-columns: 1fr; }
  .cl-item { flex-direction: column; align-items: stretch; }
  .seg { width: 100%; }
  .seg button { flex: 1; }
  .q-big { flex-direction: column; gap: .5rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .top, .foot, .toast, .update-bar, .btn, .seg { display: none !important; } .block, .panel { break-inside: avoid; } }
/* Headings receive focus on navigation (for screen readers). No ring after mouse navigation; a visible ring when the browser judges focus keyboard-driven. */
h1[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
h1[tabindex="-1"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.via { color: var(--muted); font-size: .8rem; }
