/*
 * THE COMPETITION PAGES' OWN VOCABULARY, ON THE THEME'S TOKENS.
 *
 * This block was SkyTrackPro's: a light set in cobalt and navy, and a second,
 * hand-kept night set that repeated every value in brighter blues. Every value
 * now resolves through terraloc-theme.css, which already carries both faces,
 * so there is no night copy to keep in step. Status colours are the theme's
 * semantic ones; live is --tl-live and nothing else.
 */
#tlcomp-public-list,
#tlcomp-public-detail,
#tlcomp-profile-root {
  --tlcomp-row-hover-bg: rgba(var(--tl-ink-rgb), .03);
  --tlcomp-row-selected-bg: rgba(var(--tl-accent-rgb), .10);
  --tlcomp-row-selected-accent: var(--tl-accent);
  --tlcomp-row-striped-bg: rgba(var(--tl-ink-rgb), .03);
  --tlcomp-row-editor-bg: rgba(var(--tl-ink-rgb), .04);
  --tlcomp-hero-surface-gradient: linear-gradient(135deg, var(--tl-paper-deep), var(--tl-panel));
  --tlcomp-hero-fallback-gradient: linear-gradient(160deg, var(--tl-forest), var(--tl-paper-deep) 70%);
  --tlcomp-neutral-badge-bg: rgba(var(--tl-ink-rgb), .06);
  --tlcomp-neutral-badge-border: var(--tl-hairline);
  --tlcomp-neutral-badge-color: var(--tl-ink);
  --tlcomp-neutral-alert-bg: var(--tl-paper-deep);
  --tlcomp-neutral-alert-border: var(--tl-hairline);
  --tlcomp-neutral-alert-color: var(--tl-ink);
  --tlcomp-reg-section-bg: var(--tl-panel);
  --tlcomp-reg-bulk-bg: rgba(var(--tl-ink-rgb), .02);
  --tlcomp-accordion-btn-bg: var(--tl-panel);
  --tlcomp-accordion-btn-active-bg: rgba(var(--tl-accent-rgb), .10);
  --tlcomp-accordion-btn-hover-bg: rgba(var(--tl-accent-rgb), .14);
  --tlcomp-result-scope-border: rgba(var(--tl-accent-rgb), .3);
  --tlcomp-result-scope-bg: rgba(var(--tl-accent-rgb), .10);
  --tlcomp-result-scope-color: var(--tl-accent);
  --tlcomp-dynamic-field-border: var(--tl-hairline);
  --tlcomp-dynamic-field-bg: var(--tl-panel);
  --tlcomp-dynamic-field-checkbox-border: rgba(var(--tl-accent-rgb), .25);
  --tlcomp-dynamic-field-checkbox-bg: rgba(var(--tl-accent-rgb), .08);
  --tlcomp-athletes-summary-bg: var(--tl-panel);
  --tlcomp-athlete-stat-border: var(--tl-hairline);
  --tlcomp-athlete-stat-bg: var(--tl-paper);
  --tlcomp-athlete-stat-color: var(--tl-ink);
  --tlcomp-athlete-stat-confirmed: var(--tl-success);
  --tlcomp-athlete-stat-selected: var(--tl-accent);
  --tlcomp-athlete-stat-registered: var(--tl-ink);
  --tlcomp-athlete-stat-allowed: var(--tl-muted);
  --tlcomp-athlete-stat-countries: var(--tl-muted);
  --tlcomp-athlete-group-head-bg: var(--tl-paper-deep);
  --tlcomp-athlete-group-head-color: var(--tl-ink);
  --tlcomp-reg-stat-selected: var(--tl-accent);
  --tlcomp-reg-stat-confirmed: var(--tl-success);
  --tlcomp-reg-stat-waitlist: var(--tl-dim);
  --tlcomp-reg-stat-docs: var(--tl-danger);
  --tlcomp-reg-stat-payment: var(--tl-warning);
  --tlcomp-smart-chip-active-bg: var(--tl-ink);
  --tlcomp-smart-chip-active-border: var(--tl-ink);
  --tlcomp-smart-chip-active-color: var(--tl-paper);
  --tlcomp-needs-action-shadow: var(--tl-warning);
  --tlcomp-need-chip-bg: var(--tl-warning-bg);
  --tlcomp-need-chip-color: var(--tl-warning);
}

.tlcomp-badge-neutral {
  background: var(--tlcomp-neutral-badge-bg);
  border: 1px solid var(--tlcomp-neutral-badge-border);
  color: var(--tlcomp-neutral-badge-color);
}

.tlcomp-alert-neutral {
  background: var(--tlcomp-neutral-alert-bg);
  border: 1px solid var(--tlcomp-neutral-alert-border);
  color: var(--tlcomp-neutral-alert-color);
}

#tlcomp-list .tlcomp-row {
  cursor: pointer;
}

#tlcomp-list .tlcomp-row:hover {
  background: var(--tlcomp-row-hover-bg);
}

#tlcomp-list .tlcomp-row.is-selected {
  background: var(--tlcomp-row-selected-bg);
  box-shadow: inset 3px 0 0 var(--tlcomp-row-selected-accent);
}

#tlcomp-public-detail .tlcomp-panel {
  border: 1px solid var(--tl-hairline);
  border-radius: .5rem;
  background: var(--tl-paper);
}

#tlcomp-public-detail .tlcomp-countdown {
  font-weight: 600;
  letter-spacing: .02em;
}

#tlcomp-public-detail .tlcomp-reg-section {
  border: 1px solid var(--tl-hairline);
  border-radius: .65rem;
  background: var(--tlcomp-reg-section-bg);
}

#tlcomp-public-detail .tlcomp-reg-section h6 {
  font-size: .95rem;
  letter-spacing: .01em;
}

#tlcomp-public-detail .tlcomp-reg-layout {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

#tlcomp-public-detail .tlcomp-reg-required-note {
  margin-bottom: 0;
}

#tlcomp-public-detail .tlcomp-reg-account .form-label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--tl-muted);
  letter-spacing: .035em;
  text-transform: uppercase;
}

#tlcomp-public-detail .tlcomp-reg-account .form-control[readonly] {
  background: rgba(var(--tl-ink-rgb), .03);
}

#tlcomp-public-detail .tlcomp-reg-section-title {
  margin: 0 0 .75rem;
  font-size: .98rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--tl-ink);
}

#tlcomp-public-detail .tlcomp-reg-field-block {
  border: 1px dashed rgba(var(--tl-ink-rgb), .17);
  border-radius: .62rem;
  background: rgba(var(--tl-paper-rgb), .86);
  padding: .75rem;
}

#tlcomp-public-detail .tlcomp-reg-field-block + .tlcomp-reg-field-block {
  margin-top: .7rem;
}

#tlcomp-public-detail .tlcomp-reg-field-block-title {
  margin: 0 0 .6rem;
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--tl-muted);
}

#tlcomp-public-detail .tlcomp-reg-fields .form-label {
  margin-bottom: .3rem;
  font-size: .83rem;
}

#tlcomp-public-detail .tlcomp-reg-fields .form-control,
#tlcomp-public-detail .tlcomp-reg-fields .form-select {
  min-height: calc(1.5em + .68rem + 2px);
}

#tlcomp-public-detail .tlcomp-reg-accordion {
  --bs-accordion-btn-padding-y: .85rem;
  --bs-accordion-btn-padding-x: .95rem;
  --bs-accordion-body-padding-y: .85rem;
  --bs-accordion-body-padding-x: .95rem;
  --bs-accordion-border-radius: .68rem;
  --bs-accordion-inner-border-radius: calc(.68rem - 1px);
}

#tlcomp-public-detail .tlcomp-reg-accordion .accordion-item {
  border: 1px solid var(--tl-hairline);
  border-radius: .68rem;
  overflow: hidden;
  background: var(--tlcomp-reg-section-bg);
  box-shadow: none;
}

#tlcomp-public-detail .tlcomp-reg-accordion .accordion-item + .accordion-item {
  margin-top: .55rem;
}

#tlcomp-public-detail .tlcomp-reg-accordion .accordion-button {
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--tl-ink);
  background: var(--tlcomp-accordion-btn-bg);
}

#tlcomp-public-detail .tlcomp-reg-accordion .accordion-button:not(.collapsed) {
  background: var(--tlcomp-accordion-btn-active-bg);
  box-shadow: none;
}

#tlcomp-public-detail .tlcomp-reg-accordion .accordion-button:focus {
  box-shadow: 0 0 0 .2rem rgba(var(--tl-accent-rgb), .2);
}

#tlcomp-public-detail .tlcomp-reg-accordion .accordion-button:hover {
  background: var(--tlcomp-accordion-btn-hover-bg);
}

#tlcomp-public-detail .tlcomp-reg-accordion .accordion-body {
  border-top: 1px solid var(--tl-hairline);
}

#tlcomp-public-detail .tlcomp-reg-actions {
  margin-top: .1rem;
  padding-top: .35rem;
  border-top: 1px dashed rgba(var(--tl-ink-rgb), .18);
}

#tlcomp-public-detail .tlcomp-reg-status-note {
  margin-top: -.2rem;
}

#tlcomp-public-detail .tlcomp-reg-docs {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--tl-hairline);
}

#tlcomp-public-detail .tlcomp-reg-docs h6 {
  font-size: .95rem;
  letter-spacing: .01em;
}

#tlcomp-public-detail .tlcomp-news-shell {
  display: flex;
  flex-direction: column;
}

#tlcomp-public-detail .tlcomp-news-accordion {
  --bs-accordion-btn-padding-y: .85rem;
  --bs-accordion-btn-padding-x: 1rem;
  --bs-accordion-body-padding-y: .95rem;
  --bs-accordion-body-padding-x: 1rem;
  --bs-accordion-border-radius: .75rem;
  --bs-accordion-inner-border-radius: calc(.75rem - 1px);
}

