/* Layout concept: the buyer's working paper. Ledger-green paper, ink type, red-pencil marks on anything that doesn't trace. */
:root {
  --paper: #edf1eb;
  --sheet: #f8faf6;
  --ink: #13201b;
  --muted: #4f6058;
  --rule: #c5d0c8;
  --accent: #b02a30;
  --pass: #276541;
  --warn: #8f5c00;
  --cta: #13201b;
  --cta-fg: #f8faf6;
  --shadow: 0 1px 0 var(--rule), 0 14px 32px -24px rgba(19, 32, 27, .55);
  --display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Literata", Georgia, "Times New Roman", serif;
  --mono: "Red Hat Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.6rem, 3vw, 2rem);
  --step-3: clamp(2.1rem, 4.4vw, 3.15rem);
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s6: 1.5rem; --s8: 2rem; --s12: 3rem;
  --radius: 3px;
  --wrap: 72rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1613; --sheet: #15201b; --ink: #e4ece6; --muted: #a0b0a7;
    --rule: #2c3b34; --accent: #f27a7e; --pass: #79c898; --warn: #e2b866; --cta: #e4ece6; --cta-fg: #0e1613;
    --shadow: 0 1px 0 var(--rule), 0 14px 32px -24px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e1613; --sheet: #15201b; --ink: #e4ece6; --muted: #a0b0a7;
  --rule: #2c3b34; --accent: #f27a7e; --pass: #79c898; --warn: #e2b866; --cta: #e4ece6; --cta-fg: #0e1613;
  --shadow: 0 1px 0 var(--rule), 0 14px 32px -24px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: var(--step-0); line-height: 1.62;
  -webkit-tap-highlight-color: transparent;
}
::selection { background: var(--ink); color: var(--paper); }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-3); letter-spacing: -0.025em; }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); font-weight: 600; line-height: 1.25; }
p { margin: 0; text-wrap: pretty; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.stack { display: grid; gap: var(--s4); align-content: start; min-width: 0; }
.measure { max-width: 64ch; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); line-height: 1.5; }
.fine { margin-top: var(--s6); max-width: 64ch; }
.table-wrap { overflow-x: auto; }

/* header */
.site-head { background: var(--paper); border-bottom: 1px solid var(--rule); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
.site-head .wrap { display: flex; align-items: center; gap: var(--s6); padding-block: .7rem; }
.brand { padding-block: .55rem; font-family: var(--display); font-weight: 700; font-size: 1.12rem; text-decoration: none; display: flex; align-items: baseline; gap: .4rem; white-space: nowrap; margin-right: auto; }
.brand span { font-weight: 500; color: var(--muted); font-size: .82rem; }
.nav { display: flex; gap: var(--s4); align-items: center; font-family: var(--display); font-size: .95rem; font-weight: 500; }
.nav a { white-space: nowrap; text-decoration: none; color: var(--muted); padding-block: .6rem; border-bottom: 2px solid transparent; transition: color .15s ease, border-color .15s ease; }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
@media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--ink); } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px;
  font-family: var(--display); font-weight: 600; font-size: 1rem; line-height: 1.2;
  background: var(--cta); color: var(--cta-fg); border: 1px solid var(--cta); border-radius: var(--radius);
  padding: .7rem 1.15rem; text-decoration: none; cursor: pointer; touch-action: manipulation; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .16s var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.small { min-height: 40px; padding: .45rem .85rem; font-size: .92rem; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: transparent; color: var(--ink); }
  .btn.ghost:hover { border-color: var(--ink); }
}

/* sections */
section { padding-block: clamp(3rem, 7vw, 5rem); border-bottom: 1px solid var(--rule); }
.sec-head { display: grid; gap: var(--s3); margin-bottom: var(--s8); max-width: 46rem; }
.eyebrow { font-family: var(--mono); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }

