:root{--bg_app:#24150a;--wood_panel:#5e3a1a;--wood_deep:#34200e;--gold:#d8a858;--gold_bright:#f6dcae;--gold_muted:#a07840;--bronze:#b07a3a;--crimson:#7a1414;--danger:#ef6a58;--success:#659f3a;--success_bright:#8fd46a;--info:#448db7;--premium:#4b2e6d;--text:#f6e4c0;--text_muted:#c8a878;--rarity_common:#9aa0a6;--rarity_uncommon:#c08a4a;--rarity_rare:#dfe6ec;--rarity_epic:#f0c040;--rarity_legendary:#d0503a;--race_sylvan:#3f8f6b;--race_ashborn:#d0622a;--race_arcane:#7a5cc4;--race_goldvale:#d9b23a;--race_mountain_smiths:#8c8f99;--race_steppe_riders:#b5652e;--race_gryphon_riders:#4f8fc9;--race_immortals:#5e8a7a;--backdrop:#120a0499;--oak_top:#8a5a2a;--oak_bottom:#4e2e14;--oak_dark_top:#5e3a1a;--oak_dark_bottom:#34200e;--bronze_hi:#f6dcae;--bronze_lo:#4a2a10;--parch_top:#e8d2a4;--parch_bottom:#cfae74;--ink:#3a2210;--ink_muted:#6a4622;--text_on_oak:#f6e4c0;--wax:#d04a3a;--wax_dark:#7a1414;--own:#2f6a22;--foe:#8a1a10;--ally:#1f4f86;--help:#b8641a;--neutral:#6a6a6a;--own_on_oak:#a8e08a;--foe_on_oak:#ffb0a0;--ally_on_oak:#9fd0ff;--help_on_oak:#ffc080;--neutral_on_oak:#c8c8c8;--shelter:#1f4f86;--metal_1:#9aa0a6;--metal_2:#c08a4a;--metal_3:#dfe6ec;--metal_4:#f0c040;--metal_5:#d0503a;--pearl:#8a5cf0;}
/* spectral-sc-cyrillic-ext-700-normal */
@font-face {
  font-family: 'Spectral SC';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/media/spectral-sc-cyrillic-ext-700-normal-6b2209dadf.woff2) format('woff2');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* spectral-sc-cyrillic-700-normal */
@font-face {
  font-family: 'Spectral SC';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/media/spectral-sc-cyrillic-700-normal-a3a83c59e3.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* spectral-sc-vietnamese-700-normal */
@font-face {
  font-family: 'Spectral SC';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/media/spectral-sc-vietnamese-700-normal-7b91a94cf7.woff2) format('woff2');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* spectral-sc-latin-ext-700-normal */
@font-face {
  font-family: 'Spectral SC';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/media/spectral-sc-latin-ext-700-normal-8605b0c5ce.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;
}

/* spectral-sc-latin-700-normal */
@font-face {
  font-family: 'Spectral SC';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/media/spectral-sc-latin-700-normal-3f0df9a8ab.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;
}
/* pt-sans-cyrillic-ext-400-normal */
@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/media/pt-sans-cyrillic-ext-400-normal-a456e541d4.woff2) format('woff2');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* pt-sans-cyrillic-400-normal */
@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/media/pt-sans-cyrillic-400-normal-f283e584f0.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* pt-sans-latin-ext-400-normal */
@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/media/pt-sans-latin-ext-400-normal-94dc178a50.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;
}

/* pt-sans-latin-400-normal */
@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/media/pt-sans-latin-400-normal-2dea6190c1.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;
}
/* pt-sans-cyrillic-ext-700-normal */
@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/media/pt-sans-cyrillic-ext-700-normal-5da273f941.woff2) format('woff2');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* pt-sans-cyrillic-700-normal */
@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/media/pt-sans-cyrillic-700-normal-05795f7954.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* pt-sans-latin-ext-700-normal */
@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/media/pt-sans-latin-ext-700-normal-7e3cada9d8.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;
}

/* pt-sans-latin-700-normal */
@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/media/pt-sans-latin-700-normal-05ea99a48e.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;
}
/* The look of the site's pages (apps/site). Colours are the game's (content/ui/theme.json, written above this file as
   --<name> variables by build.ts); fonts are the game's too. Phones first: Google reads the mobile page. */
