/* ==========================================================================
   352nd Imminent Threat Detail — shared stylesheet for every page.
   "Dark space aura" built from the ITD logo: steel plate, gold border,
   black condensed letters, floating in a near-black starfield.

   Contents
     1. Fonts            7. Hero (+ banner variants)   13. Community cards
     2. Tokens           8. Panel / section heading    14. Archive cards + meta
     3. Base / reset     9. Grids                      15. Notice, guide, details
     4. Aura + stars    10. Cards (shared)             16. Footer
     5. Layout shell    11. Buttons, pills, chips      17. Utilities
     6. Top bar         12. Server cards, game tiles   18. Motion / responsive
   ========================================================================== */

/* 1. Fonts — self-hosted, latin subset only, so no third-party request ever. */
@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 500 700; /* variable font: one file covers 500–700 */
  font-display: swap;
  src: url("../fonts/oswald-latin-500-700.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: "Permanent Marker";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/permanent-marker-latin-400.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;
}

/* 2. Tokens — every colour on the site comes from here. */
:root {
  color-scheme: dark;

  /* ground + surfaces (translucent ink over the aura) */
  --bg: #05060a;
  --surface: rgba(13, 16, 24, 0.72);        /* panels */
  --surface-solid: #0c0f16;                 /* fallback when backdrop-filter is unsupported */
  --card: rgba(19, 23, 34, 0.78);           /* cards sit slightly lighter than panels */
  --card-solid: #12151f;
  --card-hover: rgba(25, 30, 44, 0.86);
  --well: #07080d;                          /* dark media well behind logos / planets */
  --blur: blur(14px) saturate(130%);

  /* lines */
  --line: rgba(195, 195, 195, 0.12);        /* steel hairline */
  --line-strong: rgba(195, 195, 195, 0.22);
  --line-gold: rgba(255, 202, 24, 0.55);

  /* identity */
  --gold: #ffca18;
  --gold-soft: #ffdc66;                     /* hover / links on dark */
  --gold-deep: #c99a00;                     /* pressed edge of the gold button */
  --gold-tint: rgba(255, 202, 24, 0.08);
  --gold-glow: rgba(255, 202, 24, 0.28);
  --steel: #c3c3c3;
  --ink: #05060a;                           /* text on gold / steel */

  /* text (contrast measured on --card-solid #12151f) */
  --text: #eceef2;                          /* 16.0:1 */
  --muted: #a3abba;                         /*  7.9:1 */
  --faint: #8a93a3;                         /*  5.8:1, small print only */

  /* status (each ≥ 4.5:1 as text on the card surface) */
  --online: #4ade80;                        /* 10.3:1 */
  --offline: #ff7a7a;                       /*  6.9:1 */
  --unknown: #a1adc0;                       /*  8.0:1 */

  /* shape + depth */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  --shadow-lift: 0 22px 56px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line-gold), 0 0 28px rgba(255, 202, 24, 0.12);

  /* type */
  --font-display: "Oswald", "Bebas Neue", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-marker: "Permanent Marker", "Comic Sans MS", cursive;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  /* layout */
  --shell: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --topbar-h: 68px;
  --tap: 44px;                              /* minimum touch target */
}

/* 3. Base */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* anchor jumps land below the sticky bar */
  scroll-padding-top: calc(var(--topbar-h) + 16px);
}

body {
  position: relative;
  isolation: isolate;          /* keeps the aura pseudo-elements behind content */
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--text);
}
h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); font-weight: 700; text-transform: uppercase; letter-spacing: 0.015em; }
h2 { font-size: clamp(1.5rem, 3vw, 1.95rem); text-transform: uppercase; letter-spacing: 0.03em; }
h3 { font-size: 1.3rem; font-weight: 600; }

p, ul, ol, dl { margin: 0 0 1em; }

a { color: var(--gold-soft); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--gold); text-decoration-thickness: 2px; }

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

code, kbd { font-family: var(--font-mono); font-size: 0.92em; }

button { font: inherit; color: inherit; }

