/* PrunePosts — "The Editor's Desk"
   Warm paper and ink, one teal accent for actions, ochre to terracotta for
   severity (always paired with a label and icon), and saturated red only on
   the final delete button. Mirrors the Claude Design canvas. */

:root {
  --paper: #F5F1E8;
  --raised: #FBF9F4;
  --white: #FFFFFF;
  --rule: #DDD5C6;
  --rule-2: #C9BFAD;
  --rule-soft: #E7E0D3;
  --track: #E4DCCD;
  --scrim: #BDB5A6;

  --ink: #1D2530;
  --ink-2: #46505C;
  --ink-3: #5B6470;

  --teal: #145E59;
  --teal-hover: #0F4C48;
  --teal-tint: #E2ECE7;

  --high: #9A3A22;
  --high-tint: #F4E1D8;
  --high-line: #E3BFAE;
  --med: #8A5A10;
  --med-ink: #6E4709;
  --med-tint: #F3E6CC;
  --med-line: #E2CC9E;
  --low: #5F5A3C;
  --low-tint: #EAE6D6;
  --low-line: #D4CDB4;

  --danger: #B3261E;
  --danger-hover: #92201A;
  --danger-tint: #F7DEDB;
  --danger-ink: #8C1D18;
  --ok: #2E6B4A;
  --ok-tint: #E1EDE4;
  --ok-ink: #245A3C;

  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Schibsted Grotesk', 'Segoe UI', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', Consolas, 'Courier New', monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-hover); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 6px; }
