:root {
  --bg: #ffffff;
  --ink: #0f172a;
  --muted: #4b556d;
  --line: #e5e8f0;
  --soft: #f5f7fb;
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-2: #06b6d4;
  --ok: #047857;
  --warn-bg: #fffbeb;
  --warn-ink: #78350f;
  --warn-line: #fde68a;
  --danger: #b91c1c;
  --radius: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--brand); }

a:hover { color: var(--brand-dark); }

img { max-width: 100%; height: auto; }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 30;
}

.skip:focus { top: 12px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 62px;
  flex-wrap: wrap;
  padding: 8px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
  order: 1;
}

.logo:hover { color: var(--ink); }

.mark {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: inline-block;
}

.nav-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
  order: 2;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  order: 3;
  margin-left: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 650;
  cursor: pointer;
}

.nav-cta { order: 4; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 650;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.2;
}

.btn-p { background: var(--brand); color: #fff; }

.btn-p:hover { background: var(--brand-dark); color: #fff; }

.btn-s { background: #fff; color: var(--ink); border-color: var(--line); }

.btn-s:hover { border-color: #c7cbe0; color: var(--ink); }

.btn.block { width: 100%; }

.btn:disabled { opacity: 0.7; cursor: wait; }

.hero {
  background:
    radial-gradient(1000px 500px at 80% -10%, #e0e7ff, transparent),
    radial-gradient(800px 400px at 0% 0%, #cffafe, transparent);
  padding: 72px 0 64px;
}

.badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px #d1fae5;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 18px 0 14px;
  max-width: 16ch;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 12px;
}

h3 { margin: 0 0 6px; font-size: 1.1rem; }

.kicker {
  color: var(--brand);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
}

.hero .kicker { margin-top: 18px; }

.lead { font-size: 1.2rem; color: var(--muted); max-width: 42rem; }

.lead.tight { font-size: 1.05rem; }

.ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

.trust {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-weight: 650;
}

.trust li { padding-left: 1.3rem; position: relative; }

.trust li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--ok);
  font-weight: 800;
}

.reassure { font-weight: 700; margin: 14px 0 0; }

.note { font-size: 0.92rem; color: var(--muted); }

section { padding: 72px 0; }

section.alt { background: var(--soft); }

.grid { display: grid; gap: 18px; }

.g2 { grid-template-columns: repeat(2, 1fr); }

.g4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.card p:last-child { margin-bottom: 0; }

.card h3 + p { margin-top: 0; color: var(--muted); }

.num {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #eef2ff;
  color: var(--brand);
  font-weight: 800;
  margin-bottom: 12px;
}

.check { list-style: none; padding: 0; margin: 14px 0; }

.check li { padding-left: 28px; position: relative; margin: 8px 0; }

.check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--ok);
  font-weight: 800;
}

.pilot {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: start;
}

.warnbox, .placeholder-banner {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: var(--warn-ink);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.95rem;
}

.placeholder-banner { font-size: 1rem; }

.table-scroll { overflow-x: auto; margin-top: 22px; }

table.cmp {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table.cmp th, table.cmp td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

table.cmp th { background: #f8fafc; font-size: 0.95rem; }

table.cmp th[scope="row"], table.cmp td:first-child { color: var(--muted); width: 24%; }

.calc {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  align-items: start;
}

.rows .row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.rows .hdr {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input, select, textarea {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid #d6dae6;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
}

input::placeholder, textarea::placeholder { color: #55607a; }

input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.is-invalid { border-color: var(--danger); }

.rm {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.rm:hover { color: var(--danger); }

label.inline, .check-field {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.95rem;
}

label.inline input, .check-field input { width: auto; margin-top: 0.35rem; }

.rows label.inline { align-items: center; color: var(--muted); white-space: nowrap; }

.rows label.inline input { margin-top: 0; }

.result { position: sticky; top: 84px; }

.big { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }

.big.secondary { font-size: 1.7rem; }

.pos { color: var(--ok); }

.neg { color: var(--danger); }

.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.95rem;
}

.kv span:last-child { font-weight: 650; }

.stack-top { margin-top: 16px; }

#plan { font-weight: 700; font-size: 1.1rem; margin: 0 0 12px; }

hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

.field { margin-bottom: 14px; }

label.l, legend.l {
  display: block;
  font-weight: 650;
  font-size: 0.92rem;
  margin-bottom: 6px;
  padding: 0;
}

fieldset { border: 0; margin: 0 0 4px; padding: 0; }

.req { color: var(--danger); }

.field-error { color: var(--danger); font-size: 0.88rem; margin: 6px 0 0; }

.form-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #7f1d1d;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.form-errors ul { margin: 8px 0 0; padding-left: 1.2rem; }

.thanks {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 18px 18px 8px;
  border-radius: 12px;
}

.thanks h3 { color: #065f46; }

details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
}

summary { cursor: pointer; font-weight: 650; }

details p { color: var(--muted); margin: 10px 0 0; }

.site-footer {
  padding: 36px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.page { padding: 48px 0 72px; }

.page h1 { max-width: 20ch; font-size: clamp(2rem, 4vw, 2.8rem); }

.prose { max-width: 44rem; }

.prose h2 { margin-top: 2rem; font-size: 1.45rem; }

.prose ul { padding-left: 1.2rem; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }

.admin-table th, .admin-table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
}

.admin-table th { background: #f8fafc; }

.token-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }

.token-row .field { flex: 1 1 240px; }

#pilot { position: relative; }

.hp {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }

@media (max-width: 900px) {
  .g4, .g2, .pilot, .calc { grid-template-columns: 1fr; }
  .result { position: static; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    width: 100%;
    order: 5;
    margin-left: 0;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 8px;
  }
  .nav-links.is-open { display: flex; }
  .rows .hdr { display: none; }
  .rows .row {
    grid-template-columns: 1fr 1fr;
    background: var(--soft);
    padding: 10px;
    border-radius: 10px;
  }
  h1 { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
