/* Silverfish site. Needs brand/tokens/tokens.css and brand/motion/motion.css (used as given).
   Paper and ink, lamp green as the one accent, oxblood only for "no". Lora for reading, Source
   Sans 3 for controls. Phone: one column and a tab bar. From 960px: a rail. From 1100px: the
   night becomes a list and a reading pane, voted from the keyboard or the mouse. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--sf-bg); color: var(--sf-text);
  font: var(--sf-weight-ui) var(--sf-size-sm)/1.45 var(--sf-font-ui);
  -webkit-font-smoothing: antialiased; min-height: 100dvh;
  /* A word longer than its line (LaTeX source, a formula, a URL, a chemical name) breaks rather than
     pushing the page wider than a phone (round 6 item 82). */
  overflow-wrap: break-word;
}
a { color: var(--sf-accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--sf-accent-strong); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sf-focus); outline-offset: 2px; border-radius: 6px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: var(--sf-icon-stroke); stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-sm { width: 18px; height: 18px; }
[hidden] { display: none !important; }

/* ---- the frame ---------------------------------------------------------------------------- */
.app { min-height: 100dvh; }
.main { padding: 0 var(--sf-space-4) calc(88px + env(safe-area-inset-bottom)); max-width: 44rem; margin: 0 auto; }
/* A swiped card flies off the side of the screen. Without this its overhang widens the page, and a
   phone zooms its layout out for that moment: the tab bar and everything fixed jump, and the tour's
   spotlight is measured against the zoomed page (round 1, phase C: "half the screen highlighted").
   clip, not hidden: it makes no scroll box, so sticky bars keep working. */
.main { overflow-x: clip; overflow-clip-margin: var(--sf-space-4); }
.top {
  display: flex; align-items: center; gap: var(--sf-space-3); min-height: 64px;
  padding-top: env(safe-area-inset-top);
}
.top .mark { width: 28px; height: 28px; color: var(--sf-accent); flex: none; }
.top h1 { margin: 0; font: var(--sf-weight-display) var(--sf-size-xl)/1.2 var(--sf-font-display); flex: 1; min-width: 0; }
.top .meta { color: var(--sf-muted); font-size: var(--sf-size-xs); text-align: right; }
.top .meta a { font-weight: var(--sf-weight-ui-strong); font-size: var(--sf-size-sm); text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }

.tabs {
  position: fixed; inset: auto 0 0 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--sf-bg) 94%, transparent); backdrop-filter: blur(8px);
  border-top: var(--sf-hairline) solid var(--sf-line); padding-bottom: env(safe-area-inset-bottom);
}
.tabs a {
  display: grid; justify-items: center; gap: 2px; padding: 8px 0 10px; text-decoration: none;
  color: var(--sf-muted); font-size: var(--sf-size-xs); min-height: 56px;
}
.tabs a[aria-current="page"] { color: var(--sf-accent); font-weight: var(--sf-weight-ui-strong); }
.rail { display: none; }

@media (min-width: 960px) {
  /* Only the signed-in frame has a rail; the loader and the outside screens use the full width
     (items 2, 4, 5: they sat in the rail's 232px column at a desk). */
  .app:has(> .rail) { display: grid; grid-template-columns: 232px minmax(0, 1fr); }
  .tabs { display: none; }
  .rail {
    display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100dvh;
    padding: var(--sf-space-5) var(--sf-space-3); border-right: var(--sf-hairline) solid var(--sf-line);
  }
  .rail .home { display: flex; align-items: center; gap: 10px; padding: 0 12px 20px; color: var(--sf-text); text-decoration: none;
    font: var(--sf-weight-display) var(--sf-size-lg)/1 var(--sf-font-display); }
  .rail .home svg { width: 28px; height: 28px; color: var(--sf-accent); }
  .rail a.nav {
    display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--sf-radius-pill);
    color: var(--sf-text); text-decoration: none; font-size: var(--sf-size-sm);
  }
  .rail a.nav .ic { color: var(--sf-muted); }
  .rail a.nav:hover { background: var(--sf-sunken); }
  .rail a.nav[aria-current="page"] { background: var(--sf-accent-soft); color: var(--sf-accent); font-weight: var(--sf-weight-ui-strong); }
  .rail a.nav[aria-current="page"] .ic { color: var(--sf-accent); }
  .rail .grow { flex: 1; }
  .rail .who { padding: 12px; color: var(--sf-muted); font-size: var(--sf-size-xs); overflow-wrap: anywhere; }
  .main { padding: 0 var(--sf-space-6) var(--sf-space-7); max-width: 76rem; margin: 0; width: 100%; }
  .main.wide { max-width: none; }
  .top { min-height: 88px; }
  .top .mark { display: none; }
  .top h1 { font-size: var(--sf-size-2xl); }
}
@media (min-width: 1500px) { .main { padding-left: var(--sf-space-7); } }

/* ---- type ---------------------------------------------------------------------------------- */
.display { font: var(--sf-weight-display) var(--sf-size-2xl)/1.15 var(--sf-font-display); margin: var(--sf-space-2) 0 var(--sf-space-2); }
.lede { color: var(--sf-muted); font-size: var(--sf-size-sm); margin: 0 0 var(--sf-space-5); max-width: 36rem; }
.lede b { color: var(--sf-text); font-weight: var(--sf-weight-ui-strong); }
h2.section { font: var(--sf-weight-display) var(--sf-size-xl)/1.2 var(--sf-font-display); margin: var(--sf-space-6) 0 var(--sf-space-1); }
.section-note { color: var(--sf-muted); margin: 0 0 var(--sf-space-4); max-width: 36rem; }
.eyebrow { color: var(--sf-accent); font-weight: var(--sf-weight-ui-strong); margin: 0 0 var(--sf-space-1); }
.muted { color: var(--sf-muted); }
.small { font-size: var(--sf-size-xs); }
.reading { font: var(--sf-weight-text) var(--sf-size-md)/var(--sf-leading-text) var(--sf-font-text); }
@media (min-width: 960px) { .display { font-size: 40px; } }

