:root {
  color-scheme: light;
  --paper: #f0ede5;
  --surface: #e6e1d7;
  --ink: #2b3031;
  --muted: #606467;
  --line: #c6c1b7;
  --accent: #93432a;
  --accent-hover: #713019;
  --tint: #e7dfd3;
  --rail: #22282b;
  --rail-ink: #eee8db;
  --rail-muted: #b6b6ac;
  --rail-accent: #da9872;
  --code-bg: #23292c;
  --code-ink: #e9dfcd;
  --selection: #d7b79c;
  --display: Impact, "Bahnschrift Condensed", "Arial Narrow", sans-serif;
  --mono: Consolas, "Courier New", monospace;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #191e21;
  --surface: #22282c;
  --ink: #e6e2d8;
  --muted: #adb1b0;
  --line: #3d4345;
  --accent: #e4a17a;
  --accent-hover: #ffc5a1;
  --tint: #2b2c2a;
  --rail: #111719;
  --code-bg: #101618;
  --code-ink: #e9dfcd;
  --selection: #72462f;
}
/* A readable system-theme fallback when JavaScript is disabled. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --paper: #191e21;
    --surface: #22282c;
    --ink: #e6e2d8;
    --muted: #adb1b0;
    --line: #3d4345;
    --accent: #e4a17a;
    --accent-hover: #ffc5a1;
    --tint: #2b2c2a;
    --rail: #111719;
    --code-bg: #101618;
    --selection: #72462f;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: inherit; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.sidebar :focus-visible { outline-color: var(--rail-accent); }
::selection { color: var(--ink); background: var(--selection); }
.skip-link { position: fixed; top: .75rem; left: .75rem; z-index: 10; padding: .75rem 1rem; color: var(--rail-ink); background: var(--rail); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column;
  width: 240px; padding: 32px 20px 26px; color: var(--rail-ink); overflow-y: auto;
  border-right: 1px solid #080c0e;
  background: radial-gradient(ellipse at 0 95%, #813d272b, transparent 48%),
    radial-gradient(ellipse at 100% 5%, #84533722, transparent 50%),
    url("steel-grain.svg"), var(--rail);
}
.sidebar::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: repeating-linear-gradient(125deg, #b7784e 0 9px, #1b2022 9px 18px); border-bottom: 1px solid #070b0d; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--display); font-size: 21px; letter-spacing: .3px; text-transform: uppercase; }
.brand-mark { position: relative; display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 38px; border: 1px solid #bc805c; color: var(--rail-accent); background: #080c0e66; font-size: 28px; line-height: 1; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: 2px; height: 2px; background: #d8b29a; }
.brand-mark::before { top: 3px; left: 3px; }
.brand-mark::after { right: 3px; bottom: 3px; }
.sidebar-intro { margin: 36px 0 24px; padding-bottom: 20px; border-bottom: 1px solid #ffffff1a; }
.eyebrow { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 1.5px; text-transform: uppercase; }
.sidebar-intro .eyebrow { color: var(--rail-accent); }
.sidebar-intro p { margin: 12px 0 0; color: var(--rail-muted); font-size: 12px; line-height: 1.75; }
.page-nav { display: flex; flex-direction: column; gap: 7px; margin: 0 -10px; }
.nav-link { display: flex; align-items: baseline; gap: 12px; padding: 14px 10px; border-left: 3px solid transparent; color: #c3c6c3; text-decoration: none; font-size: 13px; transition: color 160ms, background 160ms, transform 160ms; }
.nav-number { flex-shrink: 0; color: var(--rail-muted); font-family: var(--mono); font-size: 11px; }
.nav-link:hover { color: #fff3e2; background: #ffffff08; transform: translateX(2px); }
.nav-link.is-active { color: #fff3e2; background: #c7895c16; border-left-color: #cc8b5e; }
.nav-link.is-active .nav-number { color: var(--rail-accent); }
.nav-group { margin-top: 8px; }
.nav-group > summary { padding: 13px 10px; color: var(--rail-accent); cursor: pointer; font-family: var(--mono); font-size: 11px; letter-spacing: .5px; text-transform: uppercase; }
.nav-group > summary::marker { color: var(--rail-accent); }
.nav-group .nav-link { padding-block: 9px; font-size: 12px; line-height: 1.5; }
.nav-group .nav-number { font-size: 10px; }
.mobile-navigation { display: none; }
.sidebar-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 60px; color: var(--rail-muted); font-family: var(--mono); font-size: 11px; }
.page-numbers-toggle { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 38px; padding: 6px 0; border: 0; color: var(--rail-muted); background: transparent; cursor: pointer; text-align: left; }
.page-numbers-toggle:hover { color: var(--rail-ink); }
.page-numbers-switch { position: relative; flex-shrink: 0; width: 28px; height: 16px; border: 1px solid var(--rail-muted); border-radius: 10px; }
.page-numbers-switch::before { content: ""; position: absolute; top: 3px; left: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--rail-muted); transition: transform 160ms; }
.page-numbers-state { margin-left: auto; font-size: 10px; }
.page-numbers-toggle[aria-pressed="true"] { color: var(--rail-accent); }
.page-numbers-toggle[aria-pressed="true"] .page-numbers-switch { border-color: var(--rail-accent); }
.page-numbers-toggle[aria-pressed="true"] .page-numbers-switch::before { background: var(--rail-accent); transform: translateX(12px); }
.edition { width: 100%; margin-top: 12px; padding-top: 15px; border-top: 1px solid #ffffff1a; font-size: 10px; letter-spacing: 2px; }
.workspace { margin-left: 240px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 48px; padding: 0 32px; border-bottom: 1px solid var(--line); color: var(--muted); background: url("steel-grain.svg"), var(--surface); font-family: var(--mono); font-size: 10px; letter-spacing: 1.4px; }
.topic-navigation { display: flex; gap: 8px; min-width: 0; }
.topic-navigation a { display: flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 18px; border: 1px solid transparent; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .7px; text-decoration: none; text-transform: uppercase; }
.topic-navigation a:hover, .topic-navigation a:focus-visible { color: var(--accent); border-color: var(--accent); background: var(--tint); }
.topic-navigation a[aria-current="page"] { color: var(--accent); border-color: var(--line); border-bottom: 3px solid var(--accent); background: var(--paper); }
.site-search-form { display: flex; align-items: center; gap: 8px; flex: 0 1 260px; min-width: 160px; margin: 0 0 0 auto; padding: 0 10px; border: 1px solid var(--line); color: var(--muted); background: var(--paper); }
.site-search-form svg { flex-shrink: 0; }
.site-search-form:focus-within { border-color: var(--accent); }
.site-search-form input { width: 100%; min-width: 0; min-height: 34px; border: 0; outline: 0; color: var(--ink); background: transparent; font-family: "Segoe UI", Arial, sans-serif; font-size: 13px; }
.site-search-form input::placeholder { color: var(--muted); }
.site-search-toggle { display: none; flex-shrink: 0; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); color: var(--ink); background: var(--paper); cursor: pointer; }
.site-search-toggle:hover { border-color: var(--accent); }
.site-search-backdrop { position: fixed; inset: 0; z-index: 40; background: #0008; }
.site-search-panel { position: fixed; inset: 64px 24px auto 264px; z-index: 41; display: flex; flex-direction: column; max-width: 1000px; max-height: calc(100svh - 88px); margin-inline: auto; border: 1px solid var(--line); border-top: 3px solid var(--accent); color: var(--ink); background: var(--paper); box-shadow: 0 20px 64px #0006; }
.site-search-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.site-search-header h2 { margin: 0; font-family: var(--mono); font-size: 13px; font-weight: 400; letter-spacing: 1px; text-transform: uppercase; }
.site-search-header button { flex-shrink: 0; width: 40px; height: 40px; border: 1px solid var(--line); color: var(--ink); background: var(--paper); cursor: pointer; font-size: 22px; }
.site-search-query { display: block; padding: 18px 24px 0; }
.site-search-query .eyebrow { display: block; margin-bottom: 10px; color: var(--muted); font-size: 10px; }
.site-search-query input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); color: var(--ink); background: var(--surface); font-size: 16px; }
.site-search-status { flex-shrink: 0; margin: 12px 24px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.site-search-results { min-height: 0; padding: 0 24px; overflow-y: auto; overscroll-behavior: contain; }
.site-search-result { padding: 22px 0; border-top: 1px solid var(--line); }
.site-search-result h3 { margin: 0 0 12px; color: var(--accent); font-size: 16px; font-weight: 600; line-height: 1.5; }
.site-search-rule-text { white-space: pre-line; overflow-wrap: anywhere; font-size: 14px; line-height: 1.75; }
.site-search-source { display: inline-block; margin-top: 14px; color: var(--accent); font-size: 12px; line-height: 1.6; text-underline-offset: 3px; }
.site-search-footer { flex-shrink: 0; padding: 12px 24px; }
.site-search-footer:has(button[hidden]) { padding-bottom: 0; }
.site-search-footer button { min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); color: var(--accent); background: var(--surface); cursor: pointer; font-family: var(--mono); font-size: 11px; }
.prose .topic-section { margin: 0; padding: 0; }
.reference-page .reading-layout { grid-template-columns: minmax(0, 1fr); padding-top: 20px; }
.reference-page .prose > section:first-child > .topic-section:first-child > h3:first-of-type { margin-top: 0; }
.reference-page .reference-entry:first-child > h3:first-of-type, .reference-page .reference-entry:first-child > .table-scroll:first-of-type { margin-top: 0; }
.reference-search { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 0 12px; border: 1px solid var(--line); color: var(--muted); background: var(--paper); }
.reference-search:focus-within { border-color: var(--accent); }
.reference-search svg { flex-shrink: 0; }
.reference-search input { width: 100%; min-width: 0; min-height: 40px; padding: 8px 0; border: 0; outline: 0; color: var(--ink); background: transparent; font: inherit; font-size: 14px; }
.reference-search input::placeholder { color: var(--muted); opacity: 1; }
.reference-empty { margin: 20px 0; color: var(--muted); font-size: 14px; }
.reference-menu { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.reference-menu summary { width: fit-content; min-height: 36px; padding-block: 8px; color: var(--accent); cursor: pointer; font-family: var(--mono); font-size: 11px; letter-spacing: .7px; text-transform: uppercase; }
.reference-menu nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 4px 20px; margin-top: 8px; }
.reference-menu a { display: flex; align-items: center; min-height: 36px; color: var(--muted); font-size: 13px; text-decoration: none; }
.reference-menu a:hover, .reference-menu a:focus-visible { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.topic-section h3 { margin: 28px 0 12px; color: var(--ink); font-size: 16px; line-height: 1.5; }
.theme-toggle { display: flex; flex-shrink: 0; align-items: center; justify-content: center; gap: 8px; min-height: 32px; padding: 6px 10px; border: 1px solid var(--line); color: var(--ink); background: var(--paper); cursor: pointer; font-family: var(--mono); font-size: 10px; letter-spacing: .5px; text-transform: uppercase; transition: border-color 160ms, background 160ms; }
.theme-toggle:hover { border-color: var(--accent); background: var(--tint); }
.theme-state { padding-left: 8px; border-left: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.theme-toggle[aria-pressed="true"] { border-color: var(--accent); }
.theme-toggle[aria-pressed="true"] .theme-state { color: var(--accent); }
.reading-layout { display: grid; grid-template-columns: minmax(0, 1fr) 156px; gap: 28px; max-width: 1600px; margin: 0 auto; padding: 48px 32px 0; }
main { min-width: 0; outline: none; }
.article-header { animation: arrive 350ms ease-out both; }
.article-meta { display: flex; align-items: center; gap: 15px; color: var(--accent); }
.format { padding-left: 15px; border-left: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 11px; }
h1 { margin: 24px 0 19px; font-family: var(--display); font-size: clamp(42px, 4.5vw, 66px); line-height: 1.08; font-weight: 400; letter-spacing: 1px; text-transform: uppercase; text-wrap: balance; }
.description { max-width: 530px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.75; text-wrap: pretty; }
.header-rule { position: relative; height: 1px; margin: 33px 0 32px; background: var(--line); }
.header-rule span { display: block; position: relative; top: -2px; width: 66px; height: 4px; background: repeating-linear-gradient(125deg, var(--accent) 0 6px, transparent 6px 10px); }
.prose { font-size: 16px; line-height: 1.85; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose p { max-width: 80ch; margin: 0 0 20px; }
.prose h2 { margin: 36px 0 14px; font-family: var(--display); font-size: 27px; line-height: 1.35; font-weight: 400; letter-spacing: .6px; text-transform: uppercase; text-wrap: balance; }
.prose h3 { margin: 25px 0 10px; font-size: 16px; font-weight: 600; line-height: 1.5; }
.prose a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 150ms; }
.prose a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
.prose strong { font-weight: 600; }
.prose ul, .prose ol { padding-left: 23px; margin: 16px 0 22px; }
.prose li { padding-left: 5px; margin: 5px 0; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin: 26px 0; padding: 16px 20px; border-left: 3px solid var(--accent); background: var(--tint); color: var(--ink); }
.prose blockquote p { margin: 0; }
.prose code { padding: 2px 5px; color: var(--accent); background: var(--tint); font-family: var(--mono); font-size: .85em; }
.prose pre { margin: 22px 0; padding: 20px 22px; overflow-x: auto; border: 1px solid var(--line); border-top: 3px solid var(--accent); color: var(--code-ink); background: var(--code-bg); font-size: 13px; line-height: 1.75; }
.prose pre code { padding: 0; color: inherit; background: none; font-size: inherit; }
.table-scroll { max-width: 100%; margin: 22px 0; overflow-x: auto; overscroll-behavior-inline: contain; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.6; }
.prose th, .prose td { padding: 10px 10px; border-bottom: 1px solid var(--line); text-align: left; overflow-wrap: normal; }
.prose .weapon-table { min-width: 760px; }
.prose .skill-table { min-width: 640px; }
.prose .objective-table th:first-child, .prose .objective-table td:first-child { width: 44px; white-space: nowrap; font-family: var(--mono); }
.prose .objective-table td { vertical-align: top; padding-block: 18px; }
.prose .objective-table td:first-child { color: var(--accent); font-weight: 600; }
.objective-name { display: block; margin-bottom: 10px; color: var(--ink); font-size: 16px; }
.prose .objective-table p { margin: 0 0 10px; }
.prose .objective-table p:last-child { margin-bottom: 0; }
.weapon-mobile { display: none; }
.weapon-table th:first-child, .weapon-table td:first-child { width: 20%; min-width: 140px; }
.weapon-table th:nth-child(n+2):nth-child(-n+6), .weapon-table td:nth-child(n+2):nth-child(-n+6), .weapon-table th:nth-child(n+8), .weapon-table td:nth-child(n+8) { width: 5%; white-space: nowrap; }
.weapon-table th:nth-child(7), .weapon-table td:nth-child(7) { min-width: 200px; }
.prose th { color: var(--ink); font-weight: 600; background: var(--surface); }
.prose img, .prose video { max-width: 100%; height: auto; }
.prose figure { margin: 25px 0; }
.prose figcaption { color: var(--muted); font-size: 12px; }
.prose hr { margin: 30px 0; border: 0; border-top: 1px solid var(--line); }
.prose details { padding: 15px 0; margin: 20px 0; border-block: 1px solid var(--line); }
.prose summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.prose details[open] summary { margin-bottom: 12px; }
.prose details p:last-child { margin-bottom: 0; }
.contents { position: sticky; top: 38px; align-self: start; max-height: calc(100svh - 76px); overflow-y: auto; margin-top: 4px; padding-left: 19px; border-left: 1px solid var(--line); }
.contents h2 { margin: 0 0 18px; color: var(--accent); font-size: 10px; }
.toc-link { display: block; margin: 0 0 13px; color: var(--muted); text-decoration: none; font-size: 12px; line-height: 1.6; transition: color 150ms, transform 150ms; }
.toc-link:hover { color: var(--accent); transform: translateX(2px); }
.toc-subsection { padding-left: 10px; font-size: 11px; }
.back-to-top { display: block; padding-top: 14px; margin-top: 24px; border-top: 1px solid var(--line); color: var(--muted); text-decoration: none; font-family: var(--mono); font-size: 11px; }
.back-to-top span { margin-left: 8px; }
.page-turns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 45px; padding: 24px 0; border-block: 1px solid var(--line); }
.page-turn { display: flex; flex-direction: column; gap: 9px; text-decoration: none; color: var(--accent); font-size: 14px; transition: color 150ms; }
.page-turn:hover { color: var(--accent-hover); }
.page-turn .eyebrow { color: var(--muted); font-size: 10px; }
.page-turn-next { text-align: right; }
.article-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 25px 0 30px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.article-footer > span > span { padding: 0 4px; }
.article-footer a { text-decoration: none; }
.article-footer a:hover { color: var(--accent); text-decoration: underline; }
.source-note { font-size: 13px; color: var(--muted); }
.prose .rule-reference { color: inherit; text-decoration-color: var(--accent); text-decoration-style: dotted; text-underline-offset: 4px; }
.prose .rule-reference:hover, .prose .rule-reference:focus-visible { color: var(--accent); text-decoration-style: solid; }
.prose .trait-trigger, .prose .skill-trigger { color: inherit; text-decoration-color: var(--accent); text-decoration-style: dotted; text-underline-offset: 4px; cursor: help; }
.prose .trait-trigger:hover, .prose .trait-trigger:focus-visible, .prose .trait-trigger.is-trait-pinned, .prose .skill-trigger:hover, .prose .skill-trigger:focus-visible, .prose .skill-trigger.is-skill-pinned { color: var(--accent); text-decoration-style: solid; }
.trait-popover { position: fixed; z-index: 30; display: flex; flex-direction: column; max-height: min(70svh, 640px); border: 1px solid var(--line); border-top: 3px solid var(--accent); color: var(--ink); background: var(--paper); box-shadow: 0 14px 42px #0005; }
.trait-popover-header { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.trait-popover-header h2 { flex: 1; min-width: 0; margin: 0; font-family: var(--mono); font-size: 12px; line-height: 1.5; }
.trait-popover-header button { min-width: 36px; min-height: 36px; padding: 6px 8px; border: 1px solid var(--line); color: var(--ink); background: var(--paper); cursor: pointer; font-family: var(--mono); font-size: 10px; }
.trait-popover-header button:hover { border-color: var(--accent); color: var(--accent); }
.trait-popover-header [data-rule-close] { font-size: 18px; }
.trait-popover-body { min-height: 0; padding: 18px 20px; overflow-y: auto; overscroll-behavior: contain; font-size: 14px; line-height: 1.7; }
.trait-popover-body > :last-child { margin-bottom: 0; }
.trait-popover footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 10px; line-height: 1.6; }
.trait-popover footer a { color: var(--accent); text-underline-offset: 3px; }
.related-sources { margin-top: 40px; padding: 22px 0 0; border-top: 1px solid var(--line); }
.related-sources h2 { margin: 0 0 16px; color: var(--accent); }
.related-sources ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin: 0; padding: 0; list-style: none; }
.related-sources li { display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.6; }
.related-sources a { color: var(--accent); text-underline-offset: 3px; }
.related-sources li span { color: var(--muted); font-size: 11px; }
.source-page { margin: 36px 0 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 10px; line-height: 1.7; letter-spacing: .6px; text-transform: uppercase; }
.source-page span { padding: 0 6px; color: var(--accent); }
/* Keep a zero-height anchor so source links still land at the right passage. */
:root:not([data-page-numbers="true"]) .source-page { height: 0; margin: 0; padding: 0; border: 0; overflow: hidden; visibility: hidden; }
.chart { display: block; margin: 24px 0; }
.chart > a { display: block; width: fit-content; max-width: 100%; background: #fff; border: 1px solid var(--line); }
.chart img { display: block; width: auto; height: auto; max-width: 100%; max-height: 560px; object-fit: contain; object-position: top left; }
.chart-caption { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.chart-caption a { flex-shrink: 0; }
@keyframes arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (min-width: 1600px) { .reading-layout { padding-top: 75px; } }
@media (max-width: 1350px) {
  .topic-navigation { gap: 2px; }
  .topic-navigation a { padding-inline: 8px; font-size: 10px; letter-spacing: .3px; }
  .topbar { gap: 12px; }
  .theme-toggle > span { display: none; }
  .reading-layout { grid-template-columns: minmax(0, 1fr); }
  .contents { display: none; }
}
/* 240px archive + 64px gutters + 760px weapon table + scrollbar need about 1080px. */
@media (max-width: 1079px) {
  .site-search-form { display: none; }
  .site-search-toggle { display: flex; }
  .site-search-panel { inset: 16px; max-width: none; max-height: calc(100svh - 32px); margin: 0; }
  .site-search-header { padding-inline: 16px; }
  .site-search-query { padding-inline: 16px; }
  .site-search-status { margin-inline: 16px; }
  .site-search-results { padding-inline: 16px; }
  .site-search-footer { padding-inline: 16px; }
  .trait-popover-header button { min-width: 44px; min-height: 44px; }
  .weapon-desktop { display: none; }
  .weapon-mobile { display: block; margin: 22px 0; }
  .weapon-entry { display: grid; grid-template-columns: minmax(88px, .9fr) minmax(0, 1.7fr); gap: 10px 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .weapon-entry:first-child { border-top: 1px solid var(--line); }
  .weapon-name { min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
  .weapon-base-name { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 400; }
  .weapon-stats { display: grid; grid-template-columns: repeat(var(--stat-count), minmax(0, 1fr)); gap: 3px; align-self: start; margin: 0; text-align: center; }
  .weapon-stats div { min-width: 0; }
  .weapon-stats dt { color: var(--muted); font-family: var(--mono); font-size: 9px; line-height: 1.4; }
  .weapon-stats dd { margin: 5px 0 0; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
  .weapon-traits { grid-column: 1 / -1; color: var(--muted); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
  .weapon-traits-label { margin-right: 8px; color: var(--accent); font-family: var(--mono); font-size: 9px; text-transform: uppercase; }
  .sidebar { position: relative; width: 100%; padding: 25px 24px 0; overflow: visible; border-right: 0; }
  .brand { font-size: 25px; letter-spacing: .8px; }
  .sidebar-intro { display: none; }
  .sidebar-footer { margin-top: 0; padding: 8px 0 14px; }
  .page-numbers-toggle { width: auto; gap: 9px; }
  .sidebar-footer .edition { display: none; }
  .desktop-nav { display: none; }
  .mobile-navigation { display: block; margin-top: 20px; }
  .mobile-navigation > summary { padding-block: 14px; border-top: 1px solid #ffffff1a; color: var(--rail-accent); cursor: pointer; font-family: var(--mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
  .page-nav { gap: 4px; max-height: 300px; margin: 0 -8px; padding-bottom: 16px; overflow-y: auto; }
  .nav-link { gap: 7px; padding: 13px 8px; font-size: 12px; }
  .nav-link:hover { transform: none; }
  .nav-number { font-size: 9px; }
  .workspace { margin-left: 0; }
  .topbar { min-height: 48px; gap: 12px; padding-inline: 24px; font-size: 9px; letter-spacing: .5px; }
  .topic-navigation { display: flex; flex: 1; gap: 1px; overflow-x: auto; }
  .topic-navigation a { flex: 0 0 auto; min-height: 40px; padding-inline: 2px; font-size: clamp(9px, 2.6vw, 10px); letter-spacing: 0; }
  .theme-toggle { min-height: 40px; padding: 8px; gap: 6px; font-size: 9px; }
  .theme-state { display: none; }
  .reading-layout { display: block; padding: 34px 24px 0; }
  h1 { font-size: clamp(42px, 6vw, 60px); margin-top: 20px; letter-spacing: .5px; }
  .description { font-size: 16px; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 26px; }
  .header-rule { margin-top: 26px; }
  .chart-caption { flex-direction: column; gap: 3px; }
  .related-sources ul { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .topbar { padding-inline: 16px; gap: 8px; }
  .table-scroll { border-right: 2px solid var(--line); }
  .prose table { font-size: 13px; }
  .prose .weapon-table { min-width: 720px; }
  .prose th, .prose td { padding: 9px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
