/* S-Corp Breakeven — design tokens & base styles */

:root {
  --bg: oklch(0.985 0.005 85);
  --bg-2: oklch(0.965 0.008 85);
  --bg-3: oklch(0.94 0.01 85);
  --ink: oklch(0.18 0.01 60);
  --ink-2: oklch(0.35 0.012 60);
  --ink-3: oklch(0.55 0.012 60);
  --rule: oklch(0.88 0.008 80);
  --rule-2: oklch(0.92 0.006 80);

  --good: oklch(0.52 0.14 145);
  --good-bg: oklch(0.95 0.05 145);
  --warn: oklch(0.72 0.14 75);
  --warn-bg: oklch(0.96 0.06 80);
  --bad:  oklch(0.55 0.18 25);
  --bad-bg: oklch(0.95 0.05 25);
  --accent: oklch(0.32 0.05 250);

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;

  --sans: "Geist", "Inter", ui-sans-serif, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", "Source Serif Pro", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; color: inherit; }

::selection { background: oklch(0.85 0.08 85); color: var(--ink); }

/* ---------- Layout ---------- */

.page { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .page { padding: 0 20px; } }

/* ---------- Top nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 16px;
}
.nav-brand-mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
}
.nav-links { display: flex; gap: 26px; font-size: 14px; color: var(--ink-2); }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 600px) { .nav-links { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 28px; }
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero h1 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.035em;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.98;
  margin: 0 0 20px;
  max-width: 18ch;
  text-wrap: balance;
}
.hero h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.hero p.lede {
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--ink-2);
  max-width: 60ch;
  line-height: 1.5;
  margin: 0;
  text-wrap: pretty;
}
.hero-meta {
  display: flex;
  gap: 28px;
  margin-top: 32px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}
.hero-meta span::before { content: "→ "; color: var(--ink); margin-right: 4px; }

/* ---------- Calc app shell ---------- */
.calc-app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 48px;
  padding: 40px 0 80px;
  align-items: start;
}
@media (max-width: 980px) {
  .calc-app { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Form ---------- */
.form-stack { display: flex; flex-direction: column; gap: 28px; }
.form-section {
  border-top: 1px solid var(--rule);
  padding-top: 24px;
}
.form-section:first-child { border-top: none; padding-top: 0; }

.form-section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 18px;
}
.form-section-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}
.form-section-title {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.form-section-hint { font-size: 13px; color: var(--ink-3); margin-top: -10px; margin-bottom: 16px; }

label.field { display: block; margin-bottom: 14px; }
label.field > .field-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 6px;
}
label.field > .field-label .hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}

.input,
.select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 11px 14px;
  font-size: 15px;
  outline: none;
  transition: border-color .15s, background .15s;
}
.input:focus, .select:focus { border-color: var(--ink); background: var(--bg); }

.input-money {
  position: relative;
}
.input-money input {
  padding-left: 30px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.input-money::before {
  content: "$";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 14px;
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }

/* segmented control */
.segmented {
  display: flex;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 3px;
  gap: 3px;
}
.segmented button {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 8px 10px;
  font-size: 13px;
  border-radius: 7px;
  color: var(--ink-2);
  transition: background .15s, color .15s;
}
.segmented button.active {
  background: var(--ink);
  color: var(--bg);
}
.segmented button:not(.active):hover { color: var(--ink); }

/* slider */
.slider-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}
.slider-row input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%;
  height: 3px;
  background: var(--rule);
  border-radius: 999px;
  outline: none;
}
.slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px;
  background: var(--ink);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--ink);
}
.slider-row input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  background: var(--ink);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--ink);
}
.slider-value {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  min-width: 86px;
  text-align: right;
}

