/* Guns of Glory Field Guide — "Gunmetal & Brass" theme. Loaded after the inline <style> in index.html and overrides it, so the page still works (plainly) without this file. Art direction comes from the reference paintings in img/: engraved brass on blackened iron, sunset embers, cannon smoke and airship rigging. Light theme = aged parchment and iron-gall ink. Dark theme = night sky over the deck. */

@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Cinzel+Decorative:wght@700;900&display=swap");

:root {
  --bg: #EEE4CE;
  --surface: #F8F1E2;
  --ink: #241A10;
  --muted: #6A5843;
  --rule: #D2BF98;
  --accent: #865710;
  --accent-wash: #EBDAB4;
  --warn: #9B2C1F;
  --warn-wash: #F4DCD3;
  --lv-b: #2F6B4F;
  --lv-i: #2D5C8C;
  --lv-a: #7A3A6E;

  --iron: #1E1C1A;
  --iron-2: #2C2925;
  --iron-ink: #F1E6CF;
  --iron-muted: #B9A887;
  --brass-hi: #F6DE9A;
  --brass: #C99A45;
  --brass-lo: #7A5418;
  --brass-grad: linear-gradient(180deg, #F6DE9A 0%, #D9AE57 38%, #A8772A 62%, #E2BC6A 100%);
  --brass-line: linear-gradient(90deg, transparent, #A8772A 12%, #F1D48A 50%, #A8772A 88%, transparent);
  --ember: #E8762E;
  --panel-shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 10px 24px -14px rgba(60,38,10,.45);
  --smoke-tint: 92, 70, 44;

  --f-display: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  --f-deco: "Cinzel Decorative", "Cinzel", serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111317; --surface: #191C21; --ink: #EDE3CF; --muted: #A99D88; --rule: #3A3326;
    --accent: #E2B45E; --accent-wash: #272016; --warn: #EE8A73; --warn-wash: #33201B;
    --lv-b: #79C9A1; --lv-i: #86B8EA; --lv-a: #D8A0CC;
    --panel-shadow: 0 1px 0 rgba(255,231,170,.06) inset, 0 14px 30px -16px rgba(0,0,0,.8);
    --smoke-tint: 196, 186, 170;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111317; --surface: #191C21; --ink: #EDE3CF; --muted: #A99D88; --rule: #3A3326;
  --accent: #E2B45E; --accent-wash: #272016; --warn: #EE8A73; --warn-wash: #33201B;
  --lv-b: #79C9A1; --lv-i: #86B8EA; --lv-a: #D8A0CC;
  --panel-shadow: 0 1px 0 rgba(255,231,170,.06) inset, 0 14px 30px -16px rgba(0,0,0,.8);
  --smoke-tint: 196, 186, 170;
  color-scheme: dark;
}

/* ---------- Page atmosphere ---------- */
html { overflow-x: clip; }
body { padding-top: 0; position: relative; }
body::before {
  /* fixed layer: drifting smoke + sunset glow; cheap because it is composited once */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 60% at 85% -10%, rgba(232,118,46,.16), transparent 60%),
    radial-gradient(90% 50% at 0% 110%, rgba(var(--smoke-tint), .14), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='700'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' stitchTiles='stitch' baseFrequency='.006' numOctaves='4' seed='11'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .45 0 0 0 0 .38 .55 0 0 0 -.22'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 700px 700px;
  opacity: .9;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body::before {
    background:
      radial-gradient(110% 55% at 90% -8%, rgba(232,118,46,.20), transparent 62%),
      radial-gradient(80% 50% at 0% 105%, rgba(70,90,120,.22), transparent 70%),
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='700'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' stitchTiles='stitch' baseFrequency='.005' numOctaves='4' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 .78 0 0 0 0 .74 0 0 0 0 .68 .5 0 0 0 -.25'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 700px 700px;
    opacity: .55;
  }
}
:root[data-theme="dark"] body::before {
  background:
    radial-gradient(110% 55% at 90% -8%, rgba(232,118,46,.20), transparent 62%),
    radial-gradient(80% 50% at 0% 105%, rgba(70,90,120,.22), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='700'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' stitchTiles='stitch' baseFrequency='.005' numOctaves='4' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 .78 0 0 0 0 .74 0 0 0 0 .68 .5 0 0 0 -.25'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 700px 700px;
  opacity: .55;
}
::selection { background: rgba(201,154,69,.45); color: inherit; }
a:focus-visible, input:focus-visible, button:focus-visible, summary:focus-visible, .scroll:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
h1:focus, h2:focus { outline: none; }
* { scrollbar-color: var(--brass-lo) transparent; }

/* ---------- Header: an iron deck band with brass trim, full bleed ---------- */
header {
  position: relative;
  margin-inline: calc(50% - 50vw);
  padding: 16px calc(50vw - 50%) 0;
  border-bottom: 0;
  color: var(--iron-ink);
  background:
    radial-gradient(70% 140% at 100% 0%, rgba(232,118,46,.22), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.25), transparent 40%),
    linear-gradient(180deg, #2B2824, #191715);
  box-shadow: 0 12px 30px -18px rgba(0,0,0,.7);
}
header::after {
  /* brass rail with a centre stud */
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px;
  background: var(--brass-grad);
  box-shadow: 0 1px 0 rgba(0,0,0,.45), 0 -1px 0 rgba(0,0,0,.4);
}
.mark {
  display: table-cell; vertical-align: middle; position: relative; height: 54px; padding-left: 70px;
  font-family: var(--f-deco); font-weight: 700; font-size: clamp(1.25rem, 4.6vw, 1.8rem);
  letter-spacing: .04em; color: var(--iron-ink); text-transform: none; line-height: 1.05;
  text-shadow: 0 2px 0 rgba(0,0,0,.6);
}
.mark::before {
  content: ""; position: absolute; left: 3px; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 11px;
  background: url("img/emblem.webp") center / cover;
  box-shadow: 0 0 0 1px #000, 0 0 0 3px #B88A3A, 0 0 0 4px #3A2A10, 0 6px 16px rgba(0,0,0,.6), 0 0 22px rgba(232,118,46,.25);
}
.mark span {
  background: var(--brass-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 2px 0 rgba(0,0,0,.55));
}
nav#nav { margin-top: 14px; gap: 0 4px; }
#nav a {
  font-family: var(--f-display); font-weight: 600; font-size: .76rem; letter-spacing: .07em;
  color: var(--iron-muted); padding: 10px 7px 12px; border-bottom: 3px solid transparent; margin-bottom: -1px;
}
#nav a:hover { color: var(--brass-hi); }
#nav a[aria-current="page"] {
  color: var(--brass-hi); border-bottom-color: transparent;
  background: linear-gradient(180deg, transparent 55%, rgba(232,118,46,.16)), var(--brass-grad) bottom / 100% 3px no-repeat;
  text-shadow: 0 0 12px rgba(246,222,154,.35);
}
@media (max-width: 600px) { #nav { scrollbar-width: none; } #nav::-webkit-scrollbar { display: none; } }

/* ---------- Filter console: riveted iron plate with brass toggles ---------- */
.filters {
  margin: 26px 0 30px; padding: 14px 18px; border: 1px solid var(--rule); border-radius: 6px;
  background:
    radial-gradient(circle at 9px 9px, var(--brass) 0 2.2px, var(--brass-lo) 2.6px, transparent 3.2px),
    radial-gradient(circle at calc(100% - 9px) 9px, var(--brass) 0 2.2px, var(--brass-lo) 2.6px, transparent 3.2px),
    radial-gradient(circle at 9px calc(100% - 9px), var(--brass) 0 2.2px, var(--brass-lo) 2.6px, transparent 3.2px),
    radial-gradient(circle at calc(100% - 9px) calc(100% - 9px), var(--brass) 0 2.2px, var(--brass-lo) 2.6px, transparent 3.2px),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, #fff), var(--surface));
  box-shadow: var(--panel-shadow);
}
.flabel { font-family: var(--f-display); font-weight: 700; font-size: .72rem; letter-spacing: .14em; color: var(--accent); }
.tog, .resetbtn {
  font-family: var(--f-display); font-weight: 600; font-size: .78rem; letter-spacing: .06em;
  padding: 7px 13px; border-radius: 4px; border: 1px solid var(--rule); color: var(--muted);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 70%, #fff 6%), color-mix(in srgb, var(--surface) 90%, #000 8%));
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 1px 2px rgba(0,0,0,.18);
}
.tog:hover, .resetbtn:hover { color: var(--ink); border-color: var(--brass); }
.tog::before { width: 9px; height: 9px; border-width: 1.5px; }
.tog[aria-pressed="true"] {
  color: var(--ink); border-color: var(--brass-lo);
  background: linear-gradient(180deg, rgba(246,222,154,.28), rgba(168,119,42,.16)), var(--surface);
  box-shadow: 0 1px 3px rgba(0,0,0,.25) inset, 0 0 0 1px rgba(201,154,69,.35);
}
.tog[aria-pressed="true"]::before { box-shadow: 0 0 6px 1px currentColor; }
.tog[data-v="b"][aria-pressed="true"], .tog[data-v="i"][aria-pressed="true"], .tog[data-v="a"][aria-pressed="true"],
.tog[data-v="f2p"][aria-pressed="true"], .tog[data-v="p2p"][aria-pressed="true"], .tog[data-f="fc"][aria-pressed="true"] { border-color: currentColor; }
.gfilter { background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(6px); border-color: var(--rule); }
.gfilter input { border-color: var(--rule); border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.15) inset; }
.gfilter input:focus { border-color: var(--brass); }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--f-display); letter-spacing: .04em; }
h1 { font-weight: 800; font-size: clamp(2rem, 6.4vw, 3rem); line-height: 1.08; }
h2 {
  font-weight: 700; font-size: clamp(1.25rem, 3.6vw, 1.5rem); color: var(--ink);
  margin-top: 46px; padding-top: 22px; border-top: 0;
  background: var(--brass-line) top left / 100% 1px no-repeat;
  display: flex; align-items: center; gap: 10px;
}
h2::before {
  content: ""; flex: none; width: .95em; height: .95em; background: var(--brass);
  -webkit-mask: var(--cog) center / contain no-repeat; mask: var(--cog) center / contain no-repeat;
}
:root { --cog: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3Cmask id='m'%3E%3Crect width='24' height='24' fill='white'/%3E%3Ccircle cx='12' cy='12' r='3.2' fill='black'/%3E%3C/mask%3E%3C/defs%3E%3Cg mask='url(%23m)'%3E%3Ccircle cx='12' cy='12' r='7.4'/%3E%3Cg%3E%3Crect x='10.3' y='1' width='3.4' height='22' rx='.7'/%3E%3Crect x='10.3' y='1' width='3.4' height='22' rx='.7' transform='rotate(45 12 12)'/%3E%3Crect x='10.3' y='1' width='3.4' height='22' rx='.7' transform='rotate(90 12 12)'/%3E%3Crect x='10.3' y='1' width='3.4' height='22' rx='.7' transform='rotate(135 12 12)'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
h3 { font-weight: 700; font-size: 1.05rem; color: var(--accent); }
.lede { color: var(--muted); }
strong { color: var(--ink); }
.stamp { font-family: var(--f-display); font-weight: 600; letter-spacing: .14em; }

/* ---------- Section banners: every page's h1 becomes a framed painting ---------- */
section:not(#home) > h1 {
  --img: url("img/deck-cannon.webp"); --pos: 50% 40%;
  position: relative; display: flex; align-items: flex-end; min-height: clamp(150px, 30vw, 220px);
  margin-inline: -6px; padding: 22px 22px 20px; color: #F6EAD2;
  font-size: clamp(1.8rem, 6vw, 2.6rem); text-shadow: 0 2px 0 rgba(0,0,0,.55), 0 0 24px rgba(0,0,0,.6);
  background:
    linear-gradient(0deg, rgba(14,10,6,.92) 0%, rgba(14,10,6,.55) 45%, rgba(14,10,6,.05) 100%),
    linear-gradient(90deg, rgba(14,10,6,.55), transparent 70%),
    var(--img) var(--pos) / cover no-repeat, #2a241c;
  border: 3px solid transparent; border-radius: 4px;
  background-origin: border-box;
  box-shadow: 0 0 0 1px #0d0b08, 0 0 0 3px #B88A3A, 0 0 0 4px #3A2A10, 0 18px 36px -18px rgba(0,0,0,.75);
}
section:not(#home) > h1::after {
  /* engraved corner brackets */
  content: ""; position: absolute; inset: 8px; pointer-events: none;
  background:
    linear-gradient(#D9AE57,#D9AE57) top left / 18px 2px no-repeat, linear-gradient(#D9AE57,#D9AE57) top left / 2px 18px no-repeat,
    linear-gradient(#D9AE57,#D9AE57) top right / 18px 2px no-repeat, linear-gradient(#D9AE57,#D9AE57) top right / 2px 18px no-repeat,
    linear-gradient(#D9AE57,#D9AE57) bottom left / 18px 2px no-repeat, linear-gradient(#D9AE57,#D9AE57) bottom left / 2px 18px no-repeat,
    linear-gradient(#D9AE57,#D9AE57) bottom right / 18px 2px no-repeat, linear-gradient(#D9AE57,#D9AE57) bottom right / 2px 18px no-repeat;
  opacity: .8;
}
section#start-here > h1      { --img: url("img/hero-airship.webp"); --pos: 72% 35%; }
section#events-wars > h1     { --img: url("img/hero-airship.webp"); --pos: 18% 30%; }
section#troops-heroes > h1   { --img: url("img/hero-airship.webp"); --pos: 82% 55%; }
section#guards > h1          { --img: url("img/deck-cannon.webp");  --pos: 60% 55%; }
section#gear-gems > h1       { --img: url("img/emblem-full.webp");  --pos: 50% 42%; }
section#damage-stats > h1    { --img: url("img/deck-cannon.webp");  --pos: 20% 25%; }
section#gameplay-basics > h1 { --img: url("img/hero-airship.webp"); --pos: 45% 90%; }
section#tools-links > h1     { --img: url("img/deck-cannon.webp");  --pos: 85% 20%; }
section#credits > h1         { --img: url("img/emblem-full.webp");  --pos: 50% 15%; }
section:not(#home) > h1 + .lede, section:not(#home) > h1 + p { margin-top: 18px; }

/* ---------- Home hero (markup built by theme.js) ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  margin: 0 calc(50% - min(50vw, 640px)); min-height: min(78vh, 600px);
  display: flex; align-items: flex-end; color: #F6EAD2;
  background: #15110c;
  border-block: 1px solid #000;
  box-shadow: 0 0 0 1px rgba(184,138,58,.5), 0 30px 60px -30px rgba(0,0,0,.8);
}
@media (min-width: 1300px) { .hero { border-radius: 6px; } }
.hero-art { position: absolute; inset: 0; z-index: -1; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; display: block; }
.hero-art::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(0deg, rgba(12,9,6,.96) 4%, rgba(12,9,6,.65) 36%, rgba(12,9,6,0) 70%),
    linear-gradient(90deg, rgba(12,9,6,.75), rgba(12,9,6,0) 65%),
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0,0,0,.55));
}
.hero .smoke {
  position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(210,200,185,.30), rgba(160,150,140,.12) 55%, transparent);
  filter: blur(18px); mix-blend-mode: screen;
}
.hero .smoke.s1 { left: -20%; top: -30%; }
.hero .smoke.s2 { right: -25%; bottom: -45%; width: 85%; opacity: .7; }
.hero .embers { position: absolute; inset: 0; pointer-events: none; }
.hero .embers i {
  position: absolute; bottom: -10px; width: 3px; height: 3px; border-radius: 50%;
  background: #FFC27A; box-shadow: 0 0 6px 2px rgba(255,130,40,.8); opacity: 0;
}
.hero-body { position: relative; width: 100%; max-width: 720px; margin-inline: auto; padding: 120px 16px 34px; }
@media (min-width: 760px) { .hero-body { padding-inline: 0; } }
.hero-emblem {
  width: 76px; height: 76px; border-radius: 16px; display: block; margin-bottom: 18px;
  box-shadow: 0 0 0 1px #000, 0 0 0 3px #B88A3A, 0 0 0 4px #3A2A10, 0 10px 26px rgba(0,0,0,.6), 0 0 34px rgba(232,118,46,.35);
}
.hero-kicker {
  margin: 0 0 10px; font-family: var(--f-display); font-weight: 700; font-size: .78rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--brass-hi); display: flex; align-items: center; gap: 12px;
}
@media (max-width: 480px) { .hero-kicker { letter-spacing: .18em; } .hero-body { padding-top: 90px; } }
.hero-kicker::after { content: ""; height: 1px; flex: 0 1 120px; background: linear-gradient(90deg, #C99A45, transparent); }
.hero h1 {
  color: #F8ECD4; font-size: clamp(2.3rem, 7.4vw, 3.9rem); max-width: 14ch;
  text-shadow: 0 3px 0 rgba(0,0,0,.5), 0 0 40px rgba(0,0,0,.7);
}
.hero h1 em {
  font-style: normal; background: var(--brass-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 3px 0 rgba(0,0,0,.55));
}
.hero .lede { color: #DCCDB2; font-size: clamp(1.02rem, 2.4vw, 1.18rem); max-width: 56ch; text-shadow: 0 1px 8px rgba(0,0,0,.8); }
.hero .stamp { color: #B9A887; }
@media (prefers-reduced-motion: no-preference) {
  .hero-art img { animation: gog-drift 38s ease-in-out infinite alternate; transform-origin: 62% 40%; }
  .hero .smoke.s1 { animation: gog-smoke 26s ease-in-out infinite alternate; }
  .hero .smoke.s2 { animation: gog-smoke 34s ease-in-out -12s infinite alternate-reverse; }
  .hero .embers i { animation: gog-ember var(--d, 7s) linear var(--delay, 0s) infinite; }
}
@keyframes gog-drift { from { transform: scale(1.04) translate3d(0,0,0); } to { transform: scale(1.12) translate3d(-2%, 1%, 0); } }
@keyframes gog-smoke { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(12%, 6%, 0) scale(1.18); } }
@keyframes gog-ember {
  0% { transform: translate3d(0,0,0); opacity: 0; }
  10% { opacity: 1; }
  70% { opacity: .8; }
  100% { transform: translate3d(var(--x, 40px), -520px, 0); opacity: 0; }
}

/* ---------- Home contents: numbered dispatch cards ---------- */
#home .toc { max-width: none; counter-reset: dispatch; border-top: 0; margin-top: 34px; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { #home .toc { grid-template-columns: 1fr 1fr; } }
#home .toc li { border: 0; margin: 0; counter-increment: dispatch; }
#home .toc a {
  position: relative; height: 100%; padding: 18px 18px 18px 64px; border-radius: 5px;
  border: 1px solid var(--rule); background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 85%, #fff 5%), var(--surface));
  box-shadow: var(--panel-shadow); overflow: hidden;
}
#home .toc a::before {
  content: counter(dispatch, upper-roman); position: absolute; left: 0; top: 0; bottom: 0; width: 48px;
  display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: .95rem; letter-spacing: .04em;
  color: var(--brass-hi); background: linear-gradient(180deg, #2E2A25, #1A1815);
  border-right: 2px solid #A8772A; text-shadow: 0 1px 0 #000;
}
#home .toc a::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(80% 120% at 100% 0%, rgba(232,118,46,.12), transparent 60%); opacity: 0;
}
#home .toc .t { font-size: 1.12rem; font-weight: 700; letter-spacing: .05em; }
#home .toc .d { font-size: .95rem; grid-column: 1 / -1; }
#home .toc .go { font-family: var(--f-display); font-weight: 600; font-size: .72rem; letter-spacing: .08em; }
#home .toc a:hover { border-color: var(--brass); }
#home .toc a:hover::after { opacity: 1; }
#home .toc a:hover .t { color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  #home .toc a { transition: transform .2s ease, border-color .2s, box-shadow .2s; }
  #home .toc a::after { transition: opacity .25s; }
  #home .toc a:hover { transform: translateY(-2px); box-shadow: var(--panel-shadow), 0 14px 28px -16px rgba(168,119,42,.6); }
}

/* ---------- Panels, tables, notes ---------- */
.scroll, details { border-color: var(--rule); border-radius: 4px; box-shadow: var(--panel-shadow); }
th {
  font-family: var(--f-display); font-weight: 700; font-size: .7rem; letter-spacing: .05em; line-height: 1.3;
  color: #EBCF8E; background: linear-gradient(180deg, #2F2B26, #1F1C19);
  border-bottom: 2px solid #A8772A; text-shadow: 0 1px 0 #000;
}
th, td { border-bottom-color: color-mix(in srgb, var(--rule) 75%, transparent); }
tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--accent-wash) 28%, transparent); }
tbody tr:hover td { background: color-mix(in srgb, var(--accent-wash) 60%, transparent); }
td.n { font-size: 1rem; font-weight: 700; letter-spacing: .04em; }
@media (max-width: 600px) {
  table.roster tbody tr:nth-child(even) td:nth-child(2), table.roster tbody tr:hover td:nth-child(2) { background: var(--surface); }
}
details summary, .bigtable > summary { font-family: var(--f-display); font-weight: 700; font-size: .8rem; letter-spacing: .08em; }
.bigtable > summary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent-wash) 80%, #fff 6%), var(--accent-wash)); border-color: var(--rule); border-radius: 4px 4px 0 0; }
details[open] > summary { border-bottom: 1px solid var(--rule); }

