main.tt-main {
  max-width: 76rem;
}

.tt .tt-quiet,
.tt-quiet {
  color: var(--flash-less-light);
}

.tt-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.tt h1 {
  margin-top: 0.25em;
}

.tt-crumbs {
  margin-top: 0.5rem;
  color: var(--flash-less-light);
  font-size: 0.9rem;
}

.tt-hint {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

/* Buttons and toggles */

.tt-segs {
  display: inline-flex;
  border-radius: 9999px;
  box-shadow: 0 0.25rem 0.5rem var(--flash-shadow);
}

.tt-seg {
  padding: 0.3rem 0.95rem;
  border: none;
  background-color: var(--flash-dark);
  color: var(--flash-light);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.15s,
    color 0.15s;
}

.tt-seg:first-child {
  border-radius: 9999px 0 0 9999px;
}

.tt-seg:last-child {
  border-radius: 0 9999px 9999px 0;
}

.tt-seg:hover:not(.selected) {
  background-color: var(--flash-less-dark);
  color: var(--flash-white);
}

.tt-seg.selected {
  background-color: var(--flash-tab-selected-bg);
  color: var(--flash-tab-selected-color);
}

main a.tt-seg {
  display: inline-block;
  color: var(--flash-light);
  text-decoration: none;
}

main a.tt-seg:hover:not(.selected) {
  color: var(--flash-white);
}

main a.tt-seg.selected {
  color: var(--flash-tab-selected-color);
}

.tt-tabs {
  margin: 0 0 1rem;
}

.tt-card > .tt-track-best {
  margin: 0;
}

.tt-seg:focus-visible,
.tt-scrub:focus-visible,
.tt-check:focus-visible,
.tt-search input:focus-visible,
.tt a:focus-visible,
.tt-canvas:focus-visible {
  outline: 0.15rem solid var(--flash-highlight);
  outline-offset: 0.15rem;
}

.tt .pub-btn .icon {
  width: 1.1rem;
  height: 1.1rem;
}

.tt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 1.25rem 0 0.25rem;
}

.tt-grow {
  flex: 1;
}

.tt-search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 28rem;
  margin: 1.25rem 0;
  padding: 0.35rem 1rem;
  border: 0.1rem solid var(--flash-border);
  border-radius: 9999px;
  background-color: var(--flash-gray-dark);
  color: var(--flash-less-light);
}

.tt-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--flash-white);
  outline-offset: 0.5rem;
}

.tt-search input::placeholder {
  color: var(--flash-less-light);
}

/* Blocks */

.tt-block {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.tt-block p {
  margin: 0.1rem 0;
}

.tt-block .icon {
  margin-top: 0.3rem;
  color: var(--flash-skin);
}

.tt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem 0;
  padding: 2rem 1rem;
  border: 0.1rem dashed var(--flash-border);
  border-radius: 0.5rem;
  color: var(--flash-less-light);
  text-align: center;
}

.tt-empty .icon {
  width: 2rem;
  height: 2rem;
}

.tt-empty strong {
  margin-top: 0.5rem;
  color: var(--flash-white);
}

.tt-empty p {
  margin: 0.25rem 0 0;
}

/* Home */

.tt-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.tt-card {
  padding: 1.1rem 1.25rem 1.25rem;
  border: 0.1rem solid var(--flash-border);
  border-radius: 0.5rem;
  background-color: var(--flash-gray-dark);
}

.tt-card h2 {
  margin: 0;
  font-size: 1.5rem;
}

.tt-card h2::after {
  display: none;
}

.tt-card header p {
  margin: 0.25rem 0 0.9rem;
  font-size: 0.85rem;
}

