:root {
  color-scheme: light;
  --ink: #15171a;
  --muted: #66707a;
  --paper: #f7f5ef;
  --line: #d9d4c8;
  --charcoal: #101419;
  --red: #c61f2a;
  --teal: #10a7a7;
  --steel: #eef2f4;
  --white: #ffffff;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.48;
}

a {
  color: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  color: var(--white);
  background: rgba(16, 20, 25, 0.76);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
}

.brand {
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
}

nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.84);
}

nav a:hover {
  color: var(--white);
}

.hero {
  position: relative;
  min-height: 78vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  background: var(--charcoal);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 14, 18, 0.9) 0%, rgba(12, 14, 18, 0.64) 40%, rgba(12, 14, 18, 0.14) 78%),
    linear-gradient(0deg, rgba(12, 14, 18, 0.48) 0%, rgba(12, 14, 18, 0) 45%);
}

.hero-image-guard {
  position: absolute;
  inset: 0;
  z-index: 1;
  user-select: none;
  -webkit-user-select: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 100px 0 58px;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(64px, 13vw, 148px);
  line-height: 0.86;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 19px;
  letter-spacing: 0;
}

.lead {
  max-width: 650px;
  margin-bottom: 24px;
  font-size: 22px;
  color: rgba(255, 255, 255, 0.9);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.button.primary {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.band {
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.section {
  padding: 58px 28px;
}

.section-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.intro {
  padding: 34px 28px;
}

.intro-grid,
.split,
.next-grid,
.token-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.82fr) minmax(0, 1.18fr);
  gap: 36px;
  align-items: start;
}

.intro p,
.copy p,
.token-layout p,
.steps,
.section-note {
  color: var(--muted);
  font-size: 16px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.section-note {
  max-width: 360px;
  margin-bottom: 0;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.tile {
  min-height: 246px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.tile-label {
  display: block;
  margin-bottom: 32px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
}

.tile p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.dark {
  color: var(--white);
  background: var(--charcoal);
}

.dark .eyebrow {
  color: #5fd5d0;
}

.dark p {
  color: rgba(255, 255, 255, 0.76);
}

.spec-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.spec-card dl {
  margin: 0;
  display: grid;
  gap: 10px;
}

.spec-card div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.spec-card div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.spec-card dt {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
}

.spec-card dd {
  margin: 0;
  color: var(--white);
  font-weight: 800;
  word-break: break-word;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.arena-band {
  background: #f9f7f2;
  border-top: 1px solid var(--line);
}

.arena-grid {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.arena-panel {
  min-height: 260px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.champion-panel {
  color: var(--white);
  background: var(--charcoal);
  border-color: var(--charcoal);
}

.champion-panel .tile-label {
  color: #5fd5d0;
}

.arena-panel p {
  color: var(--muted);
  font-size: 14px;
}

.champion-panel p {
  color: rgba(255, 255, 255, 0.74);
}

.arena-console {
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.arena-console-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.arena-console-head h3 {
  margin-bottom: 0;
}

.api-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  color: #7a4e00;
  background: #fff2d8;
  font-size: 12px;
  font-weight: 800;
}

.api-pill.live {
  color: #0c6968;
  background: #e5f7f6;
}

.arena-live-grid {
  display: grid;
  grid-template-columns: 0.7fr 1fr 1.2fr;
  gap: 12px;
}

.live-panel {
  min-height: 210px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.live-panel h4 {
  margin: 0 0 12px;
  font-size: 15px;
}

.compact-facts {
  display: grid;
  gap: 8px;
  margin: 0;
}

.compact-facts div {
  display: grid;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.compact-facts dt {
  color: var(--muted);
  font-size: 12px;
}

.compact-facts dd {
  margin: 0;
  font-weight: 800;
  word-break: break-word;
}

.leaderboard-list {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.leaderboard-entry {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.leaderboard-entry strong,
.leaderboard-entry span {
  overflow-wrap: anywhere;
}

.commit-form {
  display: grid;
  gap: 8px;
}

.commit-form label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.commit-form input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-size: 12px;
}

.commit-form button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: var(--white);
  background: var(--red);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.commit-form button:disabled {
  color: #7f8791;
  background: #e7ebef;
  cursor: not-allowed;
}

.form-message {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.sim-band {
  color: var(--white);
  background: #15171a;
}

.sim-band .eyebrow {
  color: #5fd5d0;
}

.sim-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 12px;
  align-items: stretch;
}

.sim-stage {
  min-height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  overflow: hidden;
  background: #090b0e;
}

.sim-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  image-rendering: pixelated;
}

.sim-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.score-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.score-row span,
.meter span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
}

.score-row strong {
  color: var(--white);
  font-size: 22px;
}

.meter {
  display: grid;
  gap: 7px;
}

.meter i {
  display: block;
  width: 72%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), #f2d06b, var(--red));
}

.sim-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.sim-actions button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  padding: 8px 11px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.sim-actions button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.console-band {
  background: #f1ece3;
  border-top: 1px solid var(--line);
}

.console-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.console-panel {
  min-height: 248px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.console-panel p {
  color: var(--muted);
}

.console-panel pre {
  overflow-x: auto;
  margin: 0;
  padding: 14px;
  border-radius: 6px;
  color: #e7f4f3;
  background: var(--charcoal);
  font-size: 13px;
  line-height: 1.5;
}

.input-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.input-list li {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.input-list span {
  color: var(--muted);
  font-size: 13px;
  word-break: break-word;
}

.input-list strong {
  flex: 0 0 auto;
  color: var(--red);
  font-size: 12px;
}

.status-card {
  min-height: 240px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.status-card strong {
  display: block;
  margin-bottom: 26px;
  color: var(--red);
  font-size: 12px;
}

.status-card p {
  color: var(--muted);
  font-size: 14px;
}

.status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
}

.status.pending {
  background: #fff2d8;
  color: #7a4e00;
}

.status.draft {
  background: #e5f7f6;
  color: #0c6968;
}

.copy {
  border-left: 4px solid var(--red);
  padding-left: 20px;
}

.heian-band {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.text-link {
  color: #1f5e72;
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid rgba(31, 94, 114, 0.36);
}

.final-band {
  background: var(--steel);
}

.steps {
  margin: 0;
  padding-left: 22px;
}

.steps li {
  margin-bottom: 10px;
  padding-left: 4px;
}

footer {
  padding: 22px 28px 32px;
  color: var(--muted);
  background: var(--white);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

footer p {
  width: min(1120px, 100%);
  margin: 0 auto;
}

footer a {
  color: #1f5e72;
  text-decoration: none;
  border-bottom: 1px solid rgba(31, 94, 114, 0.36);
}

.not-found {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 32px;
  color: var(--white);
  background: var(--charcoal);
}

.not-found section {
  width: min(620px, 100%);
  margin: 0 auto;
}

.not-found h1 {
  font-size: clamp(48px, 10vw, 112px);
}

@media (max-width: 960px) {
  .tiles,
  .arena-grid,
  .arena-live-grid,
  .console-grid,
  .status-grid,
  .sim-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intro-grid,
  .split,
  .next-grid,
  .token-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .section-title {
    display: block;
  }

  .section-note {
    max-width: none;
    margin-top: 12px;
  }

  h2 {
    font-size: 29px;
  }
}

@media (max-width: 680px) {
  .site-header {
    padding: 12px 16px;
  }

  nav {
    gap: 10px;
    font-size: 12px;
  }

  .hero {
    min-height: 76vh;
  }

  .hero-content {
    width: calc(100% - 32px);
    padding-top: 84px;
  }

  .lead {
    font-size: 18px;
  }

  .section,
  .intro {
    padding-left: 16px;
    padding-right: 16px;
  }

  .tiles,
  .arena-grid,
  .arena-live-grid,
  .console-grid,
  .status-grid,
  .sim-layout {
    grid-template-columns: 1fr;
  }

  .tile,
  .status-card {
    min-height: auto;
  }

  .tile-label,
  .status-card strong {
    margin-bottom: 18px;
  }

  .spec-card div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}
