/* MockPayer — engineering-tool landing. Greyscale + one vermilion accent used
   only at conversion/signature moments (nav CTA, Pro card, hero cursor mark,
   the deadline phrase, the "Why:" label). Everything else is grey — status
   semantics (A1/A4/A3, the state tape, code tokens) are conveyed with
   brightness/weight/outline, never color. */

:root {
  --bg:        #0b0d0f;
  --bg-1:      #101317;
  --bg-2:      #14181d;
  --bg-3:      #191e24;
  --line:      #212830;
  --line-2:    #2b333c;
  --fg:        #e5e9ed;
  --fg-mid:    #bfc6cd;
  --fg-dim:    #9aa4ae;
  --fg-faint:  #6b747e;
  --fg-bright: #ffffff;   /* section headers, "certified" status, scan anchors */

  --accent:       #e5432e;  /* vermilion — reserved for ~5 conversion moments. Nothing else. */
  --accent-dim:   #a8331f;
  --accent-press: #ff5b3f;

  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1280px;
  --radius: 7px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint vertical guide texture, very subtle — like a terminal margin */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 78% -6%, rgba(255,255,255,0.05), transparent 60%);
  z-index: 0;
}

a { color: var(--fg-dim); text-decoration: none; }
a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,13,15,0.82);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; height: 56px;
  display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--mono);
  font-weight: 600; font-size: 15px; letter-spacing: -0.02em; color: var(--fg); }
.brand:hover { text-decoration: none; }
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg-bright);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.12); }
.brand b { color: var(--fg-bright); font-weight: 600; }
.nav-links { display: flex; gap: 18px; margin-left: auto; align-items: center; }
.nav-links a { font-family: var(--mono); font-size: 12.5px; color: var(--fg-dim); }
.nav-links a:hover { color: var(--fg); text-decoration: none; }
.nav .btn { margin-left: 4px; }
/* .nav-links a { color: var(--fg-dim) } outranks a single class on specificity
   (class+type beats single class), which was overriding the CTA button's text
   color and leaving the label unreadable on the fill. Re-assert it here with
   matching specificity. */
.nav-links a.btn-accent,
.nav-links a.btn-accent:hover { color: var(--bg); }
@media (max-width: 860px) { .nav-links a.hide-sm { display: none; } }
@media (max-width: 560px) { .nav-links { gap: 12px; } .nav-links a.hide-xs { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  padding: 8px 15px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--fg);
  transition: border-color .15s, background .15s, color .15s;
}
.btn:hover { border-color: var(--fg-faint); text-decoration: none; }
/* neutral, high-contrast primary (hero "Start free sandbox") — bright fill, near-black ink */
.btn-primary { background: var(--fg-bright); color: var(--bg); border-color: var(--fg-bright); font-weight: 600; }
.btn-primary:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }
/* the vermilion CTA — nav "Start 14-day trial" + Pro card CTA only */
.btn-accent { background: var(--accent); color: var(--bg); border-color: var(--accent); font-weight: 600; }
.btn-accent:hover { background: var(--accent-press); border-color: var(--accent-press); color: var(--bg); }
.btn-lg { padding: 11px 20px; font-size: 14px; }

/* ---------- hero ---------- */
.hero { padding: 68px 0 40px; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em;
  color: var(--fg-dim); margin: 0 0 18px; display: inline-flex; align-items: center; gap: 8px; }
.eyebrow .rule { width: 26px; height: 1px; background: var(--line-2); }
.hero h1 {
  font-family: var(--mono); font-weight: 600; letter-spacing: -0.03em;
  font-size: clamp(34px, 6vw, 56px); line-height: 1.02; margin: 0 0 20px;
  color: var(--fg);
}
.hero h1 .car { color: var(--accent); }  /* the hero cursor mark — one of the 5 vermilion moments */
.hero .sub { font-size: 17px; color: var(--fg-dim); max-width: 640px; margin: 0 0 28px; line-height: 1.55; }
.hero .sub b { color: var(--fg); font-weight: 600; }
.hero .deadline { color: var(--accent); font-weight: 600; white-space: nowrap; }  /* the deadline phrase — vermilion */
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }

/* state tape — the signature adjudication motif. Status is greyscale: brighter
   + heavier weight = further along / more final. No color coding. */
.tape { display: flex; align-items: center; gap: 0; margin: 0 0 40px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; }
.tape .node { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 5px; color: var(--fg-faint); background: var(--bg-1); }
.tape .node .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .6; }
.tape .node.on { color: var(--fg-dim); font-weight: 600; border-color: var(--line-2); background: rgba(255,255,255,0.04); }
.tape .node.end { color: var(--fg-bright); font-weight: 700; border-color: var(--fg-bright); background: rgba(255,255,255,0.10); }
.tape .arw { color: var(--fg-faint); padding: 0 9px; user-select: none; }
.tape .lbl { color: var(--fg-faint); margin-left: 12px; }

