:root {
  --bg: #f4f6f4;
  --ink: #171a16;
  --muted: #626b61;
  --line: #d7ddd4;
  --line-strong: #bfc8bc;
  --panel: #ffffff;
  --panel-soft: #eef3ef;
  --green: #d83145;
  --green-dark: #5b0713;
  --green-soft: #ffe4e8;
  --red: #2f6fb8;
  --red-soft: #e7f0ff;
  --amber: #f7fbff;
  --amber-soft: #f1f6ff;
  --blue: #2f6fb8;
  --violet: #d83145;
  --violet-soft: #ffe4e8;
  --shadow: 0 18px 44px rgba(23, 26, 22, 0.09);
  --shadow-soft: 0 8px 22px rgba(23, 26, 22, 0.06);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(23, 26, 22, 0.045) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(0deg, rgba(23, 26, 22, 0.035) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(180deg, #ffffff 0, var(--bg) 280px, var(--bg) 100%);
  color: var(--ink);
  overflow-x: hidden;
}

button,
select,
input {
  font: inherit;
}

a {
  color: inherit;
}

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

.topbar {
  position: relative;
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0 28px;
  border-bottom: 1px solid var(--line);
}

.topbar::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: min(360px, 42vw);
  height: 7px;
  background: var(--green);
}

.topbar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  width: min(460px, 44vw);
  height: 7px;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(
      90deg,
      var(--ink) 0 28px,
      #fff 28px 56px
    );
}

.topbar > div {
  min-width: 0;
}

.header-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
  max-width: 440px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 980px;
  margin-bottom: 0;
  font-size: clamp(2.2rem, 5vw, 4.75rem);
  line-height: 0.94;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

h2 {
  margin-bottom: 0;
  font-size: 1.12rem;
  line-height: 1.2;
}

.source-chip {
  max-width: 420px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: right;
  box-shadow: var(--shadow-soft);
}

.control-band,
.competitor-band,
.summary-grid,
.chart-grid,
.table-section {
  margin-top: 18px;
}

.control-band {
  display: grid;
  grid-template-columns:
    minmax(170px, 0.7fr)
    minmax(320px, 1.35fr)
    minmax(260px, 0.78fr)
    minmax(330px, 0.95fr);
  gap: 14px;
  align-items: end;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

label span,
legend {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

select {
  width: 100%;
  min-height: 42px;
  padding: 0 38px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 18px) 18px / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 12px) 18px / 6px 6px no-repeat,
    var(--panel);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

select:hover,
.segmented label span:hover,
.competitor-band label:hover {
  border-color: var(--line-strong);
}

select:focus,
input:focus-visible + span,
.competitor-band input:focus-visible {
  outline: 3px solid rgba(36, 107, 65, 0.18);
  outline-offset: 2px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  min-width: 238px;
  margin: 0;
  padding: 0;
  border: 0;
}

.segmented.compare {
  grid-template-columns: repeat(3, 1fr);
  min-width: 318px;
}

.control-band .segmented.compare,
.control-band .segmented.small {
  width: 100%;
  min-width: 0;
}

.segmented legend {
  grid-column: 1 / -1;
}

.segmented label {
  min-height: 42px;
}

.segmented input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.segmented label span {
  height: 42px;
  display: grid;
  place-items: center;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

.segmented input:checked + span {
  border-color: rgba(36, 107, 65, 0.55);
  background: var(--green-soft);
  color: var(--green-dark);
  box-shadow: inset 0 0 0 1px rgba(36, 107, 65, 0.08);
}

.segmented.small {
  width: min(260px, 100%);
  min-width: 0;
}

.segmented.small label span {
  height: 38px;
}

.competitor-band {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.competitor-band.is-visible {
  display: grid;
}

.competitor-band label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--ink);
  font-size: 0.88rem;
}

.competitor-band input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.metric-card {
  position: relative;
  min-height: 116px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--line);
}

