:root {
  --concrete: #2d3134;
  --bunker: #1b1e21;
  --plaster: #e6dfcf;
  --plaster-dim: #b3ad9f;
  --oxblood: #8c1c1c;
  --flare: #d5614f;      /* oxblood lifted for text on concrete */
  --brass: #b98b3e;
  --verdigris: #5e8b7e;
  --rule: rgba(230, 223, 207, .16);
  --display: "Big Shoulders Stencil Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Spectral", Georgia, "Times New Roman", serif;
  --rail: 15rem;
  --measure: 40rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--concrete);
  /* poured-concrete grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--plaster);
  font: 400 1.125rem/1.65 var(--body);
  overflow-x: hidden;
}
a { color: inherit; text-decoration-color: var(--flare); text-underline-offset: .18em; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
[data-lang="de"] .en, [data-lang="en"] .de { display: none; }
.skip { position: absolute; left: -999px; top: 0; background: var(--plaster); color: var(--bunker); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }

/* ---------- masthead ---------- */
.mast { background: var(--bunker); border-bottom: 6px solid var(--oxblood); position: sticky; top: 0; z-index: 30; }
.mast .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 3.5rem; }
.mark { white-space: nowrap; font-family: var(--display); font-weight: 800; font-size: clamp(1.15rem, 4.5vw, 1.5rem); text-decoration: none; letter-spacing: .02em; }
.mast nav { display: flex; gap: 1.4rem; margin-left: auto; font-size: 1rem; }
.mast nav a { text-decoration: none; color: var(--plaster-dim); }
.mast nav a:hover { color: var(--plaster); text-decoration: underline; text-decoration-color: var(--flare); }
.mast .support { flex: none; background: var(--oxblood); color: var(--plaster); font-weight: 600; font-size: .95rem; padding: .35rem .8rem; text-decoration: none; white-space: nowrap; }
.mast .support:hover { background: var(--flare); }
.mast .support .short { display: none; }
.lang { display: flex; border: 1px solid var(--rule); }
.lang button { background: none; border: 0; color: var(--plaster-dim); font: 600 .9rem var(--body); padding: .3rem .6rem; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--plaster); color: var(--bunker); }