#tlcomp-public-detail .tlcomp-news-accordion .accordion-item {
  border: 1px solid var(--tl-hairline);
  border-radius: .75rem;
  overflow: hidden;
  background: var(--tl-paper);
  box-shadow: none;
}

#tlcomp-public-detail .tlcomp-news-accordion .accordion-item + .accordion-item {
  margin-top: .65rem;
}

#tlcomp-public-detail .tlcomp-news-accordion .accordion-button {
  align-items: flex-start;
  gap: .75rem;
  background: var(--tlcomp-accordion-btn-bg);
  color: var(--tl-ink);
}

#tlcomp-public-detail .tlcomp-news-accordion .accordion-button:not(.collapsed) {
  background: var(--tlcomp-accordion-btn-active-bg);
  box-shadow: none;
}

#tlcomp-public-detail .tlcomp-news-accordion .accordion-button:focus {
  box-shadow: 0 0 0 .2rem rgba(var(--tl-accent-rgb), .2);
}

#tlcomp-public-detail .tlcomp-news-accordion .accordion-button:hover {
  background: var(--tlcomp-accordion-btn-hover-bg);
}

#tlcomp-public-detail .tlcomp-news-heading {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#tlcomp-public-detail .tlcomp-news-title {
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--tl-ink);
  word-break: break-word;
}

#tlcomp-public-detail .tlcomp-news-date {
  margin-top: .22rem;
  font-size: .82rem;
  color: var(--tl-muted);
}

#tlcomp-public-detail .tlcomp-news-accordion .accordion-body {
  font-size: .95rem;
  line-height: 1.55;
  border-top: 1px solid var(--tl-hairline);
}

#tlcomp-public-detail .tlcomp-news-accordion .accordion-body > :last-child {
  margin-bottom: 0;
}

#tlcomp-public-detail .tlcomp-news-empty {
  border: 1px dashed var(--tl-hairline);
  border-radius: .75rem;
  padding: .95rem 1rem;
  background: var(--tl-paper-deep);
  color: var(--tl-muted);
}

#tlcomp-public-detail .tlcomp-results-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#tlcomp-public-detail .tlcomp-results-section + .tlcomp-results-section {
  margin-top: .2rem;
}

#tlcomp-public-detail .tlcomp-results-section {
  padding-top: 0;
  padding-bottom: 0;
}

#tlcomp-public-detail .tlcomp-results-section-title {
  margin: 0 0 .6rem;
  font-size: .95rem;
  letter-spacing: .01em;
}

/* Collapsible "Final Results" section (native details/summary) */
#tlcomp-public-detail .tlcomp-results-collapsible > .tlcomp-results-summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .5rem;
  list-style: none;
  user-select: none;
}

#tlcomp-public-detail .tlcomp-results-collapsible > .tlcomp-results-summary::-webkit-details-marker {
  display: none;
}

#tlcomp-public-detail .tlcomp-results-collapsible > .tlcomp-results-summary::before {
  content: "\f105"; /* fa chevron-right */
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", sans-serif;
  font-weight: 900;
  transition: transform .18s ease;
  opacity: .6;
}

#tlcomp-public-detail .tlcomp-results-collapsible[open] > .tlcomp-results-summary::before {
  transform: rotate(90deg);
}

#tlcomp-public-detail .tlcomp-results-collapsible-body {
  padding-top: .6rem;
}

#tlcomp-public-detail .tlcomp-result-card {
  border: 1px solid var(--tl-hairline);
  border-radius: .75rem;
  background: var(--tl-paper);
  padding: .85rem .95rem;
}

#tlcomp-public-detail .tlcomp-result-card + .tlcomp-result-card {
  margin-top: .6rem;
}

#tlcomp-public-detail .tlcomp-result-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .7rem;
}

#tlcomp-public-detail .tlcomp-result-card-title {
  margin: 0;
  font-size: .98rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--tl-ink);
}

#tlcomp-public-detail .tlcomp-result-card-scope {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--tlcomp-result-scope-border);
  border-radius: 999px;
  background: var(--tlcomp-result-scope-bg);
  color: var(--tlcomp-result-scope-color);
  font-size: .74rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: .35rem .6rem;
  white-space: nowrap;
}

#tlcomp-public-detail .tlcomp-result-card-meta {
  margin-top: .35rem;
  font-size: .82rem;
  color: var(--tl-muted);
}

#tlcomp-public-detail .tlcomp-result-card-summary {
  margin-top: .6rem;
  font-size: .92rem;
  line-height: 1.55;
}

#tlcomp-public-detail .tlcomp-result-card-summary > :last-child {
  margin-bottom: 0;
}

/* Shared results table: public detail page and the admin (profile) Results tab. */
#tlcomp-public-detail .tlcomp-result-card-table,
#tlcomp-profile-root .tlcomp-result-card-table {
  margin-top: .7rem;
}

#tlcomp-public-detail .tlcomp-result-card-link-wrap {
  margin-top: .7rem;
}

#tlcomp-public-detail .tlcomp-result-card-link {
  font-weight: 600;
  text-decoration: none;
}

#tlcomp-public-detail .tlcomp-result-card-link:hover,
#tlcomp-public-detail .tlcomp-result-card-link:focus {
  text-decoration: underline;
}

#tlcomp-public-detail .tlcomp-results-empty {
  border: 1px dashed var(--tl-hairline);
  border-radius: .75rem;
  padding: .9rem 1rem;
  background: var(--tl-paper-deep);
  color: var(--tl-muted);
}

#tlcomp-public-detail .tlcomp-results-accordion {
  --bs-accordion-btn-padding-y: .8rem;
  --bs-accordion-btn-padding-x: .95rem;
  --bs-accordion-body-padding-y: .85rem;
  --bs-accordion-body-padding-x: .95rem;
  --bs-accordion-border-radius: .75rem;
  --bs-accordion-inner-border-radius: calc(.75rem - 1px);
}

#tlcomp-public-detail .tlcomp-results-accordion .accordion-item {
  border: 1px solid var(--tl-hairline);
  border-radius: .75rem;
  overflow: hidden;
  background: var(--tl-paper);
  box-shadow: none;
}

#tlcomp-public-detail .tlcomp-results-accordion .accordion-item + .accordion-item {
  margin-top: .6rem;
}

#tlcomp-public-detail .tlcomp-results-accordion .accordion-button {
  align-items: flex-start;
  gap: .7rem;
  background: var(--tlcomp-accordion-btn-bg);
}

#tlcomp-public-detail .tlcomp-results-accordion .accordion-button:not(.collapsed) {
  background: var(--tlcomp-accordion-btn-active-bg);
  box-shadow: none;
}

#tlcomp-public-detail .tlcomp-results-accordion .accordion-button:focus {
  box-shadow: 0 0 0 .2rem rgba(var(--tl-accent-rgb), .2);
}

#tlcomp-public-detail .tlcomp-results-accordion .accordion-body > :last-child {
  margin-bottom: 0;
}

#tlcomp-public-detail .tlcomp-profile-photo-preview {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: .5rem;
  border: 1px solid var(--tl-hairline);
}

#tlcomp-public-detail .form-label.required::after {
  content: " *";
  color: var(--tl-danger);
}

#tlcomp-public-detail #tlcomp-comp-id-status {
  min-height: 1.1rem;
}

#tlcomp-public-detail .tlcomp-dynamic-field-wrap {
  margin-bottom: .15rem;
}

#tlcomp-public-detail .tlcomp-dynamic-field {
  border: 1px solid var(--tlcomp-dynamic-field-border);
  border-radius: .55rem;
  background: var(--tlcomp-dynamic-field-bg);
  padding: .55rem .65rem;
}

#tlcomp-public-detail .tlcomp-dynamic-field-label {
  display: block;
  margin-bottom: .35rem;
  font-size: .88rem;
  font-weight: 600;
}

#tlcomp-public-detail .tlcomp-dynamic-field-help {
  margin-top: .35rem;
  font-size: .8rem;
  line-height: 1.4;
}

#tlcomp-public-detail .tlcomp-dynamic-options {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem .85rem;
}

#tlcomp-public-detail .tlcomp-dynamic-field-checkbox {
  border-color: var(--tlcomp-dynamic-field-checkbox-border);
  background: var(--tlcomp-dynamic-field-checkbox-bg);
}

#tlcomp-public-detail .tlcomp-dynamic-field-file {
  border-style: dashed;
}

#tlcomp-public-detail .tlcomp-athletes-board {
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

#tlcomp-public-detail .tlcomp-athletes-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: .65rem;
  border-radius: .75rem;
  padding: .65rem;
  background: var(--tlcomp-athletes-summary-bg);
}

#tlcomp-public-detail .tlcomp-athlete-stat {
  border: 1px solid var(--tlcomp-athlete-stat-border);
  border-radius: .65rem;
  background: var(--tlcomp-athlete-stat-bg);
  color: var(--tlcomp-athlete-stat-color);
  padding: .65rem .75rem;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#tlcomp-public-detail .tlcomp-athlete-stat-value {
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .01em;
}

#tlcomp-public-detail .tlcomp-athlete-stat-label {
  margin-top: .3rem;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: .92;
}

#tlcomp-public-detail .tlcomp-athlete-stat.is-confirmed {
  box-shadow: inset 0 3px 0 0 var(--tlcomp-athlete-stat-confirmed);
}

#tlcomp-public-detail .tlcomp-athlete-stat.is-selected {
  box-shadow: inset 0 3px 0 0 var(--tlcomp-athlete-stat-selected);
}

