/* style.css — palette variables, glassmorphism base, layout, components.
   Mobile-first. Palette per spec §5. */

/* ------------------------------------------------------------ tokens */

:root {
  color-scheme: dark;
  --bg-primary: #081421;
  --bg-secondary: #10243b;

  --accent-gold: #d4af37;
  --accent-gold-soft: #f0cf6a;
  --accent-blue: #1e88e5;

  --text-primary: #ffffff;
  --text-secondary: #cfd8dc;

  --live: #ff4d5a;

  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-strong: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.12);
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.35);

  --radius: 18px;
  --radius-sm: 10px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ------------------------------------------------------------- base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg-primary);
}

/* fixed gradient layer — cheaper than background-attachment: fixed, which
   forces a repaint of the whole background on every scroll */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60rem 40rem at 110% -10%, rgba(30, 136, 229, 0.18), transparent 60%),
    radial-gradient(50rem 35rem at -20% 110%, rgba(212, 175, 55, 0.12), transparent 60%),
    linear-gradient(160deg, var(--bg-secondary), var(--bg-primary) 55%);
}

img {
  display: block;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

.container {
  width: min(1200px, 100% - 2rem);
  margin-inline: auto;
}

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--accent-blue);
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  left: 0.5rem;
}

/* ------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 20, 33, 0.75);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding-block: 0.7rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo svg {
  width: 30px;
  height: 30px;
  color: var(--accent-gold);
}

.logo strong {
  color: var(--accent-gold);
}

.tabs {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1 1 100%;
  order: 3;
}

.tabs::-webkit-scrollbar {
  display: none;
}

/* edge fades — applied by JS only on a side that has more tabs to scroll to */
.tabs.fade-right {
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 28px);
  mask-image: linear-gradient(to left, transparent 0, #000 28px);
}

.tabs.fade-left {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px);
  mask-image: linear-gradient(to right, transparent 0, #000 28px);
}

.tabs.fade-left.fade-right {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
}

.tab-btn {
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color 0.2s, background-color 0.2s, transform 0.2s;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--glass-bg-strong);
}

.tab-btn.active {
  color: var(--bg-primary);
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-soft));
  font-weight: 600;
}

.header-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.control-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  white-space: nowrap;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: var(--text-secondary);
  transition: color 0.2s, border-color 0.2s;
}

.time-icon {
  line-height: 1;
}

.control-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-gold);
}

.lang-switch {
  display: flex;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  overflow: hidden;
}

.lang-btn {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: color 0.2s, background-color 0.2s;
}

.lang-btn.active {
  color: var(--bg-primary);
  background: var(--accent-gold);
  font-weight: 600;
}

/* ------------------------------------------------------------ layout */

.panel {
  padding-block: 1.25rem 2.5rem;
}

.section-title {
  margin: 2rem 0 1rem;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.placeholder {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
}

.site-footer {
  padding: 1.5rem 1rem 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* -------------------------------------------------------------- hero */

.hero {
  padding: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}

.hero-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: var(--accent-gold);
  font-weight: 600;
}

.hero-phase {
  color: var(--text-secondary);
  font-weight: 400;
}

.live-badge {
  color: var(--live);
}

.hero-matchup {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(0.75rem, 3vw, 2rem);
  margin-bottom: 1.25rem;
}

.hero-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.flag {
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.flag-lg {
  width: clamp(48px, 8vw, 72px);
  height: auto;
}

.hero-team-name {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 600;
}

.hero-vs {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-score {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hero-score-sep {
  color: var(--accent-gold);
  margin-inline: 0.35rem;
}

.hero-meta {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* two simultaneous matches (group-stage final round) stacked under one label */
.hero-matchups {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 3.5vw, 1.75rem);
}

.hero-match {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hero-divider {
  width: min(420px, 80%);
  height: 1px;
  margin: 0 auto;
  background: var(--glass-border);
}

.hero-time {
  margin-top: 0.25rem;
  color: var(--text-primary);
  font-weight: 600;
}

/* --------------------------------------------------------- countdown */

.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1rem);
  margin-top: 1.75rem;
}

.count-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(60px, 10vw, 84px);
  padding: 0.7rem 0.5rem;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

.count-value {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.count-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

/* --------------------------------------------------------- dashboard */

.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 1.4rem 1rem;
  transition: transform 0.25s, border-color 0.25s;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.45);
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--accent-gold);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(30, 136, 229, 0.18));
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: center;
}

