:root {
  --paper: #f3f4ef;
  --ink: #101310;
  --muted: #5f665f;
  --line: #cfd3ca;
  --accent: #4d7c0f;
  --white: #fbfcf8;
  --header-h: 72px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 72px);
  border-bottom: 1px solid rgba(16, 19, 16, 0.18);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.site-header nav, footer nav { display: flex; align-items: center; gap: clamp(15px, 2.4vw, 34px); }
.site-header nav a, footer nav a { font-size: 13px; text-decoration: none; }
.site-header nav a:hover, footer nav a:hover { text-decoration: underline; }
.nav-action { font-weight: 700; }

.hero {
  position: relative;
  min-height: 94svh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  align-items: center;
  gap: clamp(36px, 6vw, 100px);
  padding: calc(var(--header-h) + 48px) clamp(20px, 6vw, 108px) 74px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.hero::before {
  content: "";
  position: absolute;
  top: var(--header-h);
  bottom: 0;
  left: 64%;
  width: 1px;
  background: var(--line);
}

.hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: var(--header-h) 0 0 64%;
  background: #edf0e8;
}

.hero-copy { position: relative; z-index: 2; max-width: 770px; }
.eyebrow {
  margin: 0 0 26px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(72px, 9.2vw, 160px);
  font-weight: 400;
  line-height: 0.76;
  letter-spacing: 0;
}
.hero h1 span { display: block; font-family: inherit; }
.hero-line {
  margin: 42px 0 0;
  font-size: clamp(26px, 3vw, 48px);
  line-height: 1.05;
  font-weight: 600;
}
.hero-support { max-width: 580px; margin: 18px 0 0; color: var(--muted); font-size: 18px; line-height: 1.55; }
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 34px; }
.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-weight: 720;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}
.button:hover { transform: translateY(-2px); }
.button:disabled { cursor: wait; opacity: 0.6; transform: none; }
.button-primary { background: var(--ink); color: var(--white); }
.button-primary:hover { background: var(--accent); border-color: var(--accent); }
.text-link { font-size: 14px; font-weight: 650; }
.pilot-note { margin: 18px 0 0; color: var(--muted); font-size: 13px; }

.hero-visual { position: relative; z-index: 2; display: grid; place-items: center; }
.receipt-terminal {
  width: min(100%, 610px);
  min-height: 560px;
  padding: 0 34px 28px;
  border: 1px solid rgba(16, 19, 16, 0.32);
  background: rgba(251, 252, 248, 0.88);
  box-shadow: 28px 34px 0 rgba(16, 19, 16, 0.08);
  transform-style: preserve-3d;
  transition: transform 100ms linear;
}
.api-terminal { min-height: 430px; }
.api-terminal pre { margin: 0; padding: 38px 0; overflow-x: auto; color: var(--ink); font-size: 14px; line-height: 1.7; }
.api-terminal .terminal-foot { margin-top: 0; }
.terminal-bar, .terminal-foot {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}
.live-indicator { color: var(--accent); }
.live-indicator i { width: 7px; height: 7px; display: inline-block; margin-right: 8px; background: var(--accent); animation: pulse 1.8s ease-in-out infinite; }
.receipt-id { display: flex; justify-content: space-between; gap: 20px; margin-top: 34px; font-size: 13px; }
.receipt-id code { overflow-wrap: anywhere; }
.score { display: flex; align-items: baseline; gap: 10px; margin: 36px 0 22px; }
.score strong { font-family: Georgia, "Times New Roman", serif; font-size: 88px; font-weight: 400; line-height: 0.9; }
.score span { color: var(--muted); font-size: 13px; text-transform: uppercase; }
.check-list div { display: flex; justify-content: space-between; gap: 24px; padding: 16px 0; border-top: 1px solid var(--line); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.check-list b { color: var(--accent); }
.terminal-foot { margin-top: 20px; border-top: 1px solid var(--line); border-bottom: 0; color: var(--muted); }
.hero-next { position: absolute; left: clamp(20px, 6vw, 108px); bottom: 24px; font-size: 12px; text-decoration: none; text-transform: uppercase; }

.flow-section, .proof-section, .pilot-section, .pricing-section, .join-section {
  padding: clamp(88px, 11vw, 170px) clamp(20px, 6vw, 108px);
  border-bottom: 1px solid var(--line);
}
.section-intro { display: grid; grid-template-columns: 0.55fr 1.45fr 0.8fr; gap: clamp(24px, 5vw, 80px); align-items: start; }
.section-intro h2, .proof-copy h2, .pilot-content h2, .pricing-section h2, .join-copy h2, .legal-main h1, .admin-main h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 6.2vw, 104px);
  font-weight: 400;
  line-height: 0.97;
  letter-spacing: 0;
}
.section-intro > p:last-child, .proof-copy > p, .pilot-content > p, .pricing-note, .join-copy > p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.6; }
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 94px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.flow-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.flow li { position: relative; min-height: 180px; padding: 18px 20px 20px 0; border-right: 1px solid var(--line); }
.flow li:last-child { border-right: 0; padding-left: 20px; }
.flow li:not(:first-child) { padding-left: 20px; }
.flow span { display: block; margin-bottom: 54px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; color: var(--muted); }
.flow strong, .flow small { display: block; }
.flow strong { font-size: 18px; }
.flow small { margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.4; }

