:root {
  --yellow: #ffdf00;
  --light-blue: #2ca8e0;
  --blue: #2b65ae;
  --red: #be2b26;
  --dark: #2c292a;
  --header: #191a1d;
  --ink: #111820;
  --muted: #657281;
  --line: #dfe6ec;
  --line-soft: #eaf0f4;
  --surface: #f5f7f9;
  --surface-blue: #f2f8fc;
  --panel: #ffffff;
  --green: #228c49;
  --orange: #e87500;
  --shadow: 0 12px 34px rgba(20, 37, 54, .07);
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--surface);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, #f7f9fa 0, #eef2f5 100%); }
button, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .42; }
.ui-icon { width: 1.35em; height: 1.35em; flex: 0 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  color: var(--ink);
  background: #fff;
  border-bottom: 4px solid #e20916;
}
.site-header::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: -4px;
  width: 130px;
  height: 4px;
  background: #e20916;
  transform: skewX(-30deg);
}
.site-header__inner {
  width: min(1370px, calc(100% - 40px));
  min-height: 36px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ets-brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.ets-brand__logo {
  display: block;
  width: auto;
  height: 24px;
  max-width: 150px;
}
.ets-brand__logo--dark { display: none; }
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.theme-switch {
  position: relative;
  width: 144px;
  height: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  padding: 3px;
  border: 1px solid #d7dde2;
  border-radius: 999px;
  background: #eef1f3;
  box-shadow: inset 0 1px 2px rgba(20, 37, 54, .06);
  overflow: hidden;
}
.theme-switch__thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 3);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 5px rgba(20, 37, 54, .18);
  transition: transform .2s ease;
}
html[data-theme-setting="light"] .theme-switch__thumb { transform: translateX(100%); }
html[data-theme-setting="dark"] .theme-switch__thumb { transform: translateX(200%); }
.theme-switch button {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 3px;
  border: 0;
  border-radius: 999px;
  color: #64717d;
  background: transparent;
  font-size: 8px;
  font-weight: 850;
  line-height: 1;
}
.theme-switch button[aria-pressed="true"] { color: #e20916; }
.theme-switch__icon { font-size: 10px; line-height: 1; }
.menu-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-content: center;
  gap: 5px;
  border: 0;
  border-radius: 10px;
  background: transparent;
}
.menu-button span { width: 25px; height: 2px; display: block; background: #e20916; border-radius: 2px; }

.app-shell {
  width: min(1370px, calc(100% - 40px));
  margin: 0 auto 84px;
}
.event-header { padding: 28px 16px 20px; }
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  color: #203668;
  background: transparent;
  font-weight: 800;
}
.event-header__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 30px;
}
.event-header h1 {
  max-width: 1050px;
  margin: 0 0 17px;
  font-size: clamp(31px, 4vw, 45px);
  line-height: 1.02;
  letter-spacing: -.035em;
}
.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  color: #5c6977;
  font-size: 14px;
  font-weight: 650;
}
.event-meta span { display: inline-flex; align-items: center; gap: 8px; }
.event-meta .ui-icon { color: #556777; }
.event-meta__class { color: #203668; font-weight: 850; }
.event-meta__class .ui-icon { color: #203668; }
.event-state {
  min-width: 185px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(25, 42, 57, .04);
}
.event-state strong { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.event-state strong span { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.event-state small { display: block; margin: 7px 0 0 17px; color: var(--muted); line-height: 1.45; }
.event-state--planned strong span { background: var(--blue); }
.event-state--ended strong span { background: #87919a; }

.filter-bar {
  display: grid;
  grid-template-columns: minmax(280px, 380px);
  gap: 10px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.92);
  box-shadow: 0 8px 25px rgba(20, 37, 54, .04);
}
.filter-control {
  min-width: 0;
  min-height: 68px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.filter-control__icon { color: #0672c6; font-size: 20px; }
.filter-control__copy { min-width: 0; display: grid; gap: 3px; }
.filter-control__copy small { color: #71808e; font-size: 10px; font-weight: 850; letter-spacing: .04em; }
.filter-control__copy strong { overflow: hidden; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.filter-control select {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  appearance: none;
  color: var(--ink);
  background: transparent;
  font-weight: 850;
  font-size: 13px;
}
.filter-control__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #203668;
  background: #eef3f8;
  box-shadow: inset 0 0 0 1px #d7e0e8;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  flex: 0 0 34px;
}

.filter-control {
  cursor: pointer;
}

.filter-control:hover .filter-control__chevron,
.filter-control:focus-within .filter-control__chevron {
  background: #e7edf4;
  box-shadow: inset 0 0 0 1px #c4d0da;
}

html[data-theme="dark"] .filter-control__chevron {
  color: #e4ebf1;
  background: #23303c;
  box-shadow: inset 0 0 0 1px #44515d;
}

html[data-theme="dark"] .filter-control:hover .filter-control__chevron,
html[data-theme="dark"] .filter-control:focus-within .filter-control__chevron {
  background: #2b3946;
  box-shadow: inset 0 0 0 1px #55626f;
}

html[data-theme="dark"] .filter-bar {
  background: #18212c;
}

html[data-theme="dark"] .event-state {
  background: #1b2026;
  border-color: #24303d;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}

html[data-theme="dark"] .filter-control {
  border-color: #24303d;
  background: #101822;
  box-shadow: 0 8px 25px rgba(0, 0, 0, .18);
}

html[data-theme="dark"] .filter-control select {
  color: #e6edf3;
}

@media (max-width: 760px) {
  .filter-control__chevron {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 15px;
  }
}

.tabs {
  position: sticky;
  top: 8px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0 0 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.tab {
  position: relative;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  border: 0;
  border-right: 1px solid var(--line-soft);
  color: #4e5d6b;
  background: transparent;
  font-weight: 750;
}
.tab:last-child { border-right: 0; }
.tab .ui-icon { font-size: 18px; }
.tab b {
  min-width: 23px;
  height: 23px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  color: #596675;
  background: #eef2f5;
  font-size: 11px;
}
.tab.is-active { color: #096bb7; background: #fbfdff; }
.tab.is-active::after { content: ""; position: absolute; right: 12px; bottom: 0; left: 12px; height: 3px; border-radius: 3px 3px 0 0; background: #1688dc; }

.tab-pane { display: none; }
.tab-pane.is-active { display: block; animation: pane-in .18s ease; }
@keyframes pane-in { from { opacity: .35; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.overview-layout {
  display: grid;
  grid-template-columns: minmax(390px, .8fr) minmax(620px, 1.2fr);
  gap: 18px;
  align-items: start;
}
.overview-column { display: grid; gap: 16px; }
.dashboard-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.dashboard-card__header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 17px;
  border-bottom: 1px solid var(--line-soft);
  background: #e5e5e5;
}
.dashboard-card__header h2 { margin: 0; font-size: 19px; }
.dashboard-card__header h2 span {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  margin-left: 4px;
  padding: 0 7px;
  border-radius: 999px;
  color: #5a6877;
  background: #edf1f4;
  font-size: 11px;
}
.dashboard-card__header > button {
  padding: 0;
  border: 0;
  color: #e20916;
  background: transparent;
  font-size: 12px;
  font-weight: 850;
}
.dashboard-card__header--stats { align-items: center; }
.report-stats { display: flex; align-items: center; }
.report-stats > span { min-width: 92px; display: grid; gap: 2px; padding: 0 14px; text-align: center; border-left: 1px solid var(--line-soft); }
.report-stats > span:first-child { border-left: 0; }
.report-stats strong { color: var(--green); font-size: 19px; }
.report-stats span:nth-child(2) strong { color: var(--orange); }
.report-stats span:nth-child(3) strong { color: #697684; }
.report-stats small { color: #596675; font-size: 10px; }

.overview-list { display: grid; }
.overview-row {
  width: 100%;
  min-height: 49px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: #fff;
  text-align: left;
}
.overview-row:last-child { border-bottom: 0; }
.overview-row:hover { background: #f8fbfd; }
.overview-row__icon { color: #203668; font-size: 15px; }
.overview-row__copy { min-width: 0; display: grid; gap: 2px; }
.overview-row__copy strong { overflow: hidden; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.overview-row__copy small { overflow: hidden; color: var(--muted); font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.overview-row__arrow { color: #607080; font-size: 12px; }

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}
.chip--green { color: #227942; background: #e7f6e9; }
.chip--blue { color: #e20916; background: #fbeaec; }

.participant-open {
  width: 100%;
  min-height: 88px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border: 0;
  background: #fff;
  text-align: left;
}
.participant-open:hover { background: #f9fbfd; }
.participant-open__icon, .feature-card__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #0d74c4;
  background: #e3f2fc;
  font-size: 23px;
}
.participant-open span:nth-child(2) { display: grid; gap: 4px; }
.participant-open strong { font-size: 16px; }
.participant-open small { color: var(--muted); }
.participant-open > span:last-child { color: #657483; }

.dashboard-card--runs { min-width: 0; }
.run-accordion { display: grid; gap: 10px; padding: 14px; }
.run-accordion--compact { padding-top: 8px; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.phase {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  overflow: hidden;
}
.phase > summary {
  min-height: 59px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  cursor: pointer;
}
.phase[open] > summary { border-bottom: 1px solid var(--line); background: #fbfdfe; }
.phase__title { min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.phase__title strong { font-size: 15px; }
.phase__title em { color: var(--muted); font-size: 10px; font-style: normal; }
.phase__tools, .group__tools { display: flex; align-items: center; gap: 12px; }
.accordion-chevron {
  width: 9px;
  height: 9px;
  display: block;
  border-right: 2px solid #415467;
  border-bottom: 2px solid #415467;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
}
details[open] > summary .accordion-chevron { transform: rotate(225deg) translate(-1px, -1px); }
.phase__content { display: grid; gap: 9px; padding: 12px; background: #f5f9fc; }
.group {
  border: 1px solid #d9e3eb;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.group > summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  padding: 9px 14px;
  cursor: pointer;
}
.group[open] > summary { background: #f8fbfd; border-bottom: 1px solid var(--line-soft); }
.group__title { min-width: 0; display: flex; align-items: baseline; gap: 9px; }
.group__title strong { font-size: 14px; }
.group__title small { color: var(--muted); font-size: 10px; }
.run-list { display: grid; gap: 8px; padding: 9px; background: #f2f7fa; }
.run-button {
  width: 100%;
  min-height: 55px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  text-align: left;
}
.run-button:hover { border-color: #bfd7e8; background: #fbfdff; }
.run-button__icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 0px solid #bfd2df;
  border-radius: 7px;
  color: #41576a;
  font-size: 18px;
}
.run-button__copy { min-width: 0; display: grid; gap: 3px; }
.run-button__copy strong { font-size: 13px; }
.run-button__copy small { overflow: hidden; color: var(--muted); font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.run-button__arrow { color: #506476; font-size: 12px; }
.run-button__icon.run-button__icon--available { color: var(--green); }
.run-button__icon.run-button__icon--unavailable { color: var(--red); }
.empty-inline { margin: 8px; color: var(--muted); font-size: 13px; }

.page-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin: 30px 4px 16px;
}
.page-section-heading h2 { margin: 3px 0 0; font-size: clamp(25px, 3vw, 38px); }
.page-section-heading p { max-width: 620px; margin: 0; color: var(--muted); }
.eyebrow { color: var(--blue); font-size: 10px; font-weight: 950; letter-spacing: .14em; }
.schedule-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.schedule-day {
  position: relative;
  min-height: 195px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 22px 20px 18px 27px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: left;
}
.schedule-day__accent { position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--blue); }
.schedule-day:first-child .schedule-day__accent { background: var(--yellow); }
.schedule-day:last-child .schedule-day__accent { background: var(--red); }
.schedule-day__weekday { color: #687583; font-size: 11px; font-weight: 850; }
.schedule-day__day { font-size: 45px; line-height: 1; }
.schedule-day__month { color: #556270; font-size: 12px; font-weight: 650; }
.schedule-day__link { margin-top: auto; display: inline-flex; align-items: center; gap: 7px; color: #0872c2; font-size: 12px; font-weight: 850; }

.feature-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 27px;
}
.feature-card h3 { margin: 0 0 5px; font-size: 21px; }
.feature-card p { margin: 0; color: var(--muted); }
.primary-button {
  min-height: 47px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--blue);
  font-weight: 850;
}
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.module-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: left;
}
.module-card:hover { border-color: #bfd5e5; }
.module-card__icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #0873c2;
  background: #e4f3fd;
  font-size: 22px;
}
.module-card__icon--yellow { color: #8c7300; background: #fff3b7; }
.module-card > span:nth-child(2) { display: grid; gap: 4px; }
.module-card strong { font-size: 17px; }
.module-card small { color: var(--muted); }
.module-card > span:last-child { color: #596b7c; }
.runs-page-card { padding-bottom: 4px; }

.mobile-dock { display: none; }
.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal__backdrop { position: absolute; inset: 0; border: 0; background: rgba(10, 18, 25, .72); backdrop-filter: blur(5px); }
.modal__panel {
  position: relative;
  width: min(1320px, 100%);
  max-height: 92vh;
  display: grid;
  grid-template-rows: auto auto 1fr;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 30px 100px rgba(0,0,0,.35);
}
.modal__header {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  color: #fff;
  background: #e20916;
  border-bottom: 4px solid #000;
}
.modal__header small { color: #b9c2ca; font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.modal__header h2 { margin: 2px 0 0; font-size: 20px; }
.modal__header > div { min-width: 0; }
.modal__header button {
  width: 42px;
  height: 42px;
  min-width: 42px;
  flex: 0 0 42px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid rgba(255,255,255,.85);
  border-radius: 50%;
  color: #fff;
  background: transparent;
  font-size: 27px;
  line-height: 1;
}
.modal__section-name {
  min-width: 0;
  padding: 10px 20px;
  color: #202b35;
  background: #ffffff;
  border-bottom: 1px solid #dbe3ea;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.modal__section-name[hidden] { display: none; }
.modal__body { overflow: auto; padding: 22px; background: #f4f7f9; }
.modal-open { overflow: hidden; }
.report-view__heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.report-view__heading h2 { margin: 3px 0 0; }
.report-view__heading--status-only { justify-content: flex-end; margin-bottom: 12px; }
.status { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: 9px; font-weight: 950; white-space: nowrap; }
.report-block { margin: 0 0 18px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.report-block h3 { margin: 0 0 12px; font-size: 16px; }
.table-scroll { overflow: auto; -webkit-overflow-scrolling: touch; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}
.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 9px;
  color: #2b4156;
  background: #edf3f7;
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid #dde5eb;
}
.data-table td {
  padding: 10px 9px;
  color: #15191d;
  background: #ffffff;
  border-bottom: 1px solid #e4eaef;
  font-size: 13px;
}
.data-table tbody tr:nth-child(even) td { background: #f5f7f9; }
.data-table tbody tr:hover td { background: #f8fbfd; }
.data-table tr:last-child td { border-bottom: 0; }
.loader { min-height: 240px; display: grid; place-items: center; color: var(--muted); font-weight: 800; }
.empty-state { padding: 30px; border: 1px dashed #b9c6d1; border-radius: 12px; color: #485560; background: #fff; }
.empty-state pre { max-height: 420px; overflow: auto; padding: 12px; border-radius: 8px; color: #e6eef4; background: #16191d; font-size: 11px; }
.setup-error { width: min(800px, calc(100% - 28px)); margin: 70px auto; padding: 36px; border: 1px solid #f0c4c1; border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.setup-error h1 { font-size: clamp(28px, 5vw, 48px); }
.setup-error code { padding: 2px 5px; border-radius: 4px; background: #edf2f5; }

@media (max-width: 1060px) {
  .overview-layout { grid-template-columns: 1fr; }
  .schedule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.report-block--schedule.report-block--without-title {
  padding: 0;
  overflow: hidden;
}

.report-block--schedule.report-block--without-title .table-scroll {
  border-radius: 11px 11px 0 0;
  overflow: auto;
}

.report-block--schedule.report-block--without-title .data-table--schedule {
  border-collapse: separate;
  border-spacing: 0;
}

.report-block--schedule.report-block--without-title .data-table--schedule thead th:first-child {
  border-top-left-radius: 11px;
}

.report-block--schedule.report-block--without-title .data-table--schedule thead th:last-child {
  border-top-right-radius: 11px;
}

.data-table--schedule { table-layout: fixed; min-width: 760px; }
.data-table--schedule .col--starttime,
.data-table--schedule .col--endtime { width: 105px; white-space: nowrap; }
.data-table--schedule .col--reportgroup { width: 22%; white-space: nowrap; }
.data-table--schedule .col--reportheat { width: 22%; white-space: nowrap; }
.data-table--schedule .col--comment { width: auto; white-space: normal; }

.data-table--controlled-ranking { table-layout: fixed; }
.data-table--controlled-ranking .col--rank,
.data-table--controlled-ranking .col--country,
.data-table--controlled-ranking .col--besttime { text-align: center; white-space: nowrap; }
.data-table--controlled-ranking .col--rank { width: 64px; }
.data-table--controlled-ranking .col--country { width: 72px; }
.data-table--controlled-ranking .col--driver {
  width: auto;
  max-width: none;
  overflow: visible;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}
.data-table--controlled-ranking .controlled-driver__name { font-weight: 800; }
.data-table--controlled-ranking .controlled-driver__prename { font-weight: 400; }
.data-table--controlled-ranking .col--besttime { width: 130px; }
.data-table--controlled-ranking .col--heatinfo { width: 34%; white-space: normal; }

.country-flag {
  width: 30px;
  max-width: 100%;
  height: auto;
  display: inline-block;
  vertical-align: middle;
}


.report-block--qualifying-ranking.report-block--without-title {
  padding: 0;
  overflow: hidden;
}
.report-block--qualifying-ranking.report-block--without-title .table-scroll {
  border-radius: 11px 11px 0 0;
  overflow: auto;
}
.report-block--qualifying-ranking.report-block--without-title .data-table--qualifying-ranking {
  border-collapse: separate;
  border-spacing: 0;
}
.report-block--qualifying-ranking.report-block--without-title .data-table--qualifying-ranking thead th:first-child {
  border-top-left-radius: 11px;
}
.report-block--qualifying-ranking.report-block--without-title .data-table--qualifying-ranking thead th:last-child {
  border-top-right-radius: 11px;
}

.report-block--controlled-ranking.report-block--without-title {
  padding: 0;
  overflow: hidden;
}
.report-block--controlled-ranking.report-block--without-title .table-scroll {
  border-radius: 11px 11px 0 0;
  overflow: auto;
}
.report-block--controlled-ranking.report-block--without-title .data-table--controlled-ranking {
  border-collapse: separate;
  border-spacing: 0;
}
.report-block--controlled-ranking.report-block--without-title .data-table--controlled-ranking thead th:first-child {
  border-top-left-radius: 11px;
}
.report-block--controlled-ranking.report-block--without-title .data-table--controlled-ranking thead th:last-child {
  border-top-right-radius: 11px;
}

.report-block--final-ranking.report-block--without-title {
  padding: 0;
  overflow: hidden;
}
.report-block--final-ranking.report-block--without-title .table-scroll {
  border-radius: 11px 11px 0 0;
  overflow: auto;
}
.report-block--final-ranking.report-block--without-title .data-table--final-ranking {
  border-collapse: separate;
  border-spacing: 0;
}
.report-block--final-ranking.report-block--without-title .data-table--final-ranking thead th:first-child {
  border-top-left-radius: 11px;
}
.report-block--final-ranking.report-block--without-title .data-table--final-ranking thead th:last-child {
  border-top-right-radius: 11px;
}

.data-table--qualifying-ranking .col--pos,
.data-table--qualifying-ranking .col--country,
.data-table--qualifying-ranking .col--pts { text-align: center; white-space: nowrap; }
.data-table--qualifying-ranking .col--driver { font-weight: 400; }
.data-table--qualifying-ranking .controlled-driver__name { font-weight: 800; }
.data-table--qualifying-ranking .controlled-driver__prename { font-weight: 400; }
.data-table--qualifying-ranking .col--pointsinfo { white-space: nowrap; }


.data-table--final-ranking { table-layout: fixed; }
.data-table--final-ranking .col--rank,
.data-table--final-ranking .col--country,
.data-table--final-ranking .col--rnd,
.data-table--final-ranking .col--endtime,
.data-table--final-ranking .col--besttime,
.data-table--final-ranking .col--points {
  text-align: center;
  white-space: nowrap;
}
.data-table--final-ranking .col--rank { width: 52px; }
.data-table--final-ranking .col--country { width: 64px; }
.data-table--final-ranking .col--driver {
  width: auto;
  font-weight: 400;
  line-height: 1.25;
  white-space: normal;
}
.data-table--final-ranking .controlled-driver__name { font-weight: 800; }
.data-table--final-ranking .controlled-driver__prename { font-weight: 400; }
.data-table--final-ranking .col--rnd { width: 66px; }
.data-table--final-ranking .col--endtime,
.data-table--final-ranking .col--besttime { width: 118px; }
.data-table--final-ranking .col--points { width: 58px; }
.data-table--final-ranking .col--pointsinfo { width: 22%; white-space: normal; }
.data-table--final-ranking tbody tr.final-ranking-group-break td {
  border-top: 2px solid var(--light-blue);
}

@media (max-width: 760px) {
  .report-block--schedule { padding: 10px 6px; }
  .report-block--schedule.report-block--without-title {
    padding: 0;
    overflow: hidden;
  }
  .report-block--schedule h3 { padding: 0 5px; }
  .data-table--schedule { min-width: 0; width: 100%; table-layout: fixed; }
  .data-table--schedule th,
  .data-table--schedule td { padding: 6px 4px; font-size: 12px; vertical-align: top; }
  .data-table--schedule th { letter-spacing: .015em; overflow-wrap: anywhere;
  text-transform: none;
}
  .data-table--schedule .col--starttime { width: 12%; white-space: nowrap; }
  .data-table--schedule .col--endtime { width: 12%; white-space: nowrap; }
  .data-table--schedule .col--reportgroup { width: 16%; white-space: nowrap; overflow-wrap: normal; }
  .data-table--schedule .col--reportheat { width: 26%; white-space: nowrap; overflow-wrap: normal; }
  .data-table--schedule .col--comment { width: 34%; overflow-wrap: anywhere; }

  .data-table--schedule th.col--reportgroup,
  .data-table--schedule th.col--reportheat { white-space: nowrap; overflow-wrap: normal; }

  .report-block--controlled-ranking,
  .report-block--qualifying-ranking,
  .report-block--final-ranking { padding: 10px 6px; }
  .report-block--controlled-ranking.report-block--without-title,
  .report-block--qualifying-ranking.report-block--without-title,
  .report-block--final-ranking.report-block--without-title {
    padding: 0;
    overflow: hidden;
  }
  .report-block--controlled-ranking h3,
  .report-block--qualifying-ranking h3,
  .report-block--final-ranking h3 { padding: 0 5px; }
  .data-table--controlled-ranking { min-width: 0; width: 100%; table-layout: fixed; }
  .data-table--controlled-ranking th,
  .data-table--controlled-ranking td { padding: 6px 4px; font-size: 12px; }
  .data-table--controlled-ranking th { letter-spacing: .025em; }
  .data-table--controlled-ranking .col--rank { width: 8%; }
  .data-table--controlled-ranking .col--country { width: 8%; }
  .data-table--controlled-ranking .col--driver {
    width: 45%;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }
  .data-table--controlled-ranking .col--besttime { width: 22%; }
  .data-table--controlled-ranking .col--heatinfo { width: 17%; overflow-wrap: anywhere; }
  .data-table--controlled-ranking .country-flag { width: 20px; }

  .data-table--qualifying-ranking { min-width: 0; width: 100%; table-layout: fixed; }
  .data-table--qualifying-ranking .col--desktop-extra { display: none; }
  .data-table--qualifying-ranking th,
  .data-table--qualifying-ranking td { padding: 6px 4px; font-size: 10px; }
  .data-table--qualifying-ranking th { letter-spacing: .025em;
  text-transform: none;
}
  .data-table--qualifying-ranking .col--pos { width: 6%; }
  .data-table--qualifying-ranking .col--country { width: 8%; }
  .data-table--qualifying-ranking .country-flag { width: 20px; }
  .data-table--qualifying-ranking .col--driver {
    width: 34%;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }
  .data-table--qualifying-ranking .col--pts { width: 8%; }
  .data-table--qualifying-ranking .col--pointsinfo { width: 44%; overflow: hidden; text-overflow: ellipsis; }


.data-table--final-ranking {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}
.data-table--final-ranking th,
.data-table--final-ranking td {
  padding: 6px 4px;
  font-size: 12px;
}
.data-table--final-ranking th {
  letter-spacing: .015em;
  overflow-wrap: anywhere;
  text-transform: none;
}
.data-table--final-ranking .col--rank { width: 6%; }
.data-table--final-ranking .col--country { width: 7%; }
.data-table--final-ranking .country-flag { width: 20px; }
.data-table--final-ranking .col--driver {
  width: 50%;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}
.data-table--final-ranking .col--points { width: 7%; }
.data-table--final-ranking .col--pointsinfo {
  width: 30%;
  overflow-wrap: anywhere;
}

  body { padding-bottom: 78px; background: #fff; }
  .site-header__inner {
    width: 100%;
    min-height: 36px;
    padding: 0 12px;
    gap: 10px;
    justify-content: space-between;
  }
  .site-header__actions {
    flex-shrink: 0;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    margin-left: auto;
  }
  .ets-brand__logo { max-width: 102px; }
  .theme-switch {
    width: 116px;
    height: 26px;
    padding: 2px;
    flex: 0 0 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .theme-switch__thumb {
    top: 2px;
    bottom: 2px;
    left: 2px;
    width: calc((100% - 4px) / 2);
  }
  html[data-theme-setting="light"] .theme-switch__thumb { transform: translateX(0); }
  html[data-theme-setting="dark"] .theme-switch__thumb { transform: translateX(100%); }
  .theme-switch button[data-theme-choice="auto"] { display: none; }
  .theme-switch button {
    gap: 0;
    padding: 0;
    font-size: 0;
  }
  .theme-switch__icon { font-size: 9px; }
  .theme-switch button span:last-child { display: none; }
  .menu-button { width: 34px; height: 34px; }
  .ets-brand strong { font-size: 36px; }
  .app-shell { width: 100%; margin: 0; }
  .event-header { padding: 25px 18px 18px; }
  .event-header__grid { grid-template-columns: minmax(0, 1fr) 150px; gap: 15px; }
  .event-header h1 { font-size: clamp(27px, 7.6vw, 38px); }
  .event-meta { display: grid; gap: 8px; font-size: 12px; }
  .event-state { min-width: 0; padding: 13px 12px; }
  .event-state strong { font-size: 10px; }
  .event-state small { margin-left: 0; font-size: 10px; }
  .filter-bar { grid-template-columns: minmax(0, 1fr); margin: 0; padding: 12px 18px 16px; border-width: 1px 0; border-radius: 0; box-shadow: none; }
  .filter-control { min-height: 64px; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; padding: 8px 9px; }
  .filter-control__chevron {
    display: inline-flex;
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 15px;
  }
  .filter-control__icon { font-size: 17px; }
  .filter-control__copy small { font-size: 8px; }
  .filter-control__copy strong, .filter-control select { font-size: 10px; }
  .tabs { position: sticky; top: 0; margin: 0; border-width: 0 0 1px; border-radius: 0; overflow-x: auto; grid-template-columns: repeat(6, minmax(84px, 1fr)); box-shadow: none; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { min-height: 73px; flex-direction: column; gap: 3px; padding: 8px 4px; font-size: 10px; }
  .tab .ui-icon { font-size: 17px; }
  .tab b { position: absolute; top: 8px; right: 9px; min-width: 21px; height: 20px; font-size: 9px; }
  .tab.is-active::after { right: 8px; left: 8px; }
  .tab-pane { padding: 15px 14px 0; }
  .overview-layout { gap: 13px; }
  .overview-column { gap: 13px; }
  .dashboard-card { box-shadow: 0 5px 16px rgba(20, 37, 54, .045); }
  .dashboard-card__header { min-height: 53px; padding: 10px 14px; }
  .dashboard-card__header h2 { font-size: 17px; }
  .dashboard-card__header--stats { align-items: flex-start; flex-direction: column; }
  .report-stats { width: 100%; justify-content: flex-end; }
  .report-stats > span { min-width: 0; flex: 1; padding: 0 8px; }
  .report-stats strong { font-size: 17px; }
  .overview-row { min-height: 48px; padding: 8px 12px; }
  .overview-row__copy strong { font-size: 11px; }
  .overview-row__copy small { display: none; }
  .chip { font-size: 8px; }
  .run-accordion { padding: 10px; }
  .phase > summary { min-height: 57px; padding: 10px 12px; }
  .phase__title { display: grid; gap: 3px; }
  .phase__title strong { font-size: 14px; }
  .phase__title em { font-size: 9px; }
  .phase__tools { gap: 9px; }
  .phase__content { padding: 9px; }
  .group > summary { min-height: 30px; padding: 7px 11px; }
  .group__title { display: flex; align-items: baseline; gap: 6px; }
  .group__tools { gap: 8px; }
  .run-list { padding: 8px; }
  .run-button { min-height: 40px; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; padding: 3px; }
  .run-button .chip { display: none; }
  .run-button__icon { width: 35px; height: 35px; }
  .page-section-heading { align-items: flex-start; flex-direction: column; gap: 7px; margin: 8px 2px 14px; }
  .page-section-heading h2 { font-size: 26px; }
  .page-section-heading p { font-size: 12px; }
  .schedule-grid { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; }
  .schedule-day { min-width: 63vw; min-height: 175px; scroll-snap-align: start; }
  .module-grid { grid-template-columns: 1fr; }
  .feature-card { grid-template-columns: auto 1fr; padding: 20px; }
  .feature-card .primary-button { grid-column: 1 / 3; }
  .mobile-dock {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    min-height: 72px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 7px max(6px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.96);
    box-shadow: 0 -8px 25px rgba(20, 37, 54, .08);
    backdrop-filter: blur(14px);
  }
  .mobile-dock button[data-tab="participants"] { display: none; }
  .mobile-dock button { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 3px; border: 0; color: #526170; background: transparent; font-size: 9px; }
  .mobile-dock button .ui-icon { font-size: 19px; }
  .mobile-dock button.is-active { color: #e20916; font-weight: 850; }
  .modal {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    align-items: end;
    padding: max(8px, env(safe-area-inset-top)) 0 0;
  }
  .modal__panel {
    width: 100%;
    max-height: calc(100vh - max(8px, env(safe-area-inset-top)));
    max-height: calc(100dvh - max(8px, env(safe-area-inset-top)));
    border-radius: 18px 18px 0 0;
  }
  .modal__section-name {
    padding: 9px 10px;
    font-size: 15px;
  }
  .modal__body { padding: 5px; }
  .report-view__heading { align-items: flex-start; }
}

@media (max-width: 430px) {
  .site-header__inner {
    min-height: 54px;
    padding: 6px 10px;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
  }
  .site-header__inner > * {
    align-self: center;
  }
  .site-header__actions {
    gap: 5px;
    align-items: center;
    align-self: center;
    justify-content: flex-end;
    margin-left: auto;
  }
  .site-header__actions > * {
    align-self: center;
  }
  .theme-switch { width: 102px; }
  .ets-brand__logo { max-width: 82px; }
  .ets-brand strong { font-size: 32px; }
  .ets-brand span { font-size: 9px; }
  .menu-button { width: 36px; height: 36px; }
  .event-header { padding: 20px 15px 16px; }
  .back-button { margin-bottom: 16px; font-size: 12px; }
  .event-header__grid { grid-template-columns: minmax(0, 1fr) 126px; }
  .event-header h1 { font-size: 27px; }
  .event-state { padding: 11px 9px; }
  .event-state small { line-height: 1.35; }
  .filter-bar { padding: 11px 12px 14px; gap: 6px; }
  .filter-control { padding: 7px; gap: 6px; }
  .filter-control__copy strong, .filter-control select { font-size: 9px; }
  .tabs { grid-template-columns: repeat(6, minmax(75px, 1fr)); }
  .tab { font-size: 9px; }
  .tab-pane { padding: 12px 10px 0; }
  .dashboard-card__header h2 { font-size: 16px; }
  .dashboard-card__header > button { font-size: 10px; }
  .report-stats small { font-size: 8px; }
  .phase > summary { align-items: flex-start; }
  .phase__tools { align-items: flex-end; flex-direction: column-reverse; }
  .group__tools .chip { display: none; }
  .schedule-day { min-width: 76vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* v0.5.60 – Gruppeneinteilungen ohne separaten Headerblock.
   Gruppenname und Fahreranzahl stehen als schmale Metazeile oberhalb der Tabelle.
   Die Tabelle selbst trägt die oberen Rundungen. */
.group-assignment-list { display: grid; gap: 12px; }

.report-block--group-arrangement {
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.group-assignment__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 4px 7px;
}

.group-assignment__meta strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.group-assignment__meta span {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.group-assignment__meta--count-only {
  justify-content: flex-end;
}

.report-block--group-arrangement .table-scroll {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: auto;
}

.data-table--group-arrangement {
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table--group-arrangement th {
  top: 0;
  text-transform: none;
    font-size: 10px;
  }
.data-table--group-arrangement thead th:first-child { border-top-left-radius: 11px; }
.data-table--group-arrangement thead th:last-child { border-top-right-radius: 11px; }

.data-table--group-arrangement .col--country {
  width: 70px;
  text-align: center;
}
.data-table--group-arrangement .col--driver { min-width: 220px; }
.data-table--group-arrangement .col--club { min-width: 150px; }
.data-table--group-arrangement .col--transponder1,
.data-table--group-arrangement .col--transponder2 { width: 130px; white-space: nowrap; }
.data-table--group-arrangement .country-flag { width: 20px; }
.data-table--group-arrangement .controlled-driver__prename { font-weight: 400; }
.data-table--group-arrangement .controlled-driver__name { font-weight: 800; }

@media (max-width: 760px) {
  .group-assignment-list { gap: 10px; }
  .report-block--group-arrangement { margin-bottom: 0; }
  .group-assignment__meta { margin: 0 3px 6px; }
  .group-assignment__meta strong { font-size: 14px; }
  .report-block--group-arrangement .table-scroll { border-radius: 10px; }
  .data-table--group-arrangement thead th:first-child { border-top-left-radius: 9px; }
  .data-table--group-arrangement thead th:last-child { border-top-right-radius: 9px; }
  .data-table--group-arrangement th,
  .data-table--group-arrangement td { padding: 6px 4px; font-size: 11px; }
  .data-table--group-arrangement th { font-size: 10px; }
}


/* v0.2.9 – mobile-orientierte Laufergebnisse für Qualifying/Run reports */
.report-block--run-overview .run-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.run-overview-item {
  border: 1px solid #e4eaef;
  border-radius: 14px;
  background: #fafcfd;
  padding: 12px 13px;
}
.run-overview-item__label {
  display: block;
  color: #657684;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 5px;
}
.run-overview-item__value {
  display: block;
  color: #111827;
  font-size: 14px;
}
.data-table--run-results {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
}
.data-table--run-results .col--pos,
.data-table--run-results .col--country,
.data-table--run-results .col--laps,
.data-table--run-results .col--gap { text-align: center; white-space: nowrap; }
.data-table--run-results .col--pos { width: 56px; }
.data-table--run-results .col--country { width: 72px; }
.data-table--run-results .col--driver { width: auto; font-weight: 750; }
.data-table--run-results .col--best,
.data-table--run-results .col--total { width: 110px; white-space: nowrap; }
.data-table--run-results .col--info { width: 18%; }
.data-table--run-results .country-flag { width: 28px; }
.lap-list-details summary {
  list-style: none;
  cursor: pointer;
  font-weight: 800;
  color: #17324d;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
}
.lap-list-details summary::-webkit-details-marker { display: none; }
.data-table--lap-list { min-width: 620px; }
.data-table--lap-list .col--lap,
.data-table--lap-list .col--position,
.data-table--lap-list .col--laptime,
.data-table--lap-list .col--absoluttime,
.data-table--lap-list .col--totaltime { white-space: nowrap; }

@media (max-width: 760px) {
  .report-block--run-overview .run-overview-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .run-overview-item { padding: 10px 11px; }
  .run-overview-item__label { font-size: 9px; }
  .run-overview-item__value { font-size: 12px; }

  .table-scroll--run-results { overflow: visible; }
  .data-table--run-results,
  .data-table--run-results thead,
  .data-table--run-results tbody,
  .data-table--run-results tr,
  .data-table--run-results th,
  .data-table--run-results td {
    display: block;
    width: 100%;
  }
  .data-table--run-results {
    min-width: 0;
    border-collapse: separate;
  }
  .data-table--run-results thead {
    position: absolute;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
  .data-table--run-results tbody {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .data-table--run-results tr {
    position: relative;
    border: 1px solid #dfe6ec;
    border-left: 4px solid #2b65ae;
    border-radius: 14px;
    background: #fff;
    padding: 10px 12px;
    box-shadow: 0 6px 18px rgba(18, 38, 63, .05);
  }
  .data-table--run-results td {
    border: 0;
    padding: 2px 0;
    font-size: 12px;
    min-height: 18px;
  }
  .data-table--run-results td[data-label]::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 66px;
    margin-right: 8px;
    color: #607080;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
  }
  .data-table--run-results .col--pos,
  .data-table--run-results .col--country,
  .data-table--run-results .col--driver,
  .data-table--run-results .col--best,
  .data-table--run-results .col--laps,
  .data-table--run-results .col--total,
  .data-table--run-results .col--gap,
  .data-table--run-results .col--info { width: auto; text-align: left; }
  .data-table--run-results .col--pos {
    font-size: 16px;
    font-weight: 800;
    color: #17324d;
  }
  .data-table--run-results .col--pos::before { min-width: 34px; }
  .data-table--run-results .col--country .country-flag {
    width: 24px;
    vertical-align: middle;
  }
  .data-table--run-results .col--driver {
    font-size: 15px;
    font-weight: 800;
    color: #111827;
  }
  .data-table--run-results .col--driver::before { display: block; margin-bottom: 2px; }
  .data-table--run-results .col--info {
    color: #3b4c5e;
  }
  .data-table--lap-list {
    min-width: 560px;
  }
}


/* v0.3.0 – echte MyRCM-Laufergebnisdarstellung (Overview + Lap list) */
.public-run-report {
  display: grid;
  gap: 16px;
}
.public-run-section {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dbe3ea;
  border-radius: 18px;
}
.public-run-section > h3 {
  margin: 0;
  padding: 13px 16px;
  color: #fff;
  background: linear-gradient(110deg, #26282a, #707d8e 55%, #2d3641);
  border-bottom: 4px solid #e20916;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.public-run-fragment {
  min-width: 0;
  overflow-x: auto;
  padding: 12px;
  color: #15191d;
  font-size: 12px;
  line-height: 1.4;
  -webkit-overflow-scrolling: touch;
}
.public-run-fragment > :first-child { margin-top: 0; }
.public-run-fragment > :last-child { margin-bottom: 0; }
.public-run-fragment table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}
.public-run-fragment th,
.public-run-fragment td {
  padding: 8px 9px;
  border-bottom: 1px solid #e4eaef;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.public-run-fragment th {
  color: #2b4156;
  background: #edf3f7;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.public-run-fragment td {
  color: #15191d;
  background: #ffffff;
}
.public-run-fragment tr:nth-child(even) td { background: #f5f7f9; }
.public-run-fragment tr:hover td { background: #f8fbfd; }
.public-run-fragment img {
  width: auto;
  max-width: 27px;
  max-height: 18px;
  vertical-align: middle;
}
.public-run-section--laps .public-run-fragment table th:first-child,
.public-run-section--laps .public-run-fragment table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  font-weight: 800;
  background: #ffffff;
  box-shadow: 1px 0 0 #e4eaef;
}
.public-run-section--laps .public-run-fragment tr:nth-child(even) td:first-child { background: #f5f7f9; }
.public-run-section--laps .public-run-fragment tr:hover td:first-child { background: #f8fbfd; }
.public-run-fragment td.ets-fastest-lap {
  color: #0b4f78;
  background: #d9f2ff !important;
  box-shadow: inset 0 0 0 1px rgba(44, 168, 224, .42);
  font-weight: 800;
}

@media (max-width: 760px) {
  .public-run-report { gap: 10px; }
  .public-run-section { border-radius: 14px; }
  .public-run-section > h3 { padding: 11px 12px; font-size: 13px; }
  .public-run-fragment { padding: 0; font-size: 10px; }
  .public-run-fragment th,
  .public-run-fragment td { padding: 6px 4px 6px 4px; }
}


/* v0.3.5 – neuer Gruppen-Durchlauf: ReportGroup beginnt wieder bei Gruppe 1 */
.data-table--schedule tbody tr.schedule-group-restart td {
  border-top: 2px solid #868686;
}


/* v0.4.2 – mobile Tabellenbreiten responsiv in Prozent */
@media (max-width: 760px) {
  .data-table--schedule,
  .data-table--controlled-ranking,
  .data-table--qualifying-ranking,
  .data-table--final-ranking {
    width: 100%;
    table-layout: fixed;
  }
}


/* v0.4.4 – mobile Prozentbreiten feinjustiert
   Controlled/Timed: 8 + 8 + 50 + 22 + 12 = 100 %
   Qualifying:       7 + 8 + 35 + 10 + 40 = 100 % */


/* v0.4.5 – Endrangliste Finale
   Mobile: 6 + 7 + 27 + 7 + 14 + 14 + 7 + 18 = 100 % */


/* v0.4.9 – Schreibweise der Header für kontrolliertes/gezeitetes Training beibehalten */
.data-table--controlled-ranking th {
  text-transform: none;
}


/* v0.5.0 – Finale kompakter: Rnd, EndTime und BestTimeN ausgeblendet.
   Mobile Final: 6 + 7 + 45 + 5 + 37 = 100 %.
   Qualifying und Final mobile Schriftgröße: 10px. */


/* v0.5.3 – Qualifying-Laufreport Overview: gewünschte Groß-/Kleinschreibung */
.public-run-section--overview .public-run-fragment th {
  text-transform: none;
}


/* v0.5.56 – feste Prozentbreiten für Qualifying- und Final-Laufreports.
   Qualy: P 6 %, # 6 %, Flagge 8 %, Driver 34 %, L 7 %, Total 15 %, Best 14 %, Note 10 %.
   Die Lap List nutzt weiterhin die automatische, inhaltsabhängige Spaltenverteilung. */
.public-run-section--overview .public-run-fragment table {
  width: 100%;
  table-layout: fixed;
}

.public-run-section--overview .public-run-col--position { width: 6%; }
.public-run-section--overview .public-run-col--number   { width: 6%; }
.public-run-section--overview .public-run-col--country  { width: 8%; }
.public-run-section--overview .public-run-col--driver   { width: 34%; }
.public-run-section--overview .public-run-col--laps     { width: 7%; }
.public-run-section--overview .public-run-col--total    { width: 15%; }
.public-run-section--overview .public-run-col--best     { width: 14%; }
.public-run-section--overview .public-run-col--note     { width: 10%; }


/* v0.5.9 – Qualifying Overview: leere doppelte No./#-Spalte wird serverseitig entfernt. */


/* v0.5.11 – einzelne Finalläufe im gleichen Overview-Layout wie Qualifying.
   Felder: ranking, start_position, Country, Prename/Name,
   r_laps, r_endtime, r_besttime und r_mediumtime. */
.public-run-section--overview .public-run-col--medium { width: 11%; }

.public-final-run-table .public-run-col--position,
.public-final-run-table .public-run-col--number,
.public-final-run-table .public-run-col--country,
.public-final-run-table .public-run-col--laps,
.public-final-run-table .public-run-col--total,
.public-final-run-table .public-run-col--best,
.public-final-run-table .public-run-col--medium {
  text-align: center;
}

.public-final-run-table .public-run-col--position { width: 7%; }
.public-final-run-table .public-run-col--number { width: 7%; }
.public-final-run-table .public-run-col--country { width: 9%; }

.public-final-run-table .public-run-col--driver {
  width: 31%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.public-final-run-table .public-run-col--laps { width: 7%; }
.public-final-run-table .public-run-col--total { width: 15%; }
.public-final-run-table .public-run-col--best { width: 12%; }
.public-final-run-table .public-run-col--medium { width: 12%; }

.public-final-run-table .country-flag {
  width: 20px;
  max-width: 20px;
  max-height: 15px;
  border: 0;
}


/* v0.5.12 – Gruppeneinteilung und einheitliche Namensdarstellung */


/* v0.5.13 – Gruppennummerierung und Teilnehmerliste */
.data-table--group-arrangement .col--row-number {
  width: 50px;
  text-align: center;
  white-space: nowrap;
}

.data-table--participant-list {
  width: 100%;
  min-width: 640px;
  table-layout: fixed;
}

/* v0.5.63 – Prozentbreiten der Teilnehmerliste als Ausgangsbasis.
   Country 8 %, Driver 42 %, Club 26 %, Transponder 1/2 jeweils 12 %. */
.data-table--participant-list .col--country {
  width: 8%;
}

.data-table--participant-list .col--driver {
  width: 42%;
  min-width: 0;
}

.data-table--participant-list .col--club {
  width: 26%;
  min-width: 0;
}

.data-table--participant-list .col--transponder1,
.data-table--participant-list .col--transponder2 {
  width: 12%;
}

@media (max-width: 760px) {
  .data-table--group-arrangement .col--row-number {
    width: 38px;
  }
}


/* v0.5.14 – Teilnehmer-Modal mit Event- und Klassenname */
.modal__header small {
  display: block;
  max-width: calc(100% - 70px);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* v0.5.15 – Mobile Navigation: obere Icon-Leiste ausblenden */
@media (max-width: 760px) {
  .tabs {
    display: none;
  }
}


/* v0.5.16 – kompakter Eventfilter: nur noch die Klassenauswahl.
   Die redundante Ansichtskachel und sämtliche sichtbaren Zeitzonenangaben wurden entfernt. */


/* v0.5.21 – iOS Safari: Modalhöhe am dynamischen Viewport ausrichten.
   Dadurch bleiben Kopfbereich und Schließen-Schaltfläche auch bei sichtbaren Browserleisten erreichbar. */

/* v0.5.26 – Status und direkter Laufreport-Link im Zeitplan */
.schedule-comment-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.schedule-comment-text {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}
.schedule-row-tools {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
  white-space: nowrap;
}
.schedule-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.schedule-status__dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.schedule-status--completed { color: #228c49; }
.schedule-status--running { color: #1976d2; }
.schedule-status--running .schedule-status__dot {
  border-color: #1976d2;
  background: #1976d2;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, .12);
}
.schedule-status--planned { color: #6d7781; }
.schedule-report-link {
  width: 24px;
  height: 24px;
  min-width: 24px;
  flex: 0 0 24px;
  display: inline-grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #607080;
  background: transparent;
}
.schedule-report-link:hover,
.schedule-report-link:focus-visible {
  color: #e20916;
  background: #fbeaec;
  outline: none;
}
.schedule-report-link .ui-icon { width: 17px; height: 17px; }
.schedule-report-link--resolve { color: #e20916; }
.schedule-report-link--unresolved {
  color: #9aa4ad;
  background: #f1f3f5;
}
.data-table--schedule tbody tr.schedule-row--running td {
  color: #174f82;
  background: #eef6ff !important;
  box-shadow: inset 0 1px 0 rgba(25, 118, 210, .22), inset 0 -1px 0 rgba(25, 118, 210, .22);
}

@media (max-width: 760px) {
  .schedule-comment-cell { gap: 4px; }
  .schedule-row-tools { gap: 3px; }
  .schedule-status { gap: 3px; font-size: 9px; }
  .schedule-status__dot { width: 8px; height: 8px; flex-basis: 8px; }
  .schedule-report-link { width: 20px; height: 20px; min-width: 20px; flex-basis: 20px; }
  .schedule-report-link .ui-icon { width: 15px; height: 15px; }
}


/* v0.5.34 – Finale: Driver 38 %, Medium 11 %; Lap list unter Overview. */


/* v0.5.40 – Auto / Light / Dark Theme-Switch */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f3f5f7;
  --muted: #9ba7b3;
  --line: #39434d;
  --line-soft: #2d353d;
  --surface: #18212c;
  --surface-blue: #17202a;
  --panel: #1b2026;
  --shadow: 0 12px 34px rgba(0, 0, 0, .24);
  background: #18212c;
}
html[data-theme="dark"] body {
  color: var(--ink);
  background: linear-gradient(180deg, #11151a 0, #18212c 100%);
}
html[data-theme="dark"] .site-header {
  color: var(--ink);
  background: #171a1f;
}
html[data-theme="dark"] .ets-brand__logo--light { display: none; }
html[data-theme="dark"] .ets-brand__logo--dark { display: block; }
html[data-theme="dark"] .theme-switch {
  border-color: #3b454f;
  background: #252b32;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .3);
}
html[data-theme="dark"] .theme-switch__thumb {
  background: #3a424b;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .45);
}
html[data-theme="dark"] .theme-switch button { color: #a8b2bc; }
html[data-theme="dark"] .theme-switch button[aria-pressed="true"] { color: #fff; }
html[data-theme="dark"] .menu-button span { background: #e20916; }
html[data-theme="dark"] .event-meta,
html[data-theme="dark"] .event-meta .ui-icon,
html[data-theme="dark"] .filter-control__copy small,
html[data-theme="dark"] .filter-control__chevron,
html[data-theme="dark"] .tab,
html[data-theme="dark"] .report-stats small,
html[data-theme="dark"] .overview-row__arrow,
html[data-theme="dark"] .participant-open > span:last-child,
html[data-theme="dark"] .schedule-day__weekday,
html[data-theme="dark"] .schedule-day__month,
html[data-theme="dark"] .module-card > span:last-child {
  color: #9ba7b3;
}
html[data-theme="dark"] .back-button,
html[data-theme="dark"] .event-meta__class,
html[data-theme="dark"] .event-meta__class .ui-icon,
html[data-theme="dark"] .filter-control__icon,
html[data-theme="dark"] .overview-row__icon,
html[data-theme="dark"] .schedule-day__link,
html[data-theme="dark"] .participant-open__icon,
html[data-theme="dark"] .feature-card__icon,
html[data-theme="dark"] .eyebrow {
  color: #808a94;
}
html[data-theme="dark"] .event-state,
html[data-theme="dark"] .filter-bar,
html[data-theme="dark"] .filter-control,
html[data-theme="dark"] .tabs,
html[data-theme="dark"] .dashboard-card,
html[data-theme="dark"] .overview-row,
html[data-theme="dark"] .participant-open,
html[data-theme="dark"] .phase,
html[data-theme="dark"] .group,
html[data-theme="dark"] .run-button,
html[data-theme="dark"] .schedule-day,
html[data-theme="dark"] .feature-card,
html[data-theme="dark"] .module-card,
html[data-theme="dark"] .modal__panel,
html[data-theme="dark"] .report-block,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .setup-error,
html[data-theme="dark"] .public-run-section {
  color: var(--ink);
  background: #1b2026;
}
html[data-theme="dark"] .modal__header {
  background: #1b2026;
  border-bottom-color: #24303d;
  color: #eef1f4;
}
html[data-theme="dark"] .modal__header small {
  color: #a8b2bc;
}
html[data-theme="dark"] .modal__header button {
  background: #101822;
  border-color: #24303d;
  color: #a8b2bc;
}
html[data-theme="dark"] .modal__header button:hover,
html[data-theme="dark"] .modal__header button:focus {
  background: #1d2934;
  border-color: #3a7fe0;
  color: #ffffff;
}
html[data-theme="dark"] .dashboard-card {
  background: #1b2026 !important;
  border-color: #39434d !important;
}
html[data-theme="dark"] .filter-bar,
html[data-theme="dark"] .tabs {
  background: rgba(27, 32, 38, .96);
}
html[data-theme="dark"] .group,
html[data-theme="dark"] .public-run-section,
html[data-theme="dark"] .report-block {
  border: 1px solid #6e6e6e;
}
html[data-theme="dark"] .dashboard-card__header {
  background: #302d2f;
}
html[data-theme="dark"] .dashboard-card__header,
html[data-theme="dark"] .dashboard-card__header--stats {
  border-color: #24303d;
}
html[data-theme="dark"] .reporting-content .dashboard-card__header,
html[data-theme="dark"] .reporting-content .dashboard-card__header--stats {
  background: transparent !important;
}
html[data-theme="dark"] .dashboard-card__header h2 span,
html[data-theme="dark"] .tab b {
  color: #b5bec7;
  background: #2c333a;
}

body.dark-mode .dashboard-card {
  background: #1b2026 !important;
  border-color: #39434d !important;
}

body.dark-mode .dashboard-card__header,
body.dark-mode .dashboard-card__header--stats {
  border-color: #24303d;
  background: #302d2f;
}

html[data-theme="dark"] .reporting-content .dashboard-card,
body.dark-mode .reporting-content .dashboard-card {
  background: #1b2026 !important;
  border-color: #39434d !important;
}

html[data-theme="dark"] .reporting-content .dashboard-card__header,
body.dark-mode .reporting-content .dashboard-card__header,
html[data-theme="dark"] .reporting-content .dashboard-card__header--stats,
body.dark-mode .reporting-content .dashboard-card__header--stats {
  background: #302d2f !important;
  border-color: #24303d !important;
}
html[data-theme="dark"] .reporting-content .report-stats > span,
body.dark-mode .reporting-content .report-stats > span {
  background: #101822 !important;
  border-left-color: #24303d !important;
}
html[data-theme="dark"] .reporting-content .report-stats strong,
body.dark-mode .reporting-content .report-stats strong {
  color: #e6edf3 !important;
}
html[data-theme="dark"] .reporting-content .report-stats > span:first-child strong,
body.dark-mode .reporting-content .report-stats > span:first-child strong {
  color: var(--green) !important;
}
html[data-theme="dark"] .reporting-content .report-stats > span:nth-child(2) strong,
body.dark-mode .reporting-content .report-stats > span:nth-child(2) strong {
  color: var(--orange) !important;
}
html[data-theme="dark"] .reporting-content .report-stats > span:nth-child(3) strong,
body.dark-mode .reporting-content .report-stats > span:nth-child(3) strong {
  color: #697684 !important;
}

html[data-theme="dark"] .reporting-content .tab.is-active,
body.dark-mode .reporting-content .tab.is-active {
  color: #fff !important;
  background: #232a31 !important;
}

html[data-theme="dark"] .reporting-content .tab.is-active::after,
body.dark-mode .reporting-content .tab.is-active::after {
  background: #e20916 !important;
}
html[data-theme="dark"] .tab.is-active {
  color: #fff;
  background: #232a31;
}
html[data-theme="dark"] .tab.is-active::after { background: #e20916; }
html[data-theme="dark"] .overview-row:hover,
html[data-theme="dark"] .participant-open:hover,
html[data-theme="dark"] .run-button:hover,
html[data-theme="dark"] .module-card:hover {
  background: #242b32;
}
html[data-theme="dark"] .phase[open] > summary,
html[data-theme="dark"] .group[open] > summary { background: #242a30; }
html[data-theme="dark"] .phase__content { background: #14191f; }
html[data-theme="dark"] .run-list { background: #171c22; }
html[data-theme="dark"] .run-button__icon {
  color: #aeb9c3;
  border-color: #48545f;
}
html[data-theme="dark"] .participant-open__icon,
html[data-theme="dark"] .feature-card__icon,
html[data-theme="dark"] .module-card__icon {
  background: #203343;
}
html[data-theme="dark"] .module-card__icon--yellow {
  color: #f2d86e;
  background: #403a20;
}
html[data-theme="dark"] .mobile-dock {
  border-color: var(--line);
  background: rgba(23, 26, 31, .96);
  box-shadow: 0 -8px 25px rgba(0, 0, 0, .3);
}
html[data-theme="dark"] .mobile-dock button { color: #a8b2bc; }
html[data-theme="dark"] .mobile-dock button.is-active { color: #e20916; }
html[data-theme="dark"] .modal__section-name {
  color: #eef1f4;
  background: #1b2026;
  border-bottom-color: #3a444e;
}
html[data-theme="dark"] .modal__body { background: #11161b; }
html[data-theme="dark"] .data-table,
html[data-theme="dark"] .public-run-fragment table { background: #1b2026; }
html[data-theme="dark"] .data-table th,
html[data-theme="dark"] .public-run-fragment th {
  color: #d7dde3;
  background: #293038;
  border-color: #3a444e;
}
html[data-theme="dark"] .data-table td,
html[data-theme="dark"] .public-run-fragment td {
  color: #eef1f4;
  background: #1b2026;
  border-color: #303941;
}
html[data-theme="dark"] .data-table tbody tr:nth-child(even) td,
html[data-theme="dark"] .public-run-fragment tr:nth-child(even) td { background: #161b20; }
html[data-theme="dark"] .data-table tbody tr:hover td,
html[data-theme="dark"] .public-run-fragment tr:hover td { background: #242b32; }
html[data-theme="dark"] .public-run-fragment { color: #eef1f4; }
html[data-theme="dark"] .public-run-section--laps .public-run-fragment table th:first-child,
html[data-theme="dark"] .public-run-section--laps .public-run-fragment table td:first-child {
  background: #1b2026;
  box-shadow: 1px 0 0 #303941;
}
html[data-theme="dark"] .public-run-section--laps .public-run-fragment tr:nth-child(even) td:first-child { background: #161b20; }
html[data-theme="dark"] .public-run-section--laps .public-run-fragment tr:hover td:first-child { background: #242b32; }
html[data-theme="dark"] .public-run-fragment td.ets-fastest-lap {
  color: #d8f2ff;
  background: #173247 !important;
  box-shadow: inset 0 0 0 1px rgba(44, 168, 224, .45);
}
html[data-theme="dark"] .data-table--run-results .col--pos,
html[data-theme="dark"] .data-table--run-results .col--driver,
html[data-theme="dark"] .data-table--run-results .col--info { color: #eef1f4; }
html[data-theme="dark"] .empty-state pre { background: #090b0e; }
html[data-theme="dark"] .setup-error code { background: #2a3138; }

body.dark-mode .event-meta,
body.dark-mode .event-meta .ui-icon,
body.dark-mode .filter-control__copy small,
body.dark-mode .filter-control__chevron,
body.dark-mode .tab,
body.dark-mode .report-stats small,
body.dark-mode .overview-row__arrow,
body.dark-mode .participant-open > span:last-child,
body.dark-mode .schedule-day__weekday,
body.dark-mode .schedule-day__month,
body.dark-mode .module-card > span:last-child {
  color: #9ba7b3;
}
body.dark-mode .back-button,
body.dark-mode .event-meta__class,
body.dark-mode .event-meta__class .ui-icon,
body.dark-mode .filter-control__icon,
body.dark-mode .overview-row__icon,
body.dark-mode .schedule-day__link,
body.dark-mode .participant-open__icon,
body.dark-mode .feature-card__icon,
body.dark-mode .eyebrow {
  color: #808a94;
}
body.dark-mode .event-state,
body.dark-mode .filter-bar,
body.dark-mode .filter-control,
body.dark-mode .tabs,
body.dark-mode .dashboard-card,
body.dark-mode .overview-row,
body.dark-mode .participant-open,
body.dark-mode .phase,
body.dark-mode .group,
body.dark-mode .run-button,
body.dark-mode .schedule-day,
body.dark-mode .feature-card,
body.dark-mode .module-card,
body.dark-mode .modal__panel,
body.dark-mode .report-block,
body.dark-mode .empty-state,
body.dark-mode .setup-error,
body.dark-mode .public-run-section {
  color: var(--ink);
  background: #1b2026;
}
body.dark-mode .modal__header {
  background: #1b2026;
  border-bottom-color: #24303d;
  color: #eef1f4;
}
body.dark-mode .modal__header small {
  color: #a8b2bc;
}
body.dark-mode .modal__header button {
  background: #101822;
  border-color: #24303d;
  color: #a8b2bc;
}
body.dark-mode .modal__header button:hover,
body.dark-mode .modal__header button:focus {
  background: #1d2934;
  border-color: #3a7fe0;
  color: #ffffff;
}
body.dark-mode .dashboard-card {
  background: #1b2026 !important;
  border-color: #39434d !important;
}
body.dark-mode .filter-bar,
body.dark-mode .tabs {
  background: rgba(27, 32, 38, .96);
}
body.dark-mode .group,
body.dark-mode .public-run-section,
body.dark-mode .report-block {
  border: 1px solid #6e6e6e;
}
body.dark-mode .dashboard-card__header {
  background: #302d2f;
}
body.dark-mode .dashboard-card__header,
body.dark-mode .dashboard-card__header--stats {
  border-color: #24303d;
}
body.dark-mode .dashboard-card__header h2 span,
body.dark-mode .tab b {
  color: #b5bec7;
  background: #2c333a;
}
body.dark-mode .tab.is-active {
  color: #fff;
  background: #232a31;
}
body.dark-mode .tab.is-active::after { background: #e20916; }
body.dark-mode .overview-row:hover,
body.dark-mode .participant-open:hover,
body.dark-mode .run-button:hover,
body.dark-mode .module-card:hover {
  background: #242b32;
}
body.dark-mode .phase[open] > summary,
body.dark-mode .group[open] > summary { background: #242a30; }
body.dark-mode .phase__content { background: #14191f; }
body.dark-mode .run-list { background: #171c22; }
body.dark-mode .run-button__icon {
  color: #aeb9c3;
  border-color: #48545f;
}
body.dark-mode .participant-open__icon,
body.dark-mode .feature-card__icon,
body.dark-mode .module-card__icon {
  background: #203343;
}
body.dark-mode .module-card__icon--yellow {
  color: #f2d86e;
  background: #403a20;
}
body.dark-mode .mobile-dock {
  border-color: var(--line);
  background: rgba(23, 26, 31, .96);
  box-shadow: 0 -8px 25px rgba(0, 0, 0, .3);
}
body.dark-mode .mobile-dock button { color: #a8b2bc; }
body.dark-mode .mobile-dock button.is-active { color: #e20916; }
body.dark-mode .modal__section-name {
  color: #eef1f4;
  background: #1b2026;
  border-bottom-color: #3a444e;
}
body.dark-mode .modal__body { background: #11161b; }
body.dark-mode .data-table,
body.dark-mode .public-run-fragment table { background: #1b2026; }
body.dark-mode .data-table th,
body.dark-mode .public-run-fragment th {
  color: #d7dde3;
  background: #293038;
  border-color: #3a444e;
}
body.dark-mode .data-table td,
body.dark-mode .public-run-fragment td {
  color: #eef1f4;
  background: #1b2026;
  border-color: #303941;
}
body.dark-mode .data-table tbody tr:nth-child(even) td,
body.dark-mode .public-run-fragment tr:nth-child(even) td { background: #161b20; }
body.dark-mode .data-table tbody tr:hover td,
body.dark-mode .public-run-fragment tr:hover td { background: #242b32; }
body.dark-mode .public-run-fragment { color: #eef1f4; }
body.dark-mode .public-run-section--laps .public-run-fragment table th:first-child,
body.dark-mode .public-run-section--laps .public-run-fragment table td:first-child {
  background: #1b2026;
  box-shadow: 1px 0 0 #303941;
}
body.dark-mode .public-run-section--laps .public-run-fragment tr:nth-child(even) td:first-child { background: #161b20; }
body.dark-mode .public-run-section--laps .public-run-fragment tr:hover td:first-child { background: #242b32; }
body.dark-mode .public-run-fragment td.ets-fastest-lap {
  color: #d8f2ff;
  background: #173247 !important;
  box-shadow: inset 0 0 0 1px rgba(44, 168, 224, .45);
}
body.dark-mode .data-table--run-results .col--pos,
body.dark-mode .data-table--run-results .col--driver,
body.dark-mode .data-table--run-results .col--info { color: #eef1f4; }
body.dark-mode .empty-state pre { background: #090b0e; }
body.dark-mode .setup-error code { background: #2a3138; }

@media (max-width: 760px) {
  html[data-theme="dark"] body { background: #18212c; }
}


.public-run-chart {
  display: grid;
  gap: 12px;
}
.public-run-chart__top {
  display: grid;
  gap: 10px;
}
.public-run-chart__intro p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.public-run-chart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}
.public-run-chart__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.public-run-chart__legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 12px;
}
.public-run-chart__canvas {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  overflow-x: auto;
  padding: 12px;
}
.public-run-chart__svg {
  display: block;
  width: 100%;
  min-width: 860px;
  height: auto;
}
.public-run-chart__svg .public-run-chart__grid {
  stroke: var(--line);
  stroke-width: 1;
}
.public-run-chart__svg .public-run-chart__axis-label {
  fill: #687688;
  font-size: 15px;
  font-weight: 700;
}
.public-run-chart__svg .public-run-chart__axis-label--bottom {
  text-anchor: middle;
}
@media (max-width: 760px) {
  .public-run-chart__intro p,
  .public-run-chart__legend-item {
    font-size: 12px;
  }
  .public-run-chart__canvas {
    padding: 8px;
  }
  .public-run-chart__svg {
    min-width: 760px;
  }
}


/* v0.5.46 – Jury-Entscheidungen verständlich unterhalb der Lap List */
.public-jury {
  display: grid;
  gap: 12px;
}
.public-jury__intro {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.public-jury__group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.public-jury__group-header {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  background: #e5e5e5;
  border-bottom: 1px solid var(--line);
}
.public-jury__group-header strong {
  font-size: 15px;
}
.public-jury__group-header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}
.public-jury__list {
  display: grid;
}
.public-jury__item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(150px, 28%) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-soft);
}
.public-jury__item:last-child {
  border-bottom: 0;
}
.public-jury__driver {
  min-width: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.public-jury__decision {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 10px;
}
.public-jury__label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #8c111a;
  background: #fde7e9;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}
.public-jury__change {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.public-jury__arrow {
  color: var(--muted);
  font-weight: 850;
}
.public-jury__delta {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}
.public-jury__text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.public-jury__unknown,
.public-jury__empty {
  color: var(--muted);
}
html[data-theme="dark"] .public-jury__group {
  background: #1b2026;
}
html[data-theme="dark"] .public-jury__group-header {
  background: #302d2f;
}
html[data-theme="dark"] .public-jury__label {
  color: #ffb7bc;
  background: #451d22;
}
@media (max-width: 760px) {
  .public-jury__intro {
    font-size: 11px;
  }
  .public-jury__item {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 9px 10px;
  }
  .public-jury__driver {
    font-size: 13px;
  }
  .public-jury__decision {
    gap: 6px 8px;
  }
}


.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ranking-summary-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}
.ranking-summary-cell__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ranking-detail-toggle {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-content: center;
  gap: 3px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #203668;
  background: #edf6fd;
}
.ranking-detail-toggle span:not(.sr-only) {
  width: 14px;
  height: 2px;
  display: block;
  border-radius: 2px;
  background: currentColor;
  transition: transform .18s ease, opacity .18s ease;
}
.ranking-detail-toggle.is-open span:not(.sr-only):nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.ranking-detail-toggle.is-open span:not(.sr-only):nth-child(2) {
  opacity: 0;
}
.ranking-detail-toggle.is-open span:not(.sr-only):nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}
.ranking-detail-row > td {
  padding: 0 !important;
  border-bottom: 1px solid var(--line);
  background: #f7fafc;
}
.ranking-detail-card {
  margin: 10px 12px 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.ranking-detail-card__heading {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: #e5e5e5;
}
.ranking-detail-card__heading strong {
  font-size: 15px;
}
.ranking-detail-card__heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.ranking-detail-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.ranking-detail-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  background: var(--panel);
}
.ranking-detail-table th,
.ranking-detail-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.ranking-detail-table th {
  color: #52606d;
  background: #edf3f7;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .035em;
  text-transform: none;
}
.ranking-detail-table td {
  font-size: 13px;
}
.ranking-detail-table tbody tr:nth-child(even) td {
  background: #f5f7f9;
}
.ranking-detail-table tbody tr.ranking-detail-run--counted-yes td {
  background: #e8f6ed;
}
.ranking-detail-table tbody tr.ranking-detail-run--counted-no td {
  background: #fdebed;
}
.ranking-detail-table tbody tr:last-child td {
  border-bottom: 0;
}
.ranking-counted {
  width: 25px;
  height: 25px;
  display: inline-grid;
  place-content: center;
  border-radius: 50%;
  font-weight: 950;
}
.ranking-counted--yes {
  color: #20864a;
  background: #e8f6ed;
}
.ranking-counted--no {
  color: #d8373f;
  background: #fdebed;
}

html[data-theme="dark"] .tabs .tab.is-active {
  box-shadow: inset 0 -3px 0 #e20916;
}

html[data-theme="dark"] .ranking-detail-toggle {
  color: #7fc7f0;
  background: #243442;
}
html[data-theme="dark"] .ranking-detail-row > td {
  background: #181d23;
}
html[data-theme="dark"] .ranking-detail-card__heading {
  background: #272d34;
}
html[data-theme="dark"] .ranking-detail-table th {
  color: #d7dee5;
  background: #242b32;
}
html[data-theme="dark"] .ranking-detail-table tbody tr:nth-child(even) td {
  background: #20262d;
}
html[data-theme="dark"] .ranking-detail-table tbody tr.ranking-detail-run--counted-yes td {
  background: rgba(32, 134, 74, .22);
}
html[data-theme="dark"] .ranking-detail-table tbody tr.ranking-detail-run--counted-no td {
  background: rgba(216, 55, 63, .22);
}

@media (max-width: 760px) {
  .ranking-detail-toggle {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
    border-radius: 7px;
  }
  .ranking-detail-toggle span:not(.sr-only) {
    width: 12px;
  }
  .ranking-detail-card {
    margin: 6px 4px 9px;
    border-radius: 9px;
  }
  .ranking-detail-card__heading {
    min-height: 38px;
    padding: 6px 9px;
  }
  .ranking-detail-card__heading strong {
    font-size: 13px;
  }
  .ranking-detail-table {
    min-width: 0;
  }
  .ranking-detail-table th,
  .ranking-detail-table td {
    padding: 7px 3px;
    font-size: 9px;
    letter-spacing: 0;
  }
  .ranking-detail-table th {
    white-space: normal;
    line-height: 1.1;
  }
  .ranking-counted {
    width: 20px;
    height: 20px;
  }
}


html[data-theme="dark"] .report-stats {
  background: #302d2f;
}

/* v0.5.58 – der grüne Verfügbarkeits-Chip ist im Dark Mode etwas gedeckter. */
html[data-theme="dark"] .chip--green {
  color: #227942;
  background: #313532;
}

/* v0.5.59 – Run-Button-Icon im Dark Mode neutraler darstellen. */
html[data-theme="dark"] .run-button__icon {
  color: #aeb9c3;
  border-color: transparent;
}
html[data-theme="dark"] .run-button__icon.run-button__icon--available,
body.dark-mode .run-button__icon.run-button__icon--available {
  color: var(--green);
}
html[data-theme="dark"] .run-button__icon.run-button__icon--unavailable,
body.dark-mode .run-button__icon.run-button__icon--unavailable {
  color: var(--red);
}

/* v0.5.60 – Rahmen im Dark Mode direkt an der Gruppentabelle statt am Außenblock. */
html[data-theme="dark"] .report-block--group-arrangement {
  border: 0;
  background: transparent;
}

html[data-theme="dark"] .report-block--group-arrangement .table-scroll {
  border-color: #6e6e6e;
  background: #1b2026;
}

html[data-theme="dark"] .group-assignment__meta strong {
  color: var(--ink);
}

/* v0.5.62 – kompaktere Modul-Icons und dunkler Status-Hintergrund. */
.module-card__icon {
  width: 40px;
  height: 40px;
}
/* v0.5.64 – Filterdarstellung mobil feinjustiert. */
.filter-control__copy {
  padding-left: 10px;
}

@media (max-width: 760px) {
  .filter-control__copy small {
    font-size: 14px;
  }
}

@media (max-width: 430px) {
  .filter-control__copy strong,
  .filter-control select {
    font-size: 18px;
  }
}

/* v0.5.65 – rechte Pfeile/Chevrons in den Listen und Akkordeons sauber auf einer Höhe ausrichten. */
.participant-open > span:last-child,
.module-card > span:last-child {
  display: inline-grid;
  place-items: center;
  align-self: center;
  width: 20px;
  min-height: 20px;
}

.phase__tools,
.group__tools {
  align-items: center;
}

.accordion-chevron {
  align-self: center;
}

@media (max-width: 760px) {
  .phase > summary,
  .group > summary {
    align-items: center;
  }

  .phase__tools {
    align-items: center;
    flex-direction: row;
  }

  .group__tools {
    align-items: center;
  }

  .participant-open > span:last-child,
  .module-card > span:last-child {
    width: 20px;
    min-height: 20px;
  }
}


/* v0.5.74 – einzelne Läufe aus kontrolliertem/gezeitetem Training.
   P 6 %, Start 6 %, Country 8 %, Driver 32 %, L 6 %, Total 15 %, Best 3 14 %, Best 13 %. */
.public-practice-run-table {
  width: 100%;
  table-layout: fixed;
}

.public-practice-run-table .public-run-col--position { width: 6%; }
.public-practice-run-table .public-run-col--start-position { width: 6%; }
.public-practice-run-table .public-run-col--country { width: 8%; }
.public-practice-run-table .public-run-col--driver {
  width: 32%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.public-practice-run-table .public-run-col--laps { width: 6%; }
.public-practice-run-table .public-run-col--total { width: 15%; }
.public-practice-run-table .public-run-col--best-number { width: 14%; }
.public-practice-run-table .public-run-col--best { width: 13%; }

.public-practice-run-table .public-run-col--position,
.public-practice-run-table .public-run-col--start-position,
.public-practice-run-table .public-run-col--country,
.public-practice-run-table .public-run-col--laps,
.public-practice-run-table .public-run-col--total,
.public-practice-run-table .public-run-col--best-number,
.public-practice-run-table .public-run-col--best {
  text-align: center;
}

.public-practice-run-table .practice-driver__prename { font-weight: 400; }
.public-practice-run-table .practice-driver__name { font-weight: 800; }

.public-practice-run-table .country-flag {
  width: 20px;
  max-width: 20px;
  max-height: 15px;
  border: 0;
}

@media (max-width: 760px) {
  .public-practice-run-table th,
  .public-practice-run-table td {
    padding-right: 4px;
    padding-left: 4px;
  }
}


/* v0.5.68 – schnellste drei zusammenhängende Trainingsrunden als Dreierband. */
.public-run-fragment td.ets-fastest-three-laps {
  border-top: 2px solid rgba(44, 168, 224, .72);
  border-bottom: 2px solid rgba(44, 168, 224, .72);
}

html[data-theme="dark"] .public-run-fragment td.ets-fastest-three-laps {
  border-top-color: rgba(44, 168, 224, .58);
  border-bottom-color: rgba(44, 168, 224, .58);
}

/* v0.5.71 – Einzellaufdetails auf Mobil kompakter. */
@media (max-width: 760px) {
  .ranking-detail-table th,
  .ranking-detail-table td {
    font-size: 10px;
  }
}

/* v0.5.85 – Gruppeneinteilung wie die Lap List im Viewport fixieren.
   Nur der Tabelleninhalt darf horizontal gewischt werden. */
.report-view--groups,
.group-assignment-list,
.report-block--group-arrangement {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.report-block--group-arrangement {
  overflow: hidden;
}

.report-block--group-arrangement .table-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

@media (max-width: 760px) {
  .modal__body {
    overflow-x: hidden;
  }

  .report-block--group-arrangement .table-scroll {
    touch-action: pan-x pan-y;
  }
}

/* v0.5.95 – Endranglisten bleiben oberhalb der aufklappbaren Laufreports erreichbar. */
.overview-column--reports {
  min-width: 0;
  align-content: start;
}

/* v0.5.101 – eindeutige Statusfarben ohne konkurrierende Altregeln. */
.status--published,
html[data-theme="light"] .status--published,
html:not([data-theme="dark"]) .status--published {
  color: #227942;
  background: #e7f6e9 !important;
}

html[data-theme="dark"] .status--published {
  color: #227942;
  background: #313532 !important;
}

/* v0.5.102 – schmale iPhones mit 375 CSS-Pixeln:
   ausschließlich Qualifikations-Endrangliste kompakter darstellen. */
@media (max-width: 375px) {
  .data-table--qualifying-ranking th,
  .data-table--qualifying-ranking td {
    padding: 6px 2px;
    font-size: 9px;
  }

  .data-table--qualifying-ranking th {
    letter-spacing: .01em;
  }

  .data-table--qualifying-ranking .col--pos { width: 6%; }
  .data-table--qualifying-ranking .col--country { width: 8%; }
  .data-table--qualifying-ranking .col--driver { width: 33%; }
  .data-table--qualifying-ranking .col--pts { width: 8%; }
  .data-table--qualifying-ranking .col--pointsinfo { width: 45%; }

  .data-table--qualifying-ranking .country-flag {
    width: 18px;
  }

  .data-table--qualifying-ranking .ranking-summary-cell {
    gap: 3px;
  }

  .data-table--qualifying-ranking .ranking-detail-toggle {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
    border-radius: 6px;
  }

  .data-table--qualifying-ranking .ranking-detail-toggle span:not(.sr-only) {
    width: 10px;
  }
}

/* v0.5.103 – Laufreport-Iconfarbe muss Status priorisieren, auch im Dark Mode. */
.run-button.load-report .run-button__icon.run-button__icon--available {
  color: var(--green) !important;
}

.run-button.load-report .run-button__icon.run-button__icon--unavailable {
  color: var(--red) !important;
}
