:root {
  --bg: #eef1f4;
  --surface: #ffffff;
  --ink: #1c2733;
  --muted: #5b6776;
  --line: #d3dae2;
  --panel: #24456b;
  --panel-soft: #dfe7f1;
  --sun: #e8b931;
  --sun-ink: #6b4f00;
  --refuse: #b23a48;
  --refuse-soft: #f6e3e6;
  --focus: #2f6fb7;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121a24; --surface: #1a2431; --ink: #e6ebf0; --muted: #9aa6b4; --line: #2c3a4b;
    --panel: #8fb2dc; --panel-soft: #1f3046; --sun: #f0c64a; --sun-ink: #f0c64a;
    --refuse: #f08a96; --refuse-soft: #3a1f25; --focus: #8fb2dc; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121a24; --surface: #1a2431; --ink: #e6ebf0; --muted: #9aa6b4; --line: #2c3a4b;
  --panel: #8fb2dc; --panel-soft: #1f3046; --sun: #f0c64a; --sun-ink: #f0c64a;
  --refuse: #f08a96; --refuse-soft: #3a1f25; --focus: #8fb2dc; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.55 "Archivo", system-ui, sans-serif; font-variation-settings: "wdth" 100;
}
a { color: var(--panel); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
h1, h2, h3 { font-stretch: 78%; font-variation-settings: "wdth" 78; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); font-weight: 760; letter-spacing: -0.01em; max-width: 15ch; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 720; }
h3 { font-size: 1.3rem; font-weight: 700; }
code { font: 500 0.85em ui-monospace, "SFMono-Regular", Menlo, monospace; overflow-wrap: anywhere; }

.bar, main, .foot { max-width: 1120px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 720px) { .bar, main, .foot { padding-inline: 32px; } }
.bar { display: flex; align-items: center; justify-content: space-between; padding-block: 18px; }
.brand { display: inline-flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 1.25rem; font-variation-settings: "wdth" 80; }
.brand svg { width: 32px; height: 32px; }
.brand .cell { fill: var(--panel); } .brand .grid { stroke: var(--panel-soft); stroke-width: 1.2; } .brand .sun { fill: var(--sun); }
.lang { font: inherit; font-size: 0.95rem; background: none; border: 1px solid var(--line); color: var(--ink); padding: 8px 14px; border-radius: 999px; cursor: pointer; min-height: 44px; }

section { padding-block: 48px; }
.section-lede { color: var(--muted); max-width: 66ch; margin: 12px 0 28px; }

.hero { display: grid; gap: 40px; align-items: center; padding-top: 24px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.15fr 1fr; gap: 56px; padding-top: 48px; } }
.hero-text { min-width: 0; }
.lede { font-size: 1.15rem; max-width: 56ch; margin: 22px 0 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 10px; border: 2px solid var(--panel); color: var(--panel); text-decoration: none; font-weight: 650; }
.btn.primary { background: var(--panel); color: var(--bg); }

/* The meter: the one loud element. A utility meter's counter, reading the chain. */
.meter { margin: 0; background: var(--panel); color: #f3f6fa; border-radius: 20px; padding: 28px 24px 22px; min-width: 0; }
.meter-face { display: flex; align-items: baseline; gap: 10px; }
.digits { font: 700 clamp(3rem, 11vw, 5.6rem)/1 "Archivo", sans-serif; font-variation-settings: "wdth" 75; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; display: flex; gap: 4px; }
.digits b { display: inline-block; background: rgba(0, 0, 0, 0.28); border-radius: 6px; padding: 4px 6px; font-weight: 700; }
.digits b.lit { color: var(--sun); }
.unit { font-size: 1.4rem; font-weight: 600; opacity: 0.8; }
.gauge { position: relative; height: 12px; background: rgba(255, 255, 255, 0.16); border-radius: 6px; margin: 22px 0 14px; }
.gauge span { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--sun); border-radius: 6px; transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.gauge i { position: absolute; top: -6px; bottom: -6px; right: 0; width: 3px; background: #f3f6fa; border-radius: 2px; }
.meter figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 0.95rem; color: #d3deeb; }
@media (prefers-reduced-motion: reduce) { .gauge span { transition: none; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .meter { background: #1f3a5c; } }
:root[data-theme="dark"] .meter { background: #1f3a5c; }

/* Jobs: real sequences, so the steps are numbered. */
.job-list { display: grid; gap: 24px; }
@media (min-width: 900px) { .job-list { grid-template-columns: 1fr 1fr; } }
.job { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; min-width: 0; }
.job header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; align-items: baseline; }
.job .meta { color: var(--muted); font-size: 0.95rem; margin: 6px 0 16px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { position: relative; padding: 12px 0 12px 44px; border-top: 1px solid var(--line); counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 12px; width: 30px; height: 30px; border-radius: 50%; background: var(--panel-soft); color: var(--panel); font-weight: 700; display: grid; place-items: center; font-size: 0.9rem; }
.steps li.paid::before { background: var(--sun); color: #2b2100; }
.steps li.back::before { background: var(--panel); color: var(--bg); }
.step-name { font-weight: 650; }
.step-detail { display: block; color: var(--muted); font-size: 0.93rem; }
.step-detail a { color: inherit; }
.amount { color: var(--sun-ink); font-weight: 650; }
.stage { font-size: 0.9rem; padding: 4px 10px; border-radius: 999px; background: var(--panel-soft); color: var(--panel); white-space: nowrap; }

/* Cheat checks */
.cases { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 900px) { .cases { grid-template-columns: 1fr 1fr; } }
.case { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.case p { margin: 0; color: var(--muted); }
.case button { align-self: flex-start; font: inherit; font-weight: 650; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 2px solid var(--refuse); background: none; color: var(--refuse); cursor: pointer; }
.case button[disabled] { opacity: 0.6; cursor: progress; }
.result { margin: 0; font-weight: 600; min-height: 1.5em; overflow-wrap: anywhere; }
.result.refused { color: var(--refuse); background: var(--refuse-soft); padding: 10px 12px; border-radius: 8px; }
.result.refused.flash { animation: flash 0.6s ease-out; }
@keyframes flash { from { transform: translateX(-4px); } 40% { transform: translateX(4px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .result.refused.flash { animation: none; } }
.recorded { color: var(--muted); font-size: 0.95rem; max-width: 70ch; margin-top: 20px; }

.video video { width: 100%; border-radius: 14px; background: #000; margin-top: 20px; aspect-ratio: 16 / 9; }

.how-grid { display: grid; gap: 28px; margin-top: 24px; }
@media (min-width: 900px) { .how-grid { grid-template-columns: repeat(3, 1fr); } }
.how article { min-width: 0; }
.how p { color: var(--muted); }
.window { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 0.95rem; }
.window dt { color: var(--muted); }
.window dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

.foot { border-top: 1px solid var(--line); padding-block: 28px 48px; color: var(--muted); font-size: 0.95rem; }
.foot p { margin: 6px 0; }
.foot a + a { margin-left: 16px; }