/* ---------- code blocks ---------- */
.code {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--bg-1); margin: 0; min-width: 0; max-width: 100%;
}
/* grid/flex children must be allowed to shrink so wide <pre> scrolls internally
   instead of blowing out the track and forcing horizontal body scroll */
.hero-io > *, .io-grid > *, .val-grid > * { min-width: 0; }
.code-head {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-bottom: 1px solid var(--line); background: var(--bg-2);
  font-family: var(--mono); font-size: 11.5px; color: var(--fg-faint);
}
.code-head .fname { color: var(--fg-dim); }
.code-head .meth { color: var(--fg-dim); font-weight: 600; }
.code-head .copy {
  margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--fg-faint);
  background: transparent; border: 1px solid var(--line-2); border-radius: 5px;
  padding: 3px 9px; cursor: pointer; transition: color .15s, border-color .15s;
}
.code-head .copy:hover { color: var(--fg); border-color: var(--fg-faint); }
.code-head .copy.done { color: var(--fg-bright); border-color: var(--fg-dim); }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; }
.code code { font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: var(--fg); white-space: pre; }
.code .trunc { color: var(--fg-faint); font-style: normal; }

/* JSON / shell token colors — monochrome ramp (Stripe-docs style): bright
   keys/commands, mid-tone values, dim punctuation/flags/comments. */
.t-key { color: var(--fg-bright); }
.t-str { color: var(--fg-mid); }
.t-num { color: var(--fg); }
.t-bool { color: var(--fg); }
.t-punc { color: var(--fg-faint); }
.t-flag { color: var(--fg-faint); }
.t-cmd { color: var(--fg-bright); }
.t-comment { color: var(--fg-faint); font-style: italic; }

.hero-io { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 820px) { .hero-io { grid-template-columns: 1fr; } }
.io-cap { font-family: var(--mono); font-size: 11px; color: var(--fg-dim); margin: 10px 2px 0; }

/* ---------- sections ---------- */
section { padding: 56px 0; border-top: 1px solid var(--line); }
.sec-head { margin: 0 0 8px; }
h2 {
  font-family: var(--mono); font-weight: 600; font-size: 28px; letter-spacing: -0.01em;
  margin: 12px 0 8px; color: var(--fg-bright); scroll-margin-top: 72px;
}
h2::before { content: "## "; color: var(--fg-dim); }
.sec-sub { color: var(--fg-dim); margin: 6px 0 30px; max-width: 680px; }

/* ---------- badges ---------- */
/* status conveyed via brightness + weight + outline treatment, never color:
   certified = brightest/solid fill, pended = mid outline, not-certified =
   dim + dashed + italic (distinct without being an error state). */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono);
  font-size: 11px; font-weight: 600; letter-spacing: 0.01em; text-transform: none;
  padding: 3px 9px; border-radius: 20px; border: 1px solid;
}
.badge .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-ok   { color: var(--fg-bright); background: rgba(255,255,255,0.12); border-color: var(--fg-bright); font-weight: 700; }
.b-pend { color: var(--fg-dim);    background: rgba(255,255,255,0.04); border-color: var(--fg-dim); }
.b-deny { color: var(--fg-faint); background: transparent; border-color: var(--fg-faint); border-style: dashed; font-style: italic; }
.b-info { color: var(--fg-dim);    background: rgba(255,255,255,0.03); border-color: var(--line-2); }

/* ---------- tabs (demo) ---------- */
.tabs { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--bg-1); margin-bottom: 18px; }
.tab { font-family: var(--mono); font-size: 12.5px; color: var(--fg-dim); background: transparent;
  border: 0; padding: 7px 15px; border-radius: 5px; cursor: pointer; transition: background .15s, color .15s; }
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] { background: var(--bg-3); color: var(--fg-bright); }
.tab .k { color: var(--fg-faint); }
.tabpane { display: none; }
.tabpane.active { display: block; }
.tab-desc { color: var(--fg-dim); font-size: 14px; margin: 0 0 18px; max-width: 720px; }
.tab-desc code { font-family: var(--mono); font-size: 12.5px; color: var(--fg); background: var(--bg-2);
  padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line); }
.io-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 820px) { .io-grid { grid-template-columns: 1fr; } }

/* ---------- scenarios table ---------- */
.scen { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.scen-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.scen-tbl th { text-align: left; font-family: var(--mono); font-weight: 500; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-faint);
  padding: 11px 16px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.scen-tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--fg-dim); }