/* ------------------------------------------------------ schedule */

.schedule-toolbar {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.schedule-search {
  width: 100%;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(8, 20, 33, 0.6);
  color: var(--text-primary);
  font: inherit;
}

.schedule-search::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-control {
  flex: 1 1 150px;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(8, 20, 33, 0.6);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
}

.sort-btn {
  flex: 0 1 110px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.sort-btn:hover {
  border-color: var(--accent-gold);
}

.schedule-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.link-btn {
  color: var(--accent-blue);
  font-size: 0.85rem;
}

.btn-primary {
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-soft));
  color: var(--bg-primary);
  font-weight: 600;
  transition: filter 0.2s;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.1);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.link-btn:hover {
  text-decoration: underline;
}

.match-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.match-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1rem 1.1rem;
  /* dozens of cards on screen — backdrop blur here is a big paint cost for
     no visible gain over the smooth fixed gradient behind them */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(16, 36, 59, 0.55);
}

.match-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.match-phase {
  color: var(--accent-gold);
  font-weight: 600;
}

.match-status.live {
  color: var(--live);
  font-weight: 600;
}

.match-status.finished {
  color: var(--text-secondary);
}

.match-status.pending {
  color: var(--accent-blue);
  font-weight: 600;
}

.match-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
}

.match-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  text-align: center;
}

.match-team-name {
  font-size: 0.88rem;
  font-weight: 600;
}

.match-team-name.tbd {
  font-style: italic;
  font-weight: 400;
  color: var(--text-secondary);
}

