/* PesaLens. Palette: cool paper, ink, and a highlighter used only on numbers that matter. */
@font-face { font-family: "Schibsted Grotesk"; src: url("/static/fonts/schibsted.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/static/fonts/plexmono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/static/fonts/plexmono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --paper: #f3f5f7;
  --sheet: #ffffff;
  --ink: #111418;
  --graphite: #59626d;
  --rule: #dce1e6;
  --bubble: #e4e8ec;
  --marker: #ffe14d;
  --marker-ink: #111418;
  --in: #0a7a52;
  --bad: #b3261e;
  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1013;
    --sheet: #161a1f;
    --ink: #eceff2;
    --graphite: #98a2ad;
    --rule: #272d34;
    --bubble: #1e242b;
    --marker: #f5d531;
    --in: #3cc48d;
    --bad: #ff7a70;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
main { max-width: 1120px; margin: 0 auto; padding: 0 20px 72px; }

h1, h2 { font-weight: 800; letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.55rem); line-height: 1.03; }
h2 { font-size: 1.45rem; line-height: 1.15; margin-bottom: 18px; }
p { margin: 0 0 12px; }

/* The highlighter. Slightly irregular edges so it reads as a pen stroke, not a box. */
mark {
  color: var(--marker-ink);
  background: linear-gradient(100deg, transparent 0.15em, var(--marker) 0.2em, var(--marker) calc(100% - 0.2em), transparent calc(100% - 0.12em)) no-repeat 0 62% / 100% 78%;
  padding: 0 0.18em;
  margin: 0 -0.06em;
  border-radius: 0.3em 0.15em 0.35em 0.2em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Masthead */
.masthead { max-width: 1120px; margin: 0 auto; padding: 22px 20px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.wordmark { font-weight: 900; font-size: 1.3rem; letter-spacing: -0.04em; text-decoration: none; }
.wordmark span { font-weight: 400; }
.masthead nav { display: flex; gap: 22px; font-size: 0.95rem; }
.masthead nav a { color: var(--graphite); text-decoration: none; }
.masthead nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .masthead nav .hide-sm { display: none; } }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 72px; align-items: start; padding: 40px 0 88px; }
.lede { font-size: 1.16rem; color: var(--graphite); max-width: 34em; margin: 22px 0 30px; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding: 12px 0 64px; }
}

/* Upload */
.upload { display: grid; gap: 14px; max-width: 480px; }
.drop {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 26px 22px;
  border: 1.5px dashed color-mix(in srgb, var(--ink) 35%, transparent);
  border-radius: var(--radius);
  background: var(--sheet);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.drop:hover, .drop.over { border-color: var(--ink); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
.drop-title { font-weight: 700; font-size: 1.08rem; }
.drop-hint { color: var(--graphite); font-size: 0.92rem; }
.drop.chosen { border-style: solid; border-color: var(--ink); }
.drop.chosen .drop-title { font-family: var(--mono); font-weight: 500; font-size: 0.98rem; word-break: break-all; }

.pw { display: grid; gap: 6px; }
label:has(> input:not([type="radio"], [type="checkbox"], [type="file"])), label:has(> select) { display: grid; gap: 6px; }
select { font-family: var(--sans); font-weight: 500; appearance: auto; }
.js .pw:not(.needed) { display: none; }
.pw[hidden] { display: none; }
label { font-weight: 600; font-size: 0.95rem; }
input[type="password"], input[type="email"], input[type="tel"], input[type="number"], select {
  font: 500 1.05rem var(--mono);
  padding: 13px 14px;
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  background: var(--sheet);
  color: var(--ink);
  width: 100%;
}
input::placeholder { font-family: var(--sans); font-weight: 400; color: var(--graphite); opacity: 0.8; }
input:focus { border-color: var(--ink); outline: none; }
input[aria-invalid="true"] { border-color: var(--bad); }

.primary, .secondary, .quiet {
  font: 700 1.02rem var(--sans);
  border-radius: 10px;
  padding: 15px 22px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: inline-block;
}
.primary { background: var(--ink); color: var(--paper); border: 0; }
.primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--paper)); }
.primary[aria-busy="true"] { cursor: progress; opacity: 0.75; }
.secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.quiet { background: none; border: 0; padding: 0; color: var(--bad); font-weight: 600; font-size: 0.95rem; text-decoration: underline; text-underline-offset: 3px; }
.fine { font-size: 0.86rem; color: var(--graphite); margin: 0; }
.error { color: var(--bad); font-weight: 600; margin: 0; }
.error[hidden] { display: none; }

