/* ==========================================================================
   Trends page — row intelligence + free gate
   Loaded after layout.css. Everything here is scoped to .trends-list or
   .trends-unlock so it cannot leak into other ranking lists.
   ========================================================================== */

/* --- Legend --------------------------------------------------------------- */

.trends-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 8px 0.5rem 4px;
  font-size: 11.5px;
  color: #8a9ab0;
}

.trends-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.trends-legend .trends-momentum { margin: 0; cursor: default; }
.trends-legend .trends-momentum.up { color: #23ff9f; }
.trends-legend .trends-momentum.down { color: #ff8f7a; }
.trends-legend .trends-streak { margin: 0; cursor: default; }
.trends-legend__edge { color: #23ff9f; font-weight: 700; }

.trends-legend__pro {
  display: inline-block;
  padding: 0 5px;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #330d0d;
  background: #f9da18;
}

.trends-legend__admin {
  margin-left: auto;
  color: #f9da18;
  text-decoration: none;
  font-weight: 600;
}
.trends-legend__admin:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .trends-legend { gap: 4px 12px; font-size: 11px; }
}

/* --- Links inside rows ---------------------------------------------------- */

.trends-list .ranking-row .main a,
.trends-list .ranking-row .main a:visited { color: #7cffc3; }
.trends-list .ranking-row .main a:hover,
.trends-list .ranking-row .main a:focus { color: #fff; text-decoration: underline; }

/* --- Grid containers ------------------------------------------------------ */

/* .space is `flex: 1 0 100%` with the default min-width:auto, so any wide
   inline content forces it past the viewport. Allow it to shrink. */
.table-grid-wrapper .space {
  min-width: 0;
  max-width: 100%;
}

/* --- Row layout ----------------------------------------------------------- */

.ranking-list.trends-list .ranking-row .main {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: visible;
}

@media screen and (min-width: 768px) {
  /* Let the team column use whatever the cells don't need instead of a fixed 240px. */
  .ranking-list.trends-list .ranking-row .main {
    flex: 1 1 auto;
    max-width: none;
    padding-right: 8px;
  }
}

.ranking-list.trends-list .ranking-row .main .rank {
  flex-shrink: 0;
}

.ranking-list.trends-list .ranking-row .main > a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-list.trends-list .ranking-row.header .main {
  display: inline-block;
}

/* --- Sample size / confidence --------------------------------------------- */

.trends-list .cell.trends-sample {
  gap: 5px;
  font-variant-numeric: tabular-nums;
}

.trends-conf {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: help;
}

.trends-conf.high { background: #23ff9f; box-shadow: 0 0 0 2px rgba(35, 255, 159, 0.15); }
.trends-conf.medium { background: #f9da18; box-shadow: 0 0 0 2px rgba(249, 218, 24, 0.15); }
.trends-conf.low { background: #7d8a9c; box-shadow: 0 0 0 2px rgba(125, 138, 156, 0.18); }

/* --- Momentum ------------------------------------------------------------- */

.trends-momentum {
  margin-left: 4px;
  font-size: 11px;
  cursor: help;
  opacity: 0.95;
}

.trends-momentum.up { color: #d6ffe9; }
.trends-momentum.down { color: #ffe0d6; }

/* --- Streak badge --------------------------------------------------------- */

.trends-streak {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.4;
  color: #ffb547;
  background: rgba(255, 140, 0, 0.14);
  border: 1px solid rgba(255, 160, 40, 0.35);
  cursor: help;
}

.trends-streak i {
  font-size: 9.5px;
}

/* --- Edge ----------------------------------------------------------------- */

.trends-list .cell.trends-edge-head {
  gap: 4px;
  cursor: help;
}

.trends-list .cell.trends-edge-head i {
  font-size: 10px;
  opacity: 0.7;
}

.trends-list .cell.trends-edge {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: help;
}

.trends-list .cell.trends-edge.strong { color: #23ff9f; text-shadow: 0 0 12px rgba(35, 255, 159, 0.45); }
.trends-list .cell.trends-edge.pos { color: #7cffc3; }
.trends-list .cell.trends-edge.flat { color: #aac8da; font-weight: 500; }
.trends-list .cell.trends-edge.neg { color: #ff8f7a; }
.trends-list .cell.trends-edge.none { color: #5d6b7e; font-weight: 400; }

/* --- Locked rows (free tier teaser) --------------------------------------- */

.trends-list .ranking-row.is-locked {
  background: #172236;
}

.trends-list .ranking-row.is-locked .main > a.trends-locked-team {
  color: #8fa3bf;
  text-decoration: none;
  font-size: 0.85em;
  cursor: pointer;
}

.trends-list .ranking-row.is-locked .main > a.trends-locked-team i {
  color: #d7e3f7;
  margin-right: 3px;
  font-size: 0.9em;
}

.trends-list .ranking-row.is-locked .main > a.trends-locked-team:hover {
  color: #fff;
}

.trends-list .cell.trends-locked-cell {
  color: #5d6b7e;
  font-size: 0.85em;
}

/* --- Unlock CTA ----------------------------------------------------------- */

.trends-unlock {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 16px;
  background: linear-gradient(162deg, #2c4357 1%, #223246 98%);
  border-top: 1px solid rgba(35, 255, 159, 0.18);
  border-radius: 0 0 10px 10px;
}

.trends-unlock__text {
  font-size: 13px;
  line-height: 1.5;
  color: #c0d2e8;
}

.trends-unlock__text strong {
  color: #fff;
}

.trends-unlock__text i {
  color: #23ff9f;
  margin-right: 4px;
  font-size: 11px;
}

.trends-unlock__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.trends-unlock__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: #0b1a12;
  background: #23ff9f;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.trends-unlock__btn:hover,
.trends-unlock__btn:focus {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(35, 255, 159, 0.25);
  color: #0b1a12;
  text-decoration: none;
}

.trends-unlock__alt {
  font-size: 12px;
  color: #8a9ab0;
  text-decoration: underline;
}

.trends-unlock__alt:hover {
  color: #c0d2e8;
}

.trends-list .pagination-link.trends-overview-more {
  background: #3c78e6;
  color: #fff;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 10px;
  padding-right: 10px;
}

@media (max-width: 767px) {
  /* On phones the cells shrink to their content and the team name takes the slack. */
  .ranking-list.trends-list .ranking-row .main {
    width: auto;
    max-width: none;
    flex: 1 1 0;
    padding-right: 6px;
  }
  .ranking-list.trends-list .ranking-row .cells {
    flex: 0 0 auto;
  }
  .ranking-list.trends-list .ranking-row .cells .cell {
    flex: 0 0 auto;
    min-width: 40px;
    padding: 0 4px;
    font-size: 0.85em;
  }
  .ranking-list.trends-list .ranking-row .cells .cell.highlight {
    min-width: 46px;
  }
  .ranking-list.trends-list .ranking-row .main .rank {
    font-size: 0.72em;
  }
  .trends-streak { margin-left: 4px; padding: 0 4px; font-size: 10px; }
  .trends-conf { width: 6px; height: 6px; }
}

@media (max-width: 600px) {
  .trends-unlock { padding: 12px 12px 14px; }
  .trends-unlock__btn { width: 100%; justify-content: center; }
}

/* --- Control surface (server filters + client tools, one card) ----------- */

.trends-controls {
  margin: 0 0.5rem 12px;
  padding: 10px 12px 8px;
  border-radius: 10px;
  background: #182232;
  border: 1px solid #253548;
  color: #aab8cc;
  font-size: 12.5px;
}

.trends-controls__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 10px;
}

.trends-controls__row--meta {
  align-items: center;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Search is the first thing you see: same height as the selects, wider. */
.trends-controls__search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 240px;
  min-width: 200px;
  height: 36px;
  margin: 0;
  padding: 0 11px;
  border-radius: 6px;
  background: #101a29;
  border: 1px solid #324a64;
  transition: border-color 0.15s ease;
}
.trends-controls__search:focus-within { border-color: #4d8be6; }
.trends-controls__search i { color: #6f819a; font-size: 12px; }
.trends-controls__search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
  outline: none;
}
.trends-controls__search input::placeholder { color: #6f819a; }

/* The four server filters (markup from the controller) share the first row. */
.trends-controls .trends-filters__controls {
  display: flex;
  flex: 2 1 420px;
  gap: 8px;
  min-width: 0;
}
.trends-controls .trends-filters__group { flex: 1 1 0; min-width: 0; }
.trends-controls .trends-filters__group label {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #687d99;
}
.trends-controls .trends-filters__group select {
  width: 100%;
  height: 36px;
  padding: 0 2em 0 10px !important;
  font-size: 13px !important;
  color: #e2ecf9;
  background: url(https://upload.wikimedia.org/wikipedia/commons/9/9d/Caret_down_font_awesome_whitevariation.svg) no-repeat right 6px center/1.2em, #101a29 !important;
  border: 1px solid #324a64 !important;
  border-radius: 6px;
  box-shadow: none;
  transition: border-color 0.15s ease;
}
.trends-controls .trends-filters__group select:hover { border-color: #3d6290 !important; }
.trends-controls .trends-filters__group select:focus { border-color: #4d8be6 !important; }

.trends-controls__count {
  font-variant-numeric: tabular-nums;
  color: #dbe6f5;
  font-weight: 600;
  min-width: 90px;
}

.trends-controls__sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
  color: #7f92ab;
}
.trends-controls__sort select {
  height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #dbe6f5;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.trends-controls__sort select:hover { border-color: #324a64; background: #101a29; }

/* Segmented control */
.trends-controls__seg {
  display: inline-flex;
  padding: 2px;
  border-radius: 7px;
  background: #101a29;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.trends-controls__seg button {
  height: 24px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #8a9ab0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}
.trends-controls__seg button:hover { color: #fff; }
.trends-controls__seg button.is-active { background: #2d3d52; color: #fff; }

/* Switch */
.trends-controls__switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 500;
}
.trends-controls__switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.trends-controls__switch-track {
  position: relative;
  width: 30px;
  height: 18px;
  border-radius: 9px;
  background: #2d3d52;
  transition: background 150ms ease;
}
.trends-controls__switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 150ms ease;
}
.trends-controls__switch input:checked + .trends-controls__switch-track { background: #23ff9f; }
.trends-controls__switch input:checked + .trends-controls__switch-track::after { transform: translateX(12px); }
.trends-controls__switch input:focus-visible + .trends-controls__switch-track { outline: 2px solid #4d8be6; outline-offset: 1px; }

.trends-controls__actions {
  display: inline-flex;
  gap: 8px;
  margin-left: auto;
}

.trends-controls__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 13px;
  border-radius: 6px;
  border: 1px solid #324a64;
  background: #1f2c3e;
  color: #e2ecf9;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease;
}
.trends-controls__btn:hover,
.trends-controls__btn:focus { background: #273750; border-color: #3d6290; color: #fff; outline: none; text-decoration: none; }
.trends-controls__btn i { font-size: 12px; }

.trends-controls__btn--primary {
  border-color: rgba(35, 255, 159, 0.4);
  background: rgba(35, 255, 159, 0.1);
  color: #23ff9f;
}
.trends-controls__btn--primary:hover,
.trends-controls__btn--primary:focus { background: rgba(35, 255, 159, 0.2); border-color: rgba(35, 255, 159, 0.6); color: #23ff9f; }

@media (max-width: 991px) {
  .trends-controls__search { flex-basis: 100%; }
  .trends-controls .trends-filters__controls { flex-basis: 100%; flex-wrap: wrap; }
  .trends-controls .trends-filters__group { flex: 1 1 calc(50% - 4px); }
}

@media (max-width: 600px) {
  .trends-controls { margin: 0 0.5rem 10px; padding: 8px 10px 8px; }
  .trends-controls__row--meta { gap: 8px; }
  .trends-controls__count { flex-basis: 100%; min-width: 0; }
  .trends-controls__actions { flex-basis: 100%; margin-left: 0; }
  .trends-controls__actions > * { flex: 1; justify-content: center; }
}

/* Legend sits under the tables as a footnote. */
.trends-legend-space .trends-legend { margin: 0 0.5rem 10px; }

/* --- Modal (save screen) -------------------------------------------------- */

.trends-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(8, 15, 25, 0.85);
  backdrop-filter: blur(6px);
  overflow-y: auto;
}
.trends-modal.is-open { display: flex; }

.trends-modal__panel {
  width: 100%;
  max-width: 520px;
  margin: auto 0;
  border-radius: 12px;
  background: #16202e;
  color: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.trends-modal__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.trends-modal__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #14a86a 0%, #23ff9f 100%);
  color: #0b1a12;
  font-size: 14px;
}
.trends-modal__title { margin: 0 0 4px; font-size: 17px; font-weight: 700; }
.trends-modal__desc { margin: 0; font-size: 12.5px; line-height: 1.45; color: #9fb0c8; }
.trends-modal__close {
  margin-left: auto;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #c8d3e3;
  cursor: pointer;
}
.trends-modal__close:hover { background: rgba(255, 255, 255, 0.12); }

.trends-modal__form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px 18px;
}
.trends-modal__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11.5px;
  color: #9fb0c8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.trends-modal__field--wide { grid-column: 1 / -1; }
.trends-modal__field input,
.trends-modal__field select {
  height: 36px;
  width: 100%;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0f1826;
  color: #fff;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
}
.trends-modal__field input:disabled { opacity: 0.45; cursor: not-allowed; }
.trends-modal__field input:focus,
.trends-modal__field select:focus { outline: none; border-color: rgba(35, 255, 159, 0.6); }
.trends-modal__suffixed { position: relative; display: block; }
.trends-modal__suffixed em { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; color: #6f819a; font-size: 13px; }
.trends-modal__check {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #d5deeb;
  cursor: pointer;
}
.trends-modal__check input { width: 16px; height: 16px; accent-color: #23ff9f; }
.trends-modal__check .trends-streak { margin: 0 2px; }
.trends-modal__status {
  grid-column: 1 / -1;
  margin: 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 92, 92, 0.12);
  color: #ff8b8b;
  font-size: 13px;
}
.trends-modal__actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}
.trends-modal__actions .trends-unlock__btn { border: 0; cursor: pointer; }
.trends-modal__link { background: none; border: 0; padding: 0; color: #9fb0c8; font-size: 13px; cursor: pointer; text-decoration: underline; }
.trends-modal__link:hover { color: #fff; }

.trends-modal__result { padding: 26px 18px 22px; text-align: center; }
.trends-modal__result > i { font-size: 34px; color: #23ff9f; }
.trends-modal__result h4 { margin: 10px 0 4px; font-size: 18px; }
.trends-modal__result p { margin: 0 0 6px; color: #b9c6d9; font-size: 13.5px; }
.trends-modal__result .trends-modal__actions { justify-content: center; margin-top: 16px; }
.trends-modal__pro-note a { color: #f9da18; }

@media (max-width: 520px) {
  .trends-modal__form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- Screens page --------------------------------------------------------- */

.trends-screens__notice {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(35, 255, 159, 0.12), rgba(35, 255, 159, 0.03));
  border: 1px solid rgba(35, 255, 159, 0.25);
  color: #e8eef7;
}
.trends-screens__notice.is-soft { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.08); }
.trends-screens__notice > i { font-size: 20px; color: #23ff9f; }
.trends-screens__notice > div { flex: 1; }
.trends-screens__notice strong { display: block; font-size: 14px; }
.trends-screens__notice p { margin: 2px 0 0; font-size: 12.5px; color: #9fb0c8; }
.trends-screens__notice a { color: #23ff9f; }

.trends-screens__empty {
  padding: 40px 24px;
  text-align: center;
  border-radius: 10px;
  background: #16202e;
  color: #b9c6d9;
}
.trends-screens__empty > i { font-size: 30px; color: #23ff9f; }
.trends-screens__empty h3 { margin: 10px 0 6px; color: #fff; }
.trends-screens__empty p { max-width: 460px; margin: 0 auto 16px; font-size: 13.5px; line-height: 1.5; }
.trends-screens__empty a { color: #23ff9f; }

.trends-screen {
  margin-bottom: 14px;
  border-radius: 10px;
  background: #16202e;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.trends-screen__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px 10px;
}
.trends-screen__title h3 { margin: 0 0 2px; font-size: 16px; color: #fff; }
.trends-screen__trend { font-size: 12px; color: #7f92ab; text-decoration: none; }
.trends-screen__trend:hover { color: #23ff9f; }
.trends-screen__trend i { font-size: 10px; margin-left: 3px; }
.trends-screen__controls { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.trends-screen__toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #c8d3e3; cursor: pointer; }
.trends-screen__toggle input { width: 16px; height: 16px; accent-color: #23ff9f; }
.trends-screen__delete {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 0;
  background: rgba(255, 255, 255, 0.05);
  color: #9fb0c8;
  cursor: pointer;
}
.trends-screen__delete:hover { background: rgba(255, 92, 92, 0.18); color: #ff8b8b; }

.trends-screen__criteria {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0 16px 12px;
  list-style: none;
}
.trends-screen__criteria li {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 11.5px;
  color: #d5deeb;
}

.trends-screen__matches-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 16px;
  background: #1c2838;
  font-size: 12px;
  font-weight: 700;
  color: #c8d3e3;
}
.trends-screen__muted { color: #7f92ab; font-weight: 400; font-size: 12px; }
.trends-screen__none { margin: 0; padding: 14px 16px; font-size: 13px; color: #9fb0c8; }
.trends-screen .ranking-row .main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.trends-screen__ko { flex-shrink: 0; font-size: 11.5px; color: #7f92ab; font-variant-numeric: tabular-nums; }
.trends-screen__comp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: #6f819a; }
.trends-screen__sent { margin-left: auto; color: #23ff9f; font-size: 12px; }
@media (max-width: 600px) {
  .trends-screen__comp { display: none; }
}

/* --- Sortable headers ----------------------------------------------------- */

.trends-list .ranking-row.header .cell.is-sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
}

.trends-list .ranking-row.header .cell.is-sortable:hover { color: #fff; }

.trends-list .ranking-row.header .cell.is-sorted {
  color: #23ff9f;
}

.trends-list .ranking-row.header .cell.is-sorted::after {
  content: '';
  display: inline-block;
  margin-left: 4px;
  border: 4px solid transparent;
}

.trends-list .ranking-row.header .cell.is-sorted.desc::after { border-top-color: currentColor; transform: translateY(2px); }
.trends-list .ranking-row.header .cell.is-sorted.asc::after { border-bottom-color: currentColor; transform: translateY(-2px); }

/* --- Rows that open the drawer -------------------------------------------- */

.trends-list [data-ranking-row][data-fixture] {
  cursor: pointer;
}

.trends-list [data-ranking-row][data-fixture]:hover,
.trends-list [data-ranking-row][data-fixture]:focus-visible {
  background: rgba(255, 255, 255, 0.045);
  outline: none;
}

.trends-row-open {
  margin-left: auto;
  padding-left: 6px;
  font-size: 9px;
  color: #5d6b7e;
  flex-shrink: 0;
  transition: color 120ms ease, transform 120ms ease;
}

.trends-list [data-ranking-row]:hover .trends-row-open { color: #23ff9f; transform: translateX(2px); }

.trends-list .trends-empty-filter {
  padding: 14px;
  font-size: 12.5px;
  color: #8a9ab0;
  text-align: center;
}

.trends-list .pagination a { flex: 1 1 0; }

.trends-list .pagination-status {
  flex: 0 0 auto;
  align-self: center;
  min-width: 64px;
  padding: 0 12px;
  font-size: 12px;
  color: #8a9ab0;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.trends-list .pagination.hidden { display: none; }

/* --- Loading state while sections are swapped ----------------------------- */

.table-grid-wrapper { position: relative; }

.table-grid-wrapper.is-loading > .space { opacity: 0.45; pointer-events: none; transition: opacity 120ms ease; }

.table-grid-wrapper.is-loading::after {
  content: '';
  position: absolute;
  top: 60px;
  left: 50%;
  width: 28px;
  height: 28px;
  margin-left: -14px;
  border-radius: 50%;
  border: 3px solid rgba(35, 255, 159, 0.25);
  border-top-color: #23ff9f;
  animation: trends-spin 700ms linear infinite;
  z-index: 2;
}

@keyframes trends-spin { to { transform: rotate(360deg); } }

/* --- Drawer --------------------------------------------------------------- */

.trends-drawer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
}

.trends-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 12, 22, 0.55);
  opacity: 0;
  transition: opacity 200ms ease;
}

.trends-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  background: #1b2738;
  color: #dbe6f5;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.trends-drawer.is-open { pointer-events: auto; }
.trends-drawer.is-open .trends-drawer__backdrop { opacity: 1; }
.trends-drawer.is-open .trends-drawer__panel { transform: translateX(0); }

body.trends-drawer-open { overflow: hidden; }

.trends-drawer__header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  background: #16202f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.trends-drawer__heading { min-width: 0; }

.trends-drawer__kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #23ff9f;
}

.trends-drawer__title {
  margin: 2px 0 2px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

.trends-drawer__meta {
  font-size: 12px;
  color: #8fa3bf;
}

.trends-drawer__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #dbe6f5;
  font-size: 14px;
  cursor: pointer;
}

.trends-drawer__close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.trends-drawer__body { padding: 12px 16px 24px; }

.trends-drawer__loading,
.trends-drawer__empty {
  padding: 22px 12px;
  text-align: center;
  font-size: 12.5px;
  color: #8a9ab0;
}

.trends-drawer__loading i { font-size: 20px; color: #23ff9f; }

/* Odds strip */

.trends-drawer__odds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.trends-drawer__odds > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 10px;
  border-radius: 8px;
  background: #101a29;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.trends-drawer__odds span { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; color: #7f92ab; }
.trends-drawer__odds strong { font-size: 20px; line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; }
.trends-drawer__odds small { font-size: 11px; color: #8fa3bf; line-height: 1.3; }

.trends-drawer__odds-edge.strong strong { color: #23ff9f; text-shadow: 0 0 12px rgba(35, 255, 159, 0.45); }
.trends-drawer__odds-edge.pos strong { color: #7cffc3; }
.trends-drawer__odds-edge.flat strong { color: #aac8da; }
.trends-drawer__odds-edge.neg strong { color: #ff8f7a; }

.trends-drawer__movement.drifting { color: #7cffc3; }
.trends-drawer__movement.shortening { color: #ffb547; }

/* Team tabs */

.trends-drawer__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}

.trends-drawer__tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: #101a29;
  color: #c0d2e8;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}

.trends-drawer__tab small {
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #6f819a;
}

.trends-drawer__tab.is-active {
  border-color: rgba(35, 255, 159, 0.5);
  background: rgba(35, 255, 159, 0.08);
  color: #fff;
}

.trends-drawer__tab.is-active small { color: #23ff9f; }

.trends-drawer__team { display: none; }
.trends-drawer__team.is-active { display: block; }

/* Figure chips */

.trends-drawer__chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(66px, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}

.trends-drawer__chip {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 8px;
  border-radius: 8px;
  background: #101a29;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.trends-drawer__chip-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; color: #7f92ab; }
.trends-drawer__chip-value { font-size: 18px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.15; }
.trends-drawer__chip-sample { font-size: 11px; color: #8fa3bf; }

.trends-drawer__chip.is-strong .trends-drawer__chip-value { color: #23ff9f; }
.trends-drawer__chip.is-weak .trends-drawer__chip-value { color: #ff8f7a; }
.trends-drawer__chip.is-league { border-style: dashed; }
.trends-drawer__chip.is-league .trends-drawer__chip-value { color: #aac8da; }

/* Game lists */

.trends-drawer__section { margin-bottom: 14px; }

.trends-drawer__section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #8fa3bf;
}

.trends-drawer__section-sum {
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: #fff;
}

.trends-drawer__games {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.trends-drawer__game {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 40px 36px;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 12.5px;
  background: #101a29;
}

.trends-drawer__game + .trends-drawer__game { border-top: 1px solid rgba(255, 255, 255, 0.05); }

.trends-drawer__game-date { color: #7f92ab; font-size: 11.5px; white-space: nowrap; }
.trends-drawer__game-opp { color: #dbe6f5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trends-drawer__game-venue { color: #6f819a; font-size: 11px; }
.trends-drawer__game-score { text-align: center; font-variant-numeric: tabular-nums; color: #aab8cc; font-size: 12px; }
.trends-drawer__game-score.w { color: #7cffc3; }
.trends-drawer__game-score.l { color: #ff8f7a; }

.trends-drawer__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 22px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.trends-drawer__mark small { font-size: 10.5px; font-weight: 600; }
.trends-drawer__mark.is-hit { color: #0b1a12; background: #23ff9f; }
.trends-drawer__mark.is-miss { color: #ffd6cf; background: rgba(255, 92, 60, 0.28); }
.trends-drawer__mark.is-na { color: #5d6b7e; }
.trends-drawer__mark.is-value { color: #fff; background: rgba(255, 255, 255, 0.06); font-variant-numeric: tabular-nums; }

/* Actions */

.trends-drawer__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.trends-drawer__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #101a29;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.trends-drawer__action:hover { border-color: rgba(35, 255, 159, 0.5); color: #fff; text-decoration: none; }

.trends-drawer__action.is-pro {
  background: #23ff9f;
  border-color: #23ff9f;
  color: #0b1a12;
}

.trends-drawer__action.is-pro:hover { color: #0b1a12; box-shadow: 0 6px 18px rgba(35, 255, 159, 0.25); }

@media (max-width: 480px) {
  .trends-drawer__chips { grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 5px; }
  .trends-drawer__chip { padding: 7px 6px; }
  .trends-drawer__chip-value { font-size: 16px; }
  .trends-drawer__chip-label { font-size: 9.5px; letter-spacing: 0.2px; }
  .trends-drawer__odds { gap: 6px; }
  .trends-drawer__odds > div { padding: 8px; }
  .trends-drawer__odds strong { font-size: 17px; }
  .trends-drawer__odds small { font-size: 10.5px; }
}

/* --- Sidebar cards on the discovery pages --------------------------------- */
/* The global `article` skin (light-blue gradient, underlined links) fights the
   dark cards these pages are built from, so the sidebars get their own. */

article.trends-side {
  margin: 0 0 12px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  background: #16202e;
  background-image: none;
  color: #c0cee0;
  font-size: 13px;
}
article.trends-side h2 {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7f92ab;
}
article.trends-side p { margin: 0 0 8px; font-size: 12.5px; line-height: 1.5; color: #c0cee0; }
article.trends-side p:last-child { margin-bottom: 0; }
article.trends-side ul { margin: 0; padding: 0; list-style: none; }
article.trends-side li { padding: 6px 0; font-size: 12.5px; line-height: 1.45; color: #c0cee0; }
article.trends-side li + li { border-top: 1px solid rgba(255, 255, 255, 0.05); }
article.trends-side li strong { color: #e2ecf9; font-weight: 600; }
article.trends-side a,
article.trends-side ul li a,
article.trends-side p a { color: #e2ecf9; font-weight: 500; text-decoration: none; }
article.trends-side a:hover,
article.trends-side ul li a:hover,
article.trends-side p a:hover { color: #23ff9f; text-decoration: none; }
/* Link lists read as rows with a quiet chevron. */
article.trends-side ul.trends-side__links li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
article.trends-side ul.trends-side__links li a::after {
  content: '\f054';
  font-family: 'Font Awesome 7 Sharp', 'Font Awesome 7 Free', 'Font Awesome 6 Free', sans-serif;
  font-weight: 900;
  font-size: 9px;
  color: #5d6b7e;
  flex-shrink: 0;
}
article.trends-side .trends-team__results li { padding: 0; }

/* --- Discovery pages (Stacker, Hot Streaks, leagues, team) ---------------- */

/* Segmented tool bar shared by every trends page. Pills on small screens;
   from tablet up it becomes one full-width track with equal segments so it
   reads as the page's primary navigation rather than a row of tags. */
.trends-disc__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 14px;
}
.trends-disc__nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #b9c6d9;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease, color 120ms ease;
}
.trends-disc__nav a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.trends-disc__nav a.active { background: rgba(35, 255, 159, 0.14); color: #23ff9f; }
.trends-disc__nav a i { font-size: 11px; }
@media (min-width: 768px) {
  .trends-disc__nav {
    flex-wrap: nowrap;
    gap: 4px;
    margin: 22px 0 16px;
    padding: 4px;
    border-radius: 12px;
    background: #16202e;
    border: 1px solid rgba(255, 255, 255, 0.05);
  }
  .trends-disc__nav a {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 9px;
    background: transparent;
    font-size: 13.5px;
  }
  .trends-disc__nav a:hover { background: rgba(255, 255, 255, 0.06); }
  .trends-disc__nav a.active { background: rgba(35, 255, 159, 0.14); }
  .trends-disc__nav a i { font-size: 12px; }
}

/* --- Trends page header (title · picker · export) ------------------------- */

.trends-head {
  display: flex;
  flex-direction: column;
  margin: 0 0 14px;
}
.trends-head .trends-disc__nav { margin-bottom: 14px; }
.trends-head__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}
.trends-head__title {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 280px;
  min-width: 0;
}
.trends-head__title h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #fff;
}
@media (min-width: 768px) { .trends-head__title h1 { font-size: 26px; } }
.trends-head__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  max-width: 100%;
}
.trends-head__picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #213246;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.trends-head__picker:hover, .trends-head__picker:focus-visible { background: #283c55; border-color: rgba(35, 255, 159, 0.35); outline: none; }
.trends-head__picker[aria-expanded="true"] { background: rgba(35, 255, 159, 0.12); border-color: rgba(35, 255, 159, 0.4); color: #23ff9f; }
.trends-head__picker > i:first-child { color: #23ff9f; font-size: 13px; }
.trends-head__picker[aria-expanded="true"] > i:first-child { color: inherit; }
.trends-head__chevron { font-size: 10px; opacity: 0.7; transition: transform 160ms ease; }
.trends-head__picker[aria-expanded="true"] .trends-head__chevron { transform: rotate(180deg); }
.trends-head__tools {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.trends-head__tools a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border-radius: 7px;
  color: #b9c6d9;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.trends-head__tools a:hover, .trends-head__tools a:focus-visible { background: rgba(255, 255, 255, 0.08); color: #fff; outline: none; }
.trends-head__tools a i { font-size: 12px; color: #8fa3bf; }
.trends-head__tools a:hover i { color: #23ff9f; }
@media (max-width: 767px) {
  .trends-head__actions { width: 100%; }
  .trends-head__picker { flex: 1 1 auto; justify-content: center; }
}

/* The picker panel: the full trend list, with a find box on top. */
.trends-head__panel {
  margin-top: 10px;
  border-radius: 12px;
  background: #16202e;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.trends-head__panel[hidden] { display: none; }
.trends-head__find {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #7f92ab;
}
.trends-head__find i { font-size: 12px; }
.trends-head__find input {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 14px;
}
.trends-head__find input:focus { outline: none; }
.trends-head__find input::placeholder { color: #5d6b7e; }
.trends-head__find-count { font-size: 12px; font-variant-numeric: tabular-nums; }
.trends-head__find-empty { margin: 0; padding: 14px; font-size: 13px; color: #7f92ab; }
.trends-head__panel .page-menu.hasToggle {
  display: flex;
  margin: 0;
  padding: 10px 12px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.trends-head__panel .page-menu.hasToggle .page-menu__overview { margin-bottom: 8px; }
.trends-head__panel .page-menu__item.is-filtered { display: none; }
.trends-head__panel .page-menu__divider.is-filtered { display: none; }

.trends-disc__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #16202e;
  font-size: 12.5px;
  color: #9fb0c8;
}
.trends-disc__filters label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.trends-disc__filters select {
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: #101a29;
  color: #fff;
  font-size: 12.5px;
}
.trends-disc__count { margin-left: auto; color: #7f92ab; font-variant-numeric: tabular-nums; }

.trends-disc__lead {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #b9c6d9;
}
.trends-disc__lead a { color: #23ff9f; }
.trends-disc__lead strong { color: #fff; }
.trends-disc__foot { margin: 12px 0 0; font-size: 12px; color: #7f92ab; }

/* Stacker cards */
.trends-disc__stack { display: flex; flex-direction: column; gap: 10px; }
.trends-stack {
  border-radius: 10px;
  background: #16202e;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.trends-stack.is-locked { background: #172236; }
.trends-stack__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 10px;
}
.trends-stack__count {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(135deg, #14a86a 0%, #23ff9f 100%);
  color: #0b1a12;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}
.trends-stack__count small { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; margin-top: 2px; }
.trends-stack__title { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.trends-stack__title .oa_card { color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; }
.trends-stack__title .oa_card:hover { color: #23ff9f; }
.trends-stack__title .trends-locked-team { color: #8fa3bf; font-size: 13px; text-decoration: none; }
.trends-stack__title .trends-locked-team i { color: #d7e3f7; margin-right: 3px; }
.trends-stack__comp { font-size: 11.5px; color: #6f819a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trends-stack__meta { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12px; color: #9fb0c8; font-variant-numeric: tabular-nums; }
.trends-stack__avg { color: #7f92ab; font-size: 11.5px; }

.trends-stack__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0 14px 12px;
  list-style: none;
}
.trends-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: #d5deeb;
}
.trends-chip.is-hidden { opacity: 0.7; }
.trends-chip__title { color: #fff; font-weight: 600; text-decoration: none; }
a.trends-chip__title:hover { color: #23ff9f; }
.trends-chip__who { color: #7f92ab; font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; }
.trends-chip__rate { font-weight: 700; padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.06); }
.trends-chip__rate.great { color: #23ff9f; }
.trends-chip__rate.good { color: #9be89b; }
.trends-chip__rate.average { color: #f4d35e; }
.trends-chip__rate.poor, .trends-chip__rate.bad { color: #ff8f7a; }
.trends-chip__odds { color: #aac8da; }
.trends-chip__edge.strong { color: #23ff9f; font-weight: 700; }
.trends-chip__edge.pos { color: #7cffc3; font-weight: 700; }
.trends-chip__edge.flat { color: #aac8da; }
.trends-chip__edge.neg { color: #ff8f7a; }
.trends-chip .trends-streak { margin: 0; }

/* Hot streaks table */
.trends-streaks .ranking-row .main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.trends-streaks .ranking-row .main .oa_card { font-size: 0.9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trends-streaks__trend { margin-left: auto; flex-shrink: 0; font-size: 11.5px; color: #7f92ab; text-decoration: none; white-space: nowrap; }
.trends-streaks__trend small { color: #5d6b7e; }
.trends-streaks__trend:hover { color: #23ff9f; }
.trends-streaks .cell .trends-streak { margin: 0; }
@media (max-width: 600px) {
  .trends-streaks__trend small { display: none; }
  .trends-stack__meta { display: none; }
}

/* --- Discovery links in the trends side menu ------------------------------ */

.page-menu.hasToggle .page-menu__tool {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: auto;
  flex: 1 1 30%;
  margin: 0 0 6px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(35, 255, 159, 0.07);
  color: #9fe9c8;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
}
.page-menu.hasToggle .page-menu__tool i { font-size: 10px; }
.page-menu.hasToggle .page-menu__tool:hover { background: rgba(35, 255, 159, 0.16); color: #23ff9f; }
/* --- League pages --------------------------------------------------------- */

.trends-disc__crumbs { margin: 0 0 10px; font-size: 12px; color: #7f92ab; }
.trends-disc__crumbs a { color: #9fb0c8; text-decoration: none; }
.trends-disc__crumbs a:hover { color: #23ff9f; }
.trends-disc__crumbs span { margin: 0 6px; color: #4d5b6e; }
.trends-disc__crumbs strong { color: #fff; }

.trends-disc__frequent {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(35, 255, 159, 0.06);
  border: 1px solid rgba(35, 255, 159, 0.15);
  font-size: 12.5px;
  color: #b9c6d9;
}
.trends-disc__frequent > span { margin-right: 4px; color: #9fb0c8; }
.trends-disc__frequent a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.trends-disc__frequent a:hover { background: rgba(35, 255, 159, 0.18); color: #23ff9f; }
.trends-disc__frequent a b { padding: 0 6px; border-radius: 999px; background: #23ff9f; color: #0b1a12; font-size: 11px; }

.trends-stack.is-quiet { opacity: 0.75; }
.trends-stack__count.is-zero { background: rgba(255, 255, 255, 0.08); color: #7f92ab; }
.trends-stack__comp a { color: #7f92ab; text-decoration: none; }
.trends-stack__comp a:hover { color: #23ff9f; text-decoration: underline; }
.trends-chip__sample { font-size: 10.5px; color: #7f92ab; font-variant-numeric: tabular-nums; }
.trends-chip__rate.trends-locked-cell { color: #5d6b7e; }

.trends-leagues { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.trends-leagues__country { padding: 12px 14px; border-radius: 10px; background: #16202e; border: 1px solid rgba(255, 255, 255, 0.05); }
.trends-leagues__country h3 { margin: 0 0 8px; font-size: 14px; color: #fff; display: flex; align-items: center; gap: 8px; }
.trends-leagues__country h3 small { padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); color: #9fb0c8; font-size: 11px; font-weight: 600; }
.trends-leagues__country ul { margin: 0; padding: 0; list-style: none; }
.trends-leagues__country li + li { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.trends-leagues__country a { display: flex; flex-direction: column; gap: 1px; padding: 7px 0; text-decoration: none; }
.trends-leagues__name { color: #d5deeb; font-size: 13px; font-weight: 600; }
.trends-leagues__country a:hover .trends-leagues__name { color: #23ff9f; }
.trends-leagues__meta { color: #6f819a; font-size: 11.5px; }

/* --- Team trend profile ---------------------------------------------------- */

.trends-team__hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin: 6px 0 22px;
}
.trends-team__identity { display: flex; align-items: center; gap: 18px; min-width: 0; }
.trends-team__crest {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}
.trends-team__hero h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #fff;
}
.trends-team__hero h1 span { font-weight: 300; color: #9fb0c8; }
.trends-team__sub { margin: 6px 0 0; font-size: 13.5px; color: #9fb0c8; }
.trends-team__sub a { color: #d7e3f7; text-decoration: none; }
.trends-team__sub a:hover { color: #23ff9f; }
.trends-team__sub span { margin: 0 6px; color: #4d5b6e; }

.trends-team__next {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 220px;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(35, 255, 159, 0.12), rgba(35, 255, 159, 0.03));
  border: 1px solid rgba(35, 255, 159, 0.22);
  color: #fff;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.trends-team__next:hover { transform: translateY(-1px); border-color: rgba(35, 255, 159, 0.5); color: #fff; }
.trends-team__next-label { font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: #23ff9f; }
.trends-team__next-opp { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.trends-team__next-when { font-size: 12.5px; color: #9fb0c8; font-variant-numeric: tabular-nums; }
.trends-team__next-when em { font-style: normal; color: #6f819a; }
.trends-team__next-when em::before { content: '·'; margin: 0 6px; }

.trends-team__control {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  margin: 0 0 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}
.trends-team__control a {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: #9fb0c8;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.trends-team__control a small { font-size: 11px; font-weight: 600; color: #6f819a; font-variant-numeric: tabular-nums; }
.trends-team__control a:hover { color: #fff; }
.trends-team__control a.is-active { background: #24314a; color: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); }
.trends-team__control a.is-active small { color: #23ff9f; }
.trends-team__control-note { margin-left: 10px; padding-right: 8px; font-size: 12px; color: #7f92ab; }

.trends-team__h {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin: 26px 0 12px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}
.trends-team__h:first-child { margin-top: 0; }
.trends-team__h small { font-size: 12.5px; font-weight: 500; color: #7f92ab; }

.trends-team__empty {
  padding: 18px 20px;
  border-radius: 14px;
  background: #16202e;
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #d7e3f7;
  font-size: 14px;
}
.trends-team__empty p { margin: 0; }
.trends-team__empty p + p { margin-top: 4px; }
.trends-team__empty .muted { color: #7f92ab; font-size: 12.5px; }

.trends-team__signature {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.trends-team__card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 20px 16px;
  border-radius: 16px;
  background: #16202e;
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #fff;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.trends-team__card:hover { transform: translateY(-2px); border-color: rgba(35, 255, 159, 0.35); background: #18243a; color: #fff; }
.trends-team__card-rate {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.trends-team__card-rate small { font-size: 20px; font-weight: 500; margin-left: 1px; opacity: 0.7; }
.trends-team__card-rate.great { color: #23ff9f; }
.trends-team__card-rate.good { color: #9be89b; }
.trends-team__card-rate.average { color: #f4d35e; }
.trends-team__card-title { margin-top: 6px; font-size: 15px; font-weight: 700; }
.trends-team__card-sub { font-size: 12.5px; color: #7f92ab; }
.trends-team__card-sub b { color: #d7e3f7; font-weight: 600; }
.trends-team__card .trends-team__dots { margin-top: 12px; }

.trends-team__dots { display: inline-flex; gap: 3px; align-items: center; }
.trends-team__dots i {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.trends-team__dots i.hit { background: #23ff9f; }
.trends-team__dots i.miss { background: rgba(255, 255, 255, 0.16); }
.trends-team__dots i.na { background: transparent; border: 1px solid rgba(255, 255, 255, 0.18); }
.trends-team__dots.is-blurred { filter: blur(2px); opacity: 0.6; }

.trends-team__streaks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.trends-team__streaks li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #16202e;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.trends-team__streaks a { color: #fff; font-size: 13.5px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.trends-team__streaks a:hover { color: #23ff9f; }
.trends-team__streaks a b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 9px;
  background: rgba(35, 255, 159, 0.14);
  color: #23ff9f;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.trends-team__list {
  border-radius: 14px;
  background: #16202e;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.trends-team__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px 96px 64px 84px;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  color: #fff;
  text-decoration: none;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.12s ease;
}
.trends-team__row:hover { background: rgba(255, 255, 255, 0.03); color: #fff; }
.trends-team__row--head {
  border-top: 0;
  padding-top: 10px;
  padding-bottom: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #6f819a;
}
.trends-team__row--head:hover { background: transparent; }
.trends-team__row .c-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; font-weight: 600; }
.trends-team__row .c-form { display: flex; justify-content: flex-start; }
.trends-team__row .c-rate { display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; font-variant-numeric: tabular-nums; }
.trends-team__row .c-rate b { font-size: 16px; font-weight: 700; }
.trends-team__row .c-rate b.great { color: #23ff9f; }
.trends-team__row .c-rate b.good { color: #9be89b; }
.trends-team__row .c-rate b.average { color: #f4d35e; }
.trends-team__row .c-rate b.poor, .trends-team__row .c-rate b.bad { color: #ff8f7a; }
.trends-team__row .c-rate small { font-size: 11px; color: #6f819a; }
.trends-team__row .c-last5,
.trends-team__row .c-prev { text-align: right; font-size: 13.5px; color: #b9c6d9; font-variant-numeric: tabular-nums; }
.trends-team__row .c-last5 small, .trends-team__row .c-prev small { color: #4d5b6e; }
.trends-team__row--head .c-rate, .trends-team__row--head .c-last5, .trends-team__row--head .c-prev { justify-content: flex-end; text-align: right; }
.trends-team__row--head .c-title, .trends-team__row--head .c-form, .trends-team__row--head .c-rate,
.trends-team__row--head .c-last5, .trends-team__row--head .c-prev { font-size: 10.5px; font-weight: 700; color: #6f819a; }
.trends-team__row.is-locked { color: #8fa3bf; }
.trends-team__row.is-locked .c-title { color: #b9c6d9; }
.trends-team__lock { color: #5d6b7e; font-size: 12px; }
.trends-team__pill {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(35, 255, 159, 0.14);
  color: #23ff9f;
  white-space: nowrap;
}
.trends-team__mom { font-size: 12px; }
.trends-team__mom.up { color: #23ff9f; }
.trends-team__mom.down { color: #ff8f7a; }

.trends-team__results { list-style: none; margin: 0; padding: 0; }
.trends-team__results li + li { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.trends-team__results a {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  color: #d7e3f7;
  font-size: 12.5px;
  text-decoration: none;
}
.trends-team__results a:hover { color: #23ff9f; }
.trends-team__results .v { font-size: 10px; font-weight: 700; color: #6f819a; }
.trends-team__results .opp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trends-team__results .score { font-variant-numeric: tabular-nums; font-weight: 600; }

@media (max-width: 991px) {
  .trends-team__signature { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trends-team__row { grid-template-columns: minmax(0, 1fr) 100px 84px 56px; }
  .trends-team__row .c-prev { display: none; }
}
@media (max-width: 640px) {
  .trends-team__hero h1 { font-size: 26px; }
  .trends-team__crest { width: 56px; height: 56px; }
  .trends-team__next { width: 100%; }
  .trends-team__signature { grid-template-columns: 1fr; }
  .trends-team__streaks { grid-template-columns: 1fr; }
  .trends-team__card-rate { font-size: 36px; }
  .trends-team__row { grid-template-columns: minmax(0, 1fr) 84px 60px; padding: 11px 14px; }
  .trends-team__row .c-form { display: none; }
  .trends-team__row .c-title { font-size: 13px; }
  .trends-team__control a { padding: 7px 12px; font-size: 12.5px; }
  .trends-team__control-note { display: none; }
}

.trends-drawer__profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(35, 255, 159, 0.07);
  border: 1px solid rgba(35, 255, 159, 0.22);
  color: #e2ecf9;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease;
}
.trends-drawer__profile:hover,
.trends-drawer__profile:focus { background: rgba(35, 255, 159, 0.14); border-color: rgba(35, 255, 159, 0.45); color: #fff; text-decoration: none; }
.trends-drawer__profile > i:first-child { font-size: 16px; color: #23ff9f; }
.trends-drawer__profile > i:last-child { margin-left: auto; font-size: 11px; color: #23ff9f; }
.trends-drawer__profile span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.trends-drawer__profile strong { font-size: 13px; font-weight: 700; }
.trends-drawer__profile small { font-size: 11.5px; color: #8a9ab0; line-height: 1.35; }
.trends-streaks__profile { flex-shrink: 0; margin-left: 8px; color: #5d6b7e; text-decoration: none; font-size: 12px; }
.trends-streaks__profile:hover { color: #23ff9f; }