/* ---------- hero: the decoding title ---------- */
.hero { padding: 5.5rem 0 4.5rem; border-bottom: 1px solid var(--rule); }
.hero h1 {
  font-family: var(--display); font-weight: 900; margin: 0;
  font-size: clamp(3.4rem, 12.5vw, 10.5rem); line-height: .82; letter-spacing: -.01em;
  text-transform: none; color: var(--plaster);
}
.hero h1 .line { display: block; white-space: nowrap; overflow: hidden; }
.hero h1 .line + .line { color: var(--oxblood); -webkit-text-stroke: 2px var(--plaster); paint-order: stroke fill; }
.hero h1 .c { display: inline-block; min-width: .2em; }
.hero h1 .c.scr { color: var(--brass); -webkit-text-stroke: 0; }
.hero .intro { max-width: var(--measure); margin: 2.2rem 0 0; font-size: 1.3rem; line-height: 1.55; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.btn {
  display: inline-block; font: 600 1.05rem var(--body); text-decoration: none; padding: .7rem 1.3rem;
  border: 2px solid var(--plaster);
}
.btn.solid { background: var(--plaster); color: var(--bunker); }
.btn.solid:hover { background: #fff; color: var(--bunker); }
.btn:not(.solid):hover { background: rgba(230,223,207,.1); }
.hero .tally { margin-top: 2.2rem; color: var(--plaster-dim); font-size: 1rem; max-width: var(--measure); }
.hero .tally b { font-weight: 600; }
.tally .s-done { color: var(--verdigris); } .tally .s-wip { color: var(--brass); } .tally .s-open { color: var(--flare); }

/* ---------- file sections: margin rail + content ---------- */
.file { padding: 4.5rem 0; border-bottom: 1px solid var(--rule); }
.file > .wrap { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: 2.5rem; }
.rail h2 {
  font-family: var(--display); font-weight: 800; font-size: clamp(2.1rem, 4vw, 3rem); line-height: .95;
  margin: 0;
}
.rail p { color: var(--plaster-dim); font-size: 1rem; margin: .8rem 0 0; }
.rail { position: sticky; top: 5rem; align-self: start; }
.body > p { max-width: var(--measure); margin: 0 0 1.1rem; }
.body > p.big { font-size: 1.3rem; line-height: 1.5; }

/* ---------- glossary hints ---------- */
.t {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: help;
  text-decoration: underline dotted var(--brass); text-decoration-thickness: 2px; text-underline-offset: .2em;
}
.t:hover, .t[aria-expanded="true"] { color: #fff; text-decoration-style: solid; }
#tip {
  position: fixed; z-index: 60; max-width: min(22rem, calc(100vw - 2rem));
  background: var(--plaster); color: var(--bunker); padding: .75rem .95rem .8rem;
  border-left: 6px solid var(--brass); box-shadow: 0 10px 28px rgba(0,0,0,.45);
  font-size: 1rem; line-height: 1.45; pointer-events: none; opacity: 0; transform: translateY(4px);
  transition: opacity .12s, transform .12s;
}
#tip.on { opacity: 1; transform: none; }
#tip strong { display: block; font-family: var(--display); font-weight: 800; font-size: 1.35rem; line-height: 1; margin-bottom: .3rem; }
.hint { font-size: 1rem; color: var(--plaster-dim); border-left: 3px solid var(--brass); padding-left: .8rem; max-width: var(--measure); }

/* ---------- roadmap register ---------- */
.filter { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--rule); margin-bottom: 2rem; }
.filter button {
  background: none; border: 0; color: var(--plaster-dim); font: 600 1rem var(--body);
  padding: .5rem 1rem; cursor: pointer;
}
.filter button + button { border-left: 1px solid var(--rule); }
.filter button[aria-pressed="true"] { background: var(--plaster); color: var(--bunker); }
.group { margin-bottom: 2.6rem; }
.group > h3 {
  font-family: var(--display); font-weight: 800; font-size: 1.9rem; margin: 0 0 .2rem; line-height: 1;
  display: flex; align-items: baseline; gap: .6rem;
}
.group > h3 .n { font-family: var(--body); font-weight: 400; font-size: 1.05rem; color: var(--plaster-dim); }
.group.done > h3 { color: var(--verdigris); }
.group.wip > h3 { color: var(--brass); }
.group.open > h3 { color: var(--flare); }
.group > p { margin: 0 0 1rem; color: var(--plaster-dim); font-size: 1rem; }
.entries { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--plaster); }
.entry { border-bottom: 1px solid var(--rule); padding: 1.1rem 0 1.15rem; display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1.2rem; }
.stamp {
  align-self: start; justify-self: start; font-family: var(--display); font-weight: 900; font-size: 1.05rem;
  letter-spacing: .04em; padding: .1rem .5rem; border: 2px solid; transform: rotate(-4deg); margin-top: .25rem;
}
.done .stamp { color: var(--verdigris); } .wip .stamp { color: var(--brass); } .open .stamp { color: var(--flare); }
.entry h4 { margin: 0; font-size: 1.2rem; font-weight: 600; line-height: 1.35; }
.entry .games { font-size: .95rem; color: var(--plaster-dim); font-style: italic; }
.entry .plain { margin: .35rem 0 0; max-width: var(--measure); }
.entry details { margin-top: .5rem; max-width: var(--measure); }
.entry summary { cursor: pointer; color: var(--plaster-dim); font-size: .98rem; width: fit-content; }
.entry summary:hover { color: var(--plaster); }
.entry details[open] summary { color: var(--plaster); }
.entry details p { margin: .45rem 0 0; font-size: 1rem; color: var(--plaster-dim); }
.entry details p a { color: var(--plaster); }

