:root {
  --bg:#f5f7fb;
  --surface:#fff;
  --surface-alt:#edf2f7;
  --text:#172033;
  --muted:#5d697a;
  --line:#dbe2eb;
  --accent:#9d2f38;
  --accent-dark:#74232a;
  --navy:#14263a;
  --green:#1e7a55;
  --radius:18px;
  --shadow:0 22px 60px rgba(26,41,62,.12)
}

* {
  box-sizing:border-box
}

html {
  scroll-behavior:smooth;
  scroll-padding-top:73px
}

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.6
}

a {
  color:inherit
}

button,input {
  font:inherit
}

.shell {
  width:min(1180px,calc(100% - 40px));
  margin:0 auto
}

.skip-link {
  position:absolute;
  left:-9999px;
  top:8px;
  padding:10px 14px;
  background:var(--navy);
  color:#fff;
  border-radius:8px;
  z-index:100
}

.skip-link:focus {
  left:12px
}

.site-header {
  position:sticky;
  top:0;
  z-index:20;
  border-bottom:1px solid rgba(219,226,235,.9);
  background:rgba(245,247,251,.94);
  backdrop-filter:blur(14px)
}

.nav {
  min-height:72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px
}

.brand {
  display:flex;
  gap:12px;
  align-items:center;
  text-decoration:none;
  font-weight:780
}

.brand-mark {
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border-radius:12px;
  background:var(--accent);
  color:#fff;
  font-size:.77rem;
  letter-spacing:.05em
}

nav {
  display:flex;
  gap:22px;
  align-items:center
}

nav a {
  text-decoration:none;
  color:var(--muted);
  font-size:.92rem;
  font-weight:650
}

nav a:hover,nav a:focus-visible {
  color:var(--accent)
}

.hero {
  padding:96px 0 76px;
  background:radial-gradient(circle at 88% 18%,rgba(157,47,56,.12),transparent 25rem),linear-gradient(180deg,#fbfcfe,var(--bg))
}

.hero-grid {
  display:grid;
  grid-template-columns:1.08fr .92fr;
  align-items:center;
  gap:68px
}

.eyebrow {
  margin:0 0 14px;
  font-size:.77rem;
  text-transform:uppercase;
  letter-spacing:.17em;
  font-weight:850;
  color:var(--accent)
}

h1,h2,h3 {
  line-height:1.15;
  margin-top:0
}

h1 {
  max-width:760px;
  margin-bottom:24px;
  font-size:clamp(2.75rem,5.7vw,5.35rem);
  letter-spacing:-.055em
}

h2 {
  font-size:clamp(2rem,3.1vw,3.15rem);
  letter-spacing:-.038em;
  margin-bottom:18px
}

h3 {
  font-size:1.13rem
}

.lede {
  max-width:710px;
  color:var(--muted);
  font-size:1.18rem
}

.actions,.button-row {
  display:flex;
  gap:12px;
  flex-wrap:wrap
}

.actions {
  margin:32px 0 24px
}

.button {
  min-height:46px;
  display:inline-flex;
  justify-content:center;
  align-items:center;
  padding:0 18px;
  border-radius:11px;
  border:1px solid transparent;
  text-decoration:none;
  font-weight:760;
  cursor:pointer;
  transition:transform .18s ease,background .18s ease,border-color .18s ease
}

.button:hover {
  transform:translateY(-1px)
}

.button:focus-visible,input:focus-visible,a:focus-visible {
  outline:3px solid rgba(157,47,56,.25);
  outline-offset:3px
}

.primary {
  background:var(--accent);
  color:#fff
}

.primary:hover {
  background:var(--accent-dark)
}

.secondary {
  background:var(--surface);
  border-color:var(--line);
  color:var(--text)
}

.research-note {
  max-width:700px;
  padding-left:14px;
  border-left:3px solid var(--accent);
  color:var(--muted)
}

.hero-panel {
  overflow:hidden;
  border:1px solid #d6dde6;
  border-radius:24px;
  background:#111d2a;
  box-shadow:var(--shadow);
  color:#edf3fb
}

.panel-label {
  padding:15px 20px;
  border-bottom:1px solid #2b394a;
  color:#9eacbd;
  font-size:.74rem;
  font-weight:800;
  letter-spacing:.14em
}

.pipeline {
  padding:10px 20px 18px
}

.pipeline-step {
  display:grid;
  grid-template-columns:40px 1fr;
  align-items:start;
  gap:14px;
  padding:16px 4px;
  border-bottom:1px solid #283749
}

.pipeline-step:last-child {
  border-bottom:0
}

.pipeline-step>span {
  color:#f0a1a8;
  font-weight:850;
  font-variant-numeric:tabular-nums
}

.pipeline-step strong,.pipeline-step small {
  display:block
}

.pipeline-step small {
  margin-top:3px;
  color:#a8b4c5
}

.section {
  padding:clamp(32px,8vh,84px) 0
}

.muted {
  background:var(--surface-alt)
}

.section-heading {
  max-width:800px;
  margin-bottom:36px
}

.section-heading>p:last-child,.split p,.validation-grid p {
  color:var(--muted)
}

.demo-section {
  padding:clamp(18px,4vh,36px) 0;
  background:#fff
}

.demo-section .section-heading {
  margin-bottom:16px
}

.demo-section h2 {
  font-size:clamp(1.8rem,3vw,2.5rem);
  margin-bottom:6px
}

.demo-section .section-heading p {
  margin:0
}

.demo-layout {
  display:grid;
  grid-template-columns:minmax(230px,.72fr) minmax(0,1.6fr);
  grid-template-rows:auto 1fr;
  grid-template-areas:"controls visual" "stages visual";
  gap:12px 20px;
  align-items:start
}

.demo-controls,.demo-visual {
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--surface)
}