/* hero */
.hero { padding-block: clamp(2rem, 5vw, 3.5rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.hero-copy { display: grid; gap: var(--s6); align-content: start; min-width: 0; }
.lede { font-size: 1.14rem; max-width: 40rem; }
.actions { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; }
.micro { font-family: var(--display); font-size: .9rem; color: var(--muted); margin-top: calc(var(--s3) * -1); }
.proof { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s4); align-items: center; padding-top: var(--s4); border-top: 1px solid var(--rule); max-width: 40rem; }
.proof p { font-size: .97rem; line-height: 1.5; }
.avatar { border-radius: 50%; width: 56px; height: 56px; object-fit: cover; border: 1px solid var(--rule); background: var(--sheet); }
.avatar.lg { width: 96px; height: 96px; }

/* the workpaper */
.paper { background: var(--sheet); border: 1px solid var(--rule); border-radius: 2px; padding: 1.15rem 1.15rem 1rem; box-shadow: var(--shadow); min-width: 0; }
.paper-head { display: flex; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; align-items: baseline; border-bottom: 2px solid var(--ink); padding-bottom: .45rem; margin-bottom: .35rem; }
.paper-head strong, .paper-head .ph { font-family: var(--display); font-size: 1.05rem; font-weight: 700; letter-spacing: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tick.partial { color: var(--warn); }
.foot-h { font-family: var(--display); color: var(--ink); margin: 0 0 .5rem; font-size: .95rem; letter-spacing: 0; }
.paper-head span { font-family: var(--mono); font-size: .74rem; color: var(--muted); }
.ledger { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ledger td { padding: .34rem .2rem; border-bottom: 1px dotted var(--rule); vertical-align: top; }
.ledger td.amt { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger td.tick { width: 1.6rem; text-align: center; font-family: var(--mono); font-weight: 600; }
.ledger tr.total td { border-bottom: 0; border-top: 1.5px solid var(--ink); font-weight: 600; }
.ledger tr.strike td.amt { text-decoration: line-through; text-decoration-color: var(--accent); color: var(--muted); }
.ledger thead td { font-family: var(--display); font-weight: 600; font-size: .82rem; color: var(--muted); border-bottom: 1.5px solid var(--ink); }
.ledger.kv td:first-child { color: var(--muted); }
.ledger .note { display: inline; margin-left: .35rem; }
.ok { color: var(--pass); }
.no { color: var(--accent); }
.note { font-size: .78rem; color: var(--muted); font-family: var(--mono); line-height: 1.5; }
.note.foot { margin-top: .75rem; }
.note a { color: var(--ink); }
.verdict { margin-top: .85rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.verdict div { border: 1px solid var(--rule); padding: .55rem .6rem; min-width: 0; }
.verdict b { display: block; font-family: var(--mono); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.verdict small { font-family: var(--display); color: var(--muted); font-size: .8rem; line-height: 1.3; display: block; }
.verdict .fail b { color: var(--accent); }
.dscr { margin-top: .9rem; }
.dscr-bar { position: relative; height: 10px; background: var(--rule); border-radius: 1px; overflow: visible; }
.dscr-fill { position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); background: var(--accent); transform-origin: left center; }
.dscr-fill.ok-fill { background: var(--pass); }
.dscr-floor { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--ink); }
.dscr-legend { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .72rem; color: var(--muted); margin-top: .3rem; gap: .5rem; }
.verdict-line { margin-top: .8rem; }

/* signature moment: the trace marks itself, once, on load */
@media (prefers-reduced-motion: no-preference) {
  .hero .ledger tr.t .tick { animation: mark .32s var(--ease-out) both; }
  .hero .ledger tr.t:nth-child(2) .tick { animation-delay: .25s; }
  .hero .ledger tr.t:nth-child(3) .tick { animation-delay: .31s; }
  .hero .ledger tr.t:nth-child(4) .tick { animation-delay: .37s; }
  .hero .ledger tr.t:nth-child(5) .tick { animation-delay: .43s; }
  .hero .ledger tr.t:nth-child(6) .tick { animation-delay: .55s; }
  .hero .ledger tr.t:nth-child(7) .tick { animation-delay: .61s; }
  .hero .ledger tr.t:nth-child(8) .tick { animation-delay: .67s; }
  .hero .dscr-fill { animation: grow .7s var(--ease-out) .75s both; }
  @keyframes mark { from { opacity: .15; transform: scale(.9); } to { opacity: 1; transform: none; } }
  @keyframes grow { from { transform: scaleX(.15); } to { transform: none; } }
  .calc-fill { transition: width .3s var(--ease-out), background-color .2s ease; }
}

/* rules strip */
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.rules > div { padding: 1.2rem 1.4rem 1.2rem 0; border-right: 1px solid var(--rule); min-width: 0; display: grid; gap: var(--s2); align-content: start; }
.rules > div + div { padding-left: 1.4rem; }
.rules > div:last-child { border-right: 0; }
.rules .big { font-family: var(--mono); font-size: 1.7rem; font-weight: 600; }

/* calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; }
.calc-in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.calc-in label { display: grid; grid-template-columns: auto 1fr; gap: .3rem .5rem; align-items: center; font-family: var(--display); font-size: .9rem; font-weight: 600; min-width: 0; }
.calc-in label > input { grid-column: 1 / -1; }
.calc-in .unit { justify-self: end; font-family: var(--mono); font-weight: 400; color: var(--muted); font-size: .8rem; }
input, select, textarea {
  font: 400 1rem var(--body); color: var(--ink); background: var(--sheet); border: 1px solid var(--rule); border-radius: 2px;
  padding: .6rem .65rem; width: 100%; min-width: 0; min-height: 44px; transition: border-color .15s ease;
}
.calc-in input { font-family: var(--mono); font-variant-numeric: tabular-nums; background: var(--sheet); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
.calc-out { display: grid; gap: var(--s3); }
.calc-out .dscr { margin-top: 0; }
.calc-verdict { font-family: var(--display); font-weight: 600; }
.calc-out .btn { justify-self: start; }

/* tiers */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); align-items: stretch; }
.tier { background: var(--sheet); border: 1px solid var(--rule); padding: 1.35rem; display: grid; grid-template-rows: auto auto auto 1fr auto; gap: var(--s3); min-width: 0; }
.tier.lead { border: 2px solid var(--ink); }
.tier .price { font-family: var(--mono); font-size: 1.85rem; font-weight: 600; }
.tier .price small { font-size: .88rem; font-weight: 400; color: var(--muted); }
.tier .meta { font-family: var(--display); color: var(--muted); font-size: .93rem; }
.tier ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .45rem; font-size: .97rem; align-content: start; }
.tier li { padding-left: 1.3rem; position: relative; }
.tier li::before { content: "✓"; position: absolute; left: 0; color: var(--pass); font-family: var(--mono); font-weight: 600; }
.tier .btn { justify-self: start; }
.tag { font-family: var(--display); font-weight: 600; font-size: .85rem; color: var(--accent); }
.addons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); margin-top: var(--s4); }
.addon { border: 1px dashed var(--rule); padding: 1.2rem 1.35rem; display: grid; gap: var(--s3); align-content: start; min-width: 0; }
.addon .price { font-family: var(--mono); font-size: 1.5rem; font-weight: 600; }
.addon .price.q { font-family: var(--display); font-size: 1.25rem; }
.addon .price small { font-size: .88rem; font-weight: 400; color: var(--muted); }
.addon .meta { font-family: var(--display); color: var(--muted); font-size: .93rem; }
.addon ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .4rem; font-size: .97rem; }
.addon li { padding-left: 1.3rem; position: relative; }
.addon li::before { content: "✓"; position: absolute; left: 0; color: var(--pass); font-family: var(--mono); font-weight: 600; }
.addons-note { margin-top: var(--s4); font-size: var(--step--1); color: var(--muted); max-width: 72ch; line-height: 1.55; }
.addons-note strong { color: var(--ink); font-family: var(--display); }
.pricing-quote { margin-top: var(--s8); max-width: 44rem; }

