/* Fonts for the rust theme. All SIL OFL 1.1; licence files sit next to the woff2 files. */
@font-face {
  font-family: 'Saira Stencil One';
  font-style: normal;
  font-display: optional;
  font-weight: 400;
  src: url('/fonts/saira-stencil-one/saira-stencil-one-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Saira Stencil One';
  font-style: normal;
  font-display: optional;
  font-weight: 400;
  src: url('/fonts/saira-stencil-one/saira-stencil-one-latin-400-normal.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: 'Archivo';
  font-style: normal;
  font-display: optional;
  font-weight: 100 900;
  src: url('/fonts/archivo/archivo-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: optional;
  font-weight: 100 900;
  src: url('/fonts/archivo/archivo-latin-wght-normal.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: 'Chivo Mono';
  font-style: normal;
  font-display: optional;
  font-weight: 100 900;
  src: url('/fonts/chivo-mono/chivo-mono-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Chivo Mono';
  font-style: normal;
  font-display: optional;
  font-weight: 100 900;
  src: url('/fonts/chivo-mono/chivo-mono-latin-wght-normal.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;
}

/* Nullbelt theme: Rust & Rivets (rust)
   Belter grit. Gunmetal, oxidised orange, hazard yellow, bone white. Welded plates, stencils, paper work orders.
   Token names: design/tokens-contract.md. Fonts: Saira Stencil One, Archivo, Chivo Mono (SIL OFL 1.1). */

[data-theme="rust"] {
  color-scheme: dark;

  /* Base */
  --nb-color-bg: #1a1d20;
  --nb-color-bg-alt: #131618;
  --nb-color-surface: #272c31;
  --nb-color-surface-raised: #30363c;
  --nb-color-surface-sunken: #15181b;
  --nb-color-overlay: rgba(10, 12, 13, 0.8);
  --nb-color-line: #3c444b;
  --nb-color-line-strong: #7b8790;
  --nb-color-text: #eee7d7;
  --nb-color-text-muted: #b5ae9f;
  --nb-color-text-on-art: #f6f0e2;

  /* Accents */
  --nb-color-primary: #f07c36;
  --nb-color-primary-hover: #ff9152;
  --nb-color-primary-soft: rgba(240, 124, 54, 0.14);
  --nb-color-primary-text: #f58a4a;
  --nb-color-on-primary: #1c0e05;
  --nb-color-info: #93c1d8;
  --nb-color-info-soft: rgba(147, 193, 216, 0.12);
  --nb-color-on-info: #0b1a22;
  --nb-color-success: #a9d46e;
  --nb-color-success-soft: rgba(169, 212, 110, 0.12);
  --nb-color-on-success: #142006;
  --nb-color-danger: #ff7b73;
  --nb-color-danger-soft: rgba(244, 98, 95, 0.14);
  --nb-color-on-danger: #250605;
  --nb-color-warning: #f2c230;
  --nb-color-warning-soft: rgba(242, 194, 48, 0.12);
  --nb-color-on-warning: #1a1d20;
  --nb-color-focus: #f2c230;

  /* Game state */
  --nb-color-ready: #f2c230;
  --nb-color-ready-soft: rgba(242, 194, 48, 0.1);
  --nb-color-ready-text: #f2c230;
  --nb-color-on-ready: #1a1d20;
  --nb-color-cooldown: #a3b0b9;
  --nb-color-cooldown-track: #1c2125;
  --nb-color-locked: #aaa498;
  --nb-color-credits: #ffd166;
  --nb-color-flux: #a6d8ec;
  --nb-color-xp: #f58a4a;
  --nb-color-hull: #a9d46e;

  /* Rarity */
  --nb-rarity-common: #bdb7aa;
  --nb-rarity-uncommon: #a9d46e;
  --nb-rarity-rare: #79b6e6;
  --nb-rarity-epic: #c39bea;
  --nb-rarity-legendary: #ffae45;

  /* Typography */
  --nb-font-display: 'Saira Stencil One', Impact, sans-serif;
  --nb-font-body: 'Archivo', system-ui, sans-serif;
  --nb-font-mono: 'Chivo Mono', ui-monospace, Menlo, monospace;
  --nb-font-display-weight: 400;
  --nb-font-display-case: uppercase;
  --nb-font-display-tracking: 0.03em;
  --nb-font-label-family: var(--nb-font-body);
  --nb-font-label-case: uppercase;
  --nb-font-label-tracking: 0.12em;
  --nb-font-label-weight: 800;
  --nb-font-numeric: tabular-nums;
  --nb-text-2xs: 0.6875rem;
  --nb-text-xs: 0.75rem;
  --nb-text-sm: 0.875rem;
  --nb-text-md: 1rem;
  --nb-text-lg: 1.125rem;
  --nb-text-xl: 1.375rem;
  --nb-text-2xl: 1.75rem;
  --nb-text-3xl: 2.5rem;
  --nb-text-4xl: 3.5rem;
  --nb-leading-tight: 1;
  --nb-leading-body: 1.5;

  /* Space, size, shape */
  --nb-space-1: 4px;
  --nb-space-2: 8px;
  --nb-space-3: 12px;
  --nb-space-4: 16px;
  --nb-space-5: 20px;
  --nb-space-6: 24px;
  --nb-space-7: 32px;
  --nb-space-8: 48px;
  --nb-gap: 12px;
  --nb-card-padding: 16px;
  --nb-tap-min: 48px;
  --nb-tabbar-height: 68px;
  --nb-sidenav-width: 248px;
  --nb-content-max: 1180px;
  --nb-radius-xs: 1px;
  --nb-radius-sm: 2px;
  --nb-radius-md: 4px;
  --nb-radius-lg: 6px;
  --nb-radius-xl: 10px;
  --nb-radius-pill: 999px;
  --nb-radius-card: 4px;
  --nb-radius-button: 4px;
  --nb-radius-chip: 2px;
  --nb-radius-avatar: 4px;
  --nb-border-width: 2px;
  --nb-border-width-strong: 3px;
  --nb-icon-stroke: 2.25;

  /* Elevation, glow, focus */
  --nb-shadow-sm: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 0 #0d0f11;
  --nb-shadow-md: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 4px 0 #0d0f11, 0 12px 24px rgba(0, 0, 0, 0.4);
  --nb-shadow-lg: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 0 #0d0f11, 0 24px 48px rgba(0, 0, 0, 0.55);
  --nb-glow-primary: 0 0 0 2px #f07c36, 0 0 22px -6px rgba(240, 124, 54, 0.6);
  --nb-glow-info: 0 0 0 2px #93c1d8;
  --nb-glow-danger: 0 0 0 2px #f4625f, 0 0 22px -6px rgba(244, 98, 95, 0.6);
  --nb-glow-ready: 0 0 0 2px #f2c230, 0 5px 0 #0d0f11, 0 0 34px -8px rgba(242, 194, 48, 0.55);
  --nb-focus-ring: 0 0 0 3px #1a1d20, 0 0 0 6px #f2c230;
  --nb-surface-blur: none;
  --nb-text-glow: none;

  /* Motion */
  --nb-duration-instant: 60ms;
  --nb-duration-fast: 120ms;
  --nb-duration-base: 200ms;
  --nb-duration-slow: 320ms;
  --nb-duration-reward: 900ms;
  --nb-duration-pulse: 1600ms;
  --nb-ease-standard: cubic-bezier(0.3, 0, 0.2, 1);
  --nb-ease-out: cubic-bezier(0.2, 0.9, 0.3, 1);
  --nb-ease-emphasized: cubic-bezier(0.5, 0, 0.2, 1.35);
  --nb-motion-ok: 1;

  /* Texture, background, art */
  --nb-bg-image:
    radial-gradient(90% 60% at 50% -10%, rgba(240, 124, 54, 0.1), transparent 60%),
    radial-gradient(120% 80% at 50% 120%, rgba(0, 0, 0, 0.5), transparent 60%);
  --nb-texture-overlay: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.6 0 0 0 0 0.45 0 0 0 0 0.3 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  --nb-texture-overlay-opacity: 0.22;
  --nb-texture-overlay-blend: overlay;
  --nb-texture-surface: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px), linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.06));
  --nb-pattern-ready: repeating-linear-gradient(-45deg, #f2c230 0 12px, #1a1d20 12px 24px);
  --nb-placeholder-scene: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900' preserveAspectRatio='xMidYMid slice'%3E%3Cdefs%3E%3ClinearGradient id='s' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%231c1f22'/%3E%3Cstop offset='1' stop-color='%234a2a17'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='1600' height='900' fill='url(%23s)'/%3E%3Ccircle cx='120' cy='90' r='2' fill='%23ede6d6' opacity='0.7'/%3E%3Ccircle cx='260' cy='200' r='1.5' fill='%23ede6d6' opacity='0.5'/%3E%3Ccircle cx='420' cy='70' r='2.5' fill='%23ede6d6' opacity='0.8'/%3E%3Ccircle cx='610' cy='150' r='1.5' fill='%23ede6d6' opacity='0.5'/%3E%3Ccircle cx='900' cy='60' r='2' fill='%23ede6d6' opacity='0.6'/%3E%3Ccircle cx='1080' cy='180' r='1.5' fill='%23ede6d6' opacity='0.4'/%3E%3Ccircle cx='1250' cy='90' r='2.5' fill='%23ede6d6' opacity='0.8'/%3E%3Ccircle cx='1480' cy='160' r='2' fill='%23ede6d6' opacity='0.6'/%3E%3Ccircle cx='1380' cy='300' r='1.5' fill='%23ede6d6' opacity='0.4'/%3E%3Ccircle cx='180' cy='330' r='1.5' fill='%23ede6d6' opacity='0.4'/%3E%3Ccircle cx='1180' cy='300' r='120' fill='%23e8732e' opacity='.9'/%3E%3Cellipse cx='800' cy='1250' rx='1300' ry='560' fill='%232a2522' stroke='%23e8732e' stroke-width='6'/%3E%3Cg fill='%2315181b' stroke='none' stroke-width='3'%3E%3Crect x='300' y='420' width='70' height='300'/%3E%3Crect x='380' y='360' width='40' height='360'/%3E%3Crect x='430' y='470' width='120' height='250'/%3E%3Crect x='560' y='300' width='30' height='420'/%3E%3Crect x='600' y='440' width='160' height='280'/%3E%3Crect x='770' y='520' width='90' height='200'/%3E%3Crect x='870' y='400' width='50' height='320'/%3E%3Crect x='930' y='480' width='140' height='240'/%3E%3Crect x='1080' y='540' width='120' height='180'/%3E%3C/g%3E%3Crect x='320' y='460' width='10' height='6' fill='%23f2c230'/%3E%3Crect x='340' y='520' width='10' height='6' fill='%23f2c230'/%3E%3Crect x='395' y='400' width='10' height='6' fill='%23f2c230'/%3E%3Crect x='460' y='500' width='10' height='6' fill='%23f2c230'/%3E%3Crect x='500' y='560' width='10' height='6' fill='%23f2c230'/%3E%3Crect x='620' y='480' width='10' height='6' fill='%23f2c230'/%3E%3Crect x='680' y='520' width='10' height='6' fill='%23f2c230'/%3E%3Crect x='720' y='600' width='10' height='6' fill='%23f2c230'/%3E%3Crect x='890' y='440' width='10' height='6' fill='%23f2c230'/%3E%3Crect x='960' y='520' width='10' height='6' fill='%23f2c230'/%3E%3Crect x='1010' y='580' width='10' height='6' fill='%23f2c230'/%3E%3Crect x='1110' y='580' width='10' height='6' fill='%23f2c230'/%3E%3Crect x='570' y='340' width='10' height='6' fill='%23f2c230'/%3E%3Cline x1='575' y1='300' x2='575' y2='230' stroke='%23f2c230' stroke-width='3'/%3E%3Ccircle cx='575' cy='226' r='6' fill='%23f2c230'/%3E%3Crect x='0' y='716' width='1600' height='184' fill='%2315181b'/%3E%3Cg fill='%23f2c230'%3E%3Cpath d='M0 716 l40 0 l-40 40 l-40 0z'/%3E%3Cpath d='M80 716 l40 0 l-40 40 l-40 0z'/%3E%3Cpath d='M160 716 l40 0 l-40 40 l-40 0z'/%3E%3Cpath d='M240 716 l40 0 l-40 40 l-40 0z'/%3E%3Cpath d='M320 716 l40 0 l-40 40 l-40 0z'/%3E%3Cpath d='M400 716 l40 0 l-40 40 l-40 0z'/%3E%3Cpath d='M480 716 l40 0 l-40 40 l-40 0z'/%3E%3Cpath d='M560 716 l40 0 l-40 40 l-40 0z'/%3E%3Cpath d='M640 716 l40 0 l-40 40 l-40 0z'/%3E%3Cpath d='M720 716 l40 0 l-40 40 l-40 0z'/%3E%3Cpath d='M800 716 l40 0 l-40 40 l-40 0z'/%3E%3Cpath d='M880 716 l40 0 l-40 40 l-40 0z'/%3E%3Cpath d='M960 716 l40 0 l-40 40 l-40 0z'/%3E%3Cpath d='M1040 716 l40 0 l-40 40 l-40 0z'/%3E%3Cpath d='M1120 716 l40 0 l-40 40 l-40 0z'/%3E%3Cpath d='M1200 716 l40 0 l-40 40 l-40 0z'/%3E%3Cpath d='M1280 716 l40 0 l-40 40 l-40 0z'/%3E%3Cpath d='M1360 716 l40 0 l-40 40 l-40 0z'/%3E%3Cpath d='M1440 716 l40 0 l-40 40 l-40 0z'/%3E%3Cpath d='M1520 716 l40 0 l-40 40 l-40 0z'/%3E%3Cpath d='M1600 716 l40 0 l-40 40 l-40 0z'/%3E%3Cpath d='M1680 716 l40 0 l-40 40 l-40 0z'/%3E%3C/g%3E%3C/svg%3E");
  --nb-placeholder-portrait: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid slice'%3E%3Crect width='100' height='100' fill='%232a2f34'/%3E%3Ccircle cx='50' cy='50' r='34' fill='%23e8732e' opacity='.14'/%3E%3Cpath d='M14 104c2-24 17-36 36-36s34 12 36 36z' fill='%233d3a36' /%3E%3Ccircle cx='50' cy='40' r='17' fill='%233d3a36' /%3E%3Crect x='37' y='35' width='26' height='7' rx='3' fill='%23e8732e' opacity='.85'/%3E%3C/svg%3E");
  --nb-placeholder-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' fill='%23343a40'/%3E%3Cpath d='m32 14 16 9v18l-16 9-16-9V23z' fill='none' stroke='%23e8732e' stroke-width='2' opacity='.7'/%3E%3Cpath d='m16 23 16 9 16-9M32 32v18' fill='none' stroke='%23e8732e' stroke-width='2' opacity='.45'/%3E%3C/svg%3E");
  --nb-art-filter: sepia(0.12) contrast(1.05);
  --nb-art-scrim: linear-gradient(180deg, rgba(26, 29, 32, 0.2) 0%, rgba(26, 29, 32, 0.45) 50%, rgba(26, 29, 32, 0.96) 100%);
}

@media (prefers-reduced-motion: reduce) {
  [data-theme="rust"] {
    --nb-duration-instant: 0ms;
    --nb-duration-fast: 0ms;
    --nb-duration-base: 0ms;
    --nb-duration-slow: 0ms;
    --nb-duration-reward: 0ms;
    --nb-duration-pulse: 0ms;
    --nb-motion-ok: 0;
  }
}

/* The player wiki (scripts/wiki/build.mjs): static pages in the game's Rust & Rivets look, built
   for reading. Tokens come from design/directions/rust/tokens.css (prepended at build time);
   nothing here hard-codes a colour the theme defines. House rules: padded plates, no "…", no
   breaks inside words, a 14 px gap between art and text, tables scroll inside their own box,
   and nothing moves once the page has painted. */

[data-theme='rust'] {
  --x-ink: color-mix(in srgb, var(--nb-color-bg-alt) 40%, black);
  --x-paper: var(--nb-color-text);
  --x-paper-ink: var(--nb-color-bg);
  --x-rivet: radial-gradient(circle at 3px 3px, var(--nb-color-line-strong) 0 1.2px, var(--nb-color-line) 1.8px 2.6px, rgba(0, 0, 0, .6) 3px, transparent 3.6px);
  --w-top-h: 64px;
  --w-measure: 72ch;
  --w-media-gap: 14px;
  --w-italic-room: 0.15em;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--nb-color-bg); scroll-padding-top: calc(var(--w-top-h) + 16px); scrollbar-gutter: stable; }
body.w-body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--nb-bg-image), var(--nb-color-bg); background-attachment: fixed;
  color: var(--nb-color-text); font-family: var(--nb-font-body); font-size: 1rem; line-height: var(--nb-leading-body);
  overflow-wrap: normal; word-break: normal; hyphens: manual;
  font-synthesis: none; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--nb-color-primary-text); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--nb-color-primary-hover); }