/* SMS thread: the signature */
.thread { margin: 0; display: grid; gap: 12px; padding-top: 6px; }
.thread figcaption { display: flex; gap: 10px; align-items: baseline; font-size: 0.82rem; color: var(--graphite); margin-bottom: 2px; }
.sender { font-family: var(--mono); font-weight: 500; color: var(--ink); letter-spacing: 0.04em; }
.sms {
  background: var(--bubble);
  border-radius: 20px 20px 20px 6px;
  padding: 13px 16px 10px;
  max-width: 440px;
  font-size: 0.95rem;
  line-height: 1.45;
}
.sms p { margin: 0 0 4px; }
.sms time { font-size: 0.74rem; color: var(--graphite); }
.sms mark { font-weight: 600; }
.tally {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  max-width: 440px;
  border-top: 2px solid var(--ink);
  padding-top: 12px;
  margin-top: 6px;
  font-size: 0.92rem;
  color: var(--graphite);
}
.tally output { font: 500 1.6rem var(--mono); color: var(--ink); white-space: nowrap; }

/* Highlighter sweep, run once by app.js. */
.js .sms mark.cost { background-size: 0% 78%; transition: background-size 0.55s cubic-bezier(0.3, 0.7, 0.2, 1); }
.js .sms mark.cost.on { background-size: 100% 78%; }
@media (prefers-reduced-motion: reduce) { .js .sms mark.cost { background-size: 100% 78%; transition: none; } }

/* Hero document preview: the top of a real income summary */
.doc {
  margin: 0;
  background: var(--sheet);
  border-radius: 6px;
  padding: 26px 26px 20px;
  box-shadow: 0 1px 0 var(--rule), 0 24px 48px -28px rgba(17, 20, 24, 0.35);
  transform: rotate(1.2deg);
  max-width: 460px;
  justify-self: center;
  display: grid;
  gap: 4px;
}
@media (prefers-reduced-motion: no-preference) { .doc { transition: transform 0.3s; } .doc:hover { transform: rotate(0deg); } }
.doc-head { display: flex; justify-content: space-between; font: 500 0.74rem var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--graphite); border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 10px; }
.doc-sample { border: 1px solid var(--rule); border-radius: 4px; padding: 0 6px; }
.doc-name { font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; margin: 0; }
.doc-period { font: 400 0.82rem var(--mono); color: var(--graphite); margin: 0 0 12px; }
.doc-figures { margin: 0 0 12px; display: grid; gap: 0; }
.doc-figures div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.doc-figures dt { font-size: 0.88rem; color: var(--graphite); }
.doc-figures dd { margin: 0; font: 500 1rem var(--mono); }
.doc-figures div:first-child dd { font-size: 1.25rem; }
.doc-checks { list-style: none; padding: 0; margin: 0 0 12px; font-size: 0.86rem; display: grid; gap: 4px; }
.doc-checks li::before { content: "✓ "; font-weight: 800; }
.doc-verify { font: 500 0.8rem var(--mono); color: var(--graphite); border-top: 1px dashed var(--rule); padding-top: 10px; margin: 0; }
.doc-link { font-weight: 700; font-size: 0.92rem; margin-top: 8px; }

.audience { border-top: 1px solid var(--rule); padding: 28px 0; }
.audience p { margin: 0; font-size: 1.08rem; max-width: 50em; }
.free { border-top: 1px solid var(--rule); padding: 56px 0; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 72px; align-items: start; }
.free-copy p { color: var(--graphite); max-width: 30em; }
@media (max-width: 900px) { .free { grid-template-columns: 1fr; gap: 32px; } }
.prices { border-top: 1px solid var(--rule); padding: 56px 0; }
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.price-grid > div { border-top: 2px solid var(--ink); padding-top: 14px; }
.price-grid h3 { font-size: 1.1rem; margin-bottom: 6px; }
.price-grid p { color: var(--graphite); margin: 0; }
.price-tag { font: 500 1.35rem var(--mono); color: var(--ink) !important; margin-bottom: 6px !important; }
@media (max-width: 760px) { .price-grid { grid-template-columns: 1fr; gap: 24px; } }

/* Pass codes */
details.passcode summary { cursor: pointer; font-size: 0.9rem; color: var(--graphite); font-weight: 600; }
details.passcode[open] summary { margin-bottom: 8px; }
.passform { display: flex; gap: 10px; flex-wrap: wrap; }
.passform input { flex: 1 1 160px; width: auto; text-transform: uppercase; }
input.pass { text-transform: uppercase; }
.paycol { display: grid; gap: 16px; align-content: start; }
.passresult { display: grid; gap: 8px; }
.passresult[hidden] { display: none; }
.passcode-big { font: 500 clamp(1.6rem, 6vw, 2.2rem) var(--mono); background: var(--marker); color: var(--marker-ink); padding: 6px 14px; border-radius: 8px; justify-self: start; display: inline-block; margin: 0; letter-spacing: 0.04em; }

