/* ---------- Theme tokens — Midnight, with dark + light modes ---------- */
:root {
  --maxw: 1200px;
  --r: 14px;
  --r-lg: 22px;
  --grain: 1;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "Spline Sans Mono", ui-monospace, monospace;
  --display-weight: 600;
  --display-tracking: -0.025em;
  --display-italic: normal;
}

/* DARK (default) — warm near-black, acid-lime accent */
:root, [data-mode="dark"] {
  --bg: #15120e; --bg-2: #1e1a14; --panel: #211c15;
  --ink: #ede5d6; --ink-2: #9d9384; --ink-3: #6f6657;
  --line: rgba(237,229,214,0.13); --line-2: rgba(237,229,214,0.06);
  --accent: #cdeb5a; --accent-2: #b9d942; --accent-ink: #1a1710;
  --accent-soft: rgba(205,235,90,0.12); --ok: #b9d942;
  --accent-text: var(--accent); --accent-edge: transparent;
}

/* LIGHT — warm off-white, lime kept legible via darker text + edges */
[data-mode="light"] {
  --bg: #f3efe6; --bg-2: #eae3d6; --panel: #fffdf8;
  --ink: #1f1b14; --ink-2: #6c6354; --ink-3: #9a917f;
  --line: rgba(31,27,20,0.12); --line-2: rgba(31,27,20,0.06);
  --accent: #c2e24a; --accent-2: #b3d63a; --accent-ink: #1f2606;
  --accent-soft: rgba(154,184,40,0.16); --ok: #4f9a3e;
  --accent-text: color-mix(in oklab, var(--accent) 58%, #1f2806);
  --accent-edge: color-mix(in oklab, var(--accent) 52%, #1c2405);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--accent-ink); }

/* subtle paper grain on warm themes */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  opacity: calc(var(--grain) * 0.5);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
[data-mode="dark"] body::before { mix-blend-mode: screen; opacity: 0.04; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: 1.04;
  text-wrap: balance;
}

a { color: inherit; text-decoration: none; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.section { padding: clamp(64px, 9vw, 130px) 0; }
.eyebrow {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-text); font-weight: 500;
  display: inline-flex; align-items: center; gap: 9px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent-text); display: inline-block; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-body); font-size: 16px; font-weight: 600;
  padding: 14px 24px; border-radius: var(--r); border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, filter .2s ease, border-color .2s ease;
  display: inline-flex; align-items: center; gap: 10px; letter-spacing: -0.01em; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(0.94); box-shadow: 0 8px 24px -10px var(--accent); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-2); border-color: var(--ink-2); }
