.live-page {
  background: #f8fafc;
  min-height: calc(100vh - 84px);
}

.live-shell {
  max-width: 1120px;
  margin: 0 auto;
}

.live-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.live-tab {
  background-color: var(--deep-teal);
  border: 0;
  color: #ffffff;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
  text-transform: none;
}

.live-tab:hover, .live-tab.active {
  background-color: var(--vibrant-orange);
}

.live-tab.active {
  background-color: var(--vibrant-orange);
}

.live-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.live-panel[hidden] { display: none; }

.live-panel-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
}

.live-panel-header h2 {
  color: var(--deep-teal);
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 900;
  text-transform: uppercase;
  margin: 0;
}

.live-panel-header p { color: var(--text-light); font-size: 0.85rem; margin-top: 0.25rem; }
.live-updated { color: var(--text-light); font-size: 0.8rem; margin: 0.25rem 0 0; }

.live-filters {
  display: flex;
  gap: 0.6rem;
  width: min(100%, 500px);
}

.live-input {
  min-width: 0;
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: var(--text-dark);
  font: inherit;
  border-radius: 0.35rem;
}

.live-input:focus { border-color: var(--vibrant-orange); outline: 2px solid rgba(249, 115, 22, 0.14); }

.live-table-wrap { overflow-x: auto; }
.live-team-list { display: flex; flex-direction: column; }
.live-team {
  border-bottom: 1px solid #e2e8f0;
}
.live-category-heading {
  margin: 0;
  padding: 0.65rem 1.25rem;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  color: var(--deep-teal);
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.live-team-summary {
  display: grid;
  grid-template-columns: 1.25rem 3.5rem 4rem minmax(12rem, 1fr) 7rem 6rem;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 1.25rem;
  cursor: pointer;
  list-style: none;
}
.live-team-summary::-webkit-details-marker { display: none; }
.live-team-summary::before { content: '›'; color: var(--vibrant-orange); font-size: 1.5rem; }
.live-team[open] .live-team-summary::before { content: '⌄'; }
.live-team-summary:hover { background: #f8fafc; }
.live-team-summary::after { content: ''; }
.live-rank { font-weight: 900; color: var(--deep-teal); }
.live-team-name { display: flex; flex-direction: column; gap: 0.05rem; }
.live-team-name { min-width: 0; overflow-wrap: anywhere; }
.live-team-name small { color: var(--text-light); font-size: 0.75rem; }
.live-time { font-variant-numeric: tabular-nums; }
.live-time, .live-status { width: 6rem; box-sizing: border-box; }
.live-status {
  display: inline-flex;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.2rem 0.45rem;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 0;
}
.live-status.im-ziel { background: #dcfce7; color: #166534; }
.live-status.läuft { background: #dbeafe; color: #1d4ed8; }
.live-status.mp, .live-status.dsq, .live-status.posten-fehlt { background: #fee2e2; color: #991b1b; }
.live-status-placeholder { visibility: hidden; }
.live-members { padding: 0 1.5rem 1rem 6.5rem; background: #f8fafc; }
.live-member {
  display: grid;
  grid-template-columns: 3rem minmax(12rem, 1fr) 7rem 10rem;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.9rem;
}
.live-member:last-child { border-bottom: 0; }
.live-leg { color: var(--text-light); font-weight: 700; }
.live-member-time { font-variant-numeric: tabular-nums; width: 10rem; }
.live-performance { margin-left: 0.35rem; font-weight: 900; }
.live-performance.better { color: #16a34a; }
.live-performance.worse { color: #dc2626; }
.live-performance.unchanged { color: var(--text-light); }
.live-table { width: 100%; border-collapse: collapse; min-width: 650px; }
.live-table th, .live-table td { padding: 0.9rem 1rem; text-align: left; border-bottom: 1px solid #e2e8f0; }
.live-table th { background: #f8fafc; color: #475569; font-family: var(--font-logo); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; }
.live-table td { color: var(--text-dark); font-size: 0.9rem; }
.live-table tbody tr:hover { background: #fff7ed; }
.live-funkposten-cell { text-align: right !important; }
.live-funkposten-badge {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  background: var(--vibrant-orange);
  color: #fff;
  font-weight: 700;
  border-radius: 0.2rem;
}
.live-table td:first-child, .live-table th:first-child { padding-left: 1.5rem; }
.live-table td:last-child, .live-table th:last-child { padding-right: 1.5rem; }

.live-empty { display: none; color: var(--text-light); padding: 2rem 1.5rem; text-align: center; }
.live-empty.visible { display: block; }
.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; }

@media (max-width: 767px) {
  .live-page { padding: 2rem 4% 3rem; }
  .live-panel-header { align-items: stretch; flex-direction: column; }
  .live-filters { min-width: 0; flex-direction: column; }
  .live-tabs { overflow-x: auto; }
  .live-tab { white-space: nowrap; padding-left: 0.9rem; padding-right: 0.9rem; }
  .live-table-wrap { overflow-x: auto; }
  .live-team-list { min-width: 760px; }
  .live-team-summary { padding-left: 1rem; padding-right: 1rem; }
  .live-members { padding-left: 3rem; padding-right: 1rem; }
}