/* ---- controls ------------------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--sf-tap);
  padding: 0 20px; border-radius: var(--sf-radius-pill); border: 1px solid var(--sf-line-strong);
  background: var(--sf-surface); color: var(--sf-text); font-weight: var(--sf-weight-ui-strong);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--sf-text); color: var(--sf-text); }
.btn.primary { background: var(--sf-accent); border-color: var(--sf-accent); color: var(--sf-on-accent); }
.btn.primary:hover { background: var(--sf-accent-strong); border-color: var(--sf-accent-strong); color: var(--sf-on-accent); }
.btn.no { color: var(--sf-no); border-color: var(--sf-no); background: transparent; }
.btn.no:hover { background: var(--sf-no-soft); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--sf-accent); padding: 0 12px; }
.btn.quiet:hover { background: var(--sf-sunken); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn kbd { font: 600 var(--sf-size-xs)/1 var(--sf-font-ui); opacity: .75; }
.row { display: flex; flex-wrap: wrap; gap: var(--sf-space-2); align-items: center; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }

.chip {
  white-space: nowrap; flex: none;
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: var(--sf-radius-pill);
  background: var(--sf-sunken); border: 1px solid transparent; cursor: pointer; font-size: var(--sf-size-sm); color: var(--sf-text);
}
.chip:hover { border-color: var(--sf-line-strong); }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--sf-accent-soft); border-color: var(--sf-accent); color: var(--sf-accent); font-weight: var(--sf-weight-ui-strong); }
.chip .k { font-size: var(--sf-size-xs); color: var(--sf-muted); }
.chips { display: flex; flex-wrap: wrap; gap: var(--sf-space-2); }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--sf-space-4)); padding: 2px var(--sf-space-4) 6px; scrollbar-width: none; }
@media (min-width: 960px) { .chips.scroll { flex-wrap: wrap; margin: 0; padding: 0; } }

.pill { display: inline-flex; align-items: center; padding: 2px 12px; border-radius: var(--sf-radius-pill); font-size: var(--sf-size-xs); font-weight: var(--sf-weight-ui-strong); white-space: nowrap; }
.pill.yes { background: var(--sf-accent-soft); color: var(--sf-accent); }
.pill.no { background: var(--sf-no-soft); color: var(--sf-no); }
.pill.quiet { background: var(--sf-sunken); color: var(--sf-muted); }

.field { display: grid; gap: 6px; margin: 0 0 var(--sf-space-4); }
.field label, .label { font-weight: var(--sf-weight-ui-strong); }
.field .help { color: var(--sf-muted); font-size: var(--sf-size-xs); }
.input, textarea.input {
  width: 100%; min-height: var(--sf-tap); padding: 10px 14px; border-radius: var(--sf-radius-sm);
  border: 1px solid var(--sf-line-strong); background: var(--sf-surface); font-size: 16px;
}
textarea.input { min-height: 9rem; resize: vertical; font: var(--sf-weight-text) var(--sf-size-md)/1.5 var(--sf-font-text); }
textarea.input.code { font: 13px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; min-height: 12rem; }
.search {
  display: flex; align-items: center; gap: 10px; padding: 0 16px; min-height: 48px; border-radius: var(--sf-radius-pill);
  border: 1px solid var(--sf-line-strong); background: var(--sf-surface); margin: 0 0 var(--sf-space-3);
}
.search input { border: 0; background: transparent; flex: 1; min-width: 0; font-size: 16px; padding: 10px 0; outline: none; }
.search:focus-within { outline: 2px solid var(--sf-focus); outline-offset: 2px; }

.note { padding: var(--sf-space-3) var(--sf-space-4); border-radius: var(--sf-radius-sm); background: var(--sf-sunken); margin: 0 0 var(--sf-space-4); display: flex; gap: 10px; align-items: flex-start; }
.note.no { background: var(--sf-no-soft); color: var(--sf-text); }
.note.no .ic { color: var(--sf-no); }
.error-line { color: var(--sf-no); margin: var(--sf-space-2) 0; }
.error-line button { all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---- the paper ----------------------------------------------------------------------------- */
.papers { display: grid; gap: var(--sf-space-3); }
.papers > *, .cardgroup > *, .paper, .dcard { min-width: 0; }
/* A title that is one long run of letters (a paste, a formula) breaks rather than leaving its card. */
.dcard h3, .icard h3 { overflow-wrap: anywhere; }
.main:focus { outline: none; }
.paper {
  position: relative; background: var(--sf-surface); border: 1px solid var(--sf-line); border-radius: var(--sf-radius-card);
  box-shadow: var(--sf-shadow-card); padding: var(--sf-space-4) var(--sf-space-4) var(--sf-space-3);
}
.paper h3 { margin: 0; font: var(--sf-weight-text) var(--sf-size-md)/1.35 var(--sf-font-text); }
.paper h3 button { all: unset; cursor: pointer; display: block; }
.paper h3 button:focus-visible { outline: 2px solid var(--sf-focus); outline-offset: 4px; border-radius: 4px; }
.meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 6px; color: var(--sf-muted); font-size: var(--sf-size-xs); }
.meta .card { color: var(--sf-accent); font-weight: var(--sf-weight-ui-strong); }
/* The closed paper's last row: Open online, then Pass and Keep (round 7, item 86). */
.paper .foot { display: flex; align-items: center; gap: var(--sf-space-2); margin-top: var(--sf-space-2); min-height: var(--sf-tap); }
.paper .open { margin-right: auto; min-height: var(--sf-tap); flex: none; white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; font-weight: var(--sf-weight-ui-strong); font-size: var(--sf-size-xs); text-decoration: none; padding: 8px 0; }
.paper .detail { padding-top: var(--sf-space-3); }
.paper .authors { color: var(--sf-muted); font-size: var(--sf-size-xs); margin: 0 0 var(--sf-space-3); }
.abstract { font: var(--sf-weight-text) var(--sf-size-md)/var(--sf-leading-text) var(--sf-font-text); margin: 0 0 var(--sf-space-4); overflow-wrap: break-word; }
.abstract.none { color: var(--sf-muted); font-style: italic; }
/* The card's checks: "Looks for" and "Leaves out", the answer as a pill coloured by fit (round 1). */
.why-box { margin: 0 0 var(--sf-space-3); padding: var(--sf-space-3) 0 0; border-top: 1px solid var(--sf-line); display: grid; gap: 6px; }
.why-group { margin: 4px 0 0; font-size: var(--sf-size-xs); color: var(--sf-muted); }
.why { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.why li { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; font-size: var(--sf-size-xs); color: var(--sf-text); line-height: 1.45; }
.why .v { font-weight: var(--sf-weight-ui-strong); border-radius: var(--sf-radius-pill); padding: 1px 10px; white-space: nowrap; }
.why .v.good { background: var(--sf-accent-soft); color: var(--sf-accent); }
.why .v.bad { background: var(--sf-no-soft); color: var(--sf-no); }
.why .v.unclear { background: var(--sf-sunken); color: var(--sf-muted); }
.paper .authors.first { margin: 4px 0 0; }
.why-title { font-size: var(--sf-size-xs); font-weight: var(--sf-weight-ui-strong); margin: 0; }
.paper .votebar { display: flex; gap: var(--sf-space-2); }
.paper .votebar .btn { padding: 0 18px; }

/* swipe tint and the pill that names it (motion.css moves the card) */
.paper .say { position: absolute; top: 14px; right: 14px; opacity: 0; transition: opacity var(--sf-dur-fast) var(--sf-ease); pointer-events: none; }
.paper.toward-yes { background: var(--sf-accent-soft); border-color: var(--sf-accent); }
.paper.toward-no { background: var(--sf-no-soft); border-color: var(--sf-no); }
.paper.toward-yes .say.yes, .paper.toward-no .say.no { opacity: 1; }
.say { border: 1.5px solid currentColor; background: var(--sf-surface); border-radius: var(--sf-radius-pill); padding: 3px 14px; font-weight: var(--sf-weight-ui-strong); font-size: var(--sf-size-xs); }
.say.yes { color: var(--sf-accent); }
.say.no { color: var(--sf-no); }

/* a voted paper folds to one line */
/* The title on the first line with all of its room; the pill and Undo under it (item 54). */
.paper.voted { padding: 10px var(--sf-space-4) 6px; box-shadow: none; background: transparent; display: grid; gap: 2px; }
.paper.voted .t { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: var(--sf-weight-text) var(--sf-size-sm)/1.4 var(--sf-font-text); color: var(--sf-muted); text-align: left; }
.paper.voted button.t { all: unset; display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: var(--sf-weight-text) var(--sf-size-sm)/1.4 var(--sf-font-text); color: var(--sf-muted); cursor: pointer; }
.paper.voted button.t:focus-visible { outline: 2px solid var(--sf-focus); outline-offset: 3px; border-radius: 4px; }
.paper.voted.expanded .t { white-space: normal; overflow: visible; }
.paper.voted .vrow { display: flex; align-items: center; gap: 12px; min-width: 0; }
.paper.voted .vrow .pill { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.paper.voted .undo { all: unset; cursor: pointer; color: var(--sf-accent); font-weight: var(--sf-weight-ui-strong); font-size: var(--sf-size-xs); display: inline-flex; align-items: center; min-height: var(--sf-tap); padding: 0 var(--sf-space-3); margin: -5px calc(-1 * var(--sf-space-3)) -5px auto; }
.paper.voted .undo:focus-visible { outline: 2px solid var(--sf-focus); outline-offset: 2px; border-radius: 4px; }
.paper.voted.kept .t, .paper.voted.kept button.t { color: var(--sf-text); }
.paper.voted .t a { color: inherit; text-decoration: none; }
/* A vote slides the card out toward its side and the folded row in from it (item 9). */
.paper.slide-out-right { transform: translateX(48px); opacity: 0; transition: transform 170ms var(--sf-ease), opacity 170ms var(--sf-ease); }
.paper.slide-out-left { transform: translateX(-48px); opacity: 0; transition: transform 170ms var(--sf-ease), opacity 170ms var(--sf-ease); }
.paper.voted.fold-in.from-right { animation: sf-in-right var(--sf-dur) var(--sf-ease-out) both; }
.paper.voted.fold-in.from-left { animation: sf-in-left var(--sf-dur) var(--sf-ease-out) both; }
@keyframes sf-in-right { from { opacity: 0; transform: translateX(28px); } }
@keyframes sf-in-left { from { opacity: 0; transform: translateX(-28px); } }
/* After a vote the page moves on (round 8): the voted row to the top, the next paper settles in as on arrival. */
.paper.voted { scroll-margin-top: var(--sf-space-3); }
.paper.is-next { animation: sf-arrive var(--sf-dur-slow) var(--sf-ease-out) both; }
/* The swipe leaves with a clear tilt (item 12); motion.css keeps its own for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .sf-swipe.is-yes { transform: translateX(130%) rotate(14deg); }
  .sf-swipe.is-no { transform: translateX(-130%) rotate(-14deg); }
}
.paper.voted[data-act="expand"], .paper.sf-swipe { cursor: pointer; }
.paper.voted.unsaved { border-color: var(--sf-no); }

.hint { text-align: center; color: var(--sf-muted); font-size: var(--sf-size-xs); margin: var(--sf-space-3) 0 0; }

/* the ending of a night */
.ending { margin: var(--sf-space-7) 0 var(--sf-space-5); text-align: center; }
.ending .rule { display: flex; align-items: center; gap: var(--sf-space-3); color: var(--sf-line-strong); }
.ending .rule::before, .ending .rule::after { content: ""; flex: 1; height: 1px; background: var(--sf-line); }
.ending .rule svg { width: 56px; height: 56px; color: var(--sf-muted); margin: -12px 0; }
.ending p { font: italic var(--sf-weight-text) var(--sf-size-md)/1.4 var(--sf-font-text); color: var(--sf-muted); margin: var(--sf-space-3) 0 0; }
/* Three columns of equal sides, so "All nights" sits in the middle of its pane whatever the dates' lengths (item 53). */
.daynav { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--sf-space-3); margin: var(--sf-space-4) 0; }
.daynav > :last-child { justify-self: end; text-align: right; }
.daynav.one { display: flex; justify-content: center; }
.daynav a { text-decoration: none; font-weight: var(--sf-weight-ui-strong); display: inline-flex; gap: 6px; align-items: center; padding: 10px 0; }

/* an empty night: the loudest moment */
.empty-night { text-align: center; padding: var(--sf-space-5) 0 var(--sf-space-3); }
.empty-night .mark { width: 140px; height: 140px; color: var(--sf-accent); }
.empty-night h2 { font: var(--sf-weight-display) 30px/1.2 var(--sf-font-display); margin: var(--sf-space-4) auto var(--sf-space-2); max-width: 22ch; }
.empty-night p { color: var(--sf-muted); max-width: 30rem; margin: 0 auto; font-size: var(--sf-size-md); }
@media (min-width: 960px) { .empty-night .mark { width: 160px; height: 160px; } .empty-night h2 { font-size: 40px; } }
.closest { border-style: dashed; box-shadow: none; }
.closest .which { color: var(--sf-muted); font-size: var(--sf-size-xs); margin: 0 0 6px; }
.closest .nothing { font: italic var(--sf-weight-text) var(--sf-size-md)/1.4 var(--sf-font-text); color: var(--sf-muted); margin: 0; }

/* Round 4 (D62): "Belongs on …" after a pass. On the folded row one quiet button, or the chosen
   card; the choice opens under the row. In the reading pane every other card, each in its ink. */
.paper.voted .routes-open { all: unset; cursor: pointer; color: var(--sf-muted); font-size: var(--sf-size-xs); padding: 8px 4px; white-space: nowrap; }
.paper.voted .routes-open:hover { color: var(--sf-text); }
.paper.voted .routes-open:focus-visible { outline: 2px solid var(--sf-focus); outline-offset: 2px; border-radius: 4px; }
.chip.route { min-height: 32px; padding: 0 12px; font-size: var(--sf-size-xs); max-width: 100%; min-width: 0; }
.chip.route .ink-dot { margin-right: 0; flex: none; }
.chip.route .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chip.route[aria-pressed="true"] { background: var(--sf-surface); border-color: var(--ink); color: var(--sf-text); }
.paper.voted .vrow .chip.route { flex: 0 1 auto; }
.paper.voted .chips.routes { margin: 4px 0 6px; }
.routes-box { margin: 0 0 var(--sf-space-5); padding: var(--sf-space-4); border-radius: var(--sf-radius-sm); background: var(--sf-bg); }
.routes-box .label { margin: 0 0 2px; }
.routes-box p.small { margin: 0 0 var(--sf-space-3); }

/* A toast is as wide as its words, up to the screen less its margins (round 4: sized from left: 50%,
   a long one got half a phone screen and wrapped into a ball). */
.toast {
  position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50;
  background: var(--sf-text); color: var(--sf-bg); padding: 10px 18px; border-radius: 22px;
  display: flex; gap: 14px; align-items: center; width: max-content; max-width: calc(100vw - 32px); box-sizing: border-box; font-size: var(--sf-size-sm);
  touch-action: none; user-select: none; cursor: grab;
}
.toast button { all: unset; cursor: pointer; font-weight: var(--sf-weight-ui-strong); color: var(--sf-accent-soft); }
@media (min-width: 960px) { .toast { bottom: var(--sf-space-5); } }

/* ---- the night at a desk: list and reading pane ------------------------------------------- */
.desk { display: block; }
.reader { display: none; }
/* Reopening the reading pane is a desk control; on a phone there is no pane (found in phase C's re-read). */
.reader-open { display: none; }
@media (min-width: 1100px) {
  /* Item 8: the page itself does not scroll; the list and the reading pane each scroll in their own
     column with a quiet scrollbar, the list can be dragged wider, and the reading pane closed. */
  .main.desk-main { max-width: none; padding-right: 0; padding-bottom: 0; height: 100dvh; overflow: hidden; }
  .desk { display: grid; grid-template-columns: var(--list-w, 440px) 9px minmax(0, 1fr); gap: 0; height: 100dvh; }
  .desk .list, .reader { height: 100dvh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--sf-line) transparent; }
  .desk .list { padding-right: var(--sf-space-4); padding-bottom: var(--sf-space-7); }
  .reader { display: block; padding: var(--sf-space-6) var(--sf-space-6) var(--sf-space-7); background: var(--sf-surface); }
  .desk .gutter { cursor: col-resize; border-left: 1px solid var(--sf-line); background: transparent; position: relative; z-index: 2; margin-right: -8px; touch-action: none; }
  .desk .gutter:hover, .desk .gutter.dragging, .desk .gutter:focus-visible { background: linear-gradient(to right, var(--sf-accent) 0 2px, transparent 2px); outline: none; }
  .reader .reader-close { float: right; margin: -8px -8px 0 12px; color: var(--sf-muted); }
  .desk .reader-open { display: none; }
  .desk.no-reader { grid-template-columns: minmax(0, 1fr); }
  .desk.no-reader .reader, .desk.no-reader .gutter { display: none; }
  .desk.no-reader .list { width: 100%; max-width: 54rem; margin: 0 auto; padding-right: var(--sf-space-6); }
  .desk.no-reader .reader-open { display: inline-flex; position: fixed; bottom: var(--sf-space-5); right: var(--sf-space-5); z-index: 5; box-shadow: var(--sf-shadow-card); }
  .reader .inner { max-width: 46rem; margin: 0 auto; }
  .reader h2 { font: var(--sf-weight-display) 28px/1.25 var(--sf-font-display); margin: 0 0 var(--sf-space-3); }
  .reader .meta { font-size: var(--sf-size-sm); }
  .reader .authors { color: var(--sf-muted); margin: var(--sf-space-3) 0 var(--sf-space-5); }
  .reader .abstract { font-size: 18px; line-height: 1.65; }
  .reader .votes { display: flex; gap: var(--sf-space-2); align-items: center; margin: 0 0 var(--sf-space-5); flex-wrap: wrap; }
  .reader .votes .btn { min-height: 48px; padding: 0 24px; }
  .reader .open { display: inline-flex; gap: 4px; align-items: center; font-weight: var(--sf-weight-ui-strong); text-decoration: none; margin-left: 8px; }
  .reader .state { margin: 0 0 var(--sf-space-5); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
  .reader .keys { color: var(--sf-muted); font-size: var(--sf-size-xs); margin-top: var(--sf-space-6); border-top: 1px solid var(--sf-line); padding-top: var(--sf-space-3); }
  .reader .keys kbd { font: 600 var(--sf-size-xs)/1 var(--sf-font-ui); border: 1px solid var(--sf-line-strong); border-bottom-width: 2px; border-radius: 6px; padding: 2px 6px; margin: 0 2px; color: var(--sf-text); }
  .reader .placeholder { color: var(--sf-muted); text-align: center; margin-top: 30vh; }
  /* in the list, a paper is a row you select */
  .desk:not(.no-reader) .paper { cursor: pointer; padding: 14px 16px; box-shadow: none; }
  .desk:not(.no-reader) .paper .detail, .desk:not(.no-reader) .paper .foot, .desk:not(.no-reader) .paper .say { display: none; }
  .desk .paper.selected { border-color: var(--sf-accent); box-shadow: inset 3px 0 0 var(--sf-accent); background: var(--sf-surface); }
  .desk .paper.voted { padding: 8px 16px; }
  .desk .paper.voted.selected { background: var(--sf-sunken); }
  .desk:not(.no-reader) .hint.swipe { display: none; }
}
@media (min-width: 1500px) {
  .desk { --list-w: 480px; }
  .reader { padding-left: var(--sf-space-7); padding-right: var(--sf-space-7); }
}

/* ---- lists: library, search, past nights --------------------------------------------------- */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { border-bottom: 1px solid var(--sf-line); }
.lrow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 14px 0; align-items: start; }
.lrow .t { font: var(--sf-weight-text) var(--sf-size-md)/1.35 var(--sf-font-text); margin: 0; }
.lrow .t a { color: var(--sf-text); text-decoration: none; }
.lrow .t a:hover { text-decoration: underline; }
.lrow .meta { margin-top: 4px; }
.lrow .acts { display: flex; gap: 2px 14px; flex-wrap: wrap; margin-top: 4px; font-size: var(--sf-size-xs); }
.lrow .acts button { all: unset; cursor: pointer; color: var(--sf-muted); padding: 4px 0; }
.lrow .acts button:hover { color: var(--sf-text); }
.lrow .acts a { text-decoration: none; padding: 4px 0; font-weight: var(--sf-weight-ui-strong); }
.check { appearance: none; width: 26px; height: 26px; margin: 2px 0 0; border: 1.5px solid var(--sf-line-strong); border-radius: 7px; background: var(--sf-surface); cursor: pointer; display: grid; place-content: center; }
.check:checked { background: var(--sf-accent); border-color: var(--sf-accent); }
.check:checked::after { content: ""; width: 12px; height: 7px; border: solid var(--sf-on-accent); border-width: 0 0 2.2px 2.2px; transform: translateY(-2px) rotate(-45deg); }
.selbar {
  position: relative; z-index: 10; margin: var(--sf-space-4) 0 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 8px 8px 20px; border-radius: var(--sf-radius-pill);
  background: var(--sf-surface); color: var(--sf-text); border: 1px solid var(--sf-line-strong); box-shadow: var(--sf-shadow-card);
}
.selbar .n { flex: 1; font-weight: var(--sf-weight-ui-strong); }
.selbar a, .selbar button { all: unset; cursor: pointer; padding: 10px 14px; border-radius: var(--sf-radius-pill); font-weight: var(--sf-weight-ui-strong); color: var(--sf-accent); }
.selbar a:hover, .selbar button:hover { background: var(--sf-sunken); }
.selbar .main-act:hover { background: var(--sf-accent-strong); }
.selbar .main-act { background: var(--sf-accent); color: var(--sf-on-accent); }
:root[data-theme="dark"] .selbar .main-act, :root:not([data-theme="light"]) .selbar .main-act { color: var(--sf-on-accent); }
.selbar.pinned { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); }
@media (min-width: 960px) { .selbar.pinned { bottom: var(--sf-space-4); } }
/* The bar's wrapper takes no box, so a pinned bar stays at the bottom of the screen all along the list
   rather than only at its end (item 58); unpinned it sits at the end (round 7, item 106). */
