/* Help, Privacy and Terms: plain reading pages, in the landing page's own colours (the same tokens as
   index.html and packages/core/src/theme/tokens.ts). They load nothing from anyone else: the lettering
   is our own copy of Atkinson Hyperlegible Next (/fonts/fonts.css), because a page about privacy
   should not tell a font service who is reading it. Large type and a short line, for the people these
   are for. */
:root {
  --bg: #f0eee9;
  --surface: #ffffff;
  --ink: #1b2233;
  --ink-soft: #4d5567;
  --line: #cfd3da;
  --focus: #2e64a6;
  --amber: #855904;
  --amber-tint: #f8eddd;
  --grey-tint: #eceff3;
  --shadow-card: 0 1px 0 rgba(27, 34, 51, .05), 0 12px 32px -14px rgba(27, 34, 51, .22);
  --r-card: 24px;
  --r-control: 16px;
  --measure: 44rem;
  --font: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171a21;
    --surface: #1f242e;
    --ink: #eeebe4;
    --ink-soft: #b3b9c6;
    --line: #353c4a;
    --focus: #86aee0;
    --amber: #d4a54f;
    --amber-tint: #403521;
    --grey-tint: #333843;
    --shadow-card: 0 1px 0 rgba(0, 0, 0, .3), 0 12px 32px -14px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #171a21;
  --surface: #1f242e;
  --ink: #eeebe4;
  --ink-soft: #b3b9c6;
  --line: #353c4a;
  --focus: #86aee0;
  --amber: #d4a54f;
  --amber-tint: #403521;
  --grey-tint: #333843;
  --shadow-card: 0 1px 0 rgba(0, 0, 0, .3), 0 12px 32px -14px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.1875rem;
  line-height: 1.6;
}
a { color: var(--focus); text-underline-offset: .15em; }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.25rem 16px;
}
.brand { color: var(--ink); font-weight: 700; font-size: 1.25rem; text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; gap: .5rem; }
.top nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.top nav a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.doc {
  max-width: var(--measure);
  margin: 0 auto 2rem;
  padding: 1.5rem 16px;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
@media (min-width: 48rem) { .doc { padding: 2.5rem 3rem; } }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 1rem; }
h2 { font-size: 1.5rem; line-height: 1.25; margin: 2.25rem 0 .75rem; }
h3 { font-size: 1.25rem; line-height: 1.3; margin: 1.75rem 0 .5rem; }
p, ul { margin: 0 0 1rem; }
li { margin-bottom: .4rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.75rem 0; }
code { font-size: .9em; background: var(--grey-tint); padding: .05em .3em; border-radius: 6px; overflow-wrap: anywhere; }

/* Tables become cards of their own width; a wide one scrolls sideways inside its box, never the page. */
.table { overflow-x: auto; margin: 0 0 1.25rem; border: 1px solid var(--line); border-radius: var(--r-control); }
table { width: 100%; border-collapse: collapse; font-size: 1.0625rem; }
th, td { text-align: left; vertical-align: top; padding: .75rem; border-bottom: 1px solid var(--line); }
th { background: var(--grey-tint); }
tr:last-child td { border-bottom: 0; }

/* Anything not yet decided is drawn so it cannot be missed. */
mark.open {
  background: var(--amber-tint);
  color: var(--ink);
  outline: 2px dashed var(--amber);
  outline-offset: 1px;
  border-radius: 4px;
  padding: 0 .2em;
  font-weight: 700;
}
.draft-note {
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
  border: 2px dashed var(--amber);
  border-radius: var(--r-control);
  background: var(--amber-tint);
}
.draft-note > :last-child { margin-bottom: 0; }
.draft-label { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .9rem; color: var(--amber); margin-bottom: .5rem; }

/* The help page: each problem a card of its own. */
.problem {
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  padding: 1rem 1.25rem;
  margin: 0 0 1rem;
}
.problem h2 { margin-top: 0; font-size: 1.3rem; }
.problem > :last-child { margin-bottom: 0; }

.foot { max-width: var(--measure); margin: 0 auto 3rem; padding: 0 16px; color: var(--ink-soft); }

/* The help page's list of questions, each a link down to its card (Iain, 3 Oct 2026). */
.contents ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 6px; }
.contents a { color: var(--focus); }
.problem { scroll-margin-top: 16px; }
