:root {
  color-scheme: light;
  --page-bg: #b3e0ff;
  --header-bg: #ffffff;
  --panel: #eef2f6;
  --panel-soft: #f7fbff;
  --panel-blue: #afd2eb;
  --panel-blue-strong: #91a9c1;
  --blue: #2c9bea;
  --blue-dark: #0a4f86;
  --text: #05070b;
  --muted: #4d5b68;
  --line: #d2dce6;
  --green: #00d66b;
  --danger: #d71920;
  --shadow: 0 0 7px rgba(0, 0, 0, 0.18);
  --event-background-image: url("https://furaj.ba/wp-content/uploads/2019/12/snow-1209991_1920-1.jpg");
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(179, 224, 255, 0.18), rgba(179, 224, 255, 0.18)),
    var(--event-background-image) center / cover fixed;
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
}

.app-shell {
  width: min(1296px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 42px;
}

.topbar {
  position: relative;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 0 calc(50% - 50vw) 22px;
  padding: 12px max(16px, calc((100vw - 1296px) / 2));
  background: var(--header-bg);
  box-shadow: var(--shadow);
}

.topbar::before {
  content: "NET\A TIMING";
  display: block;
  width: 100px;
  color: #05070b;
  font-size: 27px;
  font-weight: 900;
  font-style: italic;
  line-height: 0.78;
  white-space: pre;
  transform: skew(-10deg);
}

.eyebrow {
  display: none;
}

h1 {
  margin: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.32;
}

.muted {
  margin: 2px 0 0;
  color: var(--muted);
  text-align: left;
  font-size: 13px;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.topbar-title h1 {
  text-align: left;
}

.header-icon-button {
  width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 8px;
  font-size: 24px;
  line-height: 1;
}

.top-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% - 8px);
  right: max(16px, calc((100vw - 1296px) / 2));
  display: grid;
  min-width: 210px;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.2);
}

.top-menu label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.top-menu select,
.top-menu button {
  width: 100%;
}

.top-menu.hidden {
  display: none;
}

button,
select,
input {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

button {
  padding: 5px 18px;
  border-color: transparent;
  background: var(--blue);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: #1587d9;
}

button:disabled {
  cursor: progress;
  opacity: 0.65;
}

select,
input {
  padding: 5px 10px;
}

.code-panel {
  margin: 18px auto;
  padding: 18px;
  border-radius: 15px;
  background: var(--header-bg);
  box-shadow: var(--shadow);
}

.code-panel label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
}

.code-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.status {
  min-height: 24px;
  margin: 0 0 10px;
  color: var(--muted);
  display:none;
}

.status.error {
  color: var(--danger);
}

.event-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 auto 14px;
  overflow: hidden;
  border: 1px solid #d7dfe8;
  border-radius: 5px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.event-facts div {
  padding: 13px 18px;
  border-right: 1px solid #d7dfe8;
}

.event-facts div:last-child {
  border-right: 0;
}

.event-facts span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.event-facts strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.message-ticker {
  display: block;
  width: 100%;
  min-height: 31px;
  margin: 0 0 24px;
  overflow: hidden;
  border-radius: 5px;
  background: #ffffff;
  color: #171717;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.ticker-track {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 31px;
  padding-left: 100%;
  animation: ticker-scroll 22s linear infinite;
  will-change: transform;
}

.ticker-icon {
  color: var(--danger);
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

.live-dashboard,
.selection-panel,
.content-panel {
  box-shadow: var(--shadow);
}

.live-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 31%;
  gap: 0;
  align-items: stretch;
  margin: 0 auto;
  padding: 4px;
  border: 0;
  border-bottom: 0;
  border-radius: 15px 15px 0 0;
  background: var(--panel-blue);
}

.live-flow {
  display: block;
  overflow-x: auto;
  padding: 0;
  border-radius: 0;
  background: var(--panel-blue);
}

.sponsor-panel {
  min-height: 100%;
  display: grid;
  padding: 4px 4px 4px 8px;
  border: 0;
  border-radius: 0;
  
  color: #000000;
}

.sponsor-placeholder {
  display: grid;
  min-height: 100%;
  place-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  background: #0c0c0c;
  color: #ffffff;
  text-align: center;
}

