/* Base: reset, type, layout helpers, accessibility. Uses tokens.css only. */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-height) + var(--space-lg)); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-background);
  overflow-x: hidden;
  overflow-x: clip; /* scroll animations start off to the side; clip keeps them from widening the page, even on iOS Safari */
}
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0 0 var(--space-md); line-height: 1.15; font-weight: 700; color: var(--color-text); }
h1 { font-size: clamp(2.2rem, 6vw + 0.5rem, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.5vw + 0.5rem, 2.6rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.15rem, 1vw + 1rem, 1.4rem); }
p { margin: 0 0 var(--space-lg); }
a { color: var(--color-primary-dark); text-underline-offset: 3px; }
a:hover { color: var(--color-primary); }
ul, ol { padding-left: 1.25rem; margin: 0 0 var(--space-lg); }
li { margin-bottom: var(--space-sm); }
strong { font-weight: 700; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; background: var(--color-background-alt); padding: 1px 6px; border-radius: var(--radius-sm); }

:focus-visible { outline: 3px solid var(--color-primary-dark); outline-offset: 3px; border-radius: var(--radius-sm); }

.skip-link {
  position: absolute; left: var(--space-lg); top: -100px; z-index: 100;
  background: var(--color-primary-dark); color: var(--color-white);
  padding: var(--space-md) var(--space-lg); border-radius: var(--radius-pill); text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: var(--space-md); }

.container { width: 100%; max-width: var(--page-max); margin: 0 auto; padding: 0 var(--space-lg); }
.section { padding: clamp(var(--space-xxl), 8vw, 96px) 0; }
.section--alt { background: var(--color-background-alt); }
.section__head { max-width: 720px; margin: 0 0 var(--space-xl); }
.eyebrow { display: inline-block; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-primary-dark); margin-bottom: var(--space-sm); }
.lead { font-size: clamp(1.1rem, 1vw + 0.9rem, 1.3rem); color: var(--color-text-muted); }
.muted { color: var(--color-text-muted); }
.script { font-family: var(--font-script); font-weight: 400; letter-spacing: 0; }
.center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.grid { display: grid; gap: var(--space-xl); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

/* Visible marker for a fact that is not in the app's code or documents. It must be filled in by the owner. */
.data-gap {
  display: inline-block; padding: 1px var(--space-sm); border-radius: var(--radius-sm);
  background: var(--tint-orange-bg); color: var(--color-text); border: 1px dashed var(--tint-orange-fg);
  font-weight: 700; font-size: 0.875em;
}

/* Tables scroll inside their own box, never the page */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); background: var(--color-card); box-shadow: var(--shadow-card); }
table { border-collapse: collapse; width: 100%; min-width: 520px; }
th, td { padding: var(--space-md) var(--space-lg); text-align: left; vertical-align: top; border-bottom: 1px solid var(--color-border); }
th { font-weight: 700; background: var(--color-background-alt); white-space: nowrap; }
tr:last-child td, tr:last-child th { border-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
