@font-face {
  font-family: "Syne";
  src: url("../../fonts/syne-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Syne";
  src: url("../../fonts/syne-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../../fonts/source-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../../fonts/source-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../../fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../../fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0b0b0c;
  --ink-2: #141416;
  --paper: #f4efe4;
  --paper-dim: #cfc6b4;
  --mute: #8a8376;
  --gold: #c9a227;
  --gold-2: #e8c547;
  --line: #2c2a26;
  --line-2: #3a372f;
  --input: #fff6d8;
  --ink-text: #161409;
  --red: #d46757;
  --green: #6fbf8b;
  --focus: #e8c547;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-2); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--paper); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--gold);
  color: var(--ink);
  padding: 0.5rem 0.8rem;
  font-weight: 600;
  z-index: 20;
}
.skip:focus { top: 1rem; }

.wrap { width: min(1080px, calc(100% - 2.5rem)); margin-inline: auto; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
.mark {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  text-decoration: none;
}
.top-meta {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--mute);
  letter-spacing: 0.04em;
}
.top-meta a {
  color: var(--paper);
  text-decoration: none;
  border: 1px solid var(--gold);
  padding: 0.4rem 0.7rem;
}
.top-meta a:hover { background: var(--gold); color: var(--ink); }
.top-meta a.nav-quiet {
  border-color: var(--line-2);
  color: var(--paper-dim);
}
.top-meta a.nav-quiet:hover {
  border-color: var(--gold);
  background: transparent;
  color: var(--paper);
}

.hero { padding: 3rem 0 2.25rem; }
.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}
h1 {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: clamp(1.9rem, 5vw, 3.1rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  max-width: 18ch;
}
.lede { max-width: 42rem; color: var(--paper-dim); margin: 0; }

.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
  padding-bottom: 3rem;
}

.card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  padding: 1.25rem 1.2rem 1.35rem;
}
.card h2 {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin: 0 0 1rem;
}

.field { margin: 0 0 0.85rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

label {
  display: block;
  font-size: 0.82rem;
  color: var(--paper-dim);
  margin: 0 0 0.3rem;
}
input, select {
  width: 100%;
  background: var(--input);
  color: var(--ink-text);
  border: 1px solid transparent;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.95rem;
  padding: 0.55rem 0.6rem;
}
input:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 0; }
.hint { font-size: 0.78rem; color: var(--mute); margin: 0.25rem 0 0; }

.results { display: grid; gap: 0; }
.stat {
  border-top: 1px solid var(--line);
  padding: 0.65rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}
.stat:first-child { border-top: 0; padding-top: 0; }
.stat .k { color: var(--mute); font-size: 0.88rem; }
.stat .v {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 1rem;
  font-weight: 500;
  text-align: right;
}
.hero-stat .v { font-size: 1.55rem; color: var(--gold-2); }

.warn, .notes {
  margin-top: 0.95rem;
  font-size: 0.88rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
}
.warn { color: var(--red); border-color: #5a2e28; }
.warn ul, .notes ul { margin: 0.35rem 0 0; padding-left: 1.1rem; }
.notes { color: var(--paper-dim); }

.meter {
  margin: 0 0 1rem;
  padding-bottom: 0.35rem;
}
.meter-track {
  position: relative;
  height: 10px;
  background: #1c1c1f;
  border: 1px solid var(--line);
}
.meter-fill {
  position: absolute;
  top: 0; bottom: 0;
  background: #3a2a12;
  border-right: 2px solid var(--gold);
}
.meter-marks {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  color: var(--mute);
}

.cta {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  display: grid;
  gap: 0.75rem;
}
.cta h2 {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  letter-spacing: -0.02em;
  margin: 0;
}
.cta p { margin: 0; color: var(--paper-dim); max-width: 40rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 0.5rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.85rem 1.15rem;
  border: 1px solid var(--gold);
  color: var(--ink);
  background: var(--gold);
}
.btn:hover { background: var(--gold-2); color: var(--ink); border-color: var(--gold-2); }
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line-2);
}
.btn-ghost:hover { border-color: var(--paper); background: transparent; color: var(--paper); }

.foot {
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
  color: var(--mute);
  font-size: 0.88rem;
}
.foot p { margin: 0 0 0.6rem; max-width: 46rem; }

@media (max-width: 860px) {
  .layout, .row { grid-template-columns: 1fr; }
  .top-meta span { display: none; }
}
