/* KentuckyMat dense wrestler page (km_dense.js; mockup behind ?design=dense). KentuckyMat colors, MatSavant density. */
.kmd-on { --kmd-border: #E6E6E6; --kmd-soft: #F4F5F7; --kmd-hi: #F3E7CC; --kmd-lo: #DCE6F5; --kmd-win: #2E7D32; --kmd-loss: #C62828; }

/* header card: FIXED height (Mike 2026-11-20) -- square logo, one-line name / info / tabs; long text is cut with "…" */
.kmd-on { --kmd-head-h: 116px; }
.kmd-header { margin: 8px 0 14px; padding: 0; border: 0; }
.kmd-head { display: flex; align-items: stretch; height: var(--kmd-head-h); background: var(--bg-card); border: 1px solid var(--kmd-border);
  border-radius: 12px; overflow: hidden; }
.kmd-logo { flex: 0 0 var(--kmd-head-h); width: var(--kmd-head-h); height: var(--kmd-head-h); display: flex; align-items: center;
  justify-content: center; background: #1F2A44; color: #fff; }
.kmd-logo.has-img { background: #fff; border-right: 1px solid var(--kmd-border); }
.kmd-logo img { width: 80%; height: 80%; object-fit: contain; }
.kmd-logo-initials { font-size: 1.75rem; font-weight: 800; letter-spacing: 1px; }
.kmd-head-mid { flex: 1 1 auto; min-width: 0; padding: 10px 16px 8px; display: flex; flex-direction: column; justify-content: space-between; }
.kmd-name-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kmd-name-row h1 { margin: 0; font-size: 1.625rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.kmd-name-long h1 { font-size: 1.375rem; }
.kmd-name-xlong h1 { font-size: 1.125rem; }
.kmd-pill-slot { flex: 0 0 auto; }
.kmd-pill-slot:empty { display: none; }
.kmd-info { color: var(--text-secondary); font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kmd-info > * { margin-right: 5px; }
.kmd-info strong, .kmd-team { color: var(--text-main); font-weight: 600; }
.kmd-team { text-decoration: none; }
.kmd-team:hover { text-decoration: underline; }
.kmd-dot { color: var(--text-muted); }
.kmd-tabs { display: flex; flex-wrap: nowrap; gap: 2px; overflow-x: auto; scrollbar-width: none; align-self: flex-start; max-width: 100%;
  padding: 2px; background: var(--kmd-soft); border: 1px solid var(--kmd-border); border-radius: 8px; }
.kmd-tabs::-webkit-scrollbar { display: none; }
.kmd-tab { flex: 0 0 auto; border: 0; background: transparent; padding: 3px 10px; border-radius: 6px; font: inherit; font-size: 0.8125rem;
  color: var(--text-secondary); cursor: pointer; }
.kmd-tab:hover { background: #fff; }
.kmd-tab.active { background: #111; color: #fff; font-weight: 600; }
.kmd-head-right { flex: 0 0 auto; display: flex; align-items: center; gap: 20px; padding: 0 18px; }
.kmd-stat { text-align: center; }
.kmd-stat-label { font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); font-weight: 600; }
.kmd-stat-value { font-size: 1.625rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kmd-stat-sub { font-size: 0.6875rem; color: var(--text-secondary); white-space: nowrap; }
.kmd-compare { display: inline-block; padding: 9px 14px; background: var(--accent); color: #fff !important; border-radius: 8px;
  font-weight: 600; font-size: 0.9375rem; text-decoration: none; white-space: nowrap; }
.kmd-compare:hover { filter: brightness(1.08); }
.kmd-table.kmd-stats { width: auto; min-width: 360px; margin-top: 10px; font-size: 0.875rem; }
.kmd-table.kmd-stats td, .kmd-table.kmd-stats th { padding: 2px 10px; }
.kmd-table.kmd-stats td:first-child { color: var(--text-secondary); padding-left: 8px; }
.kmd-stats .kmd-total td:first-child { color: var(--text-main); }
.kmd-stats th.num, .kmd-stats td.num { min-width: 78px; }
.kmd-muted { color: var(--text-secondary); }
.kmd-short { display: none; }
/* a girl's boys events: hidden until the "Boys events" row is clicked */
.kmd-body:not(.kmd-boys-open) .kmd-boys { display: none; }
.kmd-boys-toggle { cursor: pointer; }
.kmd-boys-toggle td { border-top: 14px solid var(--bg-card); background: var(--kmd-soft); color: var(--text-secondary); font-weight: 600;
  font-size: 0.8125rem; }
.kmd-boys-toggle:hover td { background: #E9ECF2; }
.kmd-boys-act { margin-left: 10px; color: var(--accent); white-space: nowrap; }
/* space between seasons in the match list */
.kmd-matches .kmd-divider td { border-top: 14px solid var(--bg-card); }
.kmd-matches tbody tr:first-child td { border-top: 0; }
.kmd-yearcard { padding: 8px 14px 10px; }
.kmd-yearcard .kmd-table.kmd-sbs td { padding: 3px 8px; }
.kmd-yearcard .kmd-table.kmd-sbs th { padding: 2px 8px 4px; }
.kmd-season .kmd-card { margin-bottom: 10px; }
.kmd-season .kmd-table.kmd-matches td { padding: 3px 8px; }
.kmd-nowrap { white-space: nowrap; }
.kmd-ev { overflow-wrap: anywhere; }
.kmd-tag { margin-left: 6px; font-size: 0.6875rem; font-weight: 700; color: var(--accent); background: var(--accent-light);
  border-radius: 4px; padding: 0 4px; vertical-align: 1px; }

/* cards + tables */
.kmd-body { padding: 0; border: 0; background: transparent; }
.kmd-card { background: var(--bg-card); border: 1px solid var(--kmd-border); border-radius: 12px; padding: 14px 18px; margin-bottom: 14px; }
.kmd-h2 { font-size: 1.25rem; margin: 0 0 8px; text-transform: none; letter-spacing: 0; }
.kmd-scroll { overflow-x: auto; }
.kmd-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.kmd-table th { text-align: left; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary);
  font-weight: 600; padding: 6px 8px; border-bottom: 2px solid var(--kmd-border); white-space: nowrap; }
.kmd-table td { padding: 5px 8px; border-bottom: 1px solid var(--kmd-border); vertical-align: top; }
.kmd-table .num { text-align: right; }
.kmd-sbs td { white-space: nowrap; }
.kmd-click { cursor: pointer; }
.kmd-click:hover td { background: var(--kmd-soft); }
.kmd-hi { background: var(--kmd-hi); border-radius: 4px; }
.kmd-lo { background: var(--kmd-lo); border-radius: 4px; }
.kmd-place { font-weight: 700; }
.kmd-total td { font-weight: 700; background: #EEF1F6; }
.kmd-divider td { background: var(--kmd-soft); color: var(--text-secondary); font-weight: 700; font-size: 0.8125rem; letter-spacing: 0.04em; }

/* match list: fixed Date / Result columns, the opponent gets the rest */
.kmd-matches { table-layout: fixed; }
.kmd-matches th.kmd-date { width: 76px; }
.kmd-matches th.kmd-res { width: 76px; }
.kmd-matches td { vertical-align: middle; }
.kmd-date { white-space: nowrap; }
.kmd-wt { font-weight: 700; font-size: 0.8125rem; }
.kmd-opp-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kmd-opp-rank { color: var(--text-secondary); }
.kmd-opp-name { font-weight: 600; text-decoration: none; }
.kmd-opp-team { color: var(--text-secondary); font-size: 0.875rem; }
.kmd-cmp { display: inline-block; padding: 0 6px; border: 1px solid #C9D6F2; border-radius: 6px; font-size: 0.8125rem; line-height: 1.5;
  text-decoration: none; color: var(--accent); background: #F3F6FD; }
.kmd-res { text-align: center; white-space: nowrap; }
.kmd-badge { display: inline-block; min-width: 34px; padding: 1px 6px; border-radius: 5px; color: #fff; font-weight: 700; font-size: 0.8125rem; }
.kmd-badge--w { background: var(--kmd-win); }
.kmd-badge--l { background: var(--kmd-loss); }
.kmd-badge--x { background: #9E9E9E; }
.kmd-res-detail { font-size: 0.8125rem; margin-top: 1px; }

/* a year tab reuses the old season panel; its own mobile season tabs aren't used here */
.kmd-season .season-tabs--mobile { display: none !important; }

@media (max-width: 760px) {
  /* phone (like MatSavant): inset square logo beside name + details (both WRAP, nothing cut off); tabs, then the
     numbers + Compare, full width underneath. Height follows the content here. */
  .kmd-head { display: grid; height: auto; grid-template-columns: 84px 1fr; column-gap: 14px; row-gap: 4px; padding: 14px;
    grid-template-areas: "logo name" "logo info" "tabs tabs" "stats stats"; align-items: start; }
  .kmd-head-mid { display: contents; }
  .kmd-logo { grid-area: logo; width: 84px; height: 84px; border-radius: 10px; flex: none; }
  .kmd-logo.has-img { border: 1px solid var(--kmd-border); }
  .kmd-logo-initials { font-size: 1.5rem; }
  .kmd-name-row { grid-area: name; flex-wrap: wrap; row-gap: 2px; }
  .kmd-pill-slot .rank-pill-season { display: none; }   /* just "#5", like MatSavant's "#1" */
  .kmd-name-row h1, .kmd-name-long h1, .kmd-name-xlong h1 { font-size: 1.375rem; white-space: normal; overflow: visible; }
  .kmd-info { grid-area: info; font-size: 0.875rem; white-space: normal; overflow: visible; line-height: 1.45; }
  .kmd-tabs { grid-area: tabs; margin-top: 10px; }
  .kmd-tab { padding: 4px 10px; font-size: 0.875rem; }
  .kmd-head-right { grid-area: stats; height: auto; justify-content: space-between; gap: 10px; padding: 12px 0 0;
    border-top: 0; flex: none; }
  .kmd-stat { text-align: left; }
  .kmd-stat-value { font-size: 1.25rem; }
  .kmd-head-right { gap: 6px; }
  .kmd-stat-label, .kmd-stat-sub { font-size: 0.6875rem; }
  .kmd-compare { padding: 9px 14px; font-size: 0.9375rem; }
  .kmd-card { padding: 10px 10px; }
  /* phone: Season by Season drops Team, Win %, Pins, Bonus (in the header) so Region + State fit without scrolling */
  .kmd-col-team, .kmd-col-x { display: none; }
  .kmd-table.kmd-sbs { font-size: 0.8125rem; }
  .kmd-table.kmd-sbs td, .kmd-table.kmd-sbs th { padding: 4px 4px; letter-spacing: 0; }
  .kmd-long { display: none; }
  .kmd-short { display: inline; }
  .kmd-table { font-size: 0.875rem; }
  .kmd-table td, .kmd-table th { padding: 5px 5px; }
  .kmd-matches th.kmd-date { width: 54px; }
  .kmd-matches th.kmd-res { width: 58px; }
  .kmd-table.kmd-stats { min-width: 0; width: 100%; font-size: 0.8125rem; }
  .kmd-table.kmd-stats td, .kmd-table.kmd-stats th { padding: 2px 6px; }
  .kmd-stats th.num, .kmd-stats td.num { min-width: 0; }
}


/* How He Wins card + greyed forfeits (round 2, 2026-11-27; docs/kentuckymat_ux_recommendations.md) */
.kmd-hhw-sub { font-size: 0.8rem; color: var(--text-muted, #888); margin: -0.3rem 0 0.8rem; }
.kmd-hhw-body { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem 2.5rem; align-items: center; }
.kmd-hhw-left { display: flex; align-items: center; gap: 1.25rem; }
.kmd-donut { width: 124px; height: 124px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.kmd-donut-hole { width: 84px; height: 84px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.kmd-donut-big { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kmd-donut-small { font-size: 0.68rem; color: var(--text-muted, #888); }
.kmd-card table.kmd-legend { border-collapse: collapse; font-size: 0.88rem; width: auto; }
.kmd-legend td { padding: 2px 0; border: 0; }
.kmd-legend td + td { padding-left: 0.5rem; }
.kmd-legend .kmd-legend-pct { font-weight: 700; padding-left: 0.9rem; font-variant-numeric: tabular-nums; }
.kmd-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; }
.kmd-hhw-opp { max-width: 460px; justify-self: end; width: 100%; }
.kmd-matches tr.kmd-ff td { opacity: 0.5; }
@media (max-width: 760px) {
  .kmd-hhw-body { grid-template-columns: 1fr; }
  .kmd-hhw-opp { justify-self: stretch; max-width: none; }
}

/* Match list names: dark and bold like the rankings (round 2, 2026-11-27); out-of-state names are plain text */
.kmd-matches .kmd-opp-name { color: var(--text-main, #111); font-weight: 600; text-decoration: none; }
.kmd-matches a.kmd-opp-name:hover { color: var(--accent-primary, #1F4ED8); text-decoration: underline; }
.kmd-matches span.kmd-opp-name { font-weight: 500; color: var(--text-secondary, #555); }
.kmd-matches .kmd-opp-team { color: var(--text-muted, #888); font-size: 0.85em; }
