/* CryptoBorne — one stylesheet, no web fonts, mobile-first. */
:root {
  --bg: #faf8f3;
  --surface: #ffffff;
  --sunken: #f3efe6;
  --ink: #121a26;
  --muted: #556070;
  --rule: #e2ddd0;
  --brand: #0e5f4a;
  --brand-strong: #0a4636;
  --on-brand: #ffffff;
  --cost: #a83a16;
  --cost-soft: #f6e4db;
  --good-soft: #e2f0ea;
  --gold: #8a6212;
  --gold-soft: #f6ecd6;
  --focus: #1d5fd1;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(18, 26, 38, 0.05), 0 8px 24px -12px rgba(18, 26, 38, 0.16);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1218;
    --surface: #151c25;
    --sunken: #101720;
    --ink: #e9edf1;
    --muted: #9aa6b4;
    --rule: #263140;
    --brand: #52c7a5;
    --brand-strong: #7bdcc0;
    --on-brand: #06241c;
    --cost: #f0916b;
    --cost-soft: #3a2018;
    --good-soft: #14332a;
    --gold: #e0b45c;
    --gold-soft: #33290f;
    --focus: #8ab4ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  font: 17px/1.6 var(--sans);
  color: var(--ink);
  background: var(--bg);
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 0.18em; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 5.2vw, 2.9rem); margin: 0 0 0.6rem; }
h2 { font-size: clamp(1.35rem, 3.4vw, 1.75rem); margin: 2.6rem 0 0.7rem; }
h3 { font-size: 1.15rem; margin: 1.8rem 0 0.4rem; }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; margin: 0 0 1rem; }
li { margin-bottom: 0.35rem; }
small, .small { font-size: 0.86rem; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1rem; }
.prose { max-width: 44rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 0.5rem; top: -4rem; background: var(--ink); color: var(--bg); padding: 0.6rem 1rem; border-radius: 8px; z-index: 50; }
.skip:focus { top: 0.5rem; color: var(--bg); }

/* ── Header ─────────────────────────────────────────────────────────── */
.site-head { border-bottom: 1px solid var(--rule); background: var(--surface); position: sticky; top: 0; z-index: 20; }
.site-head .wrap { display: flex; align-items: center; gap: 0.5rem 1.5rem; flex-wrap: wrap; padding-top: 0.55rem; padding-bottom: 0.55rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font: 700 1.22rem/1 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.brand svg { width: 1.7rem; height: 1.7rem; flex: none; }
.site-nav { display: flex; gap: 0.15rem; overflow-x: auto; margin: 0 -0.5rem; padding: 0 0.25rem; scrollbar-width: none; max-width: 100%; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; padding: 0.45rem 0.6rem; border-radius: 8px; white-space: nowrap; }
.site-nav a:hover { background: var(--sunken); }
.site-nav a[aria-current] { color: var(--brand-strong); font-weight: 650; box-shadow: inset 0 -2px 0 var(--brand); border-radius: 8px 8px 0 0; }
@media (min-width: 760px) { .site-nav { margin-left: auto; } }

/* ── Page furniture ─────────────────────────────────────────────────── */
main { padding: 1.6rem 0 3rem; }
.crumbs { font-size: 0.86rem; color: var(--muted); margin-bottom: 0.9rem; }
.crumbs a { color: var(--muted); }
.lede { font-size: 1.14rem; color: var(--muted); max-width: 46rem; margin-bottom: 1.2rem; }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--brand); margin-bottom: 0.5rem; }
.asof { display: inline-flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; font-size: 0.86rem; color: var(--muted); margin-bottom: 1.2rem; }
.asof b { color: var(--ink); font-weight: 600; }
.disclose { font-size: 0.86rem; color: var(--muted); border-left: 3px solid var(--rule); padding: 0.15rem 0 0.15rem 0.75rem; margin: 0 0 1.4rem; max-width: 52rem; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); }
.note { background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); border-radius: var(--radius); padding: 0.9rem 1rem; margin: 1.2rem 0; font-size: 0.95rem; }
.note.warn { background: var(--cost-soft); border-color: color-mix(in srgb, var(--cost) 35%, transparent); }
.note.good { background: var(--good-soft); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.note > :last-child { margin-bottom: 0; }
.note strong:first-child { display: block; margin-bottom: 0.15rem; }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 650; letter-spacing: 0.03em; padding: 0.1rem 0.5rem; border-radius: 999px; border: 1px solid var(--rule); color: var(--muted); background: var(--sunken); white-space: nowrap; vertical-align: middle; }
.tag.brand-tag { color: var(--brand-strong); background: var(--good-soft); border-color: transparent; }
.tag.gold { color: var(--gold); background: var(--gold-soft); border-color: transparent; }
.tag.cost { color: var(--cost); background: var(--cost-soft); border-color: transparent; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; font: 650 0.98rem/1 var(--sans); padding: 0.8rem 1.15rem; min-height: 44px; border-radius: 10px; border: 1px solid var(--brand); background: var(--brand); color: var(--on-brand); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--on-brand); }
.btn.ghost { background: transparent; color: var(--brand-strong); border-color: var(--rule); }
.btn.ghost:hover { background: var(--sunken); }
.btn.sm { padding: 0.5rem 0.75rem; min-height: 36px; font-size: 0.88rem; }

