@import "/fonts.css";

/* Design tokens, from the 2026-09 redesign: warm paper page, night-blue bands. */
:root {
  --paper: #f7f6f3; --panel: #fff; --ink: #14161c; --muted: #5a6070;
  --hair: #e2e0da; --hair-soft: #efede8;
  --brand: #2e37b8; --brand-hover: #3a45da; --brand-deep: #1f2690;
  --brand-tint: #eef0ff; --brand-tint-line: #d3d8fa; --brand-tint-row: #f7f8ff;
  --valid: #0e7c55; --valid-bg: #e4f3ec;
  --invalid: #b42318; --invalid-bg: #fbe3e0;
  --night: #0c0e14; --night-panel: #15181f; --night-ink: #f2f3f5; --night-muted: #a8aebc;
  --night-dim: #a0a6b4; --night-text: #c7ccd8; --night-faint: #7c8394; --night-note: #8b92a2;
  --night-fine: #6b7280; --night-line: rgba(255, 255, 255, .1); --night-link: #9aa3ff; --night-focus: #6e7bff;
  --sans: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --page: 1180px; --gutter: 32px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-deep); text-decoration: underline; }
strong, b { font-weight: 600; }
img, svg { max-width: 100%; }
input, button { font: inherit; }
:focus-visible { outline: 2.5px solid var(--night-focus); outline-offset: 2px; border-radius: 3px; }
code { font: 400 .92em var(--mono); background: var(--hair-soft); padding: 1px 5px; border-radius: 4px; }
pre code { background: none; padding: 0; }