.match-score {
  font-size: 1.45rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.match-score-sep {
  color: var(--accent-gold);
  margin-inline: 0.2rem;
}

.match-pens {
  display: block;
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.match-vs {
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.8rem;
}

.match-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ------------------------------------------------------ groups */

.standings-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0 0 1rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.qualified {
  background: var(--accent-blue);
}

.legend-dot.third {
  background: var(--accent-gold);
}

.groups-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}

.group-card {
  padding: 1rem 1.1rem 1.2rem;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(16, 36, 59, 0.55);
}

.group-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.group-card-header h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.group-progress {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.standings-table th {
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.standings-table th,
.standings-table td {
  padding: 0.34rem 0.3rem;
  text-align: center;
}

.standings-table .col-team {
  text-align: left;
  width: 99%;
}

.standings-table td.col-team {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.standings-table td.col-team span {
  min-width: 0;
}

.standings-table tbody tr {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.standings-table .row-qualified {
  background: rgba(30, 136, 229, 0.12);
}

.standings-table .row-third {
  background: rgba(212, 175, 55, 0.09);
}

.standings-table .col-pts {
  font-weight: 700;
}

@media (max-width: 420px) {
  .standings-table .col-goals {
    display: none;
  }
}

/* best third-placed teams table (shown once all 12 groups finish) */
.third-place {
  margin-top: 1rem;
  padding: 1rem 1.1rem 1.2rem;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(16, 36, 59, 0.55);
}

.third-place-note {
  margin: 0 0 0.7rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.third-place-keys {
  margin-bottom: 0.7rem;
}

.legend-dot.out {
  background: var(--text-secondary);
  opacity: 0.45;
}

.third-place-scroll {
  overflow-x: auto;
}

.standings-table .col-group {
  font-weight: 600;
  color: var(--accent-gold);
}

.third-place-table tr.row-third td:first-child {
  box-shadow: inset 3px 0 0 var(--accent-gold);
}

.third-place-table tr.row-out td {
  color: var(--text-secondary);
  opacity: 0.6;
}

.third-place-table tr.cut {
  border-top: 2px dashed rgba(255, 255, 255, 0.22);
}

.third-place-table .col-status {
  width: 1.6rem;
}

.third-place-table .qual-yes {
  color: var(--accent-gold);
  font-weight: 700;
}

.third-place-table .qual-no {
  color: var(--text-secondary);
}

/* ------------------------------------------------------ stadiums */

.stadiums-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.stadium-card {
  overflow: hidden;
  padding: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(16, 36, 59, 0.55);
}

.stadium-img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-bottom: 1px solid var(--glass-border);
}

.stadium-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.9rem 1.1rem 1.1rem;
}

.stadium-name {
  margin: 0;
  font-size: 1rem;
}

.stadium-city {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.stadium-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.35rem 0 0.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.stadium-stats strong {
  color: var(--text-primary);
}

.stadium-match-count {
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.72rem;
  white-space: nowrap;
}

.stadium-card .link-btn {
  align-self: flex-start;
  padding: 0;
}

/* ------------------------------------------------------ modal */

.match-card {
  cursor: pointer;
}

dialog.match-modal {
  width: min(560px, calc(100% - 2rem));
  padding: 0;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: linear-gradient(170deg, #122a45, var(--bg-primary) 70%);
  color: var(--text-primary);
  box-shadow: var(--shadow-soft);
}

dialog.match-modal::backdrop {
  background: rgba(4, 10, 18, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-content {
  padding: 1.4rem 1.5rem 1.6rem;
}

.modal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.modal-phase {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
}

.modal-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: color 0.2s, border-color 0.2s;
}

.modal-close:hover {
  color: var(--text-primary);
  border-color: var(--accent-gold);
}

.modal-matchup {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.modal-team-name {
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
}

.modal-score {
  font-size: 2.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.modal-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  padding: 1rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
}

.modal-info dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}

.modal-info dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.modal-stats h3 {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.modal-stat-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  padding: 0.4rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.modal-stat-row span:first-child {
  text-align: left;
}

.modal-stat-row span:last-child {
  text-align: right;
}

.modal-stat-label {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.modal-stats-note {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--text-secondary);
}

/* ------------------------------------------------------ favorites */

.fav-btn {
  padding: 0 0.2rem;
  font-size: 1em;
  line-height: 1;
  color: var(--text-secondary);
  transition: color 0.2s, transform 0.2s;
}

.fav-btn:hover {
  color: var(--accent-gold);
  transform: scale(1.2);
}

.fav-btn.active {
  color: var(--accent-gold);
}

.match-card.has-fav {
  border-left: 3px solid var(--accent-gold);
}

.standings-table .fav-row td.col-team span:first-of-type {
  color: var(--accent-gold);
}

.fav-filter.active {
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.16);
  color: var(--accent-gold);
}

.occ-filter {
  flex: 0 1 auto;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.occ-filter:hover {
  border-color: var(--accent-gold);
}

.occ-filter.active {
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.16);
  color: var(--accent-gold);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

/* ------------------------------------------------------- breakpoints */

/* mobile ≤767px: tighter spacing, stacked toolbar already handled by wrap */
@media (max-width: 767px) {
  .panel {
    padding-block: 0.9rem 2rem;
  }

  .hero {
    padding: 1.25rem 1rem 1.5rem;
  }

  .section-title {
    margin-top: 1.4rem;
  }
}

/* very narrow: collapse the time toggle to its icon so logo + controls stay on
   one row and the tab strip gets its own full-width scrollable row below */
@media (max-width: 420px) {
  .time-label {
    display: none;
  }

  .control-btn {
    padding: 0.35rem 0.55rem;
  }
}

/* single-row header only once logo + 6 tabs + controls genuinely fit (~950px of
   content + container padding); below this the tabs keep their own scroll row,
   so the controls never wrap into a broken second line. */
@media (min-width: 1100px) {
  .tabs {
    flex: 0 1 auto;
    order: 0;
    margin-inline: auto;
  }
}

/* desktop 1440px+: full-width layout */
@media (min-width: 1440px) {
  .container {
    width: min(1360px, 100% - 4rem);
  }

  .hero-team-name {
    font-size: 1.5rem;
  }
}
