:root {
  color-scheme: dark;
  --ground: #080d09;
  --screen: #0a120c;
  --ink: #b8e4c1;
  --hot: #72ff9d;
  --muted: #86a893;
  --line: #284535;
  --warning: #e1c784;
  font-family: 'Courier New', Courier, monospace;
  font-size: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100svh; background: radial-gradient(ellipse at 48% -15%, #14271a, var(--ground) 56%); color: var(--ink); }
button, input { font: inherit; }
button { min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); background: #101c14; color: var(--ink); cursor: pointer; }
button:hover { border-color: var(--hot); color: var(--hot); }
button:disabled { opacity: .48; cursor: wait; }
:focus-visible { outline: 2px solid var(--hot); outline-offset: 2px; }
.station { width: min(100% - 64px, 1050px); margin: auto; }
.masthead, .footer, .terminal-head, .scope-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.masthead { padding: 21px 0 17px; border-bottom: 1px solid var(--line); letter-spacing: .12em; font-size: .82rem; font-weight: bold; }
.studio { color: var(--hot); }
.mark { margin-right: 6px; }
.edition, .footer { color: var(--muted); }
.edition span { color: var(--hot); }
.intro { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(28px, 7vw, 100px); align-items: end; padding: clamp(24px, 4vh, 44px) 0; }
.eyebrow, .tagline { margin: 0; }
.eyebrow { color: var(--muted); font-size: .83rem; letter-spacing: .075em; text-transform: uppercase; }
h1 { margin: .13em 0 .17em; color: #defbe3; font-size: clamp(2.9rem, 7.8vw, 6.5rem); line-height: .87; letter-spacing: -.08em; }
h1 em { color: var(--hot); font-style: normal; text-shadow: 0 0 28px #45ef7235; }
.tagline { font-size: clamp(.87rem, 1.6vw, 1rem); line-height: 1.5; }
.scope { margin: 0; min-width: 0; border-left: 1px solid var(--line); padding-left: 21px; }
.scope-head { font-size: .76rem; letter-spacing: .06em; color: var(--muted); }
#signal { color: var(--hot); }
#wave { display: block; width: 100%; height: auto; margin: 8px 0; background: #0b180e; border: 1px solid var(--line); }
figcaption { color: var(--muted); font-size: .84rem; line-height: 1.5; max-width: 38ch; }
.terminal { border: 1px solid #365b42; background: var(--screen); box-shadow: 0 18px 60px #0007, 0 0 22px #72ff9d0b; }
.terminal-head { padding: 7px 15px; background: #122017; border-bottom: 1px solid var(--line); font-size: .82rem; letter-spacing: .08em; }
.terminal-title { display: flex; align-items: center; gap: 10px; }
.lamp { width: 7px; height: 7px; background: var(--hot); box-shadow: 0 0 9px #72ff9d94; }
#channel { color: var(--muted); }
#speed, #settings { font-size: .76rem; letter-spacing: .04em; }
.readout { display: flex; flex-wrap: wrap; gap: 5px 16px; padding: 8px 17px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .84rem; }
.readout strong { font-weight: normal; color: var(--hot); }
.history { height: clamp(160px, 28vh, 360px); height: clamp(160px, 28svh, 360px); overflow: auto; overscroll-behavior: contain; scrollbar-color: #385f43 var(--screen); background: repeating-linear-gradient(0deg, #0003 0 1px, transparent 1px 4px); padding: 15px 17px; line-height: 1.54; overflow-anchor: none; }
.history p { margin: 0 0 .44em; white-space: pre-wrap; overflow-wrap: anywhere; }
.history .system { color: var(--muted); }
.history .user, .history .high { color: var(--hot); }
.history .error { color: var(--warning); }
.history .seal { color: var(--muted); font-size: .81rem; letter-spacing: .035em; }
.history .typing::after { content: '▌'; color: var(--hot); }
.actions { display: flex; flex-wrap: wrap; gap: 6px; max-height: min(23svh, 165px); overflow: auto; padding: 8px 12px; border-top: 1px solid var(--line); }
.actions button { font-size: .87rem; }
#console { display: flex; align-items: stretch; border-top: 1px solid var(--line); padding: 8px; background: #101b13; }
.prompt { align-self: center; color: var(--hot); margin: 0 10px; font-weight: bold; }
#entry { width: 100%; min-width: 0; min-height: 42px; padding: 5px 8px; color: var(--hot); caret-color: var(--hot); background: #0a120d; border: 1px solid transparent; border-bottom-color: var(--line); border-radius: 0; }
#entry:focus { border-color: #477b53; outline: 0; }
#entry::placeholder { color: var(--muted); }
.submit { flex: none; min-width: 91px; margin-left: 8px; background: var(--hot); color: #0a180d; font-weight: bold; }
.submit:hover { color: #051009; background: #bdffcd; }
.footer { padding: 12px 0 16px; font-size: .78rem; }
dialog { width: min(94vw, 580px); max-height: 90dvh; padding: 20px; background: #101b13; color: var(--ink); border: 1px solid #477b53; }
dialog::backdrop { background: #020603d9; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0 0 8px; font-size: 1.2rem; color: var(--hot); }
#panel-body { line-height: 1.45; }
#panel-body p { overflow-wrap: anywhere; }
#panel-body button { margin: 4px 6px 4px 0; }
#panel-body label { display: block; margin: 10px 0; }
#panel-body input[type=text] { background: var(--ground); color: var(--ink); border: 1px solid var(--line); max-width: 100%; padding: 7px; }
#panel-body ol, #panel-body ul { padding-inline-start: 24px; }
@media (max-width: 640px) {
  .station { width: calc(100% - 28px); }
  .masthead { padding: 11px 0; font-size: .75rem; letter-spacing: .045em; }
  .intro { grid-template-columns: 1fr; gap: 0; padding: 16px 0; }
  h1 { font-size: clamp(2.58rem, 10.4vw, 4.1rem); }
  .scope { display: none; }
  .terminal-head { padding: 5px 9px; }
  .history { height: clamp(145px, 28svh, 270px); padding: 10px; }
  .readout { padding-inline: 10px; gap: 4px 9px; }
  .actions { padding: 6px 8px; }
  button, .actions button { min-height: 44px; }
  .submit { min-width: 65px; }
  .submit span, .footer > span:nth-child(2) { display: none; }
  .footer { flex-wrap: wrap; padding-top: 8px; }
}
@media (max-width: 380px) { .edition { letter-spacing: 0; } .terminal-title { gap: 5px; } }
