/* Shared styling for the Number Puzzle support site.
   One stylesheet rather than per-page <style> blocks: there is no build step
   here, so a single linked file is the only way the pages stay consistent when
   one of them is edited. Palette is lifted from the app's own Oak* theme so the
   site and the game read as the same product. */

:root {
  --bg: #fdfaf4;
  --surface: #f5ecdd;
  --fg: #2a1d10;
  --muted: #6d5b45;
  --rule: #e4d7c2;
  --accent: #a55615;
  --accent-ink: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15100a;
    --surface: #1f1810;
    --fg: #f3e9d9;
    --muted: #ac9a82;
    --rule: #342a1d;
    --accent: #e0a94a;
    --accent-ink: #241a0c;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  line-height: 1.15;
  margin: 0 0 .4rem;
  text-wrap: balance;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  margin: 2.4rem 0 .6rem;
}

.meta { color: var(--muted); font-size: .9rem; margin: 0 0 2.2rem; }

a { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

ul { padding-left: 1.2rem; }
li { margin: .35rem 0; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

code {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: .25rem;
  padding: .1rem .35rem;
  font-size: .9em;
  overflow-wrap: anywhere;
}

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: .6rem;
  padding: 1rem 1.15rem;
  margin: 1.4rem 0;
}
.card p:first-child { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

/* Wide content must scroll inside its own box rather than the page. */
.scroll { overflow-x: auto; }

table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: .95rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }

/* Site navigation, repeated on every page so no page is a dead end. */
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.2rem;
  align-items: baseline;
  padding: 1rem 1.25rem;
  max-width: 46rem;
  margin: 0 auto;
  border-bottom: 1px solid var(--rule);
}
.nav .brand { font-family: Georgia, serif; font-weight: 700; color: var(--fg); text-decoration: none; }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.nav .spacer { flex: 1; }

footer {
  color: var(--muted);
  font-size: .9rem;
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  padding-top: 1.2rem;
}

.lede { font-size: 1.05rem; }
