/* Fonts are self-hosted: no requests to Google Fonts (no IP sent to third parties). */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin-600-normal.woff2") format("woff2");
}

:root {
  --casing: #E7EBE8;
  --surface: #F7F9F7;
  --ink: #132624;
  --ink-soft: #4F5F5C;
  --line: #C9D2CE;
  --luce: #F2B400;
  --gas: #2F66F5;
  --up: #D2392A;
  --down: #1E9566;
  --wheel-red: #B8291E;

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.833rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.44rem;
  --step-3: 2.074rem;
  --step-4: 2.986rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--casing);
  color: var(--ink);
  font: 400 var(--step-0)/1.5 var(--body);
  min-height: 100vh;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; font-weight: 600; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gas); outline-offset: 3px; border-radius: 6px; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 1.25rem;
  max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.5rem 0.5rem;
}
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; }
.brand-name { font: 800 var(--step-3)/1 var(--display); letter-spacing: -0.03em; }
.brand-tag { margin: 0; color: var(--ink-soft); flex: 1; }
.lamp {
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #6b7774, #2c3a38 70%);
  box-shadow: inset 0 0 0 3px var(--ink);
  transition: background .4s, box-shadow .4s;
}
.lamp.on {
  background: radial-gradient(circle at 35% 35%, #FFE58A, var(--luce) 60%, #c98f00);
  box-shadow: inset 0 0 0 3px var(--ink), 0 0 18px 4px rgba(242, 180, 0, .55);
  animation: lamp-blink 1.2s ease-in-out 3;
}
@keyframes lamp-blink { 50% { box-shadow: inset 0 0 0 3px var(--ink), 0 0 2px 0 rgba(242, 180, 0, .2); } }

.ghost-btn {
  border: 1.5px solid var(--line); background: transparent; border-radius: 999px;
  padding: .45rem 1rem; color: var(--ink-soft); font-size: var(--step--1);
}
.ghost-btn:hover { border-color: var(--ink); color: var(--ink); }

main { max-width: 1200px; margin: 0 auto; padding: 1rem 1.5rem 4rem; }

/* ---------- intake ---------- */
.intake { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.25rem; align-items: stretch; }

.drop {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: .5rem;
  min-height: 300px; padding: 2.5rem; border-radius: 28px;
  background: var(--surface);
  border: 2px dashed var(--line);
  cursor: pointer; transition: border-color .2s, background .2s, transform .2s;
}
.drop input { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.drop:hover, .drop:focus-within { border-color: var(--ink); }
.drop:focus-within { outline: 3px solid var(--gas); outline-offset: 3px; }
.drop.dragging { border-style: solid; border-color: var(--luce); background: #FFF9E6; transform: scale(1.01); }
.drop.busy { pointer-events: none; }
.drop.busy .drop-dial { animation: spin-dial 1s linear infinite; }
@keyframes spin-dial { to { transform: rotate(360deg); } }
.drop-dial {
  width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: .5rem;
  color: var(--ink); background: var(--luce); border-radius: 50%; padding: 10px;
}
.drop-dial svg { width: 100%; height: 100%; }
.drop-title { font: 800 var(--step-4)/1.02 var(--display); letter-spacing: -0.035em; max-width: 14ch; }
.drop-sub { font-size: var(--step-1); color: var(--ink-soft); }
.drop-sub u { text-decoration-color: var(--luce); text-decoration-thickness: 3px; text-underline-offset: 4px; color: var(--ink); }
.drop-btn {
  align-self: flex-start; margin: .75rem 0 .1rem; padding: .95rem 1.7rem; border-radius: 999px;
  background: var(--ink); color: var(--surface); font: 600 var(--step-1)/1.2 var(--body);
}
.drop:hover .drop-btn { background: #22403c; }
.drop-note { font-size: var(--step--1); color: var(--ink-soft); max-width: 52ch; margin-top: .75rem; }

.side { background: var(--ink); color: var(--surface); border-radius: 22px; padding: 1.5rem; min-height: 300px; }
.side [hidden] { display: none; }
.side h2 { font-size: var(--step-2); }
.alerts { display: flex; flex-direction: column; gap: .9rem; }

/* first-visit guide: a real sequence, so the steps are numbered */
.guide-steps { list-style: none; counter-reset: step; padding: 0; margin: 1.1rem 0; display: grid; gap: 1rem; }
.guide-steps li { counter-increment: step; display: grid; grid-template-columns: 2.25rem 1fr; column-gap: .85rem; }
.guide-steps li::before {
  content: counter(step); grid-row: span 2; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--luce); color: var(--ink); font: 800 var(--step-1)/2.25rem var(--display); text-align: center;
}
.guide-steps h3 { margin: 0; font: 600 var(--step-0)/1.3 var(--body); color: var(--surface); }
.guide-steps p { margin: .15rem 0 0; color: #C8D4D1; font-size: var(--step--1); }
.where { border-top: 1px solid #2C4844; padding-top: .9rem; }
.where summary { cursor: pointer; font-weight: 600; color: var(--luce); }
.where ul { margin: .6rem 0 0; padding-left: 1.1rem; color: #C8D4D1; font-size: var(--step--1); display: grid; gap: .4rem; }
.where strong { color: var(--surface); font-weight: 600; }
.alert.next { margin: 0; border-left-color: var(--luce); color: #C8D4D1; font-size: var(--step--1); }
.add-btn {
  align-self: flex-start; padding: .65rem 1.25rem; border-radius: 999px; cursor: pointer;
  background: var(--luce); color: var(--ink); font-weight: 600;
}
.add-btn:hover { background: #FFD24D; }
#alerts-list { display: flex; flex-direction: column; gap: .75rem; overflow: auto; max-height: 420px; }
.alerts-calm { color: #A9B8B4; margin: 0; }
.alert {
  display: block; width: 100%; text-align: left; background: #1D3532; border: 0; color: inherit;
  border-radius: 14px; padding: .9rem 1rem; border-left: 5px solid var(--up);
}
.alert:hover { background: #24403C; }
.alert.down { border-left-color: var(--down); }
.alert.expiry { border-left-color: var(--luce); }
.alert-head { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.alert-body { margin: .35rem 0 0; color: #C8D4D1; font-size: var(--step--1); }
.alert-body strong { color: var(--surface); font-weight: 600; }

.kind-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.kind-dot.luce { background: var(--luce); }
.kind-dot.gas { background: var(--gas); }

/* ---------- supplies ---------- */
.supplies { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 2.5rem; }

.supply {
  display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  background: var(--surface); border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line);
}
.supply.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 4px var(--luce); } 100% { box-shadow: 0 0 0 0 transparent; } }

.meter {
  padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem;
  background: linear-gradient(180deg, #DDE3DF, #D3DAD6);
  border-right: 1px solid var(--line);
}
.meter.luce { box-shadow: inset 6px 0 0 var(--luce); }
.meter.gas { box-shadow: inset 6px 0 0 var(--gas); }
.meter-head h3 { font-size: var(--step-2); }
.meter-id { color: var(--ink-soft); font-size: var(--step--1); margin-top: .2rem; font-variant-numeric: tabular-nums; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip {
  font-size: var(--step--1); font-weight: 600; padding: .2rem .65rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
}
.chip.luce { background: var(--luce); border-color: var(--luce); }
.chip.gas { background: var(--gas); border-color: var(--gas); color: #fff; }

/* the odometer: the one loud element */
.odo-label { font-size: var(--step--1); color: var(--ink-soft); margin-bottom: .35rem; }
.odo {
  display: inline-flex; align-items: stretch; gap: 3px;
  background: var(--ink); padding: 8px; border-radius: 10px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6), 0 1px 0 rgba(255, 255, 255, .6);
  font: 600 2.6rem/1 var(--display);
}
.wheel {
  width: .72em; height: 1.25em; overflow: hidden; border-radius: 4px;
  background: linear-gradient(180deg, #050d0c 0%, #22332f 18%, #2b3d39 50%, #22332f 82%, #050d0c 100%);
  color: var(--surface); position: relative;
}
.wheel.red { background: linear-gradient(180deg, #4a0d08 0%, #a8251b 18%, var(--wheel-red) 50%, #a8251b 82%, #4a0d08 100%); }
.strip { display: flex; flex-direction: column; transition: transform 1.4s cubic-bezier(.2, .8, .2, 1); }
.strip span { height: 1.25em; display: grid; place-items: center; }
.odo-sep { color: var(--surface); align-self: flex-end; padding: 0 1px .12em; }
.odo-unit { font: 500 var(--step-0)/1 var(--body); color: var(--ink-soft); margin-left: .5rem; align-self: flex-end; }
.odo-row { display: flex; align-items: flex-end; }
.odo-none { color: var(--ink-soft); font-size: var(--step--1); }

.meter-trend { font-size: var(--step--1); color: var(--ink-soft); margin: 0; }
.meter-trend .up { color: var(--up); font-weight: 600; }
.meter-trend .down { color: var(--down); font-weight: 600; }

.history { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.history h4 { margin: 0; font: 600 var(--step-0)/1.2 var(--display); }
.chart { width: 100%; height: auto; max-height: 200px; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.chart .area { opacity: .18; }
.chart .dot { fill: var(--surface); stroke: var(--ink); stroke-width: 2.5; }
.chart .dot.up { stroke: var(--up); fill: var(--up); }
.chart .dot.down { stroke: var(--down); fill: var(--down); }
.chart text { font: 500 11px var(--body); fill: var(--ink-soft); }
.chart .val { font-weight: 600; fill: var(--ink); }
.chart-empty { color: var(--ink-soft); font-size: var(--step--1); margin: 0; }

.bills { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.bills li { border-bottom: 1px solid var(--line); }
.bill-row {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 9.5rem; gap: 1rem; align-items: center;
  padding: .75rem .25rem; background: transparent; border: 0; text-align: left;
}
.bill-row:hover { background: var(--casing); }
.bill-period { font-weight: 600; }
.bill-file { display: block; font-size: var(--step--1); color: var(--ink-soft); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bill-num { font-variant-numeric: tabular-nums; }
.bill-num small { display: block; color: var(--ink-soft); font-size: var(--step--1); }
.bill-row .badge { justify-self: end; }
.badge { font-size: var(--step--1); font-weight: 600; padding: .15rem .55rem; border-radius: 999px; white-space: nowrap; }
.badge.up { background: #FBE3E0; color: var(--up); }
.badge.down { background: #DDF3EA; color: var(--down); }
.badge.same { background: var(--casing); color: var(--ink-soft); }
.badge.first { background: transparent; color: var(--ink-soft); }

.primary-btn {
  background: var(--ink); color: var(--surface); border: 0; border-radius: 999px;
  padding: .75rem 1.4rem; font-weight: 600;
}
.primary-btn:hover { background: #22403c; }
.danger-btn { background: transparent; color: var(--up); border: 1.5px solid currentColor; border-radius: 999px; padding: .6rem 1.2rem; font-weight: 600; }

/* ---------- bill sheet ---------- */
.sheet {
  border: 0; padding: 0; border-radius: 22px; width: min(760px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem); background: var(--surface); color: var(--ink);
  box-shadow: 0 30px 80px rgba(19, 38, 36, .35);
}
.sheet::backdrop { background: rgba(19, 38, 36, .55); backdrop-filter: blur(3px); }
.sheet[open] { animation: sheet-in .25s ease-out; }
@keyframes sheet-in { from { transform: translateY(16px); opacity: 0; } }
.sheet-inner { padding: 1.75rem; display: flex; flex-direction: column; gap: 1.25rem; }
.sheet-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.sheet-head h2 { font-size: var(--step-3); letter-spacing: -0.02em; }
.sheet-head p { margin: .25rem 0 0; color: var(--ink-soft); }
.close-btn { border: 0; background: var(--casing); width: 40px; height: 40px; border-radius: 50%; font-size: 1.3rem; flex: none; }

.confidence { display: flex; align-items: center; gap: .75rem; font-size: var(--step--1); color: var(--ink-soft); }
.confidence-bar { flex: 1; max-width: 180px; height: 8px; border-radius: 999px; background: var(--casing); overflow: hidden; }
.confidence-bar i { display: block; height: 100%; background: var(--down); }
.confidence-bar.mid i { background: var(--luce); }
.confidence-bar.low i { background: var(--up); }

.warn-list { margin: 0; padding: .9rem 1rem .9rem 2rem; background: #FFF6DA; border-radius: 12px; font-size: var(--step--1); }

.field-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1.5rem; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
legend { font: 600 var(--step-0)/1.2 var(--display); margin-bottom: .4rem; padding: 0; }
.field { display: flex; flex-direction: column; gap: .2rem; }
.field label { font-size: var(--step--1); color: var(--ink-soft); }
.field input, .field select {
  font: inherit; padding: .5rem .7rem; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.field input:focus, .field select:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(47, 102, 245, .25); }
.field input.missing { border-style: dashed; background: #FFFBEF; }

details.raw { border-top: 1px solid var(--line); padding-top: 1rem; }
details.raw summary { cursor: pointer; font-weight: 600; }
details.raw pre {
  max-height: 260px; overflow: auto; background: var(--casing); padding: 1rem; border-radius: 12px;
  font-size: 12px; white-space: pre-wrap; margin: .75rem 0 0;
}
.sheet-actions { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 1.25rem; bottom: 1.25rem; display: flex; flex-direction: column; gap: .5rem; z-index: 50; max-width: min(420px, calc(100vw - 2.5rem)); }
.toast {
  background: var(--ink); color: var(--surface); padding: .8rem 1rem; border-radius: 14px;
  box-shadow: 0 12px 30px rgba(19, 38, 36, .3); border-left: 5px solid var(--down);
  animation: toast-in .25s ease-out;
}
.toast.error { border-left-color: var(--up); }
.toast.info { border-left-color: var(--luce); }
.toast b { display: block; }
.toast span { font-size: var(--step--1); color: #C8D4D1; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .intake { grid-template-columns: 1fr; }
  .supply { grid-template-columns: 1fr; }
  .meter { border-right: 0; border-bottom: 1px solid var(--line); }
  .side, .drop { min-height: 0; }
}
@media (max-width: 600px) {
  .topbar { flex-wrap: wrap; gap: .5rem 1rem; }
  .brand-tag { order: 3; flex-basis: 100%; }
  .drop { padding: 1.75rem; }
  .drop-title { font-size: var(--step-3); }
  .bill-row { grid-template-columns: 1fr 1fr; }
  .field-groups { grid-template-columns: 1fr; }
  .odo { font-size: 2.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- public site additions ---------- */
.drop-note strong { color: var(--ink); font-weight: 600; }
.sheet-hint { margin: 0; color: var(--ink-soft); font-size: var(--step--1); }

.ad-slot { margin: 2rem 0 0; min-height: 0; }
.ad-label { display: block; font-size: 11px; color: var(--ink-soft); margin-bottom: .25rem; }
.ad-slot ins { min-height: 90px; }

.data-panel {
  margin-top: 2.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  padding: 1.5rem; border-radius: 20px; border: 1.5px solid var(--line); background: var(--surface);
}
.data-panel h2 { font-size: var(--step-1); }
.data-panel p { margin: .35rem 0 0; color: var(--ink-soft); max-width: 62ch; font-size: var(--step--1); }
.data-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.data-actions .ghost-btn { cursor: pointer; }
.ghost-btn.danger { color: var(--up); border-color: #E9B4AD; }
.ghost-btn.danger:hover { border-color: var(--up); color: var(--up); }

/* ---------- reference prices (public open data) ---------- */
.market { margin-top: 3.5rem; }
.market-head h2 { font-size: var(--step-3); letter-spacing: -0.02em; }
.market-head p { margin: .5rem 0 0; color: var(--ink-soft); max-width: 68ch; }
.market-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.ref-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.ref-card.luce { box-shadow: inset 0 6px 0 var(--luce); }
.ref-card.gas { box-shadow: inset 0 6px 0 var(--gas); }
.ref-card h3 { font-size: var(--step-2); display: flex; align-items: center; gap: .5rem; }
.ref-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 240px); gap: 1rem; align-items: center; }
.ref-row:not(.main) { grid-template-columns: 1fr; border-top: 1px solid var(--line); padding-top: 1rem; }
.ref-row h4 { margin: 0; font: 600 var(--step-0)/1.25 var(--display); }
.ref-value { margin: .3rem 0 0; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ref-value strong { color: var(--ink); font: 700 var(--step-2)/1 var(--display); letter-spacing: -0.02em; }
.ref-row:not(.main) .ref-value strong { font-size: var(--step-1); }
.ref-month { display: block; font-size: var(--step--1); margin-top: .2rem; }
.ref-deltas { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0 0; }
.ref-deltas:empty { display: none; }
.ref-note { margin: .5rem 0 0; font-size: var(--step--1); color: var(--ink-soft); max-width: 46ch; }
.spark { width: 100%; height: auto; display: block; }
.spark-line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { opacity: .22; }
.spark.luce .spark-area { fill: var(--luce); }
.spark.gas .spark-area { fill: var(--gas); }
.spark-dot { fill: var(--up); }
.spark text { font: 500 11px var(--body); fill: var(--ink-soft); }
.market-source { margin: 1rem 0 0; font-size: var(--step--1); color: var(--ink-soft); max-width: 90ch; }
.market-source a { color: var(--ink); text-underline-offset: 3px; }
@media (max-width: 900px) {
  .market-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .ref-row { grid-template-columns: 1fr; }
}

/* ---------- language switch and notes ---------- */
.langs { display: flex; gap: .15rem; flex: none; }
.langs a { font: 600 var(--step--1)/1 var(--body); color: var(--ink-soft); text-decoration: none; padding: .45rem .5rem; border-radius: 8px; }
.langs a:hover { color: var(--ink); background: var(--surface); }
.langs a[aria-current] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--luce); }
.legal .topbar .back-link { margin-left: auto; }
.country-note { margin: 0 0 1rem; padding: .85rem 1.1rem; border-radius: 14px; background: #FFF6D6; border: 1px solid #F0D98A; font-size: var(--step--1); max-width: 90ch; }
.legal-note { font-size: var(--step--1); color: var(--ink-soft); border-left: 3px solid var(--line); padding-left: .75rem; }
@media (max-width: 600px) {
  .langs { order: 2; margin-left: auto; }
}

/* ---------- FAQ ---------- */
.faq { margin-top: 3.5rem; max-width: 80ch; }
.faq h2 { font-size: var(--step-3); letter-spacing: -0.02em; margin-bottom: 1rem; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font: 600 var(--step-2)/1 var(--display); color: var(--ink-soft); transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item h3 { font-size: var(--step-1); font-weight: 600; }
.faq-item p { margin: 0 0 1.25rem; color: var(--ink-soft); max-width: 70ch; }

/* ---------- content pages (prices) ---------- */
.page-body { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.5rem 4rem; }
.page-body h1 { font: 800 var(--step-4)/1.05 var(--display); letter-spacing: -0.035em; max-width: 22ch; margin-top: .5rem; }
.page-body .market { margin-top: 2rem; }
.page-lead { font-size: var(--step-1); color: var(--ink-soft); max-width: 62ch; margin: 1rem 0 0; }
.crumbs { font-size: var(--step--1); color: var(--ink-soft); }
.crumbs a { color: var(--ink); text-underline-offset: 3px; }
.page-section { margin-top: 3rem; }
.page-section h2 { font-size: var(--step-3); letter-spacing: -0.02em; margin-bottom: 1rem; }
.prose { max-width: 72ch; line-height: 1.65; }
.prose h3 { font-size: var(--step-1); margin: 1.5rem 0 .4rem; }
.prose p { margin: 0 0 .75rem; }
.ref-table { border-collapse: collapse; width: 100%; background: var(--surface); border-radius: 16px; overflow: hidden; font-variant-numeric: tabular-nums; }
.ref-table caption { text-align: left; color: var(--ink-soft); font-size: var(--step--1); padding-bottom: .5rem; }
.ref-table th, .ref-table td { padding: .65rem .9rem; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.ref-table th:first-child { text-align: left; font-weight: 600; }
.ref-table thead th { font: 600 var(--step--1)/1.3 var(--display); background: var(--ink); color: var(--surface); }
.ref-table thead th span { display: block; font-weight: 400; opacity: .75; }
.ref-table tbody tr:first-child { background: #FFF6D6; }
a.primary-btn { display: inline-block; text-decoration: none; }

.how { margin-top: 3.5rem; }
.how h2 { font-size: var(--step-3); letter-spacing: -0.02em; }
.how ol { list-style: none; counter-reset: step; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.how li { counter-increment: step; border-top: 3px solid var(--ink); padding-top: 1rem; }
.how li::before { content: counter(step); font: 800 var(--step-2)/1 var(--display); color: var(--luce); -webkit-text-stroke: 1px var(--ink); }
.how h3 { font-size: var(--step-1); margin: .5rem 0 .4rem; }
.how li p { margin: 0; color: var(--ink-soft); }
.how-note { margin-top: 1.5rem; font-size: var(--step--1); color: var(--ink-soft); max-width: 75ch; }

.site-footer { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem 3rem; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: var(--step--1); }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 .75rem; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer a { color: var(--ink); text-underline-offset: 3px; }
.site-footer a[aria-current="page"] { text-decoration-color: var(--luce); text-decoration-thickness: 3px; }
.site-footer p { margin: 0; }

.noscript { max-width: 1200px; margin: 1rem auto; padding: 1rem 1.5rem; background: #FFF6DA; border-radius: 12px; }

/* legal pages */
.legal .topbar { justify-content: space-between; }
.back-link { color: var(--ink); font-weight: 600; text-underline-offset: 4px; text-decoration-color: var(--luce); text-decoration-thickness: 3px; }
.legal-body { max-width: 72ch; margin: 0 auto; padding: 2rem 1.5rem 4rem; line-height: 1.65; }
.legal-body h1 { font-size: var(--step-4); letter-spacing: -0.035em; font-weight: 800; }
.legal-body h2 { font-size: var(--step-1); margin: 2.25rem 0 .5rem; }
.legal-body a { color: var(--ink); text-underline-offset: 3px; }
.legal-body code { font-size: .9em; background: var(--casing); padding: .05em .35em; border-radius: 4px; }
.legal-meta { color: var(--ink-soft); font-size: var(--step--1); margin-top: .5rem; }
.legal-summary { background: var(--surface); border: 1.5px solid var(--line); border-left: 6px solid var(--luce); border-radius: 16px; padding: 1.25rem 1.5rem; margin: 1.75rem 0; }
.legal-summary h2 { margin-top: 0; }
.legal-summary ul { margin: 0; padding-left: 1.2rem; }
.table-wrap { overflow-x: auto; }
.legal-body table { border-collapse: collapse; width: 100%; font-size: var(--step--1); }
.legal-body th, .legal-body td { text-align: left; vertical-align: top; padding: .6rem .75rem; border-bottom: 1px solid var(--line); }
.legal-body th { font-family: var(--display); font-weight: 600; }

@media (max-width: 900px) {
  .how ol { grid-template-columns: 1fr; }
}