#tlcomp-public-detail .tlcomp-athlete-stat.is-registered {
  box-shadow: inset 0 3px 0 0 var(--tlcomp-athlete-stat-registered);
}

#tlcomp-public-detail .tlcomp-athlete-stat.is-allowed {
  box-shadow: inset 0 3px 0 0 var(--tlcomp-athlete-stat-allowed);
}

#tlcomp-public-detail .tlcomp-athlete-stat.is-countries {
  box-shadow: inset 0 3px 0 0 var(--tlcomp-athlete-stat-countries);
}

#tlcomp-public-detail .tlcomp-athletes-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
  border: 1px solid var(--tl-hairline);
  border-radius: .75rem;
  padding: .7rem;
  background: var(--tl-paper-deep);
}

#tlcomp-public-detail .tlcomp-athletes-toolbar .tlcomp-athletes-control {
  min-width: 0;
}

#tlcomp-public-detail .tlcomp-athletes-toolbar .tlcomp-athletes-control.is-search {
  grid-column: span 2;
}

#tlcomp-public-detail .tlcomp-athletes-toolbar .form-label {
  font-weight: 600;
  font-size: .82rem;
}

#tlcomp-public-detail .tlcomp-athlete-group {
  border: 1px solid var(--tl-hairline);
  border-radius: .7rem;
  overflow: hidden;
  background: var(--tl-paper);
  padding-top: 0;
  padding-bottom: 0;
}

#tlcomp-public-detail .tlcomp-athlete-group + .tlcomp-athlete-group {
  margin-top: .85rem;
}

#tlcomp-public-detail .tlcomp-athlete-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .6rem;
  background: var(--tlcomp-athlete-group-head-bg);
  color: var(--tlcomp-athlete-group-head-color);
  padding: .55rem .8rem;
}

#tlcomp-public-detail .tlcomp-athlete-group-title {
  font-weight: 700;
  letter-spacing: .01em;
}

#tlcomp-public-detail .tlcomp-athlete-group-count {
  font-size: .83rem;
  opacity: .9;
}

#tlcomp-public-detail .tlcomp-athletes-table {
  margin-bottom: 0;
  width: 100%;
  table-layout: fixed;
}

#tlcomp-public-detail .tlcomp-athletes-table thead th {
  white-space: nowrap;
  font-weight: 700;
  color: var(--tl-muted);
  background: var(--tl-paper-deep);
}

#tlcomp-public-detail .tlcomp-athletes-table tbody td {
  vertical-align: middle;
  border-top: 1px solid var(--tl-hairline);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#tlcomp-public-detail .tlcomp-athletes-table tbody tr:nth-child(even) {
  background: var(--tlcomp-row-striped-bg);
}

#tlcomp-public-detail .tlcomp-athlete-col-index {
  width: 48px;
  text-align: center;
  font-weight: 700;
}

#tlcomp-public-detail .tlcomp-athlete-col-name {
  min-width: 0;
  font-weight: 600;
}

#tlcomp-public-detail .tlcomp-athlete-col-country {
  white-space: nowrap;
  min-width: 0;
}

#tlcomp-public-detail .tlcomp-athlete-col-sponsor {
  min-width: 0;
}

#tlcomp-public-detail .tlcomp-athlete-sponsor-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tl-muted);
}

#tlcomp-public-detail .tlcomp-athlete-col-compid {
  white-space: nowrap;
  min-width: 0;
  font-weight: 600;
}

#tlcomp-public-detail .tlcomp-athlete-col-status {
  white-space: nowrap;
  min-width: 0;
}

#tlcomp-public-detail .tlcomp-athlete-col-status .badge {
  font-size: .76rem;
  padding: .4rem .5rem;
}

#tlcomp-profile-root .tlcomp-create-section {
  border: 1px solid var(--tl-hairline);
  border-radius: .75rem;
  background: var(--tl-paper);
  padding: 1rem;
}

#tlcomp-profile-root .tlcomp-create-section-title {
  margin: 0 0 .9rem;
  font-size: .95rem;
}

#tlcomp-profile-root .tlcomp-live-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  margin: 0;
  padding: .7rem .9rem;
  border: 1px solid var(--tl-hairline);
  border-radius: .6rem;
  background: var(--tl-paper-deep);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}

#tlcomp-profile-root .tlcomp-live-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(var(--tl-ink-rgb), .08);
  color: var(--tl-muted);
  transition: background-color .15s ease, color .15s ease;
}

#tlcomp-profile-root .tlcomp-live-card-text {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 0;
}

#tlcomp-profile-root .tlcomp-live-card-title {
  font-weight: 600;
  font-size: .9rem;
}

#tlcomp-profile-root .tlcomp-live-card-desc {
  font-size: .78rem;
  color: var(--tl-muted);
}

#tlcomp-profile-root .tlcomp-live-card-switch {
  margin-left: auto;
  padding-left: .5rem;
  flex: 0 0 auto;
}

#tlcomp-profile-root .tlcomp-live-card-switch .form-check-input {
  width: 2.6em;
  height: 1.3em;
  margin-top: 0;
  cursor: pointer;
}

#tlcomp-profile-root .tlcomp-live-card:hover {
  border-color: rgba(var(--tl-live-rgb), .45);
}

#tlcomp-profile-root .tlcomp-live-card:has(.form-check-input:checked) {
  border-color: rgba(var(--tl-live-rgb), .55);
  background: rgba(var(--tl-live-rgb), .08);
}

#tlcomp-profile-root .tlcomp-live-card:has(.form-check-input:checked) .tlcomp-live-card-icon {
  background: rgba(var(--tl-live-rgb), .2);
  color: var(--tlcomp-warn, var(--tl-warning));
}

#tlcomp-profile-root .tlcomp-live-card:has(.form-check-input:checked) .tlcomp-live-card-switch .form-check-input {
  background-color: var(--tl-live);
  border-color: var(--tl-live);
}

#tlcomp-profile-root .tlcomp-reg-shell {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

#tlcomp-profile-root .tlcomp-reg-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
}

#tlcomp-profile-root .tlcomp-reg-stat {
  border: 1px solid var(--tl-hairline);
  border-radius: .6rem;
  padding: .55rem .65rem;
  background: var(--tl-paper);
}

#tlcomp-profile-root .tlcomp-reg-stat-value {
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 800;
}

#tlcomp-profile-root .tlcomp-reg-stat-label {
  margin-top: .2rem;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--tl-muted);
}

#tlcomp-profile-root .tlcomp-reg-stat.is-selected {
  box-shadow: inset 0 3px 0 0 var(--tlcomp-reg-stat-selected);
}

#tlcomp-profile-root .tlcomp-reg-stat.is-confirmed {
  box-shadow: inset 0 3px 0 0 var(--tlcomp-reg-stat-confirmed);
}

#tlcomp-profile-root .tlcomp-reg-stat.is-waitlist {
  box-shadow: inset 0 3px 0 0 var(--tlcomp-reg-stat-waitlist);
}

#tlcomp-profile-root .tlcomp-reg-stat.is-docs {
  box-shadow: inset 0 3px 0 0 var(--tlcomp-reg-stat-docs);
}

#tlcomp-profile-root .tlcomp-reg-stat.is-payment {
  box-shadow: inset 0 3px 0 0 var(--tlcomp-reg-stat-payment);
}

#tlcomp-profile-root .tlcomp-reg-smart {
  border: 1px solid var(--tl-hairline);
  border-radius: .7rem;
  padding: .55rem .65rem;
  background: var(--tl-paper);
}

#tlcomp-profile-root .tlcomp-reg-smart-title {
  font-size: .77rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--tl-muted);
  font-weight: 700;
  margin-bottom: .35rem;
}

#tlcomp-profile-root .tlcomp-reg-smart-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

#tlcomp-profile-root .tlcomp-reg-smart-chip {
  border: 1px solid var(--tl-hairline);
  border-radius: 999px;
  background: var(--tl-paper);
  color: var(--tl-ink);
  padding: .22rem .6rem;
  line-height: 1.2;
}

#tlcomp-profile-root .tlcomp-reg-smart-chip span {
  display: inline-block;
  margin-left: .3rem;
  border-radius: 999px;
  padding: .08rem .38rem;
  background: var(--tl-paper-deep);
  font-size: .74rem;
}

#tlcomp-profile-root .tlcomp-reg-smart-chip.is-active {
  background: var(--tlcomp-smart-chip-active-bg);
  border-color: var(--tlcomp-smart-chip-active-border);
  color: var(--tlcomp-smart-chip-active-color);
}

#tlcomp-profile-root .tlcomp-reg-toolbar {
  border: 1px solid var(--tl-hairline);
  border-radius: .7rem;
  padding: .65rem;
  margin: 0;
  background: var(--tl-paper-deep);
}

#tlcomp-profile-root .tlcomp-reg-bulk {
  border: 1px dashed var(--tl-hairline);
  border-radius: .65rem;
  padding: .5rem;
  margin: 0;
  background: var(--tlcomp-reg-bulk-bg);
}

#tlcomp-profile-root .tlcomp-reg-table {
  margin-bottom: 0;
  width: 100%;
  table-layout: fixed;
}

#tlcomp-profile-root .tlcomp-reg-table thead th {
  white-space: nowrap;
  font-size: .82rem;
  color: var(--tl-muted);
  border-bottom-width: 1px;
  background: var(--tl-paper-deep);
}

#tlcomp-profile-root .tlcomp-reg-select-head {
  width: 44px;
  text-align: center;
}

#tlcomp-profile-root .tlcomp-reg-select-cell {
  width: 44px;
  text-align: center;
  white-space: nowrap;
}

#tlcomp-profile-root .tlcomp-reg-row-index {
  font-size: .72rem;
  color: var(--tl-muted);
  line-height: 1;
  margin-top: .2rem;
}