::selection { background: rgba(255, 202, 24, 0.35); color: #fff; }

/* One visible focus ring everywhere (keyboard only). */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
/* on gold surfaces a gold ring would vanish, so those use white */
.btn--primary:focus-visible { outline-color: #fff; }

/* 4. Aura — two fixed layers painted with gradients only (no images).
   ::before = nebula: warm gold bloom top-left, cool indigo haze right, faint steel haze.
   ::after  = starfield: three tiled densities of tiny radial-gradient dots.
   position:fixed on pseudo-elements instead of background-attachment:fixed,
   which repaints on scroll and is ignored on iOS. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background:
    radial-gradient(ellipse 55% 42% at 12% -4%, rgba(255, 202, 24, 0.17), transparent 70%),
    radial-gradient(ellipse 38% 30% at 30% 6%, rgba(255, 150, 40, 0.07), transparent 72%),
    radial-gradient(ellipse 50% 55% at 100% 28%, rgba(64, 72, 210, 0.17), transparent 70%),
    radial-gradient(ellipse 60% 45% at 82% 105%, rgba(38, 58, 150, 0.16), transparent 70%),
    radial-gradient(ellipse 45% 35% at 48% 62%, rgba(195, 195, 195, 0.035), transparent 72%),
    radial-gradient(ellipse 35% 30% at 0% 85%, rgba(255, 202, 24, 0.05), transparent 70%),
    var(--bg);
}
body::after {
  opacity: 0.7;
  background-image:
    /* dense, dim */
    radial-gradient(1px 1px at 12px 24px, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(1px 1px at 68px 92px, rgba(255, 255, 255, 0.45), transparent 60%),
    radial-gradient(1px 1px at 104px 38px, rgba(220, 228, 255, 0.5), transparent 60%),
    radial-gradient(1px 1px at 40px 130px, rgba(255, 255, 255, 0.4), transparent 60%),
    radial-gradient(1px 1px at 132px 118px, rgba(255, 240, 210, 0.45), transparent 60%),
    /* medium */
    radial-gradient(1.4px 1.4px at 50px 70px, rgba(255, 255, 255, 0.75), transparent 60%),
    radial-gradient(1.4px 1.4px at 190px 22px, rgba(210, 220, 255, 0.7), transparent 60%),
    radial-gradient(1.4px 1.4px at 240px 180px, rgba(255, 236, 190, 0.7), transparent 60%),
    radial-gradient(1.4px 1.4px at 120px 230px, rgba(255, 255, 255, 0.6), transparent 60%),
    /* sparse, bright */
    radial-gradient(2px 2px at 160px 140px, rgba(255, 255, 255, 0.95), transparent 60%),
    radial-gradient(2px 2px at 420px 60px, rgba(255, 226, 150, 0.85), transparent 60%),
    radial-gradient(2px 2px at 330px 380px, rgba(200, 214, 255, 0.9), transparent 60%);
  background-size:
    150px 150px, 150px 150px, 150px 150px, 150px 150px, 150px 150px,
    270px 270px, 270px 270px, 270px 270px, 270px 270px,
    480px 480px, 480px 480px, 480px 480px;
  animation: twinkle 9s ease-in-out infinite alternate;
}
@keyframes twinkle {
  from { opacity: 0.55; }
  to   { opacity: 0.85; }
}

/* 5. Layout shell */
.shell {
  width: 100%;
  max-width: calc(var(--shell) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.site-main { padding-block: clamp(20px, 4vw, 36px) clamp(40px, 7vw, 72px); }
.section { margin-top: clamp(44px, 7vw, 76px); }
.section:first-child { margin-top: 0; }

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; color: var(--ink); }

/* 6. Top bar — sticky, glass, logo mark + wordmark, nav, Discord CTA. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 6, 10, 0.94);
  border-bottom: 1px solid var(--line);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar {
    background: rgba(5, 6, 10, 0.7);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
  }
}
.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  min-height: var(--topbar-h);
  padding-block: 10px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  margin-right: auto;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: #fff; text-decoration: none; }
.brand__mark { width: 54px; height: auto; flex: none; filter: drop-shadow(0 0 10px rgba(255, 202, 24, 0.25)); }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.brand__name span { display: block; }      /* optional 2-line split, used by <span>s inside */
.brand__name small {
  display: block;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.nav { display: flex; align-items: center; gap: 6px 14px; }
.nav__list {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav__link:hover { color: var(--text); background: rgba(195, 195, 195, 0.07); text-decoration: none; }
.nav__link[aria-current="page"],
.nav__link.is-current { color: var(--gold); }

/* 7. Hero — glass panel with a gold bloom bleeding from behind it. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: clamp(36px, 6vw, 64px);
  padding: clamp(28px, 5.5vw, 64px) clamp(20px, 5vw, 60px);
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hero { background: var(--surface); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
}
.hero::before {               /* gold nebula + top gold hairline */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, transparent, rgba(255, 202, 24, 0.7) 30%, rgba(255, 202, 24, 0.7) 70%, transparent) top / 100% 1px no-repeat,
    radial-gradient(ellipse 60% 80% at 0% 0%, rgba(255, 202, 24, 0.16), transparent 65%),
    radial-gradient(ellipse 50% 70% at 100% 100%, rgba(70, 82, 220, 0.16), transparent 70%);
}
.hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
}
.hero__content { max-width: 760px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.eyebrow::before {             /* short gold rule, echoes the plate border */
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
}
.hero__title { margin-bottom: 14px; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6); }
.hero__title .accent { color: var(--gold); }
.hero__title .line { display: block; }      /* deliberate line breaks inside a long h1 */
.hero__lead {
  max-width: 62ch;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
}
.hero__chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px; padding: 0; list-style: none; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Big ITD plate on the home hero; decorative (aria-hidden), gently glowing. */
.hero__emblem {
  position: relative;
  width: clamp(180px, 24vw, 300px);
  margin: 0;
}
.hero__emblem::before {
  content: "";
  position: absolute;
  inset: -30% -25%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 202, 24, 0.3), rgba(255, 202, 24, 0.08) 55%, transparent);
  filter: blur(6px);
}
.hero__emblem img { width: 100%; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.6)); }

