/* The Vault: dark ink, FSI gold and Silkscreen pixel lettering. Dark by design; no light theme. */

/* Self-hosted (SIL OFL 1.1, licences beside the files) so no visitor's IP goes to Google.
   Latin and Latin Extended subsets as Google Fonts serves them; Rubik is one variable file per subset. */
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/static/fonts/rubik-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/static/fonts/rubik-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Silkscreen"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/silkscreen-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Silkscreen"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/silkscreen-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Silkscreen"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/silkscreen-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Silkscreen"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/silkscreen-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --gold-hi: #fad64a;
  --gold: #f7c431;
  --gold-mid: #e9b115;
  --gold-deep: #e29104;
  --ink: #0f080d;
  --ink-raised: #1b1520;
  --ink-glow: #2a2230;
  --slate: #3c3947;
  --slate-2: #312c36;
  --cream: #fff4c2;
  --text: #eae4d2;
  --text-soft: #cfc6b0;
  --text-muted: #a39b88;
  --live: #5fd35a;
  --live-text: #bfe9b0;
  --live-halo: rgba(95, 211, 90, .2);
  --dirt-hi: #7a5a3a;
  --dirt-lo: #4a3524;
  --f-pixel: "Silkscreen", "Courier New", monospace;
  --f-body: "Rubik", system-ui, sans-serif;
  --gutter: 16px;
  --radius: 6px;
  --touch: 44px;
  --page: 1080px;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--text);
  font-family: var(--f-body);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

main { flex: 1; width: 100%; }

/* Full-bleed bands whose content stays within the page width. */
.hero, .sec { padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px), (100% - var(--page)) / 2); }

img { max-width: 100%; }

a { color: var(--gold-hi); }

