:root {
  color-scheme: dark;
  --ink: #eef6f2;
  --muted: #a9bbb5;
  --panel: rgba(15, 28, 27, 0.9);
  --line: rgba(181, 255, 220, 0.18);
  --mint: #74f5bd;
  --amber: #ffca70;
  --red: #ff8d8d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #07100f;
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 20% 0%, #183c34, transparent 38rem), #07100f; }
a { color: var(--mint); }
.skip { position: fixed; left: 1rem; top: -5rem; z-index: 20; padding: .75rem; background: #fff; color: #000; }
.skip:focus { top: 1rem; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 2rem; padding: 4rem max(1.25rem, calc((100vw - 1180px) / 2)); border-bottom: 1px solid var(--line); }
h1, h2 { margin: 0; letter-spacing: -.035em; }
h1 { font-size: clamp(3.4rem, 9vw, 7rem); line-height: .85; }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
.eyebrow { color: var(--mint); text-transform: uppercase; letter-spacing: .13em; font-size: .75rem; font-weight: 800; }
.lede { color: var(--muted); max-width: 38rem; font-size: 1.15rem; }
.safety { display: flex; flex-wrap: wrap; justify-content: end; gap: .5rem; max-width: 30rem; }
.safety span, .badge { border: 1px solid var(--line); border-radius: 999px; padding: .45rem .75rem; background: rgba(116, 245, 189, .08); color: var(--mint); font-size: .8rem; }
nav { position: sticky; top: 0; z-index: 10; display: flex; gap: 1.25rem; overflow-x: auto; padding: 1rem max(1.25rem, calc((100vw - 1180px) / 2)); background: rgba(7, 16, 15, .94); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
nav a { white-space: nowrap; color: var(--ink); text-decoration: none; font-size: .9rem; }
main { width: min(1180px, calc(100% - 2.5rem)); margin: 2rem auto 6rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.panel { min-width: 0; padding: clamp(1.1rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: 1.25rem; background: var(--panel); box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .22); }
.panel.wide { grid-column: 1 / -1; }
.section-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: start; margin-bottom: 1rem; }
.viewport-shell { position: relative; overflow: hidden; aspect-ratio: 16 / 8; min-height: 280px; border-radius: 1rem; border: 1px solid var(--line); background: #020706; }
canvas { display: block; width: 100%; height: 100%; }
#fallbackCanvas, #webgpuCanvas, #webglCanvas { position: absolute; inset: 0; }
canvas:focus-visible { outline: 3px solid var(--mint); outline-offset: -4px; }
.hud { position: absolute; inset: auto 1rem 1rem; display: flex; justify-content: space-between; gap: 1rem; color: #dcfff0; font: .78rem ui-monospace, monospace; pointer-events: none; }
.controls { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
button, select, input, textarea { border: 1px solid var(--line); border-radius: .6rem; background: #0a1816; color: var(--ink); font: inherit; }
button { padding: .65rem .9rem; cursor: pointer; }
button:hover, button:focus-visible { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(116, 245, 189, .13); }
button:disabled { opacity: .45; cursor: not-allowed; }
select, input { padding: .55rem; width: 100%; }
label { display: grid; gap: .4rem; margin: .8rem 0; color: var(--muted); }
textarea { width: 100%; min-height: 7rem; padding: .75rem; resize: vertical; }
textarea.code { min-height: 17rem; font: .82rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; tab-size: 2; }
.field-row { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem; }
.field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.renderer-controls label { margin: 0; }
.result { display: block; min-height: 3rem; border-left: 3px solid var(--mint); padding: .8rem; background: rgba(116, 245, 189, .06); white-space: pre-wrap; overflow-wrap: anywhere; }
.result.error { border-color: var(--red); background: rgba(255, 141, 141, .08); }
.result.compact { min-height: 0; }
.component-list { display: grid; gap: .45rem; margin-top: 1rem; }
.component { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem; padding: .55rem; border-bottom: 1px solid var(--line); }
.component input { width: auto; }
.component small { color: var(--muted); }
.totals { display: flex; flex-wrap: wrap; gap: 1rem; }
.totals div { min-width: 8rem; }
.totals dt { color: var(--muted); font-size: .78rem; }
.totals dd { margin: .2rem 0; font-weight: 750; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: .75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { color: var(--mint); }
.decision { text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; color: var(--amber); }
.textual, .muted { color: var(--muted); }
.comparison { border-left: 3px solid var(--amber); padding-left: 1rem; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .65rem; }
.catalog-card { border: 1px solid var(--line); border-radius: .75rem; padding: .75rem; }
.catalog-card p { margin: .25rem 0; }
footer { padding: 2rem; text-align: center; 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; }
.landing-page { display: grid; grid-template-rows: 1fr auto; }
.landing-shell { align-self: center; grid-template-columns: minmax(0, 1.35fr) minmax(18rem, .85fr); margin-block: clamp(2rem, 8vh, 6rem); }
.landing-card { padding: clamp(1.4rem, 4vw, 3.2rem); border: 1px solid var(--line); border-radius: 1.5rem; background: var(--panel); box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .24); }
.landing-card:first-child { grid-row: span 2; display: flex; flex-direction: column; justify-content: center; }
.landing-card.access-card code { color: var(--mint); overflow-wrap: anywhere; }
.landing-safety { justify-content: start; margin: 1.25rem 0; }
.google-button { display: inline-flex; align-items: center; justify-content: center; gap: .75rem; width: min(100%, 22rem); min-height: 3.25rem; margin-top: 1rem; padding: .75rem 1.25rem; border-radius: .75rem; background: #fff; color: #17211f; font-weight: 800; text-decoration: none; }
.google-button:hover, .google-button:focus-visible { box-shadow: 0 0 0 4px rgba(116, 245, 189, .28); }
.google-mark { display: grid; place-items: center; width: 1.65rem; height: 1.65rem; border-radius: 50%; background: linear-gradient(135deg, #4285f4 25%, #34a853 25% 50%, #fbbc05 50% 75%, #ea4335 75%); color: #fff; }
.login-note { max-width: 35rem; font-size: .9rem; }
.tutorial-list { display: grid; gap: .85rem; padding-left: 1.25rem; color: var(--muted); }
.tutorial-list strong { color: var(--ink); }
.workspace-hero { align-items: center; flex-wrap: wrap; }
.workspace-hero h1 { font-size: clamp(3rem, 7vw, 5.5rem); }
.account-card { display: grid; gap: .45rem; min-width: min(100%, 17rem); padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: rgba(7, 16, 15, .72); }
.account-card button { width: fit-content; }
.resource-badges { display: flex; flex-wrap: wrap; gap: .35rem; }
.resource-badges span { padding: .25rem .45rem; border-radius: .45rem; background: rgba(116, 245, 189, .1); color: var(--mint); font: .68rem ui-monospace, monospace; }
.tutorial-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; padding: 0; list-style: none; counter-reset: tutorial; }
.tutorial-grid li { display: grid; gap: .4rem; padding: 1rem; border: 1px solid var(--line); border-radius: .9rem; color: var(--muted); counter-increment: tutorial; }
.tutorial-grid li::before { content: counter(tutorial); color: var(--mint); font-weight: 900; }
.tutorial-grid strong { color: var(--ink); }
.movement-controls button { min-width: 5.5rem; min-height: 3rem; touch-action: manipulation; }
@media (max-width: 760px) {
  .hero { align-items: start; flex-direction: column; padding-top: 2.5rem; }
  .safety { justify-content: start; }
  main { grid-template-columns: 1fr; }
  .panel.wide { grid-column: auto; }
  .field-row { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .hud { flex-direction: column; }
  .landing-shell { width: min(100% - 1.5rem, 42rem); }
  .landing-card:first-child { grid-row: auto; }
  .tutorial-grid { grid-template-columns: 1fr; }
  .movement-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .movement-controls button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