/* tooltip / explainer button */
.info-btn {
  background: transparent;
  border: 1px solid var(--rule);
  width: 16px; height: 16px;
  border-radius: 50%;
  font-size: 10px;
  color: var(--ink-3);
  padding: 0;
  display: inline-grid;
  place-items: center;
  margin-left: 6px;
  font-family: var(--serif);
  font-style: italic;
  line-height: 1;
}
.info-btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.callout {
  background: var(--bg-2);
  border-left: 2px solid var(--ink);
  padding: 12px 14px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
}
.callout strong { color: var(--ink); font-weight: 600; }

/* ---------- Results panel ---------- */
.results {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@media (max-width: 980px) { .results { position: static; } }

.result-card {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 28px;
}

.verdict-card {
  position: relative;
  overflow: hidden;
}
.verdict-card[data-tier="good"] { background: var(--good-bg); border-color: oklch(0.85 0.08 145); }
.verdict-card[data-tier="warn"] { background: var(--warn-bg); border-color: oklch(0.85 0.08 80); }
.verdict-card[data-tier="bad"]  { background: var(--bad-bg);  border-color: oklch(0.85 0.05 25); }

.verdict-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--rule);
  color: var(--ink-2);
}
.verdict-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-3);
}
[data-tier="good"] .verdict-pill .dot { background: var(--good); }
[data-tier="warn"] .verdict-pill .dot { background: var(--warn); }
[data-tier="bad"]  .verdict-pill .dot { background: var(--bad); }

.verdict-headline {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 18px 0 8px;
  font-variant-numeric: tabular-nums;
}
.verdict-headline.minus { color: var(--bad); }
.verdict-sub {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
  max-width: 42ch;
}

.breakeven-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid color-mix(in oklab, currentColor 12%, transparent);
}
.breakeven-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.breakeven-value {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* Visualization */
.viz {
  margin-top: 22px;
}
.viz-track {
  position: relative;
  height: 50px;
  border-radius: 8px;
  background: linear-gradient(90deg,
    oklch(0.94 0.04 25) 0%,
    oklch(0.95 0.04 75) 50%,
    oklch(0.94 0.05 145) 100%);
  overflow: hidden;
}
.viz-marker {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: var(--ink);
  transition: left .4s cubic-bezier(.4,0,.2,1);
}
.viz-marker::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px; height: 10px;
  background: var(--ink);
  border-radius: 50%;
  border: 2px solid var(--bg);
}
.viz-breakeven {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: color-mix(in oklab, var(--ink) 30%, transparent);
  border-left: 1px dashed var(--ink);
  opacity: 0.5;
}
.viz-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 8px;
}
.viz-callout {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
}
.viz-callout strong { color: var(--ink); font-weight: 600; }

/* Comparison table */
.compare-card { padding: 0; overflow: hidden; }
.compare-head {
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--rule);
}
.compare-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.compare-sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 3px;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.compare-table th {
  font-weight: 500;
  text-align: right;
  padding: 12px 18px;
  font-size: 12px;
  color: var(--ink-3);
  border-bottom: 1px solid var(--rule);
  background: var(--bg-3);
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.compare-table th:first-child { text-align: left; }
.compare-table td {
  padding: 11px 18px;
  border-bottom: 1px solid var(--rule-2);
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
  font-size: 13px;
  text-align: right;
}
.compare-table td:first-child {
  text-align: left;
  font-family: var(--sans);
  color: var(--ink-2);
}
.compare-table tr.total {
  background: var(--bg-3);
}
.compare-table tr.total td {
  font-weight: 600;
  color: var(--ink);
  border-bottom: 0;
  padding-top: 14px;
  padding-bottom: 14px;
}
.compare-table tr.subhead td {
  background: var(--bg);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  padding: 8px 18px;
  border-bottom: 1px solid var(--rule-2);
}
.delta-cell { color: var(--good); }
.delta-cell.neg { color: var(--bad); }

/* Note card */
.note-card {
  padding: 22px 24px;
}
.note-card h4 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.note-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.note-card li {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
  padding-left: 18px;
  position: relative;
}
.note-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px; height: 1px;
  background: var(--ink);
}

