/* Project Reclaimer website.
   Styled after the game client's own menus: deep navy panels, one-pixel
   rules, compact uppercase labels and the orange selection gradient that
   "breathes" on a 3.2-second cycle. No external requests. */

@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/barlow-semi-condensed-400.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/barlow-semi-condensed-500.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/barlow-semi-condensed-600.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  /* Client menu palette (menu_ui.rs, customization_ui.rs, settings_ui.rs). */
  --bg: #050a10;
  --bg-deep: #03060a;
  --panel: rgba(7, 13, 22, 0.78);
  --panel-solid: #09121c;
  --tile: #101e2b;
  --rule: #2b3744;
  --rule-soft: #18222d;
  --text: #eaf3fa;
  --text-2: #a4afb8;
  --muted: #94acbf;
  --gold: #f29b2c;
  --gold-hover: #ffb458;
  --gold-soft: rgba(242, 155, 44, 0.12);
  --gold-line: rgba(242, 155, 44, 0.45);
  --blue: #78c7ef;
  --blue-soft: rgba(120, 199, 239, 0.1);
  --danger: #e86050;

  /* The menu's selection gradient as it renders over its navy panel. */
  --sel-a: #9a602a;
  --sel-b: #4f3018;
  --sel-hover: rgba(125, 69, 20, 0.45);
  --selection: linear-gradient(90deg, var(--sel-a), var(--sel-b));

  --code-bg: #03070c;

  --font-ui: "Barlow Semi Condensed", Bahnschrift, "DIN Alternate", "Arial Narrow", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --gutter: 16px;
  --max: 1180px;
  --header-h: 64px;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: rgba(156, 82, 16, 0.7); color: #fff; }

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

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

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

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  font-family: var(--font-ui);
  font-weight: 500;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--text);
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: 0.03em; line-height: 1.25; }
h4 { font-size: 1rem; font-weight: 600; letter-spacing: 0.03em; }
p { margin: 0 0 1em; }
/* File names and commands keep their case inside uppercase labels. */
h1 code, h2 code, h3 code, h4 code, ol.steps > li > strong code { text-transform: none; letter-spacing: 0; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--selection); color: var(--text); padding: 8px 14px;
  font-family: var(--font-ui); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
}
.skip-link:focus { left: 8px; }

/* The breathing selection highlight used by the client's menus. */
@keyframes breathe {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}
.selected-bar { position: relative; isolation: isolate; color: var(--text); }
.selected-bar::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--selection);
  animation: breathe 3.2s ease-in-out infinite;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 10, 16, 0.86);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; flex: none; text-decoration: none; }
.brand img { height: 26px; width: auto; }
@media (min-width: 720px) { .brand img { height: 32px; } }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.site-nav a:not(.btn) {
  position: relative; isolation: isolate;
  padding: 7px 14px; text-decoration: none;
  font-family: var(--font-ui); font-weight: 500; font-size: 1.02rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-2);
}
.site-nav a:not(.btn):hover { color: var(--text); background: var(--sel-hover); }
.site-nav a[aria-current="page"]:not(.btn) { color: var(--text); }
.site-nav a[aria-current="page"]:not(.btn)::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 1px; height: 2px; background: var(--gold);
}
.site-nav .nav-discord { margin-left: 10px; }
.site-nav .nav-cta { margin-left: 10px; }

.nav-toggle {
  display: none; margin-left: auto;
  background: transparent; color: var(--text); border: 1px solid var(--rule);
  padding: 7px 14px; cursor: pointer;
  font-family: var(--font-ui); font-weight: 500; font-size: 1rem; letter-spacing: 0.05em; text-transform: uppercase;
}
.nav-toggle:hover { background: var(--sel-hover); }

/* Below 1180 px the links no longer fit on one line beside the logo. */
@media (max-width: 1179px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 16px; background: var(--bg); border-bottom: 1px solid var(--rule);
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 12px 10px; border-bottom: 1px solid var(--rule-soft); }
  .site-nav a[aria-current="page"]:not(.btn)::after { left: 0; right: auto; top: 10px; bottom: 10px; width: 3px; height: auto; }
  .site-nav .nav-discord, .site-nav .nav-cta { margin: 12px 0 0; justify-content: center; }
  .site-nav .nav-cta { margin-top: 8px; }
}

