/* match/story.css
   The three sidebar cards written by story.js.
   One prefix for the whole file: mt-st-
     mt-st-su-   the sidebar summary at the current index
     mt-st-se-   the series card
     mt-st-hg-   the top performer card
     mt-st-lk-   the rdy.gg links card
   Sidebar cards live in a 320px rail, so nothing here is wider than 288px of
   content.

   NO NARRATIVE RULE, 2026-09-11: the article the mt-st- prefix used to style is
   gone with the m-story mount, and every .mt-st-title, .mt-st-deck,
   .mt-st-byline, .mt-st-pull, .mt-st-rail, .mt-st-body, .mt-st-section,
   .mt-st-p, .mt-st-note, .mt-st-figure and .mt-st-foot rule went with it. */

/* mount motion, no fill mode: if the animation never runs (background tab,
   print, reduced motion) the card is still at its visible base state. */
@keyframes mt-st-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.mt-st-su.is-in, .mt-st-se.is-in, .mt-st-hg.is-in, .mt-st-lk.is-in {
  animation: mt-st-in .3s ease;
}

/* ================= sidebar: the summary ================= */

.mt-st-su-body { display: flex; flex-direction: column; gap: 8px; }
.mt-st-su-clockrow { display: flex; align-items: baseline; gap: 8px; }
.mt-st-su-clock {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
}
.mt-st-su-phase { color: var(--text-tertiary); }
.mt-st-su-state { white-space: nowrap; }

.mt-st-su-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  padding: 4px 0;
  border-top: 1px solid var(--border-hair);
}
.mt-st-su-label { font-size: 12px; color: var(--text-tertiary); }
.mt-st-su-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 0;
  overflow-wrap: anywhere;
}
.mt-st-su-gold.is-radiant { color: var(--side-radiant-text); }
.mt-st-su-gold.is-dire { color: var(--side-dire-text); }
.mt-st-su-kills .kills-pair { font-size: 14px; font-weight: 700; }
.mt-st-su-moment { font-weight: 400; color: var(--text-secondary); font-size: 12px; line-height: 1.35; display: block; }

.mt-st-su-jumps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.mt-st-su-jump {
  display: inline-flex; flex-direction: column; align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface-chip);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.mt-st-su-jump-word { font-size: 11.5px; font-weight: 700; line-height: 1.1; }
.mt-st-su-jump-clock { font-size: 10px; line-height: 1.15; color: var(--match-label-quiet); }
/* jump-buttons-no-state: which one am I standing on */
.mt-st-su-jump.is-on { color: var(--text-primary); border-color: var(--color-rdy-white-25); background: var(--color-rdy-white-10); }
.mt-st-su-jump.is-on {
  color: var(--color-rdy-dark-sky);
  background: var(--match-at);
  border-color: var(--match-at);
}
.mt-st-su-jump.is-on .mt-st-su-jump-clock { color: var(--color-rdy-dark-sky); }
.mt-st-su-jump:hover { background: var(--surface-card-hover); color: var(--text-primary); }
.mt-st-su-jump:focus-visible { outline: 2px solid var(--color-rdy-turquoise); outline-offset: 2px; }

/* ================= sidebar: the series ================= */