/* quotes */
.quote { margin: 0; padding-top: var(--s4); border-top: 1px solid var(--rule); min-width: 0; display: grid; gap: var(--s2); }
.quote blockquote { margin: 0; font-size: 1.04rem; font-style: italic; }
.q-rating { font-family: var(--display); font-size: .82rem; color: var(--muted); }
.q-rating span { color: var(--accent); letter-spacing: .08em; }
.quote figcaption { font-family: var(--display); color: var(--muted); font-size: .86rem; line-height: 1.45; }
.quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); margin-top: var(--s12); }

/* compare */
table.compare { width: 100%; min-width: 46rem; border-collapse: collapse; font-size: .95rem; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: .7rem .8rem .7rem 0; border-bottom: 1px solid var(--rule); }
.compare thead th { font-family: var(--display); font-size: .92rem; border-bottom: 2px solid var(--ink); }
.compare tbody th { font-family: var(--display); font-weight: 600; color: var(--muted); font-size: .88rem; width: 9rem; }
.compare td:nth-child(2), .compare thead th:nth-child(2) { background: var(--sheet); padding-left: .8rem; }
.compare thead th:nth-child(2) { border-top: 2px solid var(--ink); }

/* checks */
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; }
.check { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: var(--s3); padding-block: 1rem; border-top: 1px solid var(--rule); }
.check .ref { font-family: var(--mono); font-size: .8rem; color: var(--accent); padding-top: .2rem; }
.check h3 { margin-bottom: .3rem; }
.sample-band { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); margin-top: var(--s8); padding: 1.4rem; background: var(--sheet); border: 1px solid var(--rule); }
.sample-band .btn { justify-self: start; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
.timeline li { border-top: 3px solid var(--ink); padding-top: .8rem; min-width: 0; display: grid; gap: var(--s2); align-content: start; }
.timeline .when { font-family: var(--mono); font-size: .85rem; color: var(--accent); }

/* person / records */
.person { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.who-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s4); align-items: center; }
.roles { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; font-size: .97rem; }
.roles li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; border-bottom: 1px dotted var(--rule); padding-bottom: .4rem; }
.roles li span:last-child { font-family: var(--mono); font-size: .8rem; color: var(--muted); white-space: nowrap; }
.records-h { font-size: 1.15rem; }
.record { display: grid; gap: .15rem; text-decoration: none; background: var(--sheet); border: 1px solid var(--rule); padding: .85rem 1rem; transition: border-color .15s ease, transform .16s var(--ease-out); }
.record:active { transform: scale(.99); }
.r-src { font-family: var(--display); font-weight: 600; font-size: .85rem; color: var(--muted); }
.r-main { font-family: var(--display); font-weight: 600; font-size: 1rem; line-height: 1.35; }
.r-go { font-family: var(--display); font-size: .85rem; color: var(--accent); }
.r-go::after { content: " ↗"; }
@media (hover: hover) and (pointer: fine) { .record:hover { border-color: var(--ink); } }