.metric-card strong {
  display: block;
  font-size: clamp(1.35rem, 2.6vw, 2.15rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.metric-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.32;
}

.analytics-summary {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(36, 107, 65, 0.28);
  border-radius: 8px;
  background: rgba(228, 241, 232, 0.72);
  color: var(--green-dark);
  font-size: 0.84rem;
  font-weight: 850;
  text-decoration: none;
}

.text-link:hover {
  border-color: rgba(36, 107, 65, 0.52);
  background: var(--green-soft);
}

.metric-card.best::before {
  background: var(--green);
}

.metric-card.long::before {
  background: var(--red);
}

.chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.chart-panel,
.table-section {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.chart-panel.wide {
  grid-column: 1 / -1;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 12px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
}

.chart-tools {
  display: grid;
  justify-items: end;
  gap: 8px;
  max-width: 58%;
}

.chart-tools .segmented.small {
  width: min(300px, 100%);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcfb;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.legend-swatch {
  width: 18px;
  height: 4px;
  border-radius: 99px;
}

.chart-wrap {
  width: 100%;
  min-height: 560px;
  padding: 6px 0 0;
  border-top: 1px solid var(--line);
}

.chart-wrap.main-chart {
  min-height: 620px;
}

.chart-svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  overflow: visible;
}

.axis-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.axis-sublabel {
  fill: var(--muted);
  font-size: 10px;
}

.grid-line {
  stroke: #e2e7df;
  stroke-width: 1;
}

.team-line {
  fill: none;
  stroke-width: 2.8;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.hover-target {
  fill: transparent;
  pointer-events: all;
}

.hover-dot {
  opacity: 0;
  pointer-events: none;
  stroke: #fff;
  stroke-width: 1.5;
}

.chart-tooltip {
  opacity: 0;
  pointer-events: none;
}

.chart-tooltip rect {
  fill: rgba(23, 26, 22, 0.94);
}

.chart-tooltip text {
  fill: #fff;
  font-size: 12px;
  font-weight: 850;
}

.chart-tooltip .tooltip-subline {
  fill: #dfe5dc;
  font-size: 11px;
  font-weight: 700;
}

.hover-point:hover .hover-dot,
.hover-point:hover .chart-tooltip {
  opacity: 1;
}

.marker-best {
  fill: var(--green);
  stroke: #fff;
  stroke-width: 2;
}

.marker-long {
  fill: var(--red);
  stroke: #fff;
  stroke-width: 2;
}

.sector-legend {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.sector-tools {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.sector-tools .segmented.small {
  width: min(220px, 100%);
}

.sector-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.sector-swatch {
  width: 18px;
  height: 8px;
  border-radius: 999px;
}

.sector-swatch.purple {
  background: #a855f7;
}

.sector-swatch.personal {
  background: #35d07f;
}

.sector-swatch.slower {
  background: #facc15;
}

.sector-purple {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.sector-purple article {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(123, 91, 187, 0.55);
  border-radius: 8px;
  background: var(--violet-soft);
}

.sector-purple small,
.sector-purple strong,
.sector-purple span {
  display: block;
}

.sector-purple small {
  color: #5c438d;
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.sector-purple strong {
  margin-top: 2px;
  font-size: 0.98rem;
  line-height: 1.05;
}

.sector-purple span {
  margin-top: 4px;
  color: #5c438d;
  font-size: 0.72rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.sector-list {
  display: grid;
  gap: 8px;
  max-height: 318px;
  overflow: auto;
  padding-right: 4px;
}

.sector-row {
  display: grid;
  grid-template-columns: 48px 1fr 68px;
  gap: 10px;
  align-items: stretch;
  min-height: 54px;
}

.sector-row strong,
.sector-row span {
  font-size: 0.82rem;
}

.sector-row span {
  color: var(--muted);
  text-align: right;
}

.sector-row > strong,
.sector-row > span {
  align-self: center;
}

.sector-cells {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.sector-cell {
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f6;
}

.sector-cell small,
.sector-cell strong,
.sector-cell span {
  display: block;
  text-align: left;
}

.sector-cell small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

.sector-cell strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.05;
}

.sector-cell span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.sector-cell.purple {
  border-color: rgba(123, 91, 187, 0.55);
  background: var(--violet-soft);
}

.sector-cell.purple small,
.sector-cell.purple span {
  color: #5c438d;
}

.sector-cell.personal {
  border-color: #8fc59b;
  background: var(--green-soft);
}

.sector-cell.personal small,
.sector-cell.personal span {
  color: #27663a;
}

.sector-cell.slower {
  border-color: #d9bd2f;
  background: var(--amber-soft);
}

.sector-cell.slower small,
.sector-cell.slower span {
  color: #6a5611;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

table {
  width: 100%;
  min-width: 850px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

th,
td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
  font-size: 0.88rem;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef3ef;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

tbody tr:hover td {
  background: #f7faf7;
}

tbody tr:last-child td {
  border-bottom: 0;
}

th:first-child,
td:first-child {
  text-align: left;
}

tr.is-best td {
  background: #edf7ef;
}

tr.is-long td {
  background: var(--red-soft);
}

tr.is-selected td {
  background: #e8f3eb;
  box-shadow: inset 0 1px 0 #cfe4d5, inset 0 -1px 0 #cfe4d5;
}

.placement-wrap {
  max-height: 560px;
}

#placementTable {
  min-width: 1120px;
}

#placementTable th,
#placementTable td {
  min-width: 84px;
  vertical-align: top;
}

#placementTable .team-cell {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 280px;
  max-width: 340px;
  text-align: left;
  white-space: normal;
  background: #fff;
}

#placementTable thead .team-cell {
  z-index: 4;
  background: #eef3ef;
}

#placementTable tbody .team-cell {
  box-shadow: 1px 0 0 var(--line);
}

#placementTable .team-cell strong,
#placementTable .team-cell span,
#placementTable td small {
  display: block;
}

#placementTable .team-cell strong {
  font-size: 0.86rem;
  line-height: 1.25;
}

#placementTable .team-cell span,
#placementTable td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
}

#placementTable tr.is-selected .team-cell {
  background: #e8f3eb;
}

.hour-col {
  text-align: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  margin-left: 5px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.tag.best {
  background: #dff0e3;
  color: #1f6a36;
}

.tag.long {
  background: #f4ddd9;
  color: #8f3328;
}

.empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fbfcfb;
}

@media (max-width: 1080px) {
  .control-band,
  .chart-grid,
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .segmented {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .chart-tools {
    max-width: 68%;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 20px, 1520px);
    padding-top: 12px;
  }

  .topbar,
  .panel-head {
    display: grid;
  }

  .title-lockup {
    display: grid;
    gap: 8px;
  }

  .title-credit {
    padding-bottom: 0;
  }

  .topbar {
    gap: 16px;
    min-height: 0;
  }

  h1 {
    font-size: clamp(2rem, 12vw, 3.1rem);
    line-height: 0.98;
  }

  .topbar::before {
    width: 44%;
  }

  .topbar::after {
    width: 52%;
  }

  .header-actions,
  .source-chip,
  .legend,
  .chart-tools,
  .sector-tools {
    max-width: none;
    text-align: left;
    justify-content: flex-start;
    justify-items: start;
  }

  .control-band,
  .chart-grid,
  .summary-grid,
  .sector-purple,
  .sector-cells {
    grid-template-columns: 1fr;
  }

  .segmented.compare {
    grid-template-columns: 1fr;
  }

  .chart-wrap {
    min-height: 340px;
  }

  .chart-wrap.main-chart {
    min-height: 430px;
  }

  .sector-row {
    grid-template-columns: 1fr;
  }

  .sector-row span {
    text-align: left;
  }

  th,
  td {
    padding: 9px 10px;
  }
}

/* Dark motorsport theme */
:root {
  --bg: #080b0a;
  --ink: #f4f7f1;
  --muted: #a5b1a7;
  --line: #28312b;
  --line-strong: #445248;
  --panel: #101611;
  --panel-soft: #17231a;
  --green: #ff334e;
  --green-dark: #fff7f8;
  --green-soft: rgba(255, 51, 78, 0.15);
  --red: #2f8cff;
  --red-soft: rgba(47, 140, 255, 0.14);
  --amber: #f7fbff;
  --amber-soft: rgba(247, 251, 255, 0.12);
  --blue: #2f8cff;
  --violet: #ff334e;
  --violet-soft: rgba(255, 51, 78, 0.14);
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.46);
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.28);
}