/* ---------- Buttons ---------- */

.btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 22px; border: 1px solid transparent; cursor: pointer;
  font-family: var(--font-ui); font-weight: 600; font-size: 1.08rem; line-height: 1.1;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, filter 0.15s;
}
.btn-primary { background: var(--selection); color: var(--text); border-color: var(--gold-line); }
.btn-primary:hover { color: #fff; filter: brightness(1.18); border-color: var(--gold); }
.btn-ghost { background: rgba(7, 13, 22, 0.6); color: var(--text-2); border-color: var(--rule); }
.btn-ghost:hover { background: var(--sel-hover); color: var(--text); border-color: var(--gold-line); }
.btn-sm { padding: 7px 16px; font-size: 0.98rem; }
.btn[aria-disabled="true"] {
  background: var(--tile); color: var(--muted); border-color: var(--rule); cursor: not-allowed; filter: none;
}
.btn svg { width: 18px; height: 18px; flex: none; }

.text-link {
  font-family: var(--font-ui); font-weight: 600; font-size: 1.02rem; letter-spacing: 0.05em; text-transform: uppercase;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }
.link-row { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; }

/* ---------- Common blocks ---------- */

.eyebrow {
  display: inline-block; margin-bottom: 12px;
  font-family: var(--font-ui); color: var(--gold); font-size: 0.92rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-2); max-width: 62ch; }
.muted { color: var(--muted); }

.section { padding: clamp(52px, 7vw, 88px) 0; }
.section + .section { border-top: 1px solid var(--rule-soft); }
.section-alt { background: linear-gradient(180deg, rgba(16, 30, 43, 0.35), rgba(16, 30, 43, 0) 70%); }
.section-head { max-width: 760px; margin-bottom: 36px; }
.section-head p { color: var(--text-2); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; font-family: var(--font-ui); font-size: 0.9rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--tile); color: var(--text-2); border: 1px solid var(--rule);
}
.badge-warn { background: var(--gold-soft); color: var(--gold); border-color: var(--gold-line); }

/* Work-in-progress notice: under the home hero and in guide headers. */
.status-strip { padding: 14px 0; background: var(--panel-solid); border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule); }
.status-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; font-size: 0.95rem; color: var(--text-2); }
.status-note strong { color: var(--text); font-weight: 600; }
.status-note .badge { flex: none; padding: 2px 9px; font-size: 0.82rem; }
.status-note .text-link { white-space: nowrap; }
.page-head .status-note { margin-top: 18px; }

.card {
  background: var(--panel-solid);
  border: 1px solid var(--rule-soft); border-top-color: var(--rule);
  padding: 24px;
}

.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.grid > * { min-width: 0; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Scene backdrop (a dusk sky, drawn in CSS) ---------- */

.scene {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 520px at 72% 18%, rgba(66, 102, 148, 0.42), transparent 62%),
    radial-gradient(700px 360px at 18% 100%, rgba(22, 44, 70, 0.55), transparent 70%),
    linear-gradient(180deg, #0c1827 0%, #08111c 55%, var(--bg) 100%);
}
.scene::before {
  /* distant ridge line */
  content: ""; position: absolute; left: -5%; right: -5%; bottom: 0; height: 38%; pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 16, 26, 0) 0%, rgba(5, 10, 16, 0.92) 70%, var(--bg) 100%);
  clip-path: polygon(0 58%, 9% 50%, 17% 55%, 28% 40%, 36% 47%, 47% 36%, 58% 46%, 66% 41%, 76% 52%, 86% 44%, 94% 51%, 100% 47%, 100% 100%, 0 100%);
}
.scene::after {
  /* fine scanlines, like the client's blurred backdrop */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.35;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
}
.scene > .container { position: relative; z-index: 1; }