* { box-sizing: border-box; }
html { background: var(--bg_app); color: var(--text); }
body {
  margin: 0;
  font: 17px/1.55 'PT Sans', system-ui, sans-serif;
  background: radial-gradient(ellipse at top, var(--wood_deep), var(--bg_app) 70%) fixed;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold_bright); }
a:hover { color: var(--gold); }
h1, h2, h3, .brand-name { font-family: 'Spectral SC', Georgia, serif; font-weight: 700; color: var(--gold_bright); line-height: 1.2; }
h1 { font-size: clamp(30px, 5vw, 54px); margin: 0 0 12px; text-shadow: 0 2px 12px #000; }
h2 { font-size: clamp(24px, 3.2vw, 34px); margin: 0 0 16px; }
h3 { font-size: 21px; margin: 0 0 8px; }
main { display: block; }

.top {
  position: sticky; top: 0; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--wood_deep) 92%, transparent);
  border-bottom: 1px solid var(--gold_muted);
  backdrop-filter: blur(6px);
}
/* On phones the header wraps into two rows: it scrolls away instead of covering the page. */
@media (max-width: 699px) { .top { position: static; } }
.brand { display: flex; flex-direction: column; text-decoration: none; }
.brand-name { font-size: 24px; letter-spacing: 0.04em; }
.brand-note { font-size: 13px; color: var(--text_muted); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.nav a { text-decoration: none; }
.nav a[aria-current] { color: var(--text); }
.langs { display: inline-flex; gap: 8px; font-size: 14px; }
.langs a[aria-current] { color: var(--text); font-weight: 700; text-decoration: underline; }

.btn {
  display: inline-block; padding: 12px 26px;
  font: 700 19px 'Spectral SC', Georgia, serif; text-decoration: none; color: #1a120b;
  background: linear-gradient(var(--gold_bright), var(--gold) 55%, var(--bronze));
  border: 1px solid var(--bronze_lo); border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn:hover { color: #1a120b; filter: brightness(1.08); }
.btn-small { padding: 6px 16px; font-size: 16px; }
.nav .btn-small { color: #1a120b; }
.btn-quiet { background: transparent; color: var(--gold_bright); border-color: var(--gold_muted); box-shadow: none; }
.btn-quiet:hover { color: var(--gold_bright); background: rgba(0, 0, 0, 0.3); }

.hero { position: relative; min-height: min(78vh, 760px); display: flex; align-items: flex-end; overflow: hidden; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(18, 10, 4, 0.1) 30%, rgba(18, 10, 4, 0.75) 70%, var(--bg_app));
}
.hero-body { position: relative; z-index: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 24px 16px 40px; }
.lead { font-size: clamp(18px, 2.2vw, 22px); max-width: 760px; margin: 0 0 22px; }
.note { font-size: 14px; color: var(--text_muted); margin: 14px 0 0; }

.mobile-note { display: none; }
@media (max-width: 899px) {
  .mobile-note {
    display: block; margin: 16px; padding: 14px 16px;
    background: var(--wood_deep); border: 1px solid var(--gold_muted); border-radius: 10px;
  }
  .mobile-note p { margin: 0 0 10px; }
}

.block, .page-head, .cta { max-width: 1100px; margin: 0 auto; padding: 36px 16px; }
.page-head { padding-top: 48px; }
.block-lead { color: var(--text_muted); margin: -6px 0 20px; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
  padding: 18px 20px;
  background: linear-gradient(var(--wood_panel), var(--wood_deep));
  border: 1px solid var(--gold_muted); border-radius: 10px;
}
.card p { margin: 0; }

.races { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
@media (min-width: 1000px) { .races { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.races li { text-align: center; font-family: 'Spectral SC', Georgia, serif; font-weight: 700; color: var(--gold_bright); font-size: 15px; min-width: 0; overflow-wrap: break-word; }
.races img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--gold_muted); margin-bottom: 6px; }

.shots { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-bottom: 16px; }
.shots figure { margin: 0; }
.shots img { border-radius: 8px; border: 1px solid var(--gold_muted); }
.shots figcaption { font-size: 14px; color: var(--text_muted); margin-top: 6px; }

.faq details { border-bottom: 1px solid var(--wood_panel); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--gold_bright); }
.faq p { margin: 8px 0 0; }

.cta { text-align: center; padding-bottom: 56px; }
.cta p { margin: 0 0 20px; }

.facts { display: grid; gap: 0 24px; grid-template-columns: 1fr; margin: 0; }
.facts div { display: grid; grid-template-columns: minmax(140px, 1fr) 2fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--wood_panel); }
.facts dt { color: var(--text_muted); }
.facts dd { margin: 0; }
.prose p { max-width: 780px; }
.ticks { padding-left: 20px; }
.ticks li { margin-bottom: 8px; }
.not-found { min-height: 50vh; }

.foot { border-top: 1px solid var(--gold_muted); padding: 24px 16px 32px; text-align: center; color: var(--text_muted); font-size: 14px; }
.foot p { margin: 0 0 8px; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }

/* The wiki (wiki.tsx), drawn like the game's windows (content/ui/kit.json): dark glass, thin gold hairlines, deep
   shadows, bronze ribbon lines with a diamond, round bronze medals for the sections, a parchment notice with a wax
   seal as the call to play. Art leads: the key art over the home, a painted banner per section page and a picture tile
   per section (site.yaml wiki_art), picture-on-top cards, an article's picture in a framed infobox. CSS only (no
   script); phones first: at 375px nothing is wider than the screen. */
html:has(.wiki) { scroll-padding-top: 16px; }
@media (min-width: 700px) { html:has(.wiki) { scroll-padding-top: 92px; } }
@media (prefers-reduced-motion: no-preference) { html:has(.wiki-toc) { scroll-behavior: smooth; } }
.wiki {
  --wk-line: color-mix(in srgb, var(--gold_bright) 32%, transparent);
  --wk-line-hi: color-mix(in srgb, var(--gold_bright) 58%, transparent);
  --wk-line-soft: color-mix(in srgb, var(--gold_bright) 14%, transparent);
  --wk-glass: linear-gradient(180deg, rgba(30, 20, 12, 0.72), rgba(12, 8, 5, 0.86));
  --wk-glass-deep: linear-gradient(180deg, rgba(30, 20, 12, 0.84), rgba(12, 8, 5, 0.95));
  --wk-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --wk-lift: 0 14px 30px rgba(0, 0, 0, 0.6), 0 0 22px color-mix(in srgb, var(--gold) 30%, transparent);
  --wk-ribbon: linear-gradient(90deg, var(--bronze), color-mix(in srgb, var(--bronze) 30%, transparent) 55%, transparent);
  --wk-diamond: linear-gradient(135deg, var(--gold_bright), var(--gold) 50%, var(--bronze));
  --wk-stage: radial-gradient(ellipse 70% 60% at 50% 62%, color-mix(in srgb, var(--gold) 24%, transparent), transparent 72%),
    linear-gradient(180deg, var(--wood_deep), rgba(12, 8, 5, 0.92));
  --wk-wood: radial-gradient(ellipse at 70% 20%, var(--wood_panel), var(--wood_deep) 60%, var(--bg_app));
  max-width: 1232px; margin: 0 auto; padding: 16px 16px 8px; overflow-wrap: break-word;
}
.wiki a:focus-visible { outline: 2px solid var(--gold_bright); outline-offset: 2px; border-radius: 4px; }

/* Breadcrumbs: small gold diamonds between the steps. */
.crumbs ol { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px; font-size: 14px; color: var(--text_muted); }
.crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.crumbs li + li::before { content: ''; flex: none; width: 5px; height: 5px; margin: 0 10px; transform: rotate(45deg); background: var(--gold_muted); }
.crumbs a { color: var(--text_muted); text-decoration: none; }
.crumbs a:hover { color: var(--gold_bright); }
.crumbs [aria-current] { color: var(--gold_bright); }

/* A section's icon in a round bronze medal (kit badges) with a dark wood disc; counts as pills. */
.wiki-medal {
  position: relative; flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--bronze_hi), var(--bronze) 45%, var(--bronze_lo));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 0 0 1px var(--bronze_lo);
}
.wiki-medal::before {
  content: ''; position: absolute; inset: 4px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, var(--wood_panel), var(--bg_app) 80%);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--bronze_lo);
}
.wiki-medal img { position: relative; width: 66%; height: 66%; }
.wiki-count {
  display: inline-block; padding: 3px 12px; font: 700 14px/1.3 'PT Sans', system-ui, sans-serif; color: var(--gold_bright); text-shadow: none;
  background: rgba(10, 6, 3, 0.62); border: 1px solid var(--wk-line); border-radius: 999px;
}
.wiki-num {
  flex: none; min-width: 28px; padding: 1px 8px; text-align: center; font: 700 13px/1.5 'PT Sans', system-ui, sans-serif; color: var(--text_muted); text-shadow: none;
  background: rgba(0, 0, 0, 0.32); border: 1px solid var(--wk-line-soft); border-radius: 999px;
}
/* A caption heading with a hairline (the game's help window). */
.wiki-cap { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font: 700 13px/1.2 'PT Sans', system-ui, sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); text-shadow: none; }
.wiki-cap::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, color-mix(in srgb, var(--gold_muted) 70%, transparent), transparent); }