.tt-tracks {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tt-tracks li {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  margin: 0;
}

.tt-track {
  display: flex;
  flex: 1;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0.8rem;
  border-radius: 0.4rem;
  background-color: var(--flash-darker);
  color: var(--flash-white);
  line-height: 1.5;
}

main a.tt-track {
  color: var(--flash-white);
  text-decoration: none;
}

main a.tt-track:hover {
  background-color: var(--flash-dark);
  color: var(--flash-white);
}

.tt-track-name {
  font-weight: 600;
}

.tt-track-best {
  color: var(--flash-less-light);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

main a.tt-wet {
  display: flex;
  align-items: center;
  padding: 0 0.7rem;
  border-radius: 0.4rem;
  background-color: var(--flash-cyan-darker);
  color: var(--flash-cyan-light);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

main a.tt-wet:hover {
  background-color: var(--flash-cyan-dark);
  color: var(--flash-white);
}

/* Table */

.tt-table table {
  font-variant-numeric: tabular-nums;
}

.tt-table.tt-dim {
  opacity: 0.55;
}

.tt-row {
  cursor: pointer;
}

.tt-row:hover td {
  background-color: var(--flash-hover);
}

.tt-row.picked td {
  background-color: var(--flash-cyan-darker);
}

.tt-rank {
  color: var(--flash-less-light);
  font-weight: 700;
  text-align: right !important;
}

.tt-time,
.tt-gap,
.tt-sector,
.tt-num {
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

main .tt-time a {
  color: var(--flash-white);
  font-weight: 600;
  text-decoration: none;
}

main .tt-time a:hover {
  color: var(--flash-highlight);
  text-decoration: underline;
}

.tt-gap {
  color: var(--flash-less-light);
}

.tt-sector.best {
  color: var(--flash-purple);
  font-weight: 700;
}

.flash-theme-peach .tt-sector.best,
:root .tt-sector.best {
  color: var(--flash-pink);
}

.tt-driver {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  font-weight: 600;
}

main a.tt-driver {
  color: var(--flash-white);
  text-decoration: none;
}

main a.tt-driver:hover {
  color: var(--flash-highlight);
}

.tt-avatar {
  flex-shrink: 0;
  border-radius: 9999px;
  object-fit: cover;
}

.tt-avatar--blank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--flash-dark);
  color: var(--flash-light);
  font-family: var(--font-round);
  font-weight: 700;
}

.tt-status {
  display: inline-block;
  padding: 0 0.6rem;
  border-radius: 0.25rem;
  background-color: var(--flash-less-dark);
  color: var(--flash-white);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

.tt-status--accepted {
  background-color: var(--flash-cyan-darker);
  color: var(--flash-green);
}

.tt-status--pending {
  background-color: var(--flash-dark-orange);
  color: var(--flash-orange);
}

.tt-status--rejected {
  background-color: var(--flash-dark-skin);
  color: var(--flash-skin);
}

.tt-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.tt-chip {
  padding: 0 0.5rem;
  border-radius: 0.25rem;
  background-color: var(--flash-darker);
  color: var(--flash-light);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.tt-chip--ok {
  background-color: var(--flash-cyan-darker);
  color: var(--flash-green);
}

.tt-chip--warn {
  background-color: var(--flash-dark-orange);
  color: var(--flash-orange);
}

.tt-check {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--flash-highlight);
  cursor: pointer;
}

.tt-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

@media (max-width: 1023px) {
  .hide-md {
    display: none;
  }
}

@media (max-width: 719px) {
  .hide-sm {
    display: none;
  }

  .tt-table th,
  .tt-table td {
    padding: 0.4rem 0.5rem;
  }

  .tt-cards {
    grid-template-columns: 1fr;
  }

  .tt h1 {
    font-size: 2.2rem;
  }
}

/* Lap */

.tt-lap-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.tt-lap-head h1 {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.tt-lap-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0.5rem 0 0;
}

.tt-lap-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.tt-replay {
  margin-top: 1rem;
}

.tt-stage {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(15rem, 2fr);
  gap: 1rem;
}

.tt-map-wrap {
  min-width: 0;
  border: 0.1rem solid var(--flash-border);
  border-radius: 0.5rem;
  background-color: var(--flash-gray-darker);
}

.tt-map {
  display: block;
  width: 100%;
  height: 26rem;
}

.tt-hud {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tt-hud-lap {
  padding: 0.75rem 1rem;
  border: 0.1rem solid var(--flash-border);
  border-radius: 0.5rem;
  background-color: var(--flash-gray-dark);
}

.tt-hud-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}

.tt-dot,
.tt-swatch {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  margin-right: 0.35rem;
  border-radius: 9999px;
  background-color: var(--flash-yellow);
}

.tt-hud-name .tt-dot {
  margin: 0;
}

.tt-hud-lap.b .tt-dot,
.tt-swatch.b {
  background-color: var(--flash-cyan-light);
}

.tt-hud dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(4.5rem, 1fr));
  gap: 0.4rem 0.75rem;
  margin: 0.6rem 0 0;
}

.tt-hud dt {
  color: var(--flash-less-light);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tt-hud dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tt-hud-gap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background-color: var(--flash-darker);
  color: var(--flash-less-light);
}

.tt-hud-gap b {
  color: var(--flash-cyan-light);
  font-family: var(--font-mono);
  font-size: 1.15rem;
}

.tt-transport {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
}

.tt-clock {
  min-width: 7.5rem;
  color: var(--flash-light);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.tt-scrub {
  flex: 1;
  min-width: 10rem;
  accent-color: var(--flash-highlight);
  cursor: pointer;
}

.tt-keys {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
}

.tt-charts {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.tt-chart {
  padding: 0.5rem 0.75rem 0.25rem;
  border: 0.1rem solid var(--flash-border);
  border-radius: 0.5rem;
  background-color: var(--flash-gray-darker);
}

.tt-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  font-size: 0.82rem;
}

.tt-chart-title {
  color: var(--flash-light);
  font-family: var(--font-round);
  font-weight: 700;
}

.tt-chart-legend {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  color: var(--flash-less-light);
  font-variant-numeric: tabular-nums;
}

.tt-legend-item b {
  margin-left: 0.4rem;
  color: var(--flash-white);
  font-family: var(--font-mono);
  font-weight: 600;
}

.tt-canvas {
  display: block;
  width: 100%;
  touch-action: pan-y;
  cursor: crosshair;
}

.tt-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
  gap: 0 2rem;
}

.tt-check-result {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 700;
}

.tt-check-result .icon {
  width: 1rem;
  height: 1rem;
}

.tt-check-result.ok {
  color: var(--flash-green);
}

.tt-check-result.bad {
  color: var(--flash-skin);
}

.tt-driver-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

.tt-driver-head h1 {
  margin: 0;
}

.tt-driver-head p {
  margin: 0;
}

@media (max-width: 859px) {
  .tt-stage {
    grid-template-columns: 1fr;
  }

  .tt-map {
    height: 20rem;
  }
}

@media (max-width: 479px) {
  .tt-two {
    grid-template-columns: 1fr;
  }

  .tt-map {
    height: 17rem;
  }

  .tt-play {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tt-seg,
  .tt-track {
    transition: none;
  }
}

.tt-chips {
  flex-wrap: nowrap;
}

.tt-table td:nth-child(n + 5) {
  white-space: nowrap;
}
