/* Shared SIL7 type scale. Load after component styles so every screen uses
   the same family and real font weights. Logo artwork and icon sizes stay local. */
:root {
  --sil7-font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sil7-text-xs: 10px;
  --sil7-text-sm: 11px;
  --sil7-text-compact: 12px;
  --sil7-text-body: 13px;
  --sil7-text-title: 16px;
  --sil7-weight-regular: 400;
  --sil7-weight-medium: 500;
  --sil7-weight-semibold: 600;
  --sil7-weight-bold: 700;
}

body,
.sil7-header-panel {
  font-family: var(--sil7-font);
  font-size: var(--sil7-text-body);
  font-weight: var(--sil7-weight-regular);
  line-height: 1.4;
}

.app-shell :is(button, input, select, textarea),
.sil7-header-panel :is(button, input, select, textarea) {
  font-family: var(--sil7-font);
}

/* Navigation: consistent semibold labels; state changes color, not width. */
.app-shell :is(.filter-label, .mode-label, .match-section-tab),
.sil7-header-panel :is(.sil7-sport-option strong, .sil7-profile-settings) {
  font-size: var(--sil7-text-body);
  font-weight: var(--sil7-weight-semibold);
  line-height: 1.3;
  letter-spacing: 0;
  text-shadow: none;
}

.app-shell .mode-count {
  /* The legacy footer defines an important weight; retain its hidden Live
     counter sizing and override only the type weight. */
  font-weight: var(--sil7-weight-bold) !important;
  font-variant-numeric: tabular-nums;
}

.app-shell :is(.date-day, .date-month) {
  font-size: 8px;
  font-weight: var(--sil7-weight-semibold);
  line-height: 1.15;
  letter-spacing: .02em;
}

.app-shell .date-number {
  font-weight: var(--sil7-weight-bold);
  font-variant-numeric: tabular-nums;
}

.app-shell :is(.time-filter-title, .time-filter-value, .time-scale-label) {
  font-size: var(--sil7-text-xs);
  font-weight: var(--sil7-weight-medium);
  line-height: 1.2;
  letter-spacing: 0;
}

/* Calendar, countries, tournaments and match list. */
.app-shell .country-name {
  font-size: var(--sil7-text-body);
  font-weight: var(--sil7-weight-semibold);
  line-height: 1.3;
}

.app-shell :is(.country-stat, .country-caption, .country-league-count, .country-match-count) {
  font-size: var(--sil7-text-xs);
  font-weight: var(--sil7-weight-medium);
  line-height: 1.2;
}

.app-shell .country-stat-value {
  font-size: var(--sil7-text-xs);
  font-weight: var(--sil7-weight-semibold);
  line-height: 1.2;
}

.app-shell .country-league-name {
  font-size: var(--sil7-text-compact);
  font-weight: var(--sil7-weight-medium);
  line-height: 1.3;
}

.app-shell :is(.league-stage-title, .collected-back),
.sil7-header-panel .sil7-header-panel-head h2 {
  font-size: var(--sil7-text-title);
  font-weight: var(--sil7-weight-semibold);
  line-height: 1.3;
  letter-spacing: 0;
}

.app-shell .league-match-team > strong {
  font-size: var(--sil7-text-body);
  font-weight: var(--sil7-weight-medium);
  line-height: 1.35;
}

.app-shell .league-match-datetime strong {
  font-size: var(--sil7-text-body);
  font-weight: var(--sil7-weight-semibold);
  line-height: 1.2;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.app-shell .league-match-datetime span {
  font-size: var(--sil7-text-xs);
  font-weight: var(--sil7-weight-medium);
  line-height: 1.2;
  letter-spacing: 0;
}

/* Match card and H2H: score remains prominent; names use the same weight. */
.collected-match-page .match-hero-team > strong {
  font-size: var(--sil7-text-body);
  font-weight: var(--sil7-weight-semibold);
  line-height: 1.35;
}

.collected-match-page :is(.match-hero-time, .league-team-logo-fallback) {
  font-weight: var(--sil7-weight-bold);
}

.collected-match-page .match-hero-date {
  font-size: var(--sil7-text-xs);
  font-weight: var(--sil7-weight-medium);
  line-height: 1.3;
}

.collected-match-page .match-hero-status {
  font-size: var(--sil7-text-xs);
  font-weight: var(--sil7-weight-medium);
  line-height: 1.3;
}

.collected-content :is(.collected-section h3, .collected-history-label) {
  font-size: var(--sil7-text-body);
  font-weight: var(--sil7-weight-semibold);
  line-height: 1.4;
}

.collected-content .collected-history-game {
  font-size: var(--sil7-text-body);
  line-height: 1.35;
}

.collected-content .collected-history-team { font-weight: var(--sil7-weight-medium); }
.collected-content :is(.collected-history-team.is-winner, .collected-history-score, .collected-history-outcome) {
  font-weight: var(--sil7-weight-bold);
}

.collected-content :is(.collected-history-date, .collected-history-count, .collected-history-result-type, .collected-stat-value small) {
  font-size: var(--sil7-text-xs);
  font-weight: var(--sil7-weight-medium);
  line-height: 1.4;
}

.collected-content :is(.collected-history-league, .collected-history-perspective, .collected-stats-head, .collected-odds-row small) {
  font-size: var(--sil7-text-sm);
  font-weight: var(--sil7-weight-regular);
  line-height: 1.4;
}

/* The middle header cell is empty; let the two names use its space. */
.collected-content .collected-stats-head {
  grid-template-columns: minmax(0, 1fr) 0 minmax(0, 1fr);
}

@media (max-width: 340px) {
  .collected-match-page .match-hero-team > strong {
    font-size: var(--sil7-text-compact);
  }
}

/* Compact period tabs keep five hockey tabs usable on narrow screens. */
.collected-period-tab {
  font-size: var(--sil7-text-compact);
  font-weight: var(--sil7-weight-semibold);
}

.collected-stat-label {
  font-size: var(--sil7-text-compact);
  font-weight: var(--sil7-weight-medium);
  line-height: 1.4;
}

.collected-content :is(.collected-stat-value, .collected-odds-row) {
  font-size: var(--sil7-text-body);
  line-height: 1.4;
}

.collected-stat-value,
.collected-odds-row strong { font-weight: var(--sil7-weight-semibold); }

.collected-content :is(.collected-empty, .collected-retry),
.sil7-header-panel .sil7-panel-note {
  font-size: var(--sil7-text-body);
  font-weight: var(--sil7-weight-regular);
  line-height: 1.5;
}

/* Profile, settings and search share the same hierarchy as match screens. */
.sil7-header-panel :is(.sil7-profile-card strong, .sil7-search-entity) {
  font-size: var(--sil7-text-body);
  font-weight: var(--sil7-weight-semibold);
}

.sil7-header-panel :is(.sil7-search-label, .sil7-language-label, .sil7-settings-toggle, .sil7-search-result strong, .sil7-search-match strong) {
  font-size: var(--sil7-text-body);
  font-weight: var(--sil7-weight-medium);
  line-height: 1.4;
}

.sil7-header-panel :is(.sil7-search-result small, .sil7-search-match small, .sil7-settings-toggle small, .sil7-language-status) {
  font-size: var(--sil7-text-sm);
  font-weight: var(--sil7-weight-regular);
  line-height: 1.4;
}

/* At least 16px for editable controls prevents focus zoom in iOS. */
#sil7HeaderSearch,
.sil7-header-panel .sil7-language-select {
  font-family: var(--sil7-font);
  font-size: 16px;
  font-weight: var(--sil7-weight-regular);
  line-height: 1.4;
}