.mt-st-se-body { display: flex; flex-direction: column; gap: 4px; }
.mt-st-se-row {
  display: block;
  padding: 6px 8px;
  border: 1px solid var(--border-hair);
  border-left-width: 3px;
  border-radius: var(--radius-md);
  background: var(--color-rdy-white-5);
  text-decoration: none;
  color: inherit;
  transition: background .14s ease;
}
a.mt-st-se-row:hover { background: var(--surface-card-hover); }
.mt-st-se-row.is-radiant { border-left-color: var(--side-radiant); }
.mt-st-se-row.is-dire { border-left-color: var(--side-dire); }
.mt-st-se-row.is-here { background: var(--color-rdy-white-10); box-shadow: inset 0 0 0 1px var(--color-rdy-white-15); }
.mt-st-se-inner { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mt-st-se-no {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-tertiary);
  flex: 0 0 auto;
  width: 20px;
}
.mt-st-se-body-col { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mt-st-se-score .kills-pair { font-size: 13px; font-weight: 700; }
.mt-st-se-sub { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-st-se-here { margin-left: auto; flex: 0 0 auto; }
.mt-st-se-foot { padding-top: 10px; }

/* ================= sidebar: top performer ================= */

.mt-st-hg-body { display: flex; flex-direction: column; gap: 10px; }
.mt-st-hg-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mt-st-hg-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mt-st-hg-handle { font-size: 16px; font-weight: 800; color: var(--text-primary); }
.mt-st-hg-real { font-size: 11px; }
.mt-st-hg-hero { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.mt-st-hg-hero .hero-portrait { width: 32px; height: 18px; }

.mt-st-hg-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.mt-st-hg-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  min-width: 0;
}
.mt-st-hg-stat-value { font-size: 14px; font-weight: 800; color: var(--text-primary); white-space: nowrap; }
.mt-st-hg-stat-label { font-size: 11px; }

/* the full ten, so the formula in the subtitle is checkable on the card */
.mt-st-hg-rank-wrap { display: flex; flex-direction: column; gap: 4px; }
.mt-st-hg-rank-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mt-st-hg-rank-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: background .14s ease;
}
.mt-st-hg-rank-row.is-radiant { border-left-color: var(--side-radiant); }
.mt-st-hg-rank-row.is-dire { border-left-color: var(--side-dire); }
.mt-st-hg-rank-row.is-top { background: var(--color-rdy-white-10); }
.mt-st-hg-rank-row.is-hl { background: var(--surface-card-hover); }
.mt-st-hg-rank-no { flex: 0 0 12px; font-size: 11px; text-align: right; }
.mt-st-hg-rank-row .hero-portrait { width: 26px; height: 15px; flex: 0 0 auto; }
.mt-st-hg-rank-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mt-st-hg-rank-row.is-top .mt-st-hg-rank-name { color: var(--text-primary); font-weight: 700; }
.mt-st-hg-rank-pts { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--text-primary); }
.mt-st-hg-why { margin: 0; color: var(--text-secondary); }

/* ================= sidebar: links ================= */

.mt-st-lk-body { display: flex; flex-direction: column; gap: 6px; }
.mt-st-lk-teams { display: flex; flex-direction: column; gap: 4px; }
.mt-st-lk-team {
  display: block;
  padding: 5px 8px;
  border-radius: var(--radius-md);
  background: var(--color-rdy-white-5);
  color: inherit;
  text-decoration: none;
  transition: background .14s ease;
}
a.mt-st-lk-team:hover { background: var(--surface-card-hover); }
.mt-st-lk-team.is-flat { opacity: .8; }
.mt-st-lk-team-inner { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mt-st-lk-team-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
}
.mt-st-lk-none { display: block; padding: 0 8px 2px; }

.mt-st-lk-side { display: flex; flex-direction: column; gap: 3px; }
.mt-st-lk-side-label { font-size: 11px; }
.mt-st-lk-players { display: flex; flex-wrap: wrap; gap: 4px; }
.mt-st-lk-player {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px 2px 2px;
  border: 1px solid var(--border-hair);
  border-radius: var(--radius-pill);
  background: var(--surface-chip);
  color: var(--text-secondary);
  text-decoration: none;
  max-width: 100%;
  transition: background .14s ease, color .14s ease;
}
a.mt-st-lk-player:hover { background: var(--surface-card-hover); color: var(--text-primary); }
.mt-st-lk-player .hero-portrait { width: 26px; height: 15px; }
.mt-st-lk-player-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mt-st-lk-more { display: flex; flex-direction: column; gap: 2px; }
.mt-st-lk-line {
  display: block;
  padding: 4px 0;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-hair);
}
a.mt-st-lk-line:hover { color: var(--color-rdy-fresh-green); }
.mt-st-lk-line:last-child { border-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  .mt-st-su.is-in, .mt-st-se.is-in, .mt-st-hg.is-in, .mt-st-lk.is-in { animation: none; }
  .mt-st-su, .mt-st-se, .mt-st-hg, .mt-st-lk,
  .mt-st-se-row, .mt-st-hg-rank-row, .mt-st-lk-team, .mt-st-lk-player, .mt-st-su-jump {
    transition: none;
    opacity: 1;
    transform: none;
  }
}