[data-bar] { display: contents; }
.lib-layout { display: block; }
@media (min-width: 1100px) {
  .lib-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--sf-space-6); align-items: start; }
  .lib-side { position: sticky; top: var(--sf-space-5); display: grid; gap: var(--sf-space-4); }
  .lib-side .chips { flex-direction: column; align-items: stretch; }
  .lib-side .chip { justify-content: space-between; }
  .lrow { grid-template-columns: auto minmax(0, 1fr) auto; }
  .lrow .when { color: var(--sf-muted); font-size: var(--sf-size-xs); white-space: nowrap; padding-top: 4px; }
}
.lib-side { display: none; }
.lib-phone-note { color: var(--sf-muted); font-size: var(--sf-size-xs); text-align: center; margin: var(--sf-space-4) 0 0; }
@media (min-width: 1100px) { .lib-side { display: grid; } .lib-phone-note { display: none; } }
.lib-side .box { padding: var(--sf-space-4); border: 1px solid var(--sf-line); border-radius: var(--sf-radius-card); background: var(--sf-surface); }
.lib-side .box h2 { font: var(--sf-weight-display) var(--sf-size-md)/1.3 var(--sf-font-display); margin: 0 0 var(--sf-space-2); }
.lrow .when { display: none; }
@media (min-width: 1100px) { .lrow .when { display: block; } .lrow .meta .kept-when { display: none; } }
.seg { display: inline-flex; padding: 3px; border-radius: var(--sf-radius-pill); background: var(--sf-sunken); margin: 0 0 var(--sf-space-3); }
.seg a, .seg button { all: unset; cursor: pointer; padding: 8px 16px; border-radius: var(--sf-radius-pill); text-decoration: none; color: var(--sf-muted); font-weight: var(--sf-weight-ui-strong); }
.seg a[aria-current="page"], .seg button[aria-selected="true"] { background: var(--sf-surface); color: var(--sf-text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }

.month { font: var(--sf-weight-display) var(--sf-size-lg)/1.2 var(--sf-font-display); margin: var(--sf-space-5) 0 var(--sf-space-2); }
.nightrow { display: flex; align-items: baseline; gap: var(--sf-space-3); padding: 14px 4px; text-decoration: none; color: var(--sf-text); border-bottom: 1px solid var(--sf-line); }
.nightrow:hover { background: var(--sf-sunken); }
.nightrow .d { font: var(--sf-weight-display) var(--sf-size-md)/1.3 var(--sf-font-display); min-width: 11rem; }
.nightrow .s { color: var(--sf-muted); flex: 1; font-size: var(--sf-size-xs); }
.nightrow .s b { color: var(--sf-text); }
@media (max-width: 520px) { .nightrow { flex-direction: column; gap: 2px; } .nightrow .d { min-width: 0; } }

/* ---- cards ---------------------------------------------------------------------------------- */
.cardgrid { display: grid; gap: var(--sf-space-3); }
@media (min-width: 1100px) { .cardgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sf-space-4); } }
@media (min-width: 1400px) { .cardgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.icard {
  display: block; text-decoration: none; color: var(--sf-text); background: var(--sf-surface); border: 1px solid var(--sf-line);
  border-radius: var(--sf-radius-card); padding: var(--sf-space-4) var(--sf-space-5); box-shadow: var(--sf-shadow-card);
}
.icard:hover { border-color: var(--sf-line-strong); color: var(--sf-text); }
/* Round 9: the card's link fills it; Search sits under the link, outside it. */
.icard-link { display: block; text-decoration: none; color: inherit; }
.icard-link:hover { color: inherit; }
.icard-foot { display: flex; justify-content: flex-end; margin: var(--sf-space-2) calc(-1 * var(--sf-space-3)) calc(-1 * var(--sf-space-2)) 0; }
.icard-foot .btn { min-height: var(--sf-tap); gap: 6px; }
.elsewhere-box { border: 1px solid var(--sf-line); border-radius: var(--sf-radius-card); background: var(--sf-sunken); padding: var(--sf-space-4); margin: var(--sf-space-4) 0 var(--sf-space-2); }
.elsewhere-box h2 { display: flex; gap: 8px; align-items: center; font: var(--sf-weight-display) var(--sf-size-lg)/1.3 var(--sf-font-display); margin: 0 0 var(--sf-space-1); }
.elsewhere-box h2 .ic { flex: none; }
.elsewhere-box p { margin: 0 0 var(--sf-space-3); }
.elsewhere-box p:last-child { margin: var(--sf-space-3) 0 0; }
.elsewhere-dlg { width: min(34rem, calc(100% - 32px)); max-width: none; }
.elsewhere-dlg .elsewhere-box { border: 0; background: none; padding: 0; margin: 0 0 var(--sf-space-4); }
.elsewhere-dlg .eyebrow { margin: 0 0 var(--sf-space-2); }
.icard .head { display: flex; gap: var(--sf-space-3); align-items: flex-start; }
.icard h3 { margin: 0; flex: 1; font: var(--sf-weight-display) var(--sf-size-lg)/1.3 var(--sf-font-display); }
.icard p { font: var(--sf-weight-text) var(--sf-size-md)/1.5 var(--sf-font-text); margin: var(--sf-space-2) 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.icard .meta { gap: 2px 16px; font-size: var(--sf-size-xs); }
.icard.paused { opacity: .78; }
.icard.paused h3, .icard.paused p { color: var(--sf-muted); }
.suggest { background: var(--sf-accent-soft); border: 1px solid var(--sf-accent); border-radius: var(--sf-radius-card); padding: var(--sf-space-4) var(--sf-space-5); margin: 0 0 var(--sf-space-4); }
.suggest .eyebrow { margin-bottom: 6px; }
.suggest p.reading { margin: 0 0 var(--sf-space-3); }
.suggest q { quotes: "\201C" "\201D"; border-bottom: 1.5px solid var(--sf-accent); }
.callout { display: flex; gap: var(--sf-space-3); align-items: center; padding: var(--sf-space-4); border-radius: var(--sf-radius-card); border: 1px solid var(--sf-accent); background: var(--sf-surface); margin: 0 0 var(--sf-space-4); flex-wrap: wrap; }
.callout .txt { flex: 1; min-width: 14rem; }
.callout .txt b { display: block; font: var(--sf-weight-display) var(--sf-size-md)/1.3 var(--sf-font-display); }
.callout .txt span { color: var(--sf-muted); font-size: var(--sf-size-xs); }
.waiting { border-style: dashed; }
.crit { list-style: none; padding: 0; margin: 0 0 var(--sf-space-4); display: grid; gap: 10px; }
.crit li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font: var(--sf-weight-text) var(--sf-size-sm)/1.5 var(--sf-font-text); }
.crit .ic { width: 20px; height: 20px; margin-top: 2px; }
.crit .for .ic { color: var(--sf-accent); }
.crit .against .ic { color: var(--sf-no); }
.kv { display: grid; gap: var(--sf-space-4); margin: var(--sf-space-5) 0; }
@media (min-width: 1100px) { .card-detail { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--sf-space-6); align-items: start; } }
.statbox { border: 1px solid var(--sf-line); border-radius: var(--sf-radius-card); padding: var(--sf-space-4); background: var(--sf-surface); display: grid; gap: var(--sf-space-3); }
.statbox { gap: var(--sf-space-4); }
.statbox h2 { margin: 0; font-size: var(--sf-size-sm); font-weight: var(--sf-weight-ui-strong); }
.statbox .stat { display: grid; gap: 4px; }
.statbox .big { margin: 0; font: var(--sf-weight-display) var(--sf-size-xl)/1.25 var(--sf-font-display); }
.statbox .lbl { margin: 0; color: var(--sf-muted); font-size: var(--sf-size-xs); line-height: 1.45; }
.statbox .ver { border-top: 1px solid var(--sf-line); padding-top: var(--sf-space-3); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 10px; border-radius: var(--sf-radius-pill); background: var(--sf-sunken); font-size: var(--sf-size-xs); }

