:root {
  --bg: #12110e;
  --bg-elev: #1c1b16;
  --bg-elev-2: #24231d;
  --ink: #f3efe6;
  --muted: #9c978a;
  --line: #2f2d26;
  --line-strong: #4a473c;
  --accent: #c9842a;
  --accent-hover: #db9a42;
  --accent-dim: rgba(201, 132, 42, 0.14);
  --good: #8aa76f;
  --warn: #c47a4a;
  --danger: #b85c4a;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --max: 1080px;
  --header-h: 64px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--accent-hover); }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--accent);
  color: #111;
  padding: 8px 12px;
  z-index: 100;
}
.skip:focus { top: 12px; }

.wrap {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.brand:hover { color: var(--ink); }
.mark {
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--ink);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1;
}
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--ink); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #16140f;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
  cursor: pointer;
}
.btn:hover { background: var(--accent-hover); color: #16140f; border-color: var(--accent-hover); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-disabled,
.btn[aria-disabled="true"] {
  background: var(--bg-elev-2);
  border-color: var(--line-strong);
  color: var(--muted);
  cursor: not-allowed;
  pointer-events: none;
  text-decoration: none;
}

/* Hero */
.hero {
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--line);
}
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 12px;
}
h1 { font-size: clamp(34px, 6vw, 56px); }
h2 { font-size: clamp(26px, 4vw, 36px); }
h3 { font-size: 22px; }
.lede {
  font-size: 19px;
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 28px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.meta-row {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  color: var(--muted);
  font-size: 13px;
  font-family: var(--mono);
}
.meta-row strong { color: var(--ink); font-weight: 600; }

section { padding: 64px 0; border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 28px; max-width: 68ch; }
.section-head p { color: var(--muted); margin: 0; }

/* Cards / grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 20px;
}
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.num {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* Calculator */
.calc {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  align-items: start;
}
.panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 22px;
}
.field { margin-bottom: 16px; }
.field label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.field label span:last-child {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
}
select, input[type="range"] {
  width: 100%;
}
select {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  padding: 10px 12px;
  font: inherit;
}
.checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}
.checks label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.stat {
  border: 1px solid var(--line);
  padding: 12px;
  background: var(--bg);
}
.stat .lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.stat .val {
  font-family: var(--mono);
  font-size: 22px;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.match-list { display: flex; flex-direction: column; gap: 8px; }
.match {
  border: 1px solid var(--line);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  text-decoration: none;
  color: inherit;
  background: var(--bg);
}
.match:hover { border-color: var(--accent); color: inherit; }
.match .who { font-size: 14px; }
.match .who small { display: block; color: var(--muted); font-size: 12px; }
.match .price { font-family: var(--mono); color: var(--accent); white-space: nowrap; }
.fine { font-size: 12px; color: var(--muted); margin-top: 12px; }

/* Table */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 860px;
}
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  background: var(--bg-elev);
  position: sticky;
  top: 0;
}
td.numish, th.numish { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tag {
  display: inline-block;
  font-size: 11px;
  font-family: var(--mono);
  border: 1px solid var(--line-strong);
  padding: 1px 6px;
  color: var(--muted);
}
.renewal { color: var(--warn); }

/* Article */
.prose { max-width: 72ch; }
.prose p { margin: 0 0 16px; }
.prose h2 { margin: 36px 0 12px; }
.prose h3 { margin: 28px 0 10px; }
.prose ul, .prose ol { color: var(--muted); padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.prose code, .code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg-elev);
  padding: 1px 5px;
  border: 1px solid var(--line);
}
.byline { color: var(--muted); font-size: 14px; margin-bottom: 28px; }

pre {
  background: #0c0b09;
  border: 1px solid var(--line);
  padding: 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.45;
  color: #e6dfd0;
}
.kit-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 20px;
  margin: 20px 0 24px;
}
.kit-price .big {
  font-family: var(--serif);
  font-size: 48px;
  line-height: 1;
}
.kit-price .sub { color: var(--muted); }

.checklist { list-style: none; padding: 0; }
.checklist li {
  border: 1px solid var(--line);
  padding: 12px 14px;
  margin-bottom: 8px;
  background: var(--bg-elev);
}
.checklist strong { display: block; }

.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-dim);
  padding: 14px 16px;
  margin: 20px 0;
}
.callout p { margin: 0; }

/* Footer */
.site-footer {
  padding: 36px 0 48px;
  color: var(--muted);
  font-size: 13px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.disclosure {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  max-width: 80ch;
}

/* Legal */
.legal p { color: var(--muted); }

@media (max-width: 860px) {
  .grid-3, .calc, .footer-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px 16px;
    gap: 12px;
  }
  .nav.open { display: flex; }
  .hero { padding-top: 48px; }
  section { padding: 48px 0; }
}