#tlcomp-profile-root .tlcomp-reg-table tbody td {
  border-top: 1px solid var(--tl-hairline);
  vertical-align: middle;
  padding: .5rem .5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#tlcomp-profile-root .tlcomp-reg-table tbody tr:nth-child(even) {
  background: var(--tlcomp-row-striped-bg);
}

#tlcomp-profile-root .tlcomp-reg-table tbody tr.tlcomp-reg-row-needs-action {
  box-shadow: inset 3px 0 0 0 var(--tlcomp-needs-action-shadow);
}

#tlcomp-profile-root .tlcomp-reg-athlete-name {
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
}

#tlcomp-profile-root .tlcomp-reg-athlete-mail {
  font-size: .84rem;
  color: var(--tl-muted);
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
}

#tlcomp-profile-root .tlcomp-reg-compid,
#tlcomp-profile-root .tlcomp-reg-country {
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
}

#tlcomp-profile-root .tlcomp-reg-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: .25rem;
  justify-content: flex-end;
}

#tlcomp-profile-root .tlcomp-reg-actions .btn {
  white-space: nowrap;
  padding: .2rem .45rem;
}

#tlcomp-profile-root .tlcomp-reg-actions .tlcomp-icon-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#tlcomp-profile-root .tlcomp-reg-doc-chip {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  white-space: nowrap;
}

#tlcomp-profile-root .tlcomp-reg-need-chip {
  display: inline-block;
  margin-top: .25rem;
  padding: .1rem .45rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--tlcomp-need-chip-color);
  background: var(--tlcomp-need-chip-bg);
}

#tlcomp-profile-root .tlcomp-reg-doc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
}

#tlcomp-profile-root .tlcomp-reg-row-summary td {
  border-bottom: 0;
}

#tlcomp-profile-root .tlcomp-reg-row-editor td {
  background: var(--tlcomp-row-editor-bg);
  border-top: 0;
  padding-top: .2rem;
  padding-bottom: .5rem;
}

#tlcomp-profile-root .tlcomp-reg-editor-grid {
  display: grid;
  grid-template-columns: 2.1fr 2fr 1.2fr;
  gap: .55rem;
}

#tlcomp-profile-root .tlcomp-reg-editor-block {
  border: 1px solid var(--tl-hairline);
  border-radius: .55rem;
  padding: .42rem .5rem;
  background: var(--tl-paper);
}

#tlcomp-profile-root .tlcomp-reg-editor-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--tl-muted);
  margin-bottom: .3rem;
  font-weight: 700;
}

#tlcomp-profile-root .tlcomp-reg-editor-block .input-group .form-select,
#tlcomp-profile-root .tlcomp-reg-editor-block .input-group .btn {
  font-size: .86rem;
}

#tlcomp-profile-root .tlcomp-reg-editor-block-invite {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#tlcomp-profile-root #tlcomp-doc-manager {
  background: var(--tl-paper);
}

#tlcomp-profile-root #tlcomp-doc-manager table {
  margin-bottom: 0;
}

#tlcomp-profile-root #tlcomp-doc-manager td,
#tlcomp-profile-root #tlcomp-doc-manager th {
  vertical-align: middle;
}

#tlcomp-profile-root .wysiwyg-editor.tlcomp-wysiwyg-single {
  min-height: 42px;
  max-height: 42px;
  overflow-y: auto;
  padding-top: .45rem;
  padding-bottom: .45rem;
}

#tlcomp-profile-root .tlcomp-hero-preview-wrap {
  border: 1px dashed var(--tl-hairline);
  border-radius: .6rem;
  background: var(--tl-paper-deep);
  padding: .55rem;
}

#tlcomp-profile-root .tlcomp-hero-preview-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: .5rem;
  display: block;
}

@media (max-width: 991.98px) {

  #tlcomp-profile-root .tlcomp-reg-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #tlcomp-profile-root .tlcomp-reg-toolbar {
    padding: .55rem;
  }

  #tlcomp-profile-root .tlcomp-reg-table {
    font-size: .9rem;
  }

  #tlcomp-profile-root .tlcomp-reg-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  #tlcomp-profile-root .tlcomp-reg-editor-grid {
    grid-template-columns: 1fr 1fr;
  }

  #tlcomp-profile-root .tlcomp-reg-editor-block-invite {
    grid-column: span 2;
  }

  #tlcomp-profile-root .tlcomp-reg-table th:nth-child(6),
  #tlcomp-profile-root .tlcomp-reg-table td:nth-child(6),
  #tlcomp-profile-root .tlcomp-reg-table th:nth-child(7),
  #tlcomp-profile-root .tlcomp-reg-table td:nth-child(7) {
    min-width: 110px;
  }

  #tlcomp-public-detail .tlcomp-reg-section {
    padding: .85rem !important;
  }

  #tlcomp-public-detail .tlcomp-reg-field-block {
    padding: .68rem;
  }

  #tlcomp-public-detail .tlcomp-reg-accordion {
    --bs-accordion-btn-padding-y: .78rem;
    --bs-accordion-btn-padding-x: .88rem;
    --bs-accordion-body-padding-y: .78rem;
    --bs-accordion-body-padding-x: .88rem;
  }

  #tlcomp-public-detail .tlcomp-reg-actions {
    flex-wrap: wrap;
  }

  #tlcomp-public-detail .tlcomp-athletes-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #tlcomp-public-detail .tlcomp-athletes-toolbar {
    grid-template-columns: 1fr;
  }

  #tlcomp-public-detail .tlcomp-athletes-toolbar .tlcomp-athletes-control.is-search {
    grid-column: auto;
  }

  #tlcomp-public-detail .tlcomp-athlete-group-head {
    flex-wrap: wrap;
  }

  #tlcomp-public-detail .tlcomp-athletes-table {
    font-size: .92rem;
  }
}

@media (max-width: 767.98px) {
  #tlcomp-profile-root .tlcomp-reg-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #tlcomp-public-detail .tlcomp-news-accordion {
    --bs-accordion-btn-padding-y: .72rem;
    --bs-accordion-btn-padding-x: .85rem;
    --bs-accordion-body-padding-y: .82rem;
    --bs-accordion-body-padding-x: .85rem;
  }

  #tlcomp-public-detail .tlcomp-reg-accordion {
    --bs-accordion-btn-padding-y: .72rem;
    --bs-accordion-btn-padding-x: .82rem;
    --bs-accordion-body-padding-y: .75rem;
    --bs-accordion-body-padding-x: .82rem;
  }

  #tlcomp-public-detail .tlcomp-reg-field-block {
    padding: .62rem;
  }

  #tlcomp-public-detail .tlcomp-reg-field-block-title {
    margin-bottom: .5rem;
    font-size: .72rem;
  }

  #tlcomp-public-detail .tlcomp-reg-actions {
    justify-content: stretch;
    gap: .5rem !important;
  }

  #tlcomp-public-detail .tlcomp-reg-actions .btn {
    flex: 1 1 100%;
  }

  #tlcomp-public-detail .tlcomp-news-accordion .accordion-item + .accordion-item {
    margin-top: .55rem;
  }

  #tlcomp-public-detail .tlcomp-news-title {
    font-size: .95rem;
  }

  #tlcomp-public-detail .tlcomp-result-card {
    padding: .75rem .82rem;
  }

  #tlcomp-public-detail .tlcomp-result-card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: .4rem;
  }

  #tlcomp-public-detail .tlcomp-results-accordion {
    --bs-accordion-btn-padding-y: .72rem;
    --bs-accordion-btn-padding-x: .82rem;
    --bs-accordion-body-padding-y: .75rem;
    --bs-accordion-body-padding-x: .82rem;
  }

  #tlcomp-public-detail .tlcomp-results-accordion .accordion-item + .accordion-item {
    margin-top: .5rem;
  }

  #tlcomp-profile-root .tlcomp-reg-editor-grid {
    grid-template-columns: 1fr;
  }

  #tlcomp-profile-root .tlcomp-reg-editor-block-invite {
    grid-column: auto;
  }
}

@media (max-width: 479.98px) {
  #tlcomp-profile-root .tlcomp-reg-stats {
    grid-template-columns: 1fr;
  }
}

.tlcomp-page {
  color: var(--tl-ink);
  background: none;
}

.tlcomp-page-shell,
#tlcomp-public-list .tlcomp-list-shell,
#tlcomp-public-detail .tlcomp-detail-shell {
  display: grid;
  gap: 1rem;
}

/* the spotlight and feed sections sit open on the page ground (no panel
   chrome), so they need real air between them */
#tlcomp-public-list .tlcomp-list-shell {
  gap: 2.5rem;
}

/* Grid items default to min-width:auto and refuse to shrink below their
   content, which let the nowrap tabs row (and wide tables) push the whole
   page wider than the viewport. min-width:0 lets the inner overflow-x:auto
   scroll containers actually constrain, killing the horizontal page scroll. */
.tlcomp-page-shell > *,
#tlcomp-public-list .tlcomp-list-shell > *,
#tlcomp-public-detail .tlcomp-detail-shell > * {
  min-width: 0;
}

/* Competition tile: the list page's spotlight and feed, and the next
   competitions block. The photo fades into paper and the words sit on the
   paper in ink, the same recipe as the detail header and the Compete pages,
   so it reads in both faces with tokens alone. A tile with no photo stands on
   the terrain ground. */