/* The banner of the home and of a section page: the art cropped around its focus, shaded so the heading reads, gold
   corner brackets; edge to edge on phones, a framed panel from 700px. */
.wiki-hero {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end;
  min-height: 280px; margin: 0 -16px 22px; background: var(--wk-wood); border-block: 1px solid var(--wk-line);
}
.wiki-hero > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.wiki-hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10, 6, 3, 0.1) 0%, rgba(10, 6, 3, 0.55) 42%, rgba(10, 6, 3, 0.94) 100%);
}
.wiki-hero::before {
  --c: linear-gradient(var(--gold), var(--gold));
  content: ''; position: absolute; inset: 10px; z-index: 1; pointer-events: none; opacity: 0.75;
  background: var(--c) 0 0 / 26px 2px, var(--c) 0 0 / 2px 26px, var(--c) 100% 0 / 26px 2px, var(--c) 100% 0 / 2px 26px,
    var(--c) 0 100% / 26px 2px, var(--c) 0 100% / 2px 26px, var(--c) 100% 100% / 26px 2px, var(--c) 100% 100% / 2px 26px;
  background-repeat: no-repeat;
}
.wiki-hero-body { position: relative; width: 100%; padding: 100px 20px 22px; }
.wiki-hero h1 {
  position: relative; display: flex; align-items: center; gap: 14px; margin: 0 0 12px; padding-bottom: 12px;
  font-size: clamp(30px, 4.4vw, 50px); text-wrap: balance;
  background: var(--wk-ribbon) 0 100% / min(460px, 100%) 2px no-repeat;
}
.wiki-hero h1::after {
  content: ''; position: absolute; left: 0; bottom: -3px; width: 8px; height: 8px; transform: rotate(45deg);
  background: var(--wk-diamond); box-shadow: 0 0 0 1px var(--bronze_lo), 0 0 10px rgba(233, 196, 106, 0.5);
}
.wiki-hero h1 .wiki-medal { width: 60px; height: 60px; }
.wiki-hero-lead { max-width: 640px; margin: 0 0 14px; font-size: 17px; line-height: 1.5; color: var(--text); text-shadow: 0 1px 6px #000; }
@media (min-width: 700px) {
  .wiki-hero {
    min-height: clamp(260px, 24vw, 320px); margin: 0 0 28px;
    border: 1px solid var(--wk-line); border-radius: 20px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
  }
  .wiki-hero-home { min-height: clamp(320px, 30vw, 410px); }
  .wiki-hero::after {
    background: linear-gradient(90deg, rgba(10, 6, 3, 0.88) 0%, rgba(10, 6, 3, 0.55) 42%, transparent 75%),
      linear-gradient(180deg, transparent 45%, rgba(10, 6, 3, 0.7) 100%);
  }
  .wiki-hero-body { max-width: 780px; padding: 44px 46px 34px; }
  .wiki-hero h1 .wiki-medal { width: 72px; height: 72px; }
  .wiki-hero-lead { font-size: clamp(18px, 1.6vw, 20px); }
}

/* The home's section tiles: the section's art, its medal, name, lead and count on the shaded foot. 1 / 1+2+2 / 3+3 then 2+2+2. */
.wiki-tiles { list-style: none; margin: 0 0 36px; padding: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.wiki-tile a {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  height: 100%; min-height: 220px; padding: 18px; color: var(--text); text-decoration: none;
  background: var(--wk-wood); border: 1px solid var(--wk-line); border-radius: 18px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.wiki-tile a > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.wiki-tile a::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10, 6, 3, 0.05) 0%, rgba(10, 6, 3, 0.5) 40%, rgba(10, 6, 3, 0.94) 100%);
}
.wiki-tile a::before { content: ''; position: absolute; inset: 7px; pointer-events: none; border: 1px solid var(--wk-line-soft); border-radius: 12px; }
.wiki-tile a:hover, .wiki-tile a:focus-visible { color: var(--text); border-color: var(--wk-line-hi); box-shadow: var(--wk-lift); }
.wiki-tile a:hover > img, .wiki-tile a:focus-visible > img { transform: scale(1.05); }
.wiki-tile h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; font-size: clamp(22px, 2.3vw, 28px); text-shadow: 0 2px 10px #000; }
.wiki-tile .wiki-medal { width: 48px; height: 48px; }
.wiki-tile p { margin: 0 0 12px; max-width: 46ch; font-size: 15px; line-height: 1.45; text-shadow: 0 1px 4px #000; }
@media (min-width: 700px) {
  .wiki-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .wiki-tile:first-child { grid-column: 1 / -1; }
  .wiki-tile a { min-height: 260px; padding: 22px 24px; }
}
@media (min-width: 1000px) {
  .wiki-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .wiki-tile, .wiki-tile:first-child { grid-column: span 2; }
  .wiki-tile:nth-child(-n + 2) { grid-column: span 3; }
  .wiki-tile:nth-child(-n + 2) a { min-height: 320px; }
}

/* Every article under the tiles: one glass panel, a group per section, links in columns with gold diamonds. */
.wiki-index { padding: 20px 16px 8px; background: var(--wk-glass); border: 1px solid var(--wk-line); border-radius: 18px; box-shadow: var(--wk-shadow); }
@media (min-width: 700px) { .wiki-index { padding: 26px 30px 12px; } }
.wiki-index-title { margin: 0 0 4px; padding-bottom: 10px; font-size: clamp(22px, 2.6vw, 30px); background: var(--wk-ribbon) 0 100% / 100% 2px no-repeat; }
.wiki-group { padding: 16px 0 14px; }
.wiki-group + .wiki-group { border-top: 1px solid var(--wk-line-soft); }
.wiki-group h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 20px; }
.wiki-group h3 a { display: inline-flex; align-items: center; gap: 10px; color: var(--gold_bright); text-decoration: none; }
.wiki-group h3 a:hover { color: var(--gold); }
.wiki-group h3 img { width: 28px; height: 28px; flex: none; }
.wiki-list { list-style: none; margin: 0; padding: 0; columns: 4 140px; column-gap: 20px; }
@media (min-width: 700px) { .wiki-list { column-gap: 32px; } }
.wiki-list li { position: relative; break-inside: avoid; padding: 3px 0 3px 16px; font-size: 15.5px; line-height: 1.4; }
.wiki-list li::before { content: ''; position: absolute; left: 1px; top: 0.7em; width: 6px; height: 6px; transform: rotate(45deg); background: var(--wk-diamond); }
.wiki-list a { color: var(--text); text-decoration: none; }
.wiki-list a:hover { color: var(--gold_bright); text-decoration: underline; text-decoration-color: var(--gold_muted); text-underline-offset: 3px; }