.note {
  position: relative; border: 1px solid color-mix(in srgb, var(--brass) 55%, transparent); border-left: 4px solid var(--brass);
  border-radius: 3px; background: linear-gradient(90deg, var(--accent-wash), color-mix(in srgb, var(--accent-wash) 40%, var(--surface)));
  box-shadow: var(--panel-shadow);
}
.note b { font-family: var(--f-display); font-weight: 700; letter-spacing: .14em; font-size: .74rem; }
.warn { border-color: color-mix(in srgb, var(--warn) 55%, transparent); border-left: 4px solid var(--warn); background: var(--warn-wash); }
.warn::after {
  /* wax seal */
  content: ""; position: absolute; right: -8px; top: -10px; width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #D0543F, #8E2216 60%, #5A140C);
  box-shadow: 0 2px 4px rgba(0,0,0,.35), inset 0 0 0 3px rgba(0,0,0,.12);
}
.empty { border: 1px dashed var(--brass); border-radius: 4px; background: var(--surface); }
.empty button, .resetbtn { font-family: var(--f-display); font-weight: 700; letter-spacing: .06em; }

.chip { font-family: var(--f-display); font-weight: 700; font-size: .6rem; letter-spacing: .1em; border-radius: 2px; background: color-mix(in srgb, currentColor 8%, transparent); }