/* Send summary / lender trial */
details.sendbox { background: var(--sheet); border-radius: var(--radius); padding: 16px 20px; margin: 8px 0 28px; }
details.sendbox summary { cursor: pointer; font-weight: 700; }
details.sendbox form, .pilot form { display: grid; gap: 12px; margin-top: 14px; max-width: 560px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }
input[type="text"] { font: 500 1rem var(--sans); padding: 12px 14px; border: 1.5px solid var(--rule); border-radius: 10px; background: var(--sheet); color: var(--ink); width: 100%; }
.pilot { margin-top: 40px; border-top: 2px solid var(--ink); padding-top: 8px; }
.pilot form { max-width: 640px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Statement checks */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checks li { display: grid; grid-template-columns: 1.6em 1fr; gap: 8px; align-items: baseline; }
.mark-state { display: inline-grid; place-items: center; width: 1.4em; height: 1.4em; border-radius: 50%; font-weight: 800; font-size: 0.85rem; background: var(--rule); }
.checks li.ok .mark-state { background: var(--in); color: var(--paper); }
.checks li.bad .mark-state { background: var(--bad); color: var(--paper); }
.checks li.bad { color: var(--bad); }
.lenders .unlock { margin-top: 36px; }

/* Sections */
.howto, .peek, .faq { border-top: 1px solid var(--rule); padding: 56px 0; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: block; font: 500 0.9rem var(--mono); color: var(--graphite); margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.steps p { margin: 0; }
.code { font-family: var(--mono); font-weight: 500; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 22px; } }

.peek { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 72px; align-items: start; }
.peek-copy p { color: var(--graphite); max-width: 32em; }
.textlink { font-weight: 700; }
.peek-card { background: var(--sheet); border-radius: var(--radius); padding: 24px 24px 12px; box-shadow: 0 1px 0 var(--rule), 0 18px 40px -24px rgba(17, 20, 24, 0.25); }
.peek-head { font: 500 0.8rem var(--mono); color: var(--graphite); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
@media (max-width: 900px) { .peek { grid-template-columns: 1fr; gap: 32px; } }

.faq > * { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.3rem/1 var(--mono); color: var(--graphite); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--graphite); padding-bottom: 8px; max-width: 40em; }

/* Category rows (home preview and report) */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 1fr auto; column-gap: 16px; padding: 10px 0 12px; border-bottom: 1px solid var(--rule); }
.rows li:last-child { border-bottom: 0; }
.row-label { font-weight: 600; }
.row-value { font: 500 0.98rem var(--mono); }
.row-bar { grid-column: 1 / -1; height: 6px; margin-top: 8px; border-radius: 3px; background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 0 / var(--w) 100%, var(--rule); }
.row-note { grid-column: 1 / -1; font-size: 0.82rem; color: var(--graphite); margin-top: 6px; }

