/* Reset, document defaults and shared typography. */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.045em; font-weight: 800; }
h1 { font-size: clamp(3rem, 9vw, 6.5rem); }
h2 { font-size: clamp(2rem, 5vw, 3.4rem); }
h3 { font-size: 1.55rem; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

::selection { background: var(--accent); color: var(--bg-deep); }

.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}

.eyebrow {
  color: var(--accent);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.notice {
  margin-top: var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
}
.state-panel {
  padding: var(--space-6) var(--space-4);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
}
.state-panel h3 { color: var(--text); margin-bottom: var(--space-2); }
.state-panel .btn { margin-top: var(--space-3); }
.state-panel--error { border-color: rgba(255, 130, 130, .45); }
.state-panel--loading { border-style: solid; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--bg-deep);
  border-radius: var(--radius-sm);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

@media (max-width: 640px) {
  .container { width: min(100% - 32px, var(--container)); }
}