.tlcomp-tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--tl-hairline);
  border-radius: var(--tl-radius-lg);
  background: var(--tlcomp-hero-fallback-gradient);
  text-decoration: none;
  color: var(--tl-ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tlcomp-tile:hover,
.tlcomp-tile:focus-visible {
  border-color: var(--tl-accent);
  box-shadow: var(--tl-lift);
  color: var(--tl-ink);
}
.tlcomp-tile-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.tlcomp-tile:hover .tlcomp-tile-image {
  transform: scale(1.04);
}
.tlcomp-tile-fallback {
  position: absolute;
  inset: 0 0 40%;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  color: var(--tl-dim);
}
.tlcomp-tile-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    transparent 30%,
    color-mix(in srgb, var(--tl-paper) 85%, transparent) 62%,
    var(--tl-paper) 100%);
}
.tlcomp-tile-top {
  position: absolute;
  top: .8rem;
  left: .85rem;
  right: .85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
}
.tlcomp-tile-flag {
  margin-left: auto;
  font-size: .95rem;
}
.tlcomp-tile-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .28rem .5rem;
  border: 1px solid var(--tl-hairline);
  border-radius: var(--tl-radius-sm);
  background: var(--tl-panel);
  font-family: var(--tl-font-mono);
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--tl-muted);
}
.tlcomp-tile-chip.is-live {
  border-color: transparent;
  background: var(--tl-live-bg);
  color: var(--tl-live);
}
.tlcomp-tile-chip.is-upcoming {
  border-color: transparent;
  background: rgba(var(--tl-accent-rgb), .12);
  color: var(--tl-accent);
}
.tlcomp-tile-body {
  position: absolute;
  left: .95rem;
  right: .95rem;
  bottom: .9rem;
  display: grid;
  gap: .22rem;
}
.tlcomp-tile-date,
.tlcomp-tile-stats {
  font-family: var(--tl-font-mono);
  font-size: .68rem;
  font-variant-numeric: tabular-nums;
  color: var(--tl-muted);
}
.tlcomp-tile-title {
  font-family: var(--tl-font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--tl-ink);
}
.tlcomp-tile-meta {
  font-size: .82rem;
  color: var(--tl-muted);
}
.tlcomp-tile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.1rem;
  margin-top: .35rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tlcomp-tile-stats i {
  margin-right: .35rem;
  color: var(--tl-accent);
}
.tlcomp-tile--wide {
  aspect-ratio: 16 / 9;
}
@media (min-width: 1200px) {
  .tlcomp-tile--wide { aspect-ratio: 21 / 8; }
  .tlcomp-tile--wide .tlcomp-tile-title { font-size: 1.6rem; }
  .tlcomp-tile--wide .tlcomp-tile-top { top: 1.1rem; left: 1.3rem; right: 1.3rem; }
  .tlcomp-tile--wide .tlcomp-tile-body { left: 1.4rem; right: 1.4rem; bottom: 1.2rem; }
}
/* No photo: the tile is as tall as its words, not a photo's frame with
   nothing in it. The trophy stays as a quiet mark on the right. */
.tlcomp-tile.tlcomp-tile--bare {
  aspect-ratio: auto;
  min-height: 13rem;
}
.tlcomp-tile--bare.tlcomp-tile--wide {
  min-height: 15rem;
}
.tlcomp-tile--bare .tlcomp-tile-scrim {
  display: none;
}
.tlcomp-tile--bare .tlcomp-tile-fallback {
  inset: 0 1.5rem 0 auto;
  font-size: 4rem;
  opacity: .35;
}
@media (prefers-reduced-motion: reduce) {
  .tlcomp-tile-image { transition: none; }
  .tlcomp-tile:hover .tlcomp-tile-image { transform: none; }
}

#tlcomp-public-list .tlcomp-list-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

#tlcomp-public-list .tlcomp-list-section-head {
  margin-bottom: .8rem;
}

#tlcomp-public-list .tlcomp-list-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

#tlcomp-public-list .tlcomp-list-section-kicker {
  color: var(--tl-muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

#tlcomp-public-list .tlcomp-list-section-title {
  font-size: clamp(1.18rem, 2vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -.02em;
}

#tlcomp-public-list .tlcomp-list-results-meta {
  color: var(--tl-muted);
  font-size: .88rem;
  text-align: right;
}

#tlcomp-public-detail .tlcomp-detail-pane-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

#tlcomp-public-detail .tlcomp-detail-registration-card {
  grid-column: 1 / -1;
}

#tlcomp-public-detail .tlcomp-detail-section-body > :last-child {
  margin-bottom: 0;
}

@media (max-width: 991.98px) {
  #tlcomp-public-list .tlcomp-list-stats,
#tlcomp-public-detail .tlcomp-detail-pane-grid {
    grid-template-columns: 1fr;
  }

  #tlcomp-public-list .tlcomp-list-results-meta {
    text-align: left;
  }
}

/* Result and athlete tables read as results sheets */
.tlcomp-reg-table td,
.tlcomp-reg-table th,
.tlcomp-athletes-table td,
.tlcomp-athletes-table th {
  font-variant-numeric: tabular-nums;
}

#tlcomp-public-list .tlcomp-list-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: baseline;
  gap: 0.5rem 1.8rem;
}

/* ==========================================================================
   Competition Weather tab — automated per-day forecast accordion.
   Themed via Bootstrap tokens so it follows light/dark automatically.
   ========================================================================== */
.tlcomp-weather {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tlcomp-wx-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.tlcomp-wx-intro-main {
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tlcomp-wx-intro-main i {
  color: var(--tl-accent);
}
.tlcomp-wx-tag {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--tl-muted);
  border: 1px solid var(--tl-hairline);
  border-radius: 999px;
  padding: 3px 10px;
}
.tlcomp-wx-tag.is-final {
  color: var(--tl-warning);
  border-color: rgba(var(--tl-accent-rgb), .45);
  background: rgba(var(--tl-accent-rgb), .08);
}

/* ---- accordion ---- */
.tlcomp-wx-accordion {
  --bs-accordion-border-color: var(--tl-hairline);
  --bs-accordion-btn-focus-box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tlcomp-wx-item {
  border: 1px solid var(--tl-hairline);
  border-radius: 14px !important;
  overflow: hidden;
  background: var(--tl-paper);
}
.tlcomp-wx-abtn.accordion-button {
  padding: 12px 14px;
  background: var(--tl-paper);
  box-shadow: none;
}
.tlcomp-wx-abtn.accordion-button:not(.collapsed) {
  background: var(--tl-paper-deep);
  color: var(--tl-ink);
}
.tlcomp-wx-abtn.accordion-button::after {
  margin-left: 8px;
}
.tlcomp-wx-hgrid {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}
.tlcomp-wx-hicon {
  width: 30px;
  text-align: center;
  font-size: 18px;
  color: var(--tl-warning);
  flex: none;
}
.tlcomp-wx-hdate {
  font-weight: 700;
  font-size: 15px;
  min-width: 92px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.tlcomp-wx-daytag {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 9.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--tl-muted);
  border: 1px solid var(--tl-hairline);
  border-radius: 999px;
  padding: 1px 6px;
}
.tlcomp-wx-daytag.is-today {
  color: var(--tl-accent);
  border-color: var(--tl-accent);
}
.tlcomp-wx-htemp {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 600;
  font-size: 16px;
}
.tlcomp-wx-hchip {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--tl-muted);
}
.tlcomp-wx-hchip .u {
  font-weight: 400;
  font-size: 10.5px;
  color: var(--tl-muted);
}

.tlcomp-wx-abody.accordion-body {
  padding: 14px;
  border-top: 1px solid var(--tl-hairline);
}

/* ---- conditions hero ---- */
.tlcomp-wx-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.tlcomp-wx-sky {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 86px;
  text-align: center;
}
.tlcomp-wx-sky-icon {
  font-size: 32px;
  line-height: 1;
  color: var(--tl-warning);
}
.tlcomp-wx-temp {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 600;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.tlcomp-wx-sky small {
  font-size: 11px;
  color: var(--tl-muted);
}
.tlcomp-wx-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
  flex: 1;
}
.tlcomp-wx-metric {
  background: var(--tl-paper-deep);
  border: 1px solid var(--tl-hairline);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.tlcomp-wx-metric .lab {
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tl-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.tlcomp-wx-metric .val {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 600;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* Text tiles (e.g. "Moderate to good") wrap instead of clipping. */
.tlcomp-wx-metric.is-text .val {
  white-space: normal;
  line-height: 1.2;
}
.tlcomp-wx-metric .val .u {
  font-size: 11px;
  font-weight: 400;
  color: var(--tl-muted);
  margin-left: 1px;
}

/* ---- wind profile ---- */
.tlcomp-wx-sec-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tl-muted);
  margin: 0 0 8px;
}
.tlcomp-wx-profile {
  display: flex;
  flex-direction: column;
}
.tlcomp-wx-row {
  display: grid;
  grid-template-columns: 58px 36px 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px 2px;
}
.tlcomp-wx-row + .tlcomp-wx-row {
  border-top: 1px solid var(--tl-hairline);
}
.tlcomp-wx-alt {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.tlcomp-wx-alt small {
  display: block;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--tl-muted);
}
.tlcomp-wx-arrow {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--tl-paper-deep);
}
.tlcomp-wx-arrow svg {
  width: 18px;
  height: 18px;
}
.tlcomp-wx-arrow-empty {
  background: transparent;
}
.tlcomp-wx-windline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.tlcomp-wx-dir {
  font-weight: 700;
  font-size: 14px;
  min-width: 30px;
}
.tlcomp-wx-spd {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 600;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
/* Gust chip: colored by strength (color set inline), with a matching tint so
   a strong gust visibly stands out. */
.tlcomp-wx-gust {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--tl-muted);
  padding: 1px 8px;
  border: 1px solid color-mix(in srgb, currentColor 45%, transparent);
  background: color-mix(in srgb, currentColor 14%, transparent);
  border-radius: 999px;
}
.tlcomp-wx-bar {
  flex: 1 1 50px;
  height: 6px;
  min-width: 40px;
  border-radius: 999px;
  background: var(--tl-paper-deep);
  overflow: hidden;
  position: relative;
}
.tlcomp-wx-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
}
@media (max-width: 480px) {
  .tlcomp-wx-hdate { min-width: 78px; font-size: 14px; }
  .tlcomp-wx-hchip { font-size: 11.5px; }
}

