/* The public pages' shared styles: the landing page, privacy and terms.
   Fonts are served from this site, never from a font CDN, so a visitor's
   address reaches no third party. Both families are SIL Open Font License
   1.1; the licence texts are in fonts/. Latin subset only, which covers
   the £ and × the pages use. */
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500 800; font-display: swap;
  src: url("/fonts/BricolageGrotesque-normal-500-800.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/AtkinsonHyperlegible-normal-400.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/fonts/AtkinsonHyperlegible-normal-700.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/fonts/AtkinsonHyperlegible-italic-400.woff2") format("woff2");
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }

:root {
  --bg: #fdfaf5;
  --card: #ffffff;
  --ink: #23212b;
  --muted: #6f6a7c;
  --line: #e7e1d8;
  --accent: #3d5afe;
  --accent-ink: #ffffff;
  --accent-soft: #eef1ff;
  --cell-0: #f1ede6;
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Verdana", "Segoe UI", system-ui, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.1rem, 1.4rem + 3vw, 3.4rem);
  --measure: 36rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15141a; --card: #1e1d25; --ink: #f2eff5; --muted: #a59fb2; --line: #302e3a;
    --accent: #8b9dff; --accent-ink: #15141a; --accent-soft: #232541; --cell-0: #26252e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15141a; --card: #1e1d25; --ink: #f2eff5; --muted: #a59fb2; --line: #302e3a;
  --accent: #8b9dff; --accent-ink: #15141a; --accent-soft: #232541; --cell-0: #26252e;
  color-scheme: dark;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding-inline: clamp(16px, 4vw, 40px);
  padding-block: 0 4rem;
}
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: var(--step-2); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Top bar */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 1.25rem;
}
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem;
  color: var(--ink); text-decoration: none;
}
.mark {
  width: 2rem; height: 2rem; border-radius: 0.5rem; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-size: 1.25rem; line-height: 1;
}
.bar a.signin { color: var(--muted); text-decoration: none; font-size: var(--step--1); }
.bar a.signin:hover { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding-inline: 1.4rem; border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  text-decoration: none; transition: transform 120ms ease, background 120ms ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-quiet { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn-quiet:hover { border-color: var(--accent); }

footer {
  padding-block: 2.5rem 0; color: var(--muted); font-size: var(--step--1);
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn-primary:hover { transform: none; }
}

/* Privacy and terms: one readable column of running text. */
.legal { display: grid; gap: 1rem; max-width: 42rem; padding-block: clamp(1rem, 3vw, 2rem) 1rem; }
.legal h1 { font-size: var(--step-3); margin-block-end: 0.25rem; }
.legal h2 { font-size: var(--step-1); margin-block-start: 1.5rem; }
.legal .updated { color: var(--muted); font-size: var(--step--1); }
.legal ul { margin: 0; padding-inline-start: 1.25rem; display: grid; gap: 0.4rem; }
.legal table { border-collapse: collapse; width: 100%; font-size: var(--step--1); }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 0.55rem 0.75rem 0.55rem 0; border-bottom: 1px solid var(--line); }
.legal th { font-family: var(--font-display); font-weight: 700; }
.legal .scroll { overflow-x: auto; }
.legal .kids { background: var(--accent-soft); border-radius: 1rem; padding: 1.25rem 1.5rem; display: grid; gap: 0.6rem; }
