.sport-link2 {
  display: inline-block;
  padding: 18px 28px;
  background: linear-gradient(90deg,rgba(2, 0, 36, 1) 0%, rgba(9, 9, 121, 1) 25%, rgba(0, 212, 255, 1) 100%);
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 8px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px grey;
  position: relative;
  overflow: hidden;
}

a.sport-link2 {
  text-decoration: none;
}

.sport-link2::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: rgba(255,255,255,0.2);
  transform: skewX(-25deg);
  transition: left 0.5s ease;
}

.sport-link2:hover::before {
  left: 125%;
}

.sport-link2:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px #DEE0FF;
}


.sport-link3 {
  display: inline-block;
  padding: 6px 18px;              /* più basso */
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #1f4a7a;
  background: linear-gradient(to bottom, #e8f1ff, #d4e3fc);
  border: 1px solid #b7cceb;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

a.sport-link3 {
  text-decoration: none;
}

.sport-link3:hover {
  background: linear-gradient(to bottom, #f4f9ff, #c8dbfa);
  border-color: #9fbbe6;
  color: #163a66;
}

.sport-link3:active {
  background: #c3d7f7;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}

.rules-wrapper {
  max-width: 800px;
  margin: 40px auto;
}

.rules-title {
  font-size: 24px;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 20px;
  color: #111;
  border-left: 6px solid #d50000;
  padding-left: 12px;
}

.rules-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border-radius: 8px;
  overflow: hidden;
}

.olympic-title {
  font-family: Arial, sans-serif;
  font-size: 28px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #0033a0, #d4af37);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.rules-table thead {
  background-color: #1a1f2b;
  color: #ffffff;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 1px;
}

.rules-table th,
.rules-table td {
  padding: 7px 8px;
  text-align: left;
  line-height: 1.3;
  border-color: rgb(235, 235, 235);
}

.rules-table tbody tr {
  border-bottom: 1px solid #e6e9ef;
  transition: background-color 0.2s ease;
}

.rules-table tbody tr:hover {
  background-color: #f1f3f7;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 20px;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-max {
  background-color: #d50000;
}

.badge-limit {
  background-color: #ff6f00;
}

.badge-note {
  background-color: #455a64;
}


.totallympics-table {
    width: 800px;
    margin:  auto;
    border-collapse: collapse;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    background: #ffffff;
}

.totallympics-table th {
    background-color: #1f5fa8;
    color: #ffffff;
    text-transform: uppercase;
    padding: 12px;
    border: 1px solid #dcdcdc;
}

.totallympics-table td {
    padding: 10px;
    border: 1px solid #dcdcdc;
    text-align: center;
}


/* transizione morbida */
.totallympics-table td{
  transition: filter 0.2s ease;
}

/* hover = stesso colore ma più scuro */
.totallympics-table tbody tr:hover td{
  filter: brightness(0.92);
}

.ccategory {
    text-align: left;
    font-weight: bold;
    background-color: #f4f7fb;
}

.progress-cell {
    width: 260px;
}

.progress-bar {
    height: 18px;
    background-color: #e6e6e6;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: var(--percent);
    background-color: #2f87c8;
}

.reached .progress-fill {
    background-color: #2e7d32;
}

.nothing .progress-fill {
    background-color: grey;
}

.percent-text {
    font-weight: bold;
}

.page-header-olympic {
    width: 800px;
    margin: 4px auto 3px auto;
    text-align: center;
    padding: 5px 5px 5px 5px;
    box-sizing: border-box;
    border-top: 4px solid #c6a74a;
    border-bottom: 4px solid #c6a74a;
}

.page-header-olympic {
  border-top: none !important;
    border-bottom: none !important;

}

.page-header-olympic img {
    height: 70px; /* dimensione pictogram */
    margin-bottom: 18px;
}

.page-header-olympic h1 {
    margin: 0;
    font-size: 58px;
    letter-spacing: 8px;
    font-weight: 600;
    text-transform: uppercase;
    color: #0b2a4a;
}

.hero-subtitle{
  margin-top:10px;
  font-size:13px;
  letter-spacing:3px;
  text-transform:uppercase;
  color:#c9a646;
  text-align:center;
}

.hero-updated-pill{
  display:inline-flex;
  align-items:center;
  margin-left:15px;
  padding: 6px 8px;
  border-radius:999px;
  font-size:10px;
  font-weight:700;
  letter-spacing:.2px;
  text-transform:none;
  color:rgba(20,40,70,.75);
  background:rgba(20,40,70,.06);
  border:1px solid rgba(20,40,70,.12);
  white-space:nowrap;
    transform: translateY(-2px);
    transition: .2s ease;
}

.hero-updated-pill:hover{
  background:#e1e7ef;
  border-color:#cfd6e2;
}


.page-header-olympic .gold-divider {
    width: 800px;
    height: 2px;
    background-color: #c6a74a;
    margin: 5px auto 16px auto;
}

.page-header-olympic .subtitle {
    font-size: 16px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #c6a74a;
}

.quota-wrapper {
    width: 800px;
    margin: 30px auto;
    font-family: Arial, Helvetica, sans-serif;
    color: #2f3b46;
}

/* Section Title */
.quota-section-title {
    background-color: #e5e5e5;
    font-weight: bold;
    font-size: 20px;
    padding: 12px 15px;
}

/* Subheader */
.quota-subheader {
    background-color: #cfcfcf;
    padding: 10px 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #000;
}

/* Table */
.quota-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 18px;
}

.quota-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #333;
}

/* First column (labels) */
.label-cell {
    background-color: #d9dde2;
    font-weight: bold;
    width: 40%;
}

/* Men column */
.men-cell {
    background-color: #9fb8d6;
    text-align: center;
    width: 18%;
}

/* Women column */
.women-cell {
    background-color: #d8d2ad;
    text-align: center;
    width: 18%;
}

/* Total column */
.total-cell {
    background-color: #cfd4da;
    text-align: center;
    font-weight: bold;
    width: 18%;
}

/* Final total row stronger */
.total-row .label-cell {
    font-weight: bold;
}

.total-row td {
    font-weight: bold;
}

.quota-table-men-only {
  width: 800px;
  margin: 30px auto;
  font-family: Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  table-layout: fixed;
  color: #2c3e50;
}

.quota-table-men-only th,
.quota-table-men-only td {
  padding: 12px 10px;
  border-bottom: 1px solid #e1e4ea;
  text-align: center;
}

.quota-table-men-only th {
  background: #1f4a7a;
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 14px;
}

.quota-table-event-name {
  text-align: left;
  font-weight: 600;
  color: #243a5b;
  background: #f9fbfd;
  width: 60%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-right: 2px solid #d1d9e6;
}

.quota-table-men-col {
  background: #d4e3fc;
  width: 20%;
  font-weight: 700;
  color: #1f4a7a;
}

.quota-table-nocs-col {
  background: #c5d1df;
  width: 20%;
  font-weight: 600;
  color: #25364a;
}

.quota-table-total-row {
  font-weight: 700;
  background: #c8d8ff;
}

.quota-table-total-row td {
  border-bottom: none;
}

.quota-table-minimal {
  width: 800px;
  margin: 25px auto;
  font-family: Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  table-layout: fixed;
  color: #222;
}

/* Celle base */
.quota-table-minimal th,
.quota-table-minimal td {
  padding: 7px 10px;              /* più compatta */
  text-align: center;
  font-size: 14px;
  border: none;                   /* nessun bordo verticale */
}

/* Linea orizzontale sottile */
.quota-table-minimal tr {
  border-bottom: 1px solid #e2e2e2;
}

/* Header */
.quota-table-minimal thead tr {
  border-bottom: 2px solid #222;  /* linea più marcata sotto header */
}

.quota-table-minimal th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
}

