/* ---------------------------------------------------------------
   1. Tokens
   --------------------------------------------------------------- */
:root {
  --bg:          #f7f6f4;
  --surface:     #ffffff;
  --surface-2:   #efedea;
  --ink:         #14181d;
  --ink-2:       #4a545e;
  --line:        #dcd8d3;
  --line-2:      #c6c1ba;
  --geo:         #2b3440;
  --geo-faint:   #b9b4ad;
  --accent:      #d4441a;
  --accent-ink:  #b8380f;
  --accent-soft: #fbeae3;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --measure: 64ch;
  --radius: 3px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-y: clamp(3.5rem, 9vw, 7rem);
}

:root[data-theme="dark"] {
  --bg:          #10141a;
  --surface:     #171c24;
  --surface-2:   #1e242e;
  --ink:         #e8eaed;
  --ink-2:       #9aa4b0;
  --line:        #2a323d;
  --line-2:      #3a4552;
  --geo:         #8fa0b3;
  --geo-faint:   #3e4956;
  --accent:      #ff7a45;
  --accent-ink:  #ff7a45;
  --accent-soft: #2a1a13;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #10141a;
    --surface:     #171c24;
    --surface-2:   #1e242e;
    --ink:         #e8eaed;
    --ink-2:       #9aa4b0;
    --line:        #2a323d;
    --line-2:      #3a4552;
    --geo:         #8fa0b3;
    --geo-faint:   #3e4956;
    --accent:      #ff7a45;
    --accent-ink:  #ff7a45;
    --accent-soft: #2a1a13;
  }
}

/* ---------------------------------------------------------------
   2. Base
   --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 600; }
h1 { font-size: clamp(2.15rem, 4.4vw, 3.3rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.35rem); }
h3 { font-size: 1.125rem; letter-spacing: -0.01em; }
p  { margin: 0 0 1.1em; max-width: var(--measure); }
a  { color: inherit; }

.mono { font-family: var(--mono); font-size: 0.8em; letter-spacing: 0.02em; }

:where(a, button, input, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg);
  padding: 0.75rem 1rem; z-index: 100;
}
.skip:focus { left: 0; }

/* ---------------------------------------------------------------
   3. Buttons
   --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: inherit; font-weight: 550; text-decoration: none; cursor: pointer;
  padding: 0.7rem 1.25rem; border-radius: var(--radius);
  border: 1px solid transparent; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, transform .06s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent-ink); color: #fff; }
.btn-primary:hover { background: var(--ink); }
:root[data-theme="dark"] .btn-primary { color: #10141a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary { color: #10141a; }
  :root:not([data-theme="light"]) .btn-primary:hover { background: var(--ink); color: #10141a; }
}

.btn-ghost { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); background: var(--surface); }

.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.9375rem; }

/* ---------------------------------------------------------------
   4. Header
   --------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 64px; }

.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-weight: 650; letter-spacing: -0.02em; text-decoration: none; font-size: 1.0625rem;
  margin-right: auto;
}
.brand svg { display: block; }

.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a {
  text-decoration: none; color: var(--ink-2); font-size: 0.9375rem;
  padding: 0.25rem 0; border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; padding: 0;
  background: transparent; border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.icon-btn svg { display: block; }
/* JS always sets an explicit data-theme, so these two rules are enough. */
.icon-btn svg { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }
:root[data-theme="dark"]  .icon-sun  { display: block; }
.nav-toggle svg { display: block; }

.nav-toggle { display: none; }
.nav-cta { display: none; }

@media (max-width: 860px) {
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1rem;
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: 0.75rem 0; width: 100%; font-size: 1rem; }
  .nav-cta { display: block; color: var(--accent-ink); font-weight: 600; }
  :root[data-theme="dark"] .nav-cta { color: var(--accent); }
  .nav-toggle { display: inline-grid; }
  .header-actions .btn { display: none; }
}

