:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --bg: #0a0d0f;
  --surface: #10161a;
  --raised: #151c20;
  --text: #f1f2ed;
  --secondary: #a8b0b2;
  --muted: #737e82;
  --border: #2a353a;
  --strong-border: #3a474d;
  --lime: #a7db36;
  --lime-strong: #c0f14e;
  --amber: #f2ad32;
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, monospace;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: var(--bg); }
a { color: inherit; }
button, input { color: inherit; font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 64px;
  padding: 0 28px;
  border-bottom: 1px solid var(--strong-border);
  background: rgb(10 13 15 / 94%);
  backdrop-filter: blur(14px);
}

.brand { display: inline-flex; gap: 12px; align-items: center; width: fit-content; font-weight: 680; text-decoration: none; }
.chip-mark { position: relative; display: grid; width: 27px; height: 27px; place-items: center; border: 1px dashed var(--strong-border); }
.chip-mark::before, .chip-mark::after { position: absolute; content: ""; background: var(--muted); }
.chip-mark::before { inset: 5px; border: 1px solid var(--text); background: transparent; }
.chip-mark::after { width: 7px; height: 7px; border: 1px solid var(--lime); background: transparent; }
.chip-mark i, .chip-mark i::before { position: absolute; content: ""; }
.chip-mark i { inset: 3px -4px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.chip-mark i::before { inset: -7px 7px; border-right: 1px solid var(--border); border-left: 1px solid var(--border); }

nav { display: flex; gap: 28px; align-items: center; }
nav a { color: var(--secondary); font-size: 12px; text-decoration: none; }
nav a:hover { color: var(--text); }

.runtime-state { display: flex; gap: 9px; align-items: center; justify-self: end; color: var(--secondary); font: 10px var(--mono); text-transform: uppercase; }
.runtime-state span { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.runtime-state[data-ready="true"] span { background: var(--lime); box-shadow: 0 0 0 4px rgb(167 219 54 / 10%); }

main { overflow: hidden; }
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, 0.7fr);
  gap: clamp(48px, 8vw, 128px);
  min-height: 690px;
  padding: 100px max(32px, calc((100vw - 1280px) / 2)) 82px;
  background:
    linear-gradient(rgb(255 255 255 / 1%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 1%) 1px, transparent 1px),
    radial-gradient(circle at 18% 30%, rgb(167 219 54 / 5%), transparent 34%);
  background-size: 32px 32px, 32px 32px, auto;
}
.hero::after { position: absolute; right: 0; bottom: 0; left: 0; height: 1px; content: ""; background: var(--strong-border); }
.hero-copy { align-self: center; max-width: 760px; }
.eyebrow { display: flex; gap: 10px; align-items: center; margin: 0 0 20px; color: var(--secondary); font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.eyebrow span { width: 17px; height: 1px; background: var(--lime); }
h1 { max-width: 760px; margin: 0; font-size: clamp(48px, 6.2vw, 88px); font-weight: 590; letter-spacing: -.055em; line-height: .98; }
h1 em { color: var(--lime); font-style: normal; }
.hero-summary { max-width: 680px; margin: 30px 0 0; color: var(--secondary); font-size: 16px; line-height: 1.75; }
.hero-actions { display: flex; gap: 12px; margin-top: 34px; }
.primary-link, .secondary-link, .card-workbench-link { display: inline-flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 18px; border: 1px solid var(--border); border-radius: 5px; font-size: 12px; font-weight: 620; text-decoration: none; }
.primary-link { min-width: 180px; color: #111608; border-color: var(--lime); background: var(--lime); }
.primary-link:hover { background: var(--lime-strong); }
.secondary-link:hover { border-color: var(--strong-border); background: var(--raised); }
.hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; max-width: 720px; margin: 50px 0 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.hero-facts div { padding: 15px 14px; border-right: 1px solid var(--border); }
.hero-facts div:first-child { padding-left: 0; }
.hero-facts div:last-child { border-right: 0; }
.hero-facts dt { margin-bottom: 5px; color: var(--muted); font: 9px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.hero-facts dd { margin: 0; color: var(--secondary); font: 10px var(--mono); }

.access-card { align-self: center; border: 1px solid var(--strong-border); border-radius: 8px; background: rgb(16 22 26 / 96%); box-shadow: 0 30px 80px rgb(0 0 0 / 35%); }
.access-card > div { padding: 26px 28px 28px; }
.access-card .card-kicker { padding: 13px 16px; color: var(--muted); border-bottom: 1px solid var(--border); font: 9px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.access-card h2 { margin: 0 0 10px; font-size: 24px; font-weight: 610; letter-spacing: -.025em; }
.access-card p { margin: 0; color: var(--secondary); font-size: 12px; line-height: 1.65; }
.access-card form { display: grid; gap: 14px; margin-top: 24px; }
.anonymous-access { padding: 16px 0 18px !important; margin-top: 20px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.anonymous-access a { display: inline-flex; gap: 16px; align-items: center; margin-top: 12px; color: var(--lime); font-size: 11px; text-decoration: none; }
.access-card label { display: grid; gap: 7px; color: var(--secondary); font-size: 10px; }
.access-card input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--border); border-radius: 4px; background: #0b1013; font: 12px var(--mono); }
.access-card input:hover { border-color: var(--strong-border); }
.access-card form button, .card-workbench-link { width: 100%; min-height: 43px; margin-top: 4px; padding: 0 14px; color: #121708; border: 1px solid var(--lime); border-radius: 4px; background: var(--lime); font-size: 11px; font-weight: 680; cursor: pointer; }
.access-card form button { display: flex; align-items: center; justify-content: space-between; }
.access-card form button:disabled { cursor: wait; opacity: .6; }
.form-message { min-height: 18px; color: var(--amber) !important; font: 10px var(--mono) !important; }
.access-card footer { display: flex; justify-content: space-between; padding: 12px 16px; color: var(--muted); border-top: 1px solid var(--border); font: 8px var(--mono); }
.account-signal { display: flex; gap: 8px; align-items: center; margin-bottom: 20px; color: var(--lime); font: 9px var(--mono); text-transform: uppercase; }
.account-signal span { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }
.card-workbench-link { margin-top: 24px; }
.logout-button { width: 100%; margin-top: 12px; color: var(--secondary); border: 0; background: transparent; font-size: 10px; cursor: pointer; }

.signal-strip { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; max-width: 1280px; padding: 30px 0; margin: 0 auto; border-bottom: 1px solid var(--border); }
.signal-strip div { display: grid; grid-template-columns: 28px 1fr; gap: 1px 10px; padding: 0 20px; }
.signal-strip div > span { grid-row: 1 / 3; align-self: center; color: var(--lime); font: 9px var(--mono); }
.signal-strip strong { font-size: 12px; font-weight: 600; }
.signal-strip small { color: var(--muted); font: 8px var(--mono); }
.signal-strip > i { width: 28px; height: 1px; background: var(--border); }

.section-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 90px; max-width: 1280px; padding: 110px 0; margin: 0 auto; }
.section-intro h2, .boundary h2 { margin: 0; font-size: clamp(34px, 4vw, 56px); font-weight: 560; letter-spacing: -.045em; line-height: 1.05; }
.section-intro > p:last-child, .boundary-copy > p { color: var(--secondary); line-height: 1.75; }
.capability-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--strong-border); border-left: 1px solid var(--strong-border); }
.capability-grid article { min-height: 210px; padding: 24px; border-right: 1px solid var(--strong-border); border-bottom: 1px solid var(--strong-border); background: var(--surface); }
.capability-state { color: var(--lime); font: 8px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.capability-state.behavioral { color: var(--amber); }
.capability-state.physical { color: var(--muted); }
.capability-grid h3 { margin: 36px 0 10px; font-size: 16px; font-weight: 600; }
.capability-grid p { margin: 0; color: var(--secondary); font-size: 11px; line-height: 1.7; }

.boundary { display: grid; grid-template-columns: .8fr 1.2fr; gap: 90px; padding: 100px max(32px, calc((100vw - 1280px) / 2)); border-top: 1px solid var(--strong-border); background: #0d1215; }
.boundary-copy a { display: inline-block; margin-top: 18px; color: var(--lime); font-size: 11px; text-decoration: none; }
.boundary-diagram { display: grid; grid-template-columns: 1fr auto 1fr auto 1.2fr; gap: 12px; align-items: center; }
.boundary-diagram > div { min-height: 112px; padding: 18px; border: 1px solid var(--border); background: #0a0f12; }
.boundary-diagram > span { color: var(--muted); font: 7px var(--mono); writing-mode: vertical-rl; }
.boundary-diagram small { display: block; margin-bottom: 22px; color: var(--muted); font: 8px var(--mono); text-transform: uppercase; }
.boundary-diagram strong { font-size: 12px; }
.worker-node { border-color: #607c2c !important; }
.worker-node ul { padding: 10px 0 0 14px; margin: 0; color: var(--secondary); font: 8px/1.7 var(--mono); }

.site-footer { display: flex; justify-content: space-between; padding: 24px max(28px, calc((100vw - 1280px) / 2)); color: var(--muted); border-top: 1px solid var(--border); font: 9px var(--mono); }

@media (max-width: 1080px) {
  .site-header { grid-template-columns: 1fr auto; }
  nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 72px; }
  .access-card { width: min(100%, 580px); }
  .section-grid, .boundary { grid-template-columns: 1fr; gap: 48px; padding-right: 28px; padding-left: 28px; }
  .signal-strip { margin: 0 28px; }
}

@media (max-width: 700px) {
  .site-header { min-height: 58px; padding: 0 14px; }
  .brand { font-size: 13px; }
  .runtime-state output { display: none; }
  .hero { gap: 52px; min-height: auto; padding: 62px 18px 54px; }
  h1 { font-size: clamp(42px, 13vw, 62px); }
  .hero-summary { font-size: 14px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .primary-link, .secondary-link { width: 100%; }
  .hero-facts { grid-template-columns: 1fr; }
  .hero-facts div, .hero-facts div:first-child { padding: 12px 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .hero-facts div:last-child { border-bottom: 0; }
  .access-card > div { padding: 22px 20px 24px; }
  .signal-strip { grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 0 18px; }
  .signal-strip > i { display: none; }
  .section-grid, .boundary { padding: 76px 18px; }
  .capability-grid { grid-template-columns: 1fr; }
  .boundary-diagram { grid-template-columns: 1fr; }
  .boundary-diagram > span { writing-mode: initial; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 10px; padding: 22px 18px; }
}

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