/* =========================================================================
   OpenLeads site — the landing page and the shared base for /docs.
   Same system as the local dashboard: ink on paper, one typeface
   (Atkinson Hyperlegible, self-hosted), color only where it means state, and
   one signature — the evidence mark (■ found, ◩ pattern, □ guessed).
   No external fonts, icons or scripts.
   ========================================================================= */

@font-face {
  font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(fonts/atkinson-next-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(fonts/atkinson-next-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(fonts/atkinson-mono-latin.woff2) format("woff2");
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #f7f7f8;          /* the rail: code, table heads, docs sidebar */
  --surface: #ffffff;
  --surface-2: #f7f7f8;
  --wash: #eff0f2;
  --line: #e9eaed;
  --line-2: #dcdee2;
  --line-strong: #c3c7cd;
  --text: #15171c;
  --muted: #5b606a;
  --faint: #8c919b;
  --ink: #15171c;           /* solid buttons */
  --on-ink: #ffffff;
  --accent: #2f5ad3;        /* links, focus */
  --accent-wash: #eef2fd;
  --good: #23964f;
  --warn: #d48a0b;
  --bad: #d4382c;
  --code-bg: #f7f7f8;
  /* aliases the docs stylesheet still uses */
  --red: var(--accent); --red-wash: var(--accent-wash); --red-on-ink: #ffffff;

  --body: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: var(--body);
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --nav-h: 60px;
  --wrap: 1120px;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ring: 0 0 0 3px rgba(47, 90, 211, .3);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #131418; --bg-2: #17181d; --surface: #131418; --surface-2: #17181d; --wash: #202128;
    --line: #25272d; --line-2: #2f3138; --line-strong: #464952;
    --text: #e8e9ed; --muted: #a2a6af; --faint: #737882;
    --ink: #e8e9ed; --on-ink: #131418;
    --accent: #8da6f6; --accent-wash: #1b2241;
    --good: #33a865; --warn: #cf8f22; --bad: #de4c3f;
    --code-bg: #17181d; --red-on-ink: #131418;
    --ring: 0 0 0 3px rgba(141, 166, 246, .35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131418; --bg-2: #17181d; --surface: #131418; --surface-2: #17181d; --wash: #202128;
  --line: #25272d; --line-2: #2f3138; --line-strong: #464952;
  --text: #e8e9ed; --muted: #a2a6af; --faint: #737882;
  --ink: #e8e9ed; --on-ink: #131418;
  --accent: #8da6f6; --accent-wash: #1b2241;
  --good: #33a865; --warn: #cf8f22; --bad: #de4c3f;
  --code-bg: #17181d; --red-on-ink: #131418;
  --ring: 0 0 0 3px rgba(141, 166, 246, .35);
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p a, li a, dd a, td a, .link { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
p a:hover, li a:hover, dd a:hover, td a:hover, .link:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-weight: 650; }
code, kbd { font-family: var(--mono); font-size: .88em; }
:not(pre) > code { background: var(--wash); padding: .08em .35em; border-radius: 4px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
::selection { background: var(--accent-wash); color: var(--text); }
.container { width: 100%; max-width: var(--wrap); margin: 0 auto;
  padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------- evidence */
.ev { display: inline-block; width: 11px; height: 11px; flex: none; border-radius: 2px;
      border: 1.75px solid currentColor; color: var(--faint); vertical-align: -1px; }
.ev--found { background: currentColor; }
.ev--pattern { background: linear-gradient(135deg, currentColor 0 50%, transparent 50% 100%); }
.ev--guessed { background: transparent; }
.ev--none { border-style: dashed; border-color: var(--line-strong); }
.ev--safe { color: var(--good); }
.ev--risky { color: var(--warn); }
.ev--bad { color: var(--bad); }

/* ------------------------------------------------------------------ nav */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; height: var(--nav-h);
  display: flex; align-items: center; gap: 28px; padding: 0 max(32px, calc((100vw - var(--wrap)) / 2 + 32px));
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); }
.brand__mark { width: 20px; height: 20px; border-radius: 5px; background: var(--text); position: relative; flex: none; }
.brand__mark::after { content: ""; position: absolute; inset: 5px; border-radius: 1.5px; background: var(--bg);
  clip-path: polygon(0 0, 100% 0, 0 100%); }
.brand__name { font-size: 17px; font-weight: 650; letter-spacing: -.005em; }
.nav__links { display: flex; gap: 24px; font-size: 15px; }
.nav__links a { color: var(--muted); text-decoration: none; }
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__cta { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.gh-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 7px;
  border: 1px solid var(--line-2); color: var(--text); text-decoration: none; font-size: 14.5px; font-weight: 550; }
.gh-btn:hover { border-color: var(--line-strong); }
.gh-mark { width: 16px; height: 16px; fill: currentColor; }
.gh-btn__count { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; padding-left: 9px; border-left: 1px solid var(--line-2); }
.solid-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 7px;
  background: var(--ink); color: var(--on-ink); text-decoration: none; font-size: 14.5px; font-weight: 600; border: 0; cursor: pointer; }
.solid-btn:hover { opacity: .9; }

/* ----------------------------------------------------------------- hero */
.hero { padding: 88px 0 72px; }
.hero h1 { font-size: clamp(40px, 6.2vw, 74px); line-height: 1.03; letter-spacing: -.025em; font-weight: 650; }
.hero__sub { margin-top: 24px; font-size: 20px; line-height: 1.55; color: var(--muted); max-width: 58ch; }
.install { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.cmd { display: inline-flex; align-items: center; gap: 14px; height: 50px; padding: 0 8px 0 18px; border-radius: 9px;
  background: var(--ink); color: var(--on-ink); border: 0; cursor: pointer; font-size: 16px; }
.cmd code { font-size: 15.5px; background: none; padding: 0; color: inherit; }
.cmd__prompt { opacity: .55; font-family: var(--mono); font-size: 15px; }
.cmd__hint { font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 6px;
  background: color-mix(in srgb, var(--on-ink) 14%, transparent); }
.cmd.is-copied .cmd__hint { background: var(--good); color: #fff; }
.install__alt { font-size: 15.5px; color: var(--muted); }

/* the example result */
.result { margin: 64px 0 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.result__query { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 16px 22px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 15px; background: var(--bg-2); }
.result__prompt { color: var(--faint); }
.result__q { color: var(--text); }
.result__q::after { content: ""; display: inline-block; width: 8px; height: 1.1em; margin-left: 2px; vertical-align: -2px;
  background: var(--text); opacity: 0; }
.is-typing .result__q::after { opacity: 1; animation: caret .9s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.result__meta { margin-left: auto; color: var(--faint); font-family: var(--body); font-size: 14px; }
.result table { width: 100%; border-collapse: collapse; font-size: 15px; }
.result td { padding: 12px 22px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.result tr:last-child td { border-bottom: 0; }
.result td:first-child { width: 1%; padding-right: 0; }
.result .who b { font-weight: 600; }
.result .who span { color: var(--muted); }
.result .org { color: var(--muted); }
.result .addr { font-variant-numeric: tabular-nums; }
.result .how { color: var(--muted); text-align: right; width: 1%; }
.result tr { transition: opacity .35s var(--ease-out), transform .35s var(--ease-out); }
.is-staged .result tbody tr { opacity: 0; transform: translateY(4px); }
.is-staged .result tbody tr.is-in { opacity: 1; transform: none; }
.result__foot { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--muted); background: var(--bg-2); }
.result__foot span { display: inline-flex; align-items: center; gap: 8px; }
.result__foot .note { margin-left: auto; color: var(--faint); }

/* -------------------------------------------------------------- sections */
.section { padding: 96px 0; border-top: 1px solid var(--line); }
.section__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px 56px; align-items: start; }
.section h2 { text-wrap: balance; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -.018em; max-width: 16ch; }
.section__lead { font-size: 18.5px; color: var(--muted); max-width: 60ch; }
.section__lead + .section__lead { margin-top: 14px; }
.section__body > * + * { margin-top: 28px; }

/* labels */
.marks { display: grid; gap: 0; border-top: 1px solid var(--line); }
.mark-row { display: grid; grid-template-columns: 28px 104px minmax(0, 1fr); gap: 0 14px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.mark-row .ev { width: 14px; height: 14px; border-width: 2px; align-self: center; }
.mark-row b { font-weight: 650; font-size: 18px; }
.mark-row p { color: var(--muted); }
.tiers { display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 16px; color: var(--muted); }
.tiers span { display: inline-flex; align-items: center; gap: 9px; }
.tiers b { color: var(--text); font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot--safe { background: var(--good); } .dot--risky { background: var(--warn); } .dot--bad { background: var(--bad); }
.checks { columns: 2; column-gap: 40px; padding: 0; margin: 0; list-style: none; font-size: 16px; }
.checks li { break-inside: avoid; padding: 8px 0; border-top: 1px solid var(--line); }
.checks li span { display: block; color: var(--muted); font-size: 15px; }

/* benchmark */
.bench { width: 100%; border-collapse: collapse; font-size: 15.5px; font-variant-numeric: tabular-nums; }
.bench th { text-align: left; font-weight: 500; color: var(--faint); font-size: 14px; padding: 0 12px 10px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.bench td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.bench .n { text-align: right; width: 1%; white-space: nowrap; color: var(--muted); }
.bench th.n { text-align: right; }
.bench .q { white-space: nowrap; }
.strip { display: inline-flex; gap: 3px; vertical-align: middle; }
.strip .ev { width: 12px; height: 12px; color: var(--text); }
.strip .ev--none { color: var(--line-strong); border-width: 1.25px; }
.bench tr.is-empty .q { color: var(--muted); }
.bench__sum { font-size: 16px; color: var(--muted); max-width: 64ch; }
.bench__sum b { color: var(--text); font-weight: 650; }

/* workspace */
.shot { margin: 0; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.shot img { width: 100%; height: auto; }
.shot-cap { margin-top: 12px; font-size: 14px; color: var(--faint); }
.caps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; margin: 56px 0 0; }
.caps > div { padding: 18px 0 22px; border-top: 1px solid var(--line); }
.caps dt { font-weight: 650; font-size: 17px; margin-bottom: 6px; }
.caps dd { margin: 0; color: var(--muted); font-size: 16px; }

/* ways to run it */
#run h2 { max-width: 22ch; }
.ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 40px; margin-top: 48px; }
.way { display: flex; flex-direction: column; min-width: 0; }
.way pre.code { margin-top: auto; }
.way h3 { font-size: 18px; margin-bottom: 4px; }
.way p { color: var(--muted); font-size: 16px; margin-bottom: 14px; }
pre.code { margin: 0; padding: 14px 16px; border-radius: 10px; background: var(--code-bg); border: 1px solid var(--line);
  font: 14px/1.7 var(--mono); overflow-x: auto; color: var(--text); }
pre.code .c { color: var(--faint); }

/* compare */
.compare { width: 100%; border-collapse: collapse; font-size: 16px; }
.compare th, .compare td { text-align: left; padding: 13px 16px 13px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-weight: 600; font-size: 15px; border-bottom-color: var(--line-2); }
.compare tbody th { font-weight: 500; color: var(--muted); width: 26%; }
.compare td.us { font-weight: 550; }
.compare td.them { color: var(--muted); }

/* faq */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 32px 18px 0; font-size: 18px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 26px; width: 9px; height: 9px;
  border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 30px; }
.faq details p { padding: 0 0 20px; color: var(--muted); max-width: 66ch; }

/* close */
.close { padding: 104px 0 112px; border-top: 1px solid var(--line); }
.close h2 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.06; letter-spacing: -.022em; max-width: 18ch; }
.close .install { margin-top: 28px; }

/* ---------------------------------------------------------------- footer */
.footer { border-top: 1px solid var(--line); padding: 48px 0 40px; font-size: 15px; color: var(--muted); }
.footer__inner { display: flex; flex-wrap: wrap; gap: 32px 64px; justify-content: space-between; }
.footer__brand p { margin-top: 10px; max-width: 34ch; }
.footer__cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer__cols h4 { font-size: 14px; color: var(--text); font-weight: 600; margin: 0 0 10px; }
.footer__cols a { display: block; text-decoration: none; padding: 3px 0; }
.footer__cols a:hover { color: var(--text); }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 40px; padding-top: 20px;
  border-top: 1px solid var(--line); font-size: 14px; color: var(--faint); }
.footer__legal a { color: inherit; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--on-ink); padding: 10px 16px; border-radius: 8px; font-size: 15px; transition: opacity .2s, transform .2s; z-index: 50; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 960px) {
  .section__grid { grid-template-columns: minmax(0, 1fr); }
  .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result td.org, .result th.org { display: none; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .container { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .nav { padding: 0 16px; gap: 16px; }
  .nav__links { display: none; }
  .hero { padding: 48px 0 48px; }
  .hero__sub { font-size: 17.5px; }
  .cmd { height: 46px; padding-left: 14px; max-width: 100%; }
  .cmd code { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .result { margin-top: 40px; }
  .result__query, .result td, .result__foot { padding-left: 14px; padding-right: 14px; }
  .result td { white-space: normal; }
  .result .who span, .result .how { display: none; }
  .result .addr { word-break: break-all; font-size: 14px; }
  .result__foot .note { margin-left: 0; }
  .section { padding: 64px 0; }
  .mark-row { grid-template-columns: 24px minmax(0, 1fr); }
  .mark-row p { grid-column: 2; }
  .checks { columns: 1; }
  .caps, .ways { grid-template-columns: minmax(0, 1fr); }
  .bench td:nth-child(n+4), .bench th:nth-child(n+4) { display: none; }
  .strip { gap: 2px; }
  .strip .ev { width: 10px; height: 10px; }
  .bench .q { white-space: normal; }
  .compare { font-size: 15px; }
  .compare tbody th { width: 30%; }
  .close { padding: 72px 0 80px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
