/* Lopolith website stylesheet.
   Deliberately plain: no JavaScript, no web fonts, no external requests, no images.
   Single column, system fonts, CSS-only dark mode. */

:root {
  --fg: #16181d;
  --bg: #ffffff;
  --muted: #5b616b;
  --border: #d8dce2;
  --code-bg: #f5f6f8;
  --link: #0b4f9e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #dfe2e7;
    --bg: #14161a;
    --muted: #9aa1ab;
    --border: #2c313a;
    --code-bg: #1b1e24;
    --link: #7fb4ff;
  }
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0 auto;
  max-width: 46rem;
  padding: 1.4rem 1.2rem 4rem;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

a { color: var(--link); }

h1, h2, h3, h4 { line-height: 1.25; margin: 2.2rem 0 0.8rem; font-weight: 650; }
h1 { margin-top: 0.4rem; font-size: 1.7rem; }
h2 { font-size: 1.28rem; border-bottom: 1px solid var(--border); padding-bottom: 0.25rem; }
h3 { font-size: 1.06rem; }
h4 { font-size: 1rem; margin-top: 1.6rem; }

p, ul, ol, table, pre, blockquote { margin: 0.8rem 0; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas,
               "Liberation Mono", monospace;
  font-size: 0.9em;
}

:not(pre) > code { background: var(--code-bg); padding: 0.1em 0.3em; }

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 0.7rem 0.9rem;
  overflow-x: auto;
}

pre code { font-size: 0.85rem; }

table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { border: 1px solid var(--border); padding: 0.35rem 0.5rem; text-align: left; vertical-align: top; }
th { background: var(--code-bg); }

nav.top {
  font-size: 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
nav.top a { margin-right: 0.5rem; }
nav.top a[aria-current="page"] { font-weight: 700; text-decoration: none; color: var(--fg); }

nav.prevnext {
  margin-top: 3rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.95rem;
}

.crumb { color: var(--muted); font-size: 0.9rem; margin: 0.6rem 0 0.4rem; }
.goal { border-left: 3px solid var(--border); padding-left: 0.8rem; color: var(--muted); margin: 1rem 0; }
.note { border-left: 3px solid var(--border); padding: 0.1rem 0.8rem; color: var(--muted); }
.out { color: var(--muted); }
.warn { font-weight: 650; }

ul.toc { list-style: none; padding-left: 0; }
ul.toc li { margin: 0.3rem 0; }
ul.toc .n { color: var(--muted); display: inline-block; min-width: 2.2rem; }

footer { margin-top: 3rem; color: var(--muted); font-size: 0.85rem; }
footer p { margin: 0.2rem 0; }
