/* AEOuse site styles. One stylesheet, no framework. */

@font-face { font-family: "Plex Sans"; src: url("/assets/fonts/plex-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/assets/fonts/plex-sans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/assets/fonts/plex-sans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/assets/fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/assets/fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --paper: oklch(0.985 0.004 240);
  --paper-2: oklch(0.962 0.007 240);
  --paper-3: oklch(0.935 0.009 240);
  --ink: oklch(0.22 0.022 252);
  --ink-2: oklch(0.40 0.02 252);
  --rule: oklch(0.87 0.012 245);
  --rule-strong: oklch(0.78 0.015 245);
  --accent: oklch(0.55 0.19 33);
  --accent-ink: oklch(0.50 0.18 33);
  --accent-wash: oklch(0.95 0.03 40);
  --good: oklch(0.47 0.11 155);
  --warn: oklch(0.50 0.12 70);

  --sans: "Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: clamp(1.75rem, 1.4rem + 1.6vw, 2.375rem);
  --step-4: clamp(2.25rem, 1.6rem + 3vw, 3.75rem);

  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --max: 72rem;
  --radius: 10px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }

h1, h2, h3 { font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-4); letter-spacing: -0.03em; line-height: 1.05; }
h2 { font-size: var(--step-3); letter-spacing: -0.022em; }
h3 { font-size: var(--step-1); letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
p + p { margin-top: 1em; }
strong { font-weight: 600; }

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

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

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.measure { max-width: 42rem; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-2); }
.small { font-size: var(--step--1); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: baseline; gap: 0.5rem; color: var(--ink); text-decoration: none; }
.brand-mark { font-size: 1.375rem; letter-spacing: -0.02em; line-height: 1; }
.brand-mark b { font-weight: 600; }
.brand-mark span { font-weight: 400; }
.brand-tag { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-2); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 1.5rem; }
.nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: var(--accent-ink); }
.nav a[aria-current="page"] { color: var(--accent-ink); }
.nav-toggle { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.65rem 1.15rem;
  border-radius: 999px; border: 1px solid transparent;
  font: 500 0.98rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: oklch(0.99 0.005 40); }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { border-color: var(--rule-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.nav .btn { color: oklch(0.99 0.005 40); min-height: 2.5rem; padding: 0.5rem 1rem; font-size: 0.92rem; }
.nav .btn:hover { color: oklch(0.99 0.005 40); }

/* Sections */
section { padding-block: clamp(3.5rem, 2.5rem + 4vw, 6rem); }
.band { background: var(--paper-2); border-block: 1px solid var(--rule); }
.section-head { display: grid; gap: 0.9rem; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem); max-width: 46rem; }
.section-head p { color: var(--ink-2); font-size: var(--step-1); line-height: 1.5; }
.kicker { font-family: var(--mono); font-size: 0.8rem; color: var(--accent-ink); letter-spacing: 0.02em; }

/* Hero */
.hero { padding-block: clamp(3rem, 2rem + 5vw, 6.5rem) clamp(3rem, 2rem + 4vw, 5rem); }
.hero .wrap { display: grid; gap: clamp(2.5rem, 2rem + 3vw, 4.5rem); grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); align-items: center; }
.hero h1 { max-width: 18ch; }
.hero-lede { margin-top: 1.4rem; font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); max-width: 34rem; }
.hero-cta { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-note { margin-top: 1.25rem; font-size: var(--step--1); color: var(--ink-2); }

/* Example finding figure */
.finding {
  margin: 0; background: oklch(0.995 0.002 240); border: 1px solid var(--rule-strong); border-radius: var(--radius);
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
}
.finding-label { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-2); display: flex; justify-content: space-between; gap: 1rem; }
.finding-q { margin-top: 0.9rem; font-size: 1.125rem; font-weight: 500; line-height: 1.4; }
.finding-meta { margin-top: 0.4rem; font-size: var(--step--1); color: var(--ink-2); }
.finding table { width: 100%; border-collapse: collapse; margin-top: 1.1rem; font-size: 0.95rem; }
.finding th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 0.75rem; color: var(--ink-2); padding: 0 0 0.4rem; border-bottom: 1px solid var(--rule); }
.finding th:last-child, .finding td:last-child { text-align: right; }
.finding td { padding: 0.5rem 0; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.finding td.num { font-family: var(--mono); font-size: 0.9rem; }
.bar { display: inline-block; height: 6px; border-radius: 3px; background: var(--ink); vertical-align: middle; margin-right: 0.6rem; }
.finding tr.you td { color: var(--accent-ink); font-weight: 500; }
.finding tr.you .bar { background: var(--accent); }
.finding-error { margin-top: 1rem; padding: 0.75rem 0.9rem; background: var(--accent-wash); border-radius: 6px; font-size: 0.92rem; line-height: 1.45; }
.finding-error b { font-weight: 600; }
.finding figcaption { margin-top: 0.9rem; font-size: 0.8rem; color: var(--ink-2); }

/* Two-column prose */
.split { display: grid; gap: clamp(2rem, 1.5rem + 3vw, 4rem); grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; }
.prose p { color: var(--ink-2); }
.prose p strong { color: var(--ink); }

/* Fact list with sources */
.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.facts li { padding: 1.15rem 0; border-bottom: 1px solid var(--rule); display: grid; gap: 0.35rem; }
.facts .fact { font-size: var(--step-1); line-height: 1.4; font-weight: 500; }
.facts .src { font-size: var(--step--1); color: var(--ink-2); }

/* Layers table */
.layers { width: 100%; border-collapse: collapse; }
.layers th, .layers td { text-align: left; vertical-align: top; padding: 1.1rem 1rem 1.1rem 0; border-bottom: 1px solid var(--rule); }
.layers thead th { font-family: var(--mono); font-weight: 400; font-size: 0.78rem; color: var(--ink-2); padding-top: 0; }
.layers tbody th { width: 22%; }
.layers tbody th .n { font-family: var(--mono); font-size: 0.8rem; color: var(--accent-ink); display: block; margin-bottom: 0.2rem; font-weight: 400; }
.layers tbody th .name { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.01em; }
.layers td { color: var(--ink-2); }
.layers td.ctl { white-space: nowrap; font-family: var(--mono); font-size: 0.85rem; color: var(--ink); }
.dots { letter-spacing: 0.1em; color: var(--accent); }
.dots i { font-style: normal; color: var(--rule-strong); }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.steps li { padding: 1.4rem 1.4rem 0 0; }
.steps li + li { padding-left: 1.4rem; border-left: 1px solid var(--rule); }
.steps .n { font-family: var(--mono); font-size: 0.8rem; color: var(--accent-ink); }
.steps h3 { margin-top: 0.5rem; }
.steps p { margin-top: 0.6rem; color: var(--ink-2); font-size: 0.98rem; }
.steps .when { display: block; margin-top: 0.8rem; font-family: var(--mono); font-size: 0.78rem; color: var(--ink); }

/* Segments */
.segments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(2rem, 1rem + 3vw, 4rem); }
.segment { padding: 1.4rem 0; border-top: 1px solid var(--rule-strong); }
.segment h3 { font-size: var(--step-1); }
.segment p { margin-top: 0.5rem; color: var(--ink-2); }
.segment .q { margin-top: 0.8rem; font-family: var(--mono); font-size: 0.85rem; color: var(--ink); background: var(--paper-3); padding: 0.55rem 0.75rem; border-radius: 6px; line-height: 1.5; }

