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

:root {
  color-scheme: dark;
  --bg: #101312;
  --panel: #171c1a;
  --surface: #1e2420;
  --line: #353d34;
  --line-gold: #665638;
  --gold: #e7bd78;
  --gold-muted: #bc9a67;
  --text: #eee9dd;
  --muted: #b7bdb3;
  --serif: Cinzel, Georgia, serif;
  --sans: Inter, system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  min-width: 0;
  color: var(--text);
  background: var(--bg);
  font: 400 1rem/1.65 var(--sans);
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
::selection { color: var(--bg); background: var(--gold); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.2; }
.shell { width: min(100% - 3rem, 78rem); margin-inline: auto; }
.skip-link { position: fixed; inset: .7rem auto auto .8rem; z-index: 5; padding: .6rem 1rem; background: var(--gold); color: var(--bg); transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.site-head { background: #131715; border-bottom: 1px solid var(--line); }
.head-row { min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; line-height: 1.25; }
.brand img { width: 36px; height: 36px; }
.brand strong { display: block; font: 700 1.02rem var(--serif); letter-spacing: .04em; }
.brand small { color: var(--gold-muted); font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; }
.head-links { display: flex; align-items: center; gap: 1.15rem; }
.head-links > a { font-size: .82rem; color: var(--muted); }
.head-links > a:hover, .foot a:hover { color: var(--gold); }
.languages { display: inline-flex; border: 1px solid var(--line); border-radius: .45rem; padding: .16rem; }
.languages a { display: grid; place-items: center; min-width: 2.35rem; min-height: 2rem; border-radius: .25rem; color: var(--muted); font-size: .73rem; font-weight: 700; }
.languages a[aria-current="true"] { background: #302920; color: var(--gold); }
.languages a:hover { color: var(--gold); }
.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 24rem;
  isolation: isolate;
  overflow: hidden;
  margin-top: 1.7rem;
  border: 1px solid var(--line-gold);
  border-radius: .85rem;
  background: #202520;
}
.hero-image, .hero::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-image { object-fit: cover; object-position: 68% 48%; z-index: -2; }
.hero::after {
  content: "";
  z-index: -1;
  background: linear-gradient(90deg, #101512 1%, #101512f5 24%, #101512d4 44%, #10151228 77%), linear-gradient(0deg, #111611bd, transparent 52%);
}
.hero-copy { width: min(100%, 40rem); padding: clamp(1.4rem, 4vw, 3.6rem); }
.kicker { color: var(--gold); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.hero h1 { font: 700 clamp(2rem, 5.2vw, 4rem)/1.08 var(--serif); margin-block: .6rem 1rem; text-wrap: balance; }
.hero p { max-width: 35ch; color: #e0ded2; font-size: clamp(.95rem, 1.4vw, 1.12rem); }
.hero-mark { position: absolute; right: 1.4rem; bottom: 1.3rem; color: #f1d09b; letter-spacing: .14em; font-size: .68rem; }
.hero-mark::before { content: ""; display: inline-block; width: 1.5rem; margin-inline-end: .55rem; vertical-align: middle; border-top: 1px solid currentColor; }
.search { display: flex; align-items: center; gap: .7rem; margin-top: 1.4rem; min-height: 3.3rem; padding: .3rem .65rem .3rem .9rem; background: #101512ed; border: 1px solid #88704b; border-radius: .55rem; max-width: 27rem; }
.search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 2px #e7bd7838; }
.search svg { width: 1.1rem; height: 1.1rem; flex: none; color: var(--gold); }
.search input { min-width: 0; flex: 1; border: 0; outline: 0; padding: .5rem 0; background: none; font-size: .92rem; }
.search input::placeholder { color: #b9b9aa; }
.search input::-webkit-search-cancel-button { display: none; }
.clear-search { display: grid; place-items: center; min-width: 2.4rem; min-height: 2.4rem; border: 0; border-radius: .25rem; background: var(--surface); }
.clear-search:hover { color: var(--gold); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.wiki-layout { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 2.2rem; align-items: start; margin-block: 2.6rem 3.5rem; }
.sidebar { position: sticky; top: 1.5rem; }
.side-title { display: block; color: var(--muted); font-size: .71rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; margin: 0 0 .7rem .7rem; }
.side-links { list-style: none; margin: 0; padding: 0; }
.side-links li + li { margin-top: .2rem; }
.side-links a { display: flex; align-items: center; gap: .68rem; min-height: 2.65rem; padding: .38rem .7rem; border-radius: .35rem; color: var(--muted); font-size: .88rem; }
.side-links a:hover { color: var(--gold); background: var(--panel); }
.side-links a:focus-visible { outline-offset: 1px; }
.side-links svg { width: 1.05rem; height: 1.05rem; flex: none; color: var(--gold-muted); }
.side-links .chapter-number { color: var(--gold-muted); font-size: .7rem; font-variant-numeric: tabular-nums; }
.field-art { margin-top: 1.45rem; border-radius: .55rem; overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.field-art img { aspect-ratio: 1.85; object-fit: cover; width: 100%; }
.field-art figcaption { padding: .6rem .72rem; color: var(--muted); font-size: .73rem; }
.library-head { display: flex; gap: .6rem 1rem; align-items: baseline; justify-content: space-between; flex-wrap: wrap; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.library-head h2, .chapter-heading h3 { font-family: var(--serif); font-weight: 700; }
.library-head h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
.library-head p { color: var(--muted); font-size: .83rem; }
.filter { display: flex; flex-wrap: wrap; gap: .4rem; margin-block: 1.1rem .3rem; }
.filter button { min-height: 2.55rem; padding: .34rem .8rem; border: 1px solid var(--line); border-radius: .32rem; background: var(--panel); color: var(--muted); font-size: .8rem; font-weight: 600; }
.filter button:hover { border-color: var(--line-gold); color: var(--gold); }
.filter button[aria-pressed="true"] { color: var(--gold); border-color: var(--line-gold); background: #312a20; }
.chapter { margin-top: 1.85rem; scroll-margin-top: 1rem; }
.chapter-heading { display: flex; align-items: center; gap: .7rem; margin-bottom: .76rem; }
.chapter-heading .number { color: var(--gold-muted); font-size: .72rem; letter-spacing: .08em; }
.chapter-heading h3 { font-size: 1.18rem; }
.chapter-heading::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.guide-card { min-width: 0; }
.guide-card > a {
  display: grid;
  grid-template-columns: 2.8rem minmax(0, 1fr) auto;
  gap: .78rem;
  align-items: start;
  padding: 1.05rem;
  height: 100%;
  min-height: 7.25rem;
  border: 1px solid var(--line);
  border-radius: .58rem;
  background: var(--panel);
  transition: background .18s ease, border-color .18s ease;
}
.guide-card > a:hover { background: #222820; border-color: var(--line-gold); }
.tile { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; background: #2a2a20; border: 1px solid #494331; border-radius: .36rem; color: var(--gold); }
.tile svg { width: 1.35rem; height: 1.35rem; }
.tile img { width: 1.85rem; height: 1.85rem; object-fit: contain; }
.guide-card h4 { margin: 0; font: 700 1.04rem/1.28 var(--serif); color: var(--text); }
.guide-card p { margin-top: .32rem; font-size: .84rem; color: var(--muted); line-height: 1.55; }
.arrow { color: var(--gold); font-size: .95rem; align-self: center; }
.no-results { padding: 2.15rem 1.15rem; margin-top: 1.25rem; background: var(--panel); border: 1px dashed var(--line-gold); border-radius: .55rem; color: var(--muted); text-align: center; }
.no-results button { display: block; margin: .85rem auto 0; background: #312a20; border: 1px solid var(--line-gold); color: var(--gold); border-radius: .3rem; padding: .5rem .8rem; }
.foot { border-top: 1px solid var(--line); color: var(--muted); padding-block: 1.25rem; font-size: .79rem; }
.foot .shell { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .7rem 1.5rem; }
.foot nav { display: flex; gap: 1.2rem; }

.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; color: var(--muted); font-size: .8rem; margin-block: 1.5rem .95rem; }
.crumbs a { color: var(--gold); }
.crumbs a:hover { text-decoration: underline; }
.article-hero { min-height: 15.2rem; margin-top: 0; }
.article-hero .hero-copy { width: min(100%, 51rem); padding-block: clamp(1.35rem, 3vw, 2.8rem); }
.article-kicker { display: flex; align-items: center; gap: .65rem; }
.article-kicker .tile { width: 2rem; height: 2rem; }
.article-kicker .tile img { width: 1.4rem; height: 1.4rem; }
.article-hero h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
.article-hero p { max-width: 48ch; }
.article-page .wiki-layout { margin-top: 2rem; }
.article-body { max-width: 53rem; min-width: 0; }
.article-body section { scroll-margin-top: 1.2rem; }
.article-body section + section { border-top: 1px solid var(--line); margin-top: 1.7rem; padding-top: 1.6rem; }
.article-body h2 { font: 700 clamp(1.27rem, 2.7vw, 1.7rem)/1.25 var(--serif); color: var(--gold); margin-bottom: .65rem; }
.article-body p + p { margin-top: .65rem; }
.article-body ul { margin: .6rem 0 .15rem; padding-inline-start: 1.25rem; }
.article-body li + li { margin-top: .35rem; }
.article-body li::marker { color: var(--gold-muted); }
.table-wrap { margin-top: .95rem; overflow-x: auto; border: 1px solid var(--line); border-radius: .48rem; background: var(--panel); }
.article-body table { border-collapse: collapse; width: 100%; line-height: 1.48; font-size: .88rem; }
.article-body th, .article-body td { text-align: left; padding: .68rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.article-body th { font-weight: 700; color: var(--gold); background: #282820; }
.article-body tr:last-child td { border-bottom: 0; }
.related { margin-top: 2.2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.related h2 { font: 700 1.15rem var(--serif); margin-bottom: .7rem; }
.related a { display: inline-block; border: 1px solid var(--line); color: var(--gold); background: var(--panel); border-radius: .35rem; padding: .45rem .8rem; margin: 0 .3rem .3rem 0; font-size: .83rem; }
.related a:hover { border-color: var(--line-gold); }

@media (max-width: 970px) {
  .wiki-layout { grid-template-columns: 11.5rem minmax(0, 1fr); gap: 1.45rem; }
  .guide-card > a { grid-template-columns: 2.5rem minmax(0, 1fr); padding: .85rem; gap: .62rem; }
  .guide-card .arrow { display: none; }
  .tile { width: 2.5rem; height: 2.5rem; }
}
@media (max-width: 735px) {
  .shell { width: calc(100% - 1.75rem); }
  .head-row { min-height: 3.85rem; }
  .head-links { gap: .65rem; }
  .hero { margin-top: .9rem; min-height: 19.5rem; }
  .hero::after { background: linear-gradient(90deg, #101512f5, #101512be 65%, #10151261), linear-gradient(0deg, #101512a1, transparent 60%); }
  .hero-mark { display: none; }
  .wiki-layout { grid-template-columns: minmax(0, 1fr); margin-block: 1.5rem 2.6rem; gap: 1.35rem; }
  .sidebar { position: static; }
  .side-title { margin-left: 0; }
  .side-links { display: flex; flex-wrap: wrap; gap: .35rem; }
  .side-links li + li { margin: 0; }
  .side-links a { border: 1px solid var(--line); background: var(--panel); font-size: .78rem; min-height: 2.75rem; gap: .42rem; }
  .field-art { display: none; }
  .article-hero { min-height: 13.4rem; }
  .article-page .wiki-layout { margin-top: 1.3rem; }
  .article-page .sidebar { padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
}
@media (max-width: 510px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .guide-card > a { min-height: auto; grid-template-columns: 2.5rem minmax(0, 1fr) auto; }
  .guide-card .arrow { display: inline; }
  .head-links > a { display: none; }
  .languages a { min-height: 2.5rem; min-width: 2.7rem; }
  .hero h1 { font-size: clamp(1.7rem, 8.4vw, 2.3rem); }
  .article-hero h1 { font-size: clamp(1.58rem, 7vw, 2.15rem); }
  .hero p { max-width: 31ch; }
  .article-hero p { max-width: 38ch; }
}
@media (prefers-reduced-motion: reduce) {
  .guide-card > a { transition: none; }
}