/* ---------------------------------------------------------------
   5. Hero
   --------------------------------------------------------------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 4vw, 3.5rem); }
.hero-grid {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr); }
}
.hero h1 { max-width: 20ch; text-wrap: balance; }
.hero-sub { font-size: clamp(1.0625rem, 1.6vw, 1.1875rem); color: var(--ink-2); max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.hero-note { margin-top: 1rem; color: var(--ink-2); font-size: 0.875rem; }
.hero-note strong { color: var(--ink); font-weight: 550; }

.figure-frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.75rem;
}
.figure-frame svg { display: block; width: 100%; height: auto; }

/* ---------------------------------------------------------------
   6. Hero diagram
   --------------------------------------------------------------- */
.geo      { color: var(--geo); }
.geo-thin { color: var(--geo-faint); }
.geo-acc  { color: var(--accent); }

.dgm-part  { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linejoin: round; }
.dgm-sheet { fill: none; stroke: currentColor; stroke-width: 1.6; }
.dgm-hatch { stroke: currentColor; stroke-width: 1; opacity: .5; }
.dgm-label { font-family: var(--mono); font-size: 12px; fill: var(--ink-2); }
.dgm-file  { font-family: var(--mono); font-size: 11px; fill: var(--ink-2); }
.dgm-card  { fill: var(--surface-2); stroke: var(--line-2); stroke-width: 1; }

.card-anim, .hl-anim { opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  .card-anim { animation: cardIn 10s cubic-bezier(.2,.7,.3,1) infinite; }
  .hl-anim   { animation: hlIn   10s ease infinite; }
  .c1 { animation-delay: .2s }  .c2 { animation-delay: .55s }
  .c3 { animation-delay: .9s }  .c4 { animation-delay: 1.25s }
  .c5 { animation-delay: 1.6s } .c6 { animation-delay: 1.95s }
}
@media (prefers-reduced-motion: reduce) {
  .card-anim, .hl-anim { opacity: 1; }
}

@keyframes cardIn {
  0%   { opacity: 0; transform: translateX(14px); }
  7%   { opacity: 1; transform: translateX(0); }
  72%  { opacity: 1; transform: translateX(0); }
  80%  { opacity: 0; transform: translateX(14px); }
  100% { opacity: 0; transform: translateX(14px); }
}
@keyframes hlIn {
  0%   { opacity: 0 } 6% { opacity: 1 } 72% { opacity: 1 } 80% { opacity: 0 } 100% { opacity: 0 }
}

/* ---------------------------------------------------------------
   7. Trust strip
   --------------------------------------------------------------- */
.strip { border-block: 1px solid var(--line); background: var(--surface); }
.strip ul {
  list-style: none; margin: 0; padding: 0.9rem 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem;
  font-family: var(--mono); font-size: 0.8125rem; color: var(--ink-2);
  letter-spacing: 0.02em;
}
.strip li { display: flex; align-items: center; gap: 0.55rem; }
.strip li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex: none;
}

/* ---------------------------------------------------------------
   8. Sections
   --------------------------------------------------------------- */
section { padding-block: var(--section-y); }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }

.eyebrow {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent-ink); margin: 0 0 1rem;
}
:root[data-theme="dark"] .eyebrow { color: var(--accent); }

.lede { font-size: 1.125rem; color: var(--ink-2); }

/* Steps */
.steps { display: grid; gap: 2rem; margin-top: 2.5rem; }
@media (min-width: 780px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }
.step { border-top: 2px solid var(--ink); padding-top: 1rem; }
.step-n { font-family: var(--mono); font-size: 0.75rem; color: var(--accent-ink); letter-spacing: .1em; }
:root[data-theme="dark"] .step-n { color: var(--accent); }
.step h3 { margin: 0.35rem 0 0.5rem; }
.step p { color: var(--ink-2); font-size: 0.9688rem; margin: 0; }

/* Privacy panel */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.75rem);
}
.section-alt .panel { background: var(--bg); }
.panel h2 { max-width: 22ch; }


/* Output list */
.outputs { display: grid; gap: 2rem; margin-top: 2.5rem; }
@media (min-width: 820px) { .outputs { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 3rem; } }
.output h3 { margin-bottom: 0.4rem; }
.output p { color: var(--ink-2); font-size: 0.9688rem; margin: 0; }