/* Breadcrumb shown in archive-page heroes. */
.crumbs { margin: -8px 0 10px; font-size: 0.9rem; }   /* 44px links; negative margin keeps the old rhythm */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; }
.crumbs li { display: inline-flex; align-items: center; color: var(--muted); }
/* separator trails each item, so a wrapped second line never starts with "/" */
.crumbs li:not(:last-child)::after { content: "/"; margin: 0 10px; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; min-height: var(--tap); }
.crumbs a:hover { color: var(--gold); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--text); }

/* Hero with a game banner: a server-only 1920x1080 image under a heavy dark
   overlay so text stays AA. The image is chosen by a per-game modifier class
   (no inline style attributes); URLs are root-absolute because the banners
   live only on the server. */
.hero--banner {
  background-color: var(--surface-solid);
  background-image:
    linear-gradient(90deg, rgba(5, 6, 10, 0.94) 0%, rgba(5, 6, 10, 0.82) 48%, rgba(5, 6, 10, 0.55) 100%),
    linear-gradient(0deg, rgba(5, 6, 10, 0.9), rgba(5, 6, 10, 0) 60%),
    var(--hero-image, none);
  background-position: center;
  background-size: cover;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.hero--banner .hero__content { max-width: 680px; }
.hero--stationeers    { --hero-image: url("/stationeers-archives/starfield-1920x1080.jpg"); }
.hero--astroneer      { --hero-image: url("/astroneer-archives/AstroneerBanner1920x1080.jpg"); }
.hero--spaceengineers {    /* the banner has a "SPACE ENGINEERS" wordmark top-left: aim at the astronaut instead */
  --hero-image: url("/spaceengineers-archives/SpaceEngineersBanner1920x1080.jpg");
  background-position: center, center, 80% 100%;
}
.hero--valheim        { --hero-image: url("/valheim-archives/Valheimbanner1920x1080.jpg"); }
.hero--ark            { --hero-image: url("/arksurvivalevolved-archives/ArksurvivalevolvedBanner1920x1080.jpg"); }

.hero__stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }

