/* Lanternhold: one stylesheet, no build step. Black and white, pixel accents. */

@font-face {
  font-family: "Pixelify Sans";
  src: url("/assets/fonts/pixelify-sans.woff") format("woff");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #000;
  --fg: #f2f2f2;
  --dim: #9a9a9a;
  --line: #2b2b2b;
  --pixel: "Pixelify Sans", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 40rem;
  --gutter: 1rem;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fff;
    --fg: #0b0b0b;
    --dim: #595959;
    --line: #dcdcdc;
    color-scheme: light;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: 1.0625rem/1.65 var(--text);
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

img, svg { display: block; max-width: 100%; }

.pixelated { image-rendering: pixelated; image-rendering: crisp-edges; }

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 40em) { :root { --gutter: 2rem; } }

/* ---------- type ---------- */

h1, h2, h3, .pixel {
  font-family: var(--pixel);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(2.25rem, 8vw, 3.5rem); margin: 0 0 1rem; }
h2 { font-size: 1.5rem; margin: 3rem 0 0.75rem; }
h3 { font-size: 1.15rem; margin: 2rem 0 0.5rem; }

p, ul, ol, dl, table { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
li { margin: 0.25rem 0; }
li::marker { color: var(--dim); }

strong { font-weight: 650; }
small, .dim { color: var(--dim); }
.lede { font-size: 1.2rem; }

hr {
  border: 0;
  height: 2px;
  margin: 3rem 0;
  background: repeating-linear-gradient(90deg, var(--line) 0 2px, transparent 2px 6px);
}

code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.92em; }

/* Owner placeholders stay visible until filled. */
.todo {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.9em;
  outline: 1px dashed currentColor;
  outline-offset: 2px;
  padding: 0 0.2em;
  overflow-wrap: anywhere;
}

/* ---------- links: underline; nav, footer and "more" links get scanlines on hover ---------- */

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover { text-decoration-thickness: 2px; }

.site-nav a,
.site-footer a,
.more { position: relative; }

.site-nav a::after,
.site-footer a::after,
.more::after {
  content: "";
  position: absolute;
  inset: -0.1em -0.25em;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 3px);
  opacity: 0;
}

.site-nav a:hover::after,
.site-footer a:hover::after,
.more:hover::after,
.site-nav a:focus-visible::after,
.site-footer a:focus-visible::after,
.more:focus-visible::after {
  opacity: 0.22;
  animation: scan 0.6s steps(3) infinite;
}

@keyframes scan {
  from { background-position: 0 0; }
  to { background-position: 0 3px; }
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  padding: 0.5rem 0.75rem;
  background: var(--fg);
  color: var(--bg);
  z-index: 10;
}
.skip:focus { top: 0.5rem; }

/* ---------- header / footer ---------- */

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--pixel);
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand svg { width: 24px; height: 24px; }

.site-nav ul {
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--pixel);
}

.site-nav a { text-decoration: none; }
/* Small phones (360 px and below): tighter brand and nav, so nothing scrolls sideways; when
   the nav wraps under the brand, both are centred. */
@media (max-width: 24rem) {
  .site-header .wrap { justify-content: center; }
  .brand { letter-spacing: 0.06em; font-size: 1rem; gap: 0.45rem; }
  .site-nav ul { gap: 0.9rem; justify-content: center; }
}
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

.site-footer {
  margin-top: 5rem;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--dim);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.site-footer p { margin: 0; }

/* ---------- home ---------- */

.hero { padding: 4rem 0 2rem; text-align: center; }
.hero .lantern { width: 96px; height: 96px; margin: 0 auto 2rem; }
.hero p { color: var(--dim); font-size: 1.15rem; margin: 0; }

.teaser {
  margin-top: 4rem;
  text-align: center;
}

.teaser h2 { margin-top: 2rem; font-size: 2rem; }

.status {
  display: inline-block;
  margin: 0.5rem 0 1.25rem;
  padding: 0.35rem 0.75rem;
  border: 2px solid var(--fg);
  font-family: var(--pixel);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.contact { text-align: center; margin-top: 5rem; }
.contact h2 { margin-top: 0; }

/* ---------- portrait (black and white; colour dithers in on hover or tap) ---------- */

.portrait {
  position: relative;
  display: block;
  width: 240px;
  height: 240px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: inherit;
}

@media (min-width: 30em) { .portrait { width: 360px; height: 360px; } }

.portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.portrait .colour { visibility: hidden; }

.portrait[aria-pressed="true"] .colour { visibility: visible; animation: dither-in 0.45s both; }

@media (hover: hover) {
  .portrait:hover .colour { visibility: visible; animation: dither-in 0.45s both; }
}

.portrait-hint { margin-top: 0.75rem; font-size: 0.85rem; color: var(--dim); }

/* ---------- inner pages ---------- */

.page-head { padding: 3rem 0 1rem; }
.page-head p { color: var(--dim); margin: 0; }

.prose h2 { padding-top: 0.25rem; }

.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 650; }
.table-scroll { overflow-x: auto; margin-bottom: 1rem; }

.box {
  border: 2px solid var(--fg);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.box > :last-child { margin-bottom: 0; }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1.25rem; }
.facts dt { font-family: var(--pixel); color: var(--dim); }
.facts dd { margin: 0; }