/* Picture-on-top cards (a section's topics; smaller under an article): the picture on a lit stage, fitted by kind. */
.wiki-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wiki-cards a {
  display: flex; flex-direction: column; height: 100%; overflow: hidden; color: var(--text); text-decoration: none;
  background: var(--wk-glass); border: 1px solid var(--wk-line); border-radius: 14px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.wiki-cards a:hover, .wiki-cards a:focus-visible { color: var(--text); transform: translateY(-3px); border-color: var(--wk-line-hi); box-shadow: var(--wk-lift); }
.wiki-card-pic { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; background: var(--wk-stage); border-bottom: 1px solid var(--wk-line); }
.wiki-card-pic::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.55); }
.wiki-card-pic img { width: 100%; height: 100%; object-fit: contain; padding: 8%; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.6)); transition: transform 0.4s; }
.wiki-cards a:hover .wiki-card-pic img { transform: scale(1.05); }
[data-kind='unit'] .wiki-card-pic img { padding: 0; object-fit: cover; object-position: 50% 18%; filter: none; }
[data-kind='holding'] .wiki-card-pic img { padding: 11%; }
[data-kind='science'] .wiki-card-pic img { width: 48%; height: auto; padding: 0; }
.wiki-card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 10px 12px 12px; }
.wiki-card-title { font: 700 16px/1.25 'Spectral SC', Georgia, serif; color: var(--gold_bright); overflow-wrap: anywhere; }
.wiki-card-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; font-size: 13px; line-height: 1.45; color: var(--text_muted); }
@media (min-width: 700px) {
  .wiki-cards { gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
  .wiki-card-body { gap: 6px; padding: 14px 16px 16px; }
  .wiki-card-title { font-size: 19px; }
  .wiki-card-text { font-size: 14px; -webkit-line-clamp: 4; line-clamp: 4; }
}
.wiki-cards.wiki-cards-small { gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); }
.wiki-cards-small .wiki-card-body { padding: 8px 10px 10px; }
.wiki-cards-small .wiki-card-title { font-size: 15px; }