/* Promise columns */
.promise { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 1rem + 2vw, 3rem); }
.promise h3 { padding-bottom: 0.75rem; border-bottom: 2px solid var(--ink); }
.promise ul { list-style: none; margin: 0; padding: 0; }
.promise li { padding: 0.9rem 0 0.9rem 1.9rem; border-bottom: 1px solid var(--rule); position: relative; color: var(--ink-2); }
.promise li::before { position: absolute; left: 0; top: 0.9rem; font-family: var(--mono); font-weight: 500; }
.promise .yes li::before { content: "\2713"; color: var(--good); }
.promise .no li::before { content: "\2715"; color: var(--accent-ink); }
.promise li strong { color: var(--ink); }

/* Callout / CTA block */
.cta-block { background: var(--ink); color: var(--paper); border-radius: 14px; padding: clamp(2rem, 1.5rem + 3vw, 3.5rem); display: grid; gap: 2rem; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: start; }
.cta-block h2 { color: var(--paper); }
.cta-block p { color: oklch(0.86 0.012 245); }
.cta-block .kicker { color: oklch(0.80 0.10 40); }
.cta-block ol { margin: 0; padding-left: 1.2rem; color: oklch(0.90 0.01 245); }
.cta-block ol li + li { margin-top: 0.5rem; }
.cta-block .email { font-family: var(--mono); font-size: var(--step-1); color: var(--paper); text-decoration: none; border-bottom: 1px solid oklch(0.6 0.02 245); }
.cta-block .email:hover { border-bottom-color: var(--paper); }
.cta-block .btn-primary { margin-top: 1.5rem; }
.cta-block .btn-primary:focus-visible { outline-color: var(--paper); }