.demo-controls {
  grid-area:controls;
  padding:14px 16px
}

.demo-controls h3 {
  margin-bottom:8px
}

.slider-label {
  display:flex;
  justify-content:space-between;
  gap:20px;
  margin:0 0 4px;
  color:var(--muted);
  font-size:.91rem;
  font-weight:700
}

.slider-label output {
  color:var(--text);
  font-variant-numeric:tabular-nums
}

#threshold {
  width:100%;
  accent-color:var(--accent)
}

.button-row {
  margin:10px 0 0
}

.button-row .button {
  flex:1
}

.stage-list {
  grid-area:stages;
  display:grid;
  gap:3px
}

.stage {
  display:grid;
  grid-template-columns:26px 1fr;
  gap:8px;
  align-items:center;
  padding:4px 8px;
  line-height:1.25;
  border:1px solid transparent;
  border-radius:6px;
  transition:.18s ease
}

.stage>span {
  display:grid;
  place-items:center;
  width:26px;
  height:26px;
  border-radius:50%;
  background:#e7ebf1;
  color:#687384;
  font-size:.77rem;
  font-weight:850
}

.stage strong,.stage small {
  display:block
}

.stage small {
  color:var(--muted)
}

.stage.active {
  border-color:rgba(157,47,56,.45);
  background:#fff7f7
}

.stage.active>span {
  background:var(--accent);
  color:#fff
}

.stage.done {
  border-color:rgba(30,122,85,.28);
  background:#f3fbf7
}

.stage.done>span {
  background:var(--green);
  color:#fff
}

.demo-visual {
  grid-area:visual;
  overflow:hidden
}

.viewer-bar {
  min-height:54px;
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:center;
  padding:7px 12px;
  border-bottom:1px solid var(--line)
}

.viewer-bar strong,.viewer-bar span {
  display:block
}

.viewer-bar>div>span {
  color:var(--muted);
  font-size:.82rem
}

.canvas-wrap {
  padding:8px;
  background:#17283d
}

#demo-canvas {
  display:block;
  width:100%;
  height:auto;
  margin-inline:auto;
  border-radius:8px;
  background:#dbe8f1;
  box-shadow:0 18px 35px rgba(0,0,0,.16)
}

.demo-metrics {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  border-top:1px solid var(--line)
}

.demo-metrics article {
  min-height:58px;
  padding:7px 12px;
  border-right:1px solid var(--line)
}

.demo-metrics article:last-child {
  border-right:0
}

.demo-metrics span,.demo-metrics strong {
  display:block
}

.demo-metrics span {
  color:var(--muted);
  font-size:.78rem
}

.demo-metrics strong {
  font-size:1.1rem
}