/* 8. Panel + section heading */
.panel {
  padding: clamp(20px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .panel { background: var(--surface); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.section-head::after {        /* gold segment on the divider */
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 72px;
  height: 2px;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold-glow);
}
.section-head h2 { margin: 0; }
.section-head__kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.section-head__meta,
.section-head p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.section-intro { max-width: 70ch; margin: -6px 0 24px; color: var(--muted); }

/* 9. Grids — auto-fit so they collapse to one column on phones. */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(14px, 2vw, 22px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.grid--servers   { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid--games     { grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.grid--archives  { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.grid--community { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }   /* 4 across or 2x2, never 3+1 */
.grid > li { display: flex; min-width: 0; }   /* list items stretch their card */
.grid > li > * { flex: 1; }

/* 10. Card (shared base) — glass, hairline, gold hairline + glow on hover AND focus-within. */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-solid);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card { background: var(--card); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
}
.card:hover,
.card:focus-within {
  border-color: var(--line-gold);
  background-color: var(--card-hover);
  box-shadow: var(--shadow-lift);
}
.card--lift:hover,
.card--lift:focus-within { transform: translateY(-3px); }
.card__body { display: flex; flex: 1; flex-direction: column; padding: 20px; }
.card__title { margin-bottom: 6px; }
.card__text { color: var(--muted); }
.card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }

/* 11a. Buttons — primary echoes the logo plate (gold fill, near-black text). */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }

.btn--primary {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--gold-deep), 0 8px 22px rgba(255, 202, 24, 0.18);
}
.btn--primary:hover { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--ink); box-shadow: 0 3px 0 var(--gold-deep), 0 10px 30px rgba(255, 202, 24, 0.3); }

.btn--secondary {           /* steel outline */
  border-color: rgba(195, 195, 195, 0.55);
  background: rgba(195, 195, 195, 0.04);
  color: var(--text);
}
.btn--secondary:hover { border-color: var(--steel); background: rgba(195, 195, 195, 0.12); color: #fff; }

.btn--ghost {               /* quiet text-ish button for tertiary actions */
  border-color: var(--line-strong);
  background: transparent;
  color: var(--muted);
}
.btn--ghost:hover { border-color: var(--line-gold); color: var(--gold-soft); }

.btn--sm { min-height: var(--tap); padding: 8px 14px; font-size: 0.92rem; }   /* smaller text, same 44px target */
.btn--block { width: 100%; }
.btn[aria-disabled="true"], .btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Small text-link with trailing arrow (external or "more" links). */
.link-arrow { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); font-weight: 600; }
.link-arrow::after { content: "\2192"; transition: transform 0.15s ease; }
.link-arrow[target="_blank"]::after,
.link-arrow--external::after { content: "\2197"; }
.link-arrow:hover::after { transform: translateX(3px); }

/* 11b. Status pill — coloured dot AND a text label, never colour alone. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 9px;
  border: 1px solid currentColor;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--unknown);
  background: rgba(161, 173, 192, 0.08);
}
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.pill--online  { color: var(--online);  background: rgba(74, 222, 128, 0.09); }
.pill--online .pill__dot { box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18), 0 0 10px rgba(74, 222, 128, 0.7); }
.pill--offline { color: var(--offline); background: rgba(255, 122, 122, 0.09); }
.pill--unknown { color: var(--unknown); }
.pill--loading { color: var(--muted); border-style: dashed; }

/* 11c. Chip — summary facts in heroes ("3 of 9 servers online"). */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: rgba(5, 6, 10, 0.5);
  color: var(--text);
  font-size: 0.92rem;
}
.chip strong { color: var(--gold); font-weight: 700; }
.chip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.chip--online .chip__dot { background: var(--online); box-shadow: 0 0 8px rgba(74, 222, 128, 0.8); }
.chip--muted { color: var(--muted); }

