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

:root {
  --bg: #f7f6f2; --band: #efede6; --surface: #ffffff; --ink: #16181d; --muted: #5c626c; --line: #dcd9d0; --line-strong: #16181d;
  --accent: #1e6b50; --btn: #16181d; --btn-ink: #f7f6f2;
  --pass: #1e7a55; --warn: #a86a00; --drop: #b3361f;
  --log-bg: #16181d; --log-ink: #e9e7e1; --log-dim: #8d939c; --log-line: #2a2e35;
  --log-pass: #6fcf9f; --log-warn: #f0b44c; --log-drop: #f27d68; --log-kw: #c9a7f5;
  --sans: "Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317; --band: #171a1f; --surface: #1b1e24; --ink: #e9e7e1; --muted: #9ba1aa; --line: #2c3038; --line-strong: #e9e7e1;
    --accent: #6fcf9f; --btn: #e9e7e1; --btn-ink: #111317;
    --pass: #6fcf9f; --warn: #f0b44c; --drop: #f27d68;
    --log-bg: #0b0c0f; color-scheme: dark;
  }
}

/* Base */
* { box-sizing: border-box; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
[id] { scroll-margin-top: 76px; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); letter-spacing: -.028em; max-width: 26ch; }
h2 { font-size: clamp(1.45rem, 2.4vw, 1.8rem); letter-spacing: -.015em; margin-bottom: .9em; max-width: 30ch; }
h3 { font-size: 1.05rem; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
p, li { text-wrap: pretty; }
code, pre { font-family: var(--mono); }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.muted { color: var(--muted); }
.fine { font-size: .875rem; color: var(--muted); margin: 0; }
.sub { color: var(--muted); font-size: 1.05rem; max-width: 60ch; margin-top: -.4em; margin-bottom: 2em; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 20; padding: 8px 12px; border-radius: 6px; background: var(--btn); color: var(--btn-ink); }
.skip:focus { top: 12px; }

/* Header */
.topbar { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.logo img { border-radius: 6px; }
.nav nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; font-size: .93rem; }
.nav nav a:not(.btn) { color: var(--muted); text-decoration: none; }
.nav nav a:not(.btn):hover { color: var(--ink); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--btn); border-radius: 6px; padding: 11px 18px;
  background: var(--btn); color: var(--btn-ink); font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; transition: opacity .15s; }
.btn:hover { opacity: .86; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.small { padding: 6px 12px; font-size: .9rem; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); opacity: 1; }
.code-btn { display: inline-flex; align-items: center; gap: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.code-btn:hover { border-color: var(--muted); }
.code-btn code { font-size: .92rem; }
.prompt { color: var(--muted); user-select: none; }
.copy-label { font: 500 .72rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, .code-btn:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px 48px; align-items: start; padding-top: 72px; padding-bottom: 80px; }
.hero-head { grid-column: 1 / -1; }
.hero-head h1 { margin: 0; }
.kicker { font: 500 .8rem var(--mono); color: var(--muted); margin-bottom: 18px; }
.kicker::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--accent); margin-right: 10px; vertical-align: 1px; }
.tag { font: 500 .78rem var(--mono); color: var(--muted); margin-bottom: 12px; }
.tag::before { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--accent); margin-right: 9px; vertical-align: 1px; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 14px; }

