:root {
  color-scheme: dark;
  --bg: #111312;
  --panel: #191d1a;
  --panel-strong: #20261f;
  --ink: #f2f0e8;
  --muted: #b9b7ad;
  --dim: #87877d;
  --line: #373d36;
  --accent: #d8ef71;
  --accent-ink: #15170d;
  --blue: #7fb8ff;
  --red: #ff7d68;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  font: inherit;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(17, 19, 18, 0.74);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 16px;
}

.nav {
  display: flex;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  padding: 8px 10px;
  border-radius: 6px;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
}

.hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #050705;
}

.hero-copy {
  position: absolute;
  left: clamp(18px, 4vw, 56px);
  bottom: clamp(20px, 4vw, 44px);
  z-index: 3;
  width: min(560px, calc(100% - 36px));
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(17, 19, 18, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 0.98;
}

h1 {
  font-size: clamp(38px, 7vw, 86px);
}

h2 {
  max-width: 720px;
  font-size: clamp(34px, 5vw, 64px);
}

.lead {
  max-width: 580px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 19px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.primary-action,
.secondary-action,
.toolbar-actions button {
  min-height: 42px;
  border-radius: 7px;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.primary-action {
  padding: 0 18px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  color: var(--ink);
}

.primary-action:hover,
.secondary-action:hover,
.toolbar-actions button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.emulator-panel {
  position: relative;
  min-width: 0;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  background: var(--panel);
  overflow: hidden;
}

.emulator-toolbar {
  position: absolute;
  top: 64px;
  left: clamp(12px, 2vw, 24px);
  right: clamp(12px, 2vw, 24px);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 10px 12px 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(32, 38, 31, 0.78);
  box-shadow: 0 14px 46px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.status-group {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--dim);
}

.status-dot.is-ready,
.status-dot.is-running {
  background: var(--accent);
}

.status-dot.is-error {
  background: var(--red);
}

.toolbar-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.toolbar-actions button {
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #151816;
  color: var(--ink);
}

.toolbar-actions button:disabled {
  cursor: not-allowed;
  color: var(--dim);
}

.boot-choice {
  min-width: 58px;
}

.screen-shell {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background:
    linear-gradient(rgba(216, 239, 113, 0.03) 50%, transparent 50%) 0 0 / 100% 4px,
    #050705;
}

.screen-container {
  position: absolute;
  inset: 0;
  display: grid;
  overflow: hidden;
}

.screen-container > div,
.screen-container > canvas {
  width: 100%;
  height: 100%;
}

.screen-text {
  white-space: pre;
  overflow: hidden;
  padding: 142px clamp(18px, 3vw, 44px) 160px;
  color: #dcefb0;
  font: 14px/1.35 "Berkeley Mono", "SFMono-Regular", Consolas, monospace;
}

.screen-canvas {
  display: none;
  image-rendering: pixelated;
}

.screen-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-content: center;
  justify-content: center;
  align-items: center;
  justify-items: center;
  gap: 8px;
  padding: 124px 28px 180px;
  color: var(--muted);
  text-align: center;
  background: radial-gradient(circle at 50% 30%, rgba(216, 239, 113, 0.09), transparent 38%);
}

.screen-placeholder img {
  width: min(92%, 580px);
  max-height: 58%;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.screen-placeholder p {
  max-width: 460px;
  margin: 0;
}

.placeholder-note {
  color: var(--dim);
  font-size: 14px;
}

.screen-placeholder.is-hidden {
  display: none;
}

.info-band {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 420px);
  gap: clamp(24px, 5vw, 64px);
  align-items: end;
  padding: clamp(48px, 7vw, 96px) clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section-copy p:not(.eyebrow) {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.command-box {
  display: grid;
  gap: 10px;
}

.command-box code {
  display: block;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 13px 14px;
  background: #090b0a;
  color: var(--blue);
  font: 15px/1.35 "SFMono-Regular", Consolas, monospace;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.status-grid article {
  min-height: 230px;
  padding: clamp(22px, 3vw, 34px);
  background: var(--bg);
}

.status-grid span {
  display: block;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-grid strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
}

.status-grid p {
  margin: 14px 0 0;
  color: var(--muted);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(18px, 4vw, 56px);
  color: var(--dim);
  font-size: 14px;
}

.footer a {
  color: var(--muted);
}

.nl-wrap,
.nl-badge,
.nl-card {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (max-width: 880px) {
  .info-band,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    right: 18px;
    width: auto;
  }

  .screen-text {
    padding-bottom: 220px;
  }
}

@media (max-width: 560px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .emulator-toolbar {
    align-items: stretch;
    flex-direction: column;
    top: 112px;
  }

  .toolbar-actions button {
    flex: 1 1 72px;
  }

  .hero-copy {
    padding: 14px;
  }

  .eyebrow {
    margin-bottom: 8px;
  }

  .hero-actions {
    margin-top: 14px;
  }

  .screen-text {
    padding-top: 216px;
    padding-bottom: 236px;
  }
}