/* ---------- Long content sections ---------- */
.section {
  padding: 80px 0;
  border-top: 1px solid var(--rule);
}
.section-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.section h2 {
  font-weight: 600;
  font-size: clamp(28px, 3.5vw, 44px);
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  line-height: 1.05;
  max-width: 22ch;
  text-wrap: balance;
}
.section h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.section .deck {
  font-size: 18px;
  color: var(--ink-2);
  max-width: 65ch;
  margin: 0 0 40px;
  line-height: 1.55;
  text-wrap: pretty;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 820px) { .three-col { grid-template-columns: 1fr; gap: 24px; } }
.three-col h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.three-col p {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0;
}
.three-col .num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 36px;
  color: var(--ink);
  display: block;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

/* explainer two-col */
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: start;
}
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; gap: 28px; } }
.two-col h3 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: -0.015em;
}
.two-col p {
  color: var(--ink-2);
  line-height: 1.65;
  font-size: 16px;
  margin: 0 0 14px;
}
.prose p strong { color: var(--ink); font-weight: 600; }
.prose ul { margin: 10px 0 18px 0; padding-left: 20px; color: var(--ink-2); }
.prose li { margin-bottom: 6px; line-height: 1.55; }

/* FAQ */
.faq { display: flex; flex-direction: column; }
.faq details {
  border-top: 1px solid var(--rule);
  padding: 22px 0;
}
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--ink-3);
  transition: transform .2s;
}
.faq details[open] summary::after { content: "−"; }
.faq details > div {
  margin-top: 12px;
  color: var(--ink-2);
  line-height: 1.65;
  font-size: 15px;
  max-width: 75ch;
}
.faq details > div p { margin: 0 0 10px; }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- Footer (canonical 3-col Red Goggles layout) ---------- */
.footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 32px 48px;
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}
@media (max-width: 720px) {
  .footer { padding: 40px 20px 36px; }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 56px;
  margin-bottom: 36px;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; margin-bottom: 28px; }
}

.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.footer-brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  font-weight: 500;
  line-height: 1;
}
.footer-brand-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.footer-brand-tld {
  color: var(--ink-3);
  font-weight: 400;
}
.footer-tagline {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 36ch;
}

.footer-heading {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin: 0 0 12px;
  font-weight: 500;
}
.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-list a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.footer-list a:hover {
  color: var(--ink);
  border-bottom-color: var(--rule);
}

.footer-divider {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0 0 22px;
}

.footer-disclaimer {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 80ch;
  margin: 0 0 24px;
}
.footer-disclaimer strong {
  color: var(--ink);
  font-weight: 600;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.footer-copy {
  max-width: 70ch;
  line-height: 1.6;
}
.footer-legal-links {
  flex: 0 0 auto;
}
.footer-legal-links .privacy-link-btn {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
@media (max-width: 600px) {
  .footer-bottom { flex-direction: column; gap: 14px; }
}

/* sticky disclaimer top bar (mobile + always-visible) */
.top-strip {
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.02em;
  padding: 8px 32px;
  text-align: center;
}
.top-strip span { opacity: 0.7; }

/* utility */
.muted { color: var(--ink-3); }
.kbd {
  font-family: var(--mono);
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg-3);
  color: var(--ink-2);
  border: 1px solid var(--rule);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ============ Privacy modal ============ */
.privacy-scrim {
  position: fixed;
  inset: 0;
  background: oklch(0.18 0.01 60 / 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  animation: scrim-in 0.18s ease-out;
}
@keyframes scrim-in { from { opacity: 0; } to { opacity: 1; } }
.privacy-modal {
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 48px);
  background: var(--bg);
  border-radius: var(--r-lg);
  border: 1px solid var(--rule);
  box-shadow: 0 24px 60px oklch(0.18 0.01 60 / 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modal-in 0.22s cubic-bezier(.2,.8,.2,1);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: none; }
}
.privacy-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg-2);
}
.privacy-modal-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.privacy-modal-title {
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
}
.privacy-modal-x {
  appearance: none;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 50%;
  width: 32px; height: 32px;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-2);
  cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.15s, color 0.15s;
}
.privacy-modal-x:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.privacy-modal-x:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.privacy-modal-body {
  padding: 24px 26px 26px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}