.cards {
  display:grid;
  gap:16px
}

.cards.five {
  grid-template-columns:repeat(5,1fr)
}

.card {
  min-height:260px;
  padding:23px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--surface)
}

.card-index {
  display:block;
  margin-bottom:34px;
  color:var(--accent);
  font-size:.82rem;
  font-weight:850
}

.card p {
  color:var(--muted)
}

.card code,.notice-card code {
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:.78rem
}

.card code {
  display:inline-block;
  margin-top:5px;
  padding:5px 8px;
  border-radius:7px;
  background:#eef1f5;
  color:#465266
}

.split,.validation-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:70px;
  align-items:start
}

.architecture-stack {
  display:grid;
  gap:8px
}

.architecture-item {
  padding:22px 24px;
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--surface)
}

.architecture-item span,.architecture-item strong,.architecture-item small {
  display:block
}

.architecture-item span {
  color:var(--accent);
  font-size:.73rem;
  font-weight:850;
  letter-spacing:.08em;
  text-transform:uppercase
}

.architecture-item strong {
  margin-top:4px;
  font-size:1.08rem
}

.architecture-item small {
  margin-top:5px;
  color:var(--muted);
  font-size:.9rem
}

.connector {
  padding-left:24px;
  color:var(--accent);
  font-weight:900
}

.notice-card {
  padding:28px;
  border-radius:20px;
  background:var(--navy);
  color:#f5f8fb;
  box-shadow:var(--shadow)
}

.notice-card ul {
  padding-left:20px;
  margin-bottom:0;
  color:#cbd5e2
}

.notice-card li+li {
  margin-top:8px
}

.callout {
  display:flex;
  justify-content:space-between;
  gap:30px;
  align-items:center;
  padding:34px;
  border:1px solid var(--line);
  border-radius:22px;
  background:var(--surface)
}

.callout h2 {
  margin-bottom:10px
}

.companion-link {
  color:var(--accent);
  font-weight:700
}

.callout p:last-child {
  margin-bottom:0;
  color:var(--muted)
}

footer {
  padding:40px 0 52px;
  border-top:1px solid var(--line);
  color:var(--muted)
}

.footer-grid {
  display:flex;
  justify-content:space-between;
  gap:30px
}

.footer-grid strong {
  color:var(--text)
}

.footer-grid p {
  margin:6px 0 0
}

.footer-grid>div:last-child {
  display:flex;
  gap:18px;
  align-items:flex-start
}

.footer-grid a {
  text-decoration:none;
  font-weight:650
}

@media(max-width:1080px) {
  .cards.five {
  grid-template-columns:repeat(2,1fr)
}

.cards.five .card:last-child {
  grid-column:1/-1;
  min-height:auto
}

}

@media(min-width:901px) {
  #demo-canvas {
    /* The 960 by 600 field keeps its aspect ratio as window height changes. */
    max-width:max(320px,calc(160dvh - 550px))
  }
}

@media(max-width:900px) {
  .hero-grid,.split,.validation-grid {
  grid-template-columns:1fr;
  gap:42px
}

html {
  scroll-padding-top:12px
}

.site-header {
  position:static
}

.nav {
  flex-wrap:wrap;
  gap:6px 18px;
  padding-block:8px
}

nav {
  flex-wrap:wrap;
  gap:4px 14px
}

.demo-layout {
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto;
  grid-template-areas:"controls" "visual" "stages";
  gap:12px
}

.demo-metrics {
  grid-template-columns:repeat(2,1fr)
}

.demo-metrics article:nth-child(2) {
  border-right:0
}

.demo-metrics article:nth-child(-n+2) {
  border-bottom:1px solid var(--line)
}

}

@media(max-width:620px) {
  .shell {
  width:min(100% - 28px,1180px)
}

.hero {
  padding-top:66px
}

h1 {
  font-size:clamp(2.5rem,15vw,4rem)
}

.cards.five {
  grid-template-columns:1fr
}

.cards.five .card:last-child {
  grid-column:auto
}

.callout,.footer-grid {
  align-items:stretch;
  flex-direction:column
}

.footer-grid>div:last-child {
  flex-wrap:wrap
}

}

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

  .button,.stage {
    transition:none
  }

  .button:hover {
    transform:none
  }
}
