/* 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);
  }
}
