/* Neighbors — companion site.
   One stylesheet, no framework, no webfont, no CDN: the api serves this directory as static files
   next to a game server, and a page that phones a third party to render is a page that breaks the
   day that third party does. Palette is the game's own: night-slate panels, the amber the
   instrument cluster is backlit with, and the police-blue used for accents in world. */

:root {
  --bg:        #0e1116;
  --bg-alt:    #131822;
  --panel:     #1a2130;
  --panel-2:   #212a3b;
  --line:      #2b3547;
  --ink:       #e8ecf4;
  --ink-dim:   #a3adc0;
  --ink-faint: #6f7b90;
  --amber:     #f0a836;
  --amber-dim: #c98a26;
  --blue:      #5b8dd6;
  --green:     #4fbf78;
  --red:       #e0574c;
  --radius:    14px;
  --maxw:      1180px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.06rem; }
p { margin: 0 0 1em; }

kbd {
  font-family: var(--mono);
  font-size: .8em;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: .1em .4em;
  color: var(--ink);
}

/* ── Nav ──────────────────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .7rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(14, 17, 22, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; }
.brand-mark {
  width: 15px; height: 15px; border-radius: 3px;
  background: linear-gradient(135deg, var(--amber) 50%, var(--blue) 50%);
}
.brand-name { font-weight: 700; letter-spacing: .14em; font-size: .95rem; }
.nav nav { display: flex; gap: 1.25rem; margin-left: auto; flex-wrap: wrap; }
.nav nav a { color: var(--ink-dim); font-size: .92rem; }
.nav nav a:hover { color: var(--ink); text-decoration: none; }

.status-badge {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--mono); font-size: .74rem;
  color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: 999px;
  padding: .3rem .7rem;
  white-space: nowrap;
}
.status-badge:hover { text-decoration: none; border-color: var(--ink-faint); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); }
.dot.green { background: var(--green); box-shadow: 0 0 8px rgba(79,191,120,.7); }
.dot.red   { background: var(--red);   box-shadow: 0 0 8px rgba(224,87,76,.7); }

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero {
  padding: clamp(3.5rem, 9vw, 7rem) clamp(1rem, 4vw, 2.5rem) clamp(3rem, 6vw, 5rem);
  /* A quiet suggestion of headlights on a night road — cheap, and it never fails to load. */
  background:
    radial-gradient(900px 420px at 18% -8%, rgba(240,168,54,.14), transparent 62%),
    radial-gradient(760px 420px at 85% 8%, rgba(91,141,214,.16), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero { position: relative; overflow: hidden; }
.hero-inner { max-width: var(--maxw); margin: 0 auto; position: relative; z-index: 1; }

/* The art sits BEHIND the copy and is the first thing dropped on a narrow screen: it is scenery,
   and a headline that has to compete with a car for width is a worse headline. */
.hero-art { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero-art img { position: absolute; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .55)); }
.hero-car    { right: -2%; top: 18%; width: min(52vw, 700px); }
@media (max-width: 1180px) { .hero-art { display: none; } }
.eyebrow {
  font-family: var(--mono); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--amber-dim); margin-bottom: 1.2rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 6.4vw, 4.2rem);
  letter-spacing: -.025em; margin-bottom: .5em; max-width: 16ch;
}
.lede { font-size: clamp(1rem, 1.6vw, 1.16rem); color: var(--ink-dim); max-width: 62ch; }
.lede strong { color: var(--ink); }

.cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 .9rem; }
.btn {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  padding: .7rem 1.3rem;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel);
  color: var(--ink); font-weight: 600; text-decoration: none;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.btn small { font-weight: 400; font-size: .74rem; color: var(--ink-faint); letter-spacing: .02em; }