/* Limits */
.limits { display: grid; gap: 1.75rem; margin-top: 2.25rem; }
@media (min-width: 820px) { .limits { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }
.limit { padding-left: 1.15rem; border-left: 2px solid var(--line-2); }
.limit h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.limit p { color: var(--ink-2); font-size: 0.9375rem; margin: 0; }

/* Pedigree */
.pedigree { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 880px) { .pedigree { grid-template-columns: auto minmax(0, 1fr); gap: 3rem; } }
.pedigree-stat {
  display: grid; gap: 1.25rem; white-space: nowrap;
  border-left: 2px solid var(--accent); padding-left: 1.25rem;
}
.pedigree-stat b {
  display: block; color: var(--ink); font-weight: 600;
  font-size: 1.75rem; letter-spacing: -0.02em; line-height: 1;
}
.pedigree-stat span {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-2);
}

/* Pricing preview */
.period {
  display: inline-flex; gap: 2px; margin-top: 1.75rem; padding: 3px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
}
.period button {
  font: inherit; font-size: 0.875rem; font-weight: 500; cursor: pointer;
  padding: 0.45rem 1.1rem; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.period button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.section-alt .period button[aria-pressed="true"] { background: var(--bg); }
.period-save {
  font-family: var(--mono); font-size: 0.6875rem; letter-spacing: .04em;
  color: var(--accent-ink); background: var(--accent-soft);
  padding: 0.1rem 0.35rem; border-radius: 2px;
}
:root[data-theme="dark"] .period-save { color: var(--accent); }

.tiers { display: grid; gap: 1rem; margin-top: 1.75rem; }
@media (min-width: 860px) { .tiers { grid-template-columns: repeat(3, 1fr); } }
.tier {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column;
}
.section-alt .tier { background: var(--bg); }
.tier[data-featured] { border-color: var(--accent); }
.tier-name { font-family: var(--mono); font-size: 0.75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.tier-price { font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; margin: 0.4rem 0 0.1rem; }
.tier-price small { font-size: 0.875rem; font-weight: 400; color: var(--ink-2); letter-spacing: 0; }
.tier-sub { font-size: 0.9375rem; color: var(--ink-2); margin: 0.35rem 0 1rem; }
.tier-list {
  list-style: none; margin: 0 0 1.25rem; padding: 0 0 1.25rem;
  border-bottom: 1px solid var(--line);
  display: grid; gap: 0.5rem; font-size: 0.9063rem;
}
.tier-list li { position: relative; padding-left: 1.15rem; color: var(--ink-2); }
.tier-list li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 6px; height: 6px; border-radius: 1px; background: var(--line-2);
}
.tier-list li b { color: var(--ink); font-weight: 600; }
.tier[data-featured] .tier-list li::before { background: var(--accent); }
.tier-foot { font-size: 0.8438rem; color: var(--ink-2); margin: 0 0 1.25rem; }
.tier .btn { margin-top: auto; }
.tier-tag {
  display: inline-block; font-family: var(--mono); font-size: 0.6875rem;
  letter-spacing: .08em; text-transform: uppercase;
  background: var(--accent-soft); color: var(--accent-ink);
  padding: 0.15rem 0.45rem; border-radius: 2px; margin-left: 0.5rem;
}
:root[data-theme="dark"] .tier-tag { color: var(--accent); }

/* Closing */
.closing { text-align: center; }
.closing h2 { max-width: none; }
.closing p { margin-inline: auto; }
.closing .hero-cta { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; font-size: 0.9375rem; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 780px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; } }
.site-footer h4 { font-family: var(--mono); font-size: 0.75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 0.9rem; font-weight: 500; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between;
  color: var(--ink-2); font-size: 0.875rem;
}

/* ---------------------------------------------------------------
   10. Interior page heads
   --------------------------------------------------------------- */
.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-head h1 { max-width: 20ch; }
.page-head .lede { max-width: 60ch; }
.page-head + section { padding-top: 0; }