body {
  background:
    radial-gradient(circle at 18% 0, rgba(255, 51, 78, 0.16), transparent 30rem),
    radial-gradient(circle at 88% 12%, rgba(47, 140, 255, 0.16), transparent 28rem),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(0deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px) 0 0 / 44px 44px,
    #080b0a;
  color: var(--ink);
}

.app-shell {
  padding-top: 18px;
}

.title-lockup {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.title-credit {
  padding-bottom: 6px;
  color: #dbe6d8;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0;
  white-space: nowrap;
}

.topbar {
  min-height: 320px;
  align-items: end;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(5, 8, 6, 0.96) 0, rgba(5, 8, 6, 0.78) 36%, rgba(5, 8, 6, 0.16) 72%, rgba(5, 8, 6, 0.34) 100%),
    linear-gradient(0deg, rgba(5, 8, 6, 0.88) 0, rgba(5, 8, 6, 0.04) 58%),
    url("assets/renntraktor-hero-ai.png") center 50% / cover no-repeat;
  box-shadow: var(--shadow);
}

.topbar::before {
  display: none;
}

.topbar::after {
  display: none;
}

.topbar h1 {
  max-width: 820px;
  color: #ffffff;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.7);
}

.topbar .eyebrow {
  display: none;
}

.header-actions {
  position: relative;
  z-index: 1;
}