.btn:hover { transform: translateY(-1px); border-color: var(--ink-faint); text-decoration: none; }
.btn-primary { background: var(--amber); color: #1a1206; border-color: var(--amber); }
.btn-primary small { color: rgba(26,18,6,.66); }
.btn-primary:hover { background: #ffbb4d; border-color: #ffbb4d; }
.cta-sm .btn { flex-direction: row; align-items: center; padding: .5rem 1.1rem; }
.cta-note { color: var(--ink-faint); font-size: .9rem; max-width: 60ch; }

.stat-row {
  display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 5vw, 3.5rem);
  margin: 2.6rem 0 0; padding-top: 1.6rem; border-top: 1px solid var(--line);
}
.stat-row dt { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.stat-row dd { margin: .2rem 0 0; font-size: 1.9rem; font-weight: 650; font-variant-numeric: tabular-nums; }

/* ── Bands ────────────────────────────────────────────────────────────────── */

.band { padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 4vw, 2.5rem); }
.band > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.band.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-lede { color: var(--ink-dim); max-width: 66ch; margin-bottom: 2.4rem; }
.footnote { color: var(--ink-faint); font-size: .9rem; margin-top: 2rem; max-width: 70ch; }

.pillars { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }
.pillars article {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.1rem;
}
.pillars h3 { color: var(--amber); }
.pillars p { color: var(--ink-dim); font-size: .95rem; margin: 0; }

/* ── Feature grid ─────────────────────────────────────────────────────────── */

.features { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.feature {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
}
.feature h3 { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .8rem; }
.feature h3 .tag {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); border: 1px solid var(--line); border-radius: 999px; padding: .1rem .5rem;
  font-weight: 500;
}
.feature ul { margin: 0; padding-left: 1.05rem; }
/* No bold lead any more — an item is one plain line, so it needs one plain colour. */
.feature li { color: var(--ink-dim); font-size: .93rem; margin-bottom: .42rem; }

/* ── Roster ───────────────────────────────────────────────────────────────── */

.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; }
.tab {
  font: inherit; font-size: .92rem; font-weight: 600;
  color: var(--ink-dim); background: var(--panel); cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; padding: .45rem 1.1rem;
}
.tab:hover { color: var(--ink); }
.tab.is-active { background: var(--amber); border-color: var(--amber); color: #1a1206; }

.panel { display: none; }
.panel.is-active { display: block; }
.panel-note { color: var(--ink-faint); font-size: .9rem; max-width: 68ch; margin-bottom: 1.6rem; }

.filters { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.4rem; }
.filter {
  font: inherit; font-size: .82rem; cursor: pointer;
  color: var(--ink-dim); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: .28rem .85rem;
}
.filter:hover { color: var(--ink); border-color: var(--ink-faint); }
.filter.is-active { color: var(--amber); border-color: var(--amber-dim); background: rgba(240,168,54,.09); }

.grid { display: grid; gap: 1rem; }
.grid-chars   { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); }
.grid-cars    { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid-weapons { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .14s ease, border-color .14s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--ink-faint); }
.card figure { margin: 0; background: linear-gradient(180deg, var(--panel-2), var(--panel)); }
.card img { display: block; width: 100%; height: auto; }
.grid-chars .card img   { aspect-ratio: 52 / 78; object-fit: contain; padding: .4rem; }
.grid-cars .card img    { aspect-ratio: 8 / 5;   object-fit: contain; }
.grid-weapons .card img { aspect-ratio: 41 / 21; object-fit: contain; padding: .3rem; }
.card-body { padding: .7rem .85rem .85rem; border-top: 1px solid var(--line); }
.card-title { font-weight: 600; font-size: .95rem; }
.card-sub { color: var(--ink-faint); font-size: .78rem; font-family: var(--mono); }

.specs-row { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin-top: .55rem; }
.spec { font-size: .76rem; color: var(--ink-dim); font-family: var(--mono); white-space: nowrap; }
.spec b { color: var(--ink); font-weight: 600; }
.pill {
  font-size: .68rem; font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase;
  border-radius: 999px; padding: .08rem .5rem; border: 1px solid var(--line); color: var(--ink-faint);
}
.pill.hot { color: var(--amber); border-color: var(--amber-dim); }
.pill.blue { color: var(--blue); border-color: #395883; }

/* ── Steps ────────────────────────────────────────────────────────────────── */

/* `margin: 0 auto` and not `margin: 0` — `.band > *` centres every child, and a shorthand that
   zeroes the side margins silently un-centres this one list against every other section. */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 auto 3rem;
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.steps li {
  counter-increment: step; position: relative;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.3rem 1.2rem;
}
.steps li::before {
  content: counter(step);
  position: absolute; top: -.7rem; left: 1.2rem;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--amber); color: #1a1206;
  font-size: .82rem; font-weight: 700; display: grid; place-items: center;
}
.steps h3 { margin-top: .3rem; }
.steps p { color: var(--ink-dim); font-size: .93rem; margin-bottom: .6rem; }

