/* Shared stylesheet. No external resources, no web fonts, no JavaScript needed.
   Palette and contrast ratios are documented in ../README.md. */

:root {
  color-scheme: light dark;
  --bg: #f4f8f7;
  --surface: #ffffff;
  --ink: #12201e;
  --muted: #3f504d;
  --accent: #0a5c55;
  --on-accent: #ffffff;
  --accent-soft: #dcefec;
  --line: #5f7f7a;
  --hl: #f4c95d;
  --on-hl: #12201e;
  --focus: #1d4ed8;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1816;
    --surface: #15231f;
    --ink: #e9f2f0;
    --muted: #b4c6c2;
    --accent: #7ed8cc;
    --on-accent: #0e1816;
    --accent-soft: #1b3330;
    --line: #6f918b;
    --focus: #9cc2ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

.wrap { width: min(100% - 2rem, 70rem); margin-inline: auto; }

/* Text */
h1, h2, h3 { line-height: 1.2; font-weight: 750; letter-spacing: -0.015em; margin: 0 0 0.75rem; }
h1 { font-size: clamp(2rem, 6vw + 0.5rem, 3.5rem); max-width: 20ch; }
h2 { font-size: clamp(1.5rem, 2.5vw + 1rem, 2.1rem); margin-top: 0; }
h3 { font-size: 1.3rem; }
p, ul, ol, dl { margin: 0 0 1.1rem; }
p, li, dd { max-width: 65ch; }
ul, ol { padding-left: 1.4rem; }
li + li { margin-top: 0.5rem; }
.lead { font-size: 1.3rem; line-height: 1.6; max-width: 60ch; }
.muted { color: var(--muted); }

a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 0.12em; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 0.2em; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
  box-shadow: 0 0 0 3px var(--bg);
}

/* Skip link */
.skip {
  position: absolute; left: 0.5rem; top: -4rem;
  background: var(--accent); color: var(--on-accent);
  padding: 0.75rem 1rem; min-height: 44px; z-index: 10; font-weight: 700;
}
.skip:focus { top: 0.5rem; }

/* Status banner: the one place to edit founding status */
.status {
  margin: 0; max-width: none;
  background: var(--hl); color: var(--on-hl);
  padding: 0.75rem 1rem; font-weight: 600; line-height: 1.5;
  border-bottom: 3px solid var(--on-hl);
}
.status .wrap { display: block; width: min(100% - 2rem, 70rem); }

/* Header */
.site-header { border-bottom: 2px solid var(--line); background: var(--surface); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1.5rem; padding-block: 0.5rem; }
.wordmark {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.wordmark:hover { text-decoration: underline; text-decoration-thickness: 0.12em; }
.lang a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding-inline: 0.75rem; font-weight: 700; }

.nav ul { list-style: none; margin: 0; padding: 0 0 0.5rem; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; }
.nav li { margin: 0; max-width: none; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0.25rem 0.9rem;
  color: var(--ink); text-decoration: none; font-weight: 600; border-radius: 0.5rem;
}
.nav a:hover { background: var(--accent-soft); text-decoration: underline; }
.nav a[aria-current="page"] { background: var(--accent); color: var(--on-accent); text-decoration: none; }

/* Layout */
main { padding-block: 1.5rem 3rem; }
.section { padding-block: 2.5rem; }
.section + .section { border-top: 2px solid var(--line); }

/* Hero */
.hero { display: grid; gap: 2rem; padding-block: 2rem 2.5rem; align-items: center; }
.hero .art { width: 100%; height: auto; display: block; }
.art .b1 { fill: var(--accent); }
.art .b2 { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 3; }
.art .b3 { fill: var(--hl); }
@media (min-width: 60rem) {
  .hero { grid-template-columns: 1.1fr 1fr; gap: 3rem; }
}

/* Three things */
.three { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.three li { margin: 0; max-width: none; border-top: 8px solid var(--accent); padding-top: 1rem; }

/* Cards */
.cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.card { background: var(--surface); border: 2px solid var(--line); border-radius: 1rem; padding: 1.25rem; display: flex; flex-direction: column; }
.card > :last-child { margin-bottom: 0; }
.card .more { margin-top: auto; padding-top: 0.5rem; margin-bottom: 0; }

.ph {
  aspect-ratio: 16 / 9; width: 100%; margin-bottom: 1rem; border-radius: 0.5rem;
  border: 2px dashed var(--line);
  background: repeating-linear-gradient(135deg, var(--accent-soft) 0 14px, var(--surface) 14px 28px);
}

/* Buttons and link targets */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.6rem 1.25rem;
  background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none;
  border-radius: 0.5rem; border: 2px solid var(--accent);
}
.btn:hover { text-decoration: underline; text-decoration-thickness: 0.12em; }
.btn.alt { background: transparent; color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.linklist { list-style: none; padding: 0; }
.linklist li { margin: 0; }
.linklist a { display: inline-flex; align-items: center; min-height: 44px; }

.empty { border: 2px dashed var(--line); border-radius: 0.5rem; padding: 1.25rem; background: var(--surface); }
.empty p:last-child { margin-bottom: 0; }

dl.facts { display: grid; gap: 0.25rem 1.5rem; grid-template-columns: 1fr; }
dl.facts dt { font-weight: 700; margin-top: 0.75rem; }
dl.facts dd { margin: 0; }
@media (min-width: 40rem) {
  dl.facts { grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr); }
  dl.facts dt, dl.facts dd { margin-top: 0; padding-block: 0.5rem; border-top: 1px solid var(--line); }
}

address { font-style: normal; }
.prose { max-width: 65ch; }

/* Language chooser (root page) */
.choose { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); margin-top: 1.5rem; }
.choose .btn { width: 100%; min-height: 64px; font-size: 1.3rem; }

/* Footer */
.site-footer { border-top: 2px solid var(--line); background: var(--surface); padding-block: 1.5rem; }
.site-footer p { margin: 0 0 0.5rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 1rem; }
.site-footer li { margin: 0; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }

/* Forced colours */
@media (forced-colors: active) {
  .nav a[aria-current="page"] { outline: 2px solid; }
  .card, .empty, .ph { border-color: CanvasText; }
}

/* Print */
@media print {
  :root { --bg: #fff; --surface: #fff; --ink: #000; --muted: #000; --accent: #000; --line: #000; }
  body { font-size: 12pt; line-height: 1.5; color: #000; background: #fff; }
  .skip, .nav, .lang, .hero .art, .ph, .actions, .choose { display: none !important; }
  .status { background: none; color: #000; border: 2px solid #000; }
  .site-header, .site-footer { background: none; }
  .card { break-inside: avoid; border-color: #000; }
  a { color: #000; }
  a[href^="http"]::after, a[href^="mailto"]::after { content: " (" attr(href) ")"; font-size: 0.85em; overflow-wrap: anywhere; }
}

.card .more a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; }
