/* =============================================================
   Base — reset, document rhythm, layout shell, accessibility
   ============================================================= */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--ink-primary);
  font-family: var(--font-ui);
  font-size: var(--step-1);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}
button { background: none; border: 0; padding: 0; cursor: pointer; }

a {
  color: var(--brand-primary);
  text-decoration: none;
  text-underline-offset: 2px;
}
a:hover { text-decoration: underline; }

/* Visible focus for keyboard users only. */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
/* Headings receive focus programmatically after navigation so assistive
   technology lands in the new content; that move is not a keyboard action
   and must not paint a ring. */
h1[tabindex="-1"]:focus, h1[tabindex="-1"]:focus-visible, #main:focus { outline: none; }

/* ---- Typography roles --------------------------------------- */
.display    { font-family: var(--font-display); font-weight: 600; line-height: 1.15; text-wrap: pretty; }
.page-title { font-family: var(--font-display); font-weight: 600; font-size: var(--step-5); line-height: 1.2; }
.section-title { font-family: var(--font-display); font-weight: 600; font-size: var(--step-4); line-height: 1.25; }
.figure     { font-family: var(--font-display); font-weight: 800; line-height: 1; }
.eyebrow {
  font-size: var(--step--1);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-primary);
}
.lede { font-size: var(--step-0); color: var(--ink-secondary); max-width: 78ch; }
.meta { font-size: var(--step--1); color: var(--ink-secondary); }
.muted { color: var(--ink-muted); }
.tnum { font-variant-numeric: tabular-nums; }

/* ---- Layout shell -------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}
.page { padding-block: var(--space-7) var(--space-9); }
.page-head { margin-bottom: var(--space-6); }
.page-head .lede { margin-top: var(--space-2); }

.stack > * + * { margin-top: var(--space-4); }
.section + .section { margin-top: var(--space-8); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

/* Auto-fitting card grids — the portal's main layout primitive. */
.grid { display: grid; gap: var(--space-4); }
.grid--200 { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.grid--230 { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.grid--260 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.grid--300 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.grid--fill-220 { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }

/* Two-column splits collapse to one column on narrow screens. */
.split { display: grid; gap: var(--space-7); align-items: start; }
@media (min-width: 62rem) {
  .split--wide-first { grid-template-columns: 1.35fr 1fr; }
  .split--news { grid-template-columns: 1.45fr 1fr; }
  .split--even { grid-template-columns: 1fr 1fr; }
}

/* ---- Accessibility helpers ----------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100%;
  z-index: 200;
  background: var(--brand-primary);
  color: var(--ink-inverse);
  padding: var(--space-3) var(--space-5);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-weight: 700;
}
.skip-link:focus-visible { top: 0; text-decoration: none; }

@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- Print ---------------------------------------------------- */
@media print {
  :root { --surface-page: #fff; }
  .site-nav, .site-footer, .skip-link, .no-print { display: none !important; }
  body { font-size: 11pt; }
  .card, .panel { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .page { padding-block: 0; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