.proof-section { display: grid; grid-template-columns: minmax(300px, 0.7fr) minmax(0, 1.3fr); gap: clamp(50px, 8vw, 140px); background: var(--ink); color: var(--white); }
.proof-copy > p { margin-top: 28px; color: #b8bdb5; }
.plain-list { margin: 64px 0 0; padding: 0; list-style: none; }
.plain-list li { display: flex; gap: 24px; padding: 18px 0; border-top: 1px solid #3a3f39; font-size: 14px; }
.plain-list span { color: #8e968b; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.product-shot { align-self: center; margin: 0; }
.product-shot img { width: 100%; aspect-ratio: 14 / 6.8; object-fit: cover; object-position: center 22%; filter: saturate(0.7) contrast(1.05); border: 1px solid #3a3f39; }
.product-shot figcaption { margin-top: 12px; color: #8e968b; font-size: 12px; }

.pilot-section { position: relative; display: grid; grid-template-columns: 0.45fr 0.9fr 0.65fr; gap: clamp(40px, 7vw, 120px); overflow: hidden; }
.pilot-number { font-family: Georgia, "Times New Roman", serif; font-size: clamp(180px, 25vw, 420px); line-height: 0.55; color: rgba(77, 124, 15, 0.13); }
.pilot-content h2 { margin-top: 0; }
.pilot-content > p { margin-top: 30px; }
.pilot-terms { align-self: end; border-top: 1px solid var(--ink); }
.pilot-terms div { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.pilot-terms strong { color: var(--accent); }

.pricing-section { background: var(--white); }
.pricing-section > div:first-child { display: grid; grid-template-columns: 0.45fr 1.55fr; gap: 40px; }
.price-line { display: flex; align-items: flex-end; gap: 30px; margin-top: 100px; padding: 36px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.price { font-family: Georgia, "Times New Roman", serif; font-size: clamp(88px, 16vw, 250px); line-height: 0.75; }
.price small { display: block; margin-bottom: 22px; color: var(--muted); font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.price-unit { padding-bottom: 10px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.pricing-note { max-width: 650px; margin: 28px 0 0 auto; }

.join-section { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(50px, 9vw, 150px); }
.join-copy > p { margin-top: 28px; }
.pilot-form { align-self: start; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pilot-form label, .metrics-form label { display: grid; gap: 9px; margin-bottom: 22px; font-size: 13px; font-weight: 680; }
input, select, textarea {
  width: 100%;
  min-height: 50px;
  padding: 13px 14px;
  border: 1px solid #aeb5aa;
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
}
textarea { resize: vertical; min-height: 104px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(77, 124, 15, 0.35); outline-offset: 2px; }
.check-field { grid-template-columns: 20px 1fr !important; align-items: start; gap: 12px !important; font-weight: 450 !important; line-height: 1.5; }
.check-field input { width: 18px; min-height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.honeypot { position: absolute; left: -10000px; }
.form-action { display: flex; align-items: center; gap: 22px; margin-top: 28px; }
.form-status { margin: 0; max-width: 390px; font-size: 13px; line-height: 1.45; }
.form-status[data-state="success"] { color: var(--accent); }
.form-status[data-state="error"] { color: #b43e25; }

footer { display: grid; grid-template-columns: 0.8fr 1.3fr 0.6fr; gap: 34px; align-items: start; padding: 50px clamp(20px, 6vw, 108px); background: var(--ink); color: var(--white); }
footer p { margin: 0; color: #b8bdb5; font-size: 13px; }
footer small { grid-column: 1 / -1; padding-top: 26px; border-top: 1px solid #3a3f39; color: #8e968b; }

.interface-band, .boundary-band {
  padding: clamp(88px, 11vw, 150px) clamp(20px, 6vw, 108px);
  border-bottom: 1px solid var(--line);
}
.interface-band { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: clamp(50px, 9vw, 150px); }
.interface-band h2, .boundary-band h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(44px, 6.2vw, 96px); font-weight: 400; line-height: 0.97; }
.endpoint-list { border-top: 1px solid var(--ink); }
.endpoint-list a { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.endpoint-list a:hover span { color: var(--accent); }
.endpoint-list span { font-weight: 700; }
.endpoint-list code { color: var(--muted); overflow-wrap: anywhere; }
.boundary-band { max-width: 1200px; }
.boundary-band > p:not(.eyebrow) { max-width: 850px; margin: 34px 0 24px; color: var(--muted); font-size: 20px; line-height: 1.65; }

.legal-main code { overflow-wrap: anywhere; }
.legal-main pre, .result-output { margin: 0 0 18px; padding: 22px; overflow-x: auto; border: 1px solid var(--line); background: var(--ink); color: var(--white); font-size: 13px; line-height: 1.65; }
.legal-main section > div > p { margin: 0 0 16px; color: #424842; line-height: 1.75; }
.verify-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 18px; align-items: end; margin-bottom: 34px; }
.verify-form label { display: grid; gap: 9px; font-size: 13px; font-weight: 680; }
.verify-form .button { min-width: 150px; }
.result-output { min-height: 230px; white-space: pre-wrap; }
.result-output[data-state="valid"] { border-left: 5px solid var(--accent); }
.result-output[data-state="invalid"] { border-left: 5px solid #b43e25; }
.verification-boundary { max-width: 760px; color: var(--muted); line-height: 1.6; }

[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 600ms ease, transform 600ms ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

.legal-page .site-header, .admin-page .site-header { position: relative; }
.legal-main, .admin-main { max-width: 980px; margin: 0 auto; padding: 100px 28px 140px; }
.legal-main h1, .admin-main h1 { font-size: clamp(60px, 9vw, 120px); }
.legal-lead, .admin-main > p { max-width: 720px; margin: 34px 0 78px; color: var(--muted); font-size: 20px; line-height: 1.6; }
.legal-main section { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: 50px; padding: 34px 0; border-top: 1px solid var(--line); }
.legal-main h2 { margin: 0; font-size: 18px; }
.legal-main section p { margin: 0; color: #424842; line-height: 1.75; }
.legal-page footer { grid-template-columns: 1fr auto; }

.admin-main { min-height: calc(100svh - var(--header-h)); }
.metrics-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 18px; max-width: 680px; }
.metrics-form label { margin: 0; }
.metrics-status { margin: 22px 0; color: var(--muted); font-size: 13px; }
.metrics-grid { grid-template-columns: repeat(3, 1fr); margin-top: 56px; border-top: 1px solid var(--ink); }
.metrics-grid { display: grid; }
.metrics-period { margin-top: 62px; }
.metrics-period h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 400; }
.metric { min-height: 150px; padding: 20px 18px 20px 0; border-bottom: 1px solid var(--line); }
.metric span, .metric strong { display: block; }
.metric span { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.metric strong { margin-top: 28px; font-family: Georgia, "Times New Roman", serif; font-size: 54px; font-weight: 400; }

@keyframes pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

@media (max-width: 980px) {
  :root { --header-h: 64px; }
  .site-header nav a:not(.nav-action) { display: none; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 120px; }
  .hero::before { display: none; }
  .hero::after { inset: 54% 0 0; }
  .hero h1 { font-size: clamp(68px, 17vw, 118px); }
  .hero-visual { margin: 30px 0 24px; }
  .receipt-terminal { min-height: 490px; }
  .hero-next { display: none; }
  .section-intro { grid-template-columns: 1fr; }
  .section-intro .eyebrow { margin-bottom: 0; }
  .flow { grid-template-columns: 1fr 1fr; }
  .flow li { border-bottom: 1px solid var(--line); }
  .proof-section, .pilot-section, .join-section { grid-template-columns: 1fr; }
  .interface-band { grid-template-columns: 1fr; }
  .pilot-number { position: absolute; right: -30px; top: 100px; opacity: 0.6; }
  .pilot-content, .pilot-terms { position: relative; z-index: 1; }
  .pricing-section > div:first-child { grid-template-columns: 1fr; }
  .price-line { align-items: flex-start; flex-direction: column; }
  footer { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .site-header { padding-inline: 16px; }
  .site-header nav { gap: 12px; }
  .brand > span:last-child { font-size: 12px; }
  .hero { padding: 108px 18px 64px; }
  .hero h1 { font-size: clamp(61px, 19.5vw, 92px); line-height: 0.8; }
  .hero-line { margin-top: 32px; font-size: 29px; }
  .hero-support { font-size: 16px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 18px; }
  .button { width: 100%; }
  .receipt-terminal { min-height: 430px; padding: 0 20px 20px; box-shadow: 12px 14px 0 rgba(16, 19, 16, 0.08); }
  .score strong { font-size: 64px; }
  .check-list div { padding: 12px 0; font-size: 10px; }
  .flow-section, .proof-section, .pilot-section, .pricing-section, .join-section { padding: 78px 18px; }
  .flow { grid-template-columns: 1fr; margin-top: 58px; }
  .flow li, .flow li:not(:first-child), .flow li:last-child { min-height: 126px; padding: 16px 0; border-right: 0; }
  .flow span { margin-bottom: 28px; }
  .product-shot { margin-inline: -18px; }
  .product-shot figcaption { padding-inline: 18px; }
  .pilot-number { font-size: 220px; }
  .price { font-size: 25vw; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .form-action { align-items: stretch; flex-direction: column; }
  footer { grid-template-columns: 1fr; padding-inline: 18px; }
  footer nav { justify-content: flex-start; }
  footer small, .footer-brand { grid-column: auto; }
  .legal-main, .admin-main { padding: 74px 18px 100px; }
  .legal-main section { grid-template-columns: 1fr; gap: 16px; }
  .metrics-form { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .verify-form { grid-template-columns: 1fr; }
  .endpoint-list a { grid-template-columns: 1fr; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