/* ============================================================
   Full-screen manage page and the feedback tab.
   Status colours are the theme's semantic tokens, which carry both faces.
   ============================================================ */
:root {
  --tlcomp-ok: var(--tl-success);
  --tlcomp-ok-bg: var(--tl-success-bg);
  --tlcomp-warn: var(--tl-warning);
  --tlcomp-warn-bg: var(--tl-warning-bg);
  --tlcomp-danger: var(--tl-danger);
  --tlcomp-danger-bg: var(--tl-danger-bg);
  --tlcomp-neutral-chip-bg: rgba(var(--tl-ink-rgb), .08);
  --tlcomp-panel-2: var(--tl-paper-deep);
}

@keyframes tlcomp-pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--tl-live-rgb), .5); }
  70% { box-shadow: 0 0 0 6px rgba(var(--tl-live-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--tl-live-rgb), 0); }
}

/* ---- Full-screen manage page ---- */
/* Frameless and full width on purpose: no outer card wrapping the panes, so
   the management sections read as one light surface, not cards inside a card. */
.tlcomp-manage-page {
  padding: 1rem clamp(12px, 2.5vw, 2.25rem) 3rem;
}
.tlcomp-manage {
  background: transparent;
  width: 100%;
}
.tlcomp-manage-top {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .75rem 0 .8rem;
  border-bottom: 1px solid var(--tl-hairline);
  flex-wrap: wrap;
  /* Keep the back link, title and actions in reach while scrolling long panes. */
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--tl-paper);
}
.tlcomp-manage-back {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--tl-muted);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 600;
  padding: .35rem .6rem;
  border-radius: .5rem;
}
.tlcomp-manage-back:hover {
  background: var(--tlcomp-panel-2);
  color: var(--tl-ink);
}
.tlcomp-manage-heading {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.tlcomp-manage-title {
  font-size: 1.1rem;
  font-weight: 750;
  margin: 0;
  color: var(--tl-ink);
}
.tlcomp-manage-sub {
  font-size: .76rem;
  color: var(--tl-muted);
}
.tlcomp-manage-actions {
  margin-left: auto;
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
}
.tlcomp-manage-body {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 0;
  min-height: 68vh;
}
.tlcomp-manage-rail {
  padding: .35rem .65rem .35rem 0;
  position: sticky;
  /* Sit just below the sticky header so the top nav items are not hidden. */
  top: 4.75rem;
  align-self: start;
  max-height: calc(100vh - 5.5rem);
  overflow-y: auto;
}
.tlcomp-rail-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .1rem;
  border: 0;
}
.tlcomp-rail-group {
  font-size: .58rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--tl-muted);
  font-weight: 700;
  padding: .75rem .7rem .25rem;
}
.tlcomp-rail-item { margin: 0; }
.tlcomp-rail-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  padding: .5rem .7rem;
  border-radius: .55rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--tl-muted);
  font-size: .85rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.tlcomp-rail-link:hover {
  background: var(--tlcomp-panel-2);
  color: var(--tl-ink);
}
.tlcomp-rail-link.active {
  background: rgba(var(--tl-accent-rgb), .1);
  color: var(--tl-accent);
  border-color: rgba(var(--tl-accent-rgb), .24);
}
.tlcomp-rail-icon {
  width: 17px;
  text-align: center;
  opacity: .9;
  flex: 0 0 auto;
}
.tlcomp-manage-content {
  padding: 1.4rem 0 1.4rem 1.6rem;
  border-left: 1px solid var(--tl-hairline);
  min-width: 0;
}

/* Lighten the reused pane markup so the manage page stays airy: the section
   boxes flatten into headed sections instead of nested cards. Higher
   specificity than the base #tlcomp-profile-root .tlcomp-create-section rule. */
#tlcomp-profile-root .tlcomp-manage-content .tlcomp-create-section {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}
#tlcomp-profile-root .tlcomp-manage-content .tlcomp-create-section-title {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--tl-accent);
  font-weight: 700;
  margin: 0 0 .85rem;
  padding-bottom: .45rem;
  border-bottom: 1px solid var(--tl-hairline);
}

/* Soften the inner grouped boxes (schema, QR, staff, news, files editors) so
   they sit lightly on the surface rather than reading as heavy cards. */
.tlcomp-manage-content .bg-body-tertiary {
  background: rgba(var(--tl-accent-rgb), .04) !important;
}
.tlcomp-manage-content .card.bg-body-tertiary {
  border-color: var(--tl-hairline);
}

/* Hamburger + backdrop are desktop-hidden; the rail is the persistent column. */
.tlcomp-manage-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--tl-hairline);
  background: var(--tl-panel);
  color: var(--tl-ink);
  border-radius: 9px;
  cursor: pointer;
  font-size: 1rem;
}
.tlcomp-manage-backdrop { display: none; }

@media (max-width: 820px) {
  .tlcomp-manage-page { padding: .75rem clamp(10px, 4vw, 1rem) 2.5rem; }
  .tlcomp-manage-menu-btn { display: inline-flex; }
  .tlcomp-manage-title { font-size: 1rem; }
  .tlcomp-manage-body { grid-template-columns: 1fr; }

  /* Sidebar becomes an off-canvas drawer that slides in from the left. */
  .tlcomp-manage-rail {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1050;
    width: min(280px, 82vw);
    max-height: none;
    overflow-y: auto;
    padding: 1rem .8rem calc(1rem + env(safe-area-inset-bottom));
    background: var(--tl-panel);
    border-right: 1px solid var(--tl-hairline);
    transform: translateX(-100%);
    transition: transform .22s ease;
  }
  .tlcomp-manage.is-menu-open .tlcomp-manage-rail {
    transform: translateX(0);
    box-shadow: var(--tl-lift-lg);
  }
  .tlcomp-manage-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: color-mix(in srgb, var(--tl-night) 50%, transparent);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
  }
  .tlcomp-manage.is-menu-open .tlcomp-manage-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .tlcomp-manage-content {
    padding: 1rem 0 0;
    border-left: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tlcomp-manage-rail,
  .tlcomp-manage-backdrop { transition: none; }
}

/* ============================================================
   Feedback tab (manage page): athlete task + competition ratings
   ============================================================ */

#tlcomp-tab-feedback .tlcomp-fb-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
#tlcomp-tab-feedback .tlcomp-fb-head-title {
  font-weight: 600;
  font-size: 1.05rem;
}
#tlcomp-tab-feedback .tlcomp-fb-head-sub {
  font-size: .82rem;
  color: var(--tl-muted);
  max-width: 60ch;
}
#tlcomp-tab-feedback .tlcomp-fb-loading {
  display: flex;
  align-items: center;
  padding: 1.5rem .25rem;
}

.tlcomp-feedback .tlcomp-fb-section { margin-bottom: 1.4rem; }
.tlcomp-feedback .tlcomp-fb-section:last-child { margin-bottom: 0; }
.tlcomp-feedback .tlcomp-fb-section-title {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
  color: var(--tl-muted);
  margin: 0 0 .65rem;
}
.tlcomp-feedback .tlcomp-fb-empty {
  font-size: .85rem;
  color: var(--tl-muted);
  padding: .4rem 0;
}

/* ---- Card ---- */
.tlcomp-feedback .tlcomp-fb-card {
  background: var(--tl-panel);
  border: 1px solid var(--tl-hairline);
  border-radius: .9rem;
  padding: 1rem 1.1rem;
  margin-bottom: .85rem;
  box-shadow: var(--tl-lift);
}
.tlcomp-feedback .tlcomp-fb-card:last-child { margin-bottom: 0; }
.tlcomp-feedback .tlcomp-fb-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .9rem;
}
.tlcomp-feedback .tlcomp-fb-title { font-weight: 600; }
.tlcomp-feedback .tlcomp-fb-sub {
  font-size: .78rem;
  color: var(--tl-muted);
  margin-top: .1rem;
}

/* ---- Score badge ---- */
.tlcomp-feedback .tlcomp-fb-score {
  flex: 0 0 auto;
  min-width: 78px;
  text-align: center;
  padding: .45rem .55rem;
  border-radius: .7rem;
  background: var(--tlcomp-neutral-chip-bg);
  border: 1px solid transparent;
}
.tlcomp-feedback .tlcomp-fb-score.is-ok     { background: var(--tlcomp-ok-bg); }
.tlcomp-feedback .tlcomp-fb-score.is-warn   { background: var(--tlcomp-warn-bg); }
.tlcomp-feedback .tlcomp-fb-score.is-danger { background: var(--tlcomp-danger-bg); }
.tlcomp-feedback .tlcomp-fb-score-num {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
}
.tlcomp-feedback .tlcomp-fb-score.is-ok     .tlcomp-fb-score-num { color: var(--tlcomp-ok); }
.tlcomp-feedback .tlcomp-fb-score.is-warn   .tlcomp-fb-score-num { color: var(--tlcomp-warn); }
.tlcomp-feedback .tlcomp-fb-score.is-danger .tlcomp-fb-score-num { color: var(--tlcomp-danger); }
.tlcomp-feedback .tlcomp-fb-score-max {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--tl-muted);
  margin-top: .1rem;
}
.tlcomp-feedback .tlcomp-fb-score-count {
  font-size: .68rem;
  color: var(--tl-muted);
  margin-top: .2rem;
}