/* placeholders read as blank engraving plates */
.shot .ph, .portrait {
  border: 1px solid var(--rule); border-radius: 4px;
  background:
    repeating-linear-gradient(135deg, transparent 0 9px, color-mix(in srgb, var(--rule) 45%, transparent) 9px 10px),
    linear-gradient(180deg, var(--surface), var(--accent-wash));
  box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 5px color-mix(in srgb, var(--brass) 50%, transparent);
}
.shot figcaption { font-family: var(--f-body); font-style: italic; font-size: .85rem; letter-spacing: 0; }

.checks input { accent-color: var(--brass-lo); }
.checks li { border-bottom-color: color-mix(in srgb, var(--rule) 75%, transparent); }

.onpage a { font-family: var(--f-display); font-weight: 700; letter-spacing: .05em; }
.onpage { border: 0; background: var(--brass-line) top / 100% 1px no-repeat, var(--brass-line) bottom / 100% 1px no-repeat; padding: 12px 0; font-family: var(--f-display); font-weight: 600; font-size: .8rem; letter-spacing: .04em; }

/* ---------- Pager, back-to-top, footer ---------- */
.pager { border-top: 0; padding-top: 22px; background: var(--brass-line) top / 100% 2px no-repeat; gap: 12px; font-family: var(--f-display); font-weight: 700; letter-spacing: .08em; }
.pager a {
  padding: 10px 16px; border-radius: 4px; color: var(--brass-hi);
  background: linear-gradient(180deg, #2F2B26, #1C1A17); border: 1px solid #000;
  box-shadow: 0 0 0 1px #A8772A inset, 0 6px 14px -8px rgba(0,0,0,.7);
}
.pager a:hover { color: #fff; box-shadow: 0 0 0 1px #E2BC6A inset, 0 0 18px -4px rgba(232,118,46,.6); }
.totop {
  font-family: var(--f-display); font-weight: 700; letter-spacing: .08em; color: var(--brass-hi);
  background: linear-gradient(180deg, #2F2B26, #1C1A17); border: 1px solid #000;
  box-shadow: 0 0 0 1px #A8772A inset, 0 8px 20px -6px rgba(0,0,0,.7);
}
footer { position: relative; margin-top: 56px; padding-top: 34px; text-align: center; margin-inline: auto; font-size: .88rem; }
footer::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 38px; height: 38px; transform: translate(-50%, -50%);
  background: url("img/emblem.webp") center / cover; border-radius: 9px;
  box-shadow: 0 0 0 1px #000, 0 0 0 2px #B88A3A, 0 4px 12px rgba(0,0,0,.4);
}
footer { background: var(--brass-line) top / 100% 1px no-repeat; }

@media (prefers-reduced-motion: no-preference) {
  .tog, .resetbtn, .pager a, .totop, #nav a { transition: color .15s, border-color .15s, background .15s, box-shadow .2s; }
}

/* ---------- Print: keep the content, drop the atmosphere ---------- */
@media print {
  body::before, header::after, .hero-art, .mark::before, footer::before, .warn::after { display: none !important; }
  header, .hero, section:not(#home) > h1 { background: none !important; color: #000 !important; box-shadow: none !important; margin-inline: 0 !important; padding-inline: 0 !important; min-height: 0 !important; text-shadow: none !important; }
  section:not(#home) > h1::after { display: none; }
  .mark, .hero h1, .hero .lede { color: #000 !important; text-shadow: none !important; }
  th { color: #000; background: #eee; text-shadow: none; }
}

/* ---------- Measure: prose fills the 720px column instead of stopping at 65ch, so text lines up with the banners and tables ---------- */
.wrap p, .wrap ul, .wrap ol, .note, .shot, footer { max-width: none; }
/* theme.js wraps each tip's last word and its level chips in .tail so the chips never wrap onto a line by themselves */
.tail { white-space: nowrap; }
.tail .chips { white-space: normal; }
/* Let the browser balance line breaks in prose to avoid short last lines. */
.wrap p, .wrap li, .note p { text-wrap: pretty; }

/* ---------- Wide screens (1100px+): filters move to a sticky left sidebar and the content column widens to about 850px. Phones and tablets keep the single column. ---------- */
@media (min-width: 1100px) {
  body { font-size: 18px; }
  .wrap { max-width: 1180px; display: grid; grid-template-columns: 250px minmax(0, 1fr); column-gap: 48px; align-items: start; }
  header { grid-column: 1 / -1; grid-row: 1; }
  .filters { grid-column: 1; grid-row: 2 / 4; align-self: start; position: sticky; top: 24px; margin: 34px 0 0; flex-direction: column; align-items: stretch; gap: 18px; padding: 18px; }
  .filters .fgroup { flex-direction: column; align-items: stretch; gap: 8px; }
  .filters .flabel { margin: 0 0 2px; }
  .filters .tog { justify-content: flex-start; }
  main { grid-column: 2; grid-row: 2; min-width: 0; padding-top: 34px; }
  footer { grid-column: 2; grid-row: 3; }
  .hero { margin: 0; border-radius: 6px; border: 0; min-height: 540px; }
  .hero-body { max-width: none; padding: 140px 40px 38px; }
  #home .toc { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
  section:not(#home) > h1 { min-height: 240px; }
  table.roster { min-width: 0; }
}

/* ---------- Tag icons: rank chevrons for level (1 Beginner, 2 Intermediate, 3 Advanced) and a coin for pay to play. The word is in the tooltip and screen-reader label. ---------- */
.chips { gap: 3px; }
.chip.lv, .chip.p2p { display: inline-flex; align-items: center; padding: 1px 3px; border: 0; border-radius: 3px; line-height: 0; vertical-align: -4px; background: color-mix(in srgb, currentColor 13%, transparent); }
.chip.p2p { color: #B8862F; }
.chip svg, .tog.ico svg { width: 16px; height: 16px; display: block; flex: none; }
.chip polyline, .tog polyline { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chip .c1, .tog .c1 { fill: currentColor; }
.chip .c2, .tog .c2 { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 1.2; }
.tog.ico::before { display: none; }
.tog.ico[aria-pressed="false"] { opacity: .6; }
.tog.ico[aria-pressed="false"] svg { opacity: .5; }
.tog[data-v="p2p"][aria-pressed="true"] { color: #B8862F; border-color: #B8862F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.p2p, :root:not([data-theme="light"]) .tog[data-v="p2p"][aria-pressed="true"] { color: #E2B45E; border-color: #E2B45E; } }
:root[data-theme="dark"] .chip.p2p, :root[data-theme="dark"] .tog[data-v="p2p"][aria-pressed="true"] { color: #E2B45E; border-color: #E2B45E; }
:root[data-onelv] .chip.lv { display: none; }
:root[data-onelv] .chips:not(:has(.p2p, .f2p)) { display: none; }

.shot { margin: 14px 0; }
.shot img { display: block; width: 100%; max-width: 640px; height: auto; border-radius: 8px; border: 1px solid rgba(226,180,94,.25); }
.shot figcaption { margin-top: 6px; font-size: .85rem; opacity: .75; }