/* FAQ */
.faq { border-top: 1px solid var(--rule-strong); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; padding: 1.15rem 2.5rem 1.15rem 0; font-weight: 500; font-size: 1.075rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 1rem; font-family: var(--mono); font-size: 1.25rem; color: var(--ink-2); transition: transform 200ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 0 1.25rem; color: var(--ink-2); max-width: 46rem; }

/* Page header for inner pages */
.page-head { padding-block: clamp(3rem, 2rem + 4vw, 5rem) clamp(2rem, 1.5rem + 2vw, 3rem); border-bottom: 1px solid var(--rule); }
.page-head h1 { font-size: clamp(2rem, 1.5rem + 2.4vw, 3.25rem); max-width: 20ch; }
.page-head .lede { margin-top: 1.1rem; font-size: var(--step-1); color: var(--ink-2); max-width: 40rem; line-height: 1.5; }
.crumbs { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-2); margin-bottom: 1rem; }
.crumbs a { color: var(--ink-2); }

/* Article body */
.article { padding-block: clamp(2.5rem, 2rem + 2vw, 4rem); }
.article .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: start; }
.body { max-width: 42rem; }
.body h2 { font-size: var(--step-2); margin-top: 2.75rem; margin-bottom: 0.9rem; }
.body h2:first-child { margin-top: 0; }
.body h3 { margin-top: 1.9rem; margin-bottom: 0.5rem; }
.body p, .body li { color: oklch(0.30 0.02 252); }
.body ul, .body ol { padding-left: 1.25rem; margin: 1em 0; }
.body li + li { margin-top: 0.45em; }
.body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.95rem; }
.body th, .body td { text-align: left; vertical-align: top; padding: 0.7rem 0.75rem 0.7rem 0; border-bottom: 1px solid var(--rule); }
.body thead th { font-family: var(--mono); font-weight: 400; font-size: 0.78rem; color: var(--ink-2); border-bottom-color: var(--rule-strong); }
.body code { font-family: var(--mono); font-size: 0.9em; background: var(--paper-3); padding: 0.1em 0.35em; border-radius: 4px; }
.body pre { font-family: var(--mono); font-size: 0.85rem; background: var(--paper-3); padding: 1rem; border-radius: 8px; overflow-x: auto; line-height: 1.5; }
.body .note { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 8px; padding: 1rem 1.1rem; margin: 1.5rem 0; }
.body .note p { color: var(--ink-2); }
.aside { position: sticky; top: 6rem; font-size: 0.92rem; }
.aside h2 { font-family: var(--mono); font-weight: 400; font-size: 0.78rem; color: var(--ink-2); letter-spacing: 0.02em; margin-bottom: 0.75rem; }
.aside ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--rule); }
.aside li a { display: block; padding: 0.3rem 0 0.3rem 0.9rem; color: var(--ink-2); text-decoration: none; }
.aside li a:hover { color: var(--accent-ink); }
.aside .aside-cta { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.aside .aside-cta p { color: var(--ink-2); margin-bottom: 0.9rem; }
.sources { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--rule-strong); font-size: 0.88rem; }
.sources h2 { font-size: 1rem; margin: 0 0 0.75rem; }
.sources ol { padding-left: 1.25rem; margin: 0; }
.sources li { color: var(--ink-2); }
.sources a { word-break: break-word; }