/* ---------- studio: a typed dossier page ---------- */
.dossier {
  background: var(--plaster); color: var(--bunker); padding: 2.2rem 2.4rem 2.3rem; position: relative;
  box-shadow: 0 18px 40px rgba(0,0,0,.4); max-width: 46rem;
}
.dossier .soon {
  position: absolute; top: 1.4rem; right: 1.4rem; font-family: var(--display); font-weight: 900; font-size: 1.5rem;
  color: var(--oxblood); border: 3px solid var(--oxblood); padding: .05rem .6rem; transform: rotate(6deg);
}
.dossier h3 { font-family: var(--display); font-weight: 900; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: .95; margin: 0 0 1rem; max-width: 12ch; }
.dossier p { margin: 0 0 1rem; }
.dossier ul { margin: 1.2rem 0 1.2rem; padding: 0; list-style: none; }
.dossier li { padding: .55rem 0 .55rem 1.3rem; border-top: 1px solid rgba(27,30,33,.18); position: relative; }
.dossier li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: .55rem; height: .55rem; background: var(--oxblood); }
.dossier li b { font-weight: 600; }
.dossier .note { font-style: italic; color: #55504a; margin: 0; }
.dossier .t { text-decoration-color: var(--oxblood); }
.dossier .t:hover { color: var(--oxblood); }

/* ---------- games ---------- */
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 2rem; }
.game h3 { font-family: var(--display); font-weight: 800; font-size: 2rem; line-height: 1; margin: 0; }
.game .eng { color: var(--brass); margin: .3rem 0 .6rem; font-style: italic; }
.game p { margin: 0; }

/* ---------- evidence ---------- */
.levels { display: grid; gap: 1.2rem; max-width: 44rem; }
.level { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1rem; align-items: baseline; }
.level b { font-family: var(--display); font-weight: 900; font-size: 1.6rem; line-height: 1; }
.level.m b { color: var(--verdigris); } .level.i b { color: var(--brass); } .level.h b { color: var(--flare); }
.level p { margin: 0; }

/* ---------- glossary ---------- */
.gloss { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: .2rem 2.4rem; margin: 0; }
.gloss div { padding: .75rem 0; border-top: 1px solid var(--rule); scroll-margin-top: 5rem; }
.gloss dt { font-family: var(--display); font-weight: 800; font-size: 1.45rem; line-height: 1.05; }
.gloss dd { margin: .2rem 0 0; color: var(--plaster-dim); font-size: 1.02rem; }
.gloss div:target dt { color: var(--brass); }

/* ---------- start here ---------- */
.reads { list-style: none; padding: 0; margin: 0; max-width: 46rem; }
.reads li { border-top: 1px solid var(--rule); }
.reads a { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 1rem; padding: .85rem 0; text-decoration: none; }
.reads a b { font-weight: 600; text-decoration: underline; text-decoration-color: var(--flare); text-underline-offset: .18em; }
.reads a span { color: var(--plaster-dim); }
.reads a:hover span { color: var(--plaster); }

footer { background: var(--bunker); padding: 2.5rem 0 3rem; color: var(--plaster-dim); font-size: 1rem; }
footer p { max-width: 46rem; margin: 0 0 .8rem; }

