@font-face {
  font-family: "Spectrum";
  src: url("assets/spectrum.woff") format("woff");
  font-display: swap;
}
:root {
  color-scheme: dark;
  --black: #080808;
  --panel: #171717;
  --white: #ededed;
  --dim: #b0b0b0;
  --line: #484848;
  --cyan: #00ffff;
  --yellow: #ffff00;
  --green: #00ff00;
  --red: #ff3030;
  --pixel: "Spectrum", "Courier New", monospace;
  --mono: "Courier New", Courier, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--black); color: var(--white); font: 14px/1.6 var(--mono); }
button, input { font: inherit; }
button, a, input, summary { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .38; }
button:not(:disabled):active { transform: translate(2px, 2px); box-shadow: none; }
a { color: var(--cyan); text-underline-offset: 4px; }
a:hover { color: var(--yellow); }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible, pre:focus-visible {
  outline: 2px solid var(--yellow); outline-offset: 4px;
}
[hidden] { display: none !important; }
::selection { background: var(--cyan); color: var(--black); }
.page-shell { max-width: 1168px; padding: 0 32px; margin: 0 auto; }
.site-header { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 2px solid var(--white); }
.wordmark { display: flex; align-items: center; gap: 20px; color: var(--white); text-decoration: none; }
.wordmark:hover { color: var(--white); }
.spectrum-wordmark { font-family: var(--pixel); font-size: 16px; line-height: 1.5; }
.wordmark-detail { display: block; color: var(--dim); font: 11px/1.5 var(--mono); letter-spacing: .12em; margin-top: 4px; }
.spectrum-rainbow { display: flex; width: 52px; height: 38px; transform: skew(-22deg); flex: 0 0 52px; overflow: hidden; }
.spectrum-rainbow i { width: 25%; height: 100%; background: #ff0000; }
.spectrum-rainbow i:nth-child(2) { background: #ffff00; }
.spectrum-rainbow i:nth-child(3) { background: #00ff00; }
.spectrum-rainbow i:nth-child(4) { background: #00ffff; }
.site-header nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: 12px; text-transform: uppercase; }
.site-header nav a { color: var(--white); text-decoration: none; }
.site-header nav a:hover { color: var(--cyan); text-decoration: underline; }
.site-header nav a::before { content: "["; color: var(--cyan); }
.site-header nav a::after { content: "]"; color: var(--cyan); }
.introduction { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 28px 0 24px; }
.eyebrow { color: var(--cyan); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 12px; }
.eyebrow span { margin: 0 6px; color: var(--white); }
h1 { font: 48px/1.15 var(--pixel); font-weight: normal; color: var(--yellow); margin: 0; letter-spacing: -1px; }
.deck { color: var(--white); margin: 16px 0 0; font-size: 13px; }
.title-credit { color: var(--dim); margin: 6px 0 0; font-size: 12px; }
.title-credit a { color: var(--white); }
.edition-note { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; font-size: 11px; color: var(--dim); white-space: nowrap; }
.edition-badge { background: var(--white); color: var(--black); padding: 4px 8px; font-family: var(--pixel); font-size: 12px; }
.adventure-layout { display: grid; grid-template-columns: minmax(0, 1fr) 264px; gap: 32px; align-items: start; }
.game-column { min-width: 0; }
.game-frame { border: 2px solid var(--white); background: var(--panel); }
.frame-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--white); color: var(--black); padding: 8px 12px; font-size: 11px; }
.frame-label { font-weight: bold; text-transform: uppercase; white-space: nowrap; }
.runtime-status { display: flex; align-items: center; gap: 7px; text-align: right; font-size: 11px; line-height: 1.3; }
.status-dot { width: 7px; height: 7px; flex: 0 0 7px; background: #007000; }
.runtime-status[data-state="paused"] .status-dot { background: #aa6600; }
.runtime-status[data-state="error"] .status-dot { background: #d00000; }
.screen-mat { position: relative; padding: 20px 16px; min-height: 260px; background: #161616; }
.game-screen { background: #000; aspect-ratio: 4/3; width: 100%; max-width: 512px; margin: 0 auto; overflow: hidden; line-height: 0; }
.game-screen canvas { display: block !important; width: 100% !important; height: 100% !important; max-width: none !important; image-rendering: pixelated; image-rendering: crisp-edges; object-fit: contain; }
.game-screen > div { width: 100% !important; height: 100% !important; }
.screen-overlay { position: absolute; inset: 20px 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #000; color: var(--white); text-align: center; padding: 24px; }
.screen-overlay p { font: 16px/1.5 var(--pixel); color: var(--yellow); margin: 16px 0; }
.screen-overlay > span:last-child { max-width: 360px; font-size: 12px; }
.loading-ring { width: 128px; height: 16px; background: repeating-linear-gradient(90deg, #0000ff 0 8px, #ffff00 8px 16px); animation: tape .8s steps(2) infinite; }
@keyframes tape { 50% { background-position: 8px 0; } }
.screen-overlay.error-state .loading-ring { background: var(--red); animation: none; }
.screen-footer { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; color: var(--dim); border-top: 1px solid var(--line); font-size: 10px; }
.screen-footer::after { content: ""; align-self: stretch; width: 48px; flex: 0 0 48px; background: linear-gradient(115deg, transparent 0 15%, #f00 15% 32%, #ff0 32% 49%, #0f0 49% 66%, #0ff 66% 83%, transparent 83%); }
.command-form { margin-top: 20px; }
.command-form label { display: block; font: 16px/1.5 var(--pixel); color: var(--cyan); margin-bottom: 12px; }
.command-entry { display: flex; align-items: center; gap: 12px; border: 2px solid var(--white); padding: 6px 6px 6px 14px; background: #000; }
.command-entry:focus-within { border-color: var(--yellow); }
.command-prompt { font: 16px var(--pixel); color: var(--yellow); }
.command-entry input { border: 0; background: transparent; flex: 1; min-width: 0; padding: 8px 0; color: var(--white); font: 16px/1.4 var(--mono); caret-color: var(--yellow); outline: none; }
.command-entry input:focus-visible { outline: none; }
.command-entry input::placeholder { color: #8c8c8c; }
.primary-button, .secondary-button { border: 2px solid var(--white); background: var(--white); color: #000; padding: 10px 14px; font-size: 13px; font-weight: bold; white-space: nowrap; border-radius: 0; }
.primary-button:hover:not(:disabled) { background: var(--yellow); border-color: var(--yellow); }
.secondary-button { background: #000; color: var(--white); }
.secondary-button:hover { color: var(--cyan); border-color: var(--cyan); }
.command-hint { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; font-size: 11px; color: var(--dim); margin: 8px 0 0; }
.adventure-sidebar { padding-top: 0; }
.guide-card, .session-card { border-top: 2px solid var(--line); padding: 16px 0 20px; }
.section-number { display: none; }
.adventure-sidebar h2 { font: 16px/1.5 var(--pixel); color: var(--yellow); margin: 0 0 16px; }
.guide-card p { font-size: 13px; color: var(--white); line-height: 1.7; margin: 0; }
.fine-rule { height: 1px; background: var(--line); margin: 20px 0; }
.guide-card h3 { font-size: 12px; color: var(--cyan); text-transform: uppercase; margin: 0 0 12px; }
.quick-commands { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-commands button { border: 1px solid #808080; background: #262626; color: var(--white); padding: 8px 10px; font: 12px var(--mono); box-shadow: 2px 2px 0 #000; text-transform: uppercase; min-height: 36px; }
.quick-commands button:hover:not(:disabled) { color: #000; background: var(--cyan); border-color: var(--cyan); }
.guide-card .small-note, .small-note { margin: 12px 0 0; font-size: 11px; line-height: 1.6; color: var(--dim); }
.session-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.session-buttons button { padding: 9px 2px; border: 1px solid #808080; background: #262626; color: var(--white); font-size: 11px; box-shadow: 2px 2px 0 #000; min-height: 36px; }
.session-buttons button:hover:not(:disabled) { border-color: var(--yellow); color: var(--yellow); }
.file-actions { display: flex; gap: 12px; margin-top: 16px; align-items: center; color: var(--line); }
.text-button { border: 0; padding: 0; background: none; color: var(--cyan); font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.text-button:hover:not(:disabled) { color: var(--yellow); }
.restart-button { width: 100%; margin-top: 24px; display: flex; justify-content: space-between; text-align: left; padding: 12px 0 0; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--white); font-size: 12px; }
.restart-button:hover:not(:disabled) { color: var(--yellow); }
.notice { margin-top: 16px; padding: 12px; border: 1px solid var(--cyan); color: var(--cyan); font-size: 12px; }
.notice[data-type="error"] { border-color: var(--red); color: #ff8080; }
.transcript-details { margin-top: 20px; border-top: 1px solid var(--line); }
.transcript-details summary { display: flex; justify-content: space-between; gap: 16px; list-style: none; padding: 12px 0; color: var(--dim); cursor: pointer; font-size: 12px; }
.transcript-details pre { margin: 0; max-height: 280px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.7 var(--mono); padding: 16px; background: #000; border: 1px solid var(--line); color: var(--white); }
.field-notes { margin-top: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; border-top: 2px solid var(--line); }
.field-notes details { min-width: 0; }
.field-notes summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; padding: 20px 0; list-style: none; font: 16px/1.5 var(--pixel); color: var(--cyan); }
summary::-webkit-details-marker { display: none; }
.disclosure-icon { font-family: var(--mono); font-size: 22px; color: var(--white); }
details[open] .disclosure-icon { transform: rotate(45deg); }
.details-body { font-size: 13px; color: var(--dim); line-height: 1.8; padding-bottom: 16px; }
.details-body p { margin: 0 0 12px; }
code { color: var(--yellow); font: inherit; }
.details-body strong { color: var(--white); }
.credits-section { margin-top: 40px; border-top: 4px solid var(--white); padding-top: 24px; }
.credits-section > h2, .section-heading h2 { font: 24px/1.5 var(--pixel); color: var(--yellow); margin: 12px 0 16px; }
.credits-intro, .section-heading > p { max-width: 760px; margin: 0 0 28px; color: var(--dim); font-size: 14px; }
.credits-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.credit-card { min-width: 0; border-top: 1px solid var(--line); padding: 20px 0 24px; }
.credit-card h3 { margin: 0 0 8px; font: 16px/1.5 var(--pixel); color: var(--white); }
.credit-role { color: var(--cyan); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 12px; }
.credit-card p:not(.credit-role):not(.credit-links) { color: var(--dim); margin: 0 0 16px; font-size: 13px; line-height: 1.7; max-width: 62ch; }
.credit-links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 12px; margin: 0; }
.credits-section h4, .credits-section > h3 { margin: 24px 0 12px; font: 16px/1.5 var(--pixel); color: var(--yellow); }
.credits-supporting { border-top: 1px solid var(--line); padding-top: 16px; color: var(--dim); font-size: 12px; }
.credits-supporting p { margin: 0 0 12px; }
.preservation-credits { border-top: 1px solid var(--line); padding-top: 20px; color: var(--dim); font-size: 13px; }
.preservation-credits h3 { font: 16px/1.6 var(--pixel); color: var(--yellow); margin: 0 0 16px; }
.preservation-credits > p { max-width: 92ch; }
.credits-source-note { font-size: 12px; color: var(--dim); padding: 16px 0; border-top: 1px solid var(--line); }
.site-footer { margin-top: 32px; border-top: 2px solid var(--white); padding: 20px 0 28px; display: flex; justify-content: space-between; gap: 20px; color: var(--dim); font-size: 11px; }
dialog { width: min(480px, calc(100% - 32px)); padding: 28px; color: var(--white); background: #080808; border: 2px solid var(--white); box-shadow: 8px 8px 0 #000; }
dialog::backdrop { background: #000c; }
dialog h2 { font: 24px/1.5 var(--pixel); color: var(--yellow); margin: 0 0 16px; }
dialog p { color: var(--dim); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; margin-top: 24px; }
@media (max-width: 1050px) {
  .adventure-layout { grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; }
  .spectrum-wordmark { font-size: 12px; }
  .site-header nav { gap: 12px; }
  h1 { font-size: 40px; }
}
@media (max-width: 800px) {
  .page-shell { padding: 0 20px; }
  .site-header { min-height: 80px; }
  .wordmark { gap: 12px; }
  .spectrum-rainbow { width: 36px; flex-basis: 36px; height: 28px; }
  .site-header nav { font-size: 11px; }
  .site-header .notes-link { display: none; }
  .adventure-layout { grid-template-columns: 1fr; gap: 28px; }
  .adventure-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  .screen-mat { padding: 16px; }
  .screen-overlay { inset: 16px; }
  .introduction { padding: 24px 0; }
  .edition-note { font-size: 10px; }
  .credits-section > h2, .section-heading h2 { font-size: 20px; }
}
@media (max-width: 540px) {
  .page-shell { padding: 0 16px; }
  .site-header { flex-wrap: wrap; gap: 12px; padding: 16px 0; }
  .site-header nav { width: 100%; justify-content: space-between; gap: 8px; }
  .site-header .notes-link { display: inline; }
  .introduction { display: block; }
  h1 { font-size: 32px; letter-spacing: -1px; }
  .eyebrow { font-size: 10px; margin-bottom: 12px; }
  .deck { margin-top: 12px; font-size: 12px; }
  .title-credit { font-size: 11px; }
  .edition-note { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; text-align: left; }
  .edition-badge { font: 10px var(--mono); padding: 4px 6px; }
  .frame-toolbar { font-size: 10px; padding: 8px; align-items: flex-start; }
  .runtime-status { font-size: 10px; max-width: 155px; }
  .screen-mat { min-height: 0; padding: 12px; }
  .screen-overlay { inset: 12px; }
  .screen-overlay p { font-size: 12px; }
  .screen-footer { font-size: 9px; padding: 8px; gap: 8px; }
  .screen-footer::after { display: none; }
  .command-form label { font-size: 16px; }
  .command-entry { gap: 8px; padding-left: 10px; }
  .command-entry input { font-size: 14px; }
  .primary-button { padding: 10px 12px; }
  .command-hint { font-size: 10px; }
  .adventure-sidebar { gap: 20px; }
  .adventure-sidebar h2 { font-size: 12px; }
  .guide-card p { font-size: 12px; }
  .quick-commands { gap: 6px; }
  .quick-commands button { padding: 8px; font-size: 11px; }
  .session-buttons { grid-template-columns: 1fr 1fr; }
  .session-buttons button:first-child { grid-column: 1 / -1; }
  .file-actions { flex-wrap: wrap; column-gap: 8px; }
  .text-button { font-size: 11px; }
  .field-notes { grid-template-columns: 1fr; gap: 0; }
  .field-notes details + details { border-top: 1px solid var(--line); }
  .field-notes summary { font-size: 14px; }
  .credits-section { margin-top: 24px; }
  .credits-section > h2, .section-heading h2 { font-size: 16px; line-height: 1.7; }
  .credits-intro { font-size: 12px; }
  .credits-grid { grid-template-columns: 1fr; gap: 0; }
  .credit-card h3 { font-size: 16px; }
  .site-footer { flex-direction: column; gap: 8px; }
  dialog { padding: 20px; }
  dialog h2 { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
}
