/* REN — one design system. Tokens first, then a small set of components. No per-page overrides. */
:root {
  --ink: #1d2733; --ink-2: #4a5866; --ink-3: #5f6b78; --line: #e3e7ec; --line-2: #cfd6de;
  --bg: #f7f8fa; --surface: #ffffff; --accent: #1f4e79; --accent-2: #2c6aa3; --accent-soft: #e8f0f8;
  --ok: #1e6b46; --ok-soft: #e6f4ec; --warn: #8a5a00; --warn-soft: #fff6dc; --bad: #a3271f; --bad-soft: #fdecea;
  --r: 10px; --r-sm: 6px; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --maxw: 1080px; --tap: 44px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--sans); color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 var(--s3); }
h1 { font-size: 1.75rem; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 var(--s3); }
.serif { font-family: var(--serif); }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid #8fb7de; outline-offset: 2px; border-radius: 4px; }

/* ── layout ── */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-in { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s4); display: flex; align-items: center; gap: var(--s4); min-height: 60px; }
.brand { font-weight: 800; letter-spacing: .04em; color: var(--accent); text-decoration: none; font-size: 1.15rem; display: flex; align-items: center; gap: var(--s2); }
.brand small { font-weight: 500; letter-spacing: 0; color: var(--ink-3); font-size: .8rem; }
.nav { display: flex; gap: var(--s1); flex: 1; }
.nav a { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 var(--s3); border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.nav svg { width: 20px; height: 20px; display: none; }
.topbar-right { display: flex; align-items: center; gap: var(--s2); margin-left: auto; }
.bubble { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700; align-items: center; justify-content: center; }
main { max-width: var(--maxw); margin: 0 auto; padding: var(--s5) var(--s4) var(--s7); }
.footer { border-top: 1px solid var(--line); color: var(--ink-3); font-size: .875rem; }
.footer-in { max-width: var(--maxw); margin: 0 auto; padding: var(--s5) var(--s4); display: flex; gap: var(--s4); flex-wrap: wrap; }
.footer a { color: var(--ink-3); }
/* the tester's guide (pages/beta.js) */
.guide-steps { margin: 0 0 var(--s3); padding-left: 1.4em; display: grid; gap: var(--s2); }
/* fields chosen (fieldPicker in ui.js): plain rows with Remove, the list to pick from only after "+ Add field" */
.field-chosen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.field-chosen li { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: 2px 4px 2px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-weight: 500; }
.field-choose { flex-wrap: nowrap; }
.field-choose .select { flex: 1; min-width: 0; }
.field-picker .field-add { align-self: flex-start; }
.field-picker [hidden] { display: none !important; }
/* an email address shown as text, not a link: one click selects it for copying */
.email { user-select: all; overflow-wrap: anywhere; color: var(--ink); }
.footer .email { color: inherit; }
.page-head { margin-bottom: var(--s5); }
.page-head p { color: var(--ink-2); max-width: 62ch; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--s5); align-items: start; }
.split > *, .grid-2 > *, .grid-3 > *, .stack > * { min-width: 0; }
/* Cards side by side are the same height, and their buttons line up along the bottom. */
.grid-2 > .card, .grid-3 > .card { display: flex; flex-direction: column; }
.grid-2 > .card > :last-child:is(.btn, .row, button), .grid-3 > .card > :last-child:is(.btn, .row, button) { margin-top: auto; align-self: flex-start; }
.stack > * + * { margin-top: var(--s4); }
.stack-sm > * + * { margin-top: var(--s2); }
.row { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
/* a button with a link beside it (Sign in, Forgot password?): kept well apart, product owner 2026-12-03 */
.row-gap { display: flex; gap: var(--s3) var(--s5); align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: var(--s3); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.sticky { position: sticky; top: 76px; }
/* Where you stand (Reviews): a few numbers side by side. */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s4); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4); box-shadow: var(--shadow); }
.stat-num { font-size: 1.9rem; font-weight: 700; line-height: 1.15; color: var(--accent); }
.stat-label { font-weight: 600; margin-top: 2px; }
.stat-sub { color: var(--ink-2); font-size: .875rem; margin-top: 4px; }
.stat.warn { background: var(--warn-soft); border-color: #f0d68a; }
.stat.warn .stat-num { color: var(--warn); }
.stat.ok .stat-num { color: var(--ok); }
#choose, #invitations, #in-progress { scroll-margin-top: 80px; }

/* ── components ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s5); box-shadow: var(--shadow); }
.card.tight { padding: var(--s4); }
.card h2, .card h3 { margin-bottom: var(--s2); }
.card-link { display: block; color: inherit; text-decoration: none; }
.card-link:hover .card { border-color: var(--line-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: var(--tap); padding: 0 var(--s5); border-radius: var(--r-sm); border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; background: var(--accent); color: #fff; }
.btn:hover { background: var(--accent-2); color: #fff; }
.btn.secondary { background: var(--surface); color: var(--accent); border-color: var(--line-2); }
.btn.secondary:hover { background: var(--accent-soft); }
.btn.quiet { background: transparent; color: var(--accent); padding: 0 var(--s3); }
.btn.quiet:hover { background: var(--accent-soft); }
.btn.danger { background: var(--surface); color: var(--bad); border-color: #e9b7b3; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.small { min-height: 36px; padding: 0 var(--s3); font-size: .9rem; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .55; cursor: not-allowed; }
label.field { display: block; font-weight: 600; margin-bottom: var(--s1); }
.hint { color: var(--ink-3); font-size: .875rem; font-weight: 400; margin-top: 2px; }
.hint.ok { color: var(--ok); }
.hint.bad { color: var(--bad); }
.input, .textarea, .select { width: 100%; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px; min-height: var(--tap); }
.textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.textarea.writing { min-height: 52vh; font-family: var(--serif); font-size: 1.06rem; padding: var(--s4); }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent-2); outline: 3px solid #d3e3f3; outline-offset: 0; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--bad); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s2); }
.check { display: flex; align-items: center; gap: var(--s2); min-height: var(--tap); padding: 0 var(--s3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.check:has(input:checked) { border-color: var(--accent-2); background: var(--accent-soft); }
.scale { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s2); }
.scale label { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; font-weight: 700; font-size: 1.15rem; }
.scale input { position: absolute; opacity: 0; pointer-events: none; }
.scale label:has(input:checked) { background: var(--accent); color: #fff; border-color: var(--accent); }
.scale label:has(input:focus-visible) { outline: 3px solid #8fb7de; }
.scale-caption { margin-top: var(--s2); min-height: 1.5em; color: var(--ink-2); font-size: .92rem; }
.banner { border-radius: var(--r-sm); padding: var(--s3) var(--s4); border: 1px solid; }
.banner.info { background: var(--accent-soft); border-color: #c9dcef; }
.banner.ok { background: var(--ok-soft); border-color: #bfe0cd; color: #164f34; }
.banner.warn { background: var(--warn-soft); border-color: #f0dc9c; color: #5f3f00; }
.banner.bad { background: var(--bad-soft); border-color: #f2c4c0; color: #7d1d17; }
.banner p:last-child { margin: 0; }
/* landing page */
ol.gives { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
ol.gives li { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: baseline; }
ol.gives li strong { font-size: 1.4rem; color: var(--accent); }
/* the author's mark on a review, with members' votes and comments */
.mark { background: var(--accent-soft); border: 1px solid #c9dcef; border-radius: var(--r-sm); padding: var(--s3) var(--s4); }
ul.plain { list-style: none; padding: 0; margin: 0; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: .8rem; color: var(--ink-2); }
.tag.accent { background: var(--accent-soft); border-color: #c9dcef; color: var(--accent); }
.tag.ok { background: var(--ok-soft); border-color: #bfe0cd; color: var(--ok); }
.tag.warn { background: var(--warn-soft); border-color: #f0dc9c; color: var(--warn); }
.tags { display: flex; gap: var(--s1); flex-wrap: wrap; }
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line); margin-bottom: var(--s4); overflow-x: auto; }
.tabs button { font: inherit; font-weight: 600; color: var(--ink-3); background: none; border: 0; border-bottom: 3px solid transparent; min-height: var(--tap); padding: 0 var(--s3); cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.empty { text-align: center; padding: var(--s6) var(--s4); color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--surface); }
.empty strong { display: block; color: var(--ink); margin-bottom: var(--s1); }
.skeleton { height: 14px; border-radius: 7px; background: linear-gradient(90deg, #eef1f4, #f6f7f9, #eef1f4); background-size: 200% 100%; animation: shimmer 1.2s infinite; margin: 8px 0; }
@keyframes shimmer { to { background-position: -200% 0; } }
.counter { font-size: .875rem; color: var(--ink-3); }
.counter.ok { color: var(--ok); }
.counter.bad { color: var(--bad); }
.saved { font-size: .875rem; color: var(--ink-3); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-sm); box-shadow: 0 6px 24px rgba(0, 0, 0, .2); z-index: 60; max-width: calc(100% - 32px); }
dialog { border: 0; border-radius: var(--r); padding: var(--s5); max-width: min(560px, calc(100% - 32px)); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); color: var(--ink); }
dialog::backdrop { background: rgba(20, 28, 38, .45); }
.dialog-actions { display: flex; gap: var(--s2); justify-content: flex-end; margin-top: var(--s5); flex-wrap: wrap; }
.paper-title { overflow-wrap: anywhere; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; line-height: 1.35; color: var(--ink); }
.paper-title.big { font-size: 1.9rem; }
.reading { font-family: var(--serif); font-size: 1.06rem; line-height: 1.7; white-space: pre-wrap; max-width: 70ch; overflow-wrap: anywhere; }
.score { display: flex; align-items: baseline; gap: var(--s2); }
.score b { font-size: 2rem; line-height: 1; }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 9.5em 1fr 2.5em; gap: var(--s2); align-items: center; font-size: .875rem; }
.bar span.track { height: 10px; background: var(--bg); border-radius: 5px; overflow: hidden; border: 1px solid var(--line); }
.bar span.fill { display: block; height: 100%; background: var(--accent-2); }
.steps { display: flex; gap: var(--s2); flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 var(--s4); }
.steps li { font-size: .85rem; color: var(--ink-3); padding: 4px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.steps li.done { color: var(--ok); border-color: #bfe0cd; background: var(--ok-soft); }
.steps li.now { color: var(--accent); border-color: #c9dcef; background: var(--accent-soft); font-weight: 600; }
.review { border-left: 3px solid var(--line-2); padding-left: var(--s4); }
.thread { border-left: 2px solid var(--line); margin-left: var(--s3); padding-left: var(--s4); }
.pdf-reader { display: flex; flex-direction: column; gap: var(--s2); }
.pdf-tools { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }
.pdf-tools .row { gap: var(--s1); }
.pdf-zoom { min-width: 3.5em; text-align: center; font-size: .875rem; color: var(--ink-2); }
.pdf-where { font-size: .875rem; color: var(--ink-2); }
/* Tall, and pages as wide as the reader: about half a page shows at a time (product owner, 2026-12-03). */
.pdf-wrap { position: relative; background: #525659; border-radius: var(--r); padding: 12px; height: calc(100vh - 250px); min-height: 380px; overflow: auto; user-select: none; -webkit-user-select: none; }
.pdf-wrap canvas { display: block; margin: 0 auto 12px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.pdf-reader.full { position: fixed; inset: 0; z-index: 60; background: var(--surface); padding: var(--s3); }
.pdf-reader.full .pdf-wrap { height: auto; flex: 1; }
body.pdf-full { overflow: hidden; }
.sticky:has(.pdf-reader.full) { position: static; }
/* Reading and writing side by side (the review editor, a paper's page): wider than the usual page,
   most of it for the paper. */
.wide { margin-inline: calc(50% - min(800px, 50vw - 32px)); }
.split.reader-split { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.split.paper-split { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.hero { padding: var(--s7) 0 var(--s6); }
.hero h1 { font-family: var(--serif); font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 600; max-width: 36ch; text-wrap: balance; }
.hero p { font-size: 1.15rem; color: var(--ink-2); max-width: 56ch; }
.hero .lede { font-size: 1.3rem; margin-top: var(--s3); max-width: 44ch; text-wrap: balance; }
.how { counter-reset: how; }
/* the number sits above the heading with room between them (product owner, 2026-12-04: "too close to the text") */
.how .card::before { counter-increment: how; content: counter(how); width: 30px; height: 30px; margin-bottom: var(--s4); border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .9rem; }
details.faq { border-bottom: 1px solid var(--line); padding: var(--s3) 0; }
details.faq summary { cursor: pointer; font-weight: 600; min-height: 32px; }
details.faq > div { margin-top: var(--s2); color: var(--ink-2); }
.legal h2 { margin-top: var(--s5); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--ink-3); font-weight: 600; }

/* ── phones: bottom tab bar, single column ── */
@media (max-width: 760px) {
  main { padding: var(--s4) var(--s4) var(--s6); }
  /* the menu sits at the bottom of a phone: the footer ends above it */
  .member .footer-in { padding-bottom: calc(var(--s5) + 72px + env(safe-area-inset-bottom)); }
  .grid-2, .grid-3, .split, .split.reader-split, .split.paper-split { grid-template-columns: minmax(0, 1fr); }
  .wide { margin-inline: 0; }
  .sticky { position: static; }
  .card { padding: var(--s4); }
  .brand small { display: none; }
  .member .nav { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--line); justify-content: space-around; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); z-index: 30; }
  .member .nav a { flex-direction: column; gap: 2px; font-size: .7rem; padding: 4px 2px; min-width: 48px; }
  .member .nav svg { display: block; }
  .member .nav .bubble { position: absolute; top: 2px; right: 6px; height: 18px; min-width: 18px; font-size: .68rem; }
  .guest .nav { display: none; }
  .scale label { min-height: 48px; }
  .textarea.writing { min-height: 60vh; }
  .hero { padding: var(--s5) 0; }
  .bar { grid-template-columns: 7.5em 1fr 2em; }
}
#app:focus, #app:focus-visible { outline: none; }

/* suggestions as you type (institution) */
.combo { position: relative; }
.combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px 0; list-style: none; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); box-shadow: 0 6px 20px rgba(16, 24, 40, .14); max-height: 340px; overflow-y: auto; }
.combo-list[hidden] { display: none; }
.combo-opt { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: var(--tap); padding: 6px 12px; cursor: pointer; }
.combo-opt .small { color: var(--ink-3); white-space: nowrap; flex-shrink: 0; }
.combo-opt:hover, .combo-opt[aria-selected="true"] { background: var(--accent-soft); }

/* members list */
.table-scroll { overflow-x: auto; }
.table.members td.num { text-align: right; white-space: nowrap; }
.table.members th:not(:first-child) { text-align: right; min-width: 5.5em; }
.table.members th { vertical-align: bottom; }
.table.members tr.me td { background: var(--accent-soft); }
/* the names stay in view while the numbers scroll sideways (phones) */
.table.members th:first-child, .table.members td:first-child { position: sticky; left: 0; z-index: 1; background: var(--bg); min-width: 200px; max-width: 280px; }
.table.members tr.me td:first-child { background: var(--accent-soft); }
.swipe-hint { display: none; }
@media (max-width: 760px) {
  .table.members th:first-child, .table.members td:first-child { min-width: 150px; box-shadow: 1px 0 0 var(--line); }
  .swipe-hint { display: block; }
}
.legend { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.legend dt { font-weight: 600; }
.legend dd { margin: 0; color: var(--ink-2); }
.table .sort { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; min-height: 32px; }
.table .sort:hover { color: var(--ink); }
.table th[aria-sort="ascending"], .table th[aria-sort="descending"] { color: var(--ink); }

/* the product owner's comments on the site (administrators only, js/ren/feedback.js) */
.fb-layer { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 40; }
.fb-button { margin-left: auto; flex-shrink: 0; font: inherit; font-weight: 600; font-size: .9rem; color: #fff; background: var(--warn); border: 0; border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.fb-button + .topbar-right { margin-left: 0; }
.fb > .fb-button { position: fixed; right: 16px; bottom: 16px; z-index: 55; box-shadow: 0 6px 20px rgba(0, 0, 0, .22); }
.fb-panel { position: fixed; right: 16px; top: 68px; z-index: 55; width: min(360px, calc(100vw - 32px)); max-height: 60vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 10px 32px rgba(16, 24, 40, .2); padding: 14px; }
.fb-panel[hidden] { display: none; }
.fb-bar { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: center; background: var(--warn); color: #fff; font-size: .85rem; font-weight: 600; padding: 6px 16px; }
.fb-bar[hidden] { display: none; }
/* names only the administrator sees (paper.js, adminName) */
.admin-name { font-weight: 600; }
/* the administrator's screenshot test (shotguard.js): the cover is built once and shown by one class,
   so it is drawn at the next frame; nearly opaque at once, blurred behind */
.shot-veil { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; cursor: pointer;
  background: rgba(246, 247, 249, .92); opacity: 0; pointer-events: none; will-change: opacity; }
.shot-veil.on { opacity: 1; pointer-events: auto; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.shot-card { background: var(--surface); border-radius: var(--r); box-shadow: 0 10px 32px rgba(16, 24, 40, .3); padding: 24px 28px; max-width: 440px; text-align: center; }
.shot-card strong { display: block; font-size: 1.2rem; margin-bottom: 8px; }
.shot-card p { margin: 6px 0 0; }
.shot-card .shot-test { margin-top: 14px; }
/* the faint code over every page while signed in (main.js drawMark): above everything but the screenshot
   cover, catching no click */
#ren-mark { position: fixed; inset: 0; z-index: 950; pointer-events: none; background-repeat: repeat; }
.fb-bar .btn { background: #fff; color: var(--ink); flex-shrink: 0; }
.fb-list { margin: 4px 0 0; padding-left: 0; list-style: none; }
.fb-list li { padding: 4px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.fb-pin { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; color: #fff; font: 700 .78rem/22px var(--sans, inherit); text-align: center; padding: 0; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); background: var(--warn); z-index: 41; }
.fb-pin.working { background: var(--accent); }
.fb-pin.done { background: var(--ok); }
.fb-pin.wont { background: var(--ink-3); }
.fb-pin.approx { border-style: dashed; }
.fb-pop { position: absolute; z-index: 56; width: 320px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 10px 32px rgba(16, 24, 40, .22); padding: 12px; }
.fb-pop .textarea { min-height: 90px; }
.fb-answer { background: var(--ok-soft); border-radius: var(--r-sm); padding: 8px 10px; margin-top: 6px; }
.fb-overlay { position: fixed; inset: 0; z-index: 54; cursor: crosshair; background: rgba(138, 90, 0, .04); }
.fb-highlight { position: fixed; z-index: 53; pointer-events: none; outline: 2px solid var(--warn); outline-offset: 1px; background: rgba(255, 246, 220, .35); border-radius: 4px; }
@media (max-width: 760px) {
  .member .fb > .fb-button { bottom: 84px; }
  .fb-panel { max-height: calc(100vh - 160px); }
}

/* "What you can do here" on a paper page (2026-12-03) */
.guide { border-left: 4px solid var(--accent); }
.guide .h3 { font-size: 1.05rem; }
.todo { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.todo li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; font-size: .95rem; }
.todo .tick { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; margin-top: 2px; }
.todo li.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.todo li.done strong { color: var(--ink-3); }
.hello { font-size: .9rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 16ch; align-self: center; }
.cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cover-page { margin: 0; }
.cover-shot { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
dialog { max-height: calc(100vh - 32px); overflow: auto; }
dialog .cover-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-top: var(--s3); }
/* on a phone every tab of a paper stays in view (a second line if needed), none hidden off screen */
@media (max-width: 480px) { .tabs { gap: 0; flex-wrap: wrap; overflow-x: visible; } .tabs button { padding: 0 10px; font-size: .95rem; } }
/* a full menu (the administrator's, or a test account with the Comments button) on a laptop:
   one line per item, the brand's subtitle and then "Hello" give way first */
.nav a { white-space: nowrap; }
@media (min-width: 761px) and (max-width: 1360px) {
  .brand small { display: none; }
  .topbar-in { gap: var(--s3); }
  .nav { gap: 0; }
  .nav a { padding: 0 10px; }
}
@media (min-width: 761px) and (max-width: 1100px) { .hello { display: none; } }
/* signed in, the menu needs the room: the brand's subtitle goes, and nothing in the top bar
   wraps onto a second line (the Comments button, "Hello" and "Sign out" stay whole) */
.member .brand small { display: none; }
.topbar-right .btn, .fb-button { white-space: nowrap; }
@media (min-width: 761px) and (max-width: 960px) { .nav { gap: 2px; } .nav a { padding: 0 6px; font-size: .92rem; } .fb-button { padding: 6px 10px; } .topbar-in { gap: var(--s2); } }
/* phones: the menu at the bottom shares the width equally, and a long label ("Read & rate")
   takes two lines rather than running into its neighbour (the administrator has 7 items) */
@media (max-width: 760px) {
  .member .nav a { flex: 1 1 0; min-width: 0; white-space: normal; text-align: center; line-height: 1.15; }
  .member .nav .bubble { font-size: .75rem; }
  /* the page you are on: its icon is shaded, not the whole item, so the shading never runs into the
     next label (product owner, 2026-12-03: buttons and links not too close to each other) */
  .member .nav svg { box-sizing: content-box; padding: 4px 8px; border-radius: 14px; }
  .member .nav a[aria-current="page"], .member .nav a:hover { background: none; }
  .member .nav a[aria-current="page"] svg { background: var(--accent-soft); }
  /* the administrator's 7 items: the whole width, no gaps, the smallest readable size (11px). Each item
     is as wide as its label needs (a long one takes two lines first) plus 5px each side, so labels stay
     at least 8px apart whatever font the phone has (a wider one put "My papers" 5px from "Reviews") */
  .member .nav:has(> a:nth-child(7)) { gap: 0; padding-inline: 0; }
  .member .nav:has(> a:nth-child(7)) a { flex: 1 1 auto; min-width: auto; font-size: .6875rem; padding-inline: 5px; }
  .member .nav:has(> a:nth-child(7)) svg { padding-inline: 6px; }
}

/* beta testing (/beta/<link>): the tester's accounts, each with its own button */
.beta-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.beta-account { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.beta-account:first-child { border-top: 0; padding-top: 0; }
.beta-account > [aria-live] { flex-basis: 100%; }
.beta-account > [aria-live]:empty { display: none; }
.beta-who { min-width: 0; overflow-wrap: anywhere; }
/* a tester's account: "Hello, Tester X", the test account and "Switch account", under the top bar (2026-12-04) */
.tester-bar { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: center; text-align: center;
  background: var(--accent-soft); border-bottom: 1px solid var(--line); color: var(--ink); font-size: .9rem; padding: 6px 16px; }
.tester-bar .btn { flex-shrink: 0; }
/* the faint code, told once (2026-12-04) */
.mark-notice { background: var(--warn-soft); }