:focus-visible { outline: none; box-shadow: var(--nb-focus-ring); border-radius: var(--nb-radius-sm); }
em, i, cite { padding-inline-end: var(--w-italic-room); }
::selection { background: var(--nb-color-primary); color: var(--nb-color-on-primary); }

/* Thin steel scrollbars, never the browser's own (web/src/styles/base.css explains the split). */
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-color: var(--nb-color-line-strong) var(--nb-color-bg-alt); }
  * { scrollbar-width: thin; }
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: var(--nb-color-bg-alt); }
::-webkit-scrollbar-thumb { background: var(--nb-color-line-strong); border: 2px solid var(--nb-color-bg-alt); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--nb-color-primary); }

.w-sr, .w-skip:not(:focus) { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.w-skip { position: fixed; top: 8px; left: 8px; z-index: 50; padding: 10px 16px; background: var(--x-paper); color: var(--x-paper-ink); font-weight: 800; }
.w-ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: var(--nb-icon-stroke); stroke-linecap: square; }
.w-muted { color: var(--nb-color-text-muted); }

/* ---------- plates (cards) with rivets ---------- */
.w-plate, .w-sec, .w-card, .w-callout, .w-station, .w-perks, .w-toc--fold, .w-faq__item, .w-pn a {
  position: relative;
  background: var(--nb-texture-surface), var(--nb-color-surface);
  border: var(--nb-border-width) solid var(--nb-color-line);
  border-radius: var(--nb-radius-card);
  box-shadow: var(--nb-shadow-sm);
}
.w-sec::after, .w-card::after, .w-station::after, .w-perks::after, .w-pn a::after {
  content: ''; position: absolute; inset: 5px; pointer-events: none;
  background: var(--x-rivet) top left / 7px 7px no-repeat, var(--x-rivet) top right / 7px 7px no-repeat,
    var(--x-rivet) bottom left / 7px 7px no-repeat, var(--x-rivet) bottom right / 7px 7px no-repeat;
}