/* Small uppercase tag ("Archived save"). */
.tag {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 9px;
  border: 1px solid rgba(255, 202, 24, 0.35);
  border-radius: 6px;
  background: var(--gold-tint);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* 12a. Server card (built by assets/js/status.js; skeletons in index.html). */
.server-card .card__body { gap: 14px; }
.server-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.server-card__game { margin: 0; font-size: 1.35rem; overflow-wrap: anywhere; }
.server-card__name {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}
.server-card__label {          /* "Last seen" caption above stale/offline facts */
  margin: 0 0 -6px;
  color: var(--faint);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.facts { display: grid; gap: 10px; margin: 0; }
.fact {
  display: grid;
  grid-template-columns: 4.8rem minmax(0, 1fr);
  align-items: center;
  gap: 4px 12px;
}
.fact--address { grid-template-columns: 1fr; gap: 6px; }   /* address + Copy get the full row */
.fact dt { color: var(--faint); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.fact dd { margin: 0; min-width: 0; color: var(--text); overflow-wrap: anywhere; }
.facts--last-seen .fact dd { color: var(--muted); }

.players { display: flex; align-items: center; gap: 10px; }
.players__count { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.meter {
  position: relative;
  flex: 1;
  max-width: 140px;
  height: 6px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(195, 195, 195, 0.14);
}
.meter__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
}
/* status.js sets data-fill="0".."10" (tenths of the max) instead of an inline width */
.meter__fill[data-fill="1"]  { width: 10%; }
.meter__fill[data-fill="2"]  { width: 20%; }
.meter__fill[data-fill="3"]  { width: 30%; }
.meter__fill[data-fill="4"]  { width: 40%; }
.meter__fill[data-fill="5"]  { width: 50%; }
.meter__fill[data-fill="6"]  { width: 60%; }
.meter__fill[data-fill="7"]  { width: 70%; }
.meter__fill[data-fill="8"]  { width: 80%; }
.meter__fill[data-fill="9"]  { width: 90%; }
.meter__fill[data-fill="10"] { width: 100%; }

.address { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.address code {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(5, 6, 10, 0.55);
  color: var(--text);
  overflow-wrap: anywhere;
}
.btn--copy {
  min-height: 34px;
  padding: 4px 12px;
  border-color: var(--line-strong);
  background: rgba(195, 195, 195, 0.05);
  color: var(--text);
  font-size: 0.82rem;
  position: relative;
}
.btn--copy::before {           /* stretch the hit area to 44px without growing the visual */
  content: "";
  position: absolute;
  inset: -5px -2px;
}
.btn--copy:hover { border-color: var(--line-gold); color: var(--gold-soft); }
.copy-status { color: var(--online); font-size: 0.82rem; font-weight: 600; }
.copy-status.is-error { color: var(--offline); }
/* The live region must stay in the accessibility tree while empty, or "Copied" may never be
   announced; collapse it visually instead of display:none (also stops it taking a flex gap). */
.copy-status:empty {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.server-card__note { margin: 0; color: var(--faint); font-size: 0.85rem; overflow-wrap: anywhere; }
.server-card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 4px; }
.server-card__actions .btn { flex: 1 1 auto; }

/* state accents: a thin coloured rule along the card's top edge */
.server-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 18px;
  right: 18px;
  height: 2px;
  border-radius: 2px;
  background: transparent;
}
.server-card.is-online::before  { background: linear-gradient(90deg, transparent, var(--online), transparent); }
.server-card.is-offline::before { background: linear-gradient(90deg, transparent, var(--offline), transparent); opacity: 0.7; }

/* loading skeleton */
.server-card.is-loading .skeleton {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(195, 195, 195, 0.08), rgba(195, 195, 195, 0.16), rgba(195, 195, 195, 0.08));
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}
.skeleton--wide { width: 80%; }
.skeleton--mid { width: 55%; }
.skeleton--short { width: 35%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* one friendly message in place of the grid (config failure / nothing listed) */
.status-message {
  grid-column: 1 / -1;
  margin: 0;
  padding: 22px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(13, 16, 24, 0.6);
  color: var(--muted);
  text-align: center;
}
.status-message strong { display: block; margin-bottom: 4px; color: var(--text); font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: 0.03em; }

/* 12b. Game tile (home "Archives") — the WHOLE tile is one link. */
.game-tile {
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
}
.game-tile:hover { color: var(--text); text-decoration: none; }
.game-tile__media {
  display: grid;
  place-items: center;
  /* minmax(0,1fr) tracks hold the well at its aspect ratio, so a tall logo (Valheim) scales down
     instead of stretching the well and its whole grid row */
  grid-template-rows: minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  aspect-ratio: 16 / 7;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 70% 80% at 50% 50%, rgba(195, 195, 195, 0.06), transparent 70%),
    var(--well);
}
.game-tile__media img {
  /* sized to the image itself (not the well) so radius / trim clip the picture, not empty space */
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  transition: transform 0.25s ease;
}
.game-tile:hover .game-tile__media img,
.game-tile:focus-visible .game-tile__media img { transform: scale(1.03); }
/* StationeersBanner1240x327.png has a baked-in opaque white frame; clip it off */
/* (radius follows the plate's own rounded corners: ~3.6% of the width, ~13.8% of the height) */
.game-tile__media img.is-trimmed { clip-path: inset(2.8% 1% round 3.6% / 13.8%); }
.game-tile__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px 18px;
}
.game-tile__name { margin: 0 0 2px; font-size: 1.3rem; }
.game-tile__meta { margin: 0; color: var(--muted); font-size: 0.92rem; }
.game-tile__arrow {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold);
  font-size: 1.15rem;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.game-tile:hover .game-tile__arrow,
.game-tile:focus-visible .game-tile__arrow { background: var(--gold); border-color: var(--gold); color: var(--ink); transform: translateX(2px); }
.game-tile:focus-visible { outline-offset: 4px; border-radius: var(--radius); }

/* 13. Community cards */
.community-card__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 202, 24, 0.06);
  color: var(--gold);
}
.community-card__icon svg { width: 26px; height: 26px; fill: currentColor; }
.community-card__icon--discord { color: #aab4ff; background: rgba(88, 101, 242, 0.14); border-color: rgba(88, 101, 242, 0.4); }
.community-card__icon--patreon { color: #ff8a7a; background: rgba(255, 66, 77, 0.1); border-color: rgba(255, 66, 77, 0.35); }
.community-card .card__text { flex: 1; }
.contact-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 0 12px; }
.contact-line a { display: inline-flex; align-items: center; min-height: var(--tap); }
.contact-line code { color: var(--text); font-size: 0.95rem; overflow-wrap: anywhere; }
.community-more { margin: 22px 0 0; color: var(--muted); }

/* 14. Archive card — preview media, title, tag, meta list, note, download. */
.archive-card { overflow: hidden; }
.archive-card__media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-bottom: 1px solid var(--line);
  background: var(--well);
}
/* planet renders / logos: keep the whole image, centred on a dark well with a soft glow */
.archive-card__media--contain {
  object-fit: contain;
  padding: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(195, 195, 195, 0.09), transparent 62%),
    radial-gradient(ellipse 80% 90% at 50% 120%, rgba(255, 202, 24, 0.07), transparent 70%),
    var(--well);
}
/* map screenshots: fill the frame */
.archive-card__media--cover { object-fit: cover; }
.archive-card__body { display: flex; flex: 1; flex-direction: column; gap: 12px; padding: 18px 20px 20px; }
.archive-card__title { margin: 0; font-size: 1.45rem; }
.archive-card__note { flex: 1; margin: 0; color: var(--muted); font-size: 0.94rem; }
.archive-card__action { margin-top: 4px; }

