:root {
  --bg: #020502;
  --panel: #071107;
  --g: #7cff45;
  --b: #d4ffc1;
  --d: #4d9634;
  --a: #ffc857;
  --line: #2e6722;
  --m: Consolas, "Courier New", monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(circle at 70% -20%, #193b10, transparent 45rem),
    var(--bg);
  color: var(--g);
  font: 16px/1.55 var(--m);
}
.scan {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background: repeating-linear-gradient(0deg, transparent 0 3px, #0003 4px);
}
header,
footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem clamp(1rem, 4vw, 4rem);
  border-bottom: 1px solid var(--line);
  background: #020502e8;
}
header img {
  width: 72px;
}
header div {
  font-size: 1.2rem;
  color: var(--b);
}
header small {
  display: block;
  color: var(--d);
}
header span {
  margin-left: auto;
}
nav {
  display: flex;
  overflow: auto;
  gap: 0.3rem;
  padding: 0.7rem clamp(1rem, 4vw, 4rem);
  position: sticky;
  top: 0;
  z-index: 20;
  background: #020502f2;
  border-bottom: 1px solid var(--line);
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  background: #071107;
  color: var(--g);
  border: 1px solid var(--line);
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}
button:hover,
button.active,
.primary {
  background: var(--g);
  color: #000;
}
main {
  max-width: 1450px;
  margin: auto;
  padding: clamp(1rem, 4vw, 4rem);
}
h1,
h2,
h3 {
  color: var(--b);
}
h1 {
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1;
  margin: 0.5rem 0;
}
.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: center;
  gap: 2rem;
  border: 1px solid var(--line);
  padding: clamp(1rem, 4vw, 4rem);
  background: #071107;
}
.hero img {
  width: 100%;
  max-width: 480px;
}
.amber {
  color: var(--a);
}
.actions,
.tools {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.metrics,
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card,
.metric {
  border: 1px solid var(--line);
  background: #071107;
  padding: 1rem;
}
.metric b {
  display: block;
  font-size: 2rem;
}
.meta {
  color: var(--d);
  font-size: 0.75rem;
}
.disk {
  background: #293329;
  color: #151a15;
  border-radius: 4px 4px 22px 22px;
  padding: 1rem;
  box-shadow: inset 0 0 0 5px #111;
}
.disk:before {
  content: "";
  display: block;
  width: 55%;
  height: 34px;
  margin: -1rem auto 0.7rem;
  background: #111;
  border: 7px solid #777;
}
.disk .label {
  background: #f4e5a8;
  padding: 0.8rem;
  min-height: 125px;
}
.row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.row button {
  padding: 0.2rem 0.35rem;
}
.tag {
  display: inline-block;
  color: var(--a);
  border: 1px solid var(--line);
  padding: 0.1rem 0.35rem;
  margin: 0.15rem;
  font-size: 0.7rem;
}
input,
textarea,
select {
  width: 100%;
  background: #020502;
  color: var(--b);
  border: 1px solid var(--line);
  padding: 0.7rem;
}
textarea {
  min-height: 110px;
}
.tools input {
  flex: 1;
  min-width: 220px;
}
.modem {
  display: grid;
  grid-template-columns: minmax(240px, 400px) 1fr;
  gap: 2rem;
}
.modem img {
  max-width: 100%;
}
.terminal {
  background: #000;
  border: 1px solid var(--line);
  padding: 1rem;
  min-height: 230px;
}
.pagehead {
  border-left: 5px solid var(--g);
  padding-left: 1rem;
}
footer {
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
}
dialog {
  width: min(740px, 94vw);
  background: #071107;
  color: var(--g);
  border: 1px solid var(--g);
}
dialog::backdrop {
  background: #000c;
}
dialog label {
  display: grid;
  gap: 0.2rem;
  margin: 0.7rem 0;
}
#boot {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 200;
  padding: 8vw;
}
#boot.done {
  display: none;
}
@media (max-width: 800px) {
  .hero,
  .modem {
    grid-template-columns: 1fr;
  }
  header span {
    display: none;
  }
}
@media print {
  #boot,
  .scan,
  nav,
  button,
  footer {
    display: none;
  }
  .hero,
  .card {
    background: #fff;
    color: #000;
    box-shadow: none;
  }
  body {
    background: #fff;
    color: #000;
  }
  h1,
  h2,
  h3 {
    color: #000;
  }
}

/* Finishing touches: browsing first, local editing on demand. */
:root { --d: #87bb72; }
.settings { display:flex; flex-wrap:wrap; gap:.5rem; padding:.7rem clamp(1rem,4vw,4rem); }
.settings button { font-size:.8rem; }
.crt-off .scan { display:none; }
.home-extras { display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin:1.5rem 0; }
.metrics { margin-top:1rem; }
.pagehead { display:block; margin-bottom:1.5rem; }
.pagehead span { display:block; }
.disk h3, .disk .meta { color:#27361c; }
.command-shell { margin-top:1.5rem; }
.command-shell pre { white-space:pre-wrap; overflow-wrap:anywhere; max-height:260px; overflow:auto; }
.command-shell form { display:flex; align-items:center; gap:.7rem; }
.command-shell input { min-width:0; flex:1; }
.sysop-note { margin-top:1.5rem; }
a { color:var(--a); }
:focus-visible { outline:2px solid var(--a); outline-offset:4px; }
.skip-link { position:absolute; left:1rem; top:-100px; z-index:100; background:#000; padding:1rem; }
.skip-link:focus { top:1rem; }
#boot { display:flex; flex-direction:column; align-items:flex-start; }
#boot.done { display:none; }
#bootText { white-space:pre-wrap; overflow:auto; max-width:100%; font:inherit; flex:1; }
#skip { flex-shrink:0; }
#guest label { display:block; margin-bottom:1rem; }
.card p { white-space:pre-wrap; overflow-wrap:anywhere; }
@media(max-width:800px) { .home-extras { grid-template-columns:1fr; } .pagehead span { display:block; } }
@media(max-width:480px) { .command-shell form { flex-wrap:wrap; } .command-shell label { width:100%; } .row { flex-wrap:wrap; } header img { width:48px; } header div { font-size:1rem; } }
@media(prefers-reduced-motion:reduce) { .scan { display:none; } }
@media print { .settings,.command-shell,.skip-link { display:none; } .metric,.disk .label,.terminal { background:white; color:black; } }