/* ---------- buttons ---------- */
.w-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; flex: none; align-self: center;
  border: 2px solid var(--x-ink); border-radius: var(--nb-radius-button);
  font-family: var(--nb-font-body); font-weight: 800; font-size: var(--nb-text-sm); letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
}
.w-btn--primary { background: var(--nb-color-primary); color: var(--nb-color-on-primary); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 3px 0 var(--x-ink); }
.w-btn--primary:hover { background: var(--nb-color-primary-hover); color: var(--nb-color-on-primary); }

/* ---------- top bar ---------- */
.w-top { position: relative; z-index: 30; background: var(--nb-texture-surface), var(--nb-color-bg-alt); border-bottom: 3px solid var(--x-ink); }
.w-top__in {
  max-width: 1440px; margin: 0 auto; padding: 8px 16px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'menu brand play' 'search search search';
  align-items: center; column-gap: 12px; row-gap: 8px;
}
.w-top__menu {
  grid-area: menu; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px;
  background: transparent; color: var(--nb-color-text); border: 2px solid var(--nb-color-line); border-radius: var(--nb-radius-button);
  font: 800 var(--nb-text-xs) / 1 var(--nb-font-body); letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
}
.w-brand { grid-area: brand; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--nb-color-text); min-height: 44px; }
.w-brand__word { font-family: var(--nb-font-display); font-size: 1.375rem; letter-spacing: var(--nb-font-display-tracking); text-transform: uppercase; line-height: 1; }
.w-brand__tag { padding: 4px 8px 3px; background: var(--nb-color-ready); color: var(--nb-color-on-ready); font: 800 var(--nb-text-2xs) / 1 var(--nb-font-body); letter-spacing: .14em; text-transform: uppercase; clip-path: polygon(3% 0, 100% 6%, 97% 100%, 0 94%); }
.w-top .w-search { grid-area: search; }
.w-top__lang { display: none; }
.w-top__play { grid-area: play; }
/* Phones: the menu is an icon (its label stays for screen readers), brand and call to action
   tighten so the first row fits 360 px without scrolling. */
@media (max-width: 899px) {
  .w-top__menu { width: 44px; padding: 0; justify-content: center; }
  .w-top__menu span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .w-top__play { padding: 0 12px; font-size: var(--nb-text-xs); }
}
/* The index (and the 404) has its own big search: the top bar's copy would only repeat it. */
.w-body--index .w-top .w-search { display: none; }
@media (max-width: 420px) {
  .w-brand { gap: 8px; }
  .w-brand__word { font-size: 1.125rem; }
  .w-brand__tag { padding: 3px 6px 2px; }
}
@media (min-width: 900px) {
  .w-top { position: sticky; top: 0; }
  .w-top__in { height: var(--w-top-h); padding: 0 24px; grid-template-columns: auto minmax(0, 1fr) minmax(260px, 420px) auto auto; grid-template-areas: 'brand . search lang play'; column-gap: 16px; }
  .w-top__menu { display: none; }
  .w-top__lang { display: inline-flex; grid-area: lang; align-items: center; min-height: 44px; padding: 0 6px; color: var(--nb-color-text-muted); font-weight: 700; font-size: var(--nb-text-sm); }
}