details { border-bottom: 1px solid var(--line); padding: 0.9rem 0; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 650; list-style: none; padding-left: 1.25rem; text-indent: -1.25rem; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; display: inline-block; width: 1.25rem; text-indent: 0; font-family: var(--pixel); }
details[open] summary::before { content: "\2212"; }
details > :not(summary) { margin: 0.75rem 0 0 1.25rem; }

.toc { columns: 2 12rem; font-size: 0.95rem; }

.lost { text-align: center; padding: 5rem 0 2rem; }
.lost .lantern { width: 64px; height: 64px; margin: 0 auto 2rem; opacity: 0.5; }

/* ---------- motion: lantern flicker + dithered fade-in ---------- */

.lantern .tip-b { visibility: hidden; }
.lantern .tip-a { animation: tip-a 2.4s steps(1) infinite; }
.lantern .tip-b { animation: tip-b 2.4s steps(1) infinite; }

@keyframes tip-a {
  0%, 31%, 46%, 79% { visibility: visible; }
  23%, 38%, 62%, 88% { visibility: hidden; }
}
@keyframes tip-b {
  0%, 31%, 46%, 79% { visibility: hidden; }
  23%, 38%, 62%, 88% { visibility: visible; }
}

.fade { animation: dither-in 0.9s both; }
.fade-2 { animation-delay: 0.15s; }
.fade-3 { animation-delay: 0.3s; }
.fade-4 { animation-delay: 0.45s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .lantern .tip-b { visibility: hidden; }
}

/* dither:start (generated by website/tools/build_assets.py; do not edit by hand) */
@keyframes dither-in {
  0% { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Cpath d=''/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Cpath d=''/%3E%3C/svg%3E"); }
  12% { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h2v2h-2zM4 4h2v2h-2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h2v2h-2zM4 4h2v2h-2z'/%3E%3C/svg%3E"); }
  25% { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h2v2h-2zM4 0h2v2h-2zM0 4h2v2h-2zM4 4h2v2h-2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h2v2h-2zM4 0h2v2h-2zM0 4h2v2h-2zM4 4h2v2h-2z'/%3E%3C/svg%3E"); }
  38% { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h2v2h-2zM4 0h2v2h-2zM2 2h2v2h-2zM0 4h2v2h-2zM4 4h2v2h-2zM6 6h2v2h-2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h2v2h-2zM4 0h2v2h-2zM2 2h2v2h-2zM0 4h2v2h-2zM4 4h2v2h-2zM6 6h2v2h-2z'/%3E%3C/svg%3E"); }
  50% { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h2v2h-2zM4 0h2v2h-2zM2 2h2v2h-2zM6 2h2v2h-2zM0 4h2v2h-2zM4 4h2v2h-2zM2 6h2v2h-2zM6 6h2v2h-2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h2v2h-2zM4 0h2v2h-2zM2 2h2v2h-2zM6 2h2v2h-2zM0 4h2v2h-2zM4 4h2v2h-2zM2 6h2v2h-2zM6 6h2v2h-2z'/%3E%3C/svg%3E"); }
  62% { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h2v2h-2zM2 0h2v2h-2zM4 0h2v2h-2zM2 2h2v2h-2zM6 2h2v2h-2zM0 4h2v2h-2zM4 4h2v2h-2zM6 4h2v2h-2zM2 6h2v2h-2zM6 6h2v2h-2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h2v2h-2zM2 0h2v2h-2zM4 0h2v2h-2zM2 2h2v2h-2zM6 2h2v2h-2zM0 4h2v2h-2zM4 4h2v2h-2zM6 4h2v2h-2zM2 6h2v2h-2zM6 6h2v2h-2z'/%3E%3C/svg%3E"); }
  75% { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h2v2h-2zM2 0h2v2h-2zM4 0h2v2h-2zM6 0h2v2h-2zM2 2h2v2h-2zM6 2h2v2h-2zM0 4h2v2h-2zM2 4h2v2h-2zM4 4h2v2h-2zM6 4h2v2h-2zM2 6h2v2h-2zM6 6h2v2h-2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h2v2h-2zM2 0h2v2h-2zM4 0h2v2h-2zM6 0h2v2h-2zM2 2h2v2h-2zM6 2h2v2h-2zM0 4h2v2h-2zM2 4h2v2h-2zM4 4h2v2h-2zM6 4h2v2h-2zM2 6h2v2h-2zM6 6h2v2h-2z'/%3E%3C/svg%3E"); }
  88% { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h2v2h-2zM2 0h2v2h-2zM4 0h2v2h-2zM6 0h2v2h-2zM0 2h2v2h-2zM2 2h2v2h-2zM6 2h2v2h-2zM0 4h2v2h-2zM2 4h2v2h-2zM4 4h2v2h-2zM6 4h2v2h-2zM2 6h2v2h-2zM4 6h2v2h-2zM6 6h2v2h-2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h2v2h-2zM2 0h2v2h-2zM4 0h2v2h-2zM6 0h2v2h-2zM0 2h2v2h-2zM2 2h2v2h-2zM6 2h2v2h-2zM0 4h2v2h-2zM2 4h2v2h-2zM4 4h2v2h-2zM6 4h2v2h-2zM2 6h2v2h-2zM4 6h2v2h-2zM6 6h2v2h-2z'/%3E%3C/svg%3E"); }
  100% { -webkit-mask-image: none; mask-image: none; }
}
/* dither:end */