/* ---- making a card ------------------------------------------------------------------------ */
.progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0 0 var(--sf-space-5); }
.progress span { height: 4px; border-radius: 4px; background: var(--sf-sunken); }
.progress span.on { background: var(--sf-accent); }
.flow { max-width: 44rem; }
.flow h2 { font: var(--sf-weight-display) var(--sf-size-2xl)/1.2 var(--sf-font-display); margin: 0 0 var(--sf-space-2); }
.flow .steps-note { color: var(--sf-muted); margin: 0 0 var(--sf-space-5); max-width: 38rem; }
.flow .actions { display: flex; gap: var(--sf-space-2); align-items: center; flex-wrap: wrap; margin: var(--sf-space-5) 0; }
.flow .foot-note { color: var(--sf-muted); font-size: var(--sf-size-xs); text-align: center; }
.fieldchips .chip { min-height: 44px; }
.fieldchips .chip .sug { font-size: var(--sf-size-xs); font-weight: 400; color: var(--sf-muted); }
.prompt-box { position: relative; border: 1px solid var(--sf-line-strong); border-radius: var(--sf-radius-sm); background: var(--sf-surface); }
.prompt-box pre { margin: 0; padding: var(--sf-space-4); max-height: 18rem; overflow: auto; white-space: pre-wrap; font: 13px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--sf-muted); }
.prompt-box pre mark { background: var(--sf-accent-soft); color: var(--sf-text); }
.howto { counter-reset: s; list-style: none; padding: 0; margin: 0 0 var(--sf-space-4); display: grid; gap: 10px; }
.howto li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.howto li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-content: center; background: var(--sf-accent-soft); color: var(--sf-accent); font-weight: var(--sf-weight-ui-strong); font-size: var(--sf-size-xs); }
.dcard { background: var(--sf-surface); border: 1px solid var(--sf-line); border-radius: var(--sf-radius-card); padding: var(--sf-space-4) var(--sf-space-5); }
.dcard h3 { margin: 0; font: var(--sf-weight-display) var(--sf-size-lg)/1.3 var(--sf-font-display); }
.dcard .desc { font: var(--sf-weight-text) var(--sf-size-md)/1.6 var(--sf-font-text); margin: var(--sf-space-2) 0; }
.dcard .meta { margin: 0 0 var(--sf-space-2); }
.dcard .acts { display: flex; flex-wrap: wrap; gap: 4px; margin: var(--sf-space-2) -12px 0; }
.dcard .warn { color: var(--sf-no); font-size: var(--sf-size-xs); margin: 6px 0 0; display: flex; gap: 6px; }
.dcard .warn .ic { width: 16px; height: 16px; margin-top: 1px; }
mark.added { background: var(--sf-sunken); color: inherit; text-decoration: underline dashed var(--sf-no); text-underline-offset: 4px; text-decoration-thickness: 1.5px; border-radius: 3px; padding: 0 2px; }
.merge { display: flex; align-items: center; gap: var(--sf-space-3); margin: var(--sf-space-2) 0; }
.merge::before, .merge::after { content: ""; flex: 1; height: 1px; background: var(--sf-line); }
.dlist { display: grid; gap: var(--sf-space-2); }
.editor { display: grid; gap: var(--sf-space-3); margin-top: var(--sf-space-3); }
.critedit { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; }
.critedit select { min-height: var(--sf-tap); border-radius: var(--sf-radius-sm); border: 1px solid var(--sf-line-strong); background: var(--sf-surface); padding: 0 8px; }
.critedit .x { all: unset; cursor: pointer; padding: 10px; color: var(--sf-muted); }
@media (max-width: 520px) { .critedit { grid-template-columns: 1fr auto; } .critedit .input { grid-column: 1 / -1; } }
.reask { margin-top: var(--sf-space-3); padding: var(--sf-space-4); border-radius: var(--sf-radius-sm); background: var(--sf-bg); display: grid; gap: var(--sf-space-3); }