/* An article: a glass panel (none on phones, so the text keeps the width) beside its section's list. */
.wiki-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) { .wiki-grid { grid-template-columns: minmax(0, 1fr) 290px; gap: 28px; } }
.wiki-article { min-width: 0; display: flow-root; }
@media (min-width: 700px) {
  .wiki-article { padding: 30px clamp(24px, 3vw, 44px) 36px; background: var(--wk-glass); border: 1px solid var(--wk-line); border-radius: 20px; box-shadow: var(--wk-shadow); }
}
.wiki-article-head { position: relative; margin: 0 0 24px; padding-bottom: 16px; }
.wiki-article-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, color-mix(in srgb, var(--gold_muted) 80%, transparent), color-mix(in srgb, var(--gold_muted) 30%, transparent) 70%, transparent); }
.wiki-article-head::before { content: ''; position: absolute; left: 0; bottom: -4px; z-index: 1; width: 8px; height: 8px; transform: rotate(45deg); background: var(--wk-diamond); box-shadow: 0 0 0 1px var(--bronze_lo); }
.wiki-kicker {
  display: inline-flex; align-items: center; gap: 8px; min-height: 30px; margin-bottom: 12px; padding: 3px 14px 3px 6px;
  font: 700 14px/1.2 'PT Sans', system-ui, sans-serif; color: var(--gold); text-decoration: none;
  background: rgba(217, 164, 65, 0.12); border: 1px solid var(--gold_muted); border-radius: 15px;
}
.wiki-kicker:hover { color: var(--gold_bright); border-color: var(--gold); }
.wiki-kicker img { width: 22px; height: 22px; flex: none; }
.wiki-article h1 { margin: 0; font-size: clamp(28px, 3.6vw, 42px); text-wrap: balance; }

