/*
 * Forge MMA public pages — layered on top of multisport.css (shared ms-*
 * tokens/components). Everything here is `mm-*`, scoped under `.mm-root`.
 */

.mm-root { --mm-red: var(--ms-accent); --mm-blue: var(--ms-away); }
.mm-h1 { font-size: 22px; font-weight: 800; margin: 0 0 14px; line-height: 1.25; }

/* avatars (licensed photo or initials) */
.mm-root .mm-av { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex: none; display: inline-grid; place-items: center; background: var(--ms-surface-2); border: 1px solid var(--ms-line); }
.mm-root .mm-av img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.mm-root .mm-av.mm-ini { background: linear-gradient(135deg, #3a4658, #1e293b); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: -.02em; }
.mm-root .mm-av.mm-md { width: 52px; height: 52px; font-size: 15px; }
.mm-root .mm-av.mm-lg { width: 72px; height: 72px; font-size: 20px; }
.mm-root .mm-av.mm-xl { width: 96px; height: 96px; font-size: 26px; }

/* bout row */
.mm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--ms-line); }
.mm-row:last-child { border-bottom: 0; }
a.mm-row:hover { background: rgba(255, 255, 255, .03); }
.mm-row.mm-dead { opacity: .55; }
.mm-side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mm-side.mm-right { justify-content: flex-end; text-align: right; }
.mm-side .mm-nm { display: flex; flex-direction: column; min-width: 0; }
.mm-side .mm-nm b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-side .mm-nm small { color: var(--ms-muted); font-size: 12px; }
.mm-side.mm-lose b { color: var(--ms-muted); font-weight: 600; }
.mm-mid { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 120px; text-align: center; }
.mm-mid small { color: var(--ms-muted); font-size: 11px; }
.mm-mid .mm-wc b { color: var(--ms-accent-2); font-weight: 700; }
.mm-vs { color: var(--ms-muted); font-weight: 800; text-transform: uppercase; font-size: 12px; }
.mm-res { font-weight: 800; color: var(--ms-text); font-size: 13px; }
.mm-odds { display: inline-flex; gap: 4px; }
.mm-odds span { min-width: 46px; text-align: center; background: var(--ms-surface-2); border: 1px solid var(--ms-line); border-radius: 5px; padding: 4px 6px; font-weight: 700; font-size: 12px; font-variant-numeric: tabular-nums; }
.mm-odds-lg span { font-size: 16px; min-width: 60px; padding: 6px 8px; }
@media (max-width: 640px) {
  .mm-row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; padding: 10px; }
  .mm-root .mm-row .mm-av { display: none; }
  .mm-mid { min-width: 84px; }
  .mm-side .mm-nm b { font-size: 13px; white-space: normal; }
}

