.league-redesign .site-main:has(.coach-profile) { padding-block: clamp(26px, 3.8vw, 55px) 60px; }
.coach-profile {
  --line: hsl(var(--border));
  --secondary: hsl(var(--muted));
  --ink: hsl(var(--foreground));
  --accent: hsl(var(--primary));
  --coach-surface: hsl(var(--surface));
  --game: #246453;
  --game-surface: #e8f3ed;
  --accent-surface: var(--home-accent-surface);
}
.coach-profile :is(h1,h2,p,dl,dd) { margin: 0; }
.coach-profile .site-crumb { margin: 0; }
.coach-profile .site-crumb [aria-current] { color: var(--ink); font-weight: 700; }
.coach-profile .coach-profile-identity h1 { font: 800 clamp(30px,3.8vw,54px)/1.08 var(--display); letter-spacing: -.04em; }
.coach-profile .coach-profile-stats p { margin-block-start: 10px; color: var(--secondary); font-size: 13px; }
.coach-form-marks { display: flex; flex-wrap: wrap; gap: 4px; }
.coach-profile .team-outcome {
  display: inline-grid; place-items: center; min-width: 16px; padding: 0 3px;
  border-radius: 4px; background: var(--coach-surface); color: var(--secondary); font-weight: 700;
}
.coach-profile .team-outcome-win { color: var(--game); background: var(--game-surface); }
.coach-profile .team-outcome-loss { color: var(--accent); background: var(--accent-surface); }

.coach-profile-header {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 25px;
  margin-block: clamp(16px,2.5vw,34px) clamp(30px,4vw,58px);
}
.coach-profile-identity {
  display: grid; grid-template-columns: 76px minmax(0,1fr); align-items: center; gap: clamp(12px,1.6vw,22px);
  min-width: 0; max-width: 100%;
}
.coach-profile-identity h1 { overflow-wrap: anywhere; }
.coach-profile-photo {
  position: relative; display: grid; place-items: center; width: 76px; height: 76px;
  border-radius: 50%; overflow: hidden; background: var(--coach-surface); color: var(--secondary);
}
.coach-profile-photo > span { font: 800 clamp(25px, 3vw, 38px)/1 var(--display); }
.coach-profile-photo img[hidden] { display: none; }
.coach-profile-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--coach-surface); }
.coach-profile-context { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; margin-block-start: 5px; color: var(--secondary); }
.coach-profile-context > .coach-profile-team-link { min-height: 35px; color: var(--ink); font-weight: 700; }
.coach-profile-form { display: grid; gap: 7px; padding-block: 5px; color: var(--secondary); font-size: 13px; }
.coach-profile-form .coach-form-marks { gap: 5px; }
.coach-profile-form .team-outcome { width: 30px; height: 27px; font-size: 13px; }

.coach-profile-stats { margin-block-end: clamp(30px,4.4vw,64px); }
.coach-profile h2 { margin-block-end: 12px; font: 800 clamp(21px,2.25vw,30px)/1.14 var(--display); letter-spacing: -.025em; }
.coach-profile-stats dl {
  display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); border-block: 1px solid var(--line);
}
.coach-profile-stats dl > div {
  display: flex; flex-direction: column-reverse; gap: 5px; justify-content: center;
  min-height: 86px; padding: 10px clamp(4px,1.5vw,22px); border-inline-start: 1px solid var(--line);
}
.coach-profile-stats dl > div:first-child { border-inline-start: 0; padding-inline-start: 0; }
.coach-profile-stats dt { color: var(--secondary); font-size: 13px; line-height: 1.2; }
.coach-profile-stats dd { font-size: clamp(25px,3vw,40px); line-height: 1.05; font-weight: 700; font-variant-numeric: tabular-nums; }
.coach-profile-stats dl > div:last-child dd { color: var(--accent); }