/* The article's picture as an infobox: a lit stage in a gold-lined frame with diamonds, its title under it. */
.wiki-infobox {
  position: relative; width: min(300px, 86%); margin: 6px auto 28px;
  background: var(--wk-glass-deep); border: 1px solid var(--wk-line-hi); border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5), 0 14px 32px rgba(0, 0, 0, 0.6);
}
.wiki-infobox::before, .wiki-infobox::after {
  content: ''; position: absolute; left: 50%; z-index: 1; width: 12px; height: 12px; margin-left: -6px; transform: rotate(45deg);
  background: var(--wk-diamond); box-shadow: 0 0 0 1px var(--bronze_lo), 0 0 10px rgba(233, 196, 106, 0.45);
}
.wiki-infobox::before { top: -7px; }
.wiki-infobox::after { bottom: -7px; }
.wiki-infobox-pic {
  position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; margin: 8px 8px 0; overflow: hidden;
  background: var(--wk-stage); border: 1px solid var(--wk-line); border-radius: 12px; box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.55);
}
.wiki-infobox-pic img { width: 100%; height: 100%; object-fit: contain; padding: 7%; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.6)); }
.wiki-infobox[data-kind='unit'] .wiki-infobox-pic { aspect-ratio: 3 / 4; }
.wiki-infobox[data-kind='unit'] .wiki-infobox-pic img { padding: 0; object-fit: cover; object-position: 50% 20%; filter: none; }
.wiki-infobox[data-kind='science'] .wiki-infobox-pic { aspect-ratio: 16 / 11; }
.wiki-infobox[data-kind='science'] .wiki-infobox-pic img { width: 50%; height: auto; padding: 0; }
.wiki-infobox[data-kind='topic'] .wiki-infobox-pic { aspect-ratio: auto; }
.wiki-infobox[data-kind='topic'] .wiki-infobox-pic img { height: auto; padding: 0; filter: none; }
.wiki-infobox figcaption { padding: 10px 14px 14px; text-align: center; font: 700 18px/1.25 'Spectral SC', Georgia, serif; color: var(--gold_bright); }
@media (max-width: 699px) {
  .wiki-infobox[data-kind='unit'] { width: min(240px, 72%); }
  .wiki-infobox-pic { margin-bottom: 8px; }
  .wiki-infobox figcaption { display: none; }
}
@media (min-width: 700px) {
  .wiki-infobox { float: right; width: 280px; max-width: 44%; margin: 6px 0 22px 30px; }
  .wiki-infobox[data-kind='topic'] { width: 320px; }
}

