/* Alberto Martin | Crypto tax reporting
   One stylesheet. Mobile-first. No external fonts. */

:root {
  --paper: #f6f3ec;
  --paper-2: #ede8dc;
  --field: #fcfbf7;
  --ink: #12141a;
  --ink-2: #1c1f27;
  --ink-3: #2b2f3a;
  --muted: #595c64;
  --rule: #d5cdbd;
  --ox: #6e1c24;
  --ox-2: #86262f;
  --ox-soft: #f0e2df;
  --on-ink: #ebe6da;
  --on-ink-muted: #a8a59c;
  --on-ink-rule: #343844;

  --serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1180px;
  --gut: clamp(1.1rem, 4vw, 2.5rem);
  --measure: 64ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.62;
  font-variant-numeric: tabular-nums lining-nums;
  text-rendering: optimizeLegibility;
}
@media (min-width: 720px) { body { font-size: 1.125rem; } }

img, svg { max-width: 100%; display: block; }
a { color: var(--ox); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ox-2); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ox); outline-offset: 3px; }
.on-ink :focus-visible, .site-footer :focus-visible, .hero :focus-visible { outline-color: var(--on-ink); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.1; margin: 0 0 .6em; letter-spacing: -.012em; text-wrap: balance; }
h1 { font-size: clamp(2.35rem, 6.4vw, 4.5rem); line-height: 1.02; letter-spacing: -.02em; }
h2 { font-size: clamp(1.65rem, 3.3vw, 2.45rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); margin-top: 1.8em; }
p, ul, ol, dl, table, figure { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: .45em; }
strong { font-weight: 700; }
small, .small { font-size: .875rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.prose { max-width: var(--measure); }
.sans { font-family: var(--sans); }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: var(--paper); padding: .5rem .8rem; z-index: 100; font-family: var(--sans); }
.skip:focus { left: .5rem; }
[hidden] { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  font-family: var(--sans);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.6rem; }
.brand { display: flex; align-items: baseline; gap: .6rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; }
.brand-bar { width: 1px; height: 1em; background: var(--ink); align-self: center; }
.brand-desk { font-size: .9rem; color: var(--muted); }
@media (max-width: 380px) { .brand-desk { display: none; } .brand-bar { display: none; } }

.nav-toggle {
  font: 600 .9rem var(--sans); color: var(--ink); background: transparent;
  border: 1px solid var(--ink); border-radius: 2px; padding: .45rem .75rem; cursor: pointer;
}
.site-nav { display: none; }
.site-nav.is-open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--paper); border-bottom: 1px solid var(--ink); padding: .5rem var(--gut) 1.1rem;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li { margin: 0; border-bottom: 1px solid var(--rule); }
.site-nav a { display: block; padding: .75rem 0; color: var(--ink); text-decoration: none; font-size: 1rem; }
.site-nav a[aria-current="page"] { color: var(--ox); font-weight: 600; }
.site-nav .nav-cta { border: 0; margin-top: .8rem; }
.site-nav .nav-cta a { display: inline-block; background: var(--ox); color: var(--paper); padding: .6rem .9rem; border-radius: 2px; font-weight: 600; }

