/* Values from the Contracts Geek design system (tokens.json): change them there first, then here */

@font-face {
  font-family: "Nunito Sans";
  src: url("/fonts/NunitoSans-latin-wght.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand-navy: #13233a;
  --brand-amber: #f2a33a;
  --brand-paper: #f6f4ef;

  --surface: var(--brand-paper);
  --surface-raised: #ffffff;
  --ink: var(--brand-navy);
  --ink-muted: #4c586a;
  --line: #d6d1c4;
  --line-strong: #8b8576;
  --accent: var(--brand-amber);
  --accent-ink: #8a5200;
  --focus: var(--brand-navy);

  --space-1: 4px; --space-2: 8px; --space-3: 16px; --space-4: 24px; --space-5: 40px; --space-6: 64px;
  --radius-sm: 4px;
  --gutter: clamp(var(--space-4), 6vw, var(--space-6));

  --font-sans: "Nunito Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface: var(--brand-navy);
    --surface-raised: #1a2d47;
    --ink: var(--brand-paper);
    --ink-muted: #a9b4c4;
    --line: #2e405a;
    --line-strong: #5d6f89;
    --accent-ink: var(--brand-amber);
    --focus: var(--brand-amber);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: inherit; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--radius-sm); }

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(var(--space-5), 8vw, 6rem) var(--gutter);
}

/* Home: the name, set like the app icon, ending in the square amber full stop */
main.home { justify-content: center; }
.name {
  margin: 0 0 clamp(var(--space-4), 4vw, var(--space-5));
  font-size: clamp(3.25rem, 18vw, 9.5rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 0.92;
}
.nowrap { white-space: nowrap; }
.stop {
  display: inline-block;
  width: 0.2em;
  height: 0.2em;
  margin-left: 0.05em;
  background: var(--accent);
  border-radius: 20%;
}
.lede {
  max-width: 28ch;
  margin: 0 0 var(--space-4);
  font-size: clamp(1.3rem, 2.6vw, 1.6rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.status { max-width: 52ch; margin: 0 0 var(--space-2); color: var(--ink-muted); }

.site-foot {
  border-top: 1px solid var(--line);
  padding: var(--space-4) var(--gutter) var(--space-5);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
}
.site-foot p { margin: 0; max-width: 62ch; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-4); flex-wrap: wrap; }

/* Legal pages: one readable column */
main.legal { padding-top: clamp(var(--space-4), 4vw, var(--space-5)); }
.legal-wrap { width: 100%; max-width: 40rem; margin: 0 auto; }
.legal-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-3) var(--space-4);
  margin-bottom: clamp(var(--space-5), 7vw, var(--space-6));
}
.legal-home { display: inline-flex; align-items: center; gap: 0.65rem; font-weight: 800; letter-spacing: -0.01em; text-decoration: none; font-size: 1.125rem; }
.legal-home img { display: block; border-radius: 22%; }
@media (prefers-color-scheme: dark) { .legal-home img { outline: 1px solid var(--line-strong); } }
.legal-head ul, .versions { list-style: none; margin: 0; padding: 0; }
.legal-head ul { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.legal-head a[aria-current="page"], .versions a[aria-current="page"] { text-decoration-color: var(--accent); text-decoration-thickness: 3px; font-weight: 700; }

.legal h1 { font-size: clamp(2rem, 5vw, 2.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 var(--space-2); }
.legal h2 { font-size: 1.3125rem; font-weight: 800; line-height: 1.3; letter-spacing: -0.01em; margin: var(--space-5) 0 0.6rem; }
.legal p, .legal-body ul { margin: 0 0 var(--space-3); }
.legal-body ul { padding-left: 1.25rem; }
.legal-body li { margin-bottom: 0.35rem; }
.legal strong { font-weight: 800; }
.legal-body a, .superseded a { text-decoration-color: var(--accent); }
.updated { color: var(--ink-muted); margin-bottom: var(--space-5) !important; }

.notice {
  background: var(--surface-raised);
  border-top: 3px solid var(--accent);
  padding: var(--space-3) var(--space-4);
  margin: 0 0 var(--space-5);
}
.notice p { margin: 0 !important; }
.superseded { background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 0.75rem var(--space-3); margin: 0 0 var(--space-4) !important; }

.table-wrap { overflow-x: auto; margin: 0 0 var(--space-3); }
table { border-collapse: collapse; width: 100%; min-width: 32rem; font-size: 0.9688rem; line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: 0.65rem 0.75rem 0.65rem 0; border-bottom: 1px solid var(--line); }
th { font-weight: 800; border-bottom-color: var(--line-strong); }
.versions li { margin-bottom: 0.35rem; }

@media print {
  .site-foot nav, .legal-head nav { display: none; }
  body { background: #fff; color: #000; }
}