.btn-arrow { transition: transform .2s; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -0.03em; }
.logo b { font-weight: var(--display-weight); }
/* Reachant brand mark — theme-swap symbol + word */
.brand-symbol { height: 22px; width: auto; display: inline-block; }
.brand-symbol.is-dark { display: inline-block; }
.brand-symbol.is-light { display: none; }
[data-mode="light"] .brand-symbol.is-dark { display: none; }
[data-mode="light"] .brand-symbol.is-light { display: inline-block; }
.brand-word { font-family: var(--font-display); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 15px; color: var(--ink-2); transition: color .2s; font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-tools { display: flex; align-items: center; gap: 10px; }
.tgl { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.tgl:hover { background: var(--bg-2); color: var(--ink); border-color: var(--ink-2); }
.tgl .icon-moon { display: none; }
[data-mode="light"] .tgl .icon-sun { display: none; }
[data-mode="light"] .tgl .icon-moon { display: block; }
.lang-tgl { display: inline-flex; border: 1px solid var(--line); border-radius: 100px; overflow: hidden; font-family: var(--font-mono); font-size: 12px; }
.lang-tgl a { border: none; background: transparent; color: var(--ink-3); padding: 8px 13px; cursor: pointer; font-family: inherit; letter-spacing: 0.06em; transition: background .15s, color .15s; display: inline-block; }
.lang-tgl a:hover { color: var(--ink); }
.lang-tgl a:first-child { border-radius: 100px 0 0 100px; }
.lang-tgl a:last-child { border-radius: 0 100px 100px 0; }
.lang-tgl a.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
[data-mode="light"] .lang-tgl a.on { box-shadow: inset 0 0 0 1px var(--accent-edge); }
@media (max-width: 860px) { .nav-links { display: none; } .nav-cta-btn { display: none; } }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.04fr 0.96fr; gap: 56px; align-items: center; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; gap: 44px; } }
.hero h1 { font-size: clamp(42px, 6.2vw, 78px); margin: 22px 0 0; }
.hero h1 .em { font-style: var(--display-italic); color: var(--accent-text); }
.hero-sub { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); margin-top: 24px; max-width: 32ch; line-height: 1.5; }
.hero-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-speed { display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; font-family: var(--font-mono); font-size: 13.5px; color: var(--ink-2); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- Product mock ---------- */
.mock {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: 0 40px 80px -50px rgba(0,0,0,0.5), 0 2px 0 var(--line-2);
  overflow: hidden; position: relative;
}
[data-mode="dark"] .mock { box-shadow: 0 40px 90px -40px #000, 0 0 0 1px var(--line); }
.mock-bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.mock-bar .label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--ink-2); margin-left: 4px; }
.mock-dots { display: flex; gap: 6px; }
.mock-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: inline-block; }
.mock-query { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mock-query .q { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 9px; }
.mock-query .q svg { color: var(--accent-text); flex: none; }
.chip { font-family: var(--font-mono); font-size: 11px; padding: 4px 10px; border-radius: 100px; background: var(--accent-soft); color: var(--accent-text); display: inline-flex; align-items: center; gap: 6px; letter-spacing: 0.04em; }
.chip .pulse { width: 6px; height: 6px; }
.mock-cols { display: grid; grid-template-columns: 1.5fr 1.4fr auto; gap: 12px; padding: 10px 18px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--line-2); }
.mock-row {
  display: grid; grid-template-columns: 1.5fr 1.4fr auto; gap: 12px; align-items: center;
  padding: 13px 18px; border-bottom: 1px solid var(--line-2);
}
@media (prefers-reduced-motion: no-preference) { .mock-row { animation: rowin .55s ease; } }
@keyframes rowin { from { transform: translateY(10px); } }
.mock-row .co { display: flex; align-items: center; gap: 11px; }
.mock-row .co .avatar { width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; font-family: var(--font-display); }
.mock-row .co .nm { font-weight: 600; font-size: 13.5px; line-height: 1.2; }
.mock-row .co .lc { font-size: 11.5px; color: var(--ink-2); }
.mock-row .dm { font-size: 13px; line-height: 1.25; }
.mock-row .dm b { font-weight: 600; }
.mock-row .dm span { color: var(--ink-2); font-size: 11.5px; }
.mock-row .ch { display: flex; gap: 5px; }
.mock-row .ch i { width: 22px; height: 22px; border-radius: 6px; background: var(--bg-2); display: grid; place-items: center; color: var(--ink-2); }
.mock-row .ch i svg { width: 12px; height: 12px; }
.mock-foot { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; background: var(--bg-2); font-size: 12.5px; }
.mock-foot .csv { font-family: var(--font-mono); font-weight: 500; color: var(--accent-text); display: inline-flex; align-items: center; gap: 7px; }
.mock-foot .done { color: var(--ok); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }

/* ---------- Trust strip ---------- */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 30px 0; }
.trust-inner { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; justify-content: center; }
.trust .lbl { font-size: 13px; color: var(--ink-2); }
.trust .ph { font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); opacity: 0.6; padding: 8px 18px; border: 1px dashed var(--line); border-radius: 8px; }

/* ---------- Benefits ---------- */
.benefits .b-head { max-width: 18ch; font-size: clamp(30px, 4vw, 48px); margin-bottom: 56px; }
.b-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (max-width: 820px) { .b-grid { grid-template-columns: 1fr; } }
.b-card { background: var(--bg); padding: 38px 32px; transition: box-shadow .25s ease; }
.b-card:hover { background: var(--panel); box-shadow: 0 22px 44px -34px rgba(0,0,0,0.5); }
.b-card .k { font-family: var(--font-mono); font-size: 12px; color: var(--accent-text); letter-spacing: 0.1em; }
.b-card h3 { font-size: 23px; margin: 18px 0 12px; }
.b-card p { color: var(--ink-2); font-size: 15.5px; }

/* ---------- How ---------- */
.how-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 56px; flex-wrap: wrap; }
.how-head h2 { font-size: clamp(30px, 4vw, 50px); max-width: 16ch; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 28px; border-top: 2px solid var(--ink); }
.step .n { position: absolute; top: -1px; left: 0; width: 36px; height: 4px; background: var(--accent-text); }
.step .num { font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); }
.step h4 { font-size: 21px; margin: 12px 0 10px; }
.step p { color: var(--ink-2); font-size: 14.5px; }

