/* System fonts only: no downloads, no third-party requests. */
:root {
  --paper: #f6f8f8;
  --ink: #18232b;
  --muted: #4a5a64;
  --lake: #1f4e6b;
  --spruce: #2e5a46;
  --maple: #a4221a;
  --rule: #c9d3d6;
  --serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color-scheme: light dark;
}

/* Dark by system preference, unless the theme toggle has set an explicit
   choice (data-theme on <html>, saved in localStorage by src/js/theme.js). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121a1f;
    --ink: #e6ecee;
    --muted: #a9b7be;
    --lake: #8cc4e4;
    --spruce: #8fcfae;
    --maple: #ff8a80;
    --rule: #34444d;
    color-scheme: dark;
  }
}

/* Explicit choice wins over system preference either way. */
:root[data-theme="dark"] {
  --paper: #121a1f;
  --ink: #e6ecee;
  --muted: #a9b7be;
  --lake: #8cc4e4;
  --spruce: #8fcfae;
  --maple: #ff8a80;
  --rule: #34444d;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --paper: #f6f8f8;
  --ink: #18232b;
  --muted: #4a5a64;
  --lake: #1f4e6b;
  --spruce: #2e5a46;
  --maple: #a4221a;
  --rule: #c9d3d6;
  color-scheme: light;
}

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

html { background: var(--paper); color: var(--ink); }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
}

.wrap { max-width: 42rem; margin-inline: auto; padding-inline: 1.25rem; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 600; }
h1 { font-size: 2rem; margin: 1.5rem 0 1rem; }
h2 { font-size: 1.4rem; margin: 2.25rem 0 0.5rem; }
h3 { font-size: 1.15rem; margin: 1.5rem 0 0.25rem; }

a { color: var(--lake); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--lake); outline-offset: 2px; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.75rem;
}
.skip:focus { top: 1rem; }

.site-header { border-bottom: 1px solid var(--rule); padding-block: 0.75rem; }
.site-header .wrap:first-child { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.header-controls { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.site-name { margin: 0; font-family: var(--serif); font-size: 1.25rem; font-weight: 600; }
.site-name a { color: var(--ink); text-decoration: none; }
.site-header nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; padding: 0; margin: 0.5rem 0 0; }
.site-header nav a[aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: none; }

/* WCAG 2.2 target size (2.5.8): plain text links measure smaller than
   24px because their hit area follows font metrics, not line-height. The
   padding/negative-margin pair grows the clickable area without moving
   anything on screen. Applies to every link that isn't running prose text. */
.site-name a,
.lang-switch,
.site-header nav a,
.site-footer a {
  display: inline-block;
  padding-block: 0.45rem;
  margin-block: -0.45rem;
}

/* Theme toggle. Hidden until src/js/theme.js confirms it will work, so a
   no-JS visitor never sees a dead control - the toggle needs script to
   persist a choice, since the site sets no cookies. Without it, the page
   still follows the OS light/dark setting via prefers-color-scheme. */
.theme-toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 0.3rem;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
}
.js .theme-toggle { display: inline-flex; }
.theme-toggle:hover { border-color: var(--lake); }
.theme-toggle svg { width: 1.1em; height: 1.1em; flex: none; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle[aria-pressed="true"] .icon-moon { display: none; }
.theme-toggle[aria-pressed="true"] .icon-sun { display: block; }

/* The one bold element: the next date. */
.hero { padding-block: 1rem 0.5rem; border-bottom: 1px solid var(--rule); }
.hero h1 { font-size: 1.5rem; font-weight: 500; }
.next-label { margin: 1.5rem 0 0; color: var(--muted); }
.next-date {
  margin: 0 0 0.75rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 7vw, 3.25rem);
  line-height: 1.1;
  color: var(--spruce);
}

.steps { padding-left: 1.5rem; }
.steps li { margin-bottom: 0.5rem; }

.plain { list-style: none; padding: 0; }
.plain li { margin-bottom: 0.5rem; }
.dates { columns: 2 14rem; }

details { margin-top: 0.75rem; }
details summary {
  display: inline-block;
  padding-block: 0.45rem;
  margin-block: -0.45rem;
  cursor: pointer;
  color: var(--lake);
}
details[open] summary { margin-bottom: 0.5rem; }
details ul { padding-left: 1.25rem; }
details li { margin-bottom: 0.5rem; }

.facts { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin: 0.5rem 0; }
.facts div { display: flex; gap: 0.35rem; }
.facts dt { color: var(--muted); }
.facts dt::after { content: ":"; }
.facts dd { margin: 0; }

.alt { border-left: 3px solid var(--rule); padding-left: 1rem; margin-block: 1.25rem; }
.sources { font-size: 0.95rem; color: var(--muted); }

.flag { display: inline-block; margin: 0.25rem 0; font-size: 0.9rem; color: var(--muted); border: 1px dashed var(--muted); padding: 0.1rem 0.5rem; }

.cancel { border-top: 1px solid var(--rule); }
.company { font-weight: 400; color: var(--muted); }
.cancel-link { color: var(--maple); font-weight: 600; }

.button {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border: 2px solid var(--lake);
  text-decoration: none;
  font-weight: 600;
}

.splash { display: grid; gap: 2rem; padding-block: 3rem; }
@media (min-width: 40rem) { .splash { grid-template-columns: 1fr 1fr; max-width: 56rem; } }

.site-footer { border-top: 1px solid var(--rule); margin-top: 3rem; padding-block: 1rem; color: var(--muted); font-size: 0.95rem; }

@media (forced-colors: active) {
  .flag, .alt { border-color: CanvasText; }
}
:lang(fr) .facts dt::after { content: "\00a0:"; }
.why { margin: 0.25rem 0; color: var(--spruce); font-weight: 600; }
.why.exception { color: var(--ink); font-weight: 400; }
.alt-exception { border-left-style: dashed; }
.reviewed { font-size: 0.95rem; color: var(--muted); margin: 0.25rem 0; }
.report { font-size: 0.95rem; margin: 0.25rem 0 0.75rem; }