/* ---------- search ---------- */
.w-search { position: relative; min-width: 0; }
.w-search__field {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px;
  background: var(--nb-color-surface-sunken); border: 2px solid var(--nb-color-line); border-radius: var(--nb-radius-md);
  color: var(--nb-color-text-muted);
}
.w-search__field:focus-within { border-color: var(--nb-color-focus); }
.w-search input { flex: 1 1 0; width: 0; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--nb-color-text); font: 500 1rem / 1 var(--nb-font-body); caret-color: var(--nb-color-primary); }
.w-search input:focus { outline: none; box-shadow: none; }
.w-search input::placeholder { color: var(--nb-color-text-muted); opacity: .75; }
.w-search--big .w-search__field { height: 56px; }
.w-search--big input { font-size: 1.0625rem; }
.w-search__panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; max-height: min(70vh, 480px); overflow-y: auto;
  padding: 6px; background: var(--nb-texture-surface), var(--nb-color-surface-raised); border: 2px solid var(--nb-color-line-strong); border-radius: var(--nb-radius-md); box-shadow: var(--nb-shadow-lg);
}
.w-search__panel[hidden] { display: none; }
.w-hit { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--nb-radius-sm); text-decoration: none; color: var(--nb-color-text); }
.w-hit:hover, .w-hit.is-active { background: var(--nb-color-primary-soft); color: var(--nb-color-text); }
.w-hit__s { font: 800 var(--nb-text-2xs) / 1.3 var(--nb-font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--nb-color-text-muted); }
.w-hit__t { font-weight: 800; }
.w-hit__d { font-size: var(--nb-text-sm); color: var(--nb-color-text-muted); }
.w-hit__empty { padding: 12px; color: var(--nb-color-text-muted); font-size: var(--nb-text-sm); }

/* ---------- page grid ---------- */
.w-shell { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); }
.w-main { min-width: 0; padding: 20px 16px 48px; }
.w-rail { display: none; }
.w-side {
  position: fixed; z-index: 35; top: 0; bottom: 0; left: 0; width: min(320px, 86vw); overflow-y: auto; padding: 20px 16px 32px;
  background: var(--nb-texture-surface), var(--nb-color-bg-alt); border-right: 3px solid var(--x-ink);
  transform: translateX(-100%); visibility: hidden; transition: transform var(--nb-duration-base) var(--nb-ease-standard), visibility 0s linear var(--nb-duration-base);
}
.w-navopen .w-side { transform: none; visibility: visible; transition: transform var(--nb-duration-base) var(--nb-ease-standard); }
.w-navopen::after { content: ''; position: fixed; inset: 0; z-index: 34; background: var(--nb-color-overlay); }
.w-side__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -8px 0 18px; padding-bottom: 12px; border-bottom: 2px solid var(--nb-color-line); }
.w-side__close {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; cursor: pointer;
  background: transparent; color: var(--nb-color-text); border: 2px solid var(--nb-color-line); border-radius: var(--nb-radius-button);
}
.w-side__close:hover { border-color: var(--nb-color-line-strong); color: var(--nb-color-primary-hover); }
.w-side__more { margin: 22px 0 0; padding: 14px 8px 0; border-top: 2px solid var(--nb-color-line); font-size: var(--nb-text-sm); font-weight: 800; }
.w-side__more a { text-decoration: none; }
.w-side__list, .w-side__list ul { list-style: none; margin: 0; padding: 0; }
.w-side__sec + .w-side__sec { margin-top: 18px; }
.w-side__head { display: block; padding: 6px 8px; color: var(--nb-color-text-muted); font: 800 var(--nb-text-2xs) / 1.4 var(--nb-font-body); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.w-side__list ul a { display: block; padding: 8px 8px 8px 10px; border-left: 3px solid transparent; color: var(--nb-color-text); font-size: var(--nb-text-sm); line-height: 1.35; text-decoration: none; }
.w-side__list ul a:hover { color: var(--nb-color-primary-hover); background: var(--nb-color-primary-soft); }
.w-side__list ul a[aria-current='page'] { border-left-color: var(--nb-color-ready); background: var(--nb-color-ready-soft); font-weight: 800; }

@media (min-width: 900px) {
  .w-shell { grid-template-columns: 248px minmax(0, 1fr); column-gap: 8px; }
  .w-side { position: sticky; top: var(--w-top-h); z-index: auto; height: calc(100dvh - var(--w-top-h)); width: auto; transform: none; visibility: visible; transition: none; background: transparent; border-right: 2px solid var(--nb-color-line); }
  .w-navopen::after { display: none; }
  .w-side__top { display: none; }
  .w-main { padding: 28px 32px 64px; }
}
@media (min-width: 1200px) {
  .w-shell { grid-template-columns: 248px minmax(0, 1fr) 248px; }
  .w-rail { display: block; min-width: 0; padding: 28px 16px 0 0; }
  .w-toc--fold { display: none; }
}

/* ---------- breadcrumbs, article head ---------- */
.w-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 18px; padding: 0; list-style: none; font-size: var(--nb-text-sm); color: var(--nb-color-text-muted); }
.w-crumbs li { display: inline-flex; align-items: center; }
.w-crumbs li + li::before { content: '/'; margin: 0 8px; color: var(--nb-color-line-strong); }
.w-crumbs a { color: var(--nb-color-text-muted); }
.w-crumbs [aria-current] { color: var(--nb-color-text); }
@media (max-width: 480px) { .w-crumbs li.w-crumbs__sec { display: none; } }
.w-article { max-width: 1000px; }
.w-article__head, .w-toc--fold, .w-faq, .w-related, .w-pn { max-width: calc(var(--w-measure) + 4ch); }
.w-eyebrow { margin: 0 0 10px; font: 800 var(--nb-text-2xs) / 1.3 var(--nb-font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--nb-color-primary-text); }
.w-h1 { margin: 0; font-family: var(--nb-font-display); font-weight: 400; font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.625rem); line-height: 1.08; letter-spacing: var(--nb-font-display-tracking); text-transform: uppercase; text-wrap: balance; }
.w-lede { max-width: var(--w-measure); margin: 14px 0 0; font-size: 1.125rem; line-height: 1.6; color: var(--nb-color-text-muted); text-wrap: pretty; }
.w-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 14px 0 0; font-size: var(--nb-text-sm); color: var(--nb-color-text-muted); }
.w-langswitch { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border: 2px solid var(--nb-color-line); border-radius: var(--nb-radius-chip); font-weight: 700; text-decoration: none; }

/* ---------- TOC ---------- */
.w-toc ol { list-style: none; margin: 0; padding: 0; }
.w-toc ol ol { padding-left: 14px; }
.w-toc a { display: block; padding: 5px 0 5px 10px; border-left: 2px solid var(--nb-color-line); color: var(--nb-color-text-muted); font-size: var(--nb-text-sm); line-height: 1.35; text-decoration: none; }
.w-toc a:hover { color: var(--nb-color-text); border-left-color: var(--nb-color-line-strong); }
.w-toc a.is-current { color: var(--nb-color-text); border-left-color: var(--nb-color-ready); }
.w-toc--rail { position: sticky; top: calc(var(--w-top-h) + 28px); max-height: calc(100dvh - var(--w-top-h) - 48px); overflow-y: auto; }
.w-toc__title { margin: 0 0 10px; font: 800 var(--nb-text-2xs) / 1.3 var(--nb-font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--nb-color-text-muted); }
.w-toc--fold { margin: 22px 0 0; }
.w-toc--fold summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 16px; cursor: pointer; list-style: none; font: 800 var(--nb-text-xs) / 1 var(--nb-font-body); letter-spacing: .12em; text-transform: uppercase; }
.w-toc--fold summary::-webkit-details-marker { display: none; }
.w-toc--fold summary::marker { content: ''; }
.w-chev { transition: transform var(--nb-duration-fast) var(--nb-ease-standard); }
.w-toc--fold[open] .w-chev { transform: rotate(180deg); }
.w-toc--fold .w-toc__body { padding: 0 16px 16px; }