/* ---- Question average rows ---- */
.tlcomp-feedback .tlcomp-fb-q { margin-bottom: .7rem; }
.tlcomp-feedback .tlcomp-fb-q:last-child { margin-bottom: 0; }
.tlcomp-feedback .tlcomp-fb-q-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  font-size: .84rem;
  margin-bottom: .28rem;
}
.tlcomp-feedback .tlcomp-fb-q-label { color: var(--tl-ink); }
.tlcomp-feedback .tlcomp-fb-q-avg { font-weight: 700; white-space: nowrap; }
.tlcomp-feedback .tlcomp-fb-q-count { font-weight: 400; color: var(--tl-muted); }
.tlcomp-feedback .tlcomp-fb-bar {
  height: 8px;
  border-radius: 6px;
  background: var(--tlcomp-neutral-chip-bg);
  overflow: hidden;
}
.tlcomp-feedback .tlcomp-fb-bar > span {
  display: block;
  height: 100%;
  border-radius: 6px;
  transition: width .35s ease;
}

/* shared colour bands */
.tlcomp-feedback .is-ok     { color: var(--tlcomp-ok); }
.tlcomp-feedback .is-warn   { color: var(--tlcomp-warn); }
.tlcomp-feedback .is-danger { color: var(--tlcomp-danger); }
.tlcomp-feedback .is-muted  { color: var(--tl-muted); }
.tlcomp-feedback .tlcomp-fb-bar > span.is-ok,
.tlcomp-feedback .tlcomp-fb-dist-bar > span.is-ok     { background: var(--tlcomp-ok); }
.tlcomp-feedback .tlcomp-fb-bar > span.is-warn,
.tlcomp-feedback .tlcomp-fb-dist-bar > span.is-warn   { background: var(--tlcomp-warn); }
.tlcomp-feedback .tlcomp-fb-bar > span.is-danger,
.tlcomp-feedback .tlcomp-fb-dist-bar > span.is-danger { background: var(--tlcomp-danger); }

/* ---- Expand toggle + detail region ---- */
.tlcomp-feedback .tlcomp-fb-detail-wrap { margin-top: .9rem; }
.tlcomp-feedback .tlcomp-fb-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}
.tlcomp-feedback .tlcomp-fb-toggle { border-radius: .55rem; font-size: .8rem; }
.tlcomp-feedback .tlcomp-fb-share { border-radius: .55rem; font-size: .8rem; }
.tlcomp-feedback .tlcomp-fb-detail {
  margin-top: .85rem;
  padding-top: .85rem;
  border-top: 1px dashed var(--tl-hairline);
}

/* ---- Distribution histograms ---- */
.tlcomp-feedback .tlcomp-fb-dist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .9rem 1.1rem;
  margin-bottom: 1rem;
}
.tlcomp-feedback .tlcomp-fb-dist-label {
  font-size: .74rem;
  font-weight: 600;
  color: var(--tl-muted);
  margin-bottom: .3rem;
}
.tlcomp-feedback .tlcomp-fb-dist {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 40px;
}
.tlcomp-feedback .tlcomp-fb-dist-bar {
  position: relative;
  flex: 1;
  height: 100%;
  background: var(--tlcomp-neutral-chip-bg);
  border-radius: 3px;
  display: flex;
  align-items: flex-end;
}
.tlcomp-feedback .tlcomp-fb-dist-bar > span {
  display: block;
  width: 100%;
  border-radius: 3px;
  min-height: 2px;
}
.tlcomp-feedback .tlcomp-fb-dist-scale {
  display: flex;
  justify-content: space-between;
  font-size: .62rem;
  color: var(--tl-muted);
  margin-top: .15rem;
}

/* ---- Per-athlete responses table ---- */
.tlcomp-feedback .tlcomp-fb-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--tl-hairline);
  border-radius: .6rem;
}
.tlcomp-feedback .tlcomp-fb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8rem;
}
.tlcomp-feedback .tlcomp-fb-table th,
.tlcomp-feedback .tlcomp-fb-table td {
  padding: .4rem .55rem;
  border-bottom: 1px solid var(--tl-hairline);
  text-align: left;
  vertical-align: middle;
}
.tlcomp-feedback .tlcomp-fb-table tbody tr:last-child td { border-bottom: 0; }
.tlcomp-feedback .tlcomp-fb-table thead th {
  position: sticky;
  top: 0;
  background: var(--tlcomp-panel-2);
  color: var(--tl-muted);
  font-weight: 600;
  white-space: nowrap;
}
.tlcomp-feedback .tlcomp-fb-table .tlcomp-fb-cell { text-align: center; }
.tlcomp-feedback .tlcomp-fb-athlete { font-weight: 600; white-space: nowrap; }
.tlcomp-feedback .tlcomp-fb-comment { color: var(--tl-muted); min-width: 180px; }

.tlcomp-feedback .tlcomp-fb-chip {
  display: inline-block;
  min-width: 26px;
  padding: .1rem .35rem;
  border-radius: .5rem;
  font-weight: 700;
  font-size: .75rem;
  text-align: center;
}
.tlcomp-feedback .tlcomp-fb-chip.is-ok     { background: var(--tlcomp-ok-bg);     color: var(--tlcomp-ok); }
.tlcomp-feedback .tlcomp-fb-chip.is-warn   { background: var(--tlcomp-warn-bg);   color: var(--tlcomp-warn); }
.tlcomp-feedback .tlcomp-fb-chip.is-danger { background: var(--tlcomp-danger-bg); color: var(--tlcomp-danger); }
.tlcomp-feedback .tlcomp-fb-chip.is-muted  { background: var(--tlcomp-neutral-chip-bg); color: var(--tl-muted); }

@media (max-width: 575.98px) {
  #tlcomp-tab-feedback .tlcomp-fb-head { flex-direction: column; }
  .tlcomp-feedback .tlcomp-fb-card-head { flex-direction: column-reverse; align-items: stretch; }
  .tlcomp-feedback .tlcomp-fb-score { align-self: flex-start; }
}

/* ==========================================================================
   Competition detail: header, chips, tabs and section cards

   This replaces three layers that fought each other: the fork's navy banner,
   a night-face copy of it in brighter blues, and an "Activity Deck" override
   appended on top. The header reads like the Compete pages: a panel on a quiet
   terrain ground when there is no photo, and a photo that fades into paper
   with ink on it when there is. Tokens only, so the night face comes free.
   ========================================================================== */
#tlcomp-public-detail .tlcomp-detail-shell {
  gap: 1.25rem;
}

#tlcomp-public-detail .tlcomp-detail-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--tl-hairline);
  border-radius: var(--tl-radius-xl);
  background: var(--tlcomp-hero-fallback-gradient);
  color: var(--tl-ink);
}

#tlcomp-public-detail .tlcomp-hero-banner-fallback {
  display: none;
}

#tlcomp-public-detail .tlcomp-hero-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#tlcomp-public-detail .tlcomp-detail-hero.has-photo {
  display: flex;
  align-items: flex-end;
  min-height: clamp(20rem, 40vw, 30rem);
}

#tlcomp-public-detail .tlcomp-hero-overlay {
  position: relative;
  width: 100%;
}

#tlcomp-public-detail .tlcomp-detail-hero.has-photo .tlcomp-hero-overlay {
  padding-top: 6rem;
  background: linear-gradient(to bottom,
    transparent 0%,
    color-mix(in srgb, var(--tl-paper) 82%, transparent) 40%,
    var(--tl-paper) 100%);
}

#tlcomp-public-detail .tlcomp-detail-hero-inner {
  display: grid;
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

#tlcomp-public-detail .tlcomp-detail-headbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

#tlcomp-public-detail .tlcomp-detail-kicker {
  font-family: var(--tl-font-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--tl-cta);
}

#tlcomp-public-detail .tlcomp-detail-badge-row,
#tlcomp-public-detail .tlcomp-detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
}

#tlcomp-public-detail .tlcomp-detail-topline {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 992px) {
  #tlcomp-public-detail .tlcomp-detail-topline {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: end;
  }
}

#tlcomp-public-detail .tlcomp-detail-copy {
  display: grid;
  gap: .45rem;
  min-width: 0;
}

#tlcomp-public-detail .tlcomp-detail-title {
  margin: .25rem 0 0;
  font-family: var(--tl-font-display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.03em;
  color: var(--tl-ink);
  text-wrap: balance;
}

#tlcomp-public-detail .tlcomp-detail-subtitle {
  margin: 0;
  font-size: .95rem;
  color: var(--tl-muted);
}

#tlcomp-public-detail .tlcomp-detail-supporting {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.25rem;
  font-family: var(--tl-font-mono);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
  color: var(--tl-muted);
}

/* The header's figures are instruments, as on Compete: a mono label over a
   display number. They were four tinted icon tiles in sky, gold, rose and
   emerald, none of which is a TerraLoc colour. */
#tlcomp-public-detail .tlcomp-detail-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
}

#tlcomp-public-detail .tlcomp-detail-stat-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

#tlcomp-public-detail .tlcomp-detail-stat-label {
  font-family: var(--tl-font-mono);
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--tl-dim);
}

#tlcomp-public-detail .tlcomp-detail-stat-value {
  font-family: var(--tl-font-display);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--tl-ink);
  overflow-wrap: anywhere;
}

/* Chips and badges: mono, uppercase, the instrument radius. The state says
   what the event is doing, the registration badge whether it takes entries. */
.tlcomp-state-badge,
.tlcomp-reg-badge,
.tlcomp-neutral-chip,
.tlcomp-flag-chip,
.tlcomp-share-btn,
.tlcomp-live-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 26px;
  padding: 0 .6rem;
  border: 1px solid var(--tl-hairline);
  border-radius: var(--tl-radius-sm);
  background: var(--tl-panel);
  font-family: var(--tl-font-mono);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
  color: var(--tl-muted);
}