/* ---------- Hero: the client's main menu, as a page ---------- */

.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: end; }
@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 64px; min-height: 460px;
    grid-template-areas: "menu brand";
  }
  .hero-brand { grid-area: brand; align-self: center; }
  .hero-menu { grid-area: menu; }
}
.hero-logo { margin: 0 0 20px; line-height: 0; }
.hero-logo img { width: 100%; max-width: 640px; height: auto; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.55)); }
.hero-tagline {
  margin: 0 0 16px;
  font-family: var(--font-ui); font-weight: 500; font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.15; letter-spacing: 0.02em; text-transform: uppercase; color: var(--text);
}
.hero-tagline em { font-style: normal; color: var(--gold); }
.hero-brand .lead { margin-bottom: 0; }

.menu-panel {
  background: var(--panel);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.menu-panel .menu-status {
  display: block; padding: 12px 16px 10px; border-bottom: 1px solid var(--rule);
  font-family: var(--font-ui); font-size: 0.88rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold);
}
.menu-list { list-style: none; margin: 0; padding: 6px 0; }
.menu-list a {
  display: block; padding: 7px 16px; text-decoration: none;
  font-family: var(--font-ui); font-weight: 500; font-size: 1.28rem; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--text-2);
}
.menu-list a small {
  display: block; margin-top: 1px;
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted);
}
.menu-list a:hover { color: var(--text); background: var(--sel-hover); }
.menu-list a.selected-bar { color: var(--text); }
.menu-list a.selected-bar small { color: #d9c3a8; }
.menu-list li.first { padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--rule); }
.menu-footer { border-top: 1px solid var(--rule); padding: 4px 0; }
.menu-footer a {
  display: block; padding: 8px 16px; text-decoration: none;
  font-family: var(--font-ui); font-weight: 500; font-size: 1.02rem; color: var(--text-2);
}
.menu-footer a:hover { color: var(--text); background: var(--sel-hover); }

/* ---------- Pillars and features ---------- */

.pillar-num {
  font-family: var(--font-ui); font-size: 0.95rem; font-weight: 600; color: var(--gold); letter-spacing: 0.14em; margin-bottom: 10px;
}
.pillar p { color: var(--text-2); margin: 0; }
.pillar .text-link { display: inline-block; margin-top: 16px; }

.feature { padding: 22px; }
.feature-icon {
  width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 16px;
  background: var(--tile); color: var(--gold); border: 1px solid var(--rule);
}
.feature-icon svg { width: 20px; height: 20px; }
.feature h3 { margin-bottom: 8px; }
.feature h3 .badge { padding: 1px 7px; font-size: 0.72rem; vertical-align: 0.15em; }
.feature p { color: var(--text-2); margin: 0; font-size: 0.96rem; }

/* ---------- Split sections ---------- */

.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: start; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
  .split-center { align-items: center; }
  .split-wide-right { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
}

.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { position: relative; padding-left: 26px; margin-bottom: 10px; color: var(--text-2); }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: 0.55em; width: 8px; height: 8px;
  background: var(--gold); transform: rotate(45deg);
}
.checklist.pending li::before { background: transparent; border: 1.5px solid var(--blue); }
.checklist.none li::before { background: transparent; border: 1.5px solid var(--muted); transform: none; width: 9px; height: 9px; }

.flow { display: grid; gap: 12px; counter-reset: flow; }
.flow-step { position: relative; counter-increment: flow; padding: 20px 22px 20px 74px; }
.flow-step::before {
  content: counter(flow); position: absolute; left: 22px; top: 20px;
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--gold-line); background: var(--gold-soft); color: var(--gold);
  font-family: var(--font-ui); font-weight: 600; font-size: 1.1rem;
}
.flow-step h3 { margin-bottom: 4px; }
.prose .flow { margin-bottom: 1.4em; }
.prose .flow-step h3 { margin-top: 6px; }
.flow-step p { margin: 0; color: var(--text-2); font-size: 0.95rem; }

/* ---------- Code ---------- */