/* ---- welcome, you're set, not invited, about --------------------------------------------- */
.hero { text-align: center; padding: var(--sf-space-6) 0 var(--sf-space-4); }
.hero .awake { width: 132px; height: 132px; color: var(--sf-accent); }
.hero h1, .hero h2 { font: var(--sf-weight-display) 34px/1.15 var(--sf-font-display); margin: var(--sf-space-4) 0 var(--sf-space-2); }
.hero p { color: var(--sf-muted); max-width: 26rem; margin: 0 auto; font-size: var(--sf-size-md); }
@media (min-width: 960px) { .hero .awake { width: 160px; height: 160px; } .hero h1, .hero h2 { font-size: 44px; } }
.steps3 { list-style: none; padding: 0; margin: var(--sf-space-5) 0; display: grid; gap: var(--sf-space-3); }
.steps3 li { background: var(--sf-surface); border: 1px solid var(--sf-line-strong); border-radius: var(--sf-radius-card); padding: var(--sf-space-4) var(--sf-space-5); font: var(--sf-weight-text) var(--sf-size-md)/1.45 var(--sf-font-text); }
@media (min-width: 960px) { .steps3 { grid-template-columns: repeat(3, 1fr); } }
.lockup { width: 220px; height: auto; }
.center { text-align: center; }
.page-narrow { max-width: 30rem; margin: 0 auto; }

.state-center { display: grid; place-items: center; min-height: 60vh; text-align: center; gap: var(--sf-space-3); }

/* ---- me, admin ----------------------------------------------------------------------------- */
.panel { border: 1px solid var(--sf-line); border-radius: var(--sf-radius-card); background: var(--sf-surface); padding: var(--sf-space-4) var(--sf-space-5); margin: 0 0 var(--sf-space-4); }
.panel h2 { font: var(--sf-weight-display) var(--sf-size-lg)/1.3 var(--sf-font-display); margin: 0 0 var(--sf-space-2); }
.panel p { margin: 0 0 var(--sf-space-3); }
.panel.danger h2 { color: var(--sf-no); }
.me-grid { display: block; }
@media (min-width: 1100px) { .me-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--sf-space-4); align-items: start; } }
table.plain { width: 100%; border-collapse: collapse; font-size: var(--sf-size-sm); }
table.plain th { text-align: left; font-weight: var(--sf-weight-ui-strong); color: var(--sf-muted); font-size: var(--sf-size-xs); padding: 8px 8px 8px 0; border-bottom: 1px solid var(--sf-line-strong); }
table.plain td { padding: 12px 8px 12px 0; border-bottom: 1px solid var(--sf-line); vertical-align: top; overflow-wrap: anywhere; }
table.plain td.num { white-space: nowrap; }
.who-list { list-style: none; margin: 0; padding: 0; }
.who-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--sf-line); }
.who-list .e { font-weight: var(--sf-weight-ui-strong); overflow-wrap: anywhere; }
.who-list .s { color: var(--sf-muted); font-size: var(--sf-size-xs); grid-column: 1; }
.who-list .r { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.ok-dot, .late-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.ok-dot { background: var(--sf-accent); }
.late-dot { background: var(--sf-no); }
dialog { border: 1px solid var(--sf-line); border-radius: var(--sf-radius-card); background: var(--sf-surface); color: var(--sf-text); padding: var(--sf-space-5); max-width: min(30rem, calc(100% - 32px)); }
dialog::backdrop { background: rgba(10, 12, 14, .45); }
dialog h2 { font: var(--sf-weight-display) var(--sf-size-xl)/1.2 var(--sf-font-display); margin: 0 0 var(--sf-space-2); }

/* The loader waits before it shows: a quick answer never flashes it (items 1, 16, 20). It sits in the
   middle of the screen, and is larger at a desk (items 4, 16, 36). */
.loading-wrap { display: grid; place-items: center; min-height: 70vh; animation: sf-late 0s 350ms both; }
.app > .loading-wrap { min-height: 100dvh; }
.main > .loading-wrap { position: fixed; inset: 0; min-height: 0; pointer-events: none; z-index: 5; }
/* At a desk the loader is centred in the pane beside the rail, not on the whole screen (item 50). */
@media (min-width: 960px) { .app:not(.bare):has(> .rail) .main > .loading-wrap { left: 232px; } }
@keyframes sf-late { from { visibility: hidden; } }
@media (min-width: 960px) {
  .loading-wrap .sf-loader { width: 88px; height: 88px; }
  .loading-wrap .sf-loading { font-size: var(--sf-size-md); gap: var(--sf-space-4); }
}
@media print { .tabs, .rail, .selbar, .toast { display: none !important; } }

/* ---- not found (item 40): the walking mark, wandered off ------------------------------------ */
.notfound .walk, .state-center .walk { width: 168px; height: 168px; color: var(--sf-accent); display: block; margin: -36px auto -20px; }
main.notfound { min-height: 100dvh; padding: var(--sf-space-4); }

/* ---- outside: not invited, asked, signed out (items 2, 5, 30) -------------------------------- */
.main.outside { max-width: none; min-height: 100dvh; display: grid; place-items: center; padding-block: var(--sf-space-6); }
.out-box { width: min(32rem, 100%); text-align: center; display: grid; gap: var(--sf-space-4); justify-items: center; }
.out-box .lockup { width: 200px; height: auto; margin-bottom: var(--sf-space-3); }
.out-box .lede { margin: 0; font-size: var(--sf-size-md); color: var(--sf-muted); }
.out-box .display { margin: 0; }
.out-ask { width: 100%; display: grid; gap: var(--sf-space-2); text-align: left; margin-top: var(--sf-space-2); }
.out-ask label { font-weight: var(--sf-weight-ui-strong); font-size: var(--sf-size-sm); }
.out-ask textarea { width: 100%; resize: vertical; min-height: 88px; }
.out-ask .btn { justify-self: center; margin-top: var(--sf-space-3); }
.out-foot { margin: var(--sf-space-5) 0 0; color: var(--sf-muted); font-size: var(--sf-size-xs); }
@media (min-width: 960px) {
  .out-box .lockup { width: 240px; }
  .out-box .lede { font-size: var(--sf-size-lg); }
}
/* The admin's badge: requests waiting (item 30). */
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--sf-radius-pill); background: var(--sf-accent); color: var(--sf-on-accent); font-size: 12px; font-weight: var(--sf-weight-ui-strong); line-height: 1; }
.rail a.nav .badge { margin-left: auto; }
.tabs a { position: relative; }
.tabs a .badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; font-size: 11px; }
.requests { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sf-space-3); }
.requests li { border: var(--sf-hairline) solid var(--sf-line); border-radius: var(--sf-radius-sm); background: var(--sf-bg); padding: var(--sf-space-3) var(--sf-space-4); display: grid; gap: 6px; }
.requests .e { font-weight: var(--sf-weight-ui-strong); overflow-wrap: anywhere; }
.requests .note { font: var(--sf-weight-text) var(--sf-size-sm)/1.5 var(--sf-font-text); }
.requests .row { margin-top: 4px; }
.mailbox { border: 1px solid var(--sf-accent); border-radius: var(--sf-radius-sm); padding: var(--sf-space-4); display: grid; gap: var(--sf-space-3); background: var(--sf-surface); }
.mailbox dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: var(--sf-size-sm); }
.mailbox dt { color: var(--sf-muted); }
.mailbox dd { margin: 0; overflow-wrap: anywhere; }
.mailbox pre { margin: 0; white-space: pre-wrap; font: var(--sf-weight-text) var(--sf-size-sm)/1.55 var(--sf-font-text); background: var(--sf-bg); border-radius: var(--sf-radius-sm); padding: var(--sf-space-3); }
.mailbox .head { display: flex; align-items: center; justify-content: space-between; gap: var(--sf-space-2); flex-wrap: wrap; }
.mailbox + .requests { margin-top: var(--sf-space-3); }

/* ---- the first visit (ROUND.md 1B-4): the welcome with no rail, the tour, My cards empty --- */
.app.bare .rail, .app.bare .tabs { display: none; }
.app.bare { display: block; }
.app.bare .main { max-width: 52rem; margin-inline: auto; padding-bottom: var(--sf-space-7); }
.welcome-hero { min-height: 100dvh; display: grid; align-content: center; justify-items: center; text-align: center; gap: var(--sf-space-4); padding: var(--sf-space-6) 0; position: relative; }
.welcome-hero .awake { width: 140px; height: 140px; color: var(--sf-accent); }
.welcome-hero h1 { margin: 0; font: var(--sf-weight-display) clamp(36px, 6vw, 56px)/1.1 var(--sf-font-display); text-wrap: balance; }
.welcome-hero > p { margin: 0; max-width: 32rem; color: var(--sf-muted); font-size: var(--sf-size-lg); line-height: 1.5; }
.welcome-down { position: absolute; bottom: calc(var(--sf-space-5) + env(safe-area-inset-bottom)); color: var(--sf-muted); display: grid; place-items: center; width: var(--sf-tap); height: var(--sf-tap); border-radius: 50%; }
.welcome-down:hover { color: var(--sf-accent); background: var(--sf-sunken); }
@media (prefers-reduced-motion: no-preference) { .welcome-down .ic { animation: sf-nudge 2.4s var(--sf-ease) infinite; } }
@keyframes sf-nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(5px); } }
.welcome-steps { min-height: 90dvh; display: grid; align-content: center; gap: var(--sf-space-5); text-align: center; padding-block: var(--sf-space-7); }
.welcome-steps h2 { margin: 0; font: var(--sf-weight-display) var(--sf-size-2xl)/1.2 var(--sf-font-display); }
.welcome-steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sf-space-3); text-align: left; }
.welcome-steps li { background: var(--sf-surface); border: var(--sf-hairline) solid var(--sf-line); border-radius: var(--sf-radius-card); padding: var(--sf-space-5); display: grid; gap: 6px; box-shadow: var(--sf-shadow-card); }
.welcome-steps .n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--sf-accent-soft); color: var(--sf-accent); font-weight: var(--sf-weight-ui-strong); margin-bottom: 6px; }
.welcome-steps h3 { margin: 0; font: var(--sf-weight-display) var(--sf-size-lg)/1.3 var(--sf-font-display); }
.welcome-steps li p { margin: 0; color: var(--sf-muted); }
.welcome-steps > p { margin: 0; }
.welcome-steps .btn.primary { min-width: 220px; min-height: 52px; font-size: var(--sf-size-md); }
/* The steps as one sequence (item 60): a line joins the numbers; step 1 is now. Down the left on a
   phone, across at a desk. */