/* limits */
.nots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 2.5rem; list-style: none; padding: 0; margin: 0; }
.nots li { padding-left: 1.5rem; position: relative; }
.nots li::before { content: "✗"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); font-weight: 600; }
.nots li:nth-child(5)::before { content: "✓"; color: var(--pass); }

/* faq */
.faq { display: grid; border-top: 2px solid var(--ink); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { font-family: var(--display); font-weight: 600; font-size: 1.08rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding-block: 1rem; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--accent); transition: transform .2s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 1rem; max-width: 64ch; }
@media (prefers-reduced-motion: no-preference) {
  .faq details[open] p { animation: reveal .25s var(--ease-out); }
  @keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
}

/* form */
.intake { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.next { margin: 0; padding: 0; list-style: none; display: grid; gap: .7rem; counter-reset: n; }
.next li { padding-left: 2rem; position: relative; counter-increment: n; }
.next li::before { content: counter(n); position: absolute; left: 0; top: .1rem; width: 1.4rem; height: 1.4rem; border: 1px solid var(--ink); border-radius: 50%; font-family: var(--mono); font-size: .78rem; display: grid; place-items: center; }
.next strong { font-family: var(--display); display: block; }
form.brief { background: var(--sheet); border: 2px solid var(--ink); padding: 1.35rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
form.brief .full { grid-column: 1 / -1; }
form.brief label { display: grid; gap: .3rem; font-family: var(--display); font-size: .9rem; font-weight: 600; min-width: 0; }
form.brief input, form.brief select, form.brief textarea { background: var(--paper); }
form.brief textarea { min-height: 6.5rem; resize: vertical; }
.form-foot { display: flex; gap: var(--s4); align-items: center; flex-wrap: wrap; }
.out { border: 1px dashed var(--ink); padding: 1rem; background: var(--paper); display: grid; gap: .7rem; }
.out pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: .82rem; margin: 0; max-height: 16rem; overflow: auto; }
.email-line { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }

/* sample report page */
.sub-hero .wrap { display: grid; gap: var(--s6); max-width: 52rem; margin-inline: auto; }
.report { display: grid; gap: var(--s6); max-width: 52rem; }
.ledger.grid td { white-space: nowrap; }
.qlist { margin: .4rem 0 .6rem; padding-left: 1.3rem; display: grid; gap: .45rem; }
.sample-end { display: grid; gap: var(--s4); max-width: 52rem; }

/* footer */
.site-foot { padding-block: 2.5rem 6rem; font-size: var(--step--1); color: var(--muted); }
.site-foot .wrap { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 2rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.site-foot li a, .site-foot li { display: inline-block; padding-block: .3rem; overflow-wrap: anywhere; }
.foot-brand { color: var(--ink); font-family: var(--display); font-size: 1.05rem; }

/* mobile sticky action bar */
.mbar { display: none; }

@media (max-width: 1240px) {
  .nav a:nth-child(5) { display: none; }
  .nav { gap: var(--s3); }
}
@media (max-width: 1080px) {
  .nav a:nth-child(3) { display: none; }
}
@media (max-width: 900px) {
  .hero .wrap, .person, .intake, .calc, .addons, .sample-band { grid-template-columns: minmax(0, 1fr); }
  .tiers, .quotes { grid-template-columns: minmax(0, 1fr); }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-foot .wrap { grid-template-columns: minmax(0, 1fr); }
  .head-cta { display: none; }
  .site-head { position: static; }
  .site-head .wrap { flex-wrap: wrap; row-gap: 0; }
  .nav { order: 3; width: 100%; overflow-x: auto; gap: var(--s4); scrollbar-width: none; font-size: .9rem; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
  .nav a:nth-child(3), .nav a:nth-child(5) { display: inline; }
  .mbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: .6rem 16px calc(.6rem + env(safe-area-inset-bottom, 0px));
    background: var(--paper); border-top: 1px solid var(--rule);
  }
  .mbar .btn { flex: 1; }
}
@media (max-width: 640px) {
  .rules, .checks, .nots, .calc-in { grid-template-columns: minmax(0, 1fr); }
  .rules > div, .rules > div + div { border-right: 0; padding-left: 0; border-bottom: 1px solid var(--rule); }
  .timeline { grid-template-columns: minmax(0, 1fr); }
  form.brief { grid-template-columns: minmax(0, 1fr); }
  .verdict { grid-template-columns: minmax(0, 1fr); }
  .verdict div { display: flex; align-items: baseline; gap: .7rem; }
  .ledger .note { display: block; margin-left: 0; }
  .actions .btn { flex: 1 1 100%; }
  .wrap { padding-inline: 16px; }
}