/* ---------- Lead spec ---------- */
.lead { background: var(--bg-2); }
.lead-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .lead-grid { grid-template-columns: 1fr; gap: 40px; } }
.lead h2 { font-size: clamp(30px, 4vw, 50px); margin: 20px 0; max-width: 13ch; }
.lead-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 560px) { .lead-cols { grid-template-columns: 1fr; } }
.lead-col { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 24px 22px; }
.lead-col h4 { font-size: 13px; font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 16px; }
.lead-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.lead-col li { font-size: 14.5px; display: flex; gap: 10px; align-items: flex-start; line-height: 1.35; }
.lead-col li svg { color: var(--ok); flex: none; margin-top: 3px; }

/* ---------- Markets ---------- */
.markets-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 820px) { .markets-grid { grid-template-columns: 1fr; } }
.market { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 40px 36px; position: relative; overflow: hidden; background: var(--panel); }
.market .tag { font-size: 15px; font-weight: 600; display: inline-flex; gap: 8px; white-space: nowrap; }
.market h3 { font-size: 27px; margin: 18px 0 14px; max-width: 16ch; }
.market p { color: var(--ink-2); font-size: 15.5px; }
.market .seal { position: absolute; top: 0; right: 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--accent-text); background: var(--accent-soft); padding: 6px 14px; border-bottom-left-radius: var(--r); text-transform: uppercase; white-space: nowrap; }

/* ---------- Speed ---------- */
.speed-sec { text-align: center; background: var(--accent); color: var(--accent-ink); }
.speed-sec .big { font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(80px, 17vw, 220px); line-height: 0.86; letter-spacing: -0.04em; font-style: normal; }
.speed-sec .t { font-size: clamp(19px, 2.4vw, 26px); max-width: 24ch; margin: 28px auto 0; line-height: 1.35; }
.speed-sec .d { color: color-mix(in srgb, var(--accent-ink) 70%, transparent); margin-top: 14px; font-size: 15px; }

/* ---------- Closing ---------- */
.close-sec { text-align: center; }
.close-sec h2 { font-size: clamp(48px, 9vw, 120px); }
.close-sec h2 .em { font-style: var(--display-italic); color: var(--accent-text); }
.close-sec p { font-size: 19px; color: var(--ink-2); margin: 22px auto 34px; max-width: 34ch; }
.close-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 64px 0 48px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer .tag { color: var(--ink-2); font-size: 14.5px; margin-top: 16px; max-width: 30ch; }
.footer h5, .footer .fh { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 16px; font-weight: 500; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer ul a { font-size: 14.5px; color: var(--ink); opacity: 0.8; }
.footer ul a:hover { opacity: 1; color: var(--accent-text); }
.footer-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--ink-2); }

/* reveal on scroll — base state is the VISIBLE end state; entrance only enhances */
.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .reveal.in { animation: reveal-in .7s cubic-bezier(.2,.7,.2,1); }
}
@keyframes reveal-in { from { transform: translateY(24px); } }

/* light-mode: a subtle darker ring on the solid lime fill */
[data-mode="light"] .btn-primary { border-color: var(--accent-edge); }
/* ---------- Docs page (Use com IA / MCP) ---------- */
.nav-links a.on { color: var(--ink); }

.doc-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 44px); }
.doc-hero h1 { font-size: clamp(36px, 5.2vw, 62px); margin-top: 18px; max-width: 17ch; }
.doc-hero h1 .em { font-style: var(--display-italic); color: var(--accent-text); }
.doc-hero .lede { font-size: clamp(17px, 1.8vw, 20px); color: var(--ink-2); max-width: 54ch; margin-top: 20px; line-height: 1.5; }
.doc-hero .meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

/* Signature: the conversation, with tool calls as tags */
.chat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-top: 34px; max-width: 860px; box-shadow: 0 40px 80px -50px rgba(0,0,0,.5), 0 2px 0 var(--line-2); }
[data-mode="dark"] .chat { box-shadow: 0 40px 90px -40px #000, 0 0 0 1px var(--line); }
.chat-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; color: var(--ink-2); }
.chat-bar .mock-dots { margin-right: 6px; }
.chat-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 82%; padding: 11px 15px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; font-weight: 500; }
[data-mode="light"] .msg.me { box-shadow: inset 0 0 0 1px var(--accent-edge); }
.msg.ai { align-self: flex-start; background: var(--bg-2); color: var(--ink); border: 1px solid var(--line-2); border-bottom-left-radius: 4px; }
.tool { align-self: flex-start; max-width: 100%; font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); display: inline-flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; padding: 4px 11px 4px 8px; border: 1px dashed var(--line); border-radius: 100px; }
.tool i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); display: inline-block; flex: none; }
.tool.spend { border-style: solid; border-color: var(--accent-text); color: var(--accent-text); }
.tool.spend i { background: var(--accent-text); }
.tool .arg { color: var(--ink-3); }

