:root {
  --navy: #061c33;
  --blue: #123c69;
  --ink: #0f172a;
  --text: #132033;
  --muted: #64748b;
  --line: #dbe3ee;
  --soft: #eef4fb;
  --white: #ffffff;
  --danger: #9b1c1c;
  --ok: #14532d;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(18,60,105,.16), transparent 34rem),
    linear-gradient(180deg, #f8fafc, #edf2f8);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(6,28,51,.96);
  backdrop-filter: blur(10px);
  color: white;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.brand {
  font-weight: 850;
  letter-spacing: 0.14em;
  font-size: 24px;
}

.tagline {
  color: #cbd5e1;
  font-size: 13px;
  margin-top: 4px;
}

#session {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 18px 80px;
}

.hero {
  display: grid;
  grid-template-columns: 1.55fr .9fr;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(38px, 6vw, 74px);
  line-height: .94;
  margin: 10px 0 18px;
  letter-spacing: -0.06em;
  max-width: 900px;
}

h2 {
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.05;
  margin: 6px 0 14px;
  letter-spacing: -0.035em;
}

h3 { margin: 6px 0 10px; }

p { line-height: 1.55; }

.eyebrow {
  text-transform: uppercase;
  color: var(--blue);
  letter-spacing: .12em;
  font-weight: 800;
  font-size: 12px;
  margin: 0 0 8px;
}

.lead {
  max-width: 790px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-card, .card {
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(12,31,54,.11);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 20px 55px rgba(6,28,51,.08);
  margin-bottom: 18px;
}

.proof-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.compact { padding: 22px; }

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

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

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.value-grid .card {
  margin-bottom: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.steps div {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: #f8fafc;
}

.steps span {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--navy);
  color: white;
  font-weight: 800;
  margin-bottom: 14px;
}

.steps p { color: var(--muted); margin-bottom: 0; }

.trust-block {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 20px;
}

.trust-list {
  display: grid;
  gap: 10px;
}

.trust-list p {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.metric-row div {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 18px;
  padding: 14px;
}

.metric-row strong {
  display: block;
  font-size: 23px;
  color: var(--navy);
}

.metric-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  margin-top: 3px;
}

.pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--navy);
  background: #e7eef7;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 650;
  font-size: 13px;
}

input, select, textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  background: white;
  color: var(--text);
  border-radius: 15px;
  padding: 12px 13px;
  font: inherit;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(18,60,105,.12);
}

button {
  border: 0;
  background: var(--navy);
  color: white;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 780;
  cursor: pointer;
  margin: 4px 6px 4px 0;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(6,28,51,.16);
}

button.secondary { background: var(--blue); }
button.danger { background: var(--danger); }
button.ghost {
  color: var(--navy);
  background: #e7eef7;
}

.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0;
}

.tabs button {
  background: white;
  color: var(--navy);
  border: 1px solid var(--line);
}

.tabs button.active {
  background: var(--navy);
  color: white;
}

.hidden { display: none !important; }

pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #0b1623;
  color: #dbeafe;
  padding: 14px;
  border-radius: 16px;
  min-height: 48px;
  overflow: auto;
}

.result:empty,
#output:empty {
  display: none;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.mini-card {
  border: 1px solid #dbe3ee;
  border-radius: 24px;
  padding: 18px;
  background: white;
  box-shadow: 0 14px 32px rgba(15,23,42,.06);
}

.mini-card h3 {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 9px;
  background: #eef4fb;
  color: var(--navy);
  font-size: 12px;
  font-weight: 750;
}

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--blue);
  font-weight: 850;
  letter-spacing: .04em;
}

.note {
  color: var(--muted);
  font-size: 14px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.question {
  border: 1px solid #e2e8f0;
  padding: 16px;
  border-radius: 18px;
  margin: 12px 0;
  background: #f8fafc;
}

.question label {
  color: var(--text);
  font-weight: 500;
  grid-template-columns: auto 1fr;
  align-items: center;
  margin: 10px 0 0;
}

.system-card {
  border-style: dashed;
}

@media (max-width: 900px) {
  .hero, .grid.two, .grid.three, .trust-block, .steps {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: clamp(36px, 12vw, 58px);
  }

  .metric-row {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  #session {
    flex-wrap: wrap;
  }
}