.wrap { max-width: var(--page); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.read { max-width: 40em; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }

/* ---- night surfaces (banner, nav, heroes, sign-up, footer) ---- */
.night, .banner, .nav, .hero, .page-hero, .signup-band, footer.site { background: var(--night); color: var(--night-ink); }
.night a, .banner a, .signup-band a, footer.site .fine a { color: var(--night-link); }

.banner { color: var(--night-dim); font-size: 13px; line-height: 1.5; padding: 9px 24px; text-align: center; border-bottom: 1px solid var(--night-line); }
.banner strong { color: var(--night-ink); }

.nav { position: sticky; top: 0; z-index: 20; background: rgba(12, 14, 20, .86); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.nav .row { display: flex; align-items: center; gap: 36px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -.01em; color: var(--night-ink); text-decoration: none; }
.brand:hover { color: #fff; text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.nav nav { display: flex; align-items: center; gap: 26px; margin-left: auto; font-size: 14.5px; flex-wrap: wrap; }
.nav nav a { color: var(--night-dim); }
.nav nav a:hover, .nav nav a[aria-current="page"] { color: var(--night-ink); text-decoration: none; }
.nav nav a.btn { background: var(--night-ink); color: var(--night); padding: 9px 16px; border-radius: 8px; font-size: 14.5px; }
.nav nav a.btn:hover { background: #fff; }

/* ---- buttons ---- */
.btn { display: inline-block; background: var(--brand); color: #fff; font-weight: 600; font-size: 16px; line-height: 1.2; padding: 14px 24px; border: 0; border-radius: 10px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--brand-hover); color: #fff; text-decoration: none; }
.btn.outline { background: transparent; color: var(--ink); border: 1px solid var(--ink); padding: 13px 22px; }
.btn.outline:hover { background: var(--ink); color: #fff; }
.btn.pale { background: var(--night-ink); color: var(--night); }
.btn.pale:hover { background: #fff; color: var(--night); }

/* ---- type ---- */
h1, h2, h3, p, dl, dd, dt, figure { margin: 0; }
h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1.03; letter-spacing: -.03em; font-weight: 600; text-wrap: balance; }
h2 { font-size: clamp(27px, 3.2vw, 34px); line-height: 1.15; letter-spacing: -.02em; font-weight: 600; }
h3 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
p { margin-top: 14px; }
p:first-child, h2 + p, .lead { margin-top: 14px; }
.lead { font-size: 19px; line-height: 1.55; color: var(--night-muted); max-width: 34em; text-wrap: pretty; }
.eyebrow { display: inline-block; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--night-link); margin-bottom: 22px; }
ul { padding-left: 1.2em; color: var(--muted); }
li { margin: .35em 0; }

/* ---- heroes ---- */
.hero { padding: 88px 0 104px; }
.hero .actions { margin-top: 34px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.hero .actions a:not(.btn) { color: var(--night-text); font-size: 16px; text-decoration: underline; text-underline-offset: 3px; }
.hero .actions a:not(.btn):hover { color: #fff; }
.hero .note { margin-top: 16px; font-size: 14px; color: var(--night-note); }
.page-hero { padding: 72px 0 80px; }
.page-hero .lead { margin-top: 18px; }

/* the live checker card in the home hero */
.checker { background: var(--night-panel); border: 1px solid var(--night-line); border-radius: 16px; padding: 26px; box-shadow: 0 24px 60px rgba(0, 0, 0, .4); }
.checker .head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.checker .label { font: 400 11.5px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--night-faint); }
.verdict { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 999px; white-space: nowrap; background: rgba(255, 255, 255, .07); color: #9aa1b0; }
.verdict::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.verdict.ok { background: rgba(74, 222, 151, .14); color: #4ade97; }
.verdict.bad { background: rgba(255, 138, 122, .14); color: #ff8a7a; }
.checker input { width: 100%; background: var(--night); border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; padding: 16px 18px; color: var(--night-ink); font: 400 clamp(15px, 1.5vw, 19px)/1.3 var(--mono); letter-spacing: .03em; outline: none; }
.checker input:focus { border-color: var(--night-focus); }
.checker .reason { margin-top: 12px; font: 400 13px/1.5 var(--mono); color: #9aa1b0; min-height: 1.5em; }
.checker .reason.ok { color: #4ade97; }
.checker .reason.bad { color: #ff8a7a; }
.checker .segs { margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .08); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.checker .segs b { display: block; font: 400 16px/1.3 var(--mono); color: var(--night-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checker .segs span { display: block; font-size: 12px; color: var(--night-faint); margin-top: 5px; }

/* ---- sections ---- */
main > section { padding-top: 96px; }
main > section:last-child { padding-bottom: 96px; }
main > section > .read + *, main > section > h2 + * { margin-top: 32px; }
main > section p.read, main > section > p { margin-top: 22px; font-size: 16px; }
.read p, .page-hero p:not(.lead):not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.read h2 + p, .read p { text-wrap: pretty; }
.read h2 ~ h2 { margin-top: 48px; }

/* labelled rows */
.rows { border-top: 1px solid var(--hair); }
.rows .row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; padding: 22px 0; border-bottom: 1px solid var(--hair); }
.rows dt { font-weight: 600; font-size: 17px; }
.rows dd { font-size: 17px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }

/* cards */
.card, .grid3 > div, .proof .case, .plan { background: var(--panel); border: 1px solid var(--hair); border-radius: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid3 > div { padding: 26px; }
.grid3 p { margin-top: 12px; font-size: 16px; color: var(--muted); }

/* proof: the mechanism catching a bad digit */
.proof { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.proof .case { padding: 24px; border-left-width: 3px; }
.proof .case.ok { border-left-color: var(--valid); }
.proof .case.bad { border-left-color: var(--invalid); }
.proof .top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.proof .mono { font: 400 16.5px/1.4 var(--mono); letter-spacing: .04em; word-break: break-word; }
.proof .mono .d { background: var(--invalid-bg); color: var(--invalid); padding: 0 3px; border-radius: 3px; }
.proof .tag { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.proof .tag.ok { color: var(--valid); background: var(--valid-bg); }
.proof .tag.no { color: var(--invalid); background: var(--invalid-bg); }
.proof .r { margin-top: 14px; font: 400 13.5px/1.5 var(--mono); color: var(--muted); }

/* comparison table */
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15.5px; background: var(--panel); border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; }
.cmp th, .cmp td { text-align: left; vertical-align: top; }
.cmp thead th { padding: 18px 22px; background: var(--paper); border-bottom: 1px solid var(--hair); font-weight: 500; color: var(--muted); }
.cmp thead th.us { background: var(--brand-tint); border-bottom-color: var(--brand-tint-line); font-weight: 600; color: var(--brand); white-space: nowrap; }
.cmp tbody th { padding: 16px 22px; font-weight: 600; color: var(--ink); }
.cmp tbody td { padding: 16px 22px; color: var(--muted); }
.cmp tbody tr:not(:last-child) th, .cmp tbody tr:not(:last-child) td { border-bottom: 1px solid var(--hair-soft); }
.cmp tbody td.us { background: var(--brand-tint-row); font-weight: 600; }
.cmp .y { color: var(--valid); font-weight: 600; }
.cmp .n { color: var(--invalid); }

/* plans */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan { padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.plan .name { font-size: 15px; font-weight: 600; letter-spacing: .01em; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.plan .cost { font-size: 34px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.plan .cost small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .what { font-size: 15.5px; line-height: 1.6; color: var(--muted); }
.plan.pick { border: 2px solid var(--brand); padding: 27px; box-shadow: 0 12px 32px rgba(46, 55, 184, .12); }
.plan .tag { font-size: 12px; font-weight: 500; color: var(--brand); background: var(--brand-tint); padding: 3px 9px; border-radius: 999px; }

/* bands */
.band { background: var(--night); color: var(--night-ink); border-radius: 16px; padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.band > div { max-width: 32em; }
.band h2 { font-size: clamp(24px, 2.8vw, 30px); color: var(--night-ink); }
.band p { margin-top: 12px; font-size: 17px; color: var(--night-muted); }
.band .btn { background: var(--night-ink); color: var(--night); }
.band .btn:hover { background: #fff; }
.band.light { background: var(--panel); color: var(--ink); border: 1px solid var(--hair); padding: 44px; }
.band.light > div { max-width: 34em; }
.band.light h2 { font-size: 26px; line-height: 1.2; color: var(--ink); }
.band.light p { font-size: 16.5px; color: var(--muted); }
.band.light .btn { background: transparent; color: var(--ink); border: 1px solid var(--ink); padding: 13px 22px; }
.band.light .btn:hover { background: var(--ink); color: #fff; }

/* sign-up: a full-width night section on the home and pricing pages */
.signup-band { margin-top: 96px; padding: 88px 0; }
.signup-band .two { align-items: start; }
.signup-band h2 { font-size: clamp(30px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -.025em; }
.signup-band p { margin-top: 16px; font-size: 18px; color: var(--night-muted); max-width: 30em; }
.signup-card { background: var(--night-panel); border: 1px solid var(--night-line); border-radius: 16px; padding: 28px; }
.signup { display: flex; flex-direction: column; gap: 10px; }
.signup label { font-size: 14px; font-weight: 500; color: var(--night-text); }
.signup input { background: var(--night); border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; padding: 14px 16px; color: var(--night-ink); font-size: 16px; outline: none; }
.signup input:focus { border-color: var(--night-focus); }
.signup .btn { margin-top: 6px; padding: 14px 20px; }
#signup-result { margin: 18px 0 0; padding: 14px 16px; background: var(--night); border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; font: 400 13px/1.55 var(--mono); color: var(--night-faint); white-space: pre-wrap; word-break: break-word; }

/* code and API reference */
pre.code { margin-top: 22px; padding: 22px 24px; background: var(--night); color: var(--night-text); border-radius: 12px; font: 400 14px/1.6 var(--mono); overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
pre.code .k { color: var(--night-link); } pre.code .s { color: #4ade97; } pre.code .c { color: var(--night-faint); }
.endpoint { font: 500 1em var(--mono); letter-spacing: 0; }
.endpoint .m { color: var(--brand); }
.page-hero .endpoint { color: var(--night-ink); }

/* faq */
.faq dt { font-weight: 600; font-size: 17px; margin-top: 28px; }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin-top: 8px; font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 40em; text-wrap: pretty; }

/* ---- footer ---- */
footer.site { color: var(--night-dim); padding: 64px 0 40px; font-size: 14.5px; line-height: 1.65; }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; }
footer.site .cols > div:first-child { max-width: 30em; }
footer.site .h { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--night-fine); margin-bottom: 14px; }
footer.site .cols a:not(.brand) { display: block; color: var(--night-text); margin: 0 0 10px; }
footer.site .cols a:not(.brand):hover { color: #fff; text-decoration: none; }
footer.site .fine { margin-top: 44px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 13px; color: var(--night-fine); }

/* ---- responsive ---- */
@media (max-width: 960px) {
  :root { --gutter: 24px; }
  .two { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 64px 0 72px; }
  .grid3, .plans { grid-template-columns: 1fr; }
  main > section { padding-top: 72px; }
  .signup-band { margin-top: 72px; padding: 64px 0; }
  .band { padding: 32px; }
  .band.light { padding: 32px; }
  .rows .row { grid-template-columns: 1fr; gap: 8px; }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .proof { grid-template-columns: 1fr; }
  .nav .row { flex-wrap: wrap; gap: 12px 20px; }
  .nav nav { margin-left: 0; width: 100%; gap: 14px 18px; }
  .checker { padding: 20px; }
  .checker .head { flex-wrap: wrap; }
  .cmp { display: block; overflow-x: auto; }
  footer.site .cols { grid-template-columns: 1fr; gap: 32px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
