@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-500-italic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #121c22;
  --ink-2: #24333a;
  --muted: #5c6c74;
  --line: #ddd6c8;
  --line-strong: #c9c0ae;
  --paper: #f6f1e8;
  --paper-2: #ede6d8;
  --white: #fffbf4;
  --teal: #1b5f55;
  --teal-2: #144940;
  --gold: #c4a265;
  --gold-2: #a6854a;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Source Sans Pro", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --shadow: 0 1px 0 rgba(18, 28, 34, 0.04), 0 16px 48px rgba(18, 28, 34, 0.07);
  --radius: 14px;
  --max: 1120px;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }

.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}
.site-header.is-legal { border-bottom-color: var(--line); }

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 4.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.brand svg { width: 32px; height: 32px; flex: 0 0 32px; }
.brand:hover { color: var(--teal); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  margin-left: auto;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--teal); }

.nav .btn { margin-left: 0.25rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.15rem;
  border-radius: 8px;
  background: var(--teal);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: 1px solid var(--teal-2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 1px 2px rgba(18, 28, 34, 0.18);
  transition: background 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--teal-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--paper-2); }

.btn-lg { padding: 0.9rem 1.4rem; font-size: 1.05rem; }

/* Hero */
.hero {
  padding: 3.5rem 0 4.5rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--teal);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--gold);
}
h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 5.6vw, 4.35rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.lede {
  margin-top: 1.25rem;
  font-size: 1.2rem;
  color: var(--ink-2);
  max-width: 36rem;
  line-height: 1.5;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  margin-top: 2rem;
}
.fine {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Example card */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.example {
  padding: 1.35rem 1.4rem 1.15rem;
  position: relative;
}
.example-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 0.85rem;
}
.example-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.example-meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.15rem;
}
.hs-row {
  margin-top: 1.15rem;
  padding: 0.95rem 1rem;
  background: var(--paper);
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.hs-row .k {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.hs-row .v {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.market-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.1rem;
}
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  background: var(--white);
}
.example-note {
  margin-top: 0.9rem;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Features */
.section { padding: 4.5rem 0; }
.section-ink {
  background: var(--ink);
  color: var(--white);
  padding: 4.25rem 0;
}
.section-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.section h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.section-intro {
  color: var(--muted);
  max-width: 32rem;
  margin-top: 0.6rem;
}
.section-ink .section-intro { color: #c9c0ae; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
  margin-top: 2.25rem;
}
.feature {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem 1.4rem;
}
.feature .icon {
  width: 40px;
  height: 40px;
  color: var(--teal);
  margin-bottom: 1rem;
}
.feature h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}
.feature p { color: var(--ink-2); font-size: 0.98rem; }

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2.4rem;
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 0.2rem;
}
.step + .step::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 1.15rem;
  width: 1.5rem;
  height: 1px;
  background: color-mix(in srgb, var(--gold) 50%, transparent);
}
.step-num {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.7rem;
}
.step h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.step p { color: #c9c0ae; font-size: 0.95rem; }

/* Markets */
.markets {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.85rem;
  margin-top: 2.1rem;
}
.market {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1rem 1.15rem;
  text-align: left;
}
.market .code {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--gold-2);
  text-transform: uppercase;
}
.market .name {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-top: 0.35rem;
  line-height: 1.2;
}

/* FAQ */
.faq {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 1.05rem 0;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
  font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex: 0 0 auto;
  margin-top: -0.25rem;
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: 0.2rem; }
.faq details p {
  margin-top: 0.7rem;
  color: var(--ink-2);
  max-width: 42rem;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #d6ccba;
  padding: 3rem 0 2rem;
  margin-top: 0;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.site-footer .brand { color: var(--white); }
.site-footer .brand:hover { color: var(--gold); }
.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  list-style: none;
}
.footer-links a {
  color: #d6ccba;
  text-decoration: none;
  font-size: 0.95rem;
}
.footer-links a:hover { color: var(--white); }
.footer-meta a { color: #d6ccba; text-decoration: none; }
.footer-meta a:hover { color: var(--white); }
.legal a { color: var(--teal); }
.footer-meta {
  margin-top: 2.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid #2c3a41;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: #8c8578;
  font-size: 0.85rem;
}
.placeholder {
  font-style: italic;
  color: #a89f90;
}

/* Legal pages */
.legal {
  padding: 3rem 0 5rem;
  max-width: 42rem;
}
.legal .updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.6rem 0 2rem;
}
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.legal h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.6rem;
}
.legal p, .legal li { color: var(--ink-2); }
.legal p { margin-bottom: 0.9rem; }
.legal ul { padding-left: 1.2rem; margin-bottom: 0.9rem; }
.legal li { margin: 0.3rem 0; }
.legal .placeholder { color: var(--muted); }

/* 404 */
.notfound {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 1.25rem;
}
.notfound h1 { margin-bottom: 0.8rem; }
.notfound p { color: var(--muted); margin-bottom: 1.5rem; }

@media (max-width: 960px) {
  .hero-grid,
  .feature-grid,
  .steps,
  .markets { grid-template-columns: 1fr 1fr; }
  .step + .step::before { display: none; }
}
@media (max-width: 720px) {
  .wrap { width: min(var(--max), calc(100% - 1.6rem)); }
  .nav-links { display: none; }
  .hero { padding: 2.2rem 0 3rem; }
  .hero-grid,
  .feature-grid,
  .steps,
  .markets { grid-template-columns: 1fr; }
  .section { padding: 3.25rem 0; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
}