/* ---------- prose ---------- */
.w-prose { margin-top: 8px; font-size: 1.0625rem; line-height: 1.72; }
.w-prose > :is(p, ul, ol, blockquote, h2, h3, h4) { max-width: var(--w-measure); }
.w-prose p { margin: 1em 0; text-wrap: pretty; }
.w-prose :is(ul, ol) { margin: 1em 0; padding-left: 1.4em; }
.w-prose li { margin: .35em 0; }
.w-prose li::marker { color: var(--nb-color-primary-text); }
.w-prose strong { font-weight: 750; color: var(--nb-color-text); }
.w-prose h2 { margin: 2.2em 0 .6em; padding-top: .9em; border-top: 2px solid var(--nb-color-line); font-family: var(--nb-font-display); font-weight: 400; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); line-height: 1.15; letter-spacing: var(--nb-font-display-tracking); text-transform: uppercase; text-wrap: balance; }
.w-prose h3 { margin: 1.8em 0 .4em; font-size: 1.1875rem; font-weight: 800; line-height: 1.3; text-wrap: balance; }
.w-prose h4 { margin: 1.5em 0 .3em; font-size: 1.0625rem; font-weight: 800; }
.w-anchor { margin-left: .4em; color: var(--nb-color-line-strong); text-decoration: none; opacity: 0; transition: opacity var(--nb-duration-fast); }
:is(h2, h3):hover > .w-anchor, .w-anchor:focus-visible { opacity: 1; }
@media (hover: none) { .w-anchor { opacity: .6; } }
.w-prose code { padding: .1em .35em; background: var(--nb-color-surface-sunken); border: 1px solid var(--nb-color-line); border-radius: var(--nb-radius-sm); font: .9em var(--nb-font-mono); }
.w-prose pre { max-width: 100%; overflow-x: auto; padding: 14px 16px; background: var(--nb-color-surface-sunken); border: 2px solid var(--nb-color-line); border-radius: var(--nb-radius-md); }
.w-prose pre code { padding: 0; border: 0; background: none; }
.w-prose blockquote { margin: 1.4em 0; padding: 2px 0 2px 18px; border-left: 4px solid var(--nb-color-line-strong); color: var(--nb-color-text-muted); }
.w-prose hr { margin: 2.4em 0; border: 0; border-top: 2px dashed var(--nb-color-line); }
.w-lang { color: var(--nb-color-text-muted); font-size: .85em; }
.w-cr { white-space: nowrap; color: var(--nb-color-credits); font-variant-numeric: tabular-nums; }
.w-fx { white-space: nowrap; color: var(--nb-color-flux); font-variant-numeric: tabular-nums; }

/* callouts */
.w-callout { max-width: var(--w-measure); margin: 1.5em 0; padding: 14px 18px 14px 20px; border-left-width: 6px; }
.w-callout__label { margin: 0 0 4px !important; font: 800 var(--nb-text-2xs) / 1.3 var(--nb-font-body); letter-spacing: .14em; text-transform: uppercase; }
.w-callout p { margin: .4em 0; }
.w-callout--tip { border-left-color: var(--nb-color-success); }
.w-callout--tip .w-callout__label { color: var(--nb-color-success); }
.w-callout--note { border-left-color: var(--nb-color-info); }
.w-callout--note .w-callout__label { color: var(--nb-color-info); }
.w-callout--warning { border-left-color: var(--nb-color-warning); background: linear-gradient(90deg, var(--nb-color-warning-soft), transparent 60%), var(--nb-color-surface); }
.w-callout--warning .w-callout__label { color: var(--nb-color-warning); }

/* ---------- tables: they scroll inside their own box, never the page ---------- */
.w-tbl { position: relative; max-width: 100%; margin: 2.1em 0 1.5em; }
.w-table { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border: 2px solid var(--nb-color-line); border-radius: var(--nb-radius-md); background: var(--nb-color-surface-sunken); }
.w-table:focus-visible { box-shadow: var(--nb-focus-ring); }
/* While a table is wider than its box (wiki.js: is-over, is-r while there is more to the right):
   the first column stays put, a shadow sits on the right edge, and a cue says it scrolls. */
.w-tbl::after { content: ''; position: absolute; top: 2px; right: 2px; bottom: 2px; width: 22px; pointer-events: none; border-radius: 0 var(--nb-radius-md) var(--nb-radius-md) 0; background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .55)); opacity: 0; transition: opacity var(--nb-duration-fast); }
.w-tbl.is-r::after { opacity: 1; }
.w-tbl__cue { position: absolute; right: 0; bottom: calc(100% + 4px); display: none; margin: 0; font: 800 var(--nb-text-2xs) / 1.3 var(--nb-font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--nb-color-ready); white-space: nowrap; }
.w-tbl.is-over .w-tbl__cue { display: block; }
.w-tbl__mouse { display: none; }
@media (hover: hover) and (pointer: fine) { .w-tbl__touch { display: none; } .w-tbl__mouse { display: inline; } }
.w-tbl.is-over :is(thead th, tbody th):first-child { position: sticky; left: 0; z-index: 2; box-shadow: inset -2px 0 0 var(--nb-color-line-strong); }
.w-tbl.is-over tbody th:first-child { background: var(--nb-color-surface-sunken); }
.w-tbl.is-over tbody tr:nth-child(even) th:first-child { background: color-mix(in srgb, var(--nb-color-surface-sunken), white 2.5%); }
.w-tbl.is-over thead th:first-child { z-index: 3; }
.w-table table { width: 100%; border-collapse: collapse; font-size: var(--nb-text-sm); line-height: 1.45; }
.w-table--wide table { min-width: 820px; }
.w-table td { min-width: 7.5rem; }
.w-table tbody th { min-width: 9rem; }
.w-table tbody th.w-num, .w-table td.w-num { min-width: 0; }
.w-table td:last-child:not(.w-num) { min-width: 13rem; }
@media (max-width: 640px) {
  /* A sticky first column must leave room to scroll: narrower, smaller art. */
  .w-tbl .w-table tbody th { min-width: 7.5rem; max-width: 10rem; }
  .w-tbl .w-table tbody th .w-thing { min-width: 0; }
  .w-tbl .w-table tbody th .w-thing__art { width: 28px; height: 28px; }
  /* A ship's art sits above its name in the narrow first column. */
  .w-tbl .w-table tbody th .w-thing--big { grid-template-columns: minmax(min-content, 1fr); grid-template-areas: 'art' 'name' 'sub'; row-gap: 4px; }
  .w-tbl .w-table tbody th .w-thing--big .w-thing__art { width: 72px; height: auto; margin-bottom: 4px; }
}
/* A wide table scrolls in its box; its caption stays the box's width and wraps, never clipped mid-word. */
.w-table { container-type: inline-size; }
.w-table caption { position: sticky; left: 0; max-width: 100cqi; box-sizing: border-box; padding: 12px 14px 10px; text-align: left; caption-side: top; font: 800 var(--nb-text-2xs) / 1.3 var(--nb-font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--nb-color-text-muted); border-bottom: 2px solid var(--nb-color-line); background: var(--nb-color-surface); }
.w-table caption.w-sr { padding: 0; border: 0; }
.w-table th, .w-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--nb-color-line); }
.w-table thead th { position: sticky; top: 0; background: var(--nb-color-surface-raised); color: var(--nb-color-text-muted); font: 800 var(--nb-text-2xs) / 1.3 var(--nb-font-body); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.w-table tbody th { font-weight: 700; color: var(--nb-color-text); }
.w-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, .025); }
.w-table tbody tr:last-child > * { border-bottom: 0; }
.w-table .w-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.w-prose .w-cell-list, .w-cell-list { margin: 0; padding: 0; list-style: none; }
.w-prose .w-cell-list li { margin: 0; }
.w-cell-list li + li { margin-top: 4px; }
/* A named thing: art over two rows, the name, then its sub line, so every row lines up. */
.w-thing { display: inline-grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: 'art name'; justify-items: start; align-items: center; column-gap: var(--w-media-gap); row-gap: 2px; text-align: left; vertical-align: middle; }
.w-thing--sub { grid-template-areas: 'art name' 'art sub'; }
.w-thing--plain { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'name'; }
.w-thing--plain.w-thing--sub { grid-template-areas: 'name' 'sub'; }
.w-thing__art { grid-area: art; display: block; max-width: none; width: 40px; height: 40px; object-fit: contain; filter: var(--nb-art-filter); }
.w-thing--small .w-thing__art { width: 28px; height: 28px; }
.w-thing__icon { padding: 3px; fill: none; stroke: var(--nb-color-text-muted); stroke-width: 1.6; stroke-linejoin: round; }
.w-thing--big .w-thing__art { width: 96px; height: auto; }
.w-thing__name { grid-area: name; font-weight: 800; min-width: 0; max-width: 14rem; white-space: normal; }
.w-thing--sub .w-thing__name { align-self: end; }
.w-thing__sub { grid-area: sub; align-self: start; font-size: var(--nb-text-xs); font-weight: 600; color: var(--nb-color-text-muted); font-variant-numeric: tabular-nums; }
.w-table .w-thing__name { min-width: 0; text-align: left; }
/* In a table cell the name column never shrinks below its longest word (no name runs under the next column). */
.w-table .w-thing { grid-template-columns: auto minmax(min-content, 1fr); }
.w-table .w-thing--plain { grid-template-columns: minmax(min-content, 1fr); }
.w-table td:not(:last-child) .w-cell-list li { white-space: nowrap; }
.w-table tbody th .w-thing { min-width: 11rem; }
.w-cell-list li:has(> .w-thing) + li:has(> .w-thing) { margin-top: 8px; }
.w-nw { white-space: nowrap; }
/* Small tables and drop tables on phones: one card per row, its head as the card's title, each
   cell as "label: value" (data-label), so no column hides off the side. */