/* Few saves: don't leave one small card in the corner of a wide panel. */
@media (min-width: 700px) {
  /* one save: a single wide card, image beside the text */
  .grid--archives:has(> li:only-child) { grid-template-columns: minmax(0, 760px); }
  .grid--archives > li:only-child .archive-card { display: grid; grid-template-columns: minmax(240px, 42%) minmax(0, 1fr); }
  .grid--archives > li:only-child .archive-card__media {
    height: 100%;
    aspect-ratio: auto;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
}
/* two saves: cap the card width instead of stretching or stranding them */
.grid--archives:has(> li:nth-child(2):last-child) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 380px)); }
/* four saves: 2x2 on mid widths rather than 3+1 */
@media (min-width: 600px) and (max-width: 1180px) {
  .grid--archives:has(> li:nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* meta list: label / value pairs (dl > div > dt + dd) */
.meta { display: grid; gap: 7px; margin: 2px 0 0; font-size: 0.9rem; }
.meta__row { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr); gap: 2px 10px; }
.meta dt { color: var(--faint); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding-top: 0.15em; }
.meta dd { margin: 0; min-width: 0; color: var(--text); }
/* File row: label above the name so the name gets the card's full width */
.meta__row:has(> dd > code) { grid-template-columns: 1fr; gap: 2px; }
/* Long file names must wrap, never overflow. Browsers break after hyphens but not after "_" or "$",
   so archive pages put <wbr> at sensible points in long names (after "$", "_", before "_YYYYMMDD" /
   ".zip"); the visible and copied text is unchanged. overflow-wrap is only the last resort. */
.meta code, .meta .file {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* 15a. Notice — gold left rule. */
.notice {
  margin: 0 0 26px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 202, 24, 0.22);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(255, 202, 24, 0.1), rgba(255, 202, 24, 0.03));
  color: var(--text);
}
.notice > :last-child { margin-bottom: 0; }
.notice strong { color: var(--gold); }

/* 15b. Install / how-to guide */
.guide {
  margin-top: clamp(30px, 5vw, 44px);
  padding-top: clamp(22px, 4vw, 30px);
  border-top: 1px solid var(--line);
}
.guide h2 { font-size: clamp(1.3rem, 2.4vw, 1.55rem); margin-bottom: 16px; }
.steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  position: relative;
  min-height: 34px;
  padding: 4px 0 0 48px;
  color: var(--muted);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-gold);
  border-radius: 9px;
  background: var(--gold-tint);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 600;
}
.steps strong, .steps code { color: var(--text); }
.guide__more { margin: 18px 0 0; color: var(--muted); }