.tlcomp-state-badge.is-live,
.tlcomp-live-chip {
  border-color: transparent;
  background: var(--tl-live-bg);
  color: var(--tl-live);
}

.tlcomp-live-chip:hover,
.tlcomp-live-chip:focus-visible {
  background: var(--tl-live);
  color: var(--tl-paper);
}

.tlcomp-live-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: tl-pulse 2.4s ease-out infinite;
}

.tlcomp-state-badge.is-upcoming {
  border-color: transparent;
  background: rgba(var(--tl-accent-rgb), .12);
  color: var(--tl-accent);
}

.tlcomp-state-badge.is-published {
  color: var(--tl-ink);
}

.tlcomp-state-badge.is-completed {
  color: var(--tl-dim);
}

.tlcomp-reg-badge.is-open {
  border-color: transparent;
  background: var(--tl-success-bg);
  color: var(--tl-success);
}

.tlcomp-reg-badge.is-pending {
  border-color: transparent;
  background: var(--tl-warning-bg);
  color: var(--tl-warning);
}

.tlcomp-reg-badge.is-closed {
  border-color: transparent;
  background: var(--tl-danger-bg);
  color: var(--tl-danger);
}

.tlcomp-neutral-chip {
  color: var(--tl-ink);
}

.tlcomp-share-btn {
  border-color: var(--tl-hairline-strong);
  color: var(--tl-ink);
  cursor: pointer;
}

.tlcomp-share-btn:hover,
.tlcomp-share-btn:focus-visible {
  border-color: var(--tl-accent);
  color: var(--tl-accent);
}

@media (prefers-reduced-motion: reduce) {
  .tlcomp-live-chip-dot { animation: none; }
}

/* Tabs: the kit's chip row, ink when chosen. */
#tlcomp-public-detail .tlcomp-detail-tabs-shell {
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--tl-hairline);
}

#tlcomp-public-detail .tlcomp-detail-tabs-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
}

#tlcomp-public-detail .tlcomp-detail-tabs {
  flex-wrap: nowrap;
  gap: .4rem;
  border-bottom: 0;
}

#tlcomp-public-detail .tlcomp-detail-tabs .nav-item {
  flex: 0 0 auto;
}

#tlcomp-public-detail .tlcomp-detail-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  height: 32px;
  margin: 0;
  padding: 0 .9rem;
  border: 1px solid var(--tl-hairline);
  border-radius: 999px;
  background: var(--tl-panel);
  font-family: var(--tl-font-mono);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--tl-muted);
}

#tlcomp-public-detail .tlcomp-detail-tabs .nav-link:hover,
#tlcomp-public-detail .tlcomp-detail-tabs .nav-link:focus-visible {
  border-color: var(--tl-hairline-strong);
  color: var(--tl-ink);
}

#tlcomp-public-detail .tlcomp-detail-tabs .nav-link.active {
  border-color: var(--tl-ink);
  background: var(--tl-ink);
  color: var(--tl-paper);
}

/* The panes sit on the page ground; each section is a kit card. */
#tlcomp-public-detail .tlcomp-detail-content-shell .tab-content {
  display: grid;
}

#tlcomp-public-detail .tlcomp-detail-content-shell .tab-pane {
  min-width: 0;
}

#tlcomp-public-detail .tlcomp-detail-section-card {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--tl-hairline);
  border-radius: var(--tl-radius-lg);
  background: var(--tl-panel);
}

#tlcomp-public-detail .tlcomp-detail-section-card.is-main {
  grid-column: 1 / -1;
}

#tlcomp-public-detail .tlcomp-detail-section-title {
  margin: 0 0 .8rem;
  font-family: var(--tl-font-mono);
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--tl-dim);
}

@media (max-width: 575.98px) {
  #tlcomp-public-detail .tlcomp-detail-section-card {
    padding: .9rem;
  }
}

/* ==========================================================================
   Maps: the official locations and the route lines

   Both sit in the same frame as every other map on the site: a hairline, the
   large radius, and the shared basemap switcher from map-controls.css. The
   pins are MapLibre's own markers in the theme's ink, accent and
   call-to-action colours. The legend under the locations map is a list you can copy a
   coordinate from, since that is what an athlete does with it.
   ========================================================================== */
.tlcomp-map-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--tl-hairline);
  border-radius: var(--tl-radius-lg);
  background: var(--tl-paper-deep);
}

#tlcomp-public-detail .tlcomp-public-pins-map,
#tlcomp-public-detail .tlcomp-public-routes-map {
  width: 100%;
  height: clamp(18rem, 36vw, 26rem);
}

#tlcomp-profile-root .tlcomp-pins-map {
  width: 100%;
  height: 420px;
  min-height: 420px;
  border: 1px solid var(--tl-hairline);
  border-radius: var(--tl-radius-lg);
  overflow: hidden;
}

#tlcomp-public-detail .tlcomp-detail-locations-card {
  grid-column: 1 / -1;
}


.tlcomp-pin-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border: 2px solid var(--tl-paper);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--tl-hairline-strong);
}

#tlcomp-public-detail .tlcomp-pins-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: .5rem;
  margin: .75rem 0 0;
  padding: 0;
  list-style: none;
}

#tlcomp-public-detail .tlcomp-pins-legend-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "dot name copy" "dot coords copy";
  align-items: center;
  column-gap: .6rem;
  padding: .55rem .7rem;
  border: 1px solid var(--tl-hairline);
  border-radius: var(--tl-radius);
  background: var(--tl-paper);
}

#tlcomp-public-detail .tlcomp-pins-legend-item .tlcomp-pin-dot { grid-area: dot; }
#tlcomp-public-detail .tlcomp-pins-legend-name {
  grid-area: name;
  font-weight: 600;
  color: var(--tl-ink);
}
#tlcomp-public-detail .tlcomp-pins-legend-coords { grid-area: coords; }
#tlcomp-public-detail .tlcomp-pins-legend-item .tlcomp-pin-copy { grid-area: copy; }

.tlcomp-pin-popup-coords,
.tlcomp-pins-legend-coords {
  font-family: var(--tl-font-mono);
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
  color: var(--tl-muted);
}

.tlcomp-pin-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--tl-hairline);
  border-radius: var(--tl-radius-sm);
  background: var(--tl-panel);
  font-size: .78rem;
  line-height: 1;
  color: var(--tl-muted);
  cursor: pointer;
}

.tlcomp-pin-copy:hover,
.tlcomp-pin-copy:focus-visible {
  border-color: var(--tl-accent);
  color: var(--tl-accent);
}

/* MapLibre's popup, on paper, with the name above its coordinate. */
.tlcomp-map-popup .maplibregl-popup-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .1rem .6rem;
  align-items: center;
  padding: .6rem .7rem;
  border: 1px solid var(--tl-hairline);
  border-radius: var(--tl-radius);
  background: var(--tl-panel);
  box-shadow: var(--tl-lift);
  color: var(--tl-ink);
}

.tlcomp-map-popup .maplibregl-popup-content strong {
  grid-column: 1;
  font-size: .85rem;
}

.tlcomp-map-popup .tlcomp-pin-popup-coords {
  grid-column: 1;
}

.tlcomp-map-popup .tlcomp-pin-copy {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.tlcomp-map-popup .maplibregl-popup-tip {
  border-top-color: var(--tl-panel);
}

/* The routes: one map above, a card per route under it. Each card carries
   its sport's colour as a rule down its left edge, the same colour its line
   has on the map. */
#tlcomp-public-detail .tlcomp-routes-map-frame {
  margin-bottom: 1rem;
}

#tlcomp-public-detail .tlcomp-route-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: .75rem;
}

#tlcomp-public-detail .tlcomp-route-card {
  display: grid;
  align-content: start;
  gap: .85rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--tl-hairline);
  border-left: 4px solid var(--tlcomp-route-colour, var(--tl-hairline-strong));
  border-radius: var(--tl-radius-lg);
  background: var(--tl-paper);
}

#tlcomp-public-detail .tlcomp-route-card.has-line {
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}

#tlcomp-public-detail .tlcomp-route-card.has-line:hover,
#tlcomp-public-detail .tlcomp-route-card.is-selected {
  border-color: var(--tl-hairline-strong);
  border-left-color: var(--tlcomp-route-colour);
  box-shadow: var(--tl-lift);
}

#tlcomp-public-detail .tlcomp-route-card-head {
  display: grid;
  gap: .3rem;
}

#tlcomp-public-detail .tlcomp-route-kicker {
  font-family: var(--tl-font-mono);
  font-size: .64rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tl-dim);
}

#tlcomp-public-detail .tlcomp-route-card-title {
  margin: 0;
  font-family: var(--tl-font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--tl-ink);
}

#tlcomp-public-detail .tlcomp-route-sport {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  justify-self: start;
  font-size: .8rem;
  font-weight: 600;
  color: var(--tl-ink);
}

#tlcomp-public-detail .tlcomp-route-sport-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tlcomp-route-colour, var(--tl-accent));
}

#tlcomp-public-detail .tlcomp-route-figures {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.75rem;
  margin: 0;
}

#tlcomp-public-detail .tlcomp-route-figures dt {
  font-family: var(--tl-font-mono);
  font-size: .62rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--tl-dim);
}

#tlcomp-public-detail .tlcomp-route-figures dd {
  margin: 0;
  font-family: var(--tl-font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--tl-ink);
}

#tlcomp-public-detail .tlcomp-route-card-foot {
  display: flex;
  align-items: center;
  gap: .5rem;
}

#tlcomp-public-detail .tlcomp-route-pending {
  font-family: var(--tl-font-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--tl-dim);
}

@media (max-width: 767.98px) {
  #tlcomp-profile-root .tlcomp-pins-map {
    height: 300px;
    min-height: 300px;
  }
}