.sponsor-placeholder span {
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sponsor-placeholder strong {
  color: #ffffff;
  font-size: 16px;
}

.sponsor-image-card {
  gap: 10px;
}

.sponsor-link {
  display: inline-grid;
  place-items: center;
  max-width: 100%;
  text-decoration: none;
}

.sponsor-image-card img {
  display: block;
  max-width: 100%;
  max-height: 92px;
  object-fit: contain;
}

.sponsor-slide-image {
  animation: sponsor-fade-slide 520ms ease-out both;
}

@keyframes sponsor-fade-slide {
  from {
    opacity: 0;
    transform: translateX(18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.flow-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #ffffff;
  color: #05070b;
}

.flow-table th,
.flow-table td {
  height: 33px;
  padding: 4px 8px;
  border-bottom: 1px solid #d5d5d5;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.flow-table th {
  background: var(--panel-blue);
  border-bottom: 1px solid #2c9bea;
  color: #05070b;
  font-size: 13px;
  font-weight: 800;
}

.flow-table-mobile {
  display: none;
}

.expand-cell {
  display: none;
}

.flow-table tbody tr:nth-child(odd),
.flow-table tbody tr:nth-child(even) {
  background: #ffffff;
}

.flow-table tbody tr:first-child {
  background: #f1f1f1;
}

.flow-table td {
  font-size: 13px;
}

.flow-table td:nth-child(1),
.flow-table th:nth-child(1) {
  width: 54px;
  background: var(--panel-blue);
  text-align: center;
  font-weight: 800;
}

.flow-table th:nth-child(2),
.flow-table td:nth-child(2) {
  width: 44px;
}

.flow-table th:nth-child(3),
.flow-table td:nth-child(3) {
  min-width: 178px;
}

.flow-table th:nth-child(n + 4),
.flow-table td:nth-child(n + 4) {
  text-align: center;
}

.flow-table tbody tr:last-child td:first-child {
  border-radius: 8px 0 0 8px;
  background: var(--blue);
}

.flow-bib-cell {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-width: 100%;
}

.flow-icon-marker {
  color: var(--blue-dark);
  font-size: 18px;
  line-height: 1;
}

.flow-rank-marker {
  color: #05070b;
}

.selection-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  padding: 10px 10px 0;
  border-top: 5px solid var(--blue);
  background: var(--panel-blue-strong);
}

.main-result-tabs {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: -10px -10px 10px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(5, 7, 11, 0.18);
  background: #ffffff;
}

.main-result-tab-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.main-result-tab {
  min-width: 54px;
  min-height: 34px;
  padding: 5px 12px;
  border: 1px solid #1a1a1a;
  border-radius: 4px;
  background: #ffffff;
  color: #05070b;
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
}

.main-result-tab.selected {
  background: #ffdf3a;
  color: #05070b;
}

.live-tab-context {
  min-width: 0;
  text-align: right;
  color: #05070b;
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
  align-items: flex-end;
}

.category-tab {
  min-width: 92px;
  min-height: 42px;
  padding: 9px 18px 12px;
  border: 0;
  border-radius: 10px 10px 0 0;
  background: #ffffff;
  color: #0756d9;
  text-decoration: none;
  box-shadow: none;
}

.category-tab span,
.category-tab small {
  display: block;
}

.category-tab small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.category-tab.active {
  background: var(--panel-blue-strong);
  color: #ffffff;
}

.category-tab.selected {
  background: #2c9bea;
  color: #ffffff;
}

.category-tab.selected.active {
  background: #2c9bea;
}

.run-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin: 0 -10px;
  padding: 8px 12px 10px;
  background: #2c9bea;
}

.run-tab {
  min-width: 88px;
  min-height: 27px;
  padding: 2px 12px;
  border: 0;
  border-radius: 7px;
  background: #ffffff;
  color: #060505;
  font-size: 15px;
  font-weight: 800;
}

.run-tab.selected {
  background: #8aa0b7;
  color: #ffffff;
}

.content {
  display: grid;
  gap: 0;
}

.content-panel {
  overflow: hidden;
  border: 3px solid #ffffff;
  border-top: 0;
  border-radius: 0 0 15px 15px;
  background: var(--panel);
  color: #071323;
}

.panel-header {
  padding: 16px 18px;
  border-bottom: 1px solid #d7dfe8;
  background: var(--panel);
}

.panel-title-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.panel-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
}

