/* Base reset and layout shell. Zero external resources: system font stacks
 * only (see tokens.css). */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: var(--text-body-md);
  line-height: 1.4;
  min-height: 100vh;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.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;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: var(--space-sm);
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-control);
  border: 1px solid var(--border-strong);
  z-index: 1000;
  transition: top var(--motion-duration-fast) var(--motion-easing);
}

.skip-link:focus {
  top: var(--space-sm);
}

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

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  color: var(--accent-cyan);
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Owner instruction 2026-09-13: "NO inner scroll box — the page itself
 * scrolls with a sticky header row." `main` flows normally (no fixed
 * height, no overflow); the document/window scrolls, `.app-header` stays
 * sticky above it, and the table's `thead` stays sticky just below the
 * header (see components.css). */
.app-main {
  flex: 1;
  padding: var(--space-md);
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

.app-header,
.app-primary-nav,
.app-footer {
  flex: none;
}

@media (max-width: 767px) {
  .app-main {
    padding: var(--space-sm);
  }
}

.seo-fallback {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-md) 0;
  color: var(--text-primary);
  line-height: 1.55;
}

.seo-fallback h1 {
  font-size: var(--text-h1);
  margin: var(--space-xs) 0;
}

.seo-fallback h2 {
  font-size: var(--text-h2);
  margin: var(--space-lg) 0 var(--space-xs);
}

.seo-fallback p,
.seo-fallback li {
  color: var(--text-secondary);
}

.seo-fallback strong {
  color: var(--text-primary);
}

.seo-fallback-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--bg-surface);
}

.seo-fallback table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-body-md);
  font-variant-numeric: tabular-nums;
}

.seo-fallback th,
.seo-fallback td {
  padding: var(--space-xs) var(--space-sm);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.seo-fallback th {
  color: var(--text-secondary);
  font-weight: 600;
}

.seo-fallback-meta {
  margin-top: var(--space-md);
  font-size: var(--text-caption);
  font-family: var(--font-mono);
}