.welcome-steps ol.stepper { position: relative; gap: var(--sf-space-5); }
.stepper li { position: relative; background: none; border: 0; box-shadow: none; padding: 0 0 0 56px; display: block; }
.stepper li::before { content: ""; position: absolute; left: 19px; top: 40px; bottom: calc(-1 * var(--sf-space-5)); width: 2px; background: var(--sf-line); }
.stepper li:last-child::before { display: none; }
.stepper li.now::before { background: linear-gradient(var(--sf-accent), var(--sf-line)); }
.stepper .n { position: absolute; left: 0; top: 0; width: 40px; height: 40px; margin: 0; background: var(--sf-surface); border: 2px solid var(--sf-line); color: var(--sf-muted); }
.stepper li.now .n { background: var(--sf-accent); border-color: var(--sf-accent); color: var(--sf-on-accent); box-shadow: 0 0 0 6px var(--sf-accent-soft); }
.stepper h3 { padding-top: 6px; }
.stepper .tm { display: inline-block; margin: 6px 0 6px; font-size: var(--sf-size-xs); font-weight: var(--sf-weight-ui-strong); color: var(--sf-muted); background: var(--sf-sunken); border-radius: var(--sf-radius-pill); padding: 2px 10px; }
.stepper li.now .tm { background: var(--sf-accent-soft); color: var(--sf-accent); }
@media (min-width: 760px) {
  .welcome-steps ol.stepper { grid-template-columns: repeat(3, 1fr); gap: var(--sf-space-4); }
  .stepper li { padding: 0 var(--sf-space-3); text-align: center; display: grid; justify-items: center; gap: 0; }
  .stepper li::before { left: calc(50% + 28px); right: calc(-50% + 28px); width: auto; top: 19px; bottom: auto; height: 2px; }
  .stepper li.now::before { background: linear-gradient(to right, var(--sf-accent), var(--sf-line)); }
  .stepper .n { position: static; margin-bottom: var(--sf-space-3); }
  .stepper h3 { padding-top: 0; }
}

/* The setup strip on Tonight and My cards until the first night (item 60). */
.setup { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sf-space-2) var(--sf-space-4); margin: 0 0 var(--sf-space-5); padding: var(--sf-space-3) var(--sf-space-4); background: var(--sf-surface); border: 1px solid var(--sf-line); border-radius: var(--sf-radius-card); }
.setup .k { margin: 0; font-weight: var(--sf-weight-ui-strong); }
.setup ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--sf-muted); font-size: var(--sf-size-sm); }
.setup li { display: inline-flex; align-items: center; gap: 6px; }
.setup .d { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--sf-line-strong); font-size: 12px; font-weight: var(--sf-weight-ui-strong); }
.setup li.done { color: var(--sf-text); }
.setup li.done .d { background: var(--sf-accent-soft); border-color: transparent; color: var(--sf-accent); }
.setup li.now { color: var(--sf-accent); font-weight: var(--sf-weight-ui-strong); }
.setup li.now .d { background: var(--sf-accent); border-color: var(--sf-accent); color: var(--sf-on-accent); }
.setup .btn, .setup .next { margin-left: auto; }
.setup .next { color: var(--sf-muted); font-size: var(--sf-size-sm); display: inline-flex; align-items: center; }

.cards-empty { text-align: center; display: grid; justify-items: center; gap: var(--sf-space-3); padding: var(--sf-space-6) 0; }
.cards-empty .awake { width: 96px; height: 96px; color: var(--sf-accent); }
.cards-empty h2 { margin: 0; font: var(--sf-weight-display) var(--sf-size-2xl)/1.2 var(--sf-font-display); }
.cards-empty p { margin: 0; color: var(--sf-muted); max-width: 30rem; }

/* The tour (item 61): Driver.js draws the shade and the spotlight; this is Silverfish's popover.
   In the dark the shade is deeper and the spotlight carries an accent ring, so what is lit stands
   out from the page around it (Roy, phase C). */
:root { --sf-tour-shade: rgba(14, 17, 19, .55); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sf-tour-shade: rgba(0, 0, 0, .74); } }
:root[data-theme="dark"] { --sf-tour-shade: rgba(0, 0, 0, .74); }
.driver-active .driver-active-element { outline: 2px solid var(--sf-accent); outline-offset: 6px; border-radius: var(--sf-radius-card); }
.tour-around { pointer-events: none; z-index: 60; }
/* The phone tour's hand-over between stops (tour.js handOver): patches of shade over the hole, and
   a full shade standing in for Driver.js's while the page changes underneath. Above Driver's shade
   (z-index 10000), below its popover. */
.tour-layer { position: fixed; z-index: 10001; background: var(--sf-tour-shade); opacity: 0; transition: opacity 180ms var(--sf-ease); pointer-events: none; }
.tour-layer.on { opacity: 1; }
.tour-layer.patch { border-radius: 14px; }
.tour-layer.full { inset: 0; transition: none; pointer-events: auto; }
.tour-shut .driver-overlay { opacity: 0 !important; }
.driver-popover.sf-tour { transition: opacity 180ms var(--sf-ease); }
.tour-swap .driver-popover.sf-tour, .tour-swap .tour-around { opacity: 0 !important; pointer-events: none; }
.tour-swap .driver-active-element { outline-color: transparent !important; }
.driver-popover.sf-tour {
  background: var(--sf-surface); color: var(--sf-text); border: 1px solid var(--sf-line); border-radius: var(--sf-radius-card);
  padding: var(--sf-space-4) var(--sf-space-4) var(--sf-space-3); min-width: 0; max-width: 340px; width: min(340px, calc(100vw - 32px));
  box-shadow: 0 18px 44px -18px rgba(0, 0, 0, .55); font-family: var(--sf-font-ui);
}
.sf-tour .driver-popover-title { font: var(--sf-weight-display) var(--sf-size-lg)/1.25 var(--sf-font-display); margin: 0 104px 0 0; }
.driver-popover.sf-tour:focus { outline: none; }
.sf-tour .driver-popover-description { font-size: var(--sf-size-sm); line-height: 1.5; color: var(--sf-muted); margin-top: 6px; }
.sf-tour .driver-popover-close-btn { width: auto; height: auto; top: 14px; right: 14px; padding: 4px 6px; border-radius: 6px; font: var(--sf-weight-ui-strong) var(--sf-size-xs)/1.2 var(--sf-font-ui); color: var(--sf-muted); }
.sf-tour .driver-popover-close-btn:hover, .sf-tour .driver-popover-close-btn:focus-visible { color: var(--sf-text); }
.sf-tour .driver-popover-footer { margin-top: var(--sf-space-3); gap: var(--sf-space-2); }
.sf-tour .driver-popover-navigation-btns { gap: var(--sf-space-2); }
.sf-tour .driver-popover-navigation-btns button + button { margin-left: 0; }
.sf-tour .driver-popover-footer-btn { font: var(--sf-weight-ui-strong) var(--sf-size-sm)/1 var(--sf-font-ui); border-radius: var(--sf-radius-pill); min-height: 40px; padding: 0 18px; display: inline-flex; align-items: center; text-shadow: none; }
.sf-tour .driver-popover-next-btn { background: var(--sf-accent); color: var(--sf-on-accent); border: 0; }
.sf-tour .driver-popover-next-btn:hover, .sf-tour .driver-popover-next-btn:focus { background: var(--sf-accent-strong); }
.sf-tour .driver-popover-prev-btn { background: transparent; color: var(--sf-muted); border: 0; padding: 0 10px; }
.sf-tour .driver-popover-prev-btn:hover, .sf-tour .driver-popover-prev-btn:focus { background: var(--sf-sunken); color: var(--sf-text); }
.sf-tour .driver-popover-footer-btn:focus-visible, .sf-tour .driver-popover-close-btn:focus-visible { outline: 2px solid var(--sf-focus); outline-offset: 2px; }
.sf-tour .tour-dots { display: inline-flex; gap: 5px; align-items: center; }
.sf-tour .tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--sf-line); transition: width var(--sf-dur) var(--sf-ease); }
.sf-tour .tour-dots i.on { width: 20px; border-radius: 4px; background: var(--sf-accent); }
.sf-tour .driver-popover-arrow-side-left { border-left-color: var(--sf-surface); }
.sf-tour .driver-popover-arrow-side-right { border-right-color: var(--sf-surface); }
.sf-tour .driver-popover-arrow-side-top { border-top-color: var(--sf-surface); }
.sf-tour .driver-popover-arrow-side-bottom { border-bottom-color: var(--sf-surface); }
/* On a phone the popover docks at the bottom, above the tabs, like a sheet. */
@media (max-width: 959px) {
  .driver-popover.sf-tour.docked { position: fixed; left: 12px !important; right: 12px !important; top: auto !important; bottom: calc(96px + env(safe-area-inset-bottom)) !important; width: auto; max-width: none; }
  .driver-popover.sf-tour.docked .driver-popover-arrow { display: none; }
}

/* In progress: the breathing mark beside the words (items 28, 36), and large on its own (item 36). */
/* --s is the size of the drawing itself (x 90-450, y 45-405 of the 512 square); the square is
   larger and shifted so the drawing fills the box and centres on the line. */
.busy { --s: 20px; display: inline-block; width: var(--s); height: var(--s); vertical-align: middle; margin-right: 8px; line-height: 0; overflow: visible; }
.busy .sf-loader { display: block; width: calc(var(--s) * 512 / 360); height: calc(var(--s) * 512 / 360); margin: calc(var(--s) * -45 / 360) 0 0 calc(var(--s) * -90 / 360); }
.wait-mark { display: grid; justify-items: center; gap: var(--sf-space-3); margin: var(--sf-space-6) 0; text-align: center; color: var(--sf-muted); }
.wait-mark .sf-loader { width: 96px; height: 96px; }
.wait-mark p { margin: 0; font-size: var(--sf-size-md); }

