/* Shared controls and typography. Feature rules follow in styles.css. */
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font-body); }
a { color: var(--navy); text-decoration: none; font-weight: 700; }
a:hover { color: var(--navy); text-decoration: underline; }
button, input, select { font-family: inherit; font-size: var(--type-control); }
h1, h2, .num { font-family: var(--font-display); font-weight: 800; letter-spacing: 0.3px; }
h1 { font-size: 34px; margin: 0; }
h2 { font-size: var(--type-heading); margin: 0; }

.card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); }
.card.dark { background: var(--navy); color: var(--on-dark); border-color: var(--navy); }
.card.link { color: var(--ink); }
.card.link:hover { color: var(--ink); }

.btn { min-height: var(--touch-min); padding: 0 var(--space-3); border-radius: var(--radius-control); border: 1.5px solid var(--navy); background: var(--ground); color: var(--navy); font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.btn.ghost { border-color: var(--navy); color: var(--navy); background: var(--ground); }
.btn.hot { background: var(--orange); border-color: var(--orange); color: var(--on-accent); }

input[type="text"], input[type="email"], input[type="url"], input[type="date"], select { min-height: 48px; border-radius: var(--radius-control); border: 1.5px solid var(--line); padding: 0 14px; background: var(--ground); color: var(--ink); width: 100%; }

.game-tabs, .game-sides { display: flex; flex-wrap: wrap; gap: 0; }
.game-tab, .game-side { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 0; background: var(--card); color: var(--navy); font-weight: 800; text-decoration: none; }

.box-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.box-table { width: 100%; border-collapse: collapse; font-size: var(--type-label); font-variant-numeric: tabular-nums; }
.box-table caption { text-align: left; font-weight: 700; padding: var(--space-2) 0 var(--space-tight); }
.box-table th, .box-table td { padding: var(--space-tight) var(--space-2); border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.box-table th:first-child { text-align: left; }
.box-table thead th { font-size: var(--type-caption); color: var(--muted); font-weight: 700; }
.box-table abbr { text-decoration: none; }
.box-table.team td { width: 30%; }

/* Two contrasting edges keep keyboard focus visible on both the page and film. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--ground);
}
@media (forced-colors: active) {
  :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline-color: Highlight; }
}

.text-caption { font-size: var(--type-caption); }
.text-small { font-size: var(--type-small); }
.key-label { width: 40px; }
.team-preview-logo { width: 44px; height: 44px; object-fit: contain; border-radius: var(--radius-control); background: var(--ground); }

.clip-number { font-size: var(--type-heading); width: 30px; }
.item.clip-item { min-height: 56px; }
.item.session-item { min-height: 64px; }
.item.stacked-item { flex-direction: column; align-items: stretch; gap: var(--space-2); }
.item.stacked-item.compact { gap: var(--space-tight); }
.field-hint { margin-bottom: var(--space-2); }

/* Native hidden panels must stay out of the layout when components set display. */
[hidden]:not([hidden="until-found"]) { display: none !important; }
