:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef4ff;
  --text: #172033;
  --muted: #667085;
  --border: #dfe5ef;
  --accent: #315be8;
  --accent-2: #6b8cff;
  --dark: #0f172a;
  --success: #176b45;
  --danger: #9d2f3f;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}
a { color: inherit; }
button, select { font: inherit; }
.shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(223,229,239,.85);
  backdrop-filter: blur(18px);
  background: rgba(246,248,251,.88);
}
.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--dark);
  color: white;
  font-weight: 800;
}
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: .72rem; }
nav { display: flex; gap: 24px; }
nav a { text-decoration: none; color: var(--muted); font-weight: 650; font-size: .92rem; }
nav a:hover { color: var(--text); }

.hero {
  background:
    radial-gradient(circle at 78% 22%, rgba(107,140,255,.22), transparent 32%),
    linear-gradient(180deg, #fff 0%, #f6f8fb 100%);
  padding: 86px 0 70px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.45fr .75fr;
  gap: 54px;
  align-items: center;
}
.eyebrow {
  color: var(--accent);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 10px;
}
h1, h2, h3 { line-height: 1.12; margin-top: 0; }
h1 { font-size: clamp(2.6rem, 6vw, 5.5rem); letter-spacing: -.055em; margin-bottom: 24px; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.035em; }
h3 { font-size: 1.12rem; }
.lede { max-width: 760px; color: var(--muted); font-size: 1.16rem; }
.hero-actions { display: flex; gap: 12px; margin: 30px 0 38px; flex-wrap: wrap; }

.button {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  background: white;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(15,23,42,.08); }
.button.primary { background: var(--dark); border-color: var(--dark); color: #fff; }
.button.ghost { background: rgba(255,255,255,.7); }
.button.large { padding: 14px 20px; min-width: 250px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.stats article {
  background: rgba(255,255,255,.75);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}
.stats strong { display: block; font-size: 1.45rem; letter-spacing: -.03em; }
.stats span { color: var(--muted); font-size: .82rem; }

.architecture-card {
  background: var(--dark);
  color: #fff;
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow);
}
.architecture-title { color: #aebbd7; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 18px; }
.arch-node {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  padding: 11px 14px;
  background: rgba(255,255,255,.055);
  text-align: center;
  font-weight: 700;
}
.arch-node.accent { background: rgba(107,140,255,.20); border-color: rgba(107,140,255,.55); }
.arch-arrow { text-align: center; color: #7f8da9; padding: 4px; }
.architecture-card p { color: #aebbd7; font-size: .85rem; margin: 18px 0 0; }

.section { padding: 82px 0; }
.section.alt { background: #fff; }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.section-heading h2 { margin-bottom: 0; }
.notice {
  border: 1px solid #f0d89d;
  background: #fff9e9;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 24px;
  color: #6d5314;
}
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(15,23,42,.035);
}
.form-card-heading {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.form-card-heading h3 { margin: 2px 0 4px; }
.form-card-heading p { margin: 0; color: var(--muted); font-size: .9rem; }
.step {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--accent);
  font-weight: 800;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.field label {
  display: block;
  font-size: .83rem;
  font-weight: 750;
  margin: 0 0 7px;
}
.field small {
  display: block;
  color: var(--muted);
  font-size: .73rem;
  margin-top: 5px;
}
.field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 11px 12px;
  color: var(--text);
}
.field select:focus {
  outline: 3px solid rgba(49,91,232,.13);
  border-color: var(--accent);
}
.submit-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.muted { color: var(--muted); font-size: .85rem; }

.result-panel, .error-panel {
  margin-top: 28px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--border);
  padding: 26px;
  box-shadow: var(--shadow);
}
.hidden { display: none !important; }
.result-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.result-top h2 {
  font-size: clamp(3rem, 7vw, 5rem);
  margin: 0;
}
.result-top p { color: var(--muted); margin-bottom: 0; }
.latency-badge {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  min-width: 150px;
}
.latency-badge span { display: block; color: var(--muted); font-size: .75rem; }
.latency-badge strong { font-size: 1.05rem; }
.probability-track {
  height: 14px;
  border-radius: 999px;
  background: #edf1f6;
  overflow: hidden;
  margin: 24px 0;
}
.probability-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .55s ease;
}
.decision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.decision-grid article {
  background: var(--bg);
  border-radius: 14px;
  padding: 16px;
}
.decision-grid span, .decision-grid small { display: block; color: var(--muted); }
.decision-grid strong { display: block; font-size: 1.2rem; margin: 4px 0; }
.result-footnote { color: var(--muted); font-size: .82rem; margin: 18px 0 0; }
.error-panel { border-color: #f0b7bf; background: #fff3f5; color: var(--danger); }
.error-panel strong { display: block; }

.two-col {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 52px;
  align-items: center;
}
.two-col p { color: var(--muted); }
.model-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.model-flow span { border: 1px solid var(--border); background: var(--bg); border-radius: 10px; padding: 9px 12px; font-weight: 700; }
.model-flow b { color: var(--accent); }
.metric-card {
  background: var(--dark);
  color: white;
  border-radius: 22px;
  padding: 26px;
}
.metric-card dl { margin: 0; }
.metric-card dl div { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.metric-card dl div:last-child { border-bottom: 0; }
.metric-card dt { color: #aebbd7; }
.metric-card dd { margin: 0; font-weight: 800; }

.limitations-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.limitations-grid article {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}
.limitations-grid p { color: var(--muted); font-size: .9rem; }

footer { border-top: 1px solid var(--border); background: white; padding: 26px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .82rem; }

@media (max-width: 900px) {
  .hero-grid, .two-col { grid-template-columns: 1fr; }
  .architecture-card { max-width: 560px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .limitations-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  nav { display: none; }
  .hero { padding-top: 58px; }
  .form-grid, .decision-grid, .limitations-grid { grid-template-columns: 1fr; }
  .section-heading, .result-top, .footer-inner { align-items: flex-start; flex-direction: column; }
  .button.large { width: 100%; }
}