.pill.near { background: var(--sf-sunken); color: var(--sf-muted); }
.lrow .authors { margin: 2px 0 0; color: var(--sf-muted); font-size: var(--sf-size-xs); }
.lrow .meta .pill { margin-right: 2px; }

/* A suggested edit says exactly what would change, on its own line (item 46). */
.suggest .change { margin: 6px 0 4px; font: var(--sf-weight-display) var(--sf-size-lg)/1.35 var(--sf-font-display); }
.suggest .small.muted { margin: 0 0 var(--sf-space-3); }
/* A card's status reads at a glance (item 59). */
.pill.status { font-size: var(--sf-size-sm); padding: 6px 16px; }
.pill.status .busy { --s: 18px; margin: -2px 6px -2px -4px; }
/* At a desk the status pill and its loader are larger: at 18px on a PC screen the antennae are
   thinner than a pixel and seem to blink (Roy, phase C). */
@media (min-width: 960px) {
  .pill.status { font-size: var(--sf-size-md); padding: 8px 20px 8px 16px; }
  .pill.status .busy { --s: 28px; margin: -6px 8px -6px -2px; }
  .busy { --s: 26px; }
}
.pill .busy { margin-right: 6px; }
.pill .busy { --s: 16px; }
.note .busy { margin: 0; }

/* Near the line: a heading with "Not now" (item 47); an empty night is one centred column (item 43). */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sf-space-3); }
.section-head .btn { min-height: var(--sf-tap); }
.near-off { color: var(--sf-muted); font-size: var(--sf-size-sm); margin: var(--sf-space-5) 0; }
.linkish { all: unset; cursor: pointer; color: var(--sf-accent); font-weight: var(--sf-weight-ui-strong); }
.linkish:focus-visible { outline: 2px solid var(--sf-focus); outline-offset: 2px; }
.list.solo { max-width: 46rem; margin-inline: auto; }
/* The page's own width cap would hold an empty night left of the pane's middle on a wide screen. */
@media (min-width: 960px) { .main:has(> .list.solo) { max-width: none; } }

/* The card flow (items 32-35). */
.prompt-box .when-open { display: none; }
.prompt-box[open] .when-open { display: inline; }
.prompt-box[open] .when-closed { display: none; }
.fieldgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 6px 16px; margin: 6px 0 var(--sf-space-5); }
.fieldpick { all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 2px 8px; border-radius: var(--sf-radius-sm); font-size: var(--sf-size-sm); }
.fieldpick:hover { background: var(--sf-sunken); }
.fieldpick:focus-visible { outline: 2px solid var(--sf-focus); outline-offset: 1px; }
.fieldpick .box { width: 20px; height: 20px; flex: none; border: 1.5px solid var(--sf-line-strong); border-radius: 6px; background: var(--sf-surface); display: grid; place-content: center; }
.fieldpick[aria-pressed="true"] .box { background: var(--sf-accent); border-color: var(--sf-accent); }
.fieldpick[aria-pressed="true"] .box::after { content: ""; width: 9px; height: 5px; border: solid var(--sf-on-accent); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.fieldpick[aria-pressed="true"] { font-weight: var(--sf-weight-ui-strong); }
textarea.grow { min-height: 0; resize: vertical; font: var(--sf-weight-ui) var(--sf-size-sm)/1.45 var(--sf-font-ui); field-sizing: content; }
.dcard .pick { display: inline-flex; gap: 8px; align-items: center; font-weight: var(--sf-weight-ui-strong); font-size: var(--sf-size-sm); color: var(--sf-accent); margin: var(--sf-space-2) 0 0; cursor: pointer; }
.dcard .pick input { width: 20px; height: 20px; accent-color: var(--sf-accent); }
.pickbar { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px 10px 18px; margin-top: var(--sf-space-3); border: 1px solid var(--sf-line-strong); border-radius: var(--sf-radius-pill); background: var(--sf-surface); box-shadow: var(--sf-shadow-card); }
.pickbar span { flex: 1; color: var(--sf-muted); font-size: var(--sf-size-sm); }
@media (min-width: 960px) { .pickbar { bottom: var(--sf-space-4); } }
/* Declined requests, folded under the waiting ones, each with its undo (item 52). */
.declined { margin-top: var(--sf-space-4); }
.declined summary { cursor: pointer; color: var(--sf-muted); font-size: var(--sf-size-sm); margin-bottom: var(--sf-space-3); }
/* The next section slides in from the side the swipe or the tab came from (items 51, 56). */
@media (prefers-reduced-motion: no-preference) {
  .main.enter-right { animation: sf-enter-right 220ms var(--sf-ease-out) both; }
  .main.enter-left { animation: sf-enter-left 220ms var(--sf-ease-out) both; }
}
@keyframes sf-enter-right { from { opacity: 0; transform: translateX(32%); } }
@keyframes sf-enter-left { from { opacity: 0; transform: translateX(-32%); } }
/* The loader's antennae are drawn about a third of a pixel wide at these sizes. On a 1x screen the
   GPU covers them in some frames and drops them in others as they sway, so they blink (measured in
   a GPU-drawn window: ink jumping 6-15 frame to frame; smooth at 3x). A stroke one screen pixel wide,
   whatever the scale, keeps them drawn in every frame. Phones (2x and up) already draw them whole. */
@media (max-resolution: 1.99dppx) {
  .sf-loader-antennae path { stroke: currentColor; stroke-width: 1px; vector-effect: non-scaling-stroke; }
}

/* ---- round 2 -------------------------------------------------------------------------------- */
/* Item 64: each card has an ink, chosen once by the site and kept. It marks only which card a
   paper is for: the stripe on the paper's left edge and the dot by the card's name. Never green,
   never red, so Keep and Pass keep their colours. Each passes 4.5:1 on paper and surface. */
:root { --sf-ink-0: #3F5596; --sf-ink-1: #7E5C0E; --sf-ink-2: #7A4A88; --sf-ink-3: #1C6C79; --sf-ink-4: #8B5530; --sf-ink-5: #4D5D6C; --ink: var(--sf-muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --sf-ink-0: #A3B4EA; --sf-ink-1: #DDB868; --sf-ink-2: #CDA6DA; --sf-ink-3: #82C9D4; --sf-ink-4: #DDAA80; --sf-ink-5: #AEBBC7; } }
:root[data-theme="dark"] { --sf-ink-0: #A3B4EA; --sf-ink-1: #DDB868; --sf-ink-2: #CDA6DA; --sf-ink-3: #82C9D4; --sf-ink-4: #DDAA80; --sf-ink-5: #AEBBC7; }
.ink-0 { --ink: var(--sf-ink-0); } .ink-1 { --ink: var(--sf-ink-1); } .ink-2 { --ink: var(--sf-ink-2); }
.ink-3 { --ink: var(--sf-ink-3); } .ink-4 { --ink: var(--sf-ink-4); } .ink-5 { --ink: var(--sf-ink-5); }
.paper.inked { border-left: 4px solid var(--ink); }
.paper.voted.inked { border-left-color: var(--ink); }
.cardtag { display: inline-flex; align-items: center; gap: 7px; min-width: 0; color: var(--ink); font: var(--sf-weight-ui-strong) var(--sf-size-xs)/1.3 var(--sf-font-ui); }
.cardtag::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); flex: none; }
.cardtag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paper > .cardtag { display: flex; margin: 0 0 6px; padding-right: 64px; }
.paper.voted > .cardtag { margin: 0; padding-right: 0; font-weight: var(--sf-weight-ui); }
.reader .cardtag { font-size: var(--sf-size-sm); margin-bottom: 4px; }
/* D2: a night grouped under each card's name. */
.cardgroup { display: grid; gap: var(--sf-space-3); }
.cardgroup + .cardgroup { margin-top: var(--sf-space-4); }
.cardgroup > h3 { display: flex; align-items: baseline; gap: 10px; margin: 0; font: var(--sf-weight-ui-strong) var(--sf-size-sm)/1.3 var(--sf-font-ui); }
.cardgroup > h3 .cardtag { font-size: var(--sf-size-sm); }
.cardgroup > h3 .n { color: var(--sf-muted); font-weight: var(--sf-weight-ui); font-size: var(--sf-size-xs); }
/* Round 3: under a card's papers below the line, whether votes move that card's line. */
.line-note { margin: 0 0 var(--sf-space-2); color: var(--sf-muted); font-size: var(--sf-size-sm); max-width: 36rem; }
.papers > .line-note { margin-top: var(--sf-space-1); }
.cards-list .ink-dot, .ink-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); margin-right: 8px; vertical-align: 0.05em; }

/* Item 65: what is still waiting. */
.night-progress { display: flex; align-items: center; gap: 12px; margin: 4px 0 var(--sf-space-5); color: var(--sf-muted); font-size: var(--sf-size-xs); }
.night-progress .bar { flex: 0 1 12rem; height: 6px; border-radius: var(--sf-radius-pill); background: var(--sf-sunken); overflow: hidden; }
.night-progress .bar i { display: block; height: 100%; background: var(--sf-accent); transition: width var(--sf-dur) var(--sf-ease); }
.night-progress.done { color: var(--sf-accent); font-weight: var(--sf-weight-ui-strong); }
.callout.backlog { border-color: var(--sf-accent); background: var(--sf-accent-soft); }
.desk .paper.inked.selected { border-left-color: var(--ink); box-shadow: none; }
.nightrow .state { margin-left: auto; flex: none; }
.pill.wait { background: var(--sf-accent); color: var(--sf-on-accent); }
.pill.part { box-shadow: inset 0 0 0 1.5px var(--sf-accent); color: var(--sf-accent); }
.pill.done { color: var(--sf-muted); padding-left: 0; padding-right: 0; font-weight: var(--sf-weight-ui); }
.nights-filter { margin: var(--sf-space-2) 0 0; }
.aside-note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.ending .next { margin-top: var(--sf-space-3); }
@media (max-width: 520px) { .nightrow .state { margin-left: 0; } }

