/* MathRPG: Army of Truth - Platonist Playground. The demo site's only style sheet: system fonts, no requests. */
:root {
  --bg: #f7f5f0;
  --fg: #1d1b18;
  --muted: #5d5850;
  --line: #d9d3c7;
  --panel: #efebe2;
  --accent: #8a4b14;
  --accent-fg: #ffffff;
  --link: #1f5a99;
  --code: #ece6da;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --fg: #e8e4dc;
    --muted: #a8a196;
    --line: #34373c;
    --panel: #1e2125;
    --accent: #e0a15a;
    --accent-fg: #15171a;
    --link: #8cb8ec;
    --code: #262a2f;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, sans-serif;
  overflow-wrap: break-word;
}
a { color: var(--link); text-underline-offset: 0.15em; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 0.5rem; background: var(--panel); padding: 0.4rem 0.7rem; z-index: 2; }

.top {
  border-bottom: 1px solid var(--line);
  padding: 0.8rem max(16px, calc((100% - 46rem) / 2));
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; align-items: baseline;
}
.brand { font-weight: 700; color: var(--fg); text-decoration: none; letter-spacing: 0.01em; }
.brand span { color: var(--muted); font-weight: 500; }
.top nav { display: flex; flex-wrap: wrap; gap: 0.15rem 0.9rem; font-size: 0.95rem; }
.top nav a { text-decoration: none; padding: 0.15rem 0; }
.top nav a[aria-current="page"] { color: var(--fg); font-weight: 600; border-bottom: 2px solid var(--accent); }
.top nav a.lang { color: var(--muted); }

main { max-width: 46rem; margin: 0 auto; padding: 1.5rem 16px 3rem; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0.6rem 0 1rem; }
h2 { font-size: 1.35rem; line-height: 1.25; margin: 2rem 0 0.6rem; }
h3 { font-size: 1.12rem; margin: 1.6rem 0 0.4rem; }
p, ul, ol, blockquote { margin: 0 0 1rem; }
ul, ol { padding-left: 1.4rem; }
li { margin: 0.2rem 0; }
li > ul, li > ol { margin: 0.2rem 0 0.4rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
blockquote { border-left: 4px solid var(--accent); margin-left: 0; padding: 0.2rem 0 0.2rem 1rem; color: var(--muted); font-style: italic; }
code { font: 0.88em/1.4 ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
       background: var(--code); padding: 0.08em 0.3em; border-radius: 3px; overflow-wrap: anywhere; }
pre { background: var(--code); padding: 0.8rem 1rem; border-radius: 6px; overflow-x: auto; max-width: 100%; }
pre code { background: none; padding: 0; overflow-wrap: normal; white-space: pre; }
.scroll { overflow-x: auto; max-width: 100%; margin: 0 0 1rem; }
table { border-collapse: collapse; font-size: 0.93rem; min-width: 100%; }
th, td { border-bottom: 1px solid var(--line); padding: 0.4rem 0.6rem 0.4rem 0; text-align: left; vertical-align: top; }
th { font-weight: 600; }
td code, th code { overflow-wrap: normal; white-space: nowrap; }
table.facts th { font-weight: 500; color: var(--muted); white-space: nowrap; }
.meta, .where, .hint { color: var(--muted); font-size: 0.92rem; }
.hint { border-left: 3px solid var(--line); padding-left: 0.7rem; }
.sha { font-size: 0.78rem; }
ul.notes, ul.files { list-style: none; padding: 0; }
ul.notes li { border-top: 1px solid var(--line); padding: 0.8rem 0; }
.cta { display: inline-block; background: var(--accent); color: var(--accent-fg); padding: 0.55rem 1.1rem;
       border-radius: 6px; text-decoration: none; font-weight: 600; }
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.88rem;
        padding: 1rem max(16px, calc((100% - 46rem) / 2)) 2rem; }
@media (max-width: 30rem) {
  body { font-size: 16px; }
  h1 { font-size: 1.55rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* pictures shipped with a note (maps); dark images on any theme */
figure.note-picture { margin: 1.25rem 0; }
figure.note-picture img { display: block; width: 100%; height: auto; border-radius: 6px; background: #0c0c0c; }
figure.note-picture figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; }
.brand img { flex: none; }
.foot .studio { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.4rem; }
.foot .studio img { flex: none; }
