/* Base: reset, elements, header, footer, buttons, focus, skip link. Unprefixed classes live here only. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--space-3);
}
h1 { font-size: var(--step-3); letter-spacing: -0.02em; }
h2 { font-size: var(--step-2); letter-spacing: -0.01em; }
h3 { font-size: var(--step-1); }
p { margin: 0 0 var(--space-3); max-width: var(--measure); }
a { color: var(--blue); text-underline-offset: 0.2em; }
ul, ol { margin: 0 0 var(--space-3); padding-left: 1.25rem; max-width: var(--measure); }

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

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: -100px;
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-2) var(--space-3);
  z-index: 10;
}
.skip-link:focus { top: var(--space-2); }

.container { width: min(100% - 2 * 16px, 1080px); margin-inline: auto; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--ink); }
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  padding-block: var(--space-3);
}
.site-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--touch);
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); max-width: none; }
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  padding-inline: var(--space-1);
}
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; }

/* Footer */
.site-footer { background: var(--paper); border-top: 1px solid var(--ink); margin-top: var(--space-6); padding-block: var(--space-5); font-size: var(--step--1); }
.site-footer .container { display: grid; gap: var(--space-3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); max-width: none; }
.site-footer a { color: var(--ink); display: inline-flex; align-items: center; min-height: var(--touch); }
.site-footer p { margin: 0; max-width: none; color: var(--muted); }

/* Buttons */
.btn, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  padding: var(--space-2) var(--space-4);
  font: 700 var(--step-0) var(--font-body);
  text-decoration: none;
  border: 2px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
}
.btn { background: var(--blue); color: var(--blue-ink); border-color: var(--blue); }
.btn:hover { filter: brightness(0.92); }
.btn-secondary { background: var(--paper); color: var(--ink); }
.btn-secondary:hover { background: var(--ground); }
.button-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-block: var(--space-4); }

/* Shared page section */
.section { padding-block: var(--space-5); }
.notice { border-left: 4px solid var(--ink); padding: var(--space-2) var(--space-3); background: var(--paper); max-width: var(--measure); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