code, kbd, pre { font-family: var(--font-mono); }
:not(pre) > code {
  font-size: 0.86em; padding: 0.1em 0.38em;
  background: var(--tile); border: 1px solid var(--rule); color: var(--text); overflow-wrap: anywhere;
}
kbd {
  display: inline-block; min-width: 1.9em; padding: 0.08em 0.5em; text-align: center;
  font-family: var(--font-ui); font-size: 0.92em; font-weight: 600; letter-spacing: 0.03em; line-height: 1.45; color: var(--text);
  background: var(--tile); border: 1px solid var(--rule); border-bottom: 2px solid #3b4958;
  white-space: nowrap;
}

.code { position: relative; margin: 0 0 1.4em; overflow: hidden; background: var(--code-bg); border: 1px solid var(--rule-soft); }
.code-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
  padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--rule-soft); background: #08111b;
  font-family: var(--font-ui); font-size: 0.86rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-size: 0.86rem; line-height: 1.65; color: #d6dde5; tab-size: 4; }
.code pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.copy-btn {
  flex: none; padding: 3px 10px; border: 1px solid transparent; background: transparent; cursor: pointer;
  font-family: var(--font-ui); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2);
}
.copy-btn:hover { color: var(--text); background: var(--sel-hover); }
.copy-btn.done { color: var(--gold); }
.tok-c { color: #6f8294; }
.tok-k { color: #f2a54a; }
.tok-s { color: #a8d8a0; }
.tok-p { color: var(--blue); }

.terminal { box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9); }

/* ---------- Page head and docs layout ---------- */

.page-head { padding: clamp(40px, 7vw, 76px) 0 clamp(30px, 4vw, 44px); border-bottom: 1px solid var(--rule); }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 14px; }
.page-head .lead { margin: 0; }
.page-head.scene::before { height: 55%; }

.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 40px; padding-bottom: 88px; }
@media (min-width: 1000px) {
  .doc-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 56px; }
}

.toc { background: var(--panel); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.toc-title {
  padding: 12px 16px 10px; border-bottom: 1px solid var(--rule);
  font-family: var(--font-ui); font-size: 0.88rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold);
}
.toc ol { list-style: none; margin: 0; padding: 6px 0; }
.toc a {
  position: relative; isolation: isolate; display: block; padding: 5px 16px; text-decoration: none;
  font-family: var(--font-ui); font-size: 1.02rem; font-weight: 500; letter-spacing: 0.03em; text-transform: uppercase; line-height: 1.3;
  color: var(--text-2);
}
.toc a:hover { color: var(--text); background: var(--sel-hover); }
.toc a.active { color: var(--text); }
.toc a.active::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--selection);
  animation: breathe 3.2s ease-in-out infinite;
}
@media (min-width: 1000px) {
  .toc { position: sticky; top: calc(var(--header-h) + 28px); align-self: start; max-height: calc(100vh - var(--header-h) - 56px); overflow-y: auto; }
}
@media (max-width: 999px) {
  .toc ol { columns: 2; column-gap: 0; }
  .toc li { break-inside: avoid; }
}
@media (max-width: 479px) { .toc ol { columns: 1; } }

.prose { max-width: 780px; min-width: 0; }
.prose > section { padding-top: 6px; margin-bottom: 60px; }
.prose > section:last-child { margin-bottom: 0; }
.prose h2 { padding-bottom: 12px; margin-bottom: 20px; border-bottom: 1px solid var(--rule); }
.prose h3 { margin-top: 32px; }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--gold); }

ol.steps { list-style: none; padding: 0; counter-reset: step; }
ol.steps > li { position: relative; counter-increment: step; padding: 0 0 24px 50px; margin: 0; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  display: grid; place-items: center; width: 32px; height: 32px;
  border: 1px solid var(--gold-line); background: var(--gold-soft); color: var(--gold);
  font-family: var(--font-ui); font-weight: 600; font-size: 1.05rem;
}
ol.steps > li::after { content: ""; position: absolute; left: 16px; top: 36px; bottom: 6px; width: 1px; background: var(--rule); }
ol.steps > li:last-child::after { display: none; }
ol.steps > li > strong:first-child {
  display: block; margin-bottom: 4px; color: var(--text);
  font-family: var(--font-ui); font-size: 1.12rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
}
ol.steps .code { margin-top: 10px; }