.scen-tbl tr:last-child td { border-bottom: 0; }
.scen-tbl tr:hover td { background: var(--bg-1); }
.scen-tbl .name { font-family: var(--mono); font-size: 12.5px; color: var(--fg-bright); white-space: nowrap; }
.scen-tbl .beh { color: var(--fg); }
.scen-tbl tbody td:nth-child(3) { color: var(--fg); }  /* "what it exercises" was defaulting to the dim tier */
/* adjudication codes inside the behavior column — same brightness/weight system as the badges/tape */
.scen-tbl .code-ok   { color: var(--fg-bright); font-weight: 700; }
.scen-tbl .code-pend { color: var(--fg-dim);    font-weight: 600; }
.scen-tbl .code-deny { color: var(--fg-faint);  font-weight: 600; font-style: italic; }
.scen-wrap { overflow-x: auto; }
@media (max-width: 720px) { .scen-tbl { min-width: 640px; } }

/* ---------- validation ---------- */
.val-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 820px) { .val-grid { grid-template-columns: 1fr; } }
/* annotation, not an error state: cool neutral surface, brightened body text */
.val-note { border-left: 2px solid var(--line-2); background: var(--bg-2);
  padding: 12px 16px; border-radius: 0 6px 6px 0; margin-top: 16px; font-size: 13.5px; color: var(--fg-mid); }
.val-note b { color: var(--accent); }  /* the "Why:" label — one of the 5 vermilion moments */

/* ---------- pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 820px) { .price-grid { grid-template-columns: 1fr; } }
.card {
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-1);
  padding: 24px 22px; display: flex; flex-direction: column; position: relative;
}
/* Pro card pop — vermilion border + a lighter surface step so it snaps to the eye */
.card.primary { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(229,67,46,0.22); background: var(--bg-2); }
.card .ribbon { position: absolute; top: -1px; right: 18px; transform: translateY(-50%);
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--bg); background: var(--fg-bright); padding: 3px 10px; border-radius: 20px; }
.card .plan { font-family: var(--mono); font-size: 13px; color: var(--fg-dim); margin: 0 0 12px;
  text-transform: lowercase; }
.card .price { font-family: var(--mono); font-size: 32px; font-weight: 600; color: var(--fg); letter-spacing: -0.02em; }
.card .price small { font-size: 14px; color: var(--fg-faint); font-weight: 400; }
.card .trial { font-size: 12.5px; color: var(--fg-faint); margin: 6px 0 18px; min-height: 18px; }
.card ul { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card li { position: relative; padding-left: 22px; font-size: 13.5px; color: var(--fg-dim); }
.card li::before { content: "→"; position: absolute; left: 0; color: var(--fg-faint); font-family: var(--mono); }
.card .btn { justify-content: center; }

/* ---------- faq ---------- */
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 40px; }
@media (max-width: 720px) { .faq { grid-template-columns: 1fr; } }
.faq-item { border-bottom: 1px solid var(--line); padding: 4px 0 16px; }
.faq-item h3 { font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--fg); margin: 0 0 7px; }
.faq-item h3::before { content: "> "; color: var(--fg-dim); }
.faq-item p { margin: 0; color: var(--fg-dim); font-size: 13.5px; }
.faq-item code { font-family: var(--mono); font-size: 12px; color: var(--fg); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 34px 0 60px; }
.foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; color: var(--fg-faint); }
.foot .brand { font-size: 13px; }
.foot .sep { color: var(--line-2); }
.foot a { color: var(--fg-dim); }
.foot .right { margin-left: auto; }

/* ---------- focus / a11y ---------- */
:focus-visible { outline: 2px solid var(--fg-bright); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--fg-bright); color: var(--bg);
  padding: 8px 14px; font-family: var(--mono); font-size: 13px; z-index: 100; border-radius: 0 0 6px 0; }
.skip:focus { left: 0; }

/* trial page */
.trial-wrap { max-width: 520px; margin: 0 auto; padding: 80px 24px; }
.trial-card { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-1); padding: 34px 30px; }
.trial-card h1 { font-family: var(--mono); font-size: 24px; letter-spacing: -0.02em; margin: 0 0 12px; color: var(--fg); }
.trial-card p { color: var(--fg-dim); font-size: 14.5px; margin: 0 0 20px; }
.field { display: flex; gap: 10px; margin: 18px 0 14px; }
.field input { flex: 1; font-family: var(--mono); font-size: 14px; padding: 10px 13px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 6px; color: var(--fg); }
.field input::placeholder { color: var(--fg-faint); }
.field input:focus { border-color: var(--fg-dim); outline: none; }
.trial-note { font-size: 12.5px; color: var(--fg-faint); border-top: 1px solid var(--line); padding-top: 16px; margin-top: 6px; }
.trial-ok { color: var(--fg-bright); font-family: var(--mono); font-size: 13.5px; display: none; }
.trial-ok.show { display: block; }
.back { font-family: var(--mono); font-size: 12.5px; color: var(--fg-dim); display: inline-block; margin-top: 26px; }
