:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #07101c;
    color: #edf5ff;
    font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at 80% 0%, #163452 0, transparent 35%), #07101c; }
a { color: inherit; }
.site-header, main, footer { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.site-header { min-height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #213249; }
.brand { color: #f3f8ff; font-size: 1.65rem; font-weight: 850; letter-spacing: -.06em; text-decoration: none; }
.brand span, h1 span { color: #61d6c5; }
nav { display: flex; gap: 1.7rem; }
nav a { color: #a9bad0; font-size: .9rem; text-decoration: none; }
nav a:hover { color: #fff; }
.intro { display: grid; grid-template-columns: 1.4fr 1fr; gap: 4rem; align-items: end; padding: 4.5rem 0 2.7rem; }
.eyebrow { margin: 0 0 .85rem; color: #61d6c5; font-size: .72rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2.7rem, 6vw, 5rem); line-height: .99; letter-spacing: -.055em; }
.lede { margin: 0 0 .35rem; color: #a9bad0; font-size: 1.05rem; line-height: 1.75; }
.demo-shell { display: grid; grid-template-columns: minmax(0, 1fr) 290px; overflow: hidden; border: 1px solid #2b405c; border-radius: 1.1rem; background: #0c1828; box-shadow: 0 2rem 6rem #0006; }
.viewport { position: relative; min-width: 0; background: #08111f; }
canvas { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; cursor: grab; touch-action: none; }
canvas:active { cursor: grabbing; }
canvas:focus-visible, button:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #ffcb6b; outline-offset: 3px; }
.viewport-badge { position: absolute; top: 1rem; left: 1rem; margin: 0; padding: .4rem .6rem; border: 1px solid #6ee7d455; border-radius: .35rem; background: #07101ccc; color: #8ee8da; font: 700 .63rem ui-monospace, monospace; letter-spacing: .12em; pointer-events: none; }
.interaction-hint { position: absolute; right: 1rem; bottom: .8rem; margin: 0; color: #b8c7da; font-size: .72rem; text-shadow: 0 1px 4px #000; pointer-events: none; }
.control-panel { padding: 1.6rem; border-left: 1px solid #2b405c; }
.control-heading { margin-bottom: 1.5rem; }
.control-heading h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.03em; }
label { display: block; margin-bottom: .5rem; color: #b6c5d8; font-size: .78rem; font-weight: 700; }
select, button { width: 100%; min-height: 43px; border-radius: .55rem; font: inherit; font-size: .83rem; font-weight: 700; }
select { padding: .65rem .7rem; border: 1px solid #354c69; background: #122238; color: #edf5ff; cursor: pointer; }
.button-row { display: grid; gap: .55rem; margin-top: .8rem; }
button { padding: .7rem .8rem; border: 1px solid #61d6c5; background: #61d6c5; color: #06231e; cursor: pointer; }
button:hover { background: #8ae5d7; }
button.secondary { border-color: #354c69; background: transparent; color: #dce8f8; }
button.secondary:hover { background: #162a42; }
.status { min-height: 4.2rem; margin: 1.15rem 0 .55rem; color: #b6c5d8; font-size: .78rem; line-height: 1.55; }
.stats { margin: 0 0 1.25rem; color: #ffcb6b; font: .68rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.scene-inventory { margin: 0; padding-top: .5rem; border-top: 1px solid #2b405c; }
.scene-inventory div { display: flex; justify-content: space-between; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid #213249; font-size: .7rem; }
.scene-inventory dt { color: #8195ae; }
.scene-inventory dd { margin: 0; text-align: right; color: #cedbeb; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; padding: 4.5rem 0; }
.feature-number { margin: 0 0 1.2rem; color: #61d6c5; font: .72rem ui-monospace, monospace; }
.feature-grid h2 { margin: 0 0 .7rem; font-size: 1.12rem; }
.feature-grid p:not(.feature-number) { margin: 0; color: #91a5bd; font-size: .86rem; line-height: 1.7; }
.code-section { display: grid; grid-template-columns: .85fr 1.15fr; gap: 4rem; align-items: center; margin-bottom: 4.5rem; padding: 3rem; border: 1px solid #213249; border-radius: 1rem; background: #0b1726; }
.code-section h2 { margin: 0 0 1rem; font-size: 2rem; letter-spacing: -.04em; }
.code-section p:not(.eyebrow) { color: #9cafc6; line-height: 1.7; }
.text-link { display: inline-block; margin-top: .8rem; color: #61d6c5; font-size: .85rem; text-decoration: none; }
pre { margin: 0; padding: 1.4rem; overflow: auto; border: 1px solid #2b405c; border-radius: .7rem; background: #07101c; color: #c4f4e9; font: .73rem/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; }
footer { display: flex; justify-content: space-between; gap: 2rem; padding: 1.6rem 0 2.5rem; border-top: 1px solid #213249; color: #7e92aa; font-size: .72rem; }
footer p { margin: 0; }
footer strong { color: #cdd9e8; }
noscript { display: block; padding: 1rem; text-align: center; color: #ffcb6b; }

@media (max-width: 900px) {
    .intro { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 3rem; }
    .demo-shell { grid-template-columns: 1fr; }
    .control-panel { border-top: 1px solid #2b405c; border-left: 0; }
    .status { min-height: 0; }
    .code-section { grid-template-columns: 1fr; gap: 2rem; padding: 2rem; }
}
@media (max-width: 620px) {
    .site-header, main, footer { width: min(100% - 24px, 1180px); }
    .site-header { min-height: 72px; }
    nav a:first-child { display: none; }
    nav { gap: 0; }
    .intro { padding: 2.6rem 0 2rem; }
    .lede { font-size: .92rem; }
    .feature-grid { grid-template-columns: 1fr; gap: 2rem; padding: 3rem 0; }
    .code-section { padding: 1.4rem; margin-bottom: 3rem; }
    .code-section h2 { font-size: 1.6rem; }
    pre { font-size: .66rem; }
    footer { display: grid; gap: .7rem; }
    .interaction-hint { font-size: .6rem; }
}