.specs { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.specs > div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.specs h4 { color: var(--amber); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.specs ul { margin: 0; padding-left: 1.05rem; }
.specs li { color: var(--ink-dim); font-size: .92rem; margin-bottom: .35rem; }

/* ── Footer ───────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--line);
  padding: 2.2rem clamp(1rem, 4vw, 2.5rem);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
  color: var(--ink-faint); font-size: .88rem;
}
.footer > div { max-width: 62ch; }
.footer-meta { font-family: var(--mono); font-size: .78rem; }

.empty { color: var(--ink-faint); font-size: .9rem; padding: 1.5rem 0; }

/* ── The small print under "Getting in" ─────────────────────────────────────────
   Collapsed by default because most people never need it, but the SmartScreen one starts open:
   nobody goes looking for an explanation of a warning they have not been shown yet. */
.notes { margin-top: 2.6rem; display: grid; gap: .8rem; }
.note {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.note > summary {
  cursor: pointer; padding: .95rem 1.2rem; font-weight: 600; font-size: .95rem;
  display: flex; align-items: center; gap: .7rem; list-style: none;
}
.note > summary::-webkit-details-marker { display: none; }
.note > summary::after { content: "＋"; margin-left: auto; color: var(--ink-faint); font-weight: 400; }
.note[open] > summary::after { content: "－"; }
.note > summary:hover { background: var(--panel-2); }
.note-flag {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--amber); border: 1px solid var(--amber-dim); border-radius: 999px; padding: .15rem .55rem;
}
.note-body { padding: 0 1.2rem 1.3rem; border-top: 1px solid var(--line); }
.note-body > p { max-width: 78ch; font-size: .93rem; color: var(--ink-dim); margin: 1rem 0; }
.note-body code {
  font-family: var(--mono); font-size: .84em; background: var(--bg);
  border: 1px solid var(--line); border-radius: 5px; padding: .1rem .38rem;
  overflow-wrap: anywhere;
}
.note-aside { color: var(--ink-faint) !important; font-size: .87rem !important; }

/* A mock of the actual dialog. Seeing it here first is the difference between "expected" and
   "this is malware" — which is the entire job of this block. */
.fake-dialog {
  font-family: var(--mono); font-size: .8rem; line-height: 1.55; white-space: pre-wrap;
  background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--blue);
  border-radius: 8px; padding: .9rem 1.1rem; color: var(--ink-dim); margin: 0;
}

.hashes { display: grid; gap: .5rem; }
.hash-row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .9rem;
}
.hash-row b { font-weight: 600; font-size: .88rem; }
.hash-row .dim { color: var(--ink-faint); font-size: .8rem; }
.hash-row code {
  font-family: var(--mono); font-size: .72rem; color: var(--amber);
  overflow-wrap: anywhere; border: 0; background: none; padding: 0; flex: 1 1 24ch;
}

.paths { width: 100%; border-collapse: collapse; font-size: .88rem; margin: 1rem 0; }
.paths th, .paths td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.paths th { color: var(--ink-faint); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.paths td .dim { color: var(--ink-faint); font-size: .8rem; }
.paths-wrap { overflow-x: auto; }

.ways { max-width: 78ch; font-size: .93rem; color: var(--ink-dim); padding-left: 1.1rem; }
.ways li { margin: .55rem 0; }

/* Narrow screens: the nav links get their own row instead of wrapping into a three-line header that
   eats a third of the first screen. */
@media (max-width: 720px) {
  .nav { flex-wrap: wrap; gap: .6rem 1rem; padding: .6rem 1rem; }
  .nav nav { order: 3; width: 100%; gap: 1rem; font-size: .85rem; }
  .brand-name { font-size: .85rem; }
  .stat-row dd { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
}
