:root {
  --bg: #0a0d14;
  --bg-2: #0f1420;
  --panel: #131a29;
  --panel-2: #182135;
  --line: #222d45;
  --line-soft: #1b2438;
  --text: #e8edf7;
  --muted: #8f9cb5;
  --muted-2: #6b7893;
  --accent: #f7931a;
  --accent-soft: rgba(247, 147, 26, 0.12);
  --accent-line: rgba(247, 147, 26, 0.35);
  --blue: #4c8dff;
  --blue-soft: rgba(76, 141, 255, 0.12);
  --green: #35c88a;
  --green-soft: rgba(53, 200, 138, 0.12);
  --red: #ff6b6b;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(247, 147, 26, 0.09), transparent 60%),
    radial-gradient(760px 420px at 92% 4%, rgba(76, 141, 255, 0.08), transparent 62%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 2.5rem); margin-inline: auto; }
/* Reading column for long-form legal/privacy copy: sits on the wrap's left
   edge so it aligns with the hero, but stays a comfortable measure. */
.prose-panel { max-width: 780px; }

/* ------------------------------------------------------------------ nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 13, 20, 0.82);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner { display: flex; align-items: center; gap: 1.5rem; height: 62px; }
.brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; letter-spacing: -0.02em; font-size: 1.06rem; text-decoration: none; color: var(--text); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--accent), #d9741a);
  color: #10131a; font-weight: 800; font-size: 0.82rem; font-family: var(--mono);
}
.nav-links { display: flex; gap: 1.15rem; margin-left: auto; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
@media (max-width: 760px) { .nav-links a.nav-hide { display: none; } }

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.72rem 1.15rem; border-radius: var(--radius-sm); font-weight: 650;
  font-size: 0.92rem; text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #14100a; }
.btn-primary:hover { background: #ffa733; }
.btn-ghost { background: var(--panel); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent-line); background: var(--panel-2); }
.btn-lg { padding: 0.9rem 1.5rem; font-size: 1rem; }
.btn-sm { padding: 0.35rem 0.6rem; font-size: 0.8rem; line-height: 1; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ----------------------------------------------------------------- hero */

.hero { padding: 4.2rem 0 2.6rem; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3rem; align-items: start; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 2rem; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent);
  padding: 0.34rem 0.75rem; border-radius: 100px; font-size: 0.76rem; font-weight: 650;
  letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 1.15rem;
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(247,147,26,0.7); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(247,147,26,0); } 100% { box-shadow: 0 0 0 0 rgba(247,147,26,0); } }

h1 { font-size: clamp(2.05rem, 4.6vw, 3.15rem); line-height: 1.1; letter-spacing: -0.035em; margin: 0 0 1.05rem; font-weight: 800; }
h1 .hl { color: var(--accent); }
.lede { font-size: 1.09rem; color: var(--muted); margin: 0 0 1.6rem; max-width: 54ch; }
.lede strong { color: var(--text); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.5rem; }
.trust-row { display: flex; flex-wrap: wrap; gap: 1.4rem; font-size: 0.83rem; color: var(--muted-2); }
.trust-row span { display: inline-flex; align-items: center; gap: 0.4rem; }

/* --------------------------------------------------------------- panels */

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.panel-2 { background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 1.6rem; }
.panel-tight { padding: 1.15rem 1.25rem; }

