/* TurnWise app: dashboard, admin, login */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--navy) 248px, transparent 248px); }

/* Sidebar */
.side { background: var(--navy); color: #c8cdea; padding: 22px 16px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.brand { font: 800 22px/1 var(--display); color: #fff; text-decoration: none; letter-spacing: -0.03em; padding: 0 8px; }
.brand b { color: var(--highlight); font-weight: 800; }
.biz { padding: 12px; border-radius: var(--r); background: var(--navy-2); }
.biz strong { display: block; color: #fff; font-size: 15px; line-height: 1.25; }
.biz span { font-size: 13px; color: #8b92bd; }
.nav { display: grid; gap: 2px; }
.nav button, .nav a { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: var(--r); border: 0;
  background: none; color: #c8cdea; font: 500 15px var(--body); text-align: left; cursor: pointer; text-decoration: none; }
.nav button:hover, .nav a:hover { background: var(--navy-2); color: #fff; }
.nav button[aria-current="page"] { background: var(--navy-3); color: #fff; font-weight: 600; }
.nav svg { width: 19px; height: 19px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.mode-badge { font-size: 12px; line-height: 1.35; color: var(--navy); background: var(--highlight); padding: 8px 10px; border-radius: var(--r-sm); }
.mode-badge a { color: var(--navy); font-weight: 700; }
.side .btn.secondary { background: transparent; color: #c8cdea; border-color: #2a3270; }

/* Mobile chrome */
.topbar, .tabbar { display: none; }

/* Main */
.main { padding: 32px clamp(16px, 3.5vw, 44px) 80px; max-width: 1240px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: clamp(26px, 3vw, 34px); margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--ink-3); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Headline saving: the one bold moment of the dashboard */
.headline { background: var(--navy); color: #fff; border-radius: var(--r-lg); padding: clamp(22px, 3vw, 34px); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: end; position: relative; overflow: hidden; }
.headline p.kicker { color: #a9b0dc; margin: 0 0 6px; font-size: 15px; }
.headline .big { font: 800 clamp(44px, 7vw, 76px)/.95 var(--display); letter-spacing: -0.035em; margin: 0; }
.headline .big mark { background: none; color: var(--highlight); }
.headline .sub { color: #c8cdea; margin: 12px 0 0; max-width: 34em; }
.headline .totals { display: grid; gap: 10px; }
.headline .totals div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #222a66; padding-bottom: 8px; font-size: 15px; color: #c8cdea; }
.headline .totals strong { color: #fff; font-variant-numeric: tabular-nums; }

/* Ledger strip of figures */
.ledger { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-lg); margin-top: 16px; }
.ledger > div { padding: 16px 18px; border-left: 1px solid var(--rule); min-width: 0; }
.ledger > div:first-child { border-left: 0; }
.ledger span { display: block; font-size: 13px; color: var(--ink-3); }
.ledger strong { display: block; font: 700 26px/1.2 var(--display); letter-spacing: -0.02em; margin: 2px 0; font-variant-numeric: tabular-nums; }
.ledger small { color: var(--ink-3); font-size: 13px; }
.ledger .warn strong { color: var(--amber); }

/* Panels */
.grid { display: grid; gap: 16px; margin-top: 16px; }
.grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grid.wide-left { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 20px; min-width: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel h2 { font-size: 19px; margin: 0; }
.panel .more { font-size: 14px; }
.foot-note { font-size: 13px; color: var(--ink-3); margin: 12px 0 0; }
.empty { padding: 22px 0 8px; color: var(--ink-3); }
.empty strong { display: block; color: var(--ink); font-family: var(--display); font-size: 17px; margin-bottom: 4px; }

/* Ruled list rows (like invoice lines) */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { border-top: 1px solid var(--rule-2); padding: 12px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; }
.rows > li:first-child { border-top: 0; padding-top: 4px; }
.rows .title { font-weight: 600; }
.rows .meta { grid-column: 1; font-size: 13px; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.rows .amt { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.rows .amt.pos { color: var(--saved); }
.rows .row-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.rows button.rowlink { all: unset; cursor: pointer; display: contents; }

.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--indigo-tint); color: var(--indigo); white-space: nowrap; }
.tag.billing_error, .tag.short_delivery { background: var(--pen-tint); color: #a3122a; }
.tag.credit, .tag.supplier_switch { background: var(--saved-tint); color: #066b43; }
.tag.price_rise { background: var(--highlight-soft); color: #6b5300; }
.status { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-sm); background: var(--rule-2); color: var(--ink-2); white-space: nowrap; }
.status.open, .status.query, .status.received { background: var(--amber-tint); color: var(--amber); }
.status.claimed { background: var(--indigo-tint); color: var(--indigo); }
.status.saved, .status.checked { background: var(--saved-tint); color: #066b43; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 13px; font-weight: 600; color: var(--ink-3); padding: 8px 10px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--rule-2); vertical-align: middle; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover td { background: #f8f9fc; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.up { color: var(--pen); font-weight: 600; }
.down { color: var(--saved); font-weight: 600; }
.below { background: var(--highlight-soft); }

/* Charts */
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: #c9cdf6; }
.chart .bar.now { fill: var(--indigo); }
.chart .axis { stroke: var(--rule); }
.chart text { font: 15px var(--body); fill: var(--ink-3); }
.chart text.val { fill: var(--ink); font-weight: 600; }
.spark { width: 96px; height: 28px; display: block; }
.spark path { fill: none; stroke: var(--ink-3); stroke-width: 1.6; }
.spark.rising path { stroke: var(--pen); }
.spark.falling path { stroke: var(--saved); }
.hbars { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.hbars li { display: grid; grid-template-columns: minmax(90px, 140px) minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 15px; }
.hbars .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbars .track { height: 10px; border-radius: 5px; background: var(--rule-2); overflow: hidden; }
.hbars .fill { display: block; height: 100%; background: var(--indigo); border-radius: 5px; }
.hbars .v { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Toolbar, chips */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input[type=search] { max-width: 280px; }
.toolbar select { width: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--rule); background: var(--sheet); color: var(--ink-2); border-radius: 999px; padding: 6px 12px; font: 500 14px var(--body); cursor: pointer; min-height: 34px; }
.chip[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Upload drop zone */
.drop { border: 2px dashed #c1c7d8; border-radius: var(--r-lg); padding: 22px; text-align: center; background: #fafbfd; transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--indigo-2); background: var(--indigo-tint); }
.drop .drop-title { font: 700 18px var(--display); margin: 0 0 4px; }
.drop p { color: var(--ink-3); margin: 0 0 14px; font-size: 14px; }
.drop .chosen { font-weight: 600; color: var(--ink); margin: 10px 0 0; }
.upload-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 14px; text-align: left; }

/* Drawer (invoice detail) */
dialog.drawer { margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(560px, 100%); border: 0; padding: 0; background: var(--sheet); color: var(--ink); }
dialog.drawer::backdrop { background: rgba(5, 8, 22, .45); }
dialog.drawer[open] { animation: slidein .22s ease-out; }
@keyframes slidein { from { transform: translateX(40px); opacity: .4; } }
.drawer-inner { display: flex; flex-direction: column; height: 100%; }
.drawer-head { padding: 20px 22px; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.drawer-head h2 { margin: 0; font-size: 22px; }
.drawer-body { padding: 18px 22px 30px; overflow-y: auto; display: grid; gap: 18px; align-content: start; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 15px; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 600; }
.close-x { border: 1px solid var(--rule); background: var(--sheet); border-radius: var(--r); width: 40px; height: 40px; cursor: pointer; font-size: 20px; line-height: 1; color: var(--ink-2); }

/* Test-mode / demo strip */
.strip { background: var(--highlight); color: var(--navy); font-size: 14px; padding: 9px 16px; text-align: center; font-weight: 500; }
.strip a { color: var(--navy); font-weight: 700; }

/* Calculator */
.calc { display: grid; gap: 12px; }
.calc-out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--rule); border-radius: var(--r); }
.calc-out div { padding: 12px; border-left: 1px solid var(--rule); }
.calc-out div:first-child { border-left: 0; }
.calc-out span { display: block; font-size: 13px; color: var(--ink-3); }
.calc-out strong { font: 700 22px var(--display); font-variant-numeric: tabular-nums; }

/* Auth page */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-art { background: var(--navy); color: #fff; padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.auth-art h2 { font-size: clamp(30px, 3.6vw, 46px); max-width: 12em; }
.auth-art p { color: #a9b0dc; max-width: 30em; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(400px, 100%); }
.auth-card h1 { font-size: 30px; }
.auth-card .lead { color: var(--ink-3); }
.notice { border-radius: var(--r); padding: 12px 14px; font-size: 14px; margin-bottom: 16px; background: var(--highlight-soft); color: #4d3c00; }
.notice.err { background: var(--pen-tint); color: #8e0f24; }

/* Admin specifics */
.cust-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cust-list button { width: 100%; text-align: left; border: 1px solid transparent; background: none; padding: 10px 12px; border-radius: var(--r); font: 500 15px var(--body); color: var(--ink); cursor: pointer; display: grid; }
.cust-list button span { font-size: 13px; color: var(--ink-3); }
.cust-list button[aria-current="true"] { background: var(--indigo-tint); border-color: #d6d3fb; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); margin: 18px 0; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font: 600 15px var(--body); color: var(--ink-3); border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--indigo); }
.copybox { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); padding: 12px; font-size: 14px; white-space: pre-wrap; }

/* Responsive */
@media (max-width: 1080px) {
  .grid.two, .grid.wide-left { grid-template-columns: minmax(0, 1fr); }
  .headline { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .side { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--navy); color: #fff; padding: 12px 16px; position: sticky; top: 0; z-index: 20; }
  .topbar .who { font-size: 14px; color: #c8cdea; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar button { background: none; border: 1px solid #2a3270; color: #fff; border-radius: var(--r); width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; }
  .topbar svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; bottom: 0; left: 0; right: 0; background: var(--sheet); border-top: 1px solid var(--rule); z-index: 20; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar button { border: 0; background: none; padding: 8px 2px 9px; display: grid; justify-items: center; gap: 2px; font: 500 11px var(--body); color: var(--ink-3); cursor: pointer; min-height: 56px; }
  .tabbar button[aria-current="page"] { color: var(--indigo); font-weight: 700; }
  .tabbar svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .main { padding: 20px 16px 96px; }
  .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger > div:nth-child(3) { border-left: 0; }
  .ledger > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { padding: 24px 20px; }
  .auth-art .art-extra { display: none; }
  #toast { bottom: 76px; }
  .calc-out { grid-template-columns: minmax(0, 1fr); }
  .calc-out div { border-left: 0; border-top: 1px solid var(--rule); }
  .calc-out div:first-child { border-top: 0; }
}

/* Print: monthly report */
@media print {
  .side, .topbar, .tabbar, .strip, .actions, .no-print, #toast { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; max-width: none; }
  body { background: #fff; }
  .headline { background: #fff; color: var(--ink); border: 2px solid var(--ink); }
  .headline .big mark { color: var(--ink); background: var(--highlight); }
  .headline .sub, .headline p.kicker, .headline .totals div { color: var(--ink-2); }
  .headline .totals strong { color: var(--ink); }
  .panel, .ledger { break-inside: avoid; }
}

/* Upload feedback */
.form-msg { border-radius: var(--r); padding: 12px 14px; font-size: 15px; font-weight: 600; }
.form-msg.err { background: var(--pen-tint); color: #8e0f24; }
.form-msg.ok { background: var(--saved-tint); color: #066b43; }
.drop.has-file { border-style: solid; border-color: var(--saved); background: var(--saved-tint); }
.drop.need { border-color: var(--pen); background: var(--pen-tint); }
.success-banner { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; background: var(--saved-tint); border: 1px solid #b9e6cf; color: #064e31; border-radius: var(--r-lg); padding: 14px 18px; margin-bottom: 16px; }
.success-banner strong { font-family: var(--display); font-size: 17px; }
tr.fresh td { background: var(--highlight-soft); }
.welcome-steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 12px; }
.welcome-steps li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; column-gap: 12px; color: #c8cdea; font-size: 15px; }
.welcome-steps li::before { content: counter(s); grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; background: var(--highlight); color: var(--navy); font: 800 16px/32px var(--display); text-align: center; }
.welcome-steps strong { color: #fff; }

/* ── Admin CRM ── */
.nav a .count { margin-left: auto; background: var(--highlight); color: var(--navy); font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.nav a[aria-current="page"] { background: var(--navy-3); color: #fff; font-weight: 600; }
.ctabs { display: flex; gap: 6px; padding: 12px clamp(16px, 3.5vw, 44px) 0; flex-wrap: wrap; }
.ctab { display: inline-flex; align-items: center; border: 1px solid var(--rule); background: var(--sheet); border-radius: var(--r) var(--r) 0 0; border-bottom-width: 3px; max-width: 240px; }
.ctab a { padding: 8px 4px 8px 12px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctab button { border: 0; background: none; color: var(--ink-3); font-size: 18px; line-height: 1; padding: 6px 10px; cursor: pointer; }
.ctab.on { border-bottom-color: var(--indigo); }
.ctab.on a { color: var(--ink); }
.tabs a { padding: 10px 14px; font: 600 15px var(--body); color: var(--ink-3); border-bottom: 3px solid transparent; text-decoration: none; white-space: nowrap; }
.tabs a[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--indigo); }
.back { display: inline-block; font-size: 14px; margin-bottom: 6px; }
td .sub { font-size: 13px; color: var(--ink-3); }
tr.faded td { opacity: .55; }
tr.bad td { background: var(--pen-tint); }
.inline-select { width: auto; min-height: 36px; padding: 6px 8px; font-size: 14px; }
.status.stage-trial, .status.stage-audit, .status.stage-contacted { background: var(--indigo-tint); color: var(--indigo); }
.status.stage-customer, .status.stage-won { background: var(--saved-tint); color: #066b43; }
.status.stage-paused, .status.stage-new { background: var(--amber-tint); color: var(--amber); }
.status.stage-cancelled, .status.stage-lost { background: var(--rule-2); color: var(--ink-3); }

.review { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.review-preview { position: sticky; top: 16px; }
.review-steps { display: grid; gap: 16px; }
.preview { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); min-height: 320px; display: grid; place-items: center; overflow: hidden; }
.preview img { width: 100%; height: auto; max-height: 78vh; object-fit: contain; background: #fff; }
.preview iframe { width: 100%; height: 78vh; border: 0; background: #fff; }
.mini-steps { margin: 0; padding-left: 20px; color: var(--ink-2); display: grid; gap: 4px; }
.suggest { background: var(--highlight-soft); border-radius: var(--r); padding: 12px 14px; }
.finish { border: 2px solid var(--navy); }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.notes li { border: 1px solid var(--rule); border-radius: var(--r); padding: 12px 14px; background: var(--sheet); }
.notes li.pinned { border-color: #f0d36b; background: var(--highlight-soft); }
.notes p { margin: 0 0 6px; white-space: pre-wrap; }
.note-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }

@media (max-width: 1080px) {
  .review { grid-template-columns: minmax(0, 1fr); }
  .review-preview { position: static; }
  .preview img { max-height: 60vh; }
  .preview iframe { height: 60vh; }
}
@media (max-width: 860px) { .ctabs { padding: 10px 16px 0; } }

/* ── Invoice results (Oct 2026) ─────────────────────────────────────────── */
.nav a[aria-current="page"] { background: var(--navy-3); color: #fff; font-weight: 600; }
.status.received { background: var(--indigo-tint); color: var(--indigo); }
.status.ok { background: var(--saved-tint); color: #066b43; }
.status.checked { background: var(--pen-tint); color: #a3122a; }
.status.query { background: var(--amber-tint); color: var(--amber); }
.status-pick { width: auto; min-height: 34px; padding: 5px 30px 5px 10px; font-size: 13px; font-weight: 600; border-radius: var(--r-sm); border-color: transparent; }
.status-pick.received { background-color: var(--indigo-tint); color: var(--indigo); }
.status-pick.ok { background-color: var(--saved-tint); color: #066b43; }
.status-pick.checked { background-color: var(--pen-tint); color: #a3122a; }
.status-pick.query { background-color: var(--amber-tint); color: var(--amber); }
.result-select { font-weight: 600; }
.result-hint { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--r); background: var(--rule-2); color: var(--ink-2); font-size: 15px; }
.result-hint.up { background: var(--pen-tint); color: #a3122a; }
.result-hint.down { background: var(--saved-tint); color: #066b43; }
pre.copybox { white-space: pre-wrap; word-break: break-word; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; margin: 0; }

.count-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.count-chip { display: grid; gap: 2px; text-align: left; border: 1px solid var(--rule); background: var(--sheet); border-radius: var(--r-lg); padding: 14px 16px; font: 500 14px var(--body); color: var(--ink-3); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.count-chip strong { font: 700 26px/1.1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.count-chip:hover { border-color: var(--ink-3); }
.count-chip[aria-pressed="true"] { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.count-chip.ok strong { color: var(--saved); }
.count-chip.checked strong { color: var(--pen); }
.count-chip.query strong { color: var(--amber); }
.count-chip.received strong { color: var(--indigo); }

.result-card { border-radius: var(--r-lg); padding: clamp(20px, 3vw, 28px); background: var(--sheet); border: 1px solid var(--rule); border-left: 6px solid var(--indigo); }
.result-card h2 { font-size: clamp(22px, 2.6vw, 28px); margin: 10px 0 6px; }
.result-card p { margin: 0; color: var(--ink-2); max-width: 46em; }
.result-card.ok { border-left-color: var(--saved); background: linear-gradient(90deg, var(--saved-tint), var(--sheet) 70%); }
.result-card.checked { border-left-color: var(--pen); background: linear-gradient(90deg, var(--pen-tint), var(--sheet) 70%); }
.result-card.query { border-left-color: var(--amber); background: linear-gradient(90deg, var(--amber-tint), var(--sheet) 70%); }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 8px; text-decoration: none; }
.back::before { content: "←"; }

.next-steps { list-style: none; counter-reset: ns; margin: 0; padding: 0; display: grid; gap: 16px; }
.next-steps li { counter-increment: ns; position: relative; padding-left: 44px; color: var(--ink-2); }
.next-steps li::before { content: counter(ns); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--indigo-tint); color: var(--indigo); font: 700 15px/30px var(--display); text-align: center; }
.next-steps strong { display: block; color: var(--ink); }

@media (max-width: 760px) {
  .count-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabbar button { font-size: 11px; }
}
.danger-zone { border-color: #f3c3cb; background: linear-gradient(180deg, #fff, #fff8f9); }
.danger-zone h2 { color: #a3122a; }
.danger-zone input { max-width: 420px; }
.danger-link { color: #a3122a; }