.coach-profile-columns {
  display: grid; grid-template-columns: minmax(0,1.52fr) minmax(0,1fr);
  gap: clamp(23px,4vw,65px); align-items: start;
}
.coach-profile-columns > *, .coach-profile-facts > * { min-width: 0; }
.coach-profile-facts { display: grid; gap: clamp(25px,3vw,45px); }
.coach-match-list, .coach-competitions { margin: 0; padding: 0; list-style: none; border-block-start: 1px solid var(--line); }
.coach-match-row {
  display: grid; grid-template-columns: 62px minmax(0,1fr) 76px 34px;
  min-height: 65px; gap: 8px; align-items: center; padding: 6px 5px 6px 0;
  border-block-end: 1px solid var(--line);
}
.coach-match-row:hover, .coach-competitions a:hover { background: var(--coach-surface); }
.coach-match-row time { display: grid; color: var(--secondary); font-size: 13px; line-height: 1.22; font-variant-numeric: tabular-nums; }
.coach-match-row time small { margin-block-start: 3px; font-size: 11px; }
.coach-match-teams { display: grid; gap: 3px; min-width: 0; }
.coach-match-team, .coach-profile-team-link { display: flex; align-items: center; gap: 7px; min-width: 0; }
.coach-match-team > span, .coach-profile-team-link > span { min-width: 0; overflow-wrap: anywhere; }
.coach-team-logo { object-fit: contain; flex-shrink: 0; }
.coach-profile-team-link:hover, .coach-match-row:hover .coach-match-team > span { color: var(--accent); }
.coach-match-status { color: var(--secondary); font-size: 11px; line-height: 1.16; }
.coach-match-score { display: grid; justify-items: center; text-align: center; font-variant-numeric: tabular-nums; }
.coach-match-score strong { font-size: 17px; }
.coach-match-outcome { display: grid; place-items: center; }
.coach-match-outcome .team-outcome { width: 25px; height: 23px; font-size: 12px; }
.coach-more-matches > summary {
  min-height: 46px; padding: 11px 3px 8px; color: var(--accent); font-weight: 700; font-size: 13px; cursor: pointer;
}
.coach-more-matches .coach-close-matches, .coach-more-matches[open] .coach-open-matches { display: none; }
.coach-more-matches[open] .coach-close-matches { display: inline; }

.coach-teams-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.coach-team-matches { width: 53px; }
.coach-team-result { width: clamp(33px,3.2vw,45px); }
.coach-teams-table th, .coach-teams-table td { padding: 7px 3px; border-block-end: 1px solid var(--line); }
.coach-teams-table thead th { color: var(--secondary); background: var(--coach-surface); font-size: 12px; }
.coach-teams-table tr > :first-child { padding-inline-start: 7px; text-align: start; }
.coach-teams-table td { text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.coach-teams-table th[scope="row"] { padding-block: 7px 9px; }
.coach-teams-table th .coach-profile-team-link { min-height: 40px; font-size: 14px; line-height: 1.25; }
.coach-teams-table th[scope="row"] > small { display: block; color: var(--secondary); font-size: 12px; font-weight: 400; line-height: 1.2; }
.coach-teams-table td:nth-child(3) { color: var(--game); }
.coach-teams-table td:last-child { color: var(--accent); }
.coach-competitions :is(a,div) {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 46px; padding: 7px 4px; border-block-end: 1px solid var(--line); font-size: 14px;
}
.coach-competitions :is(a,div) > :first-child { overflow-wrap: anywhere; }
.coach-competitions a:hover > :first-child { color: var(--accent); }
.coach-competition-total { white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }
.coach-competition-total small { color: var(--secondary); font-weight: 400; }

@media (max-width: 880px) {
  .coach-profile-columns { grid-template-columns: minmax(0,1fr); gap: 30px; }
}
@media (max-width: 610px) {
  .coach-profile-header { margin-block: 12px 27px; align-items: start; flex-direction: column; gap: 12px; }
  .coach-profile-identity { grid-template-columns: 58px minmax(0,1fr); gap: 10px; }
  .coach-profile-photo { width: 58px; height: 58px; }
  .coach-profile-context { font-size: 13px; line-height: 1.22; gap: 2px 9px; }
  .coach-profile-context > .coach-profile-team-link { min-height: 34px; }
  .coach-profile-context .coach-team-logo { width: 17px; height: 17px; }
  .coach-profile-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 0; }
  .coach-profile-form .team-outcome { width: 26px; height: 24px; }
  .coach-profile-stats dl > div { min-height: 66px; gap: 4px; padding-inline: 4px; }
  .coach-profile-stats dt { min-height: 2.4em; font-size: 11px; }
  .coach-match-row { grid-template-columns: 50px minmax(0,1fr) 46px 26px; gap: 6px; min-height: 64px; padding-inline-end: 0; }
  .coach-match-team { gap: 5px; font-size: 13px; }
  .coach-match-team > img { width: 17px; height: 17px; }
}
@media (max-width: 359px) {
  .coach-profile-stats dl { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .coach-profile-stats dl > div { grid-column: span 2; }
  .coach-profile-stats dl > div:nth-child(n+4) { grid-column: span 3; border-block-start: 1px solid var(--line); }
  .coach-profile-stats dl > div:nth-child(4) { border-inline-start: 0; padding-inline-start: 0; }
}