@media (max-width: 640px) {
  .w-tbl--stack .w-table { overflow: visible; border: 0; background: none; container-type: normal; }
  .w-tbl--stack table, .w-tbl--stack tbody, .w-tbl--stack tr, .w-tbl--stack tbody th, .w-tbl--stack td { display: block; width: auto; min-width: 0 !important; max-width: none; }
  .w-tbl--stack table { min-width: 0; }
  .w-tbl--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .w-tbl--stack caption { display: block; max-width: none; padding: 0 0 10px; border: 0; background: none; }
  .w-tbl--stack tbody tr { margin: 0 0 10px; border: 2px solid var(--nb-color-line); border-radius: var(--nb-radius-md); background: var(--nb-color-surface-sunken); }
  .w-tbl--stack tbody tr:nth-child(even) { background: var(--nb-color-surface-sunken); }
  .w-tbl--stack tbody th { padding: 10px 14px; border-bottom: 1px solid var(--nb-color-line) !important; background: var(--nb-color-surface); font-size: var(--nb-text-base, 1rem); }
  .w-tbl--stack tbody th:empty { display: none; }
  /* A card's heading spans the card: beats the phone cap on row headings in scrolling tables (.w-tbl .w-table tbody th). */
  .w-tbl.w-tbl--stack .w-table tbody th { max-width: none; }
  /* Label column on the left, the cell's own content flowing beside it. The label floats into the
     cell's left padding (not a grid) so a cell mixing text and links stays one paragraph, and the
     cell (a flow root) grows to fit whichever is taller: a two-line label or the content. */
  .w-tbl--stack td { --w-lab: 7.5rem; display: flow-root; padding: 8px 14px 8px calc(14px + var(--w-lab) + 12px); text-align: left !important; white-space: normal; overflow-wrap: break-word; }
  .w-tbl--stack td::before { float: left; width: var(--w-lab); margin-left: calc(-1 * (var(--w-lab) + 12px)); }
  .w-tbl--stack td[data-label=''] { padding-left: 14px; }
  .w-tbl--stack td.w-num { text-align: left; }
  .w-tbl--stack td::before { content: attr(data-label); color: var(--nb-color-text-muted); font: 800 var(--nb-text-2xs) / 1.6 var(--nb-font-body); letter-spacing: .1em; text-transform: uppercase; }
  .w-tbl--stack td[data-label='']::before { display: none; }
  .w-tbl--stack td:has(.w-cell-list) { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .w-tbl--stack tbody tr > :last-child { border-bottom: 0; }
  .w-tbl--stack td .w-cell-list li { white-space: normal !important; }
}
.w-sub { display: block; margin-top: 2px; font-size: var(--nb-text-xs); font-weight: 600; }
.w-r-common { color: var(--nb-rarity-common); }
.w-r-uncommon { color: var(--nb-rarity-uncommon); }
.w-r-rare { color: var(--nb-rarity-rare); }
.w-r-epic { color: var(--nb-rarity-epic); }
.w-r-legendary { color: var(--nb-rarity-legendary); }
.w-thing .w-thing__name { color: inherit; }
.w-tag { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: var(--nb-radius-chip); font: 800 var(--nb-text-2xs) / 1.5 var(--nb-font-body); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.w-tag--supply { background: var(--nb-color-success-soft); color: var(--nb-color-success); }
.w-tag--demand { background: var(--nb-color-primary-soft); color: var(--nb-color-primary-text); }
.w-medal { font-weight: 800; }
.w-medal--bronze { color: #d49a6a; }
.w-medal--silver { color: var(--nb-color-text); }
.w-medal--gold { color: var(--nb-color-ready); }

/* Prime perks */
.w-perks { max-width: var(--w-measure); margin: 1.5em 0; padding: 16px 20px; }
.w-perks__title { margin: 0 0 8px !important; font: 800 var(--nb-text-2xs) / 1.3 var(--nb-font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--nb-color-text-muted); }
.w-perks .w-cell-list li { position: relative; padding-left: 18px; }
.w-perks .w-cell-list li::before { content: ''; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; background: var(--nb-color-ready); }

/* rounds calculator (wiki.js); hidden until the script runs, the tables are its fallback */
.w-calc { max-width: var(--w-measure); margin: 1.2em 0 1.6em; padding: 16px 18px 18px; background: var(--nb-texture-surface), var(--nb-color-surface); border: var(--nb-border-width) solid var(--nb-color-line-strong); border-radius: var(--nb-radius-card); }
.w-calc__title, .w-calc__lbl { margin: 0 0 10px; font: 800 var(--nb-text-2xs) / 1.3 var(--nb-font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--nb-color-text-muted); }
.w-calc__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 12px; align-items: end; }
.w-calc__f { display: grid; grid-template-rows: auto 44px; align-content: end; gap: 6px; min-width: 0; font-size: var(--nb-text-sm); color: var(--nb-color-text-muted); }
.w-calc__in { width: 100%; min-width: 0; box-sizing: border-box; height: 44px; padding: 0 12px; background: var(--nb-color-surface-sunken); border: 2px solid var(--nb-color-line); border-radius: var(--nb-radius-md); color: var(--nb-color-text); font: 600 1rem var(--nb-font-mono); -moz-appearance: textfield; appearance: textfield; }
.w-calc__in::-webkit-outer-spin-button, .w-calc__in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.w-calc__in:focus { outline: none; border-color: var(--nb-color-focus); }
.w-seg { margin-top: 14px; }
.w-seg__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 600px) { .w-seg__row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.w-seg__b { display: grid; place-items: center; gap: 2px; min-height: 52px; padding: 6px 8px; background: var(--nb-color-surface-sunken); color: var(--nb-color-text); border: 2px solid var(--nb-color-line); border-radius: var(--nb-radius-md); font: 700 var(--nb-text-sm) / 1.2 var(--nb-font-body); cursor: pointer; text-align: center; }
.w-seg__b small { font-weight: 600; color: var(--nb-color-text-muted); font-family: var(--nb-font-mono); }
.w-seg__b[aria-pressed='true'] { border-color: var(--nb-color-ready); box-shadow: inset 0 -4px 0 var(--nb-color-ready); }
.w-calc__out { display: grid; gap: 4px; min-height: 84px; margin-top: 16px; padding: 12px 14px; background: var(--nb-color-surface-sunken); border-left: 6px solid var(--nb-color-primary); font-size: var(--nb-text-sm); color: var(--nb-color-text-muted); }
.w-calc__out b { font-family: var(--nb-font-display); font-weight: 400; font-size: 2rem; line-height: 1; color: var(--nb-color-text); }
.w-footnote { max-width: var(--w-measure); margin: -.6em 0 1.4em !important; font-size: var(--nb-text-sm); color: var(--nb-color-text-muted); }
.w-up { color: var(--nb-color-success); }
.w-down { color: var(--nb-color-danger); }

/* ---------- figures and screenshots ---------- */
.w-fig { margin: 1.6em 0; max-width: 100%; }
.w-fig .w-img { display: block; border: 2px solid var(--nb-color-line); border-radius: var(--nb-radius-md); background: var(--nb-color-surface-sunken); }
.w-fig picture { display: block; }
.w-zoom { position: relative; display: inline-block; max-width: 100%; vertical-align: top; cursor: zoom-in; }
.w-zoom:hover .w-img { border-color: var(--nb-color-line-strong); }
.w-zoom__hint { position: absolute; right: 8px; bottom: 8px; display: none; align-items: center; gap: 6px; padding: 6px 10px; background: var(--x-ink); color: var(--nb-color-text); border: 2px solid var(--nb-color-line-strong); border-radius: var(--nb-radius-chip); font: 800 var(--nb-text-2xs) / 1 var(--nb-font-body); letter-spacing: .1em; text-transform: uppercase; }
.w-zoom__hint .w-ic { width: 14px; height: 14px; }
.w-zoom:hover .w-zoom__hint, .w-zoom:focus-visible .w-zoom__hint { display: inline-flex; }
@media (max-width: 640px) { .w-zoom--wide .w-zoom__hint { display: inline-flex; } }
/* The full-size viewer (wiki.js) */
.w-lbopen { overflow: hidden; }
.w-lb { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto minmax(0, 1fr); background: color-mix(in srgb, var(--x-ink) 92%, transparent); }
.w-lb__close {
  justify-self: end; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 10px 12px; padding: 0 14px; cursor: pointer;
  background: var(--nb-color-surface); color: var(--nb-color-text); border: 2px solid var(--nb-color-line-strong); border-radius: var(--nb-radius-button);
  font: 800 var(--nb-text-xs) / 1 var(--nb-font-body); letter-spacing: .1em; text-transform: uppercase;
}
.w-lb__scroll { overflow: auto; overscroll-behavior: contain; padding: 0 12px 16px; display: grid; justify-items: center; align-items: start; }
.w-lb__scroll img { display: block; max-width: none; height: auto; border: 2px solid var(--nb-color-line-strong); border-radius: var(--nb-radius-md); }
.w-fig figcaption { max-width: var(--w-measure); margin-top: 10px; font-size: var(--nb-text-sm); color: var(--nb-color-text-muted); }
.w-shot-ph {
  display: grid; place-items: center; width: 100%; max-width: 720px; aspect-ratio: 16 / 10; padding: 16px;
  border: 2px dashed var(--nb-color-line-strong); border-radius: var(--nb-radius-md);
  background: repeating-linear-gradient(-45deg, rgba(242, 194, 48, .06) 0 14px, transparent 14px 28px), var(--nb-color-surface-sunken);
  color: var(--nb-color-text-muted); font: 800 var(--nb-text-xs) / 1.3 var(--nb-font-body); letter-spacing: .12em; text-transform: uppercase; text-align: center;
}

/* A full table that a page repeats rank by rank further down: on phones, links to those sections. */
.w-jump { display: none; }
@media (max-width: 640px) {
  .w-deskonly { display: none; }
  .w-jump { display: block; margin: 1.2em 0 1.6em; }
  .w-jump__t { margin: 0 0 8px !important; font: 800 var(--nb-text-2xs) / 1.3 var(--nb-font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--nb-color-text-muted); }
  .w-jump ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
  .w-prose .w-jump li { margin: 0; }
  .w-jump a { display: flex; align-items: center; min-height: 44px; padding: 6px 10px; border: 2px solid var(--nb-color-line); border-radius: var(--nb-radius-md); background: var(--nb-color-surface-sunken); color: var(--nb-color-text); font-size: var(--nb-text-sm); font-weight: 700; text-decoration: none; }
}
@media (max-width: 480px) {
  .w-prose pre { padding: 12px; font-size: .875rem; }
}

/* ---------- the play calls ---------- */
.w-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; max-width: var(--w-measure); }
.w-cta--inline { margin: 1.8em 0; padding: 12px 14px 12px 18px; border: 2px solid var(--nb-color-line); border-left: 6px solid var(--nb-color-primary); border-radius: var(--nb-radius-md); background: var(--nb-texture-surface), var(--nb-color-surface); }
.w-cta--inline .w-cta__text { flex: 1 1 260px; margin: 0; font-size: var(--nb-text-sm); line-height: 1.5; color: var(--nb-color-text-muted); }
.w-cta--inline .w-cta__text strong { color: var(--nb-color-text); }
.w-cta--end { position: relative; margin: 40px 0 0; max-width: calc(var(--w-measure) + 4ch); padding: 20px 22px; border: var(--nb-border-width) solid var(--nb-color-line-strong); border-radius: var(--nb-radius-card); background: linear-gradient(90deg, var(--nb-color-primary-soft), transparent 70%), var(--nb-texture-surface), var(--nb-color-surface); box-shadow: var(--nb-shadow-sm); }
.w-cta__body { flex: 1 1 280px; display: grid; gap: 4px; }
.w-cta__body p { margin: 0; }
.w-cta__eyebrow { font: 800 var(--nb-text-2xs) / 1.3 var(--nb-font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--nb-color-primary-text); }
.w-cta__title { font-family: var(--nb-font-display); font-size: 1.375rem; line-height: 1.15; letter-spacing: var(--nb-font-display-tracking); text-transform: uppercase; }
.w-cta--end .w-cta__text { font-size: var(--nb-text-sm); color: var(--nb-color-text-muted); }

/* ---------- stations ---------- */
.w-stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 16px; margin: 1.6em 0; align-content: start; }
.w-station { display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
.w-station__fig { margin: 0; border-bottom: 2px solid var(--nb-color-line); background: var(--nb-color-surface-sunken); }
.w-station__art { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; filter: var(--nb-art-filter); }
.w-station__body { padding: 16px 18px 18px; }
.w-station__name { margin: 0 0 6px !important; padding: 0 !important; border: 0 !important; font-family: var(--nb-font-display) !important; font-weight: 400 !important; font-size: 1.375rem !important; text-transform: uppercase; }
.w-station__desc { margin: 0 0 10px !important; color: var(--nb-color-text-muted); font-size: var(--nb-text-sm); line-height: 1.5; }
.w-station .w-cell-list { font-size: var(--nb-text-sm); line-height: 1.45; }
.w-station .w-cell-list li { padding-left: 14px; position: relative; }
.w-station .w-cell-list li::before { content: ''; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; background: var(--nb-color-primary); }

/* ---------- FAQ ---------- */
.w-faq { max-width: var(--w-measure); }
.w-faq__item { margin: 12px 0; padding: 14px 18px; }
.w-faq__q { margin: 0 !important; font-size: 1.0625rem !important; }
.w-faq__a p { margin: .45em 0 0; }

/* ---------- related cards and section cards: rows line up section by section ---------- */
.w-related { margin-top: 48px; }
.w-related__title { margin: 0 0 14px; font: 800 var(--nb-text-xs) / 1.3 var(--nb-font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--nb-color-text-muted); }
.w-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; align-content: start; }
.w-card { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
.w-card__link { grid-row: 1 / -1; display: grid; grid-template-rows: subgrid; row-gap: 6px; padding: 16px 18px 18px; text-decoration: none; color: var(--nb-color-text); }
.w-card:hover { border-color: var(--nb-color-line-strong); }
.w-card__eyebrow { font: 800 var(--nb-text-2xs) / 1.3 var(--nb-font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--nb-color-primary-text); }
.w-card__title { font-weight: 800; font-size: 1.0625rem; line-height: 1.3; }
.w-card__text { font-size: var(--nb-text-sm); line-height: 1.5; color: var(--nb-color-text-muted); }

.w-pn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 32px; }
.w-pn a { display: grid; align-content: start; gap: 4px; padding: 14px 18px; text-decoration: none; color: var(--nb-color-text); }
.w-pn__next { text-align: right; }
.w-pn__dir { font: 800 var(--nb-text-2xs) / 1.3 var(--nb-font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--nb-color-text-muted); }
.w-pn__t { font-weight: 800; line-height: 1.3; }
@media (max-width: 520px) { .w-pn { grid-template-columns: minmax(0, 1fr); } .w-pn__next { text-align: left; } .w-pn > span:empty { display: none; } }