@media (min-width: 980px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open { display: block; position: static; border: 0; padding: 0; background: none; }
  .site-nav ul { display: flex; align-items: center; gap: 1.35rem; }
  .site-nav li { border: 0; }
  .site-nav a { padding: .4rem 0; font-size: .92rem; }
  .site-nav a:hover { color: var(--ox); }
  .site-nav .nav-cta { margin: 0 0 0 .4rem; }
  .site-nav .nav-cta a { padding: .5rem .85rem; }
  .site-nav .nav-cta a:hover { background: var(--ox-2); color: var(--paper); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  padding: .95rem 1.3rem; border-radius: 2px; border: 1px solid transparent;
  background: var(--ox); color: var(--paper);
}
.btn:hover { background: var(--ox-2); color: var(--paper); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-paper:hover { background: #fff; color: var(--ink); }
.btn-line-light { background: transparent; color: var(--on-ink); border-color: var(--on-ink-muted); }
.btn-line-light:hover { background: var(--on-ink); color: var(--ink); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.text-cta { font-family: var(--sans); font-weight: 600; font-size: 1rem; }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  isolation: isolate;
  background: #12141a;
  color: var(--on-ink);
  padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2.75rem, 7vw, 5rem);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  z-index: 0;
  filter: saturate(.88) contrast(1.04);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10,12,16,.58) 0%, rgba(10,12,16,.70) 50%, rgba(10,12,16,.82) 100%),
    linear-gradient(90deg, rgba(10,12,16,.50) 0%, rgba(10,12,16,.28) 60%, rgba(10,12,16,.45) 100%);
}
.hero .wrap { position: relative; z-index: 2; }
.hero-grid { display: grid; gap: 2.5rem; }
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3.5rem; align-items: end; }
}
/* The slip: reported proceeds vs actual gain */
.slip {
  position: relative;
  z-index: 2;
  width: 100%;
  background: var(--paper);
  color: var(--ink);
  padding: 1.35rem 1.35rem 1.1rem;
  border-top: 6px solid var(--ox);
  font-family: var(--sans);
}
@media (min-width: 980px) {
  .slip {
    width: calc(100% - 2.4rem);
    margin: 0 1.2rem 1.2rem;
    box-shadow: 0 18px 40px rgba(0,0,0,.35);
  }
}
.slip-head { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); border-bottom: 1px solid var(--ink); padding-bottom: .55rem; margin-bottom: .2rem; }
.slip-rows { margin: 0; }
.slip-rows div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--rule); }
.slip-rows dt { font-size: .95rem; }
.slip-rows dd { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; white-space: nowrap; }
.slip-rows .slip-total { border-bottom: 2px solid var(--ink); }
.slip-rows .slip-total dd { font-size: 1.55rem; color: var(--ox); }
.gapbar { position: relative; height: 34px; margin: 1.1rem 0 .45rem; background: var(--ox); border: 1px solid var(--ink); overflow: hidden; }
.gapbar-basis {
  position: absolute; inset: 0 auto 0 0; width: 94%;
  background: repeating-linear-gradient(135deg, var(--paper-2) 0 6px, #ddd5c5 6px 7px);
  border-right: 2px solid var(--ink);
}
.js .gapbar-basis { width: 0; transition: width 1.4s cubic-bezier(.2,.7,.1,1) .45s; }
.js .gapbar.is-drawn .gapbar-basis { width: 94%; }
.gapbar-legend { display: flex; justify-content: space-between; font-size: .82rem; color: var(--muted); margin: 0; }
.slip-cap { font-size: .8rem; color: var(--muted); font-style: italic; margin: .8rem 0 0; }

/* ---------- Page head (inner pages) ---------- */
.page-head { background: var(--ink); color: var(--on-ink); padding: clamp(2.3rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.page-head h1 { color: #fff; max-width: 18ch; }
.page-head-wide h1 { max-width: 22ch; }
.page-head .lede { font-size: clamp(1.12rem, 2vw, 1.3rem); max-width: 46ch; line-height: 1.5; margin-bottom: 0; }
.page-head .eyebrow a { color: var(--on-ink-muted); }
.page-head .btn-row { margin-top: 1.4rem; }
.reviewed { font-family: var(--sans); font-size: .85rem; color: var(--on-ink-muted); margin-top: 1.4rem; margin-bottom: 0; }

/* ---------- Pull quote ---------- */
.pull { padding: clamp(2.8rem, 7vw, 5rem) 0; border-bottom: 1px solid var(--ink); }
.pull figure { margin: 0; display: grid; gap: 1.5rem; }
@media (min-width: 980px) { .pull figure { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 3rem; align-items: end; } }
.pull blockquote { margin: 0; }
.pull blockquote p { font-size: clamp(1.75rem, 4.3vw, 3.05rem); line-height: 1.12; font-weight: 700; letter-spacing: -.018em; margin: 0; max-width: 24ch; text-wrap: balance; }
.pull figcaption { font-family: var(--sans); font-size: .95rem; color: var(--muted); border-top: 2px solid var(--ox); padding-top: .8rem; }
.pull figcaption strong { color: var(--ink); display: block; margin-bottom: .3rem; }

/* ---------- Sections ---------- */
.sec { padding: clamp(2.8rem, 7vw, 5rem) 0; border-bottom: 1px solid var(--rule); }
.sec:last-of-type { border-bottom: 0; }
.sec-grid { display: grid; gap: 1.2rem; }
@media (min-width: 980px) {
  .sec-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3.5rem; }
  .sec-grid > .sec-title { position: sticky; top: 5.5rem; align-self: start; }
}
.sec-title h2 { margin-bottom: .5rem; }
.sec-title .kicker { font-family: var(--sans); font-size: .9rem; color: var(--muted); margin: 0; max-width: 32ch; }
.sec-body > :first-child { margin-top: 0; }
.sec-body h3:first-child { margin-top: 0; }
.sec-tint { background: var(--paper-2); }

.split-3 { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.split-3 > div { padding: 1.2rem 0 1rem; border-bottom: 1px solid var(--rule); }
.split-3 h3 { margin: 0 0 .45rem; }
.split-3 p:last-child { margin-bottom: 0; }

.note { border-left: 3px solid var(--ox); padding: .2rem 0 .2rem 1rem; font-family: var(--sans); font-size: .95rem; color: var(--ink-3); }
.note p:last-child { margin-bottom: 0; }
.fineprint { font-family: var(--sans); font-size: .85rem; color: var(--muted); }

/* Ordered steps (real sequences only) */
.steps { list-style: none; padding: 0; counter-reset: s; border-top: 2px solid var(--ink); }
.steps > li { counter-increment: s; position: relative; padding: 1rem 0 1rem 3rem; margin: 0; border-bottom: 1px solid var(--rule); }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: .95rem; font: 700 1.05rem var(--sans); width: 2rem; height: 2rem; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; }
.steps strong { display: block; }

.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 1.9rem; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .32em; width: 1rem; height: 1rem; border: 1.5px solid var(--ink); background: var(--field); }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.2rem; border-top: 2px solid var(--ink); }
.data { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: .93rem; line-height: 1.45; margin: 0; min-width: 34rem; }
.data caption { text-align: left; font-size: .85rem; color: var(--muted); padding: .6rem 0; caption-side: bottom; }
.data th, .data td { text-align: left; vertical-align: top; padding: .7rem .8rem .7rem 0; border-bottom: 1px solid var(--rule); }
.data thead th { font-weight: 700; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.data tbody th { font-weight: 600; }
.data td.num, .data th.num { text-align: right; white-space: nowrap; padding-right: 0; padding-left: .8rem; }
.data tr.total th, .data tr.total td { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); font-weight: 700; font-size: 1.02rem; }
.data .hi { color: var(--ox); }
.data code, .mono-inline { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86em; background: var(--paper-2); padding: .05em .3em; }
.data-wide { min-width: 46rem; }

/* ---------- Intake form ---------- */
.signup { background: var(--paper-2); padding: clamp(2.8rem, 7vw, 5rem) 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.signup-grid { display: grid; gap: 2rem; }
@media (min-width: 980px) { .signup-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3.5rem; align-items: start; } }
.signup h2 { max-width: 16ch; }
.deliverables { list-style: none; padding: 0; margin: 1.2rem 0 0; border-top: 1px solid var(--ink); font-family: var(--sans); font-size: .98rem; }
.deliverables li { margin: 0; padding: .75rem 0; border-bottom: 1px solid var(--rule); }
.deliverables b { display: block; font-family: var(--serif); font-size: 1.08rem; }

.intake { background: var(--field); border: 2px solid var(--ink); font-family: var(--sans); }
.intake-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; background: var(--ink); color: var(--on-ink); padding: .65rem 1rem; }
.intake-head b { font-family: var(--serif); font-size: 1.05rem; color: #fff; }
.intake-head span { font-size: .8rem; color: var(--on-ink-muted); white-space: nowrap; }
.intake-grid { display: grid; }
@media (min-width: 620px) { .intake-grid { grid-template-columns: 1fr 1fr; } .intake-grid .span-2 { grid-column: 1 / -1; } }
.box { position: relative; border-bottom: 1px solid var(--ink); padding: .55rem 1rem .75rem; margin: 0; min-width: 0; }
@media (min-width: 620px) { .intake-grid > .box:nth-child(1) { border-right: 1px solid var(--ink); } }
.box-label { display: flex; gap: .55rem; align-items: baseline; font-size: .82rem; color: var(--ink-3); margin-bottom: .2rem; padding: 0; }
.box-no { display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; border: 1px solid var(--ink); font-size: .75rem; font-weight: 700; color: var(--ink); }
.box input[type="text"], .box input[type="email"] {
  width: 100%; border: 0; border-bottom: 1px dashed #9d978a; background: transparent;
  font: 1.08rem/1.4 var(--sans); color: var(--ink); padding: .35rem 0; border-radius: 0;
}
.box input:focus { outline: none; border-bottom: 2px solid var(--ox); }
.box input:focus-visible { outline: none; }
fieldset.box { border-left: 0; border-right: 0; border-top: 0; }
fieldset.box legend { float: left; width: 100%; }
.ticks { clear: both; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; padding-top: .35rem; }
.tick { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; font-size: 1rem; padding: .3rem 0; }
.tick input { appearance: none; -webkit-appearance: none; width: 1.2rem; height: 1.2rem; margin: 0; border: 1.5px solid var(--ink); background: #fff; display: grid; place-items: center; cursor: pointer; }
.tick input::after { content: ""; width: .62rem; height: .62rem; background: var(--ox); transform: scale(0); transition: transform .12s; }
.tick input:checked::after { transform: scale(1); }
.tick input:focus-visible { outline: 3px solid var(--ox); outline-offset: 2px; }
.field-error { color: var(--ox); font-size: .85rem; margin: .3rem 0 0; min-height: 0; }
.intake-foot { padding: 1rem; display: grid; gap: .8rem; }
.intake-foot .btn { width: 100%; }
@media (min-width: 620px) { .intake-foot { grid-template-columns: auto 1fr; align-items: center; } .intake-foot .btn { width: auto; } }
.micro { font-size: .88rem; color: var(--ink-3); margin: 0; }
.consent { font-size: .8rem; color: var(--muted); margin: 0; padding: 0 1rem 1rem; }

.form-done { border: 2px solid var(--ink); background: var(--field); font-family: var(--sans); }
.form-done .intake-head { background: var(--ox); }
.form-done-body { padding: 1.2rem 1rem 1.3rem; }
.form-done-body h3 { margin: 0 0 .5rem; font-size: 1.35rem; }
.dev-note { margin-top: 1rem; padding: .7rem .8rem; border: 1px dashed var(--ink-3); background: var(--paper); font-size: .88rem; }

/* ---------- Quiz ---------- */
.quiz-shell { padding: clamp(2.2rem, 6vw, 4rem) 0; }
.quiz-grid { display: grid; gap: 2rem; }
@media (min-width: 980px) { .quiz-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3.5rem; align-items: start; } }
.quiz-sheet { border: 2px solid var(--ink); background: var(--field); font-family: var(--sans); }
.quiz-progress { height: 4px; background: var(--rule); }
.quiz-progress span { display: block; height: 100%; width: 12.5%; background: var(--ox); transition: width .25s; }
.q-step { border: 0; margin: 0; padding: 1.3rem 1rem 1.2rem; border-bottom: 1px solid var(--rule); }
.js .q-step { display: none; border-bottom: 0; }
.js .q-step.is-active { display: block; }
.q-count { font-size: .85rem; color: var(--muted); margin: 0 0 .35rem; }
.q-step legend { font-family: var(--serif); font-weight: 700; font-size: clamp(1.3rem, 2.6vw, 1.7rem); line-height: 1.2; padding: 0; margin-bottom: 1rem; float: left; width: 100%; }
.q-opts { clear: both; display: grid; gap: .5rem; }
.q-opt { display: flex; align-items: center; gap: .8rem; border: 1px solid var(--ink); padding: .85rem .9rem; cursor: pointer; background: #fff; font-size: 1.02rem; }
.q-opt:hover { background: var(--ox-soft); }
.q-opt input { appearance: none; -webkit-appearance: none; width: 1.2rem; height: 1.2rem; margin: 0; border: 1.5px solid var(--ink); border-radius: 50%; display: grid; place-items: center; flex: none; }
.q-opt input::after { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--ox); transform: scale(0); transition: transform .12s; }
.q-opt input:checked::after { transform: scale(1); }
.q-opt:has(input:checked) { border-width: 2px; padding: calc(.85rem - 1px) calc(.9rem - 1px); background: var(--ox-soft); }
.q-opt input:focus-visible { outline: 3px solid var(--ox); outline-offset: 2px; }
.q-nav { display: flex; justify-content: space-between; gap: .75rem; padding: 0 1rem 1.2rem; }
.no-js-submit { padding: 0 1rem 1.2rem; }
.js .no-js-submit { display: none; }
.quiz-aside { font-family: var(--sans); font-size: .95rem; }
.quiz-aside h2 { font-size: 1.3rem; }

.result { margin-top: 2rem; }
.result-card { border: 2px solid var(--ink); background: var(--field); font-family: var(--sans); }
.result-top { display: grid; gap: 1rem; padding: 1.2rem 1rem; border-bottom: 1px solid var(--ink); }
@media (min-width: 620px) { .result-top { grid-template-columns: auto 1fr; align-items: center; gap: 1.6rem; } }
.result-level { font-family: var(--serif); font-weight: 700; font-size: clamp(2.8rem, 8vw, 4.2rem); line-height: 1; letter-spacing: -.02em; margin: 0; }
.result-level[data-level="High"] { color: var(--ox); }
.meter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: .6rem 0 .4rem; max-width: 18rem; }
.meter i { height: 10px; border: 1px solid var(--ink); background: transparent; }
.meter i.on { background: var(--ink); }
.result-level[data-level="High"] + div .meter i.on, .meter.is-high i.on { background: var(--ox); border-color: var(--ox); }
.result-sub { margin: 0; font-size: .95rem; color: var(--ink-3); }
.holes { list-style: none; margin: 0; padding: 0; counter-reset: h; }
.holes li { counter-increment: h; padding: 1rem 1rem 1rem 3.2rem; margin: 0; border-bottom: 1px solid var(--rule); position: relative; }
.holes li:last-child { border-bottom: 0; }
.holes li::before { content: counter(h); position: absolute; left: 1rem; top: 1rem; width: 1.5rem; height: 1.5rem; border: 1px solid var(--ink); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.holes h3 { font-family: var(--serif); margin: 0 0 .3rem; font-size: 1.15rem; }
.holes p { margin: 0 0 .35rem; font-size: .96rem; }
.holes .fix { color: var(--ink-3); }
.holes .fix b { color: var(--ink); }
.result-foot { padding: .8rem 1rem; font-size: .82rem; color: var(--muted); border-top: 1px solid var(--ink); }

/* ---------- Report ---------- */
.report-layout { display: grid; gap: 2rem; padding: clamp(2rem, 5vw, 3.5rem) 0; }
@media (min-width: 1100px) { .report-layout { grid-template-columns: 15rem minmax(0, 1fr); gap: 3.5rem; } }
.toc { font-family: var(--sans); font-size: .92rem; }
@media (min-width: 1100px) { .toc { position: sticky; top: 5rem; align-self: start; } }
.toc p { font-weight: 700; margin-bottom: .4rem; }
.toc ol { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ink); }
.toc li { margin: 0; border-bottom: 1px solid var(--rule); }
.toc a { display: block; padding: .5rem 0; color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--ox); }
.report-part { padding: 0 0 2.8rem; margin-bottom: 2.8rem; border-bottom: 2px solid var(--ink); }
.report-part:last-child { border-bottom: 0; }
.part-label { font-family: var(--sans); font-size: .88rem; color: var(--muted); margin-bottom: .4rem; }
.report-part > h2 { max-width: 26ch; }
.formula { font-family: var(--sans); border: 1px solid var(--ink); background: var(--field); margin: 0 0 1.2rem; }
.formula div { display: grid; grid-template-columns: 2.2rem 1fr; gap: .6rem; padding: .6rem .9rem; border-bottom: 1px solid var(--rule); font-size: .95rem; }
.formula div:last-child { border-bottom: 0; }
.formula b { font-weight: 700; }
.sheet { margin-bottom: 1.8rem; }
.sheet h3 { margin-top: 1.4rem; }
.sheet .data { min-width: 40rem; }
.blocks { display: grid; gap: 1rem; }
@media (min-width: 760px) { .blocks { grid-template-columns: 1fr 1fr; } }
.block { border-top: 2px solid var(--ink); padding-top: .8rem; }
.block h3 { margin-top: 0; }
.block .steps { border-top: 1px solid var(--ink); }
.downloads { list-style: none; padding: 0; font-family: var(--sans); border-top: 1px solid var(--ink); }
.downloads li { margin: 0; padding: .7rem 0; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.downloads span { color: var(--muted); font-size: .88rem; }
.flag { color: var(--ox); font-weight: 700; }

/* ---------- Plain pages ---------- */
.doc { padding: clamp(2.2rem, 6vw, 4rem) 0 clamp(3rem, 7vw, 5rem); }
.doc h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); margin-top: 2rem; }
.doc .prose > h2:first-child { margin-top: 0; }
.contact-card { border: 2px solid var(--ink); background: var(--field); font-family: var(--sans); padding: 1.2rem 1rem; max-width: 36rem; margin-bottom: 2rem; }
.contact-card a.big { font-family: var(--serif); font-size: clamp(1.25rem, 3.5vw, 1.7rem); font-weight: 700; word-break: break-all; }