.callout {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start;
  padding: 14px 16px; margin: 0 0 1.4em;
  background: var(--panel-solid); border: 1px solid var(--rule-soft); border-left: 3px solid var(--blue);
}
.callout p { margin: 0; color: var(--text-2); }
.callout p + p { margin-top: 0.6em; }
.callout-icon { width: 20px; height: 20px; color: var(--blue); margin-top: 2px; }
.callout.warn { border-left-color: var(--gold); }
.callout.warn .callout-icon { color: var(--gold); }

.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--rule-soft); }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
th {
  background: #0a121b; color: var(--muted); white-space: nowrap;
  font-family: var(--font-ui); font-size: 0.88rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
td { color: var(--text-2); }
tr:last-child td { border-bottom: 0; }
td:first-child { white-space: nowrap; color: var(--text); }
td.wrap, th.wrap { white-space: normal; }
td:not(:last-child) code { white-space: nowrap; overflow-wrap: normal; }

/* Narrow screens: stack each row so no column gets squeezed. */
@media (max-width: 599px) {
  .table-wrap thead { display: none; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; }
  .table-wrap tr { padding: 12px 14px; border-bottom: 1px solid var(--rule-soft); }
  .table-wrap tr:last-child { border-bottom: 0; }
  .table-wrap td { padding: 0; border: 0; white-space: normal; }
  .table-wrap td:first-child { margin-bottom: 4px; font-weight: 600; }
  .table-wrap td[data-label] { margin-bottom: 4px; font-size: 0.88rem; }
  .table-wrap td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
}

.option-cards { display: grid; gap: 12px; margin-bottom: 1.4em; }
@media (min-width: 720px) { .option-cards { grid-template-columns: 1fr 1fr; } }
.option-cards .card { padding: 18px 20px; }
.option-cards h4 { margin: 0 0 6px; }
.option-cards p { margin: 0; font-size: 0.94rem; }

/* ---------- Downloads ---------- */

.dl-card { display: flex; flex-direction: column; gap: 14px; }
.dl-card h3 { margin: 0 0 6px; }
.dl-card p { margin: 0; color: var(--text-2); font-size: 0.96rem; }
.dl-meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 0.86rem; }
.dl-meta dt { font-family: var(--font-ui); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.dl-meta dd { margin: 0; color: var(--text-2); font-family: var(--font-mono); overflow-wrap: anywhere; }
.dl-card .btn { margin-top: auto; align-self: flex-start; }
.dl-icon {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--tile); border: 1px solid var(--rule); color: var(--gold);
}
.dl-icon svg { width: 22px; height: 22px; }
.dl-card.primary { border-top: 2px solid var(--gold); background: linear-gradient(180deg, rgba(154, 96, 42, 0.14), var(--panel-solid) 55%); }
.dl-status { font-size: 0.86rem; color: var(--muted); min-height: 1.4em; }

/* ---------- FAQ ---------- */

.faq { max-width: 860px; background: var(--panel); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule-soft); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  position: relative; isolation: isolate; cursor: pointer; list-style: none; padding: 14px 48px 14px 18px;
  font-family: var(--font-ui); font-size: 1.15rem; font-weight: 500; letter-spacing: 0.02em; color: var(--text-2);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--text); background: var(--sel-hover); }
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.2s;
}
.faq details[open] summary { color: var(--text); }
.faq details[open] summary::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--selection); opacity: 0.8; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; border-color: var(--text); }
.faq details > div { padding: 14px 18px 16px; color: var(--text-2); }
.faq details > div p:last-child { margin: 0; }

/* ---------- CTA band ---------- */