/* Report */
.report { max-width: 920px; margin: 0 auto; padding-top: 16px; }
.banner { background: var(--sheet); border-left: 4px solid var(--marker); padding: 12px 16px; border-radius: 0 8px 8px 0; margin-bottom: 28px; }
.report-head { margin-bottom: 36px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 500 0.82rem var(--mono); color: var(--graphite); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; }
.report-head .lede { margin: 16px 0 0; }
.ledger { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 48px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.ledger div { padding: 14px 16px 16px 0; }
.ledger div + div { padding-left: 16px; border-left: 1px solid var(--rule); }
.ledger dt { font-size: 0.85rem; color: var(--graphite); }
.ledger dd { margin: 4px 0 0; font: 500 clamp(1.05rem, 2.3vw, 1.35rem) var(--mono); white-space: nowrap; }
.ledger dd.net { color: var(--bad); }
@media (max-width: 640px) {
  .ledger { grid-template-columns: 1fr 1fr; }
  .ledger div:nth-child(3) { padding-left: 0; border-left: 0; }
  .ledger div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
}
.block { margin-bottom: 52px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
@media (max-width: 760px) { .pair { grid-template-columns: 1fr; gap: 0; } }

.findings { margin: 0; padding: 0; list-style: none; }
.findings li { font-size: 1.12rem; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.findings li:first-child { padding-top: 0; }

.people, .big { list-style: none; margin: 0; padding: 0; }
.people li { display: grid; grid-template-columns: 1fr auto 3.2em; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 0.95rem; }
.amt { font: 500 0.95rem var(--mono); white-space: nowrap; }
.times { font: 400 0.82rem var(--mono); color: var(--graphite); text-align: right; }
.big li { display: grid; grid-template-columns: 4.2em 1fr auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.when { font: 400 0.82rem var(--mono); color: var(--graphite); }
.what { display: grid; overflow-wrap: anywhere; }
.what b { font-weight: 600; font-size: 0.95rem; }
.what small { color: var(--graphite); font-size: 0.82rem; }

.legend { display: flex; gap: 8px 6px; align-items: center; font-size: 0.85rem; color: var(--graphite); }
.k { display: inline-block; width: 12px; height: 6px; border-radius: 2px; margin-left: 10px; }
.k:first-child { margin-left: 0; }
.k.in, .b.in { background: var(--in); }
.k.out, .b.out { background: var(--ink); }
.months { list-style: none; margin: 0; padding: 0; }
.months li { display: grid; grid-template-columns: 5.5em 1fr 8.5em; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.m { font-weight: 600; font-size: 0.95rem; }
.bars { display: grid; gap: 4px; }
.b { display: block; height: 7px; width: var(--w); min-width: 2px; border-radius: 3px; }
.v { font: 400 0.84rem/1.45 var(--mono); text-align: right; }
@media (max-width: 520px) { .months li { grid-template-columns: 4.6em 1fr 7.4em; gap: 10px; } .v { font-size: 0.76rem; } }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; margin-bottom: 14px; }
.day { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; height: 146px; }
.col { min-height: 2px; background: color-mix(in srgb, var(--ink) 22%, var(--paper)); border-radius: 4px 4px 0 0; }
.day.max .col { background: var(--ink); }
.d { font: 400 0.78rem var(--mono); color: var(--graphite); text-align: center; }

.keep { border-top: 2px solid var(--ink); padding-top: 24px; }
.keep-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.keep p { color: var(--graphite); max-width: 36em; }

.unlock { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; background: var(--sheet); border-radius: var(--radius); padding: 32px; margin-bottom: 48px; box-shadow: 0 1px 0 var(--rule), 0 18px 40px -24px rgba(17, 20, 24, 0.25); }
.unlock p { color: var(--graphite); }
.unlock form { display: grid; gap: 10px; align-content: start; }
@media (max-width: 760px) { .unlock { grid-template-columns: 1fr; gap: 20px; padding: 24px 20px; } }

.muted { color: var(--graphite); }
.note, .prose { max-width: 680px; margin: 48px auto; }
.note h1 { font-size: 2.2rem; margin-bottom: 14px; }
.note p { color: var(--graphite); margin-bottom: 24px; }
.prose h1 { margin-bottom: 20px; }
.prose h2 { font-size: 1.15rem; margin: 28px 0 8px; }
.prose p { color: var(--graphite); }
.prose table { width: 100%; border-collapse: collapse; font: 400 0.9rem var(--mono); }
.prose td, .prose th { text-align: left; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--rule); }

.foot { max-width: 1120px; margin: 0 auto; padding: 28px 20px 40px; border-top: 1px solid var(--rule); font-size: 0.85rem; color: var(--graphite); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.foot p { margin: 0; }
.foot p:last-child { display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* Utilities */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.more { margin: 24px 0 0; }
pre { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; overflow-x: auto; font: 400 0.84rem/1.5 var(--mono); }
code { font-family: var(--mono); font-size: 0.9em; }

/* Payment */
.choice { border: 0; padding: 0; margin: 0 0 4px; display: grid; gap: 8px; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--rule); border-radius: 10px; cursor: pointer; font-weight: 400; }
.opt:has(input:checked) { border-color: var(--ink); }
.opt input { margin-top: 4px; accent-color: var(--ink); }
.opt > span { display: flex; justify-content: space-between; gap: 12px; flex: 1; }
.opt b { font-weight: 600; }
.price { font: 500 0.95rem var(--mono); white-space: nowrap; }
.waiting { display: grid; gap: 4px; padding: 12px 14px; border-left: 4px solid var(--marker); background: var(--paper); border-radius: 0 8px 8px 0; }
.waiting[hidden] { display: none; }
.waiting b::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--ink); animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: 0.2; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .waiting b::after { animation: none; } }
.callout { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; background: var(--sheet); border-left: 4px solid var(--marker); border-radius: 0 var(--radius) var(--radius) 0; padding: 24px 28px; margin-bottom: 52px; }
.callout h2 { margin-bottom: 6px; }
.callout p { color: var(--graphite); margin: 0; max-width: 34em; }

/* Keeping a report */
.keeprow { margin: -28px 0 40px; font-size: 0.92rem; color: var(--graphite); }
.keeprow p { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; }
.keeprow b { color: var(--ink); font-weight: 600; }
.keeprow-actions { display: inline-flex; gap: 16px; }
.keeprow .linkish { color: var(--ink); font-weight: 600; }
.emailform { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; max-width: 460px; }
.emailform[hidden] { display: none; }
.emailform input { flex: 1 1 220px; width: auto; }
.emailform .error { flex-basis: 100%; }

/* In-page navigation for the full report */
.jump { position: sticky; top: 0; z-index: 5; display: flex; gap: 6px; overflow-x: auto; margin: -20px -20px 32px; padding: 10px 20px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--rule); scrollbar-width: none; }
.jump a { flex: none; text-decoration: none; font-size: 0.9rem; font-weight: 600; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--rule); background: var(--sheet); }
.jump a:hover { border-color: var(--ink); }
[id] { scroll-margin-top: 64px; }
.teaser p { font-size: 1.15rem; }