/* Colonna evento */
.quota-table-event-name {
  text-align: left;
  font-weight: 600;
  width: 60%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Riga totale */
.quota-table-total-row {
  font-weight: 700;
  border-top: 2px solid #222;
  border-bottom: none;
}

/* Link evento */
.quota-table-event-link {
  color: #1f4a7a;
  text-decoration: none;
}

.quota-table-event-link:hover {
  text-decoration: underline;
}

/* Hover righe (override degli inline background-color) */
.quota-table tbody tr:not(:first-child):hover .label-cell { background-color: #e7edf5 !important; }
.quota-table tbody tr:not(:first-child):hover .men-cell   { background-color: #aecdf0 !important; }
.quota-table tbody tr:not(:first-child):hover .women-cell { background-color: #e6dfb6 !important; }
.quota-table tbody tr:not(:first-child):hover .total-cell { background-color: #e7edf5 !important; }

/* Cursore + transizione (non toccano i bordi) */
.quota-table td{ transition: background-color .2s ease; }

/* Tabella principale */
.qqualtable {
  width: 800px;
  max-width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;      /* spazio verticale tra le righe */
  font-family: Arial, sans-serif;
  font-size:14px;
  margin:0 auto;
}

/* Header */
.qqualtable thead th {
  padding:8px 8px;
  text-align:left;
  border:1px solid #e5e7eb;
  background:#f8fafc;
  font-weight:600;
  font-size:11px;
  text-transform:uppercase;
  color:#6b7280;
}

/* Riga eventi */
.qqualtable tbody tr {
  transition: all 0.18s ease;
}

/* Hover sull'intera cella */
.qqualtable tbody td:hover {
  background-color: rgba(0, 87, 184, 0.1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

/* Categorie colori */
.qqualtable tbody tr.men td { background-color: rgb(190,221,255); }
.qqualtable tbody tr.women td { background-color: rgb(239,233,194); }
.qqualtable tbody tr.mixed td {
  background: linear-gradient(90deg, rgb(190,221,255) 0%, rgb(239,233,194) 100%);
}

/* Celle */
.qqualtable td {
  padding:4px 12px;
  vertical-align:middle;
  position:relative;
  border:none;          /* nessun bordo tra le celle */
  border-radius:0;      /* niente arrotondamento interno tra colonne */
}

/* Bordo arrotondato tra le righe */
.qqualtable tbody tr td:first-child { border-top-left-radius:6px; border-bottom-left-radius:6px; }
.qqualtable tbody tr td:last-child { border-top-right-radius:6px; border-bottom-right-radius:6px; }

/* Barre progresso */
.qqualtable .progress-bar {
  height:6px;
  background: rgba(0,0,0,0.08);
  border-radius:10px;
  overflow:hidden;
  margin-top:4px;
}

.qqualtable .progress-fill {
  height:100%;
  border-radius:10px;
  background:#0057b8;
  transition: width 0.4s ease;
}

.qqualtable .progress-fill.complete {
  background:#00853f;
}

.qqualtable .progress-fill.not-applicable{
  background:#555;          /* grigio scuro */
  width:100% !important;    /* piena, effetto “disabilitato” */
  opacity:.7;               /* look inattivo */
}

/* Badge NOC */
.qqualtable .noc-badge {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:22px;
  padding:0 10px;
  font-size:0.85em;
  font-weight:500;
  border-radius:16px;
  background:linear-gradient(135deg,#2c3e50 0%,#4b6cb7 100%);
  color:#f0f4f8;
  box-shadow: inset 0 -2px 4px rgba(255,255,255,0.2), 0 2px 6px rgba(44,62,80,0.4);
  border:1px solid rgba(255,255,255,0.3);
  user-select:text;
  cursor:text;
  line-height:1.2;
  white-space:nowrap;
  transition: all 0.3s ease;
}

/* Badge hover */
.qqualtable tbody tr:hover .noc-badge {
  background: linear-gradient(135deg,#0b2248 0%,#1e3c72 100%);
  box-shadow: inset 0 -2px 6px rgba(255,255,255,0.3), 0 4px 12px rgba(11,34,72,0.7);
  color: #e6f0ff;
  border-color: rgba(230,240,255,0.6);
}

/* Freccia hover */
.qqualtable .row-arrow {
  font-size:18px;
  margin-left:6px;
  color:transparent;
  transition: color 0.2s ease;
}

.qqualtable tbody tr:hover .row-arrow {
  color:#0057b8;
}

/* Link Event/NOC */
.qqualtable a.event-link, .qqualtable a.noc-link {
  text-decoration:none;
  color:inherit;
  display:inline-block;
  width:100%;
}

/* Bordo solo sulla colonna centrale */
.qqualtable tbody td:nth-child(2) {
  border-left: 1px solid #eeeeee;
  border-right: 1px solid #eeeeee;
  border-radius: 0; /* rimuove arrotondamenti interni */
}
/* Più visibili i numeri della qualifica */
.qqualtable .progress-bar + strong {
  font-size: 1rem;
  font-weight: 700;
  color: #1f2937;
  margin-right: 8px;
}

/* Leggero hover sulla colonna numerica */
.qqualtable tbody td:nth-child(2):hover {
  background: rgba(0, 87, 184, 0.08);
}

/* Badge NOC - versione più soft */
.qqualtable .noc-badge {
  font-weight: 600;
  background: linear-gradient(135deg,#3b4db7 0%,#6b81db 100%);
  box-shadow: none;
}

/* Allineamento orizzontale centrale per la colonna NOCs */
.qqualtable td:nth-child(3) {
  text-align: center; /* centra contenuti orizzontalmente */
  position: relative;
}

/* Numero NOC e freccia allineati al centro */
.qqualtable td:nth-child(3) .noc-wrapper {
  display: inline-block; /* permette centratura con text-align:center */
  position: relative;
}

/* Freccia posizionata accanto al numero */
.qqualtable td:nth-child(3) .row-arrow {
  position: absolute;
  right: -18px; /* distanza rispetto al numero */
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: transparent;
  transition: color 0.2s ease;
}

.qqualtable tbody tr:hover td:nth-child(3) .row-arrow {
  color: #0057b8;
}

/* =========================
   WRAPPER + TABLE (fixed 800px)
========================= */
.qualificalendar-wrapper{
  width:800px;
  max-width:800px;
  margin:0 auto;
}

.qualificalendar-table{
  width:800px;
  max-width:800px;
  border-collapse:collapse;
  table-layout:fixed;
  font-size:14px;
  border-top:2px solid #d6d6d6;
  font-family:Quicksand,sans-serif;
}

/* keep everything inside 800px (padding included) */
.qualificalendar-table,
.qualificalendar-table *{
  box-sizing:border-box;
}

/* RESET IPS */
.qualificalendar-table td,
.qualificalendar-table th{
  float:none !important;
}

.qualificalendar-table td p,
.qualificalendar-table td span{
  margin:0 !important;
  padding:0 !important;
}

/* =========================
   HEADER
========================= */
.qualificalendar-table thead th{
  text-align:left;
  font-size:13px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:1.3px;
  padding:14px;
  background:#e9edf2;
  border-bottom:4px solid #cfd6dd;
}
.qualificalendar-table thead th:last-child{
  text-align:center;
}

/* =========================
   UX scan improvement (same as before)
========================= */
.qualificalendar-table tbody tr:nth-child(even) td{
  background:#fbfcfd;
}
.qualificalendar-table tbody tr.in-progress td{
  background:#fff9e8;
}

/* =========================
   ROW HEIGHT
========================= */
:root{ --qc-row-h:74px; }

.qualificalendar-table tbody tr{
  height:var(--qc-row-h);
}

.qualificalendar-table tbody td{
  height:var(--qc-row-h);
  padding:10px 14px;
  vertical-align:middle;
  border-bottom:1px solid #e7edf3; /* a bit more visible by default */
  background:#fff;
  overflow:hidden;  /* keep tidy */
  transition:background .18s ease;
}

/* if some TD has inline height, ignore it */
.qualificalendar-table td[style*="height"]{
  height:auto !important;
}

/* vertical borders */
.qualificalendar-table tbody td+td{
  border-left:1px solid #e5ebf1;
}

/* =========================
   HOVER (grid readable)
========================= */
.qualificalendar-table tbody tr:hover td{
  background:#f4f7fb !important;
  border-bottom-color:#d7e0ea;
}
.qualificalendar-table tbody tr:hover td+td{
  border-left-color:#dbe3ec;
}

/* =========================
   LEFT COLOR BAR (NOW ON TD)
   Add these classes to the FIRST <td>
   qcbar qc-completed / qcbar qc-inprogress / qcbar qc-scheduled
========================= */
.qualificalendar-table tbody td.qcbar{
  position:relative;
  padding-left:22px; /* room for bar */
}

/* fallback bar (if only qcbar exists) */
.qualificalendar-table tbody td.qcbar:before{
  content:"";
  position:absolute;
  left:0;
  top:8px;
  bottom:8px;
  width:7px;
  border-radius:999px;
  opacity:.95;
  background:#8aa0b5;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.06),
    0 6px 16px rgba(0,0,0,.10),
    0 0 10px rgba(138,160,181,.22);
}

.qualificalendar-table tbody td.qcbar.qc-completed:before{
  background:#1f7a3a;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.06),
    0 6px 16px rgba(0,0,0,.10),
    0 0 14px rgba(31,122,58,.30);
}
.qualificalendar-table tbody td.qcbar.qc-inprogress:before{
  background:#c99700;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.06),
    0 6px 16px rgba(0,0,0,.10),
    0 0 14px rgba(201,151,0,.30);
}
.qualificalendar-table tbody td.qcbar.qc-scheduled:before{
  background:#003c88;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.06),
    0 6px 16px rgba(0,0,0,.10),
    0 0 14px rgba(0,60,136,.28);
}

/* =========================
   EVENT LINK + ARROW (same as before)
========================= */
.qualificalendar-eventlink{
  display:block;
  position:relative;
  color:inherit;
  text-decoration:none !important;
  padding-right:28px;
}
.qualificalendar-eventlink *{ text-decoration:none !important; }

.qualificalendar-eventlink:after{
  content:"➔";
  position:absolute;
  right:6px;
  top:50%;
  transform:translateY(-50%);
  font-weight:900;
  opacity:.35;
  transition:.15s;
}

tbody tr:hover .qualificalendar-eventlink:after{
  opacity:.85;
  transform:translateY(-50%) translateX(3px);
}

/* EVENT TEXT */
.qualificalendar-date{
  display:block;
  font-weight:700;
  font-size:12px;
  color:#003c88;
  margin-bottom:4px;
  line-height:1.35;
}

.qualificalendar-title{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  font-weight:700;
  font-size:14px;
  line-height:1.22;
  margin-bottom:4px;
}

.qualificalendar-location{
  display:block;
  font-size:12px;
  color:#777;
  line-height:1.35;
}

/* =========================
   QUOTA (same as before)
========================= */
.qualificalendar-quota{
  vertical-align:middle;
  padding-left:12px;
  padding-right:10px;
}

.qualificalendar-quotainner{
  font-size:13px;
  color:#444;
  line-height:1.35;

  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* =========================
   STATUS (same as before)
   - controlled width so it won't clip
========================= */
.qualificalendar-status{
  text-align:center;
  padding:10px 4px;
  overflow:visible;
}

.status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  height:28px;
  width:100%;
  max-width:138px;
  padding:0 22px;

  font-size:10px;
  font-weight:900;
  letter-spacing:.7px;
  text-transform:uppercase;
  white-space:nowrap;

  color:#fff;
  border-radius:999px;

  box-shadow:0 1px 0 rgba(0,0,0,.10), 0 6px 14px rgba(0,0,0,.08);

  border:1px solid rgba(255,255,255,.22);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);

  background-image:linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0));
}

.status-completed{ background-color:rgba(31,122,58,.86); }
.status-in-progress{ background-color:rgba(201,151,0,.88); }
.status-scheduled{ background-color:rgba(0,60,136,.86); }

tr.completed .status-badge{ opacity:.85; }

/* =========================
   IN PROGRESS indicator (clean version)
========================= */

.status-in-progress{
  position:relative;
  padding-left:2px;
}

/* fixed dot */

.status-in-progress:before{
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:#fff;
  display:inline-block;
  margin-right:1px;
  position:relative;
  z-index:2;
}

/* pulse ring */

.status-in-progress:after{
  content:"";
  position:absolute;

  width:7px;
  height:7px;

  border-radius:50%;

  left:2px;
  top:50%;

  transform:translateY(-50%);

  border:10px solid rgba(255,255,255,.7);

  animation:qcPulse 1.4s infinite;

  opacity:.5;
}

@keyframes qcPulse{

  0%{
    transform:translateY(-50%) scale(1);
    opacity:.5;
  }

  70%{
    transform:translateY(-50%) scale(2.2);
    opacity:0;
  }

  100%{
    opacity:0;
  }

}


/* ===== WRAP ===== */
.tm-oqt800__wrap{
  width:800px;
  margin:0 auto;
  background:#fff;
  border:1px solid #e4e9f0;
  border-top:0;
  border-radius:14px;
  box-shadow:0 2px 6px rgba(16,24,40,.05);
  overflow:hidden;
  font-family:Quicksand,sans-serif;

  /* If your theme has a fixed top bar, set e.g. 56px */
  --stickyTop:0px;
}

/* ===== TABLE ===== */
table.tm-oqt800__table{
  width:800px;
  table-layout:fixed;
  border-collapse:separate;
  border-spacing:0;
  margin:0 !important;
  font-size:13.5px;
}

.tm-oqt800__col--noc{ width:400px; }
.tm-oqt800__col--tot{ width:140px; }
.tm-oqt800__col--m{ width:130px; }
.tm-oqt800__col--w{ width:130px; }

/* ===== STICKY HEADER ===== */
.tm-oqt800__table thead th{
  position:sticky;
  top:var(--stickyTop);
  z-index:20;
  padding:9px 12px;
  text-align:center;
  font-weight:700;
  letter-spacing:.3px;
  color:#fff;
  background:linear-gradient(180deg,#0b5f93 0%, #0a4f7b 100%);
  box-shadow:0 2px 0 rgba(0,0,0,.08);
}
.tm-oqt800__th--noc{ text-align:left !important; }

/* ===== CELLS ===== */
.tm-oqt800__table tbody td{
  padding:7px 12px;
  border-bottom:1px solid #e9edf3;
  vertical-align:middle;
  transition:background .15s ease;
}

/* ===== HOVER ONLY NOC ===== */
.tm-oqt800__row--noc:hover td{ background:#eaf3ff; }
.tm-oqt800__row--noc:hover td:first-child{
  box-shadow: inset 5px 0 0 rgba(11,95,147,.4);
}

/* ===== CLICKABLE NOC ROW (NO JS) ===== */
.tm-oqt800__row--noc td{
  position:relative;
  cursor:pointer;
}
.tm-oqt800__rowLink{
  position:absolute;
  inset:0;
  z-index:3;
  display:block;
  text-decoration:none !important;
  color:inherit;
  font-size:0;
  line-height:0;
}
.tm-oqt800__cellContent{
  position:relative;
  z-index:2;
  pointer-events:none;
}

/* ===== NOC CELL ===== */
.tm-oqt800__nocCell{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.tm-oqt800__nocTop{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.tm-oqt800__nocFlag{
  width:32px;
  height:22px;
  object-fit:cover;
  border-radius:4px;
  border:1px solid rgba(0,0,0,.18);
  box-shadow:0 1px 1px rgba(16,24,40,.10);
  flex:0 0 auto;
}
.tm-oqt800__nocName{
  font-size:15px;
  font-weight:700;
  line-height:1.05;
}

/* ===== EVENTS COUNT + OLYMPIC DOT (Invision-proof: NOT empty) ===== */
.tm-oqt800__progRow{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  font-weight:700;
  color:#4b5563;
  line-height:1;
}
.tm-oqt800__progDot{
  width:6px;
  height:6px;
  border-radius:50%;
  background:#0b5f93;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
  display:inline-block;

  /* hide the &nbsp; inside */
  font-size:0;
  line-height:0;
}

/* ===== NUMBERS ===== */
.tm-oqt800__num{
  text-align:center;
  font-weight:650;
  font-variant-numeric: tabular-nums;
}

/* emphasize M/W */
.tm-oqt800__row--noc td:nth-child(3),
.tm-oqt800__row--noc td:nth-child(4){
  font-size:15px;
  font-weight:800;
}

/* M/W tint */
.tm-oqt800__row--noc td:nth-child(3){
  background:rgba(140,195,242,.30);
  color:#0b5f93;
}
.tm-oqt800__row--noc td:nth-child(4){
  background:rgba(210,202,130,.30);
  color:#8a7400;
}
.tm-oqt800__row--noc:hover td:nth-child(3),
.tm-oqt800__row--noc:hover td:nth-child(4){
  background:#eaf3ff;
}

/* TOT pill */
.tm-oqt800__totPill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:44px;
  height:28px;
  padding:0 12px;
  border-radius:999px;
  font-size:16px;
  font-weight:800;
  background:linear-gradient(180deg,#e8f3ff 0%, #d5e9ff 100%);
  border:1px solid #b9d6f5;
  color:#0b5f93;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}

/* ===== LEGEND (NOT CLICKABLE) ===== */
.tm-oqt800__row--legend td{
  background:#f8fafc;
  padding:6px 12px;
}
.tm-oqt800__legendWrap{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.tm-oqt800__legendTitle{
  font-weight:800;
  color:#0b3550;
}
.tm-oqt800__legendWrap span{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  border:2px solid #cfd6df;
  background:#fff;
  font-size:12px;
  font-weight:700;
  user-select:none;
}
.tm-oqt800__legendWrap span::before{
  content:"";
  width:12px;
  height:12px;
  border-radius:3px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.14);
}

.tm-oqt800__legendLabel{
  font-weight:800;
  color:#0b3550;
  padding:0;
  border:0;
  background:transparent;
}

.tm-oqt800__legendWrap .tm-oqt800__legendLabel{
  display:inline;
  border:none !important;
  background:transparent !important;
  padding:0 !important;
  box-shadow:none !important;
}
.tm-oqt800__legendWrap .tm-oqt800__legendLabel::before{
  content:none !important;
}

.tm-oqt800__legendWrap span[data-type="m"]::before{ background:rgb(140,195,242); }
.tm-oqt800__legendWrap span[data-type="w"]::before{ background:rgb(210,202,130); }
.tm-oqt800__legendWrap span[data-type="x"]::before{
  background:linear-gradient(90deg,rgb(140,195,242),rgb(210,202,130));
}

/* ===== EVENTS ROW ===== */
.tm-oqt800__row--events td{
  padding:6px 12px 8px;
  background:#fbfcfe;
}

/* IMPORTANT: keep NO gap, we use cursorPad as real paste slots */
.tm-oqt800__events{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  column-gap:0 !important;
  row-gap:6px !important;
}

/* Invision often injects <p>/<br> */
.tm-oqt800__events br{ display:none !important; }
.tm-oqt800__events p{ margin:0 !important; padding:0 !important; display:contents !important; }
@supports not (display: contents){
  .tm-oqt800__events p{ display:inline !important; }
}

/* chips */
.tm-oqt800__events a{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  border:2px solid #cfd6df;
  background:#fff;
  font-size:12px;
  font-weight:700;
  color:#0f172a;
  text-decoration:none !important;
  line-height:1.05;
  white-space:nowrap;
}
.tm-oqt800__events a::before{
  content:"";
  width:12px;
  height:12px;
  border-radius:3px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.14);
}
.tm-oqt800__events a[title^="M:"]::before{ background:rgb(140,195,242); }
.tm-oqt800__events a[title^="W:"]::before{ background:rgb(210,202,130); }
.tm-oqt800__events a[title^="X:"]::before{
  background:linear-gradient(90deg,rgb(140,195,242),rgb(210,202,130));
}

/* ===== SPACER (editing helper) =====
   MUST NOT BE EMPTY, otherwise Invision may "clean" it on re-save */
.tm-oqt800__cursorPad{
  display:inline-block !important;
  width:14px !important;
  height:20px !important;
  flex:0 0 14px !important;
  overflow:hidden !important;

  /* hide the &nbsp; inside */
  font-size:0 !important;
  line-height:0 !important;

  user-select:none !important;
}

/* ===== EDITOR MODE (Invision): allow editing text ===== */
[contenteditable="true"] .tm-oqt800__rowLink{
  display:none !important;      /* disable full-cell overlay links while editing */
}

[contenteditable="true"] .tm-oqt800__row--noc td{
  cursor:text !important;       /* optional: better UX in editor */
}

[contenteditable="true"] .tm-oqt800__cellContent{
  pointer-events:auto !important; /* ensure text is selectable/editable */
}


/* GLOBAL */
.eqp-wrapper{
  width:800px;
  margin:0 auto;
  font-family:Quicksand,sans-serif !important;
  color:#111;
}
.eqp-wrapper, .eqp-wrapper *{ font-family:Quicksand,sans-serif !important; }

/* HEADER */
.eqp-header{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  border:1px solid #eef2f6;
  border-bottom:none;
}
.eqp-wrapper.women .eqp-header{ background:rgb(239,233,194); }
.eqp-wrapper.men   .eqp-header{ background:rgb(190,221,255); }
.eqp-wrapper.mixed .eqp-header{ background:linear-gradient(90deg,rgb(190,221,255),rgb(239,233,194)); }

.eqp-updated{
  flex:0 0 auto;
  font-size:12px;
  font-weight:600;
  color:#475569;
  background:rgba(255,255,255,.55);
  border:1px solid rgba(209,213,219,.95);
  border-radius:18px;
  padding:5px 12px;
  white-space:nowrap;
}

.eqp-title{
  flex:1 1 auto;
  text-align:center;
  padding-right:56px; /* optical shift */
  font-size:18px;
  font-weight:800;
  letter-spacing:1.6px;
  text-transform:uppercase;
  line-height:1.1;
}
.eqp-wrapper.women .eqp-title{ color:#5c4a00; }
.eqp-wrapper.men   .eqp-title{ color:#0b3a6f; }
.eqp-wrapper.mixed .eqp-title{ color:#2a2a2a; }

/* KPI */
.eqp-kpis{
  display:grid;
  grid-template-columns:1fr 1fr;
  border:1px solid #eef2f6;
  background:#fafbfd;
}
.eqp-kpi{ text-align:center; padding:14px 10px; }
.eqp-kpi + .eqp-kpi{ border-left:1px solid #eef2f6; }

.eqp-kpiValue{ font-size:42px; font-weight:800; line-height:1; }
.eqp-kpiValue small{ font-size:16px; color:#9ca3af; font-weight:700; }
.eqp-kpiLabel{
  margin-top:6px;
  font-size:11px;
  letter-spacing:1px;
  text-transform:uppercase;
  color:#6b7280;
  font-weight:700;
}

.eqp-progress{
  width:240px;
  height:8px;
  margin:10px auto 0;
  background:#eef2f6;
  border-radius:20px;
  overflow:hidden;
}
.eqp-progressFill{ height:100%; }
.eqp-wrapper.women .eqp-progressFill{ background:rgba(92,74,0,.35); }
.eqp-wrapper.men   .eqp-progressFill{ background:rgba(11,58,111,.35); }
.eqp-wrapper.mixed .eqp-progressFill{ background:rgba(0,0,0,.25); }

/* TABLE */
.eqp-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  margin-top:14px;
  background:#fff;
  table-layout:fixed;
  border:1px solid #eef2f6;
}
.eqp-table thead th{
  background:#fff;
  font-size:12px;
  letter-spacing:1px;
  text-transform:uppercase;
  padding:12px 10px;
  color:#4b5563;
  border-bottom:1px solid #eef2f6;
  text-align:left;
  font-weight:800;
}
.eqp-table thead th:nth-child(2),
.eqp-table thead th:nth-child(3){ text-align:center; }
.eqp-table thead th + th{ border-left:1px solid #f6f8fb; }

.eqp-table td{
  padding:12px;
  border-top:1px solid #f4f7fb;
  vertical-align:middle;
  background:#fff;
}
.eqp-table td + td{ border-left:1px solid #f6f8fb; }

/* hover only per event tbody */
.eqp-table tbody.eqp-block:hover td{ background:#fafcff; }

/* EVENT CELL */
.eqp-eventcell{
  position:relative;
  padding:0;                /* padding in link */
  background:#fbfcff;
  overflow:hidden;
  cursor:pointer;
}

/* Olympic bar appears only on hover */
.eqp-eventcell:before{
  content:"";
  position:absolute;
  left:0; top:0; bottom:0;
  width:5px;
  opacity:0;
  transform:scaleY(.15);
  transform-origin:top;
  transition:opacity .16s ease, transform .18s ease;
  pointer-events:none;
}
.eqp-wrapper.women .eqp-eventcell:before{ background:rgba(92,74,0,.45); }
.eqp-wrapper.men   .eqp-eventcell:before{ background:rgba(11,58,111,.45); }
.eqp-wrapper.mixed .eqp-eventcell:before{ background:rgba(0,0,0,.35); }

.eqp-eventcell:hover:before{
  opacity:1;
  transform:scaleY(1);
}

/* ✅ Link fills whole cell (NO absolute, safe with rowspan + Invision) */
.eqp-eventlink,
.eqp-eventlink:visited,
.eqp-eventlink:hover,
.eqp-eventlink:active{
  display:block;
  width:100%;
  height:100%;
  min-height:100%;
  position:relative;

  padding:14px 46px 14px 16px;

  text-decoration:none !important;
  color:inherit !important;
}

/* ensure spans behave like blocks */
.eqp-eventlink .eqp-event-title,
.eqp-eventlink .eqp-event-meta{
  display:block;
}

/* Single arrow (on the link, so clickable) */
.eqp-eventlink:after{
  content:"➔";
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  font-size:16px;
  font-weight:900;
  opacity:.35;
  transition:.15s ease;
  pointer-events:none; /* click still goes to link */
}
.eqp-table tbody.eqp-block:hover .eqp-eventlink:after{
  opacity:.9;
  transform:translateY(-50%) translateX(3px);
}

/* Avoid Invision adding weird ::after on inner stuff */
.eqp-eventlink span:after{ content:none !important; }

/* title/meta styles */
.eqp-event-title{
  font-weight:800;
  font-size:14px;
  line-height:1.2;
}
.eqp-event-meta{
  margin-top:4px;
  font-size:12px;
  color:#6b7280;
  line-height:1.2;
  font-weight:600;
}

/* Date chip aligned bottom-right */
.eqp-event-date{
  display:inline-block;
  margin-top:8px;
  float:right;                 /* robust even if editor changes things */
  padding:4px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.2px;
  color:#374151;
  background:rgba(17,24,39,.06);
  border:1px solid rgba(17,24,39,.10);
}

/* QUOTA */
.eqp-quota{ text-align:center; padding:0; }
.eqp-quotaBox{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:10px 0;
}
.eqp-quotaNumber{ font-size:26px; font-weight:900; line-height:1; }
.eqp-quotaLabel{
  margin-top:2px;
  font-size:9px;
  letter-spacing:1px;
  color:#9ca3af;
  text-transform:uppercase;
  font-weight:800;
}

/* NOC */
.eqp-noc{ text-align:center; }
.eqp-noclink{ display:inline-block; text-decoration:none !important; }
.eqp-noclink img{
  width:42px;
  height:auto;
  border:1px solid #eef2f6;
  box-shadow:0 1px 2px rgba(0,0,0,.05);
  transition:transform .15s ease, box-shadow .15s ease;
}
.eqp-noclink:hover img{
  transform:scale(1.10);
  box-shadow:0 4px 10px rgba(0,0,0,.10);
}

/* ATHLETE */
.eqp-athlete{
  font-size:14px;
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* athlete rows more compact */
.eqp-block tr:not(:first-child) td{
  padding-top:6px;
  padding-bottom:6px;
}

.eqp-quotaBox{
  min-height:0;
}

.eqp-table td{
  line-height:1.2;
}

/* align rowspan cells to top */
.eqp-eventcell,
.eqp-quota{
  vertical-align:top;
}

/* compact athlete rows */
.eqp-block tr:not(:first-child) td{
  padding-top:6px;
  padding-bottom:6px;
}

.eqp-noc{
  vertical-align:middle;
}