/* event rows */
.mm-ev { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--ms-line); }
.mm-ev:last-child { border-bottom: 0; }
a.mm-ev:hover { background: rgba(255, 255, 255, .03); }
.mm-ev-date { text-align: center; background: var(--ms-surface-2); border: 1px solid var(--ms-line); border-radius: 8px; padding: 4px 0; color: var(--ms-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.mm-ev-date b { display: block; color: var(--ms-text); font-size: 18px; line-height: 1.1; }
.mm-ev-main { display: flex; flex-direction: column; min-width: 0; }
.mm-ev-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-ev-main small { color: var(--ms-muted); font-size: 12px; }
.mm-ev-main .mm-ev-bout { color: var(--ms-soft); }
.mm-ev-n { text-align: center; font-weight: 800; font-size: 16px; }
.mm-ev-n small { display: block; color: var(--ms-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }

/* hub featured card */
.mm-feature-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px; background: radial-gradient(120% 160% at 0% 0%, var(--ms-hero-glow) 0%, var(--ms-surface) 60%); border-bottom: 1px solid var(--ms-line); }
.mm-feature-head > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.mm-feature-head b { font-size: 20px; line-height: 1.2; }
.mm-feature-head small { color: var(--ms-muted); }
.mm-feature-head .ms-count { margin: 0; }

/* hero (card + bout) */
.mm-hero .mm-title { font-size: 22px; font-weight: 800; margin: 0 0 14px; text-align: center; color: var(--ms-text); }
.mm-main { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; padding-bottom: 16px; }
.mm-corner { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.mm-corner b { font-size: 17px; line-height: 1.2; }
.mm-corner small { color: var(--ms-muted); font-size: 12px; }
a.mm-corner:hover b { color: var(--ms-accent-2); }
.mm-corner.mm-lose { opacity: .6; }
.mm-corner.mm-won .mm-av { border: 2px solid var(--ms-win); }
.mm-center { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 190px; text-align: center; }
.mm-center small { color: var(--ms-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.mm-center .mm-res { font-size: 16px; }
.mm-vs-lg { font: 800 30px/1 var(--ms-font); color: var(--ms-muted); text-transform: uppercase; }
.mm-count { justify-content: center; padding-bottom: 14px; }
.mm-title-badge { color: var(--ms-accent-2); }
.mm-prob { width: 100%; margin-top: 6px; }
.mm-prob-bar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--ms-surface-2); }
.mm-prob-bar span:first-child { background: var(--mm-red); }
.mm-prob-bar span:last-child { background: var(--mm-blue); margin-left: auto; }
.mm-prob-l { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mm-prob-l small { font-size: 10px; }
.mm-credit { color: var(--ms-muted); font-size: 11px; text-align: center; margin: 0 0 10px; }
.mm-credit a { text-decoration: underline; }
.mm-credit-l { text-align: left; margin: 6px 0 0; }
@media (max-width: 640px) {
  .mm-main { grid-template-columns: 1fr 1fr; }
  .mm-center { grid-column: 1 / -1; order: 3; min-width: 0; }
  .mm-root .mm-av.mm-xl { width: 72px; height: 72px; }
  .mm-corner b { font-size: 15px; }
}

/* tale of the tape */
.mm-tape { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.mm-tape th, .mm-tape td { padding: 8px 12px; border: 0; border-bottom: 1px solid var(--ms-line); background: transparent; color: var(--ms-text); }
.mm-tape thead th { color: var(--ms-text); font-weight: 800; font-size: 13px; }
.mm-tape thead th:first-child { color: var(--mm-red); text-align: left; }
.mm-tape thead th:last-child { color: var(--mm-blue); text-align: right; }
.mm-tape tbody th { color: var(--ms-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; text-align: center; width: 44%; }
.mm-tape td:first-child { text-align: left; }
.mm-tape td:last-child { text-align: right; }
.mm-tape td.mm-lead { color: var(--ms-accent-2); font-weight: 800; }
.mm-common td { white-space: nowrap; }

/* form / history */
.mm-form { display: inline-flex; gap: 3px; margin-top: 4px; }
.mm-form i, .mm-o { width: 20px; height: 20px; border-radius: 4px; display: inline-grid; place-items: center; font: 700 10px var(--ms-font); font-style: normal; background: var(--ms-surface-2); color: var(--ms-muted); flex: none; }
.mm-form .mm-w, .mm-o.mm-w { background: var(--ms-win); color: #04210f; }
.mm-form .mm-l, .mm-o.mm-l { background: var(--ms-loss); color: #2a0606; }
.mm-form .mm-d, .mm-o.mm-d, .mm-o.mm-nc, .mm-form .mm-nc { background: var(--ms-muted); color: #111; }
.mm-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.mm-two > div { padding: 6px 0; }
.mm-two > div + div { border-left: 1px solid var(--ms-line); }
@media (max-width: 640px) { .mm-two { grid-template-columns: 1fr; } .mm-two > div + div { border-left: 0; border-top: 1px solid var(--ms-line); } }
.mm-sub-h { font-size: 12px !important; font-weight: 800 !important; text-transform: uppercase; letter-spacing: .04em; color: var(--ms-muted) !important; padding: 8px 14px 4px; }
.mm-pad { padding-top: 14px; }
.mm-hist { display: flex; gap: 10px; align-items: center; padding: 7px 14px; }
.mm-hist span { display: flex; flex-direction: column; min-width: 0; }
.mm-hist small { color: var(--ms-muted); font-size: 12px; }
.mm-hist-tbl td { white-space: nowrap; }
.mm-hist-tbl td a { text-decoration: underline; text-decoration-color: var(--ms-line); }
.mm-hist-tbl .mm-evcell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }

/* fighter */
.mm-fhead .mm-nick { color: var(--ms-accent-2); font-weight: 700; margin-top: 2px; }
.mm-kpis { display: grid; grid-template-columns: repeat(4, 1fr); }
.mm-kpis > div { padding: 14px; border-right: 1px solid var(--ms-line); border-bottom: 1px solid var(--ms-line); text-align: center; }
.mm-kpis > div:nth-child(4n) { border-right: 0; }
.mm-kpis b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.mm-kpis small { color: var(--ms-muted); font-size: 11px; font-weight: 600; }
@media (max-width: 640px) { .mm-kpis { grid-template-columns: repeat(2, 1fr); } .mm-kpis > div:nth-child(2n) { border-right: 0; } }

/* rankings */
.mm-divs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.mm-divs .ms-card { margin: 0; }
.mm-champ { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--ms-line); background: color-mix(in srgb, var(--ms-accent-2) 8%, transparent); }
.mm-champ span { display: flex; flex-direction: column; }
.mm-champ small { color: var(--ms-muted); font-size: 11px; }
.mm-champ small:first-child { color: var(--ms-accent-2); font-weight: 800; text-transform: uppercase; }
.mm-rank { list-style: none; margin: 0; padding: 4px 0; }
.mm-rank li { display: flex; align-items: center; gap: 10px; padding: 6px 14px; }
.mm-rank li a:hover { color: var(--ms-accent-2); }
.mm-rank .mm-rk { width: 24px; height: 22px; border-radius: 5px; display: inline-grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--ms-surface-2); flex: none; }
.mm-rank .mm-rec { margin-left: auto; color: var(--ms-muted); font-size: 12px; }

/* prediction */
.mm-pred-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; padding: 14px; align-items: center; border-bottom: 1px solid var(--ms-line); }
.mm-pred-pick { display: flex; flex-direction: column; gap: 2px; }
.mm-pred-pick small, .mm-pred-prob small, .mm-pred-grid small { color: var(--ms-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.mm-pred-pick b { font-size: 20px; line-height: 1.2; }
.mm-pred-pick > span { color: var(--ms-accent-2); font-weight: 700; }
.mm-pred-pick .mm-out { align-self: flex-start; margin-top: 6px; }
.mm-out-won { background: color-mix(in srgb, var(--ms-win) 15%, transparent) !important; color: var(--ms-win) !important; }
.mm-out-lost { background: color-mix(in srgb, var(--ms-loss) 15%, transparent) !important; color: var(--ms-loss) !important; }
.mm-pred-prob .mm-prob-bar { height: 10px; margin-top: 6px; }
.mm-pred-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 14px; }
.mm-meter { display: grid; grid-template-columns: 110px 1fr 40px; gap: 8px; align-items: center; margin-top: 8px; font-size: 13px; }
.mm-meter i { height: 8px; border-radius: 99px; background: var(--ms-surface-2); overflow: hidden; display: block; }
.mm-meter i b { display: block; height: 100%; background: var(--ms-accent-2); border-radius: 99px; }
.mm-meter.mm-dist i b { background: var(--ms-muted); }
.mm-meter em { font-style: normal; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.mm-factors { list-style: none; margin: 8px 0 0; padding: 0; }
.mm-factors li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--ms-line); font-size: 13px; }
.mm-factors li span { font-weight: 700; }
.mm-factors li.mm-f1 span { color: var(--mm-red); }
.mm-factors li.mm-f2 span { color: var(--mm-blue); }
.mm-value { margin: 0 14px 10px; padding: 10px 12px; border-radius: 8px; background: color-mix(in srgb, var(--ms-accent-2) 10%, transparent); color: var(--ms-text); font-size: 13px; }
.mm-conf { text-transform: none; }
.mm-conf-high { color: var(--ms-win); }
.mm-conf-medium { color: var(--ms-accent-2); }
.mm-pk { color: var(--ms-accent-2) !important; font-weight: 700; }
.mm-pk-won { color: var(--ms-win) !important; }
.mm-pk-lost { color: var(--ms-loss) !important; text-decoration: line-through; }
.mm-record { display: flex; align-items: baseline; gap: 10px; padding: 14px; }
.mm-record b { font-size: 28px; font-variant-numeric: tabular-nums; }
.mm-record span { color: var(--ms-muted); font-size: 13px; }
@media (max-width: 640px) { .mm-pred-top, .mm-pred-grid { grid-template-columns: 1fr; } }