.privacy-modal-body h3 {
  color: var(--ink);
  margin: 22px 0 8px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
  font-weight: 600;
}
.privacy-modal-body p { margin: 0 0 12px; }
.privacy-modal-body ul { margin: 0 0 12px; padding-left: 18px; }
.privacy-modal-body li { margin-bottom: 6px; }
.privacy-modal-body strong { color: var(--ink); font-weight: 600; }
.privacy-modal-body a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.privacy-tldr {
  margin: 0 0 18px;
  padding: 14px 16px;
  background: var(--bg-2);
  border-left: 2px solid var(--ink);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 14px;
  color: var(--ink);
}
.privacy-updated {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  margin: 22px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.privacy-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.btn-primary {
  appearance: none;
  background: var(--ink);
  color: var(--bg);
  border: 0;
  padding: 10px 22px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.btn-primary:hover { background: var(--ink-2); }
.btn-primary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.privacy-link-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.privacy-link-btn:hover { color: var(--ink); }

@media (max-width: 600px) {
  .privacy-scrim { padding: 0; align-items: stretch; }
  .privacy-modal { max-height: 100vh; max-width: 100%; border-radius: 0; border: 0; }
}

/* ============ Ad slots ============ */

.ad-slot {
  display: block;
  margin: 0;
  background: transparent;
}
.ad-label {
  /* legacy class — kept for compatibility but the canonical label
     is .ad-slot-label, gated by data-ad-status="filled". */
  display: none;
}

.ad-slot-label {
  display: none; /* hidden by default; revealed only on real fill */
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
  padding: 0 2px;
}
.ad-label-text { letter-spacing: 0.12em; }
.ad-label-dim { opacity: 0.6; font-size: 9px; margin-left: 8px; }

/* Reveal label when AdSense reports the slot as filled. */
.ad-slot[data-ad-mode="live"]:has(ins[data-ad-status="filled"]) .ad-slot-label {
  display: flex;
}
/* Hide unfilled ins entirely so the row collapses cleanly to its reserved
   min-height. The min-height itself keeps the page from shifting. */
.ad-slot[data-ad-mode="live"] ins[data-ad-status="unfilled"] {
  display: none;
}
/* In live mode, the inner placeholder shell is hidden — we only show
   the rendered creative or reserved empty space. */
.ad-slot[data-ad-mode="live"] .ad-slot-inner {
  background: transparent;
  border: 0;
}
/* Design-mode shows the labeled box + dimensions + placeholder. */
.ad-slot[data-ad-mode="design"] .ad-slot-label {
  display: flex;
}

.ad-slot-inner {
  position: relative;
  width: 100%;
  background:
    repeating-linear-gradient(
      135deg,
      var(--bg-2) 0px,
      var(--bg-2) 12px,
      var(--bg-3) 12px,
      var(--bg-3) 13px
    );
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--ink-3);
}
.ad-placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  text-align: center;
  background: var(--bg);
  border-radius: var(--r-sm);
  border: 1px solid var(--rule);
  font-size: 12px;
  font-family: var(--mono);
  color: var(--ink-3);
}
.ad-placeholder-logo {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  color: var(--ink-3);
  background: var(--bg-2);
  border-radius: 50%;
  border: 1px solid var(--rule);
}
.ad-placeholder-text { max-width: 32ch; }

/* Centered leaderboard wrappers */
.ad-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 0;
}
.ad-wrap--bordered {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--bg-2);
  margin: 0;
}

.ad-leaderboard .ad-slot-inner { width: 100%; }
.ad-mrec .ad-slot-inner { width: 100%; max-width: 300px; }
.ad-halfpage .ad-slot-inner { width: 100%; max-width: 300px; }
.ad-mobile-banner .ad-slot-inner { width: 100%; max-width: 320px; }
.ad-large-mobile-banner .ad-slot-inner { width: 100%; max-width: 320px; }