/* Numbered walkthrough */
.walk { display: grid; gap: clamp(2.5rem, 5vw, 3.5rem); }
.walk-step { display: grid; gap: 0.75rem 2.5rem; }
@media (min-width: 820px) { .walk-step { grid-template-columns: 7rem minmax(0, 1fr); } }
.walk-num {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: .1em;
  color: var(--accent-ink); padding-top: 0.35rem;
}
:root[data-theme="dark"] .walk-num { color: var(--accent); }
.walk-body h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
.walk-body p:last-child { margin-bottom: 0; }

/* Long-form feature entries */
.entries { display: grid; gap: clamp(2.25rem, 4vw, 3rem); }
.entry { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.entry h2 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); margin-bottom: 0.5rem; }
.entry p:last-child { margin-bottom: 0; }

/* Comparison table */
.table-wrap { overflow-x: auto; margin-top: 2rem; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 0.9375rem; }
th, td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-family: var(--mono); font-size: 0.75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; }
tbody th { font-weight: 500; color: var(--ink); }
td { color: var(--ink-2); }
td .yes { color: var(--accent-ink); font-weight: 600; }
:root[data-theme="dark"] td .yes { color: var(--accent); }
td .no { color: var(--line-2); }

/* Q&A */
.qa-group { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.qa-group > h2 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); padding-bottom: 0.75rem; border-bottom: 2px solid var(--ink); margin-bottom: 1.75rem; }
.qa { margin-bottom: 1.75rem; max-width: var(--measure); }
.qa h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.qa p { color: var(--ink-2); margin-bottom: 0; font-size: 0.9688rem; }
.qa p + p { margin-top: 0.6rem; }

/* Forms */
.form-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 900px) { .form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); } }
.form-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.25rem);
}
.field { display: grid; gap: 0.4rem; margin-bottom: 1.15rem; }
.field label { font-size: 0.875rem; font-weight: 550; }
.field input {
  font: inherit; font-size: 1rem; padding: 0.7rem 0.85rem;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--radius);
}
.field input::placeholder { color: var(--ink-2); opacity: .65; }
.field textarea {
  font: inherit; font-size: 1rem; padding: 0.7rem 0.85rem; resize: vertical;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--radius);
}
.field-hint { font-size: 0.8125rem; color: var(--ink-2); }
/* Honeypot: off-screen rather than display:none/hidden, since some bots
   skip fields hidden that way but still fill in anything with a plausible
   name. Real visitors never see or reach it. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-card .btn { width: 100%; }
.form-legal { font-size: 0.8125rem; color: var(--ink-2); margin: 1rem 0 0; }
.form-alt { font-size: 0.9375rem; color: var(--ink-2); margin: 1.25rem 0 0; text-align: center; }
.reassure { display: grid; gap: 1.5rem; }
.reassure h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.reassure p { color: var(--ink-2); font-size: 0.9375rem; margin: 0; }
.form-status {
  margin-bottom: 1.25rem; padding: 0.85rem 1rem; border-radius: var(--radius);
  background: var(--accent-soft); border: 1px solid var(--accent);
  font-size: 0.9375rem; color: var(--ink);
}
:root[data-theme="dark"] .form-status { background: var(--surface-2); }

/* Legal prose */
.prose { max-width: 68ch; }
.prose h2 { font-size: 1.25rem; margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.15rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.4rem; color: var(--ink-2); }
.prose p { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.notice {
  border-left: 3px solid var(--accent); background: var(--surface);
  padding: 1rem 1.25rem; border-radius: var(--radius); margin-bottom: 2rem;
}
.notice p { margin: 0; font-size: 0.9375rem; }

/* 404 */
.oops { text-align: center; padding-block: clamp(4rem, 12vw, 8rem); }
.oops .mono-big { font-family: var(--mono); font-size: 3rem; color: var(--accent); letter-spacing: -0.02em; }
.oops p { margin-inline: auto; }
.oops .hero-cta { justify-content: center; }

/* Two-column editorial rhythm for feature entries, matching .walk-step */
@media (min-width: 940px) {
  .entry { display: grid; grid-template-columns: 16rem minmax(0, 1fr); gap: 2.5rem; }
  .entry h2 { margin-bottom: 0; }
}
.entries, .walk, .qa-group { max-width: 62rem; }