/* The text: a gold drop cap, ribbon headings with a diamond, diamond bullets, gold bold words, quiet underlined links.
   Headings and the contents box are flow-root, so their lines stop at the infobox. */
.wiki-body { font-size: 17px; line-height: 1.65; }
@media (min-width: 700px) { .wiki-body { font-size: 18px; line-height: 1.7; } }
.wiki-body p { margin: 0 0 14px; text-wrap: pretty; }
.wiki-body > p:first-child::first-letter { float: left; margin: 0.08em 0.12em 0 0; font: 700 3.3em/0.8 'Spectral SC', Georgia, serif; color: var(--gold_bright); text-shadow: 0 2px 8px #000; }
.wiki-body > p:first-child + * { clear: left; }
.wiki-body h2 {
  display: flow-root; position: relative; margin: 32px 0 14px; padding: 0 0 9px 20px; font-size: clamp(21px, 2.4vw, 26px); text-shadow: 0 2px 8px #000;
  background: var(--wk-ribbon) 0 100% / 100% 2px no-repeat;
}
.wiki-body h2::before { content: ''; position: absolute; left: 2px; top: 0.42em; width: 8px; height: 8px; transform: rotate(45deg); background: var(--wk-diamond); box-shadow: 0 0 0 1px var(--bronze_lo); }
.wiki-body h2:target { animation: wiki-flash 1.8s ease-out; }
@keyframes wiki-flash { from { background-color: color-mix(in srgb, var(--gold) 30%, transparent); } }
.wiki-body ul { list-style: none; margin: 0 0 16px; padding: 0; }
.wiki-body ul > li { position: relative; margin: 0 0 8px; padding-left: 24px; }
.wiki-body ul > li::before {
  content: ''; position: absolute; left: 5px; top: calc(0.85em - 3.5px); width: 7px; height: 7px; transform: rotate(45deg);
  background: var(--wk-diamond); box-shadow: 0 0 0 1px var(--bronze_lo), 0 0 6px rgba(233, 196, 106, 0.35);
}
.wiki-body strong { color: var(--gold_bright); }
.wiki-body a { color: var(--gold_bright); text-decoration-line: underline; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--gold) 50%, transparent); text-underline-offset: 3px; }
.wiki-body a:hover { color: var(--text); text-decoration-color: var(--gold_bright); }
/* The small table of contents (from site.yaml wiki_contents_min headings), right before the first heading. */
.wiki-toc { display: flow-root; margin: 4px 0 22px; padding: 12px 18px 12px 16px; font-size: 16px; line-height: 1.5; background: rgba(217, 164, 65, 0.07); border-left: 2px solid var(--bronze); border-radius: 0 10px 10px 0; }
.wiki-toc .wiki-toc-title { margin: 0 0 6px; font: 700 15px/1.2 'Spectral SC', Georgia, serif; letter-spacing: 0.06em; color: var(--gold); }
.wiki-toc ol { list-style: none; margin: 0; padding: 0; }
.wiki-toc li { position: relative; padding: 2px 0 2px 18px; }
.wiki-toc li::before { content: ''; position: absolute; left: 2px; top: calc(2px + 0.75em - 3.5px); width: 5px; height: 5px; transform: rotate(45deg); border: 1px solid var(--gold); }
.wiki-toc a { color: var(--text); text-decoration-color: transparent; }
.wiki-toc a:hover { color: var(--gold_bright); text-decoration-color: var(--gold_muted); }

.wiki-see { clear: both; margin-top: 34px; }

/* The section's articles beside the article: an oak plaque of the section, rows with a gold mark on the current one;
   under the article on narrow screens, in two columns. */