/* ---------- index ---------- */
.w-shell--wide .w-main--index { grid-column: 2 / -1; }
@media (max-width: 899px) { .w-shell--wide .w-main--index { grid-column: auto; } }
.w-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 8px 0 24px; }
.w-hero__copy { max-width: 760px; min-width: 0; }
.w-hero__pitch { max-width: var(--w-measure); margin: 14px 0 0; font-size: 1.0625rem; line-height: 1.65; text-wrap: pretty; }
.w-hero .w-search { margin-top: 22px; max-width: 640px; }
.w-hero__shot { margin: 0; justify-self: start; width: min(100%, 300px); }
.w-hero__shot .w-img { display: block; width: 100%; height: auto; aspect-ratio: 390 / 520; object-fit: cover; object-position: top; border: 2px solid var(--nb-color-line-strong); border-radius: var(--nb-radius-md); box-shadow: var(--nb-shadow-lg); }
.w-hero__shot figcaption { margin-top: 10px; font-size: var(--nb-text-sm); color: var(--nb-color-text-muted); }
.w-hero--plain { display: block; }
@media (min-width: 1100px) {
  .w-hero { grid-template-columns: minmax(0, 1fr) 280px; column-gap: 40px; align-items: start; }
  .w-hero__shot { width: 280px; }
}
.w-routes { margin: 4px 0 28px; }
.w-routes ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.w-route { position: relative; display: grid; background: var(--nb-texture-surface), var(--nb-color-surface-raised, var(--nb-color-surface)); border: var(--nb-border-width) solid var(--nb-color-line-strong); border-top: 6px solid var(--nb-color-primary); border-radius: var(--nb-radius-card); box-shadow: var(--nb-shadow-sm); }
.w-route:hover { border-color: var(--nb-color-primary); }
.w-route__link { display: grid; grid-template-rows: auto auto 1fr auto; gap: 6px; padding: 16px 18px 18px; color: var(--nb-color-text); text-decoration: none; }
.w-route__n { font-family: var(--nb-font-display); font-size: 1.5rem; line-height: 1; color: var(--nb-color-ready); }
.w-route__t { font-weight: 800; font-size: 1.125rem; line-height: 1.3; }
.w-route__d { font-size: var(--nb-text-sm); line-height: 1.5; color: var(--nb-color-text-muted); }
.w-route__more { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; }
.w-route__more a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 800; font-size: var(--nb-text-sm); }
.w-secs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; align-content: start; }
.w-sec { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 8px; padding: 18px 20px 20px; scroll-margin-top: calc(var(--w-top-h) + 16px); }
.w-sec__eyebrow { margin: 0; font: 800 var(--nb-text-2xs) / 1.3 var(--nb-font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--nb-color-primary-text); }
.w-sec__title { margin: 0; font-family: var(--nb-font-display); font-weight: 400; font-size: 1.5rem; line-height: 1.1; text-transform: uppercase; letter-spacing: var(--nb-font-display-tracking); }
.w-sec__blurb { margin: 0; font-size: var(--nb-text-sm); line-height: 1.5; color: var(--nb-color-text-muted); }
.w-sec__list { margin: 6px 0 0; padding: 0; list-style: none; align-self: start; }
.w-sec__list li { border-top: 1px solid var(--nb-color-line); }
.w-sec__list a { display: block; padding: 10px 0; font-weight: 700; line-height: 1.35; text-decoration: none; color: var(--nb-color-text); }
.w-sec__list a:hover { color: var(--nb-color-primary-hover); }
.w-sec:target { border-color: var(--nb-color-ready); }
.w-sec--more { border-style: dashed; }
/* The 404 on a phone: the search and the section names, not every page of every section. */
@media (max-width: 640px) {
  .w-main--404 .w-sec { grid-row: auto; grid-template-rows: none; }
  .w-main--404 .w-sec__blurb, .w-main--404 .w-sec__list { display: none; }
  .w-main--404 .w-sec__title { font-size: 1.25rem; }
  .w-main--404 .w-sec__title a { display: flex; align-items: center; min-height: 44px; }
  .w-main--404 .w-secs { gap: 10px; }
}

/* ---------- footer ---------- */
.w-foot { margin-top: auto; border-top: 3px solid var(--x-ink); background: var(--nb-texture-surface), var(--nb-color-bg-alt); }
.w-foot__in { max-width: 1440px; margin: 0 auto; padding: 22px 16px 28px; display: grid; gap: 10px; color: var(--nb-color-text-muted); font-size: var(--nb-text-sm); }
.w-foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.w-foot nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--nb-color-text); font-weight: 700; text-decoration: none; }
.w-foot p { margin: 0; }
@media (max-width: 520px) { .w-foot nav { display: grid; grid-template-rows: repeat(3, auto); grid-auto-flow: column; justify-content: start; column-gap: 32px; } }
.w-sec__title a { color: inherit; text-decoration: none; }
.w-sec__title a:hover { color: var(--nb-color-primary-hover); }
@media (min-width: 900px) { .w-foot__in { padding: 22px 24px 28px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .w-top, .w-side, .w-rail, .w-foot, .w-toc, .w-pn, .w-anchor, .w-cta, .w-tbl__cue, .w-zoom__hint { display: none !important; }
  body.w-body { background: #fff; color: #000; }
}