.four04 { padding: clamp(3rem, 10vw, 7rem) 0; }
.four04 .code { font-family: var(--sans); color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-ink); font-family: var(--sans); font-size: .92rem; padding: 2.6rem 0 2rem; }
.site-footer a { color: var(--on-ink); }
.site-footer a:hover { color: #fff; }
.foot-grid { display: grid; gap: 1.6rem; }
@media (min-width: 860px) { .foot-grid { grid-template-columns: 5fr 4fr 3fr; gap: 2.5rem; } }
.foot-brand { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; color: #fff; margin-bottom: .3rem; }
.site-footer address { font-style: normal; line-height: 1.6; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .35rem; }
.foot-legal { border-top: 1px solid var(--on-ink-rule); margin-top: 2rem; padding-top: 1.1rem; color: var(--on-ink-muted); font-size: .83rem; }
.foot-legal p { margin: 0 0 .4rem; max-width: 80ch; }

/* ---------- Motion + print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .gapbar-basis { width: 94%; }
}
@media print {
  .site-header, .site-footer, .signup, .toc, .btn-row, .nav-toggle, .no-print { display: none !important; }
  body { background: #fff; font-size: 10.5pt; }
  .page-head { background: #fff; color: #000; padding: 0 0 1rem; border-bottom: 2px solid #000; }
  .page-head h1 { color: #000; }
  .report-layout { display: block; padding: 1rem 0; }
  .report-part { break-inside: auto; }
  .table-scroll { overflow: visible; }
  .data { min-width: 0 !important; font-size: 8.5pt; }
  a { color: #000; }
}

/* Single-column grids must not grow to a table's min-width on mobile */
.hero-grid, .sec-grid, .signup-grid, .quiz-grid, .report-layout, .foot-grid, .blocks { grid-template-columns: minmax(0, 1fr); }
.hero-grid > *, .sec-grid > *, .signup-grid > *, .quiz-grid > *, .report-layout > *, .blocks > * { min-width: 0; }
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .sec-grid, .signup-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .quiz-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}
@media (min-width: 1100px) { .report-layout { grid-template-columns: 15rem minmax(0, 1fr); } }
@media (min-width: 860px) { .foot-grid { grid-template-columns: 5fr 4fr 3fr; } }
@media (min-width: 760px) { .blocks { grid-template-columns: 1fr 1fr; } }

/* ---------- Web3 registration ---------- */
.web3-card {
  background: var(--field);
  border: 1px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  overflow: hidden;
  max-width: 36rem;
}
.web3-card .intake-head {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--ink);
  font-family: var(--sans); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em;
}
.web3-body { padding: 1.15rem 1.15rem 1.3rem; }
.web3-body h2 { font-size: 1.55rem; margin-bottom: .4em; }
.proof-kicker {
  font-family: var(--sans); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ox); margin: 0 0 .45rem;
}
.proof-copy { font-size: 1rem; line-height: 1.5; margin: 0 0 .75rem; }
.proof-does { font-family: var(--sans); font-size: .92rem; margin: 0 0 1.1rem; color: var(--ink-3); }
.web3-assures { list-style: none; padding: 0; margin: 0 0 1.1rem; font-family: var(--sans); font-size: .92rem; }
.web3-assures li { display: flex; gap: .55rem; margin: 0 0 .4rem; }
.web3-assures i { color: var(--ox); font-style: normal; font-weight: 700; }
.web3-msg { font-family: var(--sans); font-size: .88rem; margin: .8rem 0 0; }
.web3-msg.is-ok { color: #21543a; }
.web3-msg.is-warn { color: var(--ox); }
.wallet-chip {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--sans); font-size: .82rem; color: var(--ink);
  border: 1px solid var(--ink); padding: .28rem .55rem; background: var(--paper);
}
.wallet-chip b { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 600; }
body.is-web3 .nav-cta-register { display: none; }
.nav-account { display: none; align-items: center; gap: .55rem; font-family: var(--sans); }
body.is-web3 .nav-account { display: flex; }
#web3-lock { padding: 3.5rem 0 4rem; }
#web3-lock .web3-card { max-width: 34rem; }
.nowallet { margin-top: 1rem; padding: .9rem 1rem; background: var(--ox-soft); font-family: var(--sans); font-size: .9rem; }
.nowallet a { margin-right: .85rem; }

