@font-face { font-family: "unifont"; src: url("fonts/unifont.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "Courier Prime"; src: url("fonts/CourierPrime-Regular.woff2") format("woff2"); font-weight: 400; font-display: block; }
@font-face { font-family: "Courier Prime"; src: url("fonts/CourierPrime-Bold.woff2") format("woff2"); font-weight: 700; font-display: block; }
@font-face { font-family: "Permanent Marker"; src: url("fonts/PermanentMarker-Regular.woff2") format("woff2"); font-display: block; }
:root {
  --ground: #111111;
  --ink: #ffffff;
  --acc: #ffa227;
  --rule: #3d3d3d;
  --ui: "unifont", ui-monospace, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--ground); }
body { margin: 0; color: var(--ink); font: 16px/16px var(--ui); font-synthesis: none; }
a { color: inherit; }
::selection { background: var(--acc); color: var(--ground); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }

.hero { position: relative; height: 100vh; min-height: 560px; overflow: hidden; background: #16142b url(still.webp) center / cover no-repeat; image-rendering: pixelated; }
#desk { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: default; }
#desk.hot { cursor: pointer; }

.top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px 32px; padding: 28px 32px; pointer-events: none; }
.top > * { pointer-events: auto; }
.brand { color: #ffffff; display: block; }
.brand svg { display: block; width: 156px; height: 64px; }
.top nav { display: flex; gap: 0 24px; flex-wrap: wrap; justify-content: flex-end; }
.top nav a { text-decoration: none; padding: 8px 0; }
.top nav a:hover { color: var(--acc); }

.hud { position: absolute; left: -9999px; bottom: 32px; max-width: 34rem; pointer-events: none; }
.hud:focus-within { left: 32px; }
.hud > * { pointer-events: auto; }
.id { display: flex; flex-direction: column; gap: 20px; }
.tag { margin: 0; max-width: 24rem; line-height: 20px; text-shadow: 0 0 12px #111, 0 0 4px #111; }
.panel { position: absolute; right: 32px; top: 50%; transform: translateY(-50%); width: 22rem; background: var(--ground); border: 1px solid var(--acc); padding: 16px; line-height: 20px; z-index: 2; }
.panel h2 { margin: 8px 0; font: 32px/32px var(--ui); color: var(--acc); }
.panel p { margin: 0 0 8px; }
.fsoon { color: var(--acc); }
.fopen { display: inline-block; margin: 8px 0 16px; color: var(--acc); padding: 4px 0; text-decoration: none; }
.fopen:hover, .fopen:focus-visible { text-decoration: underline; }
.ctl { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.ctl button, .plist button { font: 16px var(--ui); color: var(--ink); background: none; border: 0; padding: 4px 0; cursor: pointer; }
.ctl button:hover, .plist button:hover { color: var(--acc); }
.looking .hud { opacity: .25; }
.looking #desk { touch-action: none; }
#desk.grab { cursor: grab; }
.plist { list-style: none; margin: 8px 0 16px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.dirs { display: flex; flex-wrap: wrap; gap: 4px 16px; background: var(--ground); padding: 8px 12px; margin-left: -12px; }
.dirs a { text-decoration: none; padding: 4px 0; }
.dirs a::before { content: "~/"; }
.dirs a:hover, .dirs a:focus-visible, .dirs a.on { color: var(--acc); }

.term { position: absolute; left: -9999px; width: 1px; }
.tip { position: absolute; z-index: 2; pointer-events: none; background: var(--ground); border: 1px solid var(--acc); color: var(--ink); padding: 6px 8px; white-space: pre; line-height: 16px; }
.lead { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible; }
.lead polyline { fill: none; stroke: var(--acc); stroke-width: 1; }
.lead circle { fill: var(--acc); }
.tip b { color: var(--acc); font-weight: normal; }

.list { max-width: 1240px; margin: 0 auto; padding: 24px 24px 80px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 24px; }
.list > section { grid-column: 1 / -1; }
.list > section.few { grid-column: span var(--n); }
.list > section:first-child .dirh { margin-top: 16px; }
.dirh { display: flex; align-items: center; gap: 0 16px; white-space: pre; margin: 64px 0 0; font: 16px/16px var(--ui); }
.dirh .nm { color: var(--acc); }
.dirh .rule { flex: 1; border-top: 1px solid var(--rule); }
.about-dir { margin: 12px 0 24px; line-height: 20px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; }
.few .cards { grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; line-height: 20px; }
.thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--rule); background: #0b0b0b; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.thumb.fit img { object-fit: contain; }
.thumb.none { display: grid; place-content: center; text-align: center; gap: 8px; padding: 16px; }
.thumb.none .big { font: 32px/32px var(--ui); }
.thumb.none .note { color: var(--acc); }
.thumb.ascii { display: grid; place-content: center; }
.thumb.ascii pre { margin: 0; font: 16px/16px var(--ui); }
.thumb.ascii b { font-weight: normal; color: var(--acc); }
.card .hd { display: flex; justify-content: space-between; gap: 16px; }
.card .t { color: var(--ink); }
.card .y, .card .u { color: var(--acc); }
.card .l, .card .m { margin: 0; }
.card .u::before { content: "-> "; }
.card .u.soon::before { content: none; }
.card:hover .thumb, .card:focus-visible .thumb { border-color: var(--acc); }
.card:hover .t, .card:focus-visible .t { color: var(--acc); }
.card:focus-visible { outline: none; }
.cards li.lit .thumb { animation: lit 1.8s ease-out; }
@keyframes lit { 0%, 55% { border-color: var(--acc); } }
.card:focus-visible .thumb { outline: 2px solid var(--acc); outline-offset: 3px; }
.foot { max-width: 1240px; margin: 0 auto; padding: 0 24px 48px; display: flex; gap: 8px 32px; flex-wrap: wrap; border-top: 1px solid var(--rule); padding-top: 24px; }
.foot span { color: var(--acc); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--acc); }

@media (max-width: 959px) {
  .list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .list > section.few { grid-column: span min(var(--n), 2); }
  .few .cards { grid-template-columns: repeat(min(var(--n), 2), minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .hero { height: 78vh; min-height: 520px; }
  .top { padding: 20px; }
  .panel { left: 20px; right: 20px; width: auto; top: auto; bottom: 20px; transform: none; }
  .tag { max-width: 20rem; }
  .brand svg { width: 117px; height: 48px; }
  .hud { left: -9999px; right: auto; bottom: 20px; }
  .hud:focus-within { left: 20px; right: 20px; }
  .list { padding: 16px 20px 48px; }
  .list { grid-template-columns: minmax(0, 1fr); }
  .cards, .few .cards { grid-template-columns: minmax(0, 1fr); }
  .list > section.few { grid-column: 1 / -1; }
}

.lost main { max-width: 640px; margin: 0 auto; padding: 64px 24px; display: flex; flex-direction: column; gap: 32px; }
.lost pre { margin: 0; font: 16px/16px var(--ui); white-space: pre-wrap; }
.lost #path { color: var(--acc); }
.lost p a { color: var(--acc); text-decoration: none; }

/* the masthead sits centred over the desk on wider screens; the line under it stays at the left */
@media (min-width: 640px) {
  .top .brand { position: absolute; left: 50%; top: 24px; transform: translateX(-50%); }
  .id { padding-top: 0; }
}