/* Pricing */
.offers { border-top: 2px solid var(--ink); }
.offer { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr) minmax(0, 0.7fr); gap: clamp(1rem, 0.5rem + 2vw, 2.5rem); padding: 2rem 0; border-bottom: 1px solid var(--rule); align-items: start; }
.offer h2 { font-size: var(--step-2); }
.offer .for { margin-top: 0.5rem; color: var(--ink-2); font-size: 0.95rem; }
.offer ul { margin: 0; padding-left: 1.1rem; color: var(--ink-2); }
.offer ul li + li { margin-top: 0.35rem; }
.offer .price { text-align: right; }
.offer .price .amt { font-size: var(--step-2); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.offer .price .alt { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-2); margin-top: 0.3rem; }
.offer .price .unit { font-size: 0.9rem; color: var(--ink-2); margin-top: 0.2rem; }
.offer.free { background: var(--accent-wash); padding-inline: 1.25rem; margin-inline: -1.25rem; border-radius: 10px; border-bottom: 0; margin-top: 1.5rem; }

/* Footer */
.site-footer { margin-top: clamp(3rem, 2rem + 4vw, 6rem); border-top: 1px solid var(--rule); background: var(--paper-2); padding-block: 3rem 2.5rem; font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.8fr)); gap: 2rem; }
.site-footer h2 { font-family: var(--mono); font-weight: 400; font-size: 0.78rem; color: var(--ink-2); letter-spacing: 0.02em; margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 0.4rem; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--accent-ink); text-decoration: underline; }
.legal-line { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 0.82rem; line-height: 1.55; }

/* Responsive */
@media (max-width: 960px) {
  .hero .wrap, .split, .cta-block { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps li:nth-child(n+3) { margin-top: 1.5rem; border-top: 1px solid var(--rule); }
  .article .wrap { grid-template-columns: 1fr; }
  .aside { position: static; order: -1; }
  .aside ol, .aside .aside-cta { display: none; }
  .aside h2 { display: none; }
  .offer { grid-template-columns: 1fr; }
  .offer .price { text-align: left; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .nav { display: none; }
  .nav-toggle { display: block; margin-left: auto; position: relative; }
  .nav-toggle summary { list-style: none; cursor: pointer; font-family: var(--mono); font-size: 0.85rem; padding: 0.55rem 0.9rem; border: 1px solid var(--rule-strong); border-radius: 999px; }
  .nav-toggle summary::-webkit-details-marker { display: none; }
  .nav-toggle[open] .nav-panel { display: grid; }
  .nav-panel { display: none; position: absolute; right: 0; top: calc(100% + 0.6rem); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 0.5rem; min-width: 14rem; box-shadow: 0 6px 8px -4px oklch(0.2 0.02 250 / 0.12); }
  .nav-panel a { padding: 0.7rem 0.8rem; color: var(--ink); text-decoration: none; border-radius: 6px; }
  .nav-panel a:hover { background: var(--paper-2); }
  .nav-panel a.btn { margin-top: 0.25rem; color: oklch(0.99 0.005 40); }
}
@media (max-width: 640px) {
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding-left: 0; border-left: 0; }
  .steps li + li { margin-top: 1.25rem; border-top: 1px solid var(--rule); }
  .segments, .promise { grid-template-columns: 1fr; }
  .layers thead { display: none; }
  .layers, .layers tbody, .layers tr, .layers th, .layers td { display: block; width: 100%; }
  .layers tr { border-bottom: 1px solid var(--rule); padding: 1rem 0; }
  .layers th, .layers td { border: 0; padding: 0.25rem 0; }
  .layers td.ctl { white-space: normal; }
  .layers td[data-label]::before { content: attr(data-label) ": "; font-family: var(--mono); font-size: 0.75rem; color: var(--ink-2); }
  .brand-tag { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
@media print {
  .site-header, .site-footer, .aside { display: none; }
  body { background: #fff; }
}