h1, h2, h3 { font-family: var(--f-pixel); color: var(--gold); letter-spacing: .03em; line-height: 1.2; font-weight: 700; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.skip { position: absolute; left: var(--gutter); top: -100px; padding: 10px 14px; background: var(--gold); color: var(--ink); font-weight: 700; z-index: 10; }
.skip:focus { top: 8px; }

/* ---------- Nav ---------- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px max(var(--gutter), env(safe-area-inset-right, 0px)) 8px max(var(--gutter), env(safe-area-inset-left, 0px));
  border-bottom: 2px solid var(--slate-2);
  font-family: var(--f-pixel);
  font-size: .75rem;
}
.nav .brand { display: inline-flex; align-items: center; min-height: var(--touch); }
.nav .brand img { display: block; height: 34px; width: auto; aspect-ratio: 512 / 300; object-fit: cover; object-position: 50% 0; image-rendering: pixelated; }
.nav ul { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav a:not(.brand) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  padding: 0 10px;
  border-radius: var(--radius);
  color: var(--gold);
  text-decoration: none;
  text-transform: uppercase;
}
.nav a:not(.brand):hover { background: var(--slate-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--gold); }

@media (max-width: 479.98px) {
  .nav { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav .brand { justify-content: center; }
  .nav ul { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
  .nav li { grid-column: span 2; }
  .nav li:nth-child(n + 4) { grid-column: span 3; }
  .nav a:not(.brand) { padding: 0 4px; font-size: .68rem; background: var(--ink-raised); }
  .nav a[aria-current="page"] { background: var(--gold); }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: 28px 26px;
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
  background: radial-gradient(120% 80% at 50% 0%, var(--ink-glow) 0%, var(--ink) 70%);
}
.hero h1 { margin: 0; }
.hero .logo { width: min(100%, 520px); }
.hero .logo img { display: block; width: 100%; height: auto; aspect-ratio: 512 / 300; object-fit: cover; object-position: 50% 0; image-rendering: pixelated; }
.tagline { margin: 0; max-width: 46ch; color: var(--text-soft); font-size: 1rem; }

.ip { display: flex; width: 100%; max-width: 420px; border: 2px solid var(--gold); border-radius: var(--radius); overflow: hidden; }
.ip .addr { flex: 1; min-width: 0; display: flex; align-items: center; padding: 11px 12px; font-family: var(--f-pixel); color: var(--gold-hi); background: var(--ink-raised); text-align: left; font-size: 1rem; }
.ip .copy {
  min-height: var(--touch);
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--f-pixel);
  font-size: .85rem;
  cursor: pointer;
}
.ip .copy:hover { background: var(--gold-hi); }
.ip .copy:focus-visible { outline-offset: -5px; outline-color: var(--ink); }

.live { display: inline-flex; gap: 8px; align-items: center; margin: 0; font-size: .9rem; color: var(--live-text); font-variant-numeric: tabular-nums; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px var(--live-halo); flex: none; }

/* ---------- Sections and rows ---------- */
.sec { padding-block: 20px; border-top: 2px solid var(--slate-2); display: grid; gap: 12px; }
.sec h2 { margin: 0; font-size: .85rem; }
.rows { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.row { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; font-size: .9rem; font-variant-numeric: tabular-nums; }
.row i { width: 22px; height: 22px; border-radius: 3px; background: linear-gradient(135deg, var(--dirt-hi), var(--dirt-lo)); }
.row em { font-style: normal; color: var(--gold-hi); white-space: nowrap; }

.mode {
  min-height: var(--touch);
  padding: 12px;
  border: 2px solid var(--slate-2);
  border-radius: var(--radius);
  background: var(--ink-raised);
  color: var(--text);
  text-decoration: none;
}
.mode:hover { border-color: var(--slate); }
.mode .name { display: grid; min-width: 0; }
.mode strong { font-family: var(--f-pixel); font-weight: 700; color: var(--gold); font-size: .85rem; }
.mode small { color: var(--text-soft); font-size: .82rem; line-height: 1.4; }
.badge { padding: 3px 7px; border: 1px solid var(--slate); border-radius: 4px; color: var(--text-muted); font-family: var(--f-pixel); font-size: .6rem; text-transform: uppercase; white-space: nowrap; }

@media (min-width: 720px) {
  .modes { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Map hub ---------- */
.maps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.map-card {
  display: grid;
  gap: 12px;
  height: 100%;
  padding: 12px;
  border: 2px solid var(--slate-2);
  border-radius: var(--radius);
  background: var(--ink-raised);
  color: var(--text);
  text-decoration: none;
}
.map-card:hover { border-color: var(--gold-mid); }
.map-card .shot {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid var(--slate);
  border-radius: 4px;
  background: repeating-linear-gradient(45deg, var(--ink-glow) 0 12px, var(--ink) 12px 24px);
}
.map-card .shot img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.map-card .shot.none img { visibility: hidden; }
.map-card .name { display: grid; gap: 4px; }
.map-card strong { font-family: var(--f-pixel); font-weight: 700; color: var(--gold); font-size: 1rem; }
.map-card small { color: var(--text-soft); font-size: .85rem; line-height: 1.4; }
.map-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0; }
.map-stats > div { padding: 8px; border-radius: 4px; background: var(--ink-glow); min-width: 0; }
.map-stats dt { color: var(--text-muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.map-stats dd { margin: 2px 0 0; font-family: var(--f-pixel); color: var(--gold-hi); font-size: .8rem; overflow-wrap: anywhere; }
.map-card .btn { align-self: end; }

@media (min-width: 720px) {
  .maps { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Buttons ---------- */
.cta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; max-width: 420px; margin: 0 auto; }
.cta .wide { grid-column: 1 / -1; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  padding: 11px;
  border-radius: var(--radius);
  font-family: var(--f-pixel);
  font-weight: 700;
  font-size: .85rem;
  text-align: center;
  text-decoration: none;
  /* A <button class="btn"> must not keep the browser's grey face and border. */
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
}
.btn.p { background: var(--gold); color: var(--ink); }
.btn.p:hover { background: var(--gold-hi); }
.btn.s { border: 2px solid var(--slate); color: var(--text); }
.btn.s:hover { border-color: var(--gold-deep); }

/* ---------- 404 ---------- */
.lost { padding-block: 64px; }
.lost h1 { font-size: 3rem; color: var(--gold); }
.lost .tagline b { color: var(--gold-hi); font-family: var(--f-pixel); font-weight: 400; }

/* ---------- Content pages ---------- */
.head { padding-block: 24px 22px; gap: 12px; }
.head h1 { font-size: clamp(1.4rem, 6vw, 2rem); }
.badge.soon { padding: 6px 10px; font-size: .7rem; color: var(--cream); border-color: var(--gold-deep); }

.prose { max-width: 70ch; color: var(--text); }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 12px; }
.prose h3 { margin: 22px 0 8px; font-size: .85rem; }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 1.3rem; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--gold-deep); }
.prose strong { color: var(--cream); }

.sec > p { margin: 0; max-width: 70ch; }
.fine { font-size: .85rem; color: var(--text-soft); }
.fine b { color: var(--gold-hi); font-weight: 500; }
.wait { margin: 0; color: var(--text-muted); font-style: italic; }
.note { margin: 0; color: var(--cream); }

.sec .ip { margin: 0; }
.join .btn { max-width: 420px; }

.steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: step; max-width: 70ch; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--slate-2);
  color: var(--gold);
  font-family: var(--f-pixel);
  font-size: .8rem;
}

.pairs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.pairs div { flex: 1 1 180px; padding: 10px 12px; border: 2px solid var(--slate-2); border-radius: var(--radius); background: var(--ink-raised); }
.pairs dt { color: var(--text-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.pairs dd { margin: 2px 0 0; font-family: var(--f-pixel); color: var(--gold-hi); white-space: nowrap; }

.consoles { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.consoles li { padding: 10px 12px; border-left: 3px solid var(--gold-deep); background: var(--ink-raised); border-radius: 0 var(--radius) var(--radius) 0; font-size: .9rem; }
.consoles strong { display: block; font-family: var(--f-pixel); font-size: .75rem; color: var(--gold); }

.appeal-box .btn { max-width: 420px; }

.rank-icon { width: 36px; height: auto; flex: none; image-rendering: pixelated; }

/* ---------- Live widgets (filled by live.js) ---------- */
.boards, .staff { display: grid; gap: 20px; }
.votes { display: grid; gap: 10px; }
.votes p { margin: 0; }
.board, .staff-group { display: grid; gap: 4px; }
.board h3, .staff-group h3 { margin: 0 0 4px; font-size: .85rem; }
.staff-group h3 { display: flex; align-items: center; gap: 10px; }
.boards .rows, .staff .rows, .votes .rows { gap: 0; }
.boards .row, .staff .row, .votes .row { border-bottom: 1px solid var(--slate-2); }
.boards .row a, .staff .row a, .votes .row a { display: inline-flex; align-items: center; min-height: var(--touch); min-width: 0; overflow-wrap: anywhere; }

.profile > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.profile h1 { margin: 0; font-size: clamp(1.3rem, 6vw, 2rem); overflow-wrap: anywhere; }
.tabs { display: grid; gap: 12px; }
.tabs [role="tablist"] { display: flex; flex-wrap: wrap; gap: 8px; max-width: none; margin: 0; }
.tabs [role="tab"] { flex: 0 1 auto; min-width: 140px; color: var(--text); }
.tabs [role="tab"][aria-selected="true"] { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.tabs [role="tabpanel"] { display: grid; gap: 8px; }
.tabs [role="tabpanel"][hidden] { display: none; }

/* ---------- Footer ---------- */
.foot { border-top: 2px solid var(--slate-2); padding: 18px var(--gutter) 28px; text-align: center; font-size: .85rem; color: var(--text-muted); }
.foot ul { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 6px; padding: 0; list-style: none; }
.foot a { display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 6px; color: var(--gold); }
.foot p { margin: 0; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .dot { animation: pulse 2s ease-in-out infinite; }
  .btn, .mode, .ip .copy, .nav a { transition: background-color .15s ease, border-color .15s ease; }
  @keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px var(--live-halo); }
    50% { box-shadow: 0 0 0 6px transparent; }
  }
}
