/* The Accept page. Same colours and type as the homepage, no scripts. */
:root {
  --bg: #0c0c0a;
  --panel: #151512;
  --line: #2a2a25;
  --ink: #f0eee6;
  --muted: #a3a196;
  --amber: #f0b446;
  /* Added for the signed-in pages. */
  --hair: #23221c;
  --dim: #6f6d64;
  --raise: #22211b;
  --amber-ink: #17130a;
  --amber-bg: rgba(240, 180, 70, 0.07);
  --ok: #7fd49b;
  --ok-line: rgba(127, 212, 155, 0.45);
  --ok-bg: rgba(127, 212, 155, 0.07);
  --radius: 12px;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.55 Geist, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.top {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 20px 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}
main { max-width: 640px; margin: 0 auto; padding: 36px 20px 80px; }
h1 { font-size: 30px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 14px; font-weight: 600; }
h2 { font-size: 15px; margin: 0 0 10px; font-weight: 600; }
.lede { color: var(--muted); margin: 0 0 28px; }
.code {
  border: 1px solid var(--amber);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 0 0 28px;
  background: rgba(240, 180, 70, 0.06);
}
.code p { margin: 0; }
.label { font-size: 13px; color: var(--muted); }
.value {
  font: 500 34px/1.3 "Geist Mono", ui-monospace, monospace;
  letter-spacing: 0.08em;
  color: var(--amber);
}
.say {
  font: 500 17px/1.5 "Geist Mono", ui-monospace, monospace;
  color: var(--amber);
  padding: 4px 0 6px;
  overflow-wrap: anywhere;
}
/* The code is typed, never shown: the box holds a field. */
form .code { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; margin: 0 0 8px; }
.code label.label { font-size: 16px; font-weight: 600; color: var(--ink); }
.code input.value {
  flex: none;
  width: 100%;
  max-width: 300px;
  text-transform: uppercase;
  background: var(--bg);
  border: 2px solid var(--amber);
  font: 500 22px/1.3 "Geist Mono", ui-monospace, monospace;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.code input.value::placeholder { color: var(--muted); opacity: 0.55; }
.code .problem { margin: 0; }
.terms ul { margin: 0 0 10px; padding: 0 0 0 20px; color: var(--muted); font-size: 14px; }
.terms li { margin: 0 0 6px; }
.hint { font-size: 13px; color: var(--muted); }
.facts {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px 16px;
  margin: 0 0 28px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.terms { margin: 0 0 28px; }
.terms .text {
  white-space: pre-wrap;
  max-height: 320px;
  overflow: auto;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--muted);
  font-size: 14px;
}
form { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 14px; }
button {
  font: inherit;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
button.primary { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
button.quiet { padding: 6px 12px; font-size: 13px; color: var(--muted); }
a { color: var(--amber); }
input[type="email"], input[type="text"], textarea {
  font: inherit;
  flex: 1 1 240px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.problem { color: var(--amber); margin: 0 0 14px; }
.back { margin: 0 0 18px; font-size: 14px; }
.back a, .list a { text-decoration: none; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { margin: 0 0 12px; }
.list a {
  display: block;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
}
.list a:hover, .list a:focus-visible { border-color: var(--amber); }
.list .name { display: block; font-weight: 600; }
.list .meta { display: block; color: var(--muted); font-size: 13px; }
.record { list-style: none; margin: 0 0 28px; padding: 0; }
.record li {
  margin: 0 0 12px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.record .from-assistant { margin-right: 40px; }
.record .from-specialist { margin-left: 40px; border-color: #3a3524; }
.record .from-kovrex { border-style: dashed; border-color: var(--amber); }
.record p { margin: 0; }
.who { font-size: 13px; font-weight: 600; }
.who .what { font-weight: 400; color: var(--muted); }
.said { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0; }
.said.sealed { color: var(--muted); font-style: italic; }
.when { font-size: 12px; color: var(--muted); }
.record .kept { border-color: var(--line); }
.record form { margin: 10px 0 0; }
.record details { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.record summary { cursor: pointer; }
textarea { flex-basis: 100%; resize: vertical; }
.terms .label { margin: 14px 0 8px; }
@media (max-width: 480px) {
  .record .from-assistant { margin-right: 12px; }
  .record .from-specialist { margin-left: 12px; }
  h1 { font-size: 25px; }
  .facts { grid-template-columns: 1fr; gap: 2px 0; }
  .facts dd { margin-bottom: 10px; }
  button { width: 100%; }
}
.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
  margin: 0 0 24px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.filters label { display: block; min-width: 0; }
.filters label span { display: block; margin: 0 0 4px; color: var(--muted); font-size: 13px; }
.filters .wide, .filters .actions { grid-column: 1 / -1; }
.filters input, .filters select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  color-scheme: dark;
}
.filters select:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.filters .actions { display: flex; align-items: center; gap: 14px; }
.filters .note { margin-left: auto; color: var(--muted); font-size: 13px; }
.count { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.list .excerpt { display: block; margin: 8px 0 2px; font-size: 14px; overflow-wrap: anywhere; }
.list mark { background: var(--amber); color: #0c0c0a; border-radius: 3px; padding: 0 2px; }
@media (max-width: 480px) {
  .filters { grid-template-columns: 1fr; }
  .filters .actions { flex-wrap: wrap; }
  .filters .note { margin-left: 0; }
}
.filters .actions button { padding: 8px 18px; font-size: 14px; }
/* The choices on the Accept page: each block takes the form's full width, so
   the buttons sit below them. */
form .terms { flex: 1 1 100%; margin: 0 0 8px; }
label.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  cursor: pointer;
}
label.choice input[type="checkbox"] {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--amber);
  color-scheme: dark;
  cursor: pointer;
}
label.choice input[type="checkbox"]:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
form .terms > p { margin: 0 0 12px; }
/* A form of one button, such as those on the relationships page, keeps its size. */
.record form { flex: 0 0 auto; }
.record form + form, .record p + form { margin-top: 10px; }
@media (max-width: 480px) {
  .record form { width: 100%; }
}
/* One choice on the relationships page: what it is now, then its button. */
.picked { margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); }
.picked p { margin: 0 0 6px; }
.picked p.when { color: var(--ink); font-size: 14px; }
.picked form { margin: 8px 0 0; }
.picked button { padding: 8px 14px; font-size: 14px; }

.grades { list-style: none; margin: 0 0 28px; padding: 0; }
.grades li {
  margin: 0 0 12px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.grades p { margin: 0; }
.grades .stars { color: var(--amber); font-size: 18px; margin: 4px 0 8px; }
.grades .label, .note .label { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.record .note {
  margin: 10px 0 0;
  padding: 10px 14px;
  border-left: 3px solid var(--amber);
  background: transparent;
}
.record .note .hint { margin-top: 4px; }

/* A publisher's page of what it has earned: a choice, and plain tables. */
.choose { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0 0 24px; }
.choose label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.choose select {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 150px;
}
.owed { font-size: 32px; color: var(--amber); }
@media (max-width: 480px) {
  .choose label, .choose select { width: 100%; }
}

/* One specialist on the specialists page: a header with its access, the
   access block, a compact group of settings, and a quiet footer. */
.spec-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.spec .who { font-size: 16px; }
.spec .who .what { font-size: 14px; }
.spec p.access { margin: 6px 0 0; font-size: 15px; }
.spec-buy { margin: 14px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.spec-buy .buy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.spec-buy .buy-row form { margin: 0; width: auto; }
.spec-buy .buy-row button { width: auto; padding: 9px 18px; }
.spec-buy .price { font-weight: 500; }
.spec-buy .hint { margin: 8px 0 0; font-size: 12px; }
.spec-buy .lapse { margin: 0; font-size: 14px; color: var(--ink); }
.spec-buy .buy + .lapse { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.spec h3.sub { margin: 18px 0 0; font-size: 12px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.spec .settings { margin: 4px 0 0; }
.spec .picked, .spec .settings > p.when {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 14px;
  margin: 0;
  padding: 9px 0;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}
.spec .picked p { margin: 0; flex: 1 1 220px; }
.spec .picked p.when, .spec .settings > p.when { font-size: 14px; color: var(--ink); }
.spec .picked p.hint { order: 2; flex-basis: 100%; }
.spec .picked form { order: 1; flex: 0 0 auto; width: auto; margin: 0; }
.spec .picked button { width: auto; padding: 4px 12px; font-size: 13px; color: var(--muted); }
.spec .picked button:hover { color: var(--ink); border-color: var(--muted); }
.spec-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; margin: 10px 0 0; }
.spec-foot p.when { margin: 0; }
.spec-foot details { margin: 0; }
.spec-foot details[open] { flex: 1 1 100%; }
.spec-foot details form { width: auto; }
@media (max-width: 480px) {
  .spec .picked form, .spec .picked button, .spec-buy .buy-row form, .spec-buy .buy-row button, .spec-foot details form { width: auto; }
}
.spec-buy ul.lapse { margin: 0; padding: 0 0 0 18px; list-style: disc; font-size: 14px; color: var(--ink); }
.spec-buy ul.lapse li { margin: 0 0 6px; padding: 0; border: 0; border-radius: 0; background: none; }
.spec-buy ul.lapse li:last-child { margin: 0; }
.spec-buy .buy + ul.lapse { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.spec-buy .closed { margin: 0; font-size: 14px; color: var(--ink); }
.spec-buy .closed + .closed, .spec-buy .buy + .closed, .spec-buy ul.lapse + .closed { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ==========================================================================
   The signed-in pages. They carry `body.app` and the top bar; the pages that
   are reached by an emailed link, and the sign-in and error pages, do not, so
   nothing below changes them. Colours come from the custom properties at the
   top of this file.
   ========================================================================== */

/* --- The top bar: logo, four tabs, account menu --------------------------- */
.appbar { border-bottom: 1px solid var(--hair); }
.appbar-in {
  max-width: var(--page);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  gap: 8px 20px;
}
.brand {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand img { display: block; }
.tabs { flex: 1 1 auto; min-width: 0; display: flex; gap: 4px; }
.tab {
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.tab:hover { color: var(--ink); background: rgba(240, 238, 230, 0.05); }
.tab[aria-current="page"] { color: var(--ink); background: var(--raise); }
body.app a:focus-visible, body.app summary:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.menu { position: relative; flex: 0 1 auto; min-width: 0; }
.menu-btn {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 280px;
  padding: 6px 12px 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}
.menu-btn::-webkit-details-marker { display: none; }
.menu-btn:hover, .menu[open] .menu-btn { background: var(--panel); border-color: #3a3a33; }
.menu-btn[aria-current="page"] { border-color: var(--amber); }
.menu-email { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-area {
  flex: none;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--amber);
  color: var(--amber-ink);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
}
.chev {
  flex: none;
  width: 6px;
  height: 6px;
  margin: -3px 2px 0 0;
  border: solid var(--muted);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.menu[open] .chev { margin-top: 3px; transform: rotate(-135deg); }
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  min-width: 200px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
}
body.app .menu-panel a, body.app .menu-panel button.quiet {
  display: block;
  width: 100%;
  margin: 0;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
body.app .menu-panel a:hover, body.app .menu-panel button.quiet:hover { background: var(--raise); }
body.app .menu-panel a:focus-visible, body.app .menu-panel button.quiet:focus-visible { outline-offset: -2px; }
.menu-panel form { display: block; margin: 0; }
.menu-panel a ~ form { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--hair); }

/* On a phone the bar takes two rows: logo and menu, then the four tabs, which
   scroll sideways inside their own row if they do not fit. */
@media (max-width: 640px) {
  .appbar-in { flex-wrap: wrap; padding: 10px var(--gutter) 8px; }
  .brand { order: 1; }
  .menu { order: 2; margin-left: auto; }
  .menu-btn { max-width: calc(100vw - 172px); }
  .tabs {
    order: 3;
    flex: 1 1 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
  }
  .tabs { gap: 2px; }
  .tab { flex: 1 0 auto; padding: 7px 9px; font-size: 13px; text-align: center; }
}

/* --- Page frame, title and lede ----------------------------------------- */
/* One width for the bar and the page, so that their edges line up: set once
   here, wider for the pages that hold wide tables. */
body.app { --page: 1100px; --gutter: 20px; --measure: 72ch; }
body.app:has(main.wide) { --page: 1280px; }
@media (max-width: 640px) { body.app { --gutter: 16px; } }
body.app main { max-width: var(--page); padding: 32px var(--gutter) 80px; }
body.app h1, .page-title {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
}
body.app .lede, .page-lede { max-width: 70ch; margin: 0 0 24px; font-size: 15px; color: var(--muted); }
body.app h2 { margin: 0 0 10px; font-size: 16px; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 0 0 8px; }
.title-row h1 { margin: 0; }
@media (max-width: 480px) {
  body.app main { padding: 24px var(--gutter) 64px; }
  body.app h1, .page-title { font-size: 23px; }
  /* A choice beside the title goes under it, label and button on one line. */
  .title-row .choose { flex: 1 1 100%; flex-wrap: nowrap; }
  .title-row .choose label { flex: 1 1 auto; width: auto; min-width: 0; }
}

/* --- Card ---------------------------------------------------------------- */
.card, body.app section.terms {
  margin: 0 0 20px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
/* The delete pages show their text in a box of its own: no card around it. */
body.app section.terms:has(> .text) { padding: 0; border: 0; background: none; }
.card > h2, body.app section.terms > h2 { margin: 0 0 12px; font-size: 16px; }
.card > ul, body.app section.terms > ul { list-style: none; margin: 0; padding: 0; color: var(--ink); }
.card > ul > li, body.app section.terms > ul > li { margin: 0; padding: 9px 0; border-top: 1px solid var(--hair); font-size: 14px; }
.card > ul > li:first-child, body.app section.terms > ul > li:first-child { padding-top: 0; border-top: 0; }
.card > ul > li:last-child, body.app section.terms > ul > li:last-child { padding-bottom: 0; }
.card > :last-child, body.app section.terms > :last-child { margin-bottom: 0; }
.card .record, section.terms .record { margin: 12px 0 0; }
.card .record > li, section.terms .record > li { background: var(--bg); border-color: var(--hair); }
.card .record > li.from-kovrex, section.terms .record > li.from-kovrex { border-color: var(--amber); }

/* --- Table, in a box that scrolls sideways when it must ------------------- */
.table-wrap { overflow-x: auto; margin: 0 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
/* Inside a card the table runs edge to edge, under the heading. */
.card .table-wrap, section.terms .table-wrap { margin: 12px -20px; border: 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); border-radius: 0; background: none; }
.card .table-wrap:last-child, body.app section.terms .table-wrap:last-child { margin-bottom: -16px; border-bottom: 0; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 9px; text-align: left; vertical-align: middle; white-space: nowrap; border-bottom: 1px solid var(--hair); }
.table th { background: rgba(240, 238, 230, 0.03); color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0.02em; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr:last-child > td { border-bottom: 0; }
.table td.wrap { min-width: 240px; white-space: normal; }
.table tr.total td { background: rgba(240, 238, 230, 0.03); font-weight: 600; }
.table tr.test td { color: var(--muted); }
.mono { font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; }
@media (max-width: 480px) {
  .table { font-size: 13px; }
  .table th, .table td { padding: 9px 12px; }
}

/* --- Pill: neutral, amber for attention, green for fine ------------------- */
.pill {
  flex: none;
  display: inline-block;
  padding: 1px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  line-height: 20px;
  color: var(--muted);
  white-space: nowrap;
}
/* Tones: pill-yes and pill-attention are amber, pill-ok green; pill-no and pill-free stay neutral. */
.pill.pill-attention, .pill.pill-yes { color: var(--amber); border-color: var(--amber); background: var(--amber-bg); }
.pill.pill-ok { color: var(--ok); border-color: var(--ok-line); background: var(--ok-bg); }
/* The small mark on a sale: Live, or Test (dashed, because it is not real money). */
.badge { display: inline-block; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; line-height: 18px; color: var(--muted); }
.badge.test { border-style: dashed; border-color: var(--amber); color: var(--amber); }

/* --- Buttons: amber primary, outlined secondary, a small size -------------- */
.btn, body.app button {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover, body.app button:hover { border-color: var(--muted); }
.btn.btn-primary, body.app button.primary { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
.btn.btn-primary:hover, body.app button.primary:hover { filter: brightness(1.08); }
.btn.btn-sm, body.app button.quiet { padding: 5px 12px; font-size: 13px; }
body.app button.quiet { color: var(--muted); }
body.app button.quiet:hover { color: var(--ink); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 480px) {
  body.app button { width: auto; }
}

/* --- Stat tile ----------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0 0 24px; }
.stat { margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.stat dt, .stat .stat-label { margin: 0 0 4px; font-size: 12px; color: var(--muted); }
.stat dd, .stat .stat-num { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat.stat-accent dd { color: var(--amber); }

/* --- "Not real money" banner (staff and publisher pages) ------------------ */
.notreal { margin: 0 0 12px; padding: 10px 14px; border: 1px dashed var(--amber); border-radius: 8px; color: var(--amber); font-size: 14px; }

/* --- The month (and specialist) choice ----------------------------------- */
body.app .choose { margin: 0 0 20px; }
.title-row .choose { margin: 0; }
.title-row .choose label { flex-direction: row; align-items: center; gap: 8px; }
body.app .choose select { border-color: var(--line); border-radius: 8px; padding: 7px 10px; color-scheme: dark; }
body.app .choose button { padding: 8px 14px; }
body.app .choose select:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.test-mode .table tr.test td { color: var(--muted); }

/* --- Lists of conversations, publishers, and the rows other pages share --- */
body.app .list li { margin: 0 0 10px; }
body.app .list a { padding: 14px 18px; }
.list .meta.pill { width: fit-content; margin-top: 8px; font-size: 12px; }
body.app .record > li:not(.spec) { margin: 0 0 10px; }
body.app .record > li:not(.spec) .who { font-size: 15px; }
body.app main > details { margin: 0 0 20px; font-size: 14px; }
body.app summary { color: var(--muted); }
body.app summary:hover { color: var(--ink); }

body.app section.terms > ul + p, .card > ul + p { margin-top: 12px; }
body.app section.terms > ul + h2, .card > ul + h2 { margin-top: 24px; }

/* --- Use the width: columns and grids on a desktop, one column on a phone --- */
/* Long text keeps a readable line, left-aligned, however wide the page is. */
body.app main p:not(.notreal), body.app main .said { max-width: var(--measure); }
body.app .spec p { max-width: none; }
.card > ul > li, body.app section.terms > ul > li { padding-right: max(0px, calc(100% - 75ch)); }
body.app .facts { max-width: 780px; }
@media (min-width: 900px) {
  /* Conversations: the filters in two rows, the list as columns. */
  body.app .filters { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  body.app .filters label { grid-column: span 3; }
  body.app .filters .wide { grid-column: span 6; }
  body.app .filters .actions { grid-column: span 6; align-self: end; }
  body.app .list a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1.6fr); column-gap: 20px; align-items: baseline; }
  body.app .list a > * { grid-column: 1 / -1; }
  body.app .list a > .name { grid-column: 1; }
  body.app .list a > .by { grid-column: 2; }
  body.app .list a > .last { grid-column: 3; }
  /* Memories, assistants and specialists: cards side by side. */
  body.app .record.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 12px; align-items: start; }
  body.app .record.cards > li { margin: 0; }
  /* One conversation: a chat, the assistant on the left, the specialist on the right. */
  body.app main > ol.record > li { max-width: 780px; }
  body.app main > ol.record > li.from-specialist { margin-left: auto; }
}
body.app h1 + .list { margin-top: 16px; }