.waiting-actions { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 4px; font-size: 0.9rem; }
.waiting-actions [hidden] { display: none; }
.note .upload { margin-top: 24px; }

/* Report tools */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; padding: 18px 20px; background: var(--sheet); border-radius: var(--radius); }
.share > div { flex: 1 1 100%; }
.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; }
.check input { accent-color: var(--ink); width: 18px; height: 18px; }
details.fix, details.add { margin-top: 18px; }
details.fix summary, details.add summary { cursor: pointer; font-weight: 600; color: var(--graphite); }
details.fix summary:hover, details.add summary:hover { color: var(--ink); }
details.fix form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin-top: 14px; }
@media (max-width: 640px) { details.fix form { grid-template-columns: 1fr; } }
details.add .upload { margin-top: 14px; }
details.add p.muted { margin-top: 8px; }

/* Share page */
.sharepage { max-width: 760px; margin: 16px auto 0; }
.cardimg { width: 100%; height: auto; border-radius: var(--radius); box-shadow: 0 1px 0 var(--rule), 0 18px 40px -24px rgba(17, 20, 24, 0.3); display: block; }
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 48px; }
.share-actions [hidden] { display: none; }
.cta { border-top: 2px solid var(--ink); padding-top: 24px; }
.cta p { color: var(--graphite); }

/* Income summary */
.summary { max-width: 860px; margin: 0 auto; }
.summary header { margin: 12px 0 28px; }
.summary .lede { margin: 10px 0 0; }
.scroll { overflow-x: auto; }
table.sheet { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.sheet th { text-align: left; font-weight: 600; color: var(--graphite); font-size: 0.82rem; padding: 8px 12px 8px 0; border-bottom: 2px solid var(--ink); }
table.sheet td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 0.88rem; white-space: nowrap; }
table.sheet td:first-child { font-family: var(--sans); font-weight: 600; white-space: normal; }
table.sheet tbody th { border-bottom: 1px solid var(--rule); color: var(--ink); }
.attest { border-top: 1px solid var(--rule); padding-top: 16px; font-size: 0.85rem; color: var(--graphite); }

/* Guides */
.guide { max-width: 760px; margin: 0 auto; padding-top: 8px; }
.guide h2 { margin-top: 40px; font-size: 1.3rem; }
.guide ul, .guide ol { padding-left: 1.2em; }
.guide li { margin: 6px 0; }
.calc { background: var(--sheet); border-radius: var(--radius); padding: 22px 22px 6px; margin: 28px 0 8px; }
.calc > label, .calc-inputs { max-width: 420px; margin-bottom: 18px; }
.calc-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 520px; }
.calc .ledger { margin-bottom: 16px; }
.ledger.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .ledger.three { grid-template-columns: 1fr; } .ledger.three div { padding-left: 0; border-left: 0; } .ledger.three div + div { border-top: 1px solid var(--rule); } }
.tables { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; margin: 32px 0; }
@media (max-width: 760px) { .tables { grid-template-columns: 1fr; } }
table.tariff caption { text-align: left; font-weight: 700; padding-bottom: 8px; }
.guide-cta { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; margin-top: 48px; padding: 24px; background: var(--ink); color: var(--paper); border-radius: var(--radius); }
.guide-cta p { margin: 4px 0 0; opacity: 0.8; max-width: 32em; }
.guide-cta .primary { background: var(--marker); color: var(--marker-ink); }

@media print {
  .noprint, .masthead, .callout, details.fix, .share, .jump, .keeprow, .guide-cta { display: none !important; }
  .masthead nav, .foot, .keep, .banner { display: none; }
  body { background: #fff; color: #000; }
  mark { background: none; font-weight: 700; }
}