.run-title {
  margin: 2px 0 0;
  color: #48617f;
  font-weight: 800;
}

.live-summary {
  display: none;
}

.live-panel-title {
  align-items: center;
}

.live-indicator {
  display: inline-grid;
  grid-template-columns: auto auto;
  grid-template-areas:
    "dot label"
    ". meta";
  gap: 2px 8px;
  align-items: center;
  justify-content: end;
  
  padding: 8px 12px;
  border: 1px solid rgba(44, 155, 234, 0.35);
  border-radius: 9px;
  background: #ffffff;
  color: #071323;
  text-align: right;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.live-indicator span {
  grid-area: dot;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55);
  animation: live-pulse 1.4s ease-out infinite;
}

.live-indicator strong {
  grid-area: label;
  color: #0b6d32;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.live-indicator small {
  grid-area: meta;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(22, 163, 74, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #ffffff;
}

th,
td {
  padding: 10px 14px;
  border-bottom: 1px solid #d5dde7;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f5f8fb;
  color: #071323;
  font-size: 15px;
  font-weight: 800;
}

tbody tr:nth-child(odd) {
  background: #ffffff;
}

tbody tr:nth-child(even) {
  background: #f4f6f8;
}

tbody tr:hover {
  background: #e6f2fb;
}

tbody tr.has-live {
  background: #d4e7f5;
}

tbody tr.is-last-finished {
  background: #fff3c4;
}

tbody tr.has-live.is-last-finished {
  background: #ffe9a6;
}

.bib {
  display: inline-flex;
  min-width: 42px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #dbeafe;
  color: #0756d9;
  font-weight: 800;
}

.result-time {
  display: inline-grid;
  gap: 2px;
  min-width: 72px;
}

.result-time strong {
  color: var(--green);
  font-size: 15px;
  line-height: 1.15;
}

.result-time small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
}

.inline-live-badge {
  display: inline-flex;
  margin-left: 6px;
  padding: 3px 7px;
  border-radius: 4px;
  background: #08a64b;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  vertical-align: middle;
}