button { font-family: inherit; }
h1, h2, h3, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-2); }
.caption { font-size: 14px; color: var(--ink-3); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* --- top bar --------------------------------------------------------------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  height: 72px; padding: 0 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: var(--paper); border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-name { font-family: var(--serif); font-size: 27px; letter-spacing: -0.01em; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper a { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink-3); text-decoration: none; min-height: 44px; }
.stepper .dot { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; border: 1px solid var(--rule-2); }
.stepper a.done { color: var(--ink-2); }
.stepper a.done .dot { background: var(--teal-tint); border-color: var(--teal-tint); }
.stepper a.current { color: var(--teal); font-weight: 700; }
.stepper a.current .dot { background: var(--teal); border-color: var(--teal); color: var(--white); font-weight: 700; }
.stepper .line { width: 32px; height: 1px; background: var(--rule-2); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.status-dot { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.status-dot.ok::before { background: var(--ok); }
.status-dot.warn::before { background: var(--med); }
.account-chip { display: flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; border: 1px solid var(--rule); border-radius: 999px; background: var(--raised); font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; }
.account-chip .avatar { width: 26px; height: 26px; border-radius: 50%; background: #D9D1C1; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.icon-link { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; color: var(--ink-2); }
.icon-link:hover { background: var(--raised); color: var(--ink); }

/* --- layout ------------------------------------------------------------------- */

.page { padding: 56px 96px 64px; max-width: 1440px; margin: 0 auto; }
.page.narrow { max-width: 1040px; }
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; row-gap: 28px; }
.span-7 { grid-column: span 7; }
.span-5 { grid-column: span 5; }
.span-4-end { grid-column: 9 / span 4; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 28px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); }
.label { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.display { font-family: var(--serif); font-weight: 400; font-size: 66px; line-height: 1.02; letter-spacing: -0.015em; text-wrap: balance; }
.display em { color: var(--teal); }
.h1 { font-family: var(--serif); font-weight: 400; font-size: 50px; line-height: 1.05; letter-spacing: -0.01em; text-wrap: balance; }
.h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.1; }
.lede { font-size: 18px; line-height: 1.55; color: var(--ink-2); max-width: 760px; text-wrap: pretty; }
.numeral { font-family: var(--serif); line-height: 1; }

/* --- buttons ------------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent;
  font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn svg { flex-shrink: 0; }
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-hover); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--ink); border-color: var(--rule-2); font-size: 15px; }
.btn-secondary:hover { border-color: var(--ink-3); color: var(--ink); }
.btn-quiet { background: none; color: var(--teal); padding: 0 12px; font-size: 15px; }
.btn-quiet:hover { color: var(--teal-hover); text-decoration: underline; }
.btn-danger { background: var(--danger); color: var(--white); font-weight: 700; }
.btn-danger:hover { background: var(--danger-hover); color: var(--white); }
.btn-light { background: var(--paper); color: var(--ink); font-weight: 700; }
.btn-light:hover { background: var(--white); color: var(--ink); }
.btn-outline-light { background: transparent; color: var(--paper); border-color: #56606C; font-size: 15px; }
.btn-outline-light:hover { border-color: var(--paper); color: var(--paper); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--track); color: var(--ink-3); border-color: transparent; cursor: not-allowed; }

/* --- cards & panels ------------------------------------------------------------ */

.card { background: var(--raised); border: 1px solid var(--rule); border-radius: 16px; padding: 28px; }
.card-outline { border: 1px solid var(--rule); border-radius: 16px; padding: 24px 28px; }
.card-accent { background: var(--raised); border: 1.5px solid var(--teal); border-radius: 18px; padding: 30px 32px; }
.card-dark { background: var(--ink); color: var(--paper); border-radius: 20px; padding: 34px 32px; }
.card-dark .label { color: var(--rule-2); }
.card-dark dl dt { color: var(--rule-2); }
.card-dark .rule { border-top: 1px solid #3A4450; }

.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip-tag { border: 1px solid var(--rule-2); color: var(--ink-2); font-weight: 500; }
.chip-teal { background: var(--teal-tint); color: var(--teal-hover); }
.chip-high { background: var(--high-tint); border: 1px solid var(--high-line); color: var(--high); }
.chip-medium { background: var(--med-tint); border: 1px solid var(--med-line); color: var(--med); }
.chip-low { background: var(--low-tint); border: 1px solid var(--low-line); color: var(--low); }
.chip-filtered { border: 1px dashed var(--med); color: var(--med); }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill-running { background: var(--teal-tint); color: var(--teal-hover); }
.pill-waiting { background: var(--med-tint); color: var(--med-ink); }
.pill-paused, .pill-queued { border: 1px solid var(--rule-2); color: var(--ink-2); }
.pill-done { background: var(--ok-tint); color: var(--ok-ink); }
.pill-failed, .pill-cancelled { background: var(--danger-tint); color: var(--danger-ink); }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 12px; font-size: 15px; line-height: 1.5; }
.banner svg { flex-shrink: 0; margin-top: 2px; }
.banner-info { background: var(--teal-tint); color: var(--teal-hover); }
.banner-warn { background: var(--med-tint); border: 1px solid var(--med-line); color: var(--med-ink); }
.banner-danger { background: var(--danger-tint); color: var(--danger-ink); }
.banner-plain { border: 1px solid var(--rule); color: var(--ink); }

/* --- setup checklist -------------------------------------------------------------- */

.checklist-item { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--rule); }
.checklist-item:last-child { padding-bottom: 0; }
.check-mark { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.check-mark.ok { background: var(--teal-tint); }
.check-mark.todo { border: 1.5px dashed var(--rule-2); }
.check-mark.bad { background: var(--danger-tint); }
.checklist-text { flex-grow: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.checklist-text strong { font-size: 15px; font-weight: 600; }
.privacy-row { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; }
.privacy-row svg { flex-shrink: 0; margin-top: 1px; }
.steps { list-style: none; margin: 56px 0 0; padding: 28px 0 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.steps li { display: flex; flex-direction: column; gap: 8px; }
.steps .numeral { font-size: 40px; color: var(--teal); }
.steps strong { font-size: 16px; }
.steps span { font-size: 15px; color: var(--ink-2); }

/* --- import ------------------------------------------------------------------------ */

.dropzone { position: relative; min-height: 176px; border: 1.5px dashed var(--rule-2); border-radius: 14px; background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; text-align: center; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.dropzone:hover, .dropzone.over { border-color: var(--teal); background: var(--teal-tint); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone:focus-within { outline: 2px solid var(--teal); outline-offset: 2px; }
.dropzone strong { font-size: 17px; }
.dropzone-sm { min-height: 132px; }

/* Connect page: sign in with X, or the one-time developer-app setup. */
.btn-x { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 26px; border-radius: 999px; background: #000; color: #fff; font-size: 17px; font-weight: 700; text-decoration: none; }
.btn-x:hover, .btn-x:focus-visible { background: #2A2A2A; color: #fff; }
.connected-row { display: flex; align-items: center; gap: 14px; }
.connected-row .btn { margin-left: auto; }
.connect-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; counter-reset: cs; }
.connect-steps > li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; counter-increment: cs; }
.connect-steps > li::before { content: counter(cs); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--teal-tint); color: var(--teal-hover); font: 600 14px/1 var(--mono); }
.connect-steps > li > div { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.connect-steps span { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.copy-row { display: flex; gap: 8px; width: 100%; }
.copy-row .input { flex: 1; min-width: 0; height: 44px; font-size: 13px; }
.key-form { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.key-form .input { height: 46px; font-size: 15px; }
.key-form .btn { align-self: flex-start; }
.mini-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.mini-steps a { font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0; }
.stat { display: flex; flex-direction: column-reverse; gap: 2px; }
.stat dt { font-size: 13px; color: var(--ink-3); }
.stat dd { margin: 0; font-family: var(--serif); font-size: 34px; line-height: 1; }
.summary-strip { background: var(--raised); border: 1px solid var(--rule); border-radius: 16px; padding: 22px 28px; display: flex; align-items: center; gap: 40px; }

/* --- forms ---------------------------------------------------------------------------- */

fieldset { margin: 0; padding: 0; border: none; min-width: 0; }
legend { padding: 0; margin-bottom: 12px; }
.option { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 16px; border: 1px solid var(--rule); border-radius: 12px; background: var(--raised); font-size: 15px; cursor: pointer; }
.option.muted-option { background: transparent; border-style: dashed; border-color: var(--rule-2); }
.option input { width: 18px; height: 18px; accent-color: var(--teal); flex-shrink: 0; }
.option .grow { flex-grow: 1; display: flex; flex-direction: column; }
.option-card { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; border: 1px solid var(--rule); border-radius: 14px; cursor: pointer; }
.option-card:has(input:checked) { border: 1.5px solid var(--teal); background: var(--raised); }
.option-card input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--teal); flex-shrink: 0; }
.option-card .price { font-family: var(--serif); font-size: 28px; line-height: 1.1; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 15px; font-weight: 600; }
.input { height: 50px; padding: 0 16px; border: 1.5px solid var(--rule-2); border-radius: 12px; background: var(--white); font: 17px var(--mono); color: var(--ink); }
.input:focus { border-color: var(--ink); outline: none; }
select.input { font-family: var(--sans); font-size: 15px; }
input[type="range"] { accent-color: var(--teal); width: 100%; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* --- progress ---------------------------------------------------------------------------- */

.progress { height: 10px; border-radius: 999px; background: var(--track); overflow: hidden; }
.progress > div { height: 100%; border-radius: 999px; background: var(--teal); transition: width .4s ease; }
.progress.thin { height: 8px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; }
.tile { display: flex; flex-direction: column-reverse; gap: 4px; padding: 18px 20px; border: 1px solid var(--rule); border-radius: 14px; background: var(--raised); }
.tile dt { font-size: 13px; color: var(--ink-3); }
.tile dd { margin: 0; font-family: var(--serif); font-size: 40px; line-height: 1; }
.tile.bad { border-color: var(--high-line); background: #F9EEE8; }
.tile.bad dt, .tile.bad dd { color: var(--high); }
.big-count { display: flex; align-items: baseline; gap: 14px; }
.big-count .numeral { font-size: 120px; line-height: 0.9; letter-spacing: -0.02em; }
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--rule-soft); font-size: 14px; }
.log .ok { color: var(--ok); font-weight: 600; font-size: 13px; }
.log .gone { color: var(--ink-3); font-weight: 600; font-size: 13px; }
.log .failed { color: var(--danger-ink); font-weight: 600; font-size: 13px; }

/* --- review --------------------------------------------------------------------------------- */

.review-page { padding: 36px 48px 140px; max-width: 1440px; margin: 0 auto; }
/* The divider is an inset shadow so the active tab's underline can sit on it
   without overflowing (which would show a scrollbar on Windows). */
.tabs { display: flex; gap: 32px; box-shadow: inset 0 -1px 0 var(--rule); margin-top: 22px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tab { min-height: 48px; padding: 0; border: none; border-bottom: 2px solid transparent; background: none; font-size: 15px; font-weight: 500; color: var(--ink-2); display: flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; }
.tab .mono { font-size: 13px; }
.tab[aria-selected="true"] { border-bottom-color: var(--ink); font-weight: 700; color: var(--ink); }
.review-grid { display: grid; grid-template-columns: 256px minmax(0, 1fr); gap: 48px; margin-top: 28px; }
.cat-rail { display: flex; flex-direction: column; gap: 2px; align-self: start; position: sticky; top: 96px; }
.cat-rail .label { padding: 0 12px 10px; }
.cat { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 12px; border: none; border-radius: 10px; background: transparent; color: var(--ink); font-size: 15px; font-weight: 500; text-align: left; cursor: pointer; }
.cat:hover { background: var(--raised); }
.cat .mono { font-size: 13px; color: var(--ink-3); }
.cat[aria-current="true"] { background: var(--teal-tint); color: var(--teal-hover); font-weight: 700; }
.cat[aria-current="true"] .mono { color: var(--teal-hover); }
.cat-note { margin: 14px 12px 0; font-size: 13px; line-height: 1.5; color: var(--ink-3); }
.bulk { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 4px 0 14px; font-size: 14px; color: var(--ink-2); }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 48px; padding: 26px 0; border-top: 1px solid var(--rule); }
.entry-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font: 13px var(--mono); color: var(--ink-3); }
.entry-meta a { margin-left: auto; font: 600 13px var(--sans); display: inline-flex; align-items: center; gap: 4px; }
.entry-text { margin-top: 12px; font-size: 19px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; text-wrap: pretty; }
.entry-media { margin-top: 8px; font-size: 13px; color: var(--ink-3); }
.veil { position: relative; margin-top: 12px; min-height: 72px; }
.veil .entry-text { margin-top: 0; filter: blur(7px); user-select: none; }
.veil-cover { position: absolute; inset: 0; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.veil-cover span { padding: 3px 8px; border-radius: 6px; background: var(--paper); font-size: 14px; color: var(--ink-2); }
.note { display: flex; flex-direction: column; gap: 12px; }
.note-cat { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.note-text { font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.25; }
.note-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.note-meta .mono { font-size: 13px; color: var(--ink-2); }
.needs-call { font-size: 13px; font-weight: 700; color: var(--med); }
.decision { display: flex; gap: 8px; }
.decision button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border-radius: 10px; border: 1px solid var(--rule-2); background: transparent; color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer; }
.decision button:hover { border-color: var(--ink-3); }
.decision .keep[aria-pressed="true"] { border: 1.5px solid var(--teal); background: var(--teal-tint); color: var(--teal-hover); font-weight: 700; }
.decision .del[aria-pressed="true"] { border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); font-weight: 700; }
.empty { padding: 56px 0; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 8px; }
.empty .h2 { font-size: 32px; }
.load-more { padding: 24px 0; border-top: 1px solid var(--rule); }
.bottombar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; min-height: 96px; padding: 14px 48px; background: var(--ink); color: var(--paper); display: flex; align-items: center; gap: 24px; }
.bottombar .numeral { font-size: 56px; }
.bottombar .sub { font-size: 14px; color: var(--rule-2); }
.bottombar .spacer { margin-left: auto; font-size: 14px; color: var(--rule-2); text-align: right; }

/* --- confirm --------------------------------------------------------------------------------- */

.confirm-wrap { min-height: calc(100vh - 72px); background: var(--scrim); padding: 48px 24px; display: flex; justify-content: center; align-items: flex-start; }
.confirm { width: 100%; max-width: 700px; padding: 40px 44px 36px; background: var(--raised); border-radius: 22px; box-shadow: 0 30px 80px rgba(29, 37, 48, 0.28); display: flex; flex-direction: column; gap: 24px; }
.table { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; font-size: 15px; border-top: 1px solid var(--rule); }
.table dt, .table dd { padding: 10px 0; border-bottom: 1px solid var(--rule); margin: 0; }
.table dd { font-family: var(--mono); text-align: right; }
.table .total { border-top: 1px solid var(--ink); font-weight: 700; }
.step-num { font-family: var(--mono); color: var(--teal); margin-right: 8px; }
.confirm .option.live:has(input:checked) { border: 1.5px solid var(--ink); }

/* --- toast ------------------------------------------------------------------------------------- */

#toast { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; max-width: 560px; padding: 12px 18px; border-radius: 12px; background: var(--ink); color: var(--paper); font-size: 15px; box-shadow: 0 12px 32px rgba(29, 37, 48, 0.25); }
.toast.error { background: var(--danger-ink); }

/* --- settings -------------------------------------------------------------------------------------- */

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; font-size: 15px; margin: 0; }
.kv dd { margin: 0; font-family: var(--mono); font-size: 14px; text-align: right; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* --- narrow screens ------------------------------------------------------------------------------ */

@media (max-width: 1100px) {
  .page { padding: 40px 32px 56px; }
  .review-page { padding: 28px 24px 140px; }
  .topbar { padding: 0 24px; }
  .stepper .line { width: 16px; }
  .entry { grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; }
}

@media (max-width: 860px) {
  .topbar { height: 64px; padding: 0 16px; }
  .stepper { display: none; }
  .status-dot { display: none; }
  .page { padding: 28px 16px 48px; }
  .review-page { padding: 20px 16px 132px; }
  .grid-12 { grid-template-columns: minmax(0, 1fr); }
  .span-7, .span-5, .span-4-end { grid-column: 1 / -1; }
  .display { font-size: 42px; }
  .h1 { font-size: 34px; }
  .steps { grid-template-columns: minmax(0, 1fr); margin-top: 36px; }
  .stat-row, .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-strip { flex-direction: column; align-items: stretch; gap: 20px; }
  .review-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .cat-rail { position: static; flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 4px; }
  .cat-rail .label, .cat-note { display: none; }
  .cat { width: auto; flex-shrink: 0; min-height: 40px; border: 1px solid var(--rule-2); border-radius: 999px; padding: 0 14px; font-size: 14px; }
  .cat[aria-current="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .cat[aria-current="true"] .mono { color: var(--paper); }
  .entry { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .note { padding-top: 12px; border-top: 1px dashed var(--rule); }
  .note-text { font-size: 19px; }
  .entry-text { font-size: 17px; }
  .decision button { min-height: 48px; }
  .bottombar { padding: 12px 16px 18px; gap: 14px; }
  .bottombar .numeral { font-size: 34px; }
  .bottombar .spacer, .bottombar .sub { display: none; }
  .confirm { padding: 28px 20px; }
  .settings-grid, .two-col { grid-template-columns: minmax(0, 1fr); }
  .big-count .numeral { font-size: 84px; }
}