/* ── Forms ──────────────────────────────────────────────────────────── */
label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.25rem; }
.hint { display: block; font-size: 0.8rem; font-weight: 400; color: var(--muted); margin-top: 0.2rem; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid color-mix(in srgb, var(--muted) 55%, var(--rule)); border-radius: 9px; padding: 0.6rem 0.7rem; width: 100%; min-height: 44px; }
input[type="checkbox"], input[type="radio"] { width: 1.15rem; height: 1.15rem; min-height: 0; accent-color: var(--brand); vertical-align: -0.15em; margin: 0 0.35rem 0 0; }
input:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.field { margin-bottom: 0.95rem; }
.money, .pctin { position: relative; }
.money::before { content: "$"; position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.money input { padding-left: 1.45rem; }
.pctin::after { content: "%"; position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.pctin input { padding-right: 1.7rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font: 700 1.05rem var(--serif); padding: 0; margin-bottom: 0.7rem; }
details.adv { border-top: 1px solid var(--rule); padding-top: 0.7rem; margin-top: 0.3rem; }
details.adv summary { cursor: pointer; font-size: 0.9rem; font-weight: 600; color: var(--brand-strong); margin-bottom: 0.7rem; }

/* ── Calculator layout ──────────────────────────────────────────────── */
.calc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.calc > * { min-width: 0; }
@media (min-width: 940px) {
  .calc { grid-template-columns: 330px minmax(0, 1fr); gap: 1.6rem; }
  .calc > .inputs { position: sticky; top: 4.6rem; max-height: calc(100vh - 5.4rem); overflow-y: auto; }
}
.results h2:first-child { margin-top: 0; }
.headline { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin-bottom: 1.1rem; }
.stat { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.9rem 1rem; }
.stat .k { font-size: 0.8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.stat .v { font: 700 1.7rem/1.15 var(--serif); font-variant-numeric: tabular-nums; margin-top: 0.15rem; }
.stat .d { font-size: 0.86rem; color: var(--muted); margin-top: 0.15rem; }
.stat .v.name { font-size: 1.22rem; line-height: 1.25; margin-top: 0.25rem; }
.stat.good .v { color: var(--brand-strong); }
.stat.cost .v { color: var(--cost); }

/* Ranked provider rows */
.rank { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.rank > li { margin: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.95rem 1rem; }
.rank > li.best { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.rk-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.6rem; }
.rk-pos { font: 700 0.9rem var(--sans); color: var(--muted); min-width: 1.6rem; }
.rk-name { font: 700 1.1rem var(--serif); }
.rk-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin: 0.65rem 0 0.55rem; }
.rk-nums div { min-width: 0; }
.rk-nums.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 620px) { .rk-nums.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rk-note { margin: 0.6rem 0 0; color: var(--muted); }
.rk-nums .k { font-size: 0.74rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.rk-nums .v { font-weight: 700; font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.rk-nums .v.cost { color: var(--cost); }
.bar { height: 10px; border-radius: 999px; background: var(--sunken); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }
.b-dep { background: #c6803a; }
.b-trd { background: #a83a16; }
.b-ast { background: #7a5ea8; }
.b-flt { background: #3d6fb4; }
.b-set { background: #6b7684; }
.legend { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; font-size: 0.8rem; color: var(--muted); margin: 0.2rem 0 1rem; }
.legend i { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 3px; margin-right: 0.3rem; vertical-align: -0.05em; }
.rk-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; margin-top: 0.6rem; font-size: 0.84rem; color: var(--muted); }
.rk-foot .links { display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; align-items: center; }

/* ── Tables ─────────────────────────────────────────────────────────── */
.table-scroll { position: relative; overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); margin: 1rem 0; }
.table-scroll:focus-visible { outline: 3px solid var(--focus); }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
caption { text-align: left; padding: 0.8rem 0.9rem 0.3rem; font-weight: 650; }
th, td { padding: 0.6rem 0.9rem; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: var(--sunken); white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody th { font-weight: 650; }
.neg { color: var(--cost); }
.pos { color: var(--brand-strong); }

/* ── Sources, FAQ ───────────────────────────────────────────────────── */
.sources { font-size: 0.9rem; }
.sources li { margin-bottom: 0.5rem; }
.faq details { border-bottom: 1px solid var(--rule); padding: 0.85rem 0; }
.faq summary { cursor: pointer; font-weight: 650; font-size: 1.03rem; list-style-position: outside; }
.faq details > :not(summary) { margin-top: 0.6rem; max-width: 44rem; }
.faq details > :last-child { margin-bottom: 0; }

/* ── Home ───────────────────────────────────────────────────────────── */
.hero { padding: 1.2rem 0 0.6rem; }
.hero h1 { max-width: 15em; }
.tools { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); margin: 1.4rem 0; padding: 0; list-style: none; }
.tools > li { margin: 0; }
.tool { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.15rem; box-shadow: var(--shadow); }
a.tool:hover { border-color: var(--brand); color: var(--ink); }
.tool .tag { align-self: flex-start; }
.tool h3 { margin: 0.5rem 0 0.35rem; font-size: 1.22rem; }
.tool p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.9rem; }
.tool .go { margin-top: auto; font-weight: 650; color: var(--brand-strong); }
.tool.soon { box-shadow: none; background: transparent; border-style: dashed; }
.principles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); padding: 0; list-style: none; margin: 1rem 0; }
.principles li { margin: 0; border-top: 2px solid var(--ink); padding-top: 0.7rem; }
.principles strong { display: block; font-family: var(--serif); font-size: 1.08rem; margin-bottom: 0.2rem; }
.principles span { color: var(--muted); font-size: 0.95rem; }

/* ── Email capture ──────────────────────────────────────────────────── */
.signup { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.2rem; margin: 2.4rem 0 0; box-shadow: var(--shadow); }
.signup h2 { margin: 0 0 0.3rem; font-size: 1.3rem; }
.signup p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.8rem; max-width: 40rem; }
.signup form { display: flex; flex-wrap: wrap; gap: 0.6rem; max-width: 34rem; }
.signup input[type="email"] { flex: 1 1 14rem; }
.signup .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.signup .msg { flex-basis: 100%; font-size: 0.92rem; font-weight: 600; margin: 0; min-height: 1.3em; }
.signup .msg.ok { color: var(--brand-strong); }
.signup .msg.err { color: var(--cost); }
.signup .fine { font-size: 0.8rem; color: var(--muted); margin: 0.6rem 0 0; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--rule); background: var(--surface); padding: 2rem 0 2.6rem; font-size: 0.88rem; color: var(--muted); }
.site-foot .cols { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin-bottom: 1.4rem; }
.site-foot h2 { font: 700 0.8rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); margin: 0 0 0.5rem; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 0.3rem; }
.site-foot a { color: var(--muted); }
.legal { border-top: 1px solid var(--rule); padding-top: 1.1rem; max-width: 60rem; }
.legal p { margin-bottom: 0.6rem; }
.legal strong { color: var(--ink); }

/* ── Harvest calculator bits ────────────────────────────────────────── */
.lots td, .lots th { padding: 0.4rem 0.45rem; }
.lots input, .lots select { min-height: 38px; padding: 0.35rem 0.45rem; font-size: 0.92rem; min-width: 5.2rem; }
.lots input.sym { min-width: 4.4rem; text-transform: uppercase; }
.lots input[type="checkbox"] { min-width: 0; min-height: 0; width: 1.35rem; height: 1.35rem; padding: 0; }
.lots .x { background: none; border: 0; color: var(--muted); font-size: 1.2rem; cursor: pointer; min-width: 36px; min-height: 36px; border-radius: 8px; }
.lots .x:hover { background: var(--sunken); color: var(--cost); }
.lots select { margin-top: 0.3rem; font-size: 0.82rem; }
.lots .pl { white-space: nowrap; }
/* On a phone each lot becomes a small card instead of a wide table row. */
@media (max-width: 719px) {
  .lots thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .lots, .lots tbody { display: block; }
  .lots tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem 0.7rem; padding: 0.8rem; border-bottom: 1px solid var(--rule); position: relative; }
  .lots tr:last-child { border-bottom: 0; }
  .lots td { display: block; border: 0; padding: 0; text-align: left; }
  .lots td::before { content: attr(data-label); display: block; font-size: 0.72rem; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.15rem; }
  .lots td.num { text-align: left; }
  .lots td.act { position: absolute; right: 0.35rem; top: 0.25rem; }
  .lots td.act::before { content: none; }
  .lots td:first-child { padding-right: 2.4rem; }
}
.toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.7rem 0; }
.drop { border: 2px dashed var(--rule); border-radius: var(--radius); padding: 0.9rem; text-align: center; font-size: 0.92rem; color: var(--muted); }
.drop.over { border-color: var(--brand); background: var(--good-soft); }
.flow { display: grid; gap: 0.5rem; margin: 0.9rem 0; }
.flow div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0.8rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 9px; font-size: 0.95rem; }
.flow b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-dot { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #2e9e5b; margin-right: 0.35rem; }
.live-dot.off { background: var(--muted); }

.timeline { list-style: none; padding: 0; margin: 1rem 0; border-left: 2px solid var(--rule); }
.timeline li { padding: 0 0 1.1rem 1rem; position: relative; margin: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 0.45rem; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); border: 2px solid var(--bg); }
.timeline time { display: block; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print {
  .site-head, .site-foot, .signup, .inputs .btn, .toolbar { display: none; }
  body { background: #fff; font-size: 12pt; }
}