/* Item 66: feedback. */
.fb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sf-space-3); }
.fb-list li { border: var(--sf-hairline) solid var(--sf-line); border-radius: var(--sf-radius-sm); background: var(--sf-bg); padding: var(--sf-space-3) var(--sf-space-4); display: grid; gap: 6px; min-width: 0; }
.fb-list .h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: var(--sf-size-xs); color: var(--sf-muted); }
.fb-list .h b { color: var(--sf-text); }
.fb-list .body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-list .reply { margin: 0; border-left: 2px solid var(--sf-accent); padding-left: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-list .reply small { display: block; color: var(--sf-muted); font-size: var(--sf-size-xs); }
.fb-list .ctx { font-size: var(--sf-size-xs); color: var(--sf-muted); overflow-wrap: anywhere; }
.fb-form textarea { width: 100%; min-height: 8rem; resize: vertical; }
.fb-form .sent-with { font-size: var(--sf-size-xs); color: var(--sf-muted); margin: 6px 0 var(--sf-space-3); overflow-wrap: anywhere; }
.fb-reply textarea { width: 100%; min-height: 5rem; resize: vertical; }
.dot-new { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--sf-accent); }

/* ---- round 4: "This card feels off" (D62, D63) ---------------------------------------------- */
.icard .rt-line { display: flex; align-items: center; gap: 6px; margin: var(--sf-space-2) 0 0; font: var(--sf-weight-ui-strong) var(--sf-size-xs)/1.4 var(--sf-font-ui); color: var(--sf-accent); -webkit-line-clamp: unset; }
.icard .rt-line.nudge { color: var(--sf-muted); font-weight: var(--sf-weight-ui); }
.icard .rt-line .ic { width: 16px; height: 16px; flex: none; }
.note.nudge { border: 1px solid var(--sf-line-strong); background: var(--sf-surface); }
/* round 10 (D83): the nudge with Re-tune it and Keep it as is, on Tonight and a card's page */
.note.nudge .txt { flex: 1; min-width: 0; }
.note.nudge .txt p { margin: 0 0 var(--sf-space-3); }
.note.nudge .txt .which { margin-bottom: var(--sf-space-2); }
.cardgroup .note.nudge { margin-top: var(--sf-space-2); }
.retune .rt-card { display: flex; align-items: center; margin: 0 0 var(--sf-space-4); font: var(--sf-weight-display) var(--sf-size-lg)/1.3 var(--sf-font-display); }
.retune .rt-card a { color: var(--sf-text); text-decoration: none; }
.retune .rt-card a:hover { text-decoration: underline; text-underline-offset: 3px; }
.rsteps { list-style: none; margin: 0 0 var(--sf-space-5); padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--sf-muted); font-size: var(--sf-size-sm); }
.rsteps li { display: inline-flex; align-items: center; gap: 6px; }
.rsteps .d { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--sf-line-strong); font-size: 12px; font-weight: var(--sf-weight-ui-strong); }
.rsteps li.done { color: var(--sf-text); }
.rsteps li.done .d { background: var(--sf-accent-soft); border-color: transparent; color: var(--sf-accent); }
.rsteps li.now { color: var(--sf-accent); font-weight: var(--sf-weight-ui-strong); }
.rsteps li.now .d { background: var(--sf-accent); border-color: var(--sf-accent); color: var(--sf-on-accent); }
.retune .wait-line { display: flex; align-items: center; margin: var(--sf-space-3) 0; font-size: var(--sf-size-md); }
.retune .verdict { font: var(--sf-weight-text) var(--sf-size-lg)/1.5 var(--sf-font-text); margin: 0 0 var(--sf-space-4); padding-left: var(--sf-space-3); border-left: 3px solid var(--sf-accent); max-width: 40rem; }
.retune .verdict.not-yet { border-left-color: var(--sf-no); }
.retune .paste-field { margin-top: var(--sf-space-5); }
.retune details.changes { margin: var(--sf-space-4) 0; border-top: 1px solid var(--sf-line); padding-top: var(--sf-space-3); }
.retune details.changes > summary { cursor: pointer; font-weight: var(--sf-weight-ui-strong); color: var(--sf-accent); padding: 6px 0; }
.retune details.changes .dcard { margin: var(--sf-space-2) 0; }
.retune ul.titles { margin: 4px 0 var(--sf-space-4); padding-left: 18px; font-size: var(--sf-size-sm); display: grid; gap: 4px; }

/* ---- math in titles and abstracts (round 6 item 84, typeset by js/math.js) ------------------- */
.tex .katex { font-size: 1.08em; }
.tex .katex .base { white-space: nowrap; }
.tex math { font-size: 1.05em; }

/* ---- round 7 (the UX review) ---------------------------------------------------------------- */
/* Item 89: controls drawn with all: unset lost the site's focus ring; they get it back. */
.selbar a:focus-visible, .selbar button:focus-visible, .seg a:focus-visible, .seg button:focus-visible, .lrow .acts button:focus-visible,
.toast button:focus-visible, .error-line button:focus-visible, .critedit .x:focus-visible { outline: 2px solid var(--sf-focus); outline-offset: 2px; border-radius: 6px; }
/* Item 97: a title that is one long chemical name breaks at 320 px rather than leaving its card. */
.paper h3, .lrow .t { overflow-wrap: anywhere; }
/* Item 95: links that are the only way to something get a tap's height on a phone, 24 px at a desk. */
.tap { display: inline-flex; align-items: center; min-height: 24px; }
.top .meta a, a.open { min-height: 24px; }
a.open { display: inline-flex; align-items: center; }
.paper.voted button.t { padding-block: 3px; }
@media (max-width: 959px) { .tap, .top .meta a { min-height: var(--sf-tap); } }
/* Item 87: on a phone each callout is one compact row, the whole of it the link (its button's words stay its name,
   a round arrow shows it), so the night's first paper is on the first screen. */
.callout .btn .ic { display: none; }
@media (max-width: 599px) {
  .callout { position: relative; flex-wrap: nowrap; gap: var(--sf-space-3); padding: 12px 12px 12px var(--sf-space-4); margin-bottom: var(--sf-space-3); }
  .callout .txt { min-width: 0; }
  .callout .txt b { font: var(--sf-weight-ui-strong) var(--sf-size-sm)/1.3 var(--sf-font-ui); }
  .callout .txt span { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  .callout .btn { position: static; flex: none; width: var(--sf-tap); padding: 0; border-radius: 50%; }
  .callout .btn::after { content: ""; position: absolute; inset: 0; border-radius: var(--sf-radius-card); }
  .callout .btn:focus-visible { outline: none; }
  .callout:has(.btn:focus-visible) { outline: 2px solid var(--sf-focus); outline-offset: 2px; }
  .callout .btn .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .callout .btn .ic { display: block; }
}
/* Item 104: while a text box has the keyboard on a phone, the tab bar steps aside for it and its Send. */
@media (max-width: 959px) and (pointer: coarse) {
  body:has(:is(textarea, select, input:not([type="checkbox"], [type="radio"], [type="button"], [type="submit"])):focus) .tabs { display: none; }
}
/* Items 88, 103: on a phone the tour's paper stops dock their words at the top, over nothing they point at. */
@media (max-width: 959px) {
  .driver-popover.sf-tour.docked.at-top { top: calc(12px + env(safe-area-inset-top)) !important; bottom: auto !important; }
}
/* Item 102: Get started under the welcome's first paragraph too, as the steps' button is drawn. */
.welcome-hero .welcome-go { margin: var(--sf-space-2) 0 0; }
.welcome-hero .welcome-go .btn { min-width: 220px; min-height: 52px; font-size: var(--sf-size-md); }

/* Round 11 (D86): the frozen prompt, its small line, and Admin's list of who has gone quiet. */
.frozen-dlg { max-width: min(34rem, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; }
.frozen-dlg p { margin: 0 0 var(--sf-space-3); }
.frozen-dlg ul { list-style: none; margin: 0 0 var(--sf-space-3); padding: 0; display: grid; gap: 2px; }
.frozen-dlg label { display: flex; gap: 12px; align-items: center; min-height: var(--sf-tap); overflow-wrap: anywhere; cursor: pointer; }
.frozen-dlg input { width: 20px; height: 20px; flex: none; accent-color: var(--sf-accent); }
.frozen-dlg .row { margin-top: var(--sf-space-4); }
.frozen-line { margin: 0 0 var(--sf-space-4); font-size: var(--sf-size-sm); color: var(--sf-muted); }
.frozen-line button { background: none; border: 0; padding: 0 2px; min-height: var(--sf-tap); font: inherit; color: var(--sf-accent); text-decoration: underline; cursor: pointer; }
.away-due { display: grid; gap: var(--sf-space-3); margin-bottom: var(--sf-space-3); }

/* S-recal (D89): the queue's night date beside the card tag, and the notifications ask. */
.paper .qdate { margin-left: .5em; font-size: .8125rem; color: var(--sf-muted); }
.push-ask .row { margin-top: .5rem; }
.push-ask .linkish { align-self: flex-start; margin-left: auto; }

/* S-star (Silverfish D94): a strong match. The one solid accent badge on the site. */
.strong-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px 2px 8px; border-radius: var(--sf-radius-pill);
  background: var(--sf-accent); color: var(--sf-on-accent); font: var(--sf-weight-ui-strong) var(--sf-size-xs)/1.4 var(--sf-font-ui); white-space: nowrap; vertical-align: middle; }
.strong-badge .ic { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.paper > .strong-badge { margin: 0 0 8px; }
.paper.voted > .strong-badge { margin: 0 0 4px; justify-self: start; }
.reader .strong-badge { margin: 0 10px 8px 0; }
.nightrow .strong-line { display: inline-flex; align-items: center; gap: 8px; }
.nightrow .strong-line .n { font-size: var(--sf-size-xs); color: var(--sf-muted); }
.lrow .meta .strong-badge { margin-right: 2px; }
.strong-note { margin: 0 0 var(--sf-space-3); font-size: var(--sf-size-sm); color: var(--sf-accent); }