.scan-hero-card { background: var(--field); border: 1px solid var(--ink); padding: 1.3rem 1.3rem 1.1rem; margin: 1.2rem 0 2rem; }
.scan-hero-card h2 { margin-bottom: .35em; }
.scan-kpis { display: flex; flex-wrap: wrap; gap: .7rem 1.4rem; font-family: var(--sans); margin: 1rem 0 0; }
.scan-kpis span { color: var(--muted); }
.scan-kpis b { color: var(--ink); }
.scan-chain { margin: 0 0 2rem; }
#scan-full-address { font-size: .85rem; word-break: break-all; }
#scan-lock { padding: clamp(2.4rem, 6vw, 4.2rem) 0 4rem; }
#scan-lock .web3-card { max-width: none; }
#scan-live { padding: 2rem 0 3rem; }
.scan-preview { margin: 1.15rem 0 0; }
.scan-preview img { width: 100%; height: auto; object-fit: contain; border: 1px solid var(--ink); display: block; background: var(--paper); }
.scan-preview figcaption { font-family: var(--sans); font-size: .8rem; color: var(--muted); margin: .45rem 0 0; }

.scan-preview-wide { margin: 1.2rem auto 2.6rem; max-width: 42rem; }
.scan-preview-wide img { width: 100%; height: auto; object-fit: contain; object-position: top; background: #fff; box-shadow: 0 16px 40px rgba(18,20,26,.12); }