.cta-band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  padding: clamp(26px, 4vw, 38px);
  background: linear-gradient(90deg, rgba(154, 96, 42, 0.32), rgba(79, 48, 24, 0.12) 55%, rgba(7, 13, 22, 0.6)), var(--panel-solid);
  border-top: 1px solid var(--gold-line); border-bottom: 1px solid var(--rule);
}
.cta-band h2 { margin: 0 0 6px; }
.cta-band p { margin: 0; color: var(--text-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-band .hero-actions { margin: 0; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--rule); background: var(--bg-deep); padding: 44px 0 30px; font-size: 0.93rem; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-grid p { color: var(--muted); margin: 14px 0 0; max-width: 38ch; }
.footer-col h2 { font-size: 0.9rem; font-weight: 600; letter-spacing: 0.14em; color: var(--gold); margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 6px; }
.footer-col a {
  font-family: var(--font-ui); font-size: 1.05rem; font-weight: 500; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--text-2); text-decoration: none;
}
.footer-col a:hover { color: var(--text); }
.disclaimer { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--rule-soft); color: var(--muted); font-size: 0.82rem; line-height: 1.6; }
.disclaimer p { margin: 0 0 8px; max-width: 110ch; }

/* ---------- Feature groups (home page) ---------- */

.feature-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: center; }
@media (min-width: 1000px) {
  .feature-group { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 64px; }
  .feature-group.reverse > :first-child { order: 2; }
}
.feature-group h2 { margin-bottom: 14px; }
.feature-group .lead { margin-bottom: 26px; }
.group-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.group-title .eyebrow { margin: 0; }

.sub-features { list-style: none; margin: 0 0 22px; padding: 0; border-top: 1px solid var(--rule); }
.sub-features li { padding: 14px 0 14px 18px; border-bottom: 1px solid var(--rule-soft); position: relative; }
.sub-features li::before { content: ""; position: absolute; left: 0; top: 20px; width: 3px; height: 16px; background: var(--gold); }
.sub-features h3 { margin: 0 0 4px; font-size: 1.12rem; }
.sub-features p { margin: 0; color: var(--text-2); font-size: 0.97rem; }

.badge-dev { background: var(--blue-soft); color: var(--blue); border-color: rgba(120, 199, 239, 0.4); }

/* Shared frame for UI illustrations */
.ui-frame {
  background: rgba(4, 9, 15, 0.92); border: 1px solid var(--rule-soft);
  font-family: var(--font-ui); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
}

/* ---------- Forge page: headline numbers, primitive shapes, size steps ---------- */

.stat-row {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 30px; max-width: 900px;
  background: var(--rule-soft); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
@media (min-width: 720px) { .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { padding: 16px 18px; background: rgba(9, 18, 28, 0.92); }
.stat b {
  display: block; margin-bottom: 8px; font-family: var(--font-ui); font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  font-weight: 500; line-height: 1; letter-spacing: 0.01em; color: var(--text);
}
.stat span { display: block; font-size: 0.9rem; line-height: 1.4; color: var(--text-2); }

.shapes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 4px 0 14px; background: var(--rule-soft); border: 1px solid var(--rule-soft); }
.shape { display: flex; flex-direction: column; align-items: center; padding: 22px 8px 16px; background: var(--panel-solid); text-align: center; }
.shape svg { width: auto; height: clamp(72px, 16vw, 112px); margin-bottom: 14px; overflow: visible; }
.shape b { font-family: var(--font-ui); font-size: 1.05rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); }
.shape small { font-size: 0.8rem; color: var(--muted); }
.shape .face { stroke: var(--text); stroke-width: 1.4; stroke-linejoin: round; }
.shape .face-top { fill: rgba(120, 199, 239, 0.2); }
.shape .face-left { fill: rgba(120, 199, 239, 0.07); }
.shape .face-right { fill: rgba(120, 199, 239, 0.12); }
.shape .hidden-edge { fill: none; stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0.55; }
.shape .accent { fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round; }

