/* PixelCanvas - teletext look */
@font-face { font-family: "TT"; src: url("vt323.woff2") format("woff2"); font-display: swap; }
:root {
  --k: #000; --r: #ff2a2a; --g: #00ff3c; --y: #ffff00; --b: #0018ff;
  --m: #ff2bff; --c: #00f0ff; --w: #ffffff; --dim: #8a8a8a;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--k); color: var(--w); }
body {
  font-family: "TT", "Courier New", monospace;
  font-size: clamp(17px, 2.35vh, 30px);
  line-height: 1.12;
  text-transform: uppercase;
  -webkit-font-smoothing: none;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
.r { color: var(--r); } .g { color: var(--g); } .y { color: var(--y); } .b { color: var(--b); }
.m { color: var(--m); } .c { color: var(--c); } .w { color: var(--w); } .dim { color: var(--dim); }
.big { font-size: 2em; line-height: 1; }
.huge { font-size: 2.6em; line-height: 1; }
.row { display: flex; justify-content: space-between; gap: .5em; }
.sp { margin-top: .9em; }
.lc { text-transform: none; }
.sp2 { margin-top: 1.6em; }

/* header line + double-height title bar */
.hdr { display: flex; justify-content: space-between; white-space: nowrap; }
.titlebar {
  background: var(--b); color: var(--y); padding: .05em .3em; margin-top: .1em;
  font-size: 2em; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bar { background: var(--c); color: var(--k); display: flex; justify-content: space-between; padding: 0 .3em; }

/* dotted menu lines:  HOW IT WORKS ........ 150 */
.menu a, .lead { display: flex; gap: .3em; white-space: nowrap; }
.menu a .dots, .lead .dots { flex: 1; overflow: hidden; color: var(--w); }
.menu a .dots::after, .lead .dots::after { content: " ................................................................................................................"; }
.menu a .n { color: var(--y); }
.lead .n { color: var(--g); }
.lead .rk { color: var(--y); width: 1.6em; text-align: right; }

/* fastext-style colour footer */
.fast { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 1.2em; }
.fast a { color: var(--k); padding: .05em .4em; }
.fast a:nth-child(1) { background: var(--r); }
.fast a:nth-child(2) { background: var(--g); }
.fast a:nth-child(3) { background: var(--y); }
.fast a:nth-child(4) { background: var(--c); }

/* index layout */
.wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 34vw); gap: 2.2vw; padding: 2.5vh 2vw; min-height: 100vh; }
.stage { display: flex; align-items: flex-start; justify-content: center; }
.stage canvas {
  width: min(95vh, 100%); height: auto; aspect-ratio: 1 / 1; image-rendering: pixelated;
  background: #111; display: block;
}
.side { min-width: 0; }
@media (max-width: 900px) {
  .wrap { grid-template-columns: 1fr; padding: 12px 16px; }
  .stage canvas { width: 100%; }
  body { font-size: 19px; }
}

/* text pages */
.page { max-width: 46em; margin: 0 auto; padding: 3vh 16px 4vh; }
.page h2 { font-weight: normal; font-size: 1em; margin: 1.6em 0 .3em; }
.page h2 span { background: var(--b); color: var(--y); padding: 0 .3em; }
.page p { margin: .25em 0; text-transform: none; }
.page .up { text-transform: uppercase; }
.code {
  color: var(--c); text-transform: none; white-space: pre-wrap; word-break: break-word; margin: .25em 0;
}
.kv { display: grid; grid-template-columns: 9em 1fr; gap: 0 1em; text-transform: none; }
.kv > :nth-child(odd) { color: var(--y); text-transform: uppercase; }
table.tt { border-collapse: collapse; text-transform: none; }
table.tt td { padding: 0 1.2em 0 0; }

/* widgets */
input, select, textarea, button {
  font: inherit; text-transform: none; background: #000; color: var(--w);
  border: 2px solid var(--w); padding: .05em .35em; border-radius: 0;
}
button { background: var(--w); color: var(--k); cursor: pointer; text-transform: uppercase; }
button:hover { background: var(--y); }
button.red { background: var(--r); color: var(--k); }
button.grn { background: var(--g); color: var(--k); }
button:disabled { opacity: .45; cursor: default; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--y); }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