.source-chip,
.text-link,
.control-band,
.competitor-band,
.metric-card,
.chart-panel,
.table-section,
.table-wrap,
.competitor-band label,
.legend-item,
.empty-state {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(16, 22, 17, 0.88);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.source-chip {
  color: #dbe6d8;
  backdrop-filter: blur(10px);
}

.text-link {
  border-color: rgba(47, 140, 255, 0.46);
  background: rgba(47, 140, 255, 0.16);
  color: #eef6ff;
}

.text-link:hover {
  border-color: rgba(255, 51, 78, 0.78);
  background: rgba(255, 51, 78, 0.2);
}

.control-band,
.chart-panel,
.table-section {
  backdrop-filter: blur(10px);
}

label span,
legend,
.eyebrow,
.axis-label,
.axis-sublabel,
.legend-item,
.sector-legend span,
.sector-row span,
.sector-cell small,
.sector-cell span,
th,
#placementTable .team-cell span,
#placementTable td small,
.metric-card span {
  color: var(--muted);
}

select,
.segmented label span {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 18px) 18px / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 12px) 18px / 6px 6px no-repeat,
    #0d130f;
  color: var(--ink);
}

.segmented label span {
  background: #0d130f;
}

select:hover,
.segmented label span:hover,
.competitor-band label:hover {
  border-color: rgba(47, 140, 255, 0.56);
}

select:focus,
input:focus-visible + span,
.competitor-band input:focus-visible {
  outline-color: rgba(47, 140, 255, 0.38);
}

.segmented input:checked + span {
  border-color: rgba(255, 51, 78, 0.8);
  background: rgba(255, 51, 78, 0.18);
  color: #fff7f8;
  box-shadow:
    inset 0 0 0 1px rgba(255, 51, 78, 0.2),
    0 0 18px rgba(255, 51, 78, 0.18);
}

.control-band {
  position: relative;
}

.control-band::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--amber));
}

.metric-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 42%),
    rgba(16, 22, 17, 0.92);
}

.metric-card::before {
  background: rgba(255, 255, 255, 0.14);
}

.metric-card.best::before {
  background: var(--green);
  box-shadow: 0 0 18px rgba(255, 51, 78, 0.42);
}

.metric-card.long::before {
  background: var(--blue);
  box-shadow: 0 0 18px rgba(255, 106, 85, 0.36);
}

.chart-wrap {
  border-top-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(0deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px) 0 0 / 48px 48px;
}

.grid-line {
  stroke: rgba(255, 255, 255, 0.1);
}

.team-line {
  filter: drop-shadow(0 0 4px rgba(47, 140, 255, 0.24));
}

.chart-tooltip rect {
  fill: rgba(0, 0, 0, 0.92);
  stroke: rgba(255, 255, 255, 0.18);
}

.hover-dot,
.marker-best,
.marker-long {
  stroke: #080b0a;
}

.sector-swatch.slower {
  background: #facc15;
}

.sector-purple article,
.sector-cell.purple {
  border-color: rgba(168, 85, 247, 0.58);
  background: rgba(168, 85, 247, 0.16);
}

.sector-purple small,
.sector-purple span,
.sector-cell.purple small,
.sector-cell.purple span {
  color: #ffd9df;
}

.sector-cell.personal {
  border-color: rgba(53, 208, 127, 0.58);
  background: rgba(53, 208, 127, 0.15);
}

.sector-cell.personal small,
.sector-cell.personal span {
  color: #c9f7dc;
}

.sector-cell.slower {
  border-color: rgba(250, 204, 21, 0.58);
  background: rgba(250, 204, 21, 0.12);
}

.sector-cell.slower small,
.sector-cell.slower span {
  color: #ffed9a;
}

table {
  background: #0d130f;
}

th,
#placementTable thead .team-cell {
  background: #17231a;
}

td,
#placementTable .team-cell {
  background: #0d130f;
}

tbody tr:hover td {
  background: #152018;
}

tr.is-best td,
#placementTable tr.is-selected .team-cell {
  background: rgba(255, 51, 78, 0.14);
}

tr.is-long td {
  background: rgba(255, 106, 85, 0.13);
}

tr.is-selected td {
  background: rgba(255, 51, 78, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 51, 78, 0.28), inset 0 -1px 0 rgba(255, 51, 78, 0.28);
}

.tag {
  background: rgba(255, 255, 255, 0.08);
  color: #dbe6d8;
}

.tag.best {
  background: rgba(255, 51, 78, 0.18);
  color: #ffdbe0;
}

.tag.long {
  background: rgba(47, 140, 255, 0.18);
  color: #dceeff;
}

.empty-state {
  border-color: rgba(255, 255, 255, 0.16);
}

@media (max-width: 720px) {
  .topbar {
    min-height: 430px;
    padding: 22px 18px 28px;
    align-content: end;
    background:
      linear-gradient(90deg, rgba(5, 8, 6, 0.78) 0, rgba(5, 8, 6, 0.44) 58%, rgba(5, 8, 6, 0.18) 100%),
      linear-gradient(0deg, rgba(5, 8, 6, 0.92) 0, rgba(5, 8, 6, 0.58) 48%, rgba(5, 8, 6, 0.08) 100%),
      url("assets/renntraktor-hero-ai.png") 60% center / cover no-repeat;
  }

}