/* Reading layout: sticky contents + 760px column */
.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; align-items: start; padding: 8px 0 clamp(64px, 9vw, 120px); }
@media (max-width: 980px) { .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.toc { position: sticky; top: 92px; font-size: 14px; }
.toc .toc-h { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 14px; font-weight: 500; }
.toc ol { list-style: none; display: flex; flex-direction: column; gap: 9px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 2px 0 2px 14px; color: var(--ink-2); border-left: 2px solid transparent; margin-left: -1px; transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--ink); border-left-color: var(--ink-2); }
@media (max-width: 980px) {
  .toc { position: static; }
  .toc ol { flex-direction: row; flex-wrap: wrap; gap: 6px 18px; border: 0; }
  .toc a { padding: 0; border: 0; margin: 0; }
}
.doc { max-width: 760px; min-width: 0; }
.doc section { padding: 40px 0; border-top: 1px solid var(--line-2); }
.doc section:first-of-type { border-top: 0; padding-top: 0; }
.doc h2 { font-size: clamp(26px, 3vw, 34px); margin: 10px 0 18px; }
.doc h3 { font-size: 19px; margin: 26px 0 10px; }
.doc p, .doc li { color: var(--ink-2); font-size: 16px; }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc code { font-family: var(--font-mono); font-size: .92em; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; color: var(--ink); }
.doc a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent-text) 40%, transparent); }
.doc a:hover { text-decoration-color: var(--accent-text); }

/* Setup steps — a real sequence, so the numbers carry information */
.dsteps { display: flex; flex-direction: column; gap: 30px; margin-top: 8px; }
.dstep { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; }
.dstep .num { font-family: var(--font-mono); font-size: 13px; color: var(--accent-text); padding-top: 5px; }
.dstep > div { min-width: 0; } /* let <pre> scroll inside the column instead of widening it */
.dstep h3 { margin-top: 0; }
@media (max-width: 520px) { .dstep { grid-template-columns: minmax(0, 1fr); gap: 6px; } }

/* Code blocks */
.code { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 14px 0; }
.code-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--line-2); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; color: var(--ink-2); }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-family: var(--font-mono); font-size: 13px; line-height: 1.55; color: var(--ink); }
.copy { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer; transition: color .2s, border-color .2s; }
.copy:hover { color: var(--ink); border-color: var(--ink-2); }
.copy:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.copy.done { color: var(--ok); border-color: var(--ok); }

/* Notes */
.note { border-left: 3px solid var(--accent-text); background: var(--accent-soft); padding: 12px 16px; border-radius: 0 var(--r) var(--r) 0; margin: 16px 0; font-size: 15px; color: var(--ink); }
.note.quiet { border-left-color: var(--ink-2); background: var(--bg-2); color: var(--ink-2); }