/* Reserve dimensions to prevent CLS when creatives load. */
.ad-leaderboard { min-height: 110px; }
.ad-mrec { min-height: 270px; }
.ad-halfpage { min-height: 620px; }
.ad-mobile-banner { min-height: 70px; }
.ad-large-mobile-banner { min-height: 120px; }

/* Hide larger ads where they don't fit */
@media (max-width: 768px) {
  .ad-leaderboard.desktop-only { display: none; }
}
@media (max-width: 980px) {
  .ad-halfpage.desktop-only { display: none; }
  .long-rail { display: none; }
}
@media (min-width: 769px) {
  .ad-mobile-only { display: none; }
}

/* ============ Pre-result ad placement ============ */
.ad-pre-result {
  margin-bottom: 6px;
}
.ad-pre-result .ad-slot-inner {
  max-width: 100%;
  width: 100%;
  border-radius: var(--r-lg);
}

/* Sticky half-page in long-form */
.ad-sticky-side {
  position: sticky;
  top: 24px;
}

/* Native ad styling */
.native-ad {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  width: 100%;
  padding: 18px;
  background: var(--bg);
  border-radius: var(--r-md);
  align-items: center;
  text-align: left;
  border: 1px solid var(--rule);
}
.native-ad-thumb {
  width: 80px; height: 80px;
  background: var(--bg-3);
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--ink-2);
}
.native-ad-kicker {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.native-ad-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 6px;
  text-wrap: pretty;
}
.native-ad-cta {
  font-size: 13px;
  color: var(--ink-2);
}
.native-ad--programmatic .native-ad-title.muted {
  color: var(--ink-3);
  font-weight: 500;
  font-style: italic;
  font-family: var(--serif);
}

/* Sticky mobile bottom ad */
.sticky-mobile-ad {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--bg);
  border-top: 1px solid var(--rule);
  padding: 6px 8px 8px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 6px;
  box-shadow: 0 -4px 14px oklch(0.18 0.01 60 / 0.06);
}
.sticky-mobile-ad .ad-slot { margin: 0; }
.sticky-mobile-ad .ad-label { display: none; }
.sticky-mobile-ad .ad-slot-inner { aspect-ratio: 320 / 50; }
.sticky-mobile-ad-close {
  appearance: none;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 50%;
  width: 22px; height: 22px;
  padding: 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  margin-top: 14px;
}
@media (min-width: 769px) {
  .sticky-mobile-ad { display: none; }
}

/* ====== Long-form layout w/ right rail (sticky 300×600 sidebar) ====== */

.long-form {
  /* uses .page constraints */
}

.long-with-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: start;
}

.long-main {
  min-width: 0;
}
.long-main .section {
  padding: 64px 0;
}
.long-main .section:first-child {
  padding-top: 24px;
  border-top: 0;
}
.long-main .section h2 {
  max-width: none;
}

.long-rail {
  position: relative;
}
.long-rail-sticky {
  position: sticky;
  top: 32px;
}

/* Inline ad blocks within long-form main column */
.ad-wrap--inline {
  padding: 32px 0;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: center;
}
.ad-wrap--inline .ad-slot { width: 100%; max-width: 728px; }

/* Below-hero banner placement */
.ad-wrap--banner {
  padding: 8px 0 32px;
  display: flex;
  justify-content: center;
}
.ad-wrap--banner .ad-slot { width: 100%; max-width: 728px; }

@media (max-width: 980px) {
  .long-with-rail {
    grid-template-columns: 1fr;
  }
  .long-main .section { padding: 48px 0; }
  .long-rail { display: none; }
}

/* Add bottom padding on small screens so sticky ad doesn't cover footer */
@media (max-width: 768px) {
  body { padding-bottom: 72px; }
}
