:root {
  color-scheme: dark;
  --ink: #f3f6fb;
  --muted: #aeb8c8;
  --panel: rgba(20, 27, 40, 0.86);
  --line: rgba(164, 182, 211, 0.2);
  --blue: #59b7ff;
  --green: #5de8a8;
  --red: #ff7b82;
  --violet: #bd9cff;
  --demo-progress: 0%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #080c14;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 104, 170, 0.22), transparent 35rem),
    radial-gradient(circle at 90% 25%, rgba(93, 232, 168, 0.1), transparent 30rem),
    #080c14;
  line-height: 1.55;
}

a { color: #86ccff; }
a:hover { color: white; }
button, a.button { font: inherit; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 10;
  padding: .7rem 1rem;
  background: white;
  color: #111;
  border-radius: .5rem;
}
.skip-link:focus { top: 1rem; }

.shell { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.25rem;
}

.brand { color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -.03em; }
.brand span { color: var(--blue); }
.top-links { display: flex; gap: 1rem; }

.hero { padding: clamp(3rem, 8vw, 7rem) 0 3rem; }
.eyebrow { color: var(--green); font: 700 .78rem/1.2 ui-monospace, monospace; letter-spacing: .13em; text-transform: uppercase; }
h1 { max-width: 900px; margin: .55rem 0 1.25rem; font-size: clamp(2.6rem, 8vw, 6.7rem); line-height: .94; letter-spacing: -.065em; }
.hero p { max-width: 690px; margin: 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.35rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.8rem; }

.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  padding: .65rem 1rem;
  background: #192235;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.button.primary, button.primary { border-color: #4ba9ef; background: #1681d2; font-weight: 750; }
button:hover, .button:hover { border-color: var(--blue); background: #23314a; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #f7ce66; outline-offset: 3px; }
button:disabled { cursor: default; opacity: .7; }

.demo-wrap { padding-block: 2rem 5rem; }
.walkthrough-intro { max-width: 760px; margin-bottom: 1.4rem; }
.walkthrough-intro h2 { margin: .35rem 0; font-size: clamp(1.8rem, 5vw, 3.3rem); }
.walkthrough-intro p { margin: 0; color: var(--muted); }
.demo-card, .cta-card, .provider-card {
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--panel);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .25);
}
.demo-card { overflow: hidden; }
.demo-card + .demo-card { margin-top: 1.5rem; }
.demo-head { display: grid; grid-template-columns: 1fr auto; gap: 1.25rem; align-items: end; padding: clamp(1.2rem, 3vw, 2rem); border-bottom: 1px solid var(--line); }
.demo-head h2 { margin: .2rem 0; font-size: clamp(1.5rem, 4vw, 2.35rem); }
.demo-head p { margin: 0; color: var(--muted); }
.demo-controls { display: none; flex-wrap: wrap; gap: .5rem; }
.js-ready .demo-controls { display: flex; }

.no-js-note { margin: 0 0 1.4rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: .9rem; background: rgba(20, 27, 40, .72); color: var(--muted); }
.no-js-note strong { color: var(--ink); }

.progress-track { height: 3px; background: #202b3e; }
.progress-track::after { content: ""; display: block; width: var(--demo-progress); height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); transition: width .35s ease; }
progress { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.demo-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(270px, .65fr); }
.demo-steps { list-style: none; margin: 0; padding: 1.2rem; }
.demo-step { position: relative; display: grid; grid-template-columns: 2.2rem 1fr; gap: .8rem; margin: 0; padding: .8rem; border: 1px solid transparent; border-radius: .9rem; }
.js-ready .demo-step { opacity: .38; transition: opacity .3s ease, background .3s ease, transform .3s ease; }
.js-ready .demo-step.is-complete { opacity: .68; }
.js-ready .demo-step.is-active { opacity: 1; transform: translateX(.35rem); border-color: rgba(89, 183, 255, .4); background: rgba(64, 137, 207, .12); }
.step-index { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--line); border-radius: 50%; color: var(--blue); font: 700 .8rem/1 ui-monospace, monospace; }
.step-copy strong { display: block; }
.step-copy span { color: var(--muted); font-size: .94rem; }
.step-copy code { color: #bdddff; }
.signal .step-index { color: var(--red); }
.decision .step-index { color: var(--violet); }
.success .step-index { color: var(--green); }

.trace-panel { border-left: 1px solid var(--line); padding: 1.4rem; background: rgba(4, 8, 16, .4); }
.trace-panel h3 { margin-top: 0; font-size: 1rem; }
.trace-row { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.trace-row strong { min-width: 0; color: var(--ink); overflow-wrap: anywhere; text-align: right; }
.status-fail { color: var(--red) !important; }
.status-good { color: var(--green) !important; }

details.rule { border-top: 1px solid var(--line); padding: 1.2rem clamp(1.2rem, 3vw, 2rem); }
details.rule summary { cursor: pointer; font-weight: 750; }
details.rule p { color: var(--muted); }
pre { max-height: 30rem; overflow: auto; padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; background: #050810; color: #cde6ff; font: .82rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.demo-next { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem clamp(1.2rem, 3vw, 2rem); border-top: 1px solid var(--line); background: rgba(4, 8, 16, .28); }
.demo-next span { color: var(--muted); }

.privacy-note { margin: 1rem 0 0; color: var(--muted); font-size: .86rem; }
.privacy-note strong { color: var(--ink); }

.interest { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding-block: 1rem 5rem; }
.provider-card, .cta-card { padding: clamp(1.2rem, 3vw, 2rem); }
.provider-card h2, .cta-card h2 { margin-top: 0; }
.provider-options { display: flex; flex-wrap: wrap; gap: .55rem; }
.provider-options button[aria-pressed="true"] { border-color: var(--green); background: rgba(50, 146, 101, .25); }

.install-command { display: flex; align-items: stretch; gap: .5rem; }
.install-command code { flex: 1; overflow-x: auto; padding: .8rem; border: 1px solid var(--line); border-radius: .7rem; background: #050810; white-space: nowrap; }
.cta-links { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }

footer { padding: 1.5rem 0 3rem; border-top: 1px solid var(--line); color: var(--muted); }

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

@media (max-width: 760px) {
  .top-links a:first-child { display: none; }
  .demo-head, .demo-grid, .interest { grid-template-columns: 1fr; }
  .demo-head { align-items: start; }
  .trace-panel { border-left: 0; border-top: 1px solid var(--line); }
  .demo-controls { width: 100%; }
  .demo-controls button { flex: 1; }
  .install-command { flex-direction: column; }
  .demo-next { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .js-ready .demo-step.is-active { transform: none; }
}