/* Flow (estimate → confirm → run) */
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 18px 0 6px; }
@media (max-width: 640px) { .flow { grid-template-columns: 1fr; } }
.flow .f { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.flow .f .k { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }
.flow .f h4 { font-size: 17px; margin: 10px 0 6px; }
.flow .f p { font-size: 14.5px; }
.flow .f.spend { border-color: var(--accent-text); }

/* Tools table — the one row that spends is the exception, so it is the only colored row */
.tools { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14.5px; }
.tools th { text-align: left; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; padding: 0 12px 10px 0; border-bottom: 1px solid var(--line); }
.tools td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; color: var(--ink-2); }
.tools td:first-child { font-family: var(--font-mono); font-size: 13px; color: var(--ink); white-space: nowrap; }
.tools tr.spend td { background: var(--accent-soft); color: var(--ink); }
.tools tr.spend td:first-child { padding-left: 10px; border-radius: 8px 0 0 8px; }
.tools tr.spend td:last-child { border-radius: 0 8px 8px 0; }
.tools .yes { color: var(--accent-text); font-weight: 600; white-space: nowrap; }
.tools .no { color: var(--ink-3); white-space: nowrap; }
@media (max-width: 640px) {
  .tools thead { display: none; }
  .tools tr { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
  .tools td { border: 0; padding: 0; }
  .tools tr.spend { background: var(--accent-soft); border-radius: 8px; padding: 12px; }
  .tools tr.spend td { background: transparent; }
}

/* Prompts */
.prompts { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
@media (max-width: 640px) { .prompts { grid-template-columns: 1fr; } }
.prompts li { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r); padding: 12px 14px; font-size: 15px; color: var(--ink); }
.prompts li::before { content: "“"; color: var(--accent-text); font-family: var(--font-display); }
.prompts li::after { content: "”"; color: var(--accent-text); font-family: var(--font-display); }

/* Errors */
.errs { list-style: none; padding: 0; margin-top: 8px; }
.errs li { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.errs li code { justify-self: start; }
@media (max-width: 640px) { .errs li { grid-template-columns: 1fr; gap: 6px; } }

.doc-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }

/* ---------- Content pages (guides, product, pricing) ---------- */
.crumbs { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--ink-2); }
.crumbs a:hover { color: var(--accent-text); }
.crumbs span[aria-hidden] { color: var(--ink-2); }
.doc-hero .byline { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); margin-top: 18px; letter-spacing: .03em; }

/* Answer-first summary — the block search engines and assistants quote */
.answer { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent-text); border-radius: 0 var(--r) var(--r) 0; padding: 18px 22px; margin: 0 0 8px; }
.answer .k { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.answer p { color: var(--ink) !important; font-size: 16.5px !important; margin-top: 8px; line-height: 1.55; }
.answer ul { margin: 10px 0 0; }
.answer li { color: var(--ink) !important; }

/* Data tables */
.dtable-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: var(--r); }
.dtable { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 520px; }
.dtable th { text-align: left; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; padding: 12px 14px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.dtable td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; color: var(--ink-2); }
.dtable tr:last-child td { border-bottom: 0; }
.dtable td:first-child { color: var(--ink); font-weight: 500; }
.dtable .hl td { background: var(--accent-soft); color: var(--ink); }

/* Numbered how-to steps reuse .dsteps/.dstep; checklists */
.checks { list-style: none; padding-left: 0 !important; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 12px; height: 7px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }

/* Inline product CTA inside a guide */
.cta-band { margin: 28px 0 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 26px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; align-items: center; }
.cta-band h3 { margin: 0 0 6px !important; font-size: 20px; }
.cta-band p { font-size: 15px !important; margin: 0 !important; }
@media (max-width: 640px) { .cta-band { grid-template-columns: 1fr; } }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 0 18px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 28px 16px 0; font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 13px; font-size: 22px; color: var(--accent-text); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 18px; }
.faq summary:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; border-radius: 6px; }

/* Related reading */
.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.related a { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; text-decoration: none !important; transition: border-color .2s, transform .2s; }
.related a:hover { border-color: var(--accent-text); transform: translateY(-2px); }
.related .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }
.related b { display: block; color: var(--ink); font-family: var(--font-display); font-size: 17px; margin-top: 8px; line-height: 1.25; }
.related span.d { display: block; color: var(--ink-2); font-size: 14px; margin-top: 6px; line-height: 1.4; }

/* Hub + pricing grids */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; padding-bottom: clamp(64px, 9vw, 120px); }
.hub-grid .related { display: contents; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 18px 0; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 24px; display: flex; flex-direction: column; gap: 10px; }
.plan.feat { border-color: var(--accent-text); }
.plan .nm { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.plan .pr { font-family: var(--font-display); font-size: 40px; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); line-height: 1; }
.plan .pr small { font-size: 15px; color: var(--ink-2); font-weight: 500; letter-spacing: 0; }
.plan ul { padding-left: 0 !important; }
.plan .btn { justify-content: center; margin-top: auto; text-decoration: none !important; color: inherit; }
.plan .btn-primary { color: var(--accent-ink) !important; }
.doc .btn { text-decoration: none; }
.doc .btn-primary { color: var(--accent-ink); }
.doc .btn-ghost { color: var(--ink); }

/* 404 */
.nf { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.nf h1 { font-size: clamp(64px, 12vw, 140px); color: var(--accent-text); }
.footer-grid.f4 { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
@media (max-width: 860px) { .footer-grid.f4 { grid-template-columns: 1fr 1fr; } }