.status-badge {
  display: inline-flex;
  min-width: 88px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 10px;
  background: #eef2f6;
  color: #4d5b68;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge.resultStarted,
.status-badge.resultOnCourse {
  background: #fff0b8;
  color: #9a6200;
}

.status-badge.resultFinished {
  background: #d9f8e7;
  color: #087b35;
}

.status-badge.resultDnf,
.status-badge.resultDsq,
.status-badge.resultDns {
  background: #ffe0e0;
  color: #c4151c;
}

.empty {
  padding: 30px 20px;
  color: var(--muted);
}

.selected-competitor-card {
  display: grid;
  grid-template-columns: 92px 78px minmax(180px, 1.4fr) repeat(3, minmax(140px, 1fr));
  align-items: stretch;
  gap: 0;
  margin: 12px 0 0;
  overflow: hidden;
  border: 1px solid #e6b900;
  border-radius: 10px;
  background: linear-gradient(90deg, #fff9df 0%, #ffffff 48%, #fffdf4 100%);
  box-shadow: 0 2px 8px rgba(10, 79, 134, 0.12);
  margin:10px;
  margin-bottom:10px;
}

.selected-competitor-icon {
  display: grid;
  min-height: 120px;
  place-items: center;
  background: #fff1bd;
  color: #071323;
  font-size: 48px;
}

.selected-competitor-bib,
.selected-competitor-name,
.selected-competitor-result {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 16px 18px;
  border-right: 1px solid #e7e1cc;
}

.selected-competitor-bib {
  align-items: center;
  gap: 6px;
}

.selected-competitor-bib span,
.selected-competitor-result span {
  color: #233952;
  font-size: 13px;
  font-weight: 800;
}

.selected-competitor-bib strong {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #dbeafe;
  color: #0756d9;
  font-size: 23px;
}

.selected-competitor-name strong {
  overflow: hidden;
  color: #071323;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-competitor-name span {
  margin-top: 6px;
  color: #48617f;
  font-size: 14px;
}

.selected-competitor-result {
  gap: 5px;
}

.selected-competitor-result strong {
  color: #071323;
  font-size: 25px;
  line-height: 1.05;
}

.selected-competitor-result small {
  min-height: 15px;
  color: #48617f;
  font-size: 12px;
}

.selected-competitor-result.active {
  border: 1px solid #9cddb1;
  border-radius: 8px;
  background: #efffea;
}

.selected-competitor-result.active strong {
  color: #099447;
}

.selected-competitor-result.active em {
  display: inline-block;
  margin-left: 4px;
  padding: 3px 6px;
  border-radius: 4px;
  background: #08a64b;
  color: #ffffff;
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
}

.selected-competitor-result.total strong {
  font-weight: 900;
}

.selected-competitor-card.single-run .selected-competitor-result:not(.total) {
  display: none;
}

.selected-competitor-card.single-run {
  grid-template-columns: 92px 78px minmax(180px, 1.4fr) minmax(180px, 1fr);
}

.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(98, 96, 96, 0.86);
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(720px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  border-radius: 10px;
  background: #ffffff;
  color: #071323;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
}

.icon-button {
  width: 36px;
  min-height: 36px;
  padding: 0;
}

.modal-content {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.info-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.info-menu button {
  padding: 9px 12px;
  border: 0;
  border-radius: 5px;
  background: #808080;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.info-menu button.active {
  background: var(--blue);
}

.info-section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
}

.info-tab-panel {
  display: none;
}

.info-tab-panel.active {
  display: block;
}

.info-section h3 {
  margin: 0 0 12px;
}

.info-section dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 12px;
}

.info-section dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.info-section dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.info-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-list li {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.info-list a {
  color: var(--blue-dark);
  font-weight: 800;
  text-decoration: none;
}

.info-list span {
  color: var(--muted);
  font-size: 12px;
}

.info-start-card {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.info-start-card:first-of-type {
  margin-top: 0;
}

.info-start-card h4 {
  margin: 0;
  font-size: 17px;
}

.info-start-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.info-table-wrap {
  overflow-x: auto;
}

.info-start-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.info-start-table th,
.info-start-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.info-start-table th {
  background: #eef2f6;
  color: #071323;
  font-size: 12px;
  font-weight: 800;
}

.info-start-table tbody tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 900px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    justify-items: stretch;
  }

  .topbar::before {
    display: none;
  }

  .top-actions {
    width: auto;
    display: flex;
  }

  .topbar-title h1,
  .topbar-title .muted {
    text-align: left;
  }

  .top-menu {
    top: calc(100% - 8px);
    right: 10px;
  }

  .code-form,
  .event-facts,
  .live-dashboard {
    grid-template-columns: 1fr;
  }

  .message-ticker {
    width: 100%;
  }

  .sponsor-panel {
    display: none;
  }

  .live-flow {
    overflow: visible;
    padding: 0;
  }

  .flow-table-desktop {
    display: none;
  }

  .flow-table-mobile {
    display: block;
    overflow: hidden;
    border: 1px solid #0a4f86;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(10, 79, 134, 0.16);
  }

  .flow-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 13px;
    background: linear-gradient(110deg, #0a4f86, #0756d9);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
  }

  .flow-mobile-header strong {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 15px;
  }

  .flow-mobile-header > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .flow-mobile-live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #43e477;
    box-shadow: 0 0 0 5px rgba(67, 228, 119, 0.2);
  }

  .flow-mobile-row {
    display: grid;
    grid-template-columns: 34px auto minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-height: 54px;
    padding: 8px 10px;
    border-bottom: 1px solid #d7e0ea;
  }

  .flow-mobile-row:last-child {
    border-bottom: 0;
  }

  .flow-mobile-row.is-highlighted {
    background: #fff0b8;
  }

  .flow-mobile-status-icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: #eaf2fb;
    color: #0756d9;
    font-size: 17px;
  }

  .flow-mobile-label,
  .flow-mobile-name,
  .flow-mobile-bib,
  .flow-mobile-time {
    min-width: 0;
  }

  .flow-mobile-label {
    color: #0a4f86;
    font-size: 12px;
  }

  .flow-mobile-bib {
    padding: 5px 6px;
    border-radius: 6px;
    background: #e8f1fc;
    color: #0756d9;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
  }

  .flow-mobile-name {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .flow-mobile-time {
    color: #071323;
    font-size: 13px;
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
  }

  .flow-mobile-time small {
    display: block;
    width: max-content;
    margin: 3px 0 0 auto;
    padding: 2px 5px;
    border-radius: 4px;
    background: #08a64b;
    color: #ffffff;
    font-size: 9px;
    line-height: 1;
    text-transform: uppercase;
  }

  .flow-table {
    min-width: 720px;
    border-collapse: collapse;
    border-spacing: 0;
    background: #ffffff;
  }

  .flow-table thead {
    display: table-header-group;
  }

  .flow-table tbody {
    display: table-row-group;
  }

  .flow-table tbody tr {
    display: table-row;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .flow-table th,
  .flow-table td {
    display: table-cell;
    padding: 5px 8px;
    border-bottom: 1px solid #d5d5d5;
  }

  .flow-table td::before {
    content: none;
  }

  .category-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-result-tabs {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .main-result-tab-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .main-result-tab {
    width: 100%;
  }

  .live-tab-context {
    text-align: left;
    font-size: 15px;
  }

  .run-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-tab,
  .run-tab {
    width: 100%;
  }

  .info-section dl {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    overflow: visible;
  }

  .panel-title-row {
    display: grid;
  }

  .live-indicator {
    justify-content: start;
    text-align: left;
  }

  table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 10px;
    background: transparent;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 10px;
  }

  tbody tr,
  tbody tr.has-live {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 9px 14px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  tbody tr:hover {
    background: #ffffff;
  }

  td {
    display: grid;
    gap: 4px;
    padding: 0;
    border-bottom: 0;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }

  td:nth-child(1) {
    grid-row: span 2;
    align-content: start;
  }

  td:nth-child(2) {
    grid-column: 1;
  }

  td:nth-child(3) {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-content: start;
    font-size: 16px;
    font-weight: 800;
  }

  td:nth-child(6) {
    align-content: end;
  }

  .result-time {
    min-width: 0;
  }

  .result-time strong {
    font-size: 17px;
  }

  .app-shell {
    width: 100%;
    padding-bottom: 18px;
  }

  .topbar {
    margin: 0 0 12px;
    padding: 12px 14px;
    gap: 10px;
    border-radius: 0 0 10px 10px;
  }

  .topbar::before {
    font-size: 24px;
  }

  h1 {
    font-size: 15px;
  }

  .muted {
    font-size: 12px;
  }

  .selection-panel {
    padding: 8px 8px 0;
  }

  .main-result-tabs {
    margin: -8px -8px 8px;
    padding: 8px;
  }

  .content-panel {
    border-width: 2px;
    border-radius: 0 0 12px 12px;
  }

  .panel-header {
    padding: 14px 12px;
  }

  .panel-header h2 {
    font-size: 24px;
  }

  .live-panel-title {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .live-panel-title .live-indicator {
    grid-column: 2;
    grid-row: 1;
    justify-content: end;
    text-align: right;
  }

  .table-wrap {
    padding: 0 6px 6px;
  }

  table {
    border-spacing: 0 9px;
  }

  tbody {
    gap: 9px;
  }

  tbody tr,
  tbody tr.has-live,
  tbody tr.is-last-finished,
  tbody tr.has-live.is-last-finished {
    grid-template-columns: 64px repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "rank competitor competitor competitor"
      "bib club category category"
      ". run-one run-two total";
    gap: 7px 10px;
    min-height: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
  }

  tbody tr.is-last-finished,
  tbody tr.has-live.is-last-finished {
    border-color: #e6b900;
    background: #fff0b8;
  }

  .rank-value {
    display: inline-flex;
    width: 48px;
    min-width: 48px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #e7edf4;
    color: #071323;
    font-size: 20px;
    font-weight: 800;
  }

  tbody tr:first-child .rank-value {
    background: #ffd84d;
  }

  td:nth-child(1),
  td:nth-child(2),
  td:nth-child(3),
  td:nth-child(4),
  td:nth-child(5),
  td:nth-child(6),
  td:nth-child(7),
  td:nth-child(8) {
    grid-row: auto;
    grid-column: auto;
    align-content: start;
  }

  td:nth-child(1) { grid-area: rank; }
  td:nth-child(2) { grid-area: bib; }
  td:nth-child(3) {
    grid-area: competitor;
    font-size: 16px;
    font-weight: 800;
  }
  td:nth-child(4) { grid-area: club; }
  td:nth-child(5) { grid-area: category; }
  td:nth-child(6),
  td:nth-child(7),
  td:nth-child(8) {
    padding-top: 10px;
    
  }

  td:nth-child(6) {
    grid-area: run-one;
  }

  td:nth-child(7),
  td:nth-child(8) {
    padding-left: 14px;
    
  }

  td:nth-child(7) { grid-area: run-two; }
  td:nth-child(8) { grid-area: total; }

  .result-table tbody tr {
    position: relative;
  }

  .result-table .expand-cell {
    position: absolute;
    top: 14px;
    right: 12px;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    padding: 3px;
    
    color: #0756d9;
    font-family: Arial, sans-serif;
    font-size: 0;
    font-weight: 900;
    line-height: 1;
  }

  .result-table .expand-cell::before {
    content: none;
  }

  .result-table .expand-cell::after {
    content: "";
    display: block;
    width: 7px;
    height: 7px;
    border-right: 2px solid #0756d9;
    border-bottom: 2px solid #0756d9;
    transform: rotate(45deg) translate(-2px, -2px);
  }

  .result-table tbody tr.is-expanded .expand-cell {
    transform: rotate(180deg);
  }

  .result-table.has-run-columns tbody tr:not(.is-expanded) {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    grid-template-areas: "rank competitor total";
  }

  .result-table.has-run-columns tbody tr:not(.is-expanded) td:nth-child(2),
  .result-table.has-run-columns tbody tr:not(.is-expanded) td:nth-child(4),
  .result-table.has-run-columns tbody tr:not(.is-expanded) td:nth-child(5),
  .result-table.has-run-columns tbody tr:not(.is-expanded) td:nth-child(6),
  .result-table.has-run-columns tbody tr:not(.is-expanded) td:nth-child(7) {
    display: none;
  }

  .result-table.has-run-columns tbody tr:not(.is-expanded) td:nth-child(8) {
    display: grid;
    grid-area: total;
    padding: 0 28px 0 0;
    border: 0;
  }

  .result-table.single-result-column tbody tr:not(.is-expanded) {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    grid-template-areas: "rank competitor total";
  }

  .result-table.single-result-column tbody tr:not(.is-expanded) td:nth-child(2),
  .result-table.single-result-column tbody tr:not(.is-expanded) td:nth-child(4),
  .result-table.single-result-column tbody tr:not(.is-expanded) td:nth-child(5) {
    display: none;
  }

  .result-table.single-result-column tbody tr:not(.is-expanded) td:nth-child(6) {
    display: grid;
    grid-area: total;
    padding: 0 28px 0 0;
    border: 0;
  }

  td::before {
    font-size: 10px;
    letter-spacing: 0.02em;
  }

  td:nth-child(1)::before,
  td:nth-child(2)::before {
    color: var(--blue-dark);
  }

  .bib {
    width: 48px;
    min-width: 48px;
    height: 32px;
  }

  .selected-competitor-card,
  .selected-competitor-card.single-run {
    display: none;
  }

  .inline-live-badge {
    width: max-content;
    justify-self: start;
    margin-left: 0;
    margin-top: 2px;
  }

  .selected-competitor-card,
  .selected-competitor-card.single-run {
    grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "bib name name"
      "bib first second"
      "bib total total";
    margin: 8px 6px 0;
    border-radius: 10px;
  }

  .selected-competitor-icon {
    display: none;
  }

  .selected-competitor-bib { grid-area: bib; }
  .selected-competitor-name { grid-area: name; }
  .selected-competitor-result:nth-of-type(4) { grid-area: first; }
  .selected-competitor-result.active { grid-area: second; }
  .selected-competitor-result.total { grid-area: total; }

  .selected-competitor-bib,
  .selected-competitor-name,
  .selected-competitor-result {
    padding: 11px 10px;
  }

  .selected-competitor-name strong {
    font-size: 17px;
  }

  .selected-competitor-result strong {
    font-size: 21px;
  }

  .selected-competitor-result.active {
    border-radius: 7px;
  }
}
