@font-face {
  font-family: "Public Sans";
  src: url("fonts/publicsans-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/plexmono-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Tokens: one accent (deep teal), cool neutrals, no pure black or white */
:root {
  --paper: #f4f6f4;
  --surface: #ffffff;
  --surface-2: #eceeeb;
  --ink: #14181b;
  --ink-soft: #47525c;
  --ink-mute: #6b7783;
  --line: #d9dedb;
  --line-strong: #b9c2bd;
  --accent: #0f5c4a;
  --accent-ink: #0b4a3c;
  --accent-wash: #e4efe9;
  --accent-line: #b6d2c7;
  --warn-wash: #fbf1e3;
  --warn-line: #e3c49b;
  --warn-ink: #6b4a16;
  --radius-card: 14px;
  --radius-control: 10px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(20, 24, 27, 0.04), 0 8px 24px rgba(20, 24, 27, 0.05);
  --measure: 68ch;
  --wrap: 1180px;
}

html[data-theme="dark"] {
  --paper: #0e1214;
  --surface: #151a1d;
  --surface-2: #1b2124;
  --ink: #eef2ef;
  --ink-soft: #b3bdb8;
  --ink-mute: #838f8b;
  --line: #263033;
  --line-strong: #3a464a;
  --accent: #5cc4a4;
  --accent-ink: #8fe0c6;
  --accent-wash: #12241f;
  --accent-line: #2c4d43;
  --warn-wash: #241c11;
  --warn-line: #55401f;
  --warn-ink: #e3bd7d;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --paper: #0e1214;
    --surface: #151a1d;
    --surface-2: #1b2124;
    --ink: #eef2ef;
    --ink-soft: #b3bdb8;
    --ink-mute: #838f8b;
    --line: #263033;
    --line-strong: #3a464a;
    --accent: #5cc4a4;
    --accent-ink: #8fe0c6;
    --accent-wash: #12241f;
    --accent-line: #2c4d43;
    --warn-wash: #241c11;
    --warn-line: #55401f;
    --warn-ink: #e3bd7d;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.12; font-weight: 600; }
h1 { font-size: clamp(2rem, 4.1vw, 3.15rem); letter-spacing: -0.028em; }
h2 { font-size: clamp(1.45rem, 2.3vw, 1.95rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.012em; }
p { margin: 0; }
a { color: var(--accent-ink); text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
strong { font-weight: 600; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.15rem, 4vw, 2.5rem); }
.stack > * + * { margin-top: var(--gap, 1rem); }
.measure { max-width: var(--measure); }
.mono { font-family: "Plex Mono", ui-monospace, SFMono-Regular, monospace; font-weight: 500; font-variant-numeric: tabular-nums; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 60;
  background: var(--surface); color: var(--ink); padding: 0.7rem 1rem; border-radius: var(--radius-control);
}
.skip:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  height: 68px;
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.25rem);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-weight: 700; letter-spacing: -0.03em; font-size: 1.0625rem;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand .mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0;
}
html[data-theme="dark"] .brand .mark { color: #08110e; }

.nav { display: flex; align-items: center; gap: clamp(0.75rem, 1.9vw, 1.5rem); margin-left: auto; }
.nav a {
  color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; white-space: nowrap;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.header-tools { display: flex; align-items: center; gap: 0.5rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border-radius: var(--radius-control);
  padding: 0.7rem 1.05rem;
  font-size: 0.95rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.16s ease, border-color 0.16s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
html[data-theme="dark"] .btn-primary { color: #071410; }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
html[data-theme="dark"] .btn-primary:hover { color: #071410; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink-soft); color: var(--ink); }
.btn-sm { padding: 0.45rem 0.8rem; font-size: 0.875rem; }

.icon-btn {
  width: 38px; height: 38px; border-radius: var(--radius-control);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  display: grid; place-items: center; cursor: pointer;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.icon-btn svg { width: 17px; height: 17px; }

/* Mobile nav */
.nav-toggle { display: none; }
@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: grid; }
  .mobile-nav { border-top: 1px solid var(--line); background: var(--paper); }
  .mobile-nav ul { list-style: none; margin: 0; padding: 0.5rem 0 0.9rem; }
  .mobile-nav li + li { border-top: 1px solid var(--line); }
  .mobile-nav a { display: block; padding: 0.75rem 0; text-decoration: none; color: var(--ink); font-weight: 500; }
  .mobile-nav[hidden] { display: none; }
}
@media (min-width: 901px) { .mobile-nav { display: none; } }

/* Hero */
.hero { padding-block: clamp(2.25rem, 5vw, 3.5rem) clamp(2rem, 4vw, 3rem); }
.hero-grid {
  display: grid; gap: clamp(1.75rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: start;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { max-width: 22ch; }
.hero .lede { margin-top: 1.1rem; font-size: 1.125rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: 0.65rem; }
.hero-media { position: relative; border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--line); }
.hero-media img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.hero-media figcaption {
  position: static; padding: 0.7rem 0.9rem; font-size: 0.8125rem; color: var(--ink-mute);
  background: var(--surface); border-top: 1px solid var(--line);
}

/* Content primitives */
section { padding-block: clamp(2rem, 4.5vw, 3.25rem); }
section + section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 0.6rem; max-width: 60ch; }
.section-head p { color: var(--ink-soft); }
.eyebrow {
  font-family: "Plex Mono", monospace; font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.lede { color: var(--ink-soft); }

.split { display: grid; gap: clamp(1.5rem, 4vw, 2.75rem); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split figure { margin: 0; border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--line); }
.split figure img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.split figure figcaption { padding: 0.65rem 0.85rem; font-size: 0.8125rem; color: var(--ink-mute); background: var(--surface); border-top: 1px solid var(--line); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: clamp(1.1rem, 2.4vw, 1.5rem);
}
.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--ink-soft); font-size: 0.98rem; }
.card ul { margin: 0.6rem 0 0; padding-left: 1.05rem; color: var(--ink-soft); font-size: 0.98rem; }
.card li + li { margin-top: 0.35rem; }

.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

.grid-3 { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }

.tile-tinted { background: var(--accent-wash); border-color: var(--accent-line); }
.tile-tinted h3, .tile-tinted p, .tile-tinted li { color: var(--ink); }
.tile-dark { background: var(--ink); border-color: var(--ink); }
html[data-theme="dark"] .tile-dark { background: var(--surface-2); }
.tile-dark h3, .tile-dark p, .tile-dark li, .tile-dark .num { color: var(--paper); }
.tile-dark .num { font-family: "Plex Mono", monospace; }

.num { font-family: "Plex Mono", monospace; font-size: 1.65rem; letter-spacing: -0.02em; display: block; margin-bottom: 0.35rem; }

/* Tables */
.table-shell { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.965rem; }
caption { text-align: left; padding: 0.9rem 1.1rem 0.2rem; color: var(--ink-mute); font-size: 0.8125rem; }
th, td { padding: 0.72rem 1.1rem; text-align: left; vertical-align: top; }
thead th {
  font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute);
  font-weight: 600; border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
tbody tr + tr td { border-top: 1px solid var(--line); }
td.num-cell { font-family: "Plex Mono", monospace; white-space: nowrap; }
.table-note { padding: 0.8rem 1.1rem; border-top: 1px solid var(--line); color: var(--ink-mute); font-size: 0.8125rem; margin: 0; }

/* Callouts */
.callout {
  border: 1px solid var(--accent-line); background: var(--accent-wash);
  border-radius: var(--radius-card); padding: 1.05rem 1.2rem;
}
.callout h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.callout p { color: var(--ink); font-size: 0.96rem; }
.callout-warn { border-color: var(--warn-line); background: var(--warn-wash); }
.callout-warn h3 { color: var(--warn-ink); }
html[data-theme="dark"] .callout-warn h3 { color: var(--warn-ink); }
.callout-warn p { color: var(--ink); }

/* FAQ */
.faq-list { border-top: 1px solid var(--line); margin-top: 1.4rem; }
details { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer; list-style: none; padding: 1rem 2.2rem 1rem 0; position: relative;
  font-weight: 600; font-size: 1.02rem;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 0.2rem; top: 50%; transform: translateY(-50%);
  font-family: "Plex Mono", monospace; color: var(--accent); font-size: 1.15rem;
}
details[open] summary::after { content: "\2013"; }
details .answer { padding: 0 2rem 1.15rem 0; color: var(--ink-soft); max-width: 72ch; }
details:focus-within summary { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Provider cards (affiliate) */
.provider {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem 1.25rem;
  align-items: center; padding: 1.1rem 1.2rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
}
.provider + .provider { margin-top: 0.75rem; }
.provider h3 { font-size: 1.05rem; }
.provider .meta { color: var(--ink-mute); font-size: 0.9rem; margin-top: 0.2rem; }
.provider .price { font-family: "Plex Mono", monospace; font-size: 1.05rem; }
@media (max-width: 640px) {
  .provider { grid-template-columns: 1fr; }
  .provider .btn { width: 100%; }
}
.tag {
  display: inline-block; border-radius: var(--radius-pill); padding: 0.15rem 0.6rem;
  font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600;
  background: var(--accent-wash); color: var(--accent-ink); border: 1px solid var(--accent-line);
}

/* Forms */
form.quote { display: grid; gap: 1.15rem; max-width: 40rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field .help { color: var(--ink-mute); font-size: 0.83rem; }
.field .error { color: #a12b2b; font-size: 0.83rem; font-weight: 600; }
html[data-theme="dark"] .field .error { color: #ef9a9a; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-control);
  padding: 0.65rem 0.75rem; width: 100%;
}
input::placeholder, textarea::placeholder { color: var(--ink-mute); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field-row { display: grid; gap: 1.15rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.9rem; color: var(--ink-soft); }
.check input { width: auto; margin-top: 0.25rem; }

/* CTA band */
.cta-band { background: var(--ink); color: var(--paper); border-radius: var(--radius-card); padding: clamp(1.4rem, 3.5vw, 2.4rem); }
html[data-theme="dark"] .cta-band { background: var(--surface-2); }
.cta-band h2 { color: var(--paper); max-width: 26ch; }
.cta-band p { color: color-mix(in srgb, var(--paper) 78%, transparent); margin-top: 0.7rem; max-width: 52ch; }
.cta-band .btn-primary { background: var(--paper); color: var(--ink); }
.cta-band .btn-primary:hover { background: #fff; color: var(--ink); }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1.35rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem 2rem; margin-top: 1rem; }
.footer-grid { display: grid; gap: 1.75rem; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-size: 0.72rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 0.6rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 0.4rem; }
.site-footer a { color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.legal { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--ink-mute); font-size: 0.8125rem; }
.legal p + p { margin-top: 0.5rem; }

/* Article pages */
.page-head { padding-block: clamp(1.9rem, 4vw, 2.8rem) 0.75rem; }
.page-head h1 { max-width: 30ch; }
.page-head .lede { margin-top: 0.9rem; max-width: 60ch; }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose p, .prose ul, .prose ol, .prose table { margin-top: 0.85rem; }
.prose ul, .prose ol { padding-left: 1.2rem; color: var(--ink-soft); }
.prose li + li { margin-top: 0.4rem; }
.prose > p:first-of-type { font-size: 1.1rem; color: var(--ink-soft); }
.toc { border-left: 2px solid var(--line-strong); padding-left: 1rem; }
.toc a { display: block; padding: 0.15rem 0; font-size: 0.92rem; }

.updated { color: var(--ink-mute); font-size: 0.8125rem; }

/* Honeypot: off screen, never focusable */
.hp { position: absolute; left: -9999px; }
#quote-success:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* [hidden] must beat component display rules */
[hidden] { display: none !important; }

/* Consent banner */
.consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--surface); border-top: 1px solid var(--line-strong);
  box-shadow: 0 -8px 24px rgba(20, 24, 27, 0.08);
  padding: 0.9rem 0;
}
html[data-theme="dark"] .consent { box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.45); }
.consent .inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.4rem;
  justify-content: space-between;
}
.consent p { font-size: 0.9rem; color: var(--ink-soft); max-width: 62ch; margin: 0; }
.consent p a { color: var(--accent-ink); }
.consent .actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
@media (max-width: 640px) {
  .consent .actions { width: 100%; }
  .consent .btn { flex: 1 1 auto; }
}