@media (max-width: 860px) {
  .file > .wrap { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
  .rail { position: static; }
  .mast nav { display: none; }
  .mast .support { margin-left: auto; padding: .3rem .6rem; }
  .mast .support .long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }  /* hidden on screen, still the link name for screen readers */
  .mast .support .short { display: inline; }
}
@media (max-width: 560px) {
  .hero { padding: 3.5rem 0 3rem; }
  .entry { grid-template-columns: minmax(0, 1fr); gap: .4rem; }
  .level { grid-template-columns: 1fr; gap: .2rem; }
  .reads a { grid-template-columns: 1fr; gap: .1rem; }
  .dossier { padding: 1.6rem 1.3rem; }
  .dossier .soon { position: static; display: inline-block; margin-bottom: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #tip { transition: none; }
}

/* =================== wiki pages =================== */
.pagehead { padding: 3.2rem 0 2.4rem; border-bottom: 1px solid var(--rule); }
.pagehead h1 {
  font-family: var(--display); font-weight: 900; margin: .2rem 0 .8rem;
  font-size: clamp(2.4rem, 6.5vw, 4.6rem); line-height: .92; max-width: 22ch; overflow-wrap: anywhere;
}
.pagehead h1 code { font-family: inherit; }
.pagehead .intro { max-width: var(--measure); font-size: 1.25rem; margin: 0; }
.crumbs { margin: 0; color: var(--plaster-dim); font-size: 1rem; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin: 0; font-size: 1rem; color: var(--plaster-dim); }
.meta .stamp { margin-top: 0; }
.stamp.s-solved { color: var(--verdigris); } .stamp.s-partial { color: var(--brass); }
.stamp.s-open { color: var(--flare); } .stamp.s-reference { color: var(--plaster-dim); }

.docgrid { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: 2.5rem; padding-top: 2.5rem; padding-bottom: 3rem; }
.toc h2 { font-family: var(--display); font-weight: 800; font-size: 1.35rem; margin: 0 0 .5rem; }
.toc { position: sticky; top: 5rem; align-self: start; max-height: calc(100vh - 6rem); overflow: auto; font-size: .95rem; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { border-top: 1px solid var(--rule); }
.toc a { display: block; padding: .35rem 0; text-decoration: none; color: var(--plaster-dim); }
.toc a:hover { color: var(--plaster); }

.plainbox { background: var(--plaster); color: var(--bunker); padding: 1.6rem 1.9rem 1.5rem; margin-bottom: 3rem; max-width: 46rem; border-top: 8px solid var(--oxblood); }
.plainbox h2 { font-family: var(--display); font-weight: 900; font-size: 2rem; margin: 0 0 .6rem; line-height: 1; }
.plainbox .lede { font-size: 1.2rem; line-height: 1.5; margin: 0 0 .9rem; }
.plainbox ul { margin: 0; padding-left: 1.2rem; }
.plainbox li { margin: .3rem 0; }
.plainbox li::marker { color: var(--oxblood); }
.plainbox .t { text-decoration-color: var(--oxblood); }
.plainbox .t:hover, .plainbox .t[aria-expanded="true"] { color: var(--oxblood); }

.techhead { font-family: var(--display); font-weight: 900; font-size: 2rem; margin: 0 0 .4rem; line-height: 1; }
.langnote { color: var(--plaster-dim); font-size: 1rem; font-style: italic; margin: 0 0 1rem; }

/* rendered Markdown */
.doc { max-width: 48rem; font-size: 1.05rem; }
.doc > :first-child { margin-top: 0; }
.doc h2 { font-family: var(--display); font-weight: 800; font-size: 2rem; line-height: 1; margin: 2.6rem 0 .8rem; padding-top: .6rem; border-top: 2px solid var(--plaster); scroll-margin-top: 5rem; }
.doc h3 { font-size: 1.25rem; font-weight: 600; margin: 1.9rem 0 .5rem; scroll-margin-top: 5rem; }
.doc h4 { font-size: 1.1rem; font-weight: 600; margin: 1.4rem 0 .4rem; }
.doc p, .doc ul, .doc ol { margin: 0 0 1rem; }
.doc li { margin: .2rem 0; }
.doc hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
.doc code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .88em; background: var(--bunker); padding: .08em .3em; overflow-wrap: anywhere; }
.doc pre { background: var(--bunker); padding: 1rem 1.1rem; overflow-x: auto; border-left: 4px solid var(--steel, #45484c); line-height: 1.45; margin: 0 0 1.2rem; }
.doc pre code { background: none; padding: 0; font-size: .86rem; overflow-wrap: normal; }
.doc blockquote { margin: 0 0 1.2rem; padding: .2rem 0 .2rem 1rem; border-left: 4px solid var(--brass); color: var(--plaster); }
.doc blockquote.alert { background: rgba(185,139,62,.08); padding: .8rem 1rem; }
.doc blockquote.warning, .doc blockquote.caution { border-color: var(--flare); background: rgba(213,97,79,.08); }
.doc .table-wrap { overflow-x: auto; margin: 0 0 1.3rem; }
.doc.catalog table { min-width: 42rem; }  /* phones scroll the cvar tables sideways instead of crushing columns */
.doc.catalog td:first-child code { overflow-wrap: normal; }  /* breaks only at the <wbr> the builder adds */
.doc.catalog td:nth-child(2), .doc.catalog td:nth-child(4) { white-space: nowrap; }  /* type, status */
.doc table { border-collapse: collapse; font-size: .95rem; min-width: 60%; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: .45rem .7rem; border-bottom: 1px solid var(--rule); }
.doc th { border-bottom: 2px solid var(--plaster); font-weight: 600; }
.doc strong { font-weight: 600; color: #fff; }
.doc del { color: var(--plaster-dim); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3rem; max-width: 48rem; }
.pager a { display: block; text-decoration: none; border-top: 2px solid var(--plaster); padding-top: .6rem; }
.pager a small { display: block; color: var(--plaster-dim); font-size: .9rem; }
.pager .next { grid-column: 2; text-align: right; }

/* wiki index */
.search { display: flex; flex-direction: column; gap: .4rem; margin-top: 1.6rem; max-width: 28rem; font-size: 1rem; color: var(--plaster-dim); }
.search input { font: 400 1.1rem var(--body); padding: .6rem .8rem; background: var(--bunker); color: var(--plaster); border: 1px solid var(--rule); }
.cat { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: 2.5rem; padding: 2.6rem 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 4rem; }
.cathead h2 { font-family: var(--display); font-weight: 800; font-size: 2rem; line-height: .95; margin: 0 0 .5rem; }
.cathead p { margin: 0; color: var(--plaster-dim); font-size: 1rem; }
.cathead .count { color: var(--brass); }
.pages { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--plaster); }
.pages li { border-bottom: 1px solid var(--rule); padding: .8rem 0; }
.pages li > a { font-weight: 600; font-size: 1.12rem; }
.pages li .stamp { margin-left: .7rem; font-size: .85rem; transform: rotate(-3deg); display: inline-block; vertical-align: .1em; }
.pages li p { margin: .25rem 0 0; color: var(--plaster-dim); max-width: var(--measure); }
.nohits { padding: 2rem 0; color: var(--plaster-dim); }
.gloss.wide { padding: 2.5rem 0 3rem; }

@media (max-width: 860px) {
  .docgrid, .cat { grid-template-columns: 1fr; gap: 1.2rem; }
  .toc { position: static; max-height: none; }
  .toc ol { columns: 2; column-gap: 1.5rem; }
}
@media (max-width: 560px) {
  .plainbox { padding: 1.3rem 1.1rem; }
  .toc ol { columns: 1; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; text-align: left; }
}
.docgrid > *, .cat > *, .file > .wrap > * { min-width: 0; }
@media (max-width: 860px) { .docgrid, .cat { grid-template-columns: minmax(0, 1fr); } }
.doc p, .doc li, .doc td, .doc blockquote { overflow-wrap: anywhere; }
.subhead { font-family: var(--display); font-weight: 800; font-size: 1.6rem; margin: 0 0 .6rem; }
.plainbox .update { background: var(--bunker); color: var(--plaster); margin: -.2rem 0 1.1rem; padding: .7rem .9rem; border-left: 6px solid var(--verdigris); font-size: 1rem; }
.plainbox .update b { color: var(--verdigris); margin-right: .3rem; }
.proof { margin: .9rem 0 .2rem; max-width: min(100%, var(--measure)); min-width: 0; contain: inline-size; }
.proof img { display: block; width: 100%; max-width: 100%; height: auto; border: 1px solid var(--rule); }
.proof figcaption { font-size: .92rem; color: var(--plaster-dim); font-style: italic; margin-top: .35rem; }

.entry > *, .body, .games > * { min-width: 0; }
.discord { display: block; max-width: 100%; border: 0; }
