/* https://mainframecms.robsradventures.com ("Green Screen"). No scripts: the amber switch is :has(), the key press
   is :active, the jumps are :target. Bump ?v= in index.html and 404.html when this file changes (cached a year). */

@font-face { font-family: "VT323"; src: url("/fonts/vt323-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* the few basics the page used to get from the main site's stylesheet */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; color-scheme: dark; }
body { margin: 0; background: #12140f; }
svg { max-width: 100%; height: auto; }
a { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.08; text-wrap: balance; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

.mf-wrap { display: block; width: 100%; max-width: 72rem; margin: 0 auto; padding: clamp(0.25rem, 2vw, 1.25rem) clamp(0.25rem, 2vw, 1.5rem); }
.mf {
  --p: #6dff9c;
  --d: #3fc46d;
  --s: #04170a;
  --glass: #072610;
  --pop: #d6ffe2;
  --crt: "VT323", "Courier New", monospace;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  container-type: inline-size;
  overflow: hidden;
  background: #12140f;
  border-radius: 34px;
  padding: 10px;
  font: 400 15px/1.6 var(--mono);
  color: var(--p);
}
.mf:has(#mf-amber:checked) { --p: #ffc04a; --d: #dd9a28; --s: #1a1002; --glass: #2a1a03; --pop: #ffe9b8; }

/* plain browser spacing doesn't belong on a terminal */
.mf h1, .mf h2, .mf h3 { margin: 0; font-weight: 400; letter-spacing: 0; }
.mf p { margin: 0; max-width: none; }
.mf ul { list-style: none; margin: 0; padding: 0; }
.mf figure { margin: 0; }
.mf a { color: inherit; }
.mf :focus-visible { outline: 3px solid var(--pop); outline-offset: 3px; box-shadow: none; }

.mf-tube {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 26px 28px;
  border-radius: 28px;
  background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--p) 11%, var(--s)), var(--s) 75%);
  background-color: var(--s);
  text-shadow: 0 0 6px color-mix(in srgb, var(--p) 55%, transparent);
}
/* scan lines over the glass: they never take a click */
.mf-tube::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgb(0 0 0 / 0.24) 2px 3px);
}

.mf-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.mf-logo { width: min(310px, 100%); height: auto; color: var(--p); }
.mf-switches { display: flex; flex-wrap: wrap; gap: 0 22px; }
.mf-toggle { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--d); font-size: 13px; cursor: pointer; }
.mf-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--p); }

.mf-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.mf-boot { color: var(--d); font-size: 14px; }
.mf-boot span { display: block; animation: mf-boot 0.1s both; }
.mf-boot span:nth-child(2) { animation-delay: 0.35s; }
.mf-boot span:nth-child(3) { animation-delay: 0.75s; }
.mf-boot span:nth-child(4) { animation-delay: 1.2s; }
.mf .mf-big { margin: 14px 0; font: 400 clamp(40px, 8.4cqw, 76px) / 0.95 var(--crt); text-wrap: balance; }
/* the negative margin gives it no width of its own, so it never wraps onto a line by itself */
.mf-cursor { display: inline-block; width: 0.55em; height: 0.9em; margin: 0 -0.67em 0 0.12em; vertical-align: -0.08em; background: currentColor; }
.mf .mf-intro { max-width: 52ch; margin-bottom: 34px; }

/* the beige keys: real links that jump down the page */
.mf .mf-keys { display: flex; flex-wrap: wrap; gap: 14px 10px; }
.mf .mf-key {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 16px 7px;
  background: #e8dfc4;
  color: #262014;
  border-bottom: 6px solid #9d9070;
  border-radius: 7px;
  box-shadow: 0 2px 0 #5d543f;
  font: 700 14px / 1.2 var(--mono);
  text-decoration: none;
  text-shadow: none;
  user-select: none;
}
.mf .mf-key:focus-visible { box-shadow: 0 2px 0 #5d543f; }
.mf .mf-key:active { transform: translateY(4px); border-bottom-width: 2px; }
.mf-clack { position: absolute; left: 50%; top: -28px; translate: -50% 0; color: var(--pop); font: 400 24px / 1 var(--crt); text-shadow: 0 0 6px color-mix(in srgb, var(--p) 55%, transparent); opacity: 0; pointer-events: none; }
.mf-key:active .mf-clack { opacity: 1; }

.mf-cast { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mf-cast figcaption { margin-top: 8px; color: var(--d); font-size: 13px; text-align: center; }
.mf-cast svg { display: block; width: 100%; height: auto; margin: 0 auto; filter: drop-shadow(0 0 18px color-mix(in srgb, var(--p) 30%, transparent)); }
.mf-manny svg { max-width: 270px; }
.mf-marbles { align-self: flex-end; max-width: 210px; }
.mf-marbles svg { max-width: 150px; }
.mf-glass { fill: var(--glass); }
.mf-line { stroke: var(--p); }
.mf-lit { fill: var(--p); }
.mf-led { fill: var(--d); }

.mf .mf-prompt { margin-bottom: 6px; padding-bottom: 8px; border-bottom: 1px dashed var(--d); font: 400 28px / 1.1 var(--crt); }
.mf-row { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 0 18px; padding: 9px 6px; }
.mf-row b { white-space: nowrap; }
/* inverse video: the row under the pointer, and wherever a key just jumped to */
.mf-row:hover, .mf-row:target, .mf-block:target > .mf-prompt { background: var(--p); color: var(--s); text-shadow: none; }
.mf-block, .mf-row { scroll-margin-top: 1rem; }

.mf .mf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mf-stats li { padding: 10px 12px; border: 1px solid var(--d); }
.mf-stats b { display: block; font: 400 46px / 1 var(--crt); }
.mf-stats small { color: var(--d); font-size: 13px; }

.mf .mf-note { padding: 4px 6px 12px; color: var(--d); font-size: 13px; }
.mf-post { padding: 12px 6px; border-top: 1px dashed var(--d); }
.mf .mf-post h3 { display: flex; flex-wrap: wrap; gap: 0 1.5em; margin-bottom: 4px; color: var(--d); font: 700 13px / 1.5 var(--mono); }

.mf-how summary { min-height: 44px; padding-block: 10px; cursor: pointer; }
.mf-how p { max-width: 62ch; padding-top: 6px; }
.mf .mf-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; color: var(--d); font-size: 14px; }
.mf-foot a { display: inline-flex; align-items: center; min-height: 44px; }

.mf-cur { animation: mf-cur 1.1s steps(1) infinite; }
@keyframes mf-cur { 50% { opacity: 0; } }
.mf-eyes { animation: mf-blink 4.2s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes mf-blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
.mf-ball { animation: mf-roll 2.8s ease-in-out infinite alternate; }
@keyframes mf-roll { from { transform: translateX(-7px); } to { transform: translateX(5px); } }
@keyframes mf-boot { from { opacity: 0; } to { opacity: 1; } }

@container (max-width: 640px) {
  .mf-tube { padding: 20px 14px; border-radius: 20px; }
  .mf-hero { grid-template-columns: minmax(0, 1fr); }
  .mf-row { grid-template-columns: minmax(0, 1fr); }
  .mf .mf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* the page's own stop button for everything that moves */
.mf:has(#mf-still:checked) *,
.mf:has(#mf-still:checked) *::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .mf *, .mf *::before, .mf *::after { animation: none !important; }
}
