:root {
  color-scheme: dark;
  --bg: #0a1119;
  --panel: #101d28;
  --line: #293d4b;
  --text: #edf5f5;
  --muted: #a4b7c1;
  --mint: #78ebbb;
  font: 16px/1.6 "Segoe UI", system-ui, sans-serif;
  scroll-behavior: smooth;
}
* { box-sizing: border-box }
body { margin: 0; color: var(--text); background: var(--bg) }
a { color: inherit; text-decoration: none }
a:focus-visible, input:focus-visible { outline: 2px solid var(--mint); outline-offset: 5px }
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto }
header, footer, nav { display: flex; align-items: center; gap: 28px }
header, footer { min-height: 76px; justify-content: space-between }
header { border-bottom: 1px solid var(--line) }
.brand { font-weight: 850; letter-spacing: .15em; white-space: nowrap }
.mark { color: var(--mint); margin-right: .25em }
nav a, footer { color: var(--muted) }
nav a:hover { color: var(--mint) }
main { background: radial-gradient(ellipse at 82% 10%, #12302e 0%, transparent 36%), radial-gradient(ellipse at 2% 32%, #102130 0%, transparent 35%) }
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; padding-block: 100px }
.eyebrow { color: var(--mint); font: 700 .875rem/1.5 Consolas, monospace; letter-spacing: .16em }
h1, h2, p { margin: 0 }
h1 { margin-top: 16px; font-size: clamp(2.75rem, 6.05vw, 5.3rem); line-height: .99; letter-spacing: -.075em }
h1 em { font-style: normal; color: var(--mint) }
.intro { margin-block: 28px; max-width: 46ch; font-size: 1.125rem; color: var(--muted) }
.button { display: inline-block; padding: 12px 20px; border-radius: 6px; background: var(--mint); color: #0a231b; font-weight: 750 }
.button:hover { background: #a0f4d0 }
.console { overflow: hidden; border: 1px solid #3a5b63; border-radius: 16px; background: var(--panel); box-shadow: 0 24px 80px #0006; scroll-margin-top: 24px }
.console-top { display: flex; justify-content: space-between; padding: 12px 24px; color: var(--muted); border-bottom: 1px solid var(--line); font: .875rem/1.7 Consolas, monospace }
.console-top i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; background: var(--mint); border-radius: 50% }
.console-body { padding: 24px }
.console h2 { font-size: 1.45rem; line-height: 1.2 }
.console h2 + p { color: var(--muted); margin-top: 6px }
.bars { display: grid; gap: 9px; margin-block: 20px }
.row { display: grid; grid-template-columns: 65px 1fr 50px; align-items: center; gap: 10px; font-size: .875rem }
.row span:last-child, output { text-align: right; font: 700 .9rem/1.5 Consolas, monospace }
meter { width: 100%; height: 10px; appearance: none }
meter::-webkit-meter-bar { background: #233947; border: 0; border-radius: 3px }
meter::-webkit-meter-optimum-value { background: var(--mint); border-radius: 3px }
meter::-moz-meter-bar { background: var(--mint); border-radius: 3px }
.row.limit meter::-webkit-meter-optimum-value { background: #ffd184 }
.row.limit meter::-moz-meter-bar { background: #ffd184 }
label { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 14px }
input { width: 100%; accent-color: var(--mint); margin: 10px 0 }
.decision { padding: 8px 10px; border-radius: 5px; background: #19362f; color: var(--mint); font-size: .875rem }
.decision.stop { color: #ffd184; background: #382c21 }
.band { background: #0d1720; border-block: 1px solid var(--line) }
.lower { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; padding-block: 70px }
.lower h2 { margin-top: 12px; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.07; letter-spacing: -.045em }
.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line) }
.steps li { padding: 16px 0 17px 20px; border-bottom: 1px solid var(--line); position: relative }
.steps li::before { content: ""; position: absolute; width: 6px; height: 6px; background: var(--mint); top: 26px; left: 0; transform: rotate(45deg) }
.steps p, .muted { color: var(--muted); margin-top: 4px }
.muted { margin-top: 16px; max-width: 34ch }
footer { border-top: 1px solid var(--line); font-size: .875rem }
@media (max-width: 800px) {
  .hero, .lower { grid-template-columns: 1fr; gap: 32px; padding-block: 48px }
}
@media (max-width: 420px) {
  .wrap { width: calc(100% - 32px) }
  nav { gap: 14px; font-size: .875rem }
  .console-body, .console-top { padding-inline: 16px }
  footer { gap: 12px }
}
@media (prefers-reduced-motion: reduce) { :root { scroll-behavior: auto } }
.gameplay { border-bottom: 1px solid var(--line); align-items: center }
.gameplay video { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; background: #000 }
@media (max-width: 420px) {
  header { gap: 8px; flex-wrap: wrap; padding-block: 12px }
}
.gameplay-media { min-width: 0 }
.gameplay-media img { display: block; width: 100%; height: auto; border-radius: 12px }
.gameplay-media [hidden] { display: none }
#video-error { margin-top: 12px; color: var(--muted) }
.video-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 12px }
.video-actions a { text-decoration: underline; text-underline-offset: .2em }
.video-actions button { padding: .35em .75em; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); color: var(--text); font: inherit; cursor: pointer }
.row[hidden] { display: none }
.hp-scenario { border: 0; padding: 0; margin-bottom: 5px }
#hp-scenario { width: 100%; padding: 7px 10px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); color: var(--text); font: inherit }
#hp-scenario:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px }
label[for="threshold"] { gap: 8px }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px }
.demo-link { text-decoration: underline; text-underline-offset: .2em }
.demo-link:hover { color: var(--mint) }
header { flex-wrap: wrap }
nav { flex-wrap: wrap }
#trial-form label { border: 0; padding: 0 }
#trial-code { padding: .6em .75em; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit }
#trial-form button { border: 0; cursor: pointer; font: inherit; font-weight: 750 }
.trial-panel { min-width: 0 }
.trial-demo { margin-top: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 6px }
.trial-demo summary { cursor: pointer; font-weight: 700 }
.trial-demo > p { margin-top: 8px; color: var(--muted) }
.trial-demo-fields { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 12px }
.trial-demo-fields label { border: 0; padding: 0 }
.trial-demo-fields input, .trial-demo-fields select { width: auto; margin: 4px 0 0; padding: 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--text); font: inherit }
.trial-demo .button { border: 0; cursor: pointer; font: inherit; font-weight: 750 }
#trial-demo-result:not(:empty) { margin-top: 10px }