.prose .size-steps { display: flex; gap: 6px; list-style: none; margin: 0 0 6px; padding: 0; }
.prose .size-steps li { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; margin: 0; padding: 10px 0 8px; background: var(--panel-solid); border-top: 1px solid var(--rule); font-family: var(--font-ui); font-size: 1rem; font-weight: 600; color: var(--text); }
.size-steps i { display: block; width: var(--s); height: var(--s); border: 1.5px solid var(--gold); background: var(--gold-soft); }
.size-note { font-size: 0.88rem; }

.pass { color: var(--blue); font-weight: 600; }

/* The server browser's mod tags: blue (have them all), gold (the server shares them), red (missing, not shared). */
.mod-tag {
  display: inline-block; padding: 1px 7px; border: 1px solid currentColor; white-space: nowrap;
  font-family: var(--font-ui); font-size: 0.86rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.mod-tag.have { color: var(--blue); }
.mod-tag.shared { color: var(--gold); }
.mod-tag.missing { color: var(--danger); }

/* Lobby vote card illustration */
.ui-vote { padding: 18px; }
.ui-vote-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.ui-vote-title { font-size: 1.25rem; font-weight: 500; letter-spacing: 0.02em; color: var(--text); text-transform: uppercase; }
.ui-vote-time { font-size: 1.25rem; font-weight: 600; color: var(--gold); }
.ui-vote-timebar { height: 3px; background: rgba(255, 255, 255, 0.08); margin-bottom: 12px; }
.ui-vote-timebar i { display: block; height: 100%; width: 58%; background: var(--gold); }
.ui-vote-row { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--rule-soft); }
.ui-vote-row .share { position: absolute; left: 0; bottom: -1px; height: 2px; background: var(--blue); opacity: 0.7; }
.ui-vote-row b { display: block; font-size: 1.05rem; font-weight: 500; letter-spacing: 0.03em; color: var(--text); text-transform: uppercase; }
.ui-vote-row small { font-family: var(--font-body); font-size: 0.8rem; color: var(--muted); }
.ui-vote-row .count { font-size: 1.1rem; font-weight: 600; color: var(--text); }
.ui-vote-row.selected-bar small { color: #d9c3a8; }
.ui-vote-foot { margin-top: 10px; font-family: var(--font-body); font-size: 0.8rem; color: var(--muted); }

/* Required mods illustration */
.ui-mods { padding: 18px; }
.ui-mods-title { font-size: 1.25rem; font-weight: 500; letter-spacing: 0.02em; color: var(--text); text-transform: uppercase; margin-bottom: 12px; }
.ui-mod { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule-soft); }
.ui-mod-thumb { width: 56px; height: 36px; background: linear-gradient(135deg, #1b2d44, #0d1826); border: 1px solid var(--rule); }
.ui-mod b { display: block; font-size: 1.02rem; font-weight: 500; letter-spacing: 0.02em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui-mod small { font-family: var(--font-body); font-size: 0.78rem; color: var(--muted); }
.ui-mod-bar { height: 4px; margin-top: 6px; background: rgba(255, 255, 255, 0.08); }
.ui-mod-bar i { display: block; height: 100%; background: var(--gold); }
.ui-mod .state { font-size: 0.9rem; font-weight: 600; letter-spacing: 0.04em; color: var(--text-2); white-space: nowrap; }
.ui-mod .state.ok { color: var(--blue); }
.ui-mods-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--rule-soft); }
.ui-mods-foot small { font-family: var(--font-body); font-size: 0.8rem; color: var(--muted); }
.ui-mods-foot .buttons { display: flex; gap: 6px; }
.ui-mods-foot .buttons span { padding: 5px 12px; font-size: 1rem; font-weight: 600; letter-spacing: 0.05em; color: var(--text-2); }
.ui-mods-foot .buttons span.selected-bar { color: var(--text); }

.illustration-note { margin-top: 10px; font-size: 0.82rem; color: var(--muted); }

/* ---------- Screenshots of the client ---------- */

.shots { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px 18px; }
@media (min-width: 720px) { .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.shot { margin: 0; min-width: 0; }
.shot > a {
  display: block; line-height: 0; background: var(--bg-deep);
  border: 1px solid var(--rule-soft); border-top-color: var(--rule);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
  transition: border-color 0.15s ease;
}
.shot > a:hover, .shot > a:focus-visible { border-color: var(--gold-line); }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.shot figcaption { margin-top: 10px; font-size: 0.93rem; color: var(--text-2); }
.shot figcaption b {
  display: block; margin-bottom: 2px; font-family: var(--font-ui); font-size: 1.02rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--text);
}
/* One screenshot beside a feature group, or inside a guide. */
.shot-feature { max-width: 760px; margin-left: auto; margin-right: auto; }
.prose .shot { margin: 8px 0 24px; }

/* ---------- Diagrams (inline SVG) ---------- */

.diagram { margin: 8px 0 28px; }
.diagram-scroll {
  overflow-x: auto; background: var(--bg-deep);
  border: 1px solid var(--rule-soft); border-top-color: var(--rule);
}
/* Narrow screens scroll the drawing rather than shrink its text. */
.diagram svg { display: block; width: 100%; min-width: 600px; height: auto; }
.diagram figcaption { margin-top: 10px; font-size: 0.93rem; color: var(--text-2); }
.diagram .d-box { fill: var(--panel-solid); stroke: var(--rule); }
.diagram .d-box-main { fill: #1a1209; stroke: var(--gold); }
.diagram .d-head { fill: var(--muted); font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; }
.diagram .d-title { fill: var(--text); font-family: var(--font-ui); font-size: 16px; font-weight: 600; letter-spacing: 0.02em; }
.diagram .d-sub { fill: var(--text-2); font-family: var(--font-body); font-size: 12.5px; }
.diagram .d-note { fill: var(--text-2); font-family: var(--font-body); font-size: 12.5px; }
.diagram .d-note-backup { fill: var(--gold); }
.diagram .d-line { fill: none; stroke-width: 1.6; }
.diagram .d-report { stroke: var(--blue); }
.diagram .d-backup { stroke: var(--gold); stroke-dasharray: 6 5; }
.diagram .d-share { stroke: var(--muted); stroke-dasharray: 4 4; }
.diagram .d-read { stroke: var(--text-2); }
.diagram .d-status { stroke: var(--text); stroke-dasharray: 1.5 4; stroke-linecap: round; }
.diagram .ah-report { fill: var(--blue); }
.diagram .ah-backup { fill: var(--gold); }
.diagram .ah-share { fill: var(--muted); }
.diagram .ah-read { fill: var(--text-2); }
.diagram .ah-status { fill: var(--text); }

.legend { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; padding: 0; margin: 12px 0 0; font-size: 0.9rem; }
.prose .legend li { display: flex; align-items: center; gap: 9px; margin: 0; }
.legend .key { flex: none; width: 28px; border-top: 2px solid var(--blue); }
.legend .key-backup { border-top-style: dashed; border-top-color: var(--gold); }
.legend .key-share { border-top-style: dashed; border-top-color: var(--muted); }
.legend .key-read { border-top-color: var(--text-2); }
.legend .key-status { border-top-style: dotted; border-top-color: var(--text); }

/* Full-size view (site.js). Without scripts the link opens the image. */
.lightbox {
  width: min(96vw, 1920px); max-width: none; max-height: 96vh; margin: auto; padding: 0;
  background: var(--bg-deep); color: var(--text); border: 1px solid var(--rule);
}
.lightbox::backdrop { background: rgba(2, 5, 9, 0.88); }
.lightbox img { display: block; width: 100%; height: auto; max-height: calc(96vh - 52px); object-fit: contain; cursor: zoom-out; }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--rule-soft); }
.lightbox-caption { margin: 0; font-size: 0.92rem; color: var(--text-2); }
.lightbox-close {
  flex: none; padding: 4px 12px; font-family: var(--font-ui); font-size: 0.95rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2);
  background: var(--tile); border: 1px solid var(--rule); cursor: pointer;
}
.lightbox-close:hover, .lightbox-close:focus-visible { color: var(--text); border-color: var(--gold-line); }