h2 { font-size: clamp(1.45rem, 2.6vw, 1.95rem); letter-spacing: -0.028em; margin: 0 0 0.75rem; font-weight: 750; }
h3 { font-size: 1.12rem; letter-spacing: -0.015em; margin: 0 0 0.5rem; font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-decoration-color: rgba(247,147,26,0.4); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
.lede-muted { color: var(--muted); }
.small { font-size: 0.86rem; color: var(--muted); }
.muted { color: var(--muted); }
code { font-family: var(--mono); font-size: 0.88em; background: var(--panel-2, #141a27);
       border: 1px solid var(--line, #252d3d); border-radius: 5px; padding: 0.08em 0.36em; }
.tiny { font-size: 0.78rem; color: var(--muted-2); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

section { padding: 3.2rem 0; }
.section-head { max-width: 60ch; margin-bottom: 2rem; }

/* ----------------------------------------------------------------- grid */

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

/* Keeps the calculator form in view while the result panel scrolls. */
.sticky-form { position: sticky; top: 1rem; }
@media (max-width: 860px) { .sticky-form { position: static; } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem; }
.card-icon {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 1rem; margin-bottom: 0.85rem;
}
.card p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.card-stat {
  font-family: var(--mono); font-size: 2.1rem; font-weight: 700; color: var(--accent);
  line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 0.55rem;
}
.card h3 { margin: 0 0 0.4rem; }
.card .checklist li { font-size: 0.88rem; }

/* ---------------------------------------------------------------- forms */

.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.83rem; font-weight: 600; color: var(--muted); margin-bottom: 0.35rem; }
.field .hint { font-size: 0.76rem; color: var(--muted-2); margin-top: 0.3rem; }
.hint { font-size: 0.76rem; color: var(--muted-2); margin-top: 0.3rem; }
input[type="text"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; padding: 0.66rem 0.8rem; background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: inherit; font-size: 0.94rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-line); outline-offset: 1px; border-color: var(--accent-line); }
input[type="number"] { font-family: var(--mono); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.prefix { position: relative; }
.prefix span { position: absolute; left: 0.78rem; top: 50%; transform: translateY(-50%); color: var(--muted-2); font-family: var(--mono); font-size: 0.9rem; pointer-events: none; }
.prefix input { padding-left: 1.65rem; }

.segmented { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.segmented button {
  flex: 1 1 auto; padding: 0.55rem 0.8rem; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); font-family: inherit;
  font-size: 0.87rem; font-weight: 600;
}
.segmented button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.42rem 0; font-size: 0.9rem; color: var(--muted); }
.checklist li::before { content: "→"; color: var(--accent); flex: none; font-weight: 700; }
.checklist li strong { color: var(--text); font-weight: 600; }

/* --------------------------------------------------------------- results */

.result { border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.result-head { padding: 1.15rem 1.35rem; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.result-head h3 { margin: 0; }
.result-body { padding: 1.35rem; }

.amount { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -0.02em; }
.amount-xl { font-size: 2.5rem; line-height: 1.1; }
.amount-lg { font-size: 1.65rem; }

.kv { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line-soft); font-size: 0.9rem; }
.kv:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); margin: 0; }
.kv dd { margin: 0; font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; }
.kv-total { border-top: 1px solid var(--line); border-bottom: 0; margin-top: 0.35rem; padding-top: 0.7rem; font-size: 0.97rem; }
.kv-total dt { color: var(--text); font-weight: 650; }
.kv-total dd { font-size: 1.12rem; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 760px) { .compare { grid-template-columns: 1fr; } }
.compare-col { border-radius: var(--radius-sm); padding: 1.15rem; border: 1px solid var(--line); background: var(--bg-2); }
.compare-col.now { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), transparent 60%), var(--bg-2); }
.compare-col.later { border-color: rgba(76,141,255,0.35); background: linear-gradient(180deg, var(--blue-soft), transparent 60%), var(--bg-2); }
.compare-col h4 { margin: 0 0 0.2rem; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted-2); font-weight: 700; }
.compare-col .label { font-size: 0.95rem; font-weight: 650; margin-bottom: 0.7rem; }

.callout { border-radius: var(--radius-sm); padding: 0.95rem 1.1rem; border: 1px solid var(--line); background: var(--bg-2); font-size: 0.9rem; color: var(--muted); }
.callout-accent { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); }
.callout-blue { border-color: rgba(76,141,255,0.35); background: var(--blue-soft); color: var(--text); }
.callout-warn { border-color: rgba(255,107,107,0.35); background: rgba(255,107,107,0.08); color: var(--text); }

/* --------------------------------------------------------------- steps */

.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { position: relative; padding: 0 0 1rem 2.1rem; counter-increment: s; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0.1rem; width: 22px; height: 22px;
  border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 0.72rem; font-weight: 700; color: var(--accent);
  font-family: var(--mono);
}
.steps li::after {
  content: ""; position: absolute; left: 10.5px; top: 1.7rem; bottom: 0.3rem; width: 1px; background: var(--line);
}
.steps li:last-child::after { display: none; }
.steps li strong { display: block; color: var(--text); font-size: 0.93rem; margin-bottom: 0.15rem; }
.steps li span { font-size: 0.88rem; color: var(--muted); }

/* --------------------------------------------------------------- table */

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td { padding: 0.72rem 0.9rem; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { background: var(--panel-2); font-weight: 650; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
tbody tr:last-child td { border-bottom: 0; }
td.nowrap, th.nowrap { white-space: nowrap; }
td strong { font-weight: 650; }
.chip { display: inline-block; padding: 0.16rem 0.5rem; border-radius: 100px; font-size: 0.73rem; font-weight: 650; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.chip-change { border-color: rgba(76,141,255,0.4); background: var(--blue-soft); color: var(--blue); }
.chip-same { border-color: var(--line); background: var(--panel-2); color: var(--muted-2); }
.chip-warn { border-color: rgba(255,107,107,0.35); background: rgba(255,107,107,0.1); color: var(--red); }

/* --------------------------------------------------------------- footer */

.footer { border-top: 1px solid var(--line-soft); margin-top: 3rem; padding: 2.6rem 0 3rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.footer h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted-2); margin: 0 0 0.7rem; font-weight: 700; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 0.4rem; }
.footer a { color: var(--muted); text-decoration: none; font-size: 0.89rem; }
.footer a:hover { color: var(--text); }
.disclaimer { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line-soft); font-size: 0.8rem; color: var(--muted-2); max-width: 90ch; }
.disclaimer strong { color: var(--muted); }

/* ------------------------------------------------------------ affiliate */

.affiliate-note { font-size: 0.74rem; color: var(--muted-2); margin-top: 0.6rem; }
.affiliate-note a { color: var(--muted); }

/* --------------------------------------------------------------- hidden */

[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--accent); color: #14100a; padding: 0.6rem 1rem; border-radius: var(--radius-sm); }