.wiki-side { padding: 16px 14px 14px; font-size: 15px; background: var(--wk-glass); border: 1px solid var(--wk-line); border-radius: 18px; box-shadow: var(--wk-shadow); }
@media (min-width: 1000px) {
  .wiki-side { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--gold_muted) transparent; }
}
.wiki-side .wiki-cap { margin: 0 4px 10px; }
.wiki-side-head {
  display: flex; align-items: center; gap: 10px; min-height: 46px; margin-bottom: 10px; padding: 6px 8px 6px 10px;
  font: 700 18px/1.2 'Spectral SC', Georgia, serif; color: var(--text_on_oak); text-decoration: none; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  background: linear-gradient(180deg, var(--oak_top), var(--oak_bottom)); border: 1px solid var(--bronze_lo); border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -2px 0 rgba(0, 0, 0, 0.3), 0 3px 8px rgba(0, 0, 0, 0.45);
}
.wiki-side-head:hover { color: var(--gold_bright); filter: brightness(1.08); }
.wiki-side-head img { width: 30px; height: 30px; flex: none; }
.wiki-side-head > span:first-of-type { flex: 1; min-width: 0; }
.wiki-side ul { list-style: none; margin: 0; padding: 0; columns: 2 140px; column-gap: 12px; }
@media (min-width: 1000px) { .wiki-side ul { columns: auto; } }
.wiki-side li { break-inside: avoid; }
.wiki-side li > * { position: relative; display: block; padding: 5px 10px 5px 14px; border-radius: 8px; line-height: 1.35; color: var(--text_muted); text-decoration: none; }
.wiki-side li > a:hover { color: var(--gold_bright); background: rgba(246, 220, 174, 0.08); }
.wiki-side li > [aria-current] { color: var(--gold_bright); font-weight: 700; background: rgba(217, 164, 65, 0.16); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 55%, transparent); }
.wiki-side li > [aria-current]::before { content: ''; position: absolute; left: 5px; top: 7px; bottom: 7px; width: 3px; border-radius: 2px; background: linear-gradient(var(--gold_bright), var(--bronze)); }

/* The call to play under every wiki page: a parchment notice with a wax seal (kit parchment, wax_seal). */
.wiki-call {
  position: relative; max-width: 760px; margin: 56px auto 40px; padding: 40px clamp(18px, 4vw, 44px) 30px; text-align: center; color: var(--ink);
  background: radial-gradient(circle at 88% 12%, rgba(120, 70, 20, 0.16), transparent 16%), radial-gradient(circle at 10% 90%, rgba(120, 70, 20, 0.14), transparent 20%),
    radial-gradient(ellipse at 20% 10%, rgba(255, 255, 255, 0.35), transparent 55%), linear-gradient(180deg, var(--parch_top), var(--parch_bottom));
  border: 1px solid rgba(90, 52, 16, 0.6); border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 244, 220, 0.22), inset 0 0 36px rgba(110, 70, 20, 0.38), 0 12px 28px rgba(0, 0, 0, 0.5);
}
.wiki-call::before {
  content: ''; position: absolute; left: 50%; top: -21px; width: 42px; height: 42px; margin-left: -21px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--wax), var(--wax_dark) 70%);
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.18), inset 0 0 0 6px rgba(255, 180, 160, 0.16), 0 3px 8px rgba(0, 0, 0, 0.55);
}
.wiki-call::after { content: ''; position: absolute; left: 50%; top: -6px; width: 12px; height: 12px; margin-left: -6px; transform: rotate(45deg); border: 2px solid rgba(255, 200, 180, 0.45); }
.wiki-call h2 { margin: 4px 0 8px; font-size: clamp(24px, 3vw, 32px); color: var(--ink); text-shadow: 0 1px 0 rgba(255, 244, 220, 0.5); }
.wiki-call p { max-width: 520px; margin: 0 auto 20px; font-size: 17px; }
.wiki-call .btn { box-shadow: 0 0 0 1px var(--bronze_lo), 0 6px 18px rgba(90, 52, 16, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5); }

@media (prefers-reduced-motion: reduce) {
  .wiki-tile a, .wiki-tile a > img, .wiki-cards a, .wiki-card-pic img { transition: none; }
  .wiki-tile a:hover > img, .wiki-tile a:focus-visible > img, .wiki-cards a:hover, .wiki-cards a:focus-visible, .wiki-cards a:hover .wiki-card-pic img { transform: none; }
  .wiki-body h2:target { animation: none; }
}