/* 15c. Details disclosure */
.disclosure {
  margin-top: 26px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(5, 6, 10, 0.4);
}
.disclosure summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  list-style: none;
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border: 1px solid var(--line-gold);
  border-radius: 6px;
  color: var(--gold);
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1;
}
.disclosure[open] summary::before { content: "\2212"; }
.disclosure summary:hover { color: var(--gold-soft); }
.disclosure__body { padding: 0 18px 16px 54px; color: var(--muted); }
.disclosure__body > :last-child { margin-bottom: 0; }

/* 16. Footer — ITD Solutions lockup, tagline, thanks, copyright. */
.site-footer {
  position: relative;
  margin-top: clamp(20px, 4vw, 40px);
  padding-block: 36px 40px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(5, 6, 10, 0.2), rgba(5, 6, 10, 0.85));
  color: var(--muted);
  font-size: 0.92rem;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: min(420px, 70%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
}
.lockup { display: flex; align-items: center; gap: 14px; margin: 0; }
.lockup__mark { width: 64px; height: auto; flex: none; }
.lockup__text { display: grid; gap: 2px; }
.lockup__name {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}
.tagline {
  margin: 0;
  color: var(--gold);
  font-family: var(--font-marker);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.site-footer__meta { display: grid; gap: 4px; text-align: right; }
.site-footer__meta p { margin: 0; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 0; padding: 0; list-style: none; justify-content: flex-end; }
.site-footer__links a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--muted); }
.site-footer__links a:hover { color: var(--gold); }

/* 17. Utilities */
.visually-hidden {
  position: absolute !important;
  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;
}
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.wrap-anywhere { overflow-wrap: anywhere; }
.stack > * + * { margin-top: 1em; }
[hidden] { display: none !important; }

/* 18. Responsive + motion */
@media (max-width: 640px) {
  .hero__layout { grid-template-columns: 1fr; }
  .hero__emblem { display: none; }          /* the top-bar mark already carries the identity */
}

@media (max-width: 860px) {
  .hero__emblem { width: clamp(150px, 22vw, 200px); }
  .site-footer__meta { text-align: left; }
  .site-footer__links { justify-content: flex-start; }
}

/* On phones and short (zoomed) viewports the bar wraps to two rows; pinned, it would cover up to
   44% of the screen and hide focus rings, so there it scrolls away with the page. */
@media (max-width: 720px), (max-height: 500px) {
  .topbar { position: relative; }
  html { scroll-padding-top: 16px; }
}

/* Narrow screens: the lead runs the full width over the lighter right side of the banner, so the
   overlay goes uniform there to keep muted text above 4.5:1. */
@media (max-width: 1023px) {
  .hero--banner {
    background-image:
      linear-gradient(rgba(5, 6, 10, 0.86), rgba(5, 6, 10, 0.86)),
      linear-gradient(0deg, rgba(5, 6, 10, 0.9), rgba(5, 6, 10, 0) 60%),
      var(--hero-image, none);
  }
}

@media (max-width: 720px) {
  :root { --topbar-h: 114px; }
  .topbar__inner { gap: 4px 12px; padding-block: 8px 4px; }
  .brand__mark { width: 46px; }
  .brand__name { font-size: 0.98rem; }
  .nav { order: 3; width: 100%; margin-inline: -8px; }
  .nav__list { width: 100%; justify-content: space-between; }
  .nav__link { padding: 0 8px; }
  .topbar__cta { order: 2; }
}

@media (max-width: 420px) {
  .brand { gap: 10px; }
  .brand__mark { width: 40px; }
  .brand__name { font-size: 0.86rem; letter-spacing: 0.03em; }
  .topbar__cta { padding-inline: 12px; font-size: 0.85rem; }
  .hero { border-radius: var(--radius); }
  .eyebrow { letter-spacing: 0.14em; font-size: 0.82rem; }
  .hero__actions .btn { flex: 1 1 100%; }
  .disclosure__body { padding-left: 18px; }
  .panel .archive-card__body { padding-inline: 16px; }
}

@media (max-width: 360px) {          /* label/value pairs stack only on the narrowest phones */
  .fact, .meta__row { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::after { animation: none; opacity: 0.7; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .card--lift:hover, .card--lift:focus-within { transform: none; }
}

@media (forced-colors: active) {
  .pill, .chip, .tag, .btn { border: 1px solid CanvasText; }
  .pill__dot, .chip__dot { background: CanvasText; }
}
