:root,:root.light{color-scheme:light;--my-bg:#efeef8;--my-surface:#fbfaff;--my-surface-raised:#ffffff;--my-surface-sunken:#e2e0f0;--my-border:#d3d0e6;--my-border-strong:#a9a5c6;--my-text:#23213a;--my-text-muted:#524f6e;--my-text-subtle:#625f7f;--my-accent:#5b45d6;--my-accent-hover:#6c57e6;--my-on-accent:#ffffff;--my-accent-text:#4935b8;--my-accent-soft:#e2dcff;--my-success:#1a6b40;--my-success-soft:#d9efe2;--my-warning:#805500;--my-warning-soft:#f6ebcf;--my-danger:#a8321f;--my-danger-soft:#f7dfd9;--my-focus:#4935b8;--my-glass:rgba(251, 250, 255, 0.86);--my-scrim:rgba(30, 28, 56, 0.4);}:root.dark{color-scheme:dark;--my-bg:#10111c;--my-surface:#191b2b;--my-surface-raised:#232640;--my-surface-sunken:#0b0c15;--my-border:#34385a;--my-border-strong:#565b85;--my-text:#ecebf7;--my-text-muted:#b7b6d0;--my-text-subtle:#9c9bbb;--my-accent:#9d8cff;--my-accent-hover:#b3a6ff;--my-on-accent:#14122a;--my-accent-text:#bcb1ff;--my-accent-soft:#2d2860;--my-success:#62d08f;--my-success-soft:#173427;--my-warning:#f0c75e;--my-warning-soft:#3a2f14;--my-danger:#f58a78;--my-danger-soft:#40201c;--my-focus:#bcb1ff;--my-glass:rgba(25, 27, 43, 0.82);--my-scrim:rgba(8, 9, 16, 0.55);}
/* The language docs: Mystic's palette (prepended when served) and a plain reading layout. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
body { margin: 0; background: var(--my-bg); color: var(--my-text); font: 16px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--my-accent-text); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--my-focus); outline-offset: 2px; border-radius: 3px; }
button, input { font: inherit; color: inherit; }

.bar { display: none; position: sticky; top: 0; z-index: 20; align-items: center; gap: .5rem; height: 3.25rem; padding: 0 .75rem; background: var(--my-glass); backdrop-filter: blur(10px); border-bottom: 1px solid var(--my-border); }
.bar .brand { flex: 1; font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; font-size: 1.1rem; color: var(--my-text); text-decoration: none; }
.iconbtn { background: var(--my-surface-raised); border: 1px solid var(--my-border); border-radius: 8px; min-height: 2.25rem; padding: .2rem .7rem; font-size: .85rem; cursor: pointer; }
.iconbtn:hover { border-color: var(--my-border-strong); }

.shell { display: flex; align-items: flex-start; max-width: 76rem; margin: 0 auto; }
#side { position: sticky; top: 0; flex: 0 0 18rem; height: 100vh; overflow-y: auto; padding: 1.25rem 1rem 1rem; border-right: 1px solid var(--my-border); }
#side .brand { display: block; font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; font-size: 1.35rem; color: var(--my-text); text-decoration: none; margin-bottom: .75rem; }
#side .brand small { display: block; font: .75rem/1.3 system-ui, sans-serif; color: var(--my-text-muted); }
.search { position: relative; margin-bottom: .75rem; }
.search input { width: 100%; padding: .45rem .6rem; background: var(--my-surface); border: 1px solid var(--my-border); border-radius: 8px; }
.search input::placeholder { color: var(--my-text-subtle); }
#results { list-style: none; margin: .4rem 0 0; padding: 0; }
#results a { display: block; padding: .4rem .5rem; border-radius: 6px; text-decoration: none; color: var(--my-text); font-size: .85rem; line-height: 1.35; }
#results a:hover, #results a.sel { background: var(--my-accent-soft); }
#results small { display: block; color: var(--my-text-muted); font-size: .75rem; }
#results li.none { padding: .4rem .5rem; color: var(--my-text-muted); font-size: .85rem; }
#side ul.pages { list-style: none; margin: 0; padding: 0; }
.pages > li > a { display: block; padding: .32rem .5rem; border-radius: 6px; color: var(--my-text); text-decoration: none; font-size: .93rem; }
.pages > li > a:hover { background: var(--my-surface-raised); }
.pages > li > a[aria-current] { background: var(--my-accent-soft); color: var(--my-accent-text); font-weight: 600; }
.pages ul { list-style: none; margin: .15rem 0 .4rem .6rem; padding: 0 0 0 .55rem; border-left: 1px solid var(--my-border); }
.pages ul a { display: block; padding: .12rem .35rem; color: var(--my-text-muted); text-decoration: none; font-size: .82rem; line-height: 1.4; }
.pages ul a:hover { color: var(--my-text); }
.sidefoot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--my-border); font-size: .85rem; }

main { flex: 1; min-width: 0; padding: 2rem 2.5rem 4rem; }
article { max-width: 46rem; margin: 0 auto; }
h1, h2, h3 { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; line-height: 1.25; }
h1 { font-size: 2.1rem; margin: 0 0 1rem; }
h2 { font-size: 1.45rem; margin: 2.4rem 0 .6rem; padding-top: .4rem; border-top: 1px solid var(--my-border); }
h3 { font-size: 1.12rem; margin: 1.6rem 0 .4rem; }
p, ul, ol { margin: .7rem 0; }
li { margin: .2rem 0; }
code { font: .88em/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--my-surface-raised); padding: .1em .35em; border-radius: 4px; overflow-wrap: anywhere; }
pre { margin: .8rem 0; padding: .7rem .9rem; background: var(--my-surface-sunken); border: 1px solid var(--my-border); border-radius: 8px; overflow-x: auto; }
pre code { display: block; width: max-content; min-width: 100%; background: none; padding: 0; font-size: .84rem; overflow-wrap: normal; white-space: pre; }
.tok-k { color: var(--my-accent-text); font-weight: 600; }
.tok-o { color: var(--my-success); font-weight: 600; }
.tok-n { color: var(--my-warning); }
.tok-s { color: var(--my-warning); }
.tok-v { color: var(--my-accent-text); }
.tok-c { color: var(--my-text-subtle); font-style: italic; }
.tok-e { color: var(--my-danger); font-weight: 600; }
.tok-w { color: var(--my-success); font-weight: 600; }
.tok-call { color: var(--my-accent-text); font-weight: 600; }
.tok-state { color: var(--my-text-muted); }
.tbl { overflow-x: auto; margin: .8rem 0; border: 1px solid var(--my-border); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: .4rem .6rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--my-border); }
th { background: var(--my-surface-raised); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td code { overflow-wrap: normal; }
blockquote { margin: .9rem 0; padding: .5rem .9rem; background: var(--my-warning-soft); border-left: 3px solid var(--my-warning); border-radius: 0 8px 8px 0; }
blockquote p { margin: .2rem 0; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--my-border); font-size: .92rem; }
.pager a { text-decoration: none; }

@media (max-width: 860px) {
  .bar { display: flex; }
  .shell { display: block; }
  html.js #side { display: none; }
  html.js #side.open { display: block; position: fixed; inset: 3.25rem 0 0 0; height: auto; z-index: 15; background: var(--my-bg); border-right: 0; }
  #side > .brand, .sidefoot [data-theme] { display: none; }
  main { padding: 1.25rem 1rem 3rem; }
  h1 { font-size: 1.75rem; }
}

/* The game wiki on top of the docs layout: fact tables, entry lists and the search. */
.wiki .pages > li > a { display: flex; justify-content: space-between; align-items: baseline; }
.wiki .pages small { color: var(--my-text-subtle); font-size: .78rem; }
.wiki table.facts th { display: none; }
.wiki table.facts td:first-child { white-space: nowrap; color: var(--my-text-muted); width: 11rem; }
.wiki .tbl:has(table.facts) { border: 0; border-radius: 0; margin: .4rem 0 .8rem; }
.wiki table.facts td { border-bottom: 1px solid var(--my-border); padding: .3rem .4rem .3rem 0; }
.wiki ul.entries { list-style: none; margin: .5rem 0; padding: 0; columns: 2; column-gap: 2rem; }
.wiki ul.entries li { break-inside: avoid; margin: .15rem 0; }
.wiki ul.entries code { font-size: .75em; color: var(--my-text-subtle); background: none; padding: 0; }
.wiki ul.entries li[hidden] { display: none; }
.wiki blockquote { background: var(--my-surface-raised); border-left-color: var(--my-accent); }
.wiki h1.home + p { font-size: 1.05rem; }
@media (max-width: 860px) {
  .wiki table.facts td:first-child { width: 8rem; white-space: normal; }
  .wiki ul.entries { columns: 1; }
}