/* Dark panels: retrieval trace and code */
.log, .code-panel { background: var(--log-bg); color: var(--log-ink); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.log-bar { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; font: 500 .72rem var(--mono); text-transform: uppercase;
  letter-spacing: .08em; color: var(--log-dim); border-bottom: 1px solid var(--log-line); }
.log pre, .code-panel pre { margin: 0; padding: 18px 16px 20px; overflow-x: auto; font-size: .86rem; line-height: 1.75; }
.code-panel pre { font-size: .82rem; }
.log .dim { color: var(--log-dim); }
.log .pass { color: var(--log-pass); } .log .warn { color: var(--log-warn); } .log .drop { color: var(--log-drop); }
.code-panel .kw { color: var(--log-kw); } .code-panel .str { color: var(--log-pass); } .code-panel .num { color: var(--log-warn); }
.code-panel .com { color: var(--log-dim); font-style: italic; }
.pass { color: var(--pass); } .warn { color: var(--warn); } .drop { color: var(--drop); }

/* Sections */
.section { padding-top: 72px; padding-bottom: 72px; border-top: 1px solid var(--line); }
.band .section { border-top: 0; }

/* Ruled columns: threats, steps, stats */
.ruled { display: grid; border-top: 2px solid var(--line-strong); }
.ruled.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ruled.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ruled > * { padding: 20px 24px 4px; border-left: 1px solid var(--line); }
.ruled > :first-child { border-left: 0; padding-left: 0; }
.ruled > :last-child { padding-right: 0; }
.ruled p { color: var(--muted); font-size: .95rem; margin-bottom: .8em; }
.ruled .result { color: var(--ink); }
.ruled .result strong { display: block; font-weight: 600; }

/* Delta-scoring example */
.diff { margin: 44px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.diff .log-bar { color: var(--muted); border-bottom-color: var(--line); }
.diff-body { padding: 18px 20px 8px; font-size: .95rem; }
.diff-body p { margin: 0 0 10px; }
.diff .ctx { color: var(--muted); padding-left: 22px; }
.diff .add { position: relative; padding: 7px 12px 7px 22px; margin-left: -12px; margin-right: -12px; border-radius: 4px;
  background: color-mix(in srgb, var(--warn) 12%, transparent); border-left: 2px solid var(--warn); }
.diff .sign { position: absolute; left: 9px; font-family: var(--mono); color: var(--warn); }
.diff-scores { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.diff-scores > div { padding: 12px 20px; border-left: 1px solid var(--line); }
.diff-scores > div:first-child { border-left: 0; }
.diff-scores dt { font: 500 .7rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.diff-scores dd { margin: 0; font-size: .92rem; font-variant-numeric: tabular-nums; }
.diff-scores b { font-weight: 600; }

/* Code sample */
.code-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.code-grid .list { margin-top: 0; }

/* Lists */
.list { padding: 0; list-style: none; margin: 0 0 1.2em; }
.list li { padding: 5px 0 5px 20px; position: relative; }
.list li::before { content: ""; position: absolute; left: 2px; top: .95em; width: 8px; height: 1.5px; background: var(--accent); }

/* Results */
.stats > div { padding-bottom: 8px; }
.stats .big { font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 600; letter-spacing: -.03em; line-height: 1; margin: 6px 0 12px;
  color: var(--ink); font-variant-numeric: tabular-nums; }
.stats .big span { font-size: .45em; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.stats .base { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); font: .82rem var(--mono); color: var(--muted); }
.stats .base span { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 2px; }
.stats > div { display: flex; flex-direction: column; }
.note { margin-top: 28px; max-width: 72ch; }

/* Design-partner band */
.band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 64px; align-items: start; }
.partner-copy { position: sticky; top: 96px; }
.partner-copy .sub { margin-top: 0; margin-bottom: 1.4em; }
.partner-copy > p.muted { font-size: .95rem; max-width: 52ch; }
.call-cta { margin-top: 8px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 28px; }

/* Form */
.form .row { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { margin-bottom: 16px; }
label { display: block; font-weight: 500; font-size: .88rem; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--muted); }
input, select, textarea { width: 100%; font: inherit; font-size: .95rem; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--ink); }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
::placeholder { color: var(--muted); opacity: .75; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .92rem; margin: 10px 0; }
.check input { width: auto; margin-top: 5px; accent-color: var(--accent); }
.cf-turnstile { margin: 18px 0; min-height: 65px; }
.form .btn { width: 100%; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.msg { min-height: 1.4em; margin: 10px 0 0; font-size: .9rem; }
.msg:empty { min-height: 0; margin: 0; }
.msg.error { color: var(--drop); }

/* Pricing cards */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.plan h3 { font-size: 1rem; color: var(--muted); font-weight: 500; margin-bottom: .3em; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan.featured h3 { color: var(--accent); }
.price { font-size: 2rem; font-weight: 600; letter-spacing: -.02em; margin: 0 0 .5em; }
.price span { font-size: .95rem; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.plan .list { font-size: .94rem; margin-bottom: 12px; }

/* FAQ */
.faq-list { max-width: 820px; }
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); margin: 10px 0 0; max-width: 68ch; }

/* Footer */
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 28px; padding-bottom: 48px; color: var(--muted);
  border-top: 1px solid var(--line); font-size: .88rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--ink); }

/* Privacy and 404 pages */
.prose { max-width: 720px; padding-top: 56px; padding-bottom: 56px; }
.prose h2 { font-size: 1.15rem; margin-top: 2em; margin-bottom: .5em; }
.prose li { margin-bottom: .5em; }
.notfound { max-width: 640px; padding-top: 96px; padding-bottom: 120px; }
.notfound .log { margin: 28px 0; }

@media (prefers-color-scheme: dark) {
  .logo img { outline: 1px solid #3a3f47; outline-offset: -1px; }
}

@media (max-width: 900px) {
  .hero, .two, .code-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero { padding-top: 48px; padding-bottom: 56px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .partner-copy { position: static; }
  .ruled.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ruled.four > :nth-child(3) { border-left: 0; padding-left: 0; }
  .ruled.four > :nth-child(2) { padding-right: 0; }
  .ruled.four > :nth-child(n+3) { border-top: 1px solid var(--line); }
  .plans { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
}
@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .nav { padding: 10px 0; }
  .nav nav { gap: 14px; }
  .nav nav a:not(.btn) { display: none; }
  .ruled.three, .ruled.four { grid-template-columns: minmax(0, 1fr); }
  .ruled > *, .ruled.four > * { border-left: 0; padding: 18px 0 6px; border-top: 1px solid var(--line); }
  .ruled > :first-child, .ruled.four > :first-child { border-top: 0; }
  .diff-scores { grid-template-columns: minmax(0, 1fr); }
  .diff-scores > div { border-left: 0; border-top: 1px solid var(--line); }
  .diff-scores > div:first-child { border-top: 0; }
  .form .row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cta .btn, .cta .code-btn { width: 100%; justify-content: center; }
  .panel { padding: 20px; }
  .log pre { font-size: .68rem; padding: 14px 12px 16px; }
  .code-panel pre { font-size: .7rem; padding: 14px 12px 16px; }
  .log-bar { padding: 9px 12px; }
}
