/* Pengwise base: shared by every page. Page-specific styles stay inline. */
@font-face { font-family: "Source Serif 4"; src: url(/fonts/source-serif-4.woff2) format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(/fonts/ibm-plex-sans.woff2) format("woff2"); font-weight: 400 500; font-display: swap; }

:root {
  --bg: #fbfaf6;
  --ink: #1a2a3a;
  --muted: #5b6b7a;
  --line: #e1ddd0;
  --rule: #c9c3b3;
  --accent: #b0283c; /* data and measured numbers only */
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  color-scheme: light dark;
}
/* dark: follows the system unless the visitor picked a theme (theme.js sets data-theme) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111820; --ink: #e8e4da; --muted: #9ba7b3; --line: #26313d; --rule: #3a4654; --accent: #e0566b;
  }
}
:root[data-theme="dark"] {
  --bg: #111820; --ink: #e8e4da; --muted: #9ba7b3; --line: #26313d; --rule: #3a4654; --accent: #e0566b;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.6 var(--sans); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 680px; }
strong, b { font-weight: 500; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; }
h1 { font-size: 3rem; margin: 0 0 20px; letter-spacing: -.01em; }
h2 { font-size: 1.6rem; margin: 0 0 20px; }
a { color: var(--ink); text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }

header { display: flex; align-items: center; justify-content: space-between; padding: 20px 0 14px; border-bottom: 3px solid var(--ink); }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-weight: 600; font-size: 1.35rem; color: var(--ink); text-decoration: none; }
.brand svg { width: 30px; height: 30px; color: var(--ink); }
header nav { display: flex; align-items: center; gap: 16px; }
header nav a { font-size: .95rem; color: var(--muted); }
.theme { font: inherit; font-size: .85rem; color: var(--muted); background: none; border: 1px solid var(--rule); border-radius: 2px; padding: 2px 10px; cursor: pointer; }
.theme:hover { color: var(--ink); border-color: var(--ink); }

/* measured result as 20 marks: add .hit to the ones that count */
.tally { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 8px; }
.tally i { width: 14px; height: 22px; background: var(--line); }
.tally i.hit { background: var(--accent); }
.source { font-size: .85rem; color: var(--muted); }

footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 28px 0 48px; border-top: 1px solid var(--rule); color: var(--muted); font-size: .9rem; }
footer p { margin: 0; }
footer a { color: var(--muted); }

@media (max-width: 760px) {
  h1 { font-size: 2.1rem; }
}
/* phones: email stays in the footer, header keeps brand and theme button */
@media (max-width: 480px) {
  header nav a { display: none; }
}
