/* ninetysix.io: a quiet page under a slim masthead. */
:root {
  color-scheme: dark;
  --ground: #07070a;
  --panel: #101116;
  --line: #23252e;
  --ink: #c9ccd4;
  --mute: #9aa0ad;
  --dim: #667;
  --head: #fff;
  --acc: #7cf;
  --go: #3c6;
  --pixel: Silkscreen, "Courier New", monospace;
  --mono: "IBM Plex Mono", ui-monospace, "Courier New", monospace;
}
* { box-sizing: border-box; }
html { background: var(--ground); }
body { margin: 0; background: var(--ground); color: var(--ink); font: 15px/1.65 var(--mono); }
a { color: var(--acc); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 800px; margin: 0 auto; padding-inline: 16px; }

/* header: a slim masthead on every page */
.masthead { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin-top: 16px; padding: 16px; background: #000; border: 1px solid var(--line); }
.masthead .logo { font: 700 28px/1 var(--pixel); color: var(--head); text-decoration: none; letter-spacing: 1px; text-shadow: 2px 2px 0 #236; }
.masthead .specs { font: 11px var(--pixel); color: var(--acc); }
.masthead .stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.masthead .logo, .masthead .specs { position: relative; }

.nav { display: flex; flex-wrap: wrap; background: #111; border-block: 2px solid #333; }
.nav a { font: 12px var(--pixel); color: #9ab; text-decoration: none; padding: 8px 16px; border-right: 1px solid #222; }
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; background: #223; }

main { padding-block: 24px 8px; }

/* game cards: title and Play over the bottom of the clip, the summary under it */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; }
.card-media { position: relative; border-bottom: 1px solid var(--line); }
.card-shot img, .card-shot video { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.card-cap { position: absolute; inset: auto 0 0 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 28px 12px 12px; background: linear-gradient(transparent, rgba(0,0,0,.85)); pointer-events: none; }
.card-cap > * { pointer-events: auto; }
.card-cap .btn { padding: 6px 10px; }
.card-body { padding: 10px 12px 12px; }
.card h2 { margin: 0; font: 700 16px var(--pixel); }
.card h2 a { color: var(--head); text-decoration: none; text-shadow: 2px 2px 0 #000; }
.card p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--mute); }

/* the games list: a 3:1 banner per game, title and Play on its bottom edge */
.banners { display: grid; gap: 24px; }
.banner-media { position: relative; border: 1px solid var(--line); }
.banner-shot img, .banner-shot video { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; object-position: 50% var(--cy, 50%); }
.banner-shot img { image-rendering: pixelated; }
.banner-cap { position: absolute; inset: auto 0 0 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 32px 16px 14px; background: linear-gradient(transparent, rgba(0,0,0,.85)); pointer-events: none; }
.banner-cap > * { pointer-events: auto; }
.banner-cap h2 { margin: 0; font: 700 26px/1.1 var(--pixel); }
.banner-cap h2 a { color: var(--head); text-decoration: none; text-shadow: 3px 3px 0 #236; }
.banner-under { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding: 8px 2px 0; }
.banner-under p { margin: 0; font-size: 13px; color: var(--mute); }
@media (max-width: 560px) { .banner-cap h2 { font-size: 18px; } .banner-cap { padding: 20px 10px 10px; } }

/* pages */
.page-title { font: 700 24px/1.2 var(--pixel); color: var(--head); margin: 0 0 16px; }
.page-shot { position: relative; margin: 0 0 20px; border: 1px solid var(--line); }
.page-shot img { display: block; width: 100%; height: auto; }
.page-shot .hit { position: absolute; inset: 0; cursor: default; }
/* a free picture: the PC alone on the page's black, 120% of the column and centred over it, never wider than the window */
.page-shot.free { position: relative; left: 50%; transform: translateX(-50%); width: 120%; max-width: calc(100vw - 32px); margin-block: 28px 40px; border: 0; }
/* a DOS cursor's blink: VGA flips it every 16 frames of its 70 Hz text mode (FreeVGA), so 229 ms lit, 229 ms dark */
.page-shot .blink { position: absolute; background: #020202; opacity: 0; animation: blink 0.457s steps(1) infinite; }
@keyframes blink { 0% { opacity: 0; } 50% { opacity: 1; } }
.prose { max-width: 68ch; }
.prose h1, .prose h2, .prose h3 { font: 700 15px/1.3 var(--pixel); color: var(--head); margin: 28px 0 10px; text-wrap: balance; }
.prose h2 { color: var(--acc); font-size: 13px; }
.prose hr { border: 0; border-top: 1px dashed var(--line); margin: 28px 0; }
.prose ul { padding-left: 1.2em; }
.prose li::marker { color: var(--dim); }
.prose code { font-family: var(--mono); color: #fff; background: var(--panel); padding: 0 4px; }
.prose table { border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 4px 12px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--head); text-align: left; }

/* a 3:1 strip cut from the 4:3 capture; the game says how far down (captureY) */
.crumb { margin: 0 0 10px; font: 11px var(--pixel); color: var(--dim); }
.crumb a { color: var(--acc); text-decoration: none; }
.crumb a:hover { color: #fff; }
.crumb b { color: var(--head); font-weight: 400; }
.nextgame { display: flex; align-items: center; gap: 14px; margin-top: 28px; padding: 10px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; }
.nextgame:hover { border-color: var(--acc); }
.nextgame-shot { width: 128px; flex: none; }
.nextgame-shot img, .nextgame-shot video { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.nextgame .kicker { display: block; }
.nextgame-title { display: block; font: 700 20px/1.2 var(--pixel); color: var(--head); }
.game-shot img, .game-shot video { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; object-position: 50% var(--cy, 50%); border: 1px solid var(--line); }
.game-shot img { image-rendering: pixelated; }
.game-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.game-bar .who { flex: 1 1 260px; min-width: 0; }
.game-bar h1 { font: 700 28px/1.1 var(--pixel); color: var(--head); margin: 0 0 6px; }
.game-bar p { margin: 0; color: var(--mute); }
.kicker { font: 11px var(--pixel); color: var(--dim) !important; margin: 0 0 6px !important; }
.btn { display: inline-block; font: 12px var(--pixel); text-decoration: none; padding: 8px 14px; color: #000; background: var(--acc); }
.btn.go { background: var(--go); }
.btn.big { font-size: 15px; padding: 12px 22px; }
.btn:hover { background: #fff; }
.game-dls { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; padding: 8px 0 0; font-size: 12.5px; }
.game-dls span { color: var(--dim); }
.game-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.game-cols > * { min-width: 0; }
.prose .sec, .game-cols .sec { font: 700 15px/1.3 var(--pixel); color: var(--head); margin: 28px 0 10px; }
.keys { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; align-items: center; margin: 0; font-size: 13.5px; }
.keys dt { display: flex; gap: 4px; }
.keys dd { margin: 0; }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 26px; padding: 0 7px; font: 700 14px/1 var(--mono); color: #222; background: linear-gradient(#efece4, #cfcab9); border: 1px solid #8f8a7c; border-bottom-width: 3px; border-radius: 3px; }
@media (max-width: 560px) { .game-cols { grid-template-columns: 1fr; } }

.table-wrap { overflow-x: auto; }
.files { border-collapse: collapse; width: 100%; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.files th { font: 11px var(--pixel); color: var(--acc); text-align: left; padding: 6px 12px 6px 0; border-bottom: 2px solid #333; }
.files td { padding: 5px 12px 5px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.files .n { text-align: right; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 32px 0 24px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* play pages: the js-dos player in a 4:3 screen */
.page-title .ver { font-size: 13px; color: var(--dim); }
.screen { aspect-ratio: 4 / 3; background: #000; border: 1px solid var(--line); }
.screen iframe { display: block; width: 100%; height: 100%; border: 0; }
.play-note { font-size: 12.5px; color: var(--mute); margin: 10px 0 0; max-width: 68ch; }
.hood { display: grid; grid-template-columns: max-content 1fr; gap: 2px 14px; font-size: 12.5px; color: var(--mute); margin: 12px 0 0; }
.hood dt { font-weight: bold; }
.hood dd { margin: 0; }

/* play pages, the theatre: one slim bar on top, the player as wide as the window allows (--play-w,
   set by the page), and the title, Controls, Info and Full screen in one bar under it */
.play-wrap { max-width: 1360px; }
.topbar { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; margin-top: 12px; background: #000; border: 1px solid var(--line); }
.topbar .stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.topbar .logo, .topbar .nav { position: relative; }
.topbar .logo { font: 700 18px/1 var(--pixel); color: var(--head); text-decoration: none; letter-spacing: 1px; text-shadow: 1px 1px 0 #236; padding: 10px 16px; }
.topbar .nav { margin-left: auto; background: none; border: 0; }
.topbar .nav a { font-size: 11px; padding: 8px 12px; border: 0; }
.play-wrap main { padding-block: 14px 0; }
.play .screen { width: var(--play-w, 960px); height: var(--play-h); max-width: 100%; margin-inline: auto; border: 0; outline: 1px solid var(--line); }
.play-bar, .play-wrap .foot { max-width: var(--play-w, 960px); margin-inline: auto; }
.play-bar { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.play-bar .page-title { font-size: 15px; margin: 0 auto 0 0; }
.play-bar .page-title .ver { font-size: 11px; }
.play-scale { font: 11px var(--pixel); color: var(--dim); font-variant-numeric: tabular-nums; }
.play-link { font: 11px var(--pixel); color: var(--acc); text-decoration: none; padding: 5px 9px; border: 1px solid var(--acc); }
.play-link:hover { color: #000; background: var(--acc); }
.play-keys { width: auto; min-width: 260px; }
.play-btn { display: inline-flex; align-items: center; gap: 7px; font: 11px var(--pixel); color: var(--mute); background: none; border: 0; padding: 0; cursor: pointer; }
.play-btn:hover, .play-btn[aria-expanded="true"] { color: var(--head); }
.play-btn i { font: 700 12px/1 var(--mono); font-style: normal; width: 18px; height: 18px; display: grid; place-items: center; border: 1.5px solid currentColor; border-radius: 50%; }
.play-info { position: absolute; right: 0; bottom: calc(100% + 12px); z-index: 5; width: min(560px, 100%); padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 10px 40px #000c; }
.play-info .hood { margin: 0; }
.play-wrap .foot { margin-top: 18px; }
@media (max-width: 560px) { .topbar .nav { margin-left: 0; } .play-info { bottom: auto; top: calc(100% + 8px); } }

/* downloads: a DOS console (static/js/dos.js) in the VGA text palette, grey 7 on black */
.dos-screen { position: relative; height: calc(25lh + 28px); overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; padding: 14px 16px; background: #000; border: 1px solid var(--line); color: #aaa; font: 14px/1.5 var(--mono); cursor: text; }
.dos-out, .dos-line { margin: 0; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
/* a link is light blue (VGA 9) and underlined, so it reads as one against the grey; pointed at, it inverts */
.dos-out a { color: #55f; cursor: pointer; text-decoration: underline; text-decoration-color: #55f; text-underline-offset: 3px; }
.dos-out a:hover, .dos-out a:focus-visible { color: #fff; background: #55f; text-decoration: none; outline: none; }
.dos-line { position: relative; }
.dos-line input { position: absolute; inset: 0; width: 100%; opacity: 0; font-size: 16px; border: 0; padding: 0; background: none; color: transparent; caret-color: transparent; }
/* DOS's cursor: an underline over the bottom of the cell, blinking at VGA's 229 ms (as .page-shot .blink) */
.dos-cur { position: relative; }
.dos-cur::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.15em; height: 0.14em; background: #aaa; animation: blink 0.457s steps(1) infinite reverse; }
.dos-hint { margin: 10px 0 0; font-size: 12.5px; color: var(--mute); }
.dos-hint code { color: var(--ink); }
.dos-screen::-webkit-scrollbar { display: none; }
@media (max-width: 560px) { .dos-screen { font-size: 12px; padding: 10px; height: calc(25lh + 20px); } }
