.team-profile {
  min-width: 0;
  --line: hsl(var(--border));
  --secondary: hsl(var(--muted));
  --ink: hsl(var(--foreground));
  --accent: hsl(var(--primary));
  --accent-surface: var(--home-accent-surface);
  --team-surface: hsl(var(--surface));
  --game: #246453;
  --game-surface: #e8f3ed;
}
.team-profile :is(h1,h2,h3,p,dl,dd) { margin: 0; }
.team-profile .site-crumb { margin: 0; }
.team-profile .site-crumb [aria-current] { color: var(--ink); font-weight: 700; }
.team-profile .site-action[hidden] { display: none; }
.team-profile .league-picker { flex-direction: column; align-items: flex-start; }
.team-profile .league-picker summary { min-width: 100px; }
.team-profile .team-identity h1 {
  font: 800 clamp(32px, 4.1vw, 54px)/1.04 var(--display);
  letter-spacing: -.04em;
}
.team-profile .team-context { margin-block-start: 6px; }
.team-profile .team-standing-year { margin-block: -3px 8px; }
.team-profile .team-scorers h2 { margin-block: 6px 10px; }
.team-profile .team-squad h2 { margin-block-end: 8px; }
.team-profile .team-transfer-note { margin-block-end: 18px; color: var(--secondary); }
.team-profile .team-transfer-totals dd { margin-block-start: 1px; }
.team-topline { min-height: 38px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 14px; margin-block-end: 13px; }
.team-page-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px 26px; margin-block-end: 18px; }
.team-identity { display: flex; align-items: center; gap: clamp(13px,1.9vw,24px); min-width: 0; }
.team-identity > div { min-width: 0; }
.team-identity h1 { overflow-wrap: anywhere; }
.team-page-logo { width: clamp(58px,6.7vw,96px); height: clamp(58px,6.7vw,96px); border-radius: 13px; padding: clamp(7px,1vw,13px); object-fit: contain; background: var(--team-surface); }
.team-logo-empty { display: grid; flex: none; place-items: center; color: var(--secondary); }
.team-logo-empty svg { width: 28px; height: 28px; }
.team-context { display: flex; flex-wrap: wrap; gap: 3px 13px; margin-block-start: 6px; color: var(--secondary); font-size: 14px; }
.team-context a { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.team-heading-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 7px 20px; }
.team-form { display: grid; justify-items: start; align-content: center; gap: 4px; min-height: 44px; color: var(--secondary); }
.team-form > span:first-child { font-size: 12px; }

.team-page-tabs { display: flex; flex-wrap: wrap; gap: 0 clamp(12px,3vw,38px); margin-block-end: 22px; border-block-end: 1px solid var(--line); }
.team-page-tabs a { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 4px 7px; border-block-end: 3px solid transparent; color: var(--secondary); font-weight: 700; text-align: center; }
.team-page-tabs a[aria-current] { color: var(--accent); border-color: var(--accent); }
.team-page-tabs a:hover { color: var(--accent); }
.team-overview:not(:has(.team-overview-side)) { grid-template-columns: minmax(0,1fr); }
.team-overview { display: grid; grid-template-columns: minmax(0,2.55fr) minmax(260px,1fr); align-items: start; gap: clamp(22px,3vw,42px); }
.team-main, .team-overview-side, .team-overview-matches { display: grid; min-width: 0; align-items: start; gap: 20px clamp(14px,2vw,30px); }
.team-overview-matches { grid-template-columns: repeat(2,minmax(0,1fr)); }
.team-overview-matches.single { grid-template-columns: minmax(0,1fr); }
.team-block { min-width: 0; }
.team-block > header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 8px; min-height: 44px; margin-block-end: 6px; }
.team-block h2, .team-scorers h2 { font-size: clamp(20px,1.75vw,26px); line-height: 1.16; }
.team-fixtures, .team-scorers ol, .team-squad ul, .team-transfers ul { list-style: none; margin: 0; padding: 0; }

.team-fixtures { border-block-start: 1px solid var(--line); }
.team-fixture { display: grid; grid-template-columns: minmax(53px,.23fr) minmax(0,1.55fr) auto; align-items: center; gap: 7px clamp(6px,1vw,13px); min-height: 61px; padding: 6px 5px; border-block-end: 1px solid var(--line); }
.team-fixture time, .team-fixture-opponent small { color: var(--secondary); font-size: 12px; }
.team-fixture-opponent { display: flex; align-items: center; gap: 7px; min-width: 0; }
.team-fixture-opponent strong, .team-fixture-opponent small { display: block; overflow-wrap: anywhere; }
.team-fixture-opponent strong { font-size: 14px; }
.team-fixture-result { display: inline-flex; align-items: center; justify-content: end; gap: 5px; white-space: nowrap; }
.team-fixture-result strong, .team-kickoff { font-size: 14px; text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.team-competition-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 22px clamp(16px,2.8vw,40px); }
.team-competition-list section:only-child { grid-column: 1 / -1; }
.team-competition-list h2 { display: flex; align-items: center; gap: 6px; min-height: 42px; padding: 6px 9px; border-radius: 7px 7px 0 0; background: var(--team-surface); font-size: 16px; }
.team-competition-list h2 small { margin-inline-start: auto; color: var(--secondary); font-size: 12px; white-space: nowrap; }
.team-competition-list .team-fixture { grid-template-columns: minmax(60px,.3fr) minmax(0,1fr) auto; padding-inline: 9px; }

.team-standing-year { margin-block: -3px 8px; color: var(--secondary); font-size: 13px; }
.team-standing { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.team-standing :is(th,td) { padding: 3px clamp(4px,.8vw,10px); text-align: end; }
.team-standing thead th { padding-block: 7px; background: var(--team-surface); color: var(--secondary); font-weight: 700; font-size: 12px; }
.team-standing :is(th,td):first-child { padding-inline: 5px; text-align: center; width: 32px; }
.team-standing th:nth-child(2), .team-standing tbody th { text-align: start; }
.team-standing tbody th > :is(a,span) { display: inline-flex; align-items: center; min-height: 44px; }
.team-standing tbody th span { overflow-wrap: anywhere; }
.team-standing tbody tr { border-block-end: 1px solid var(--line); }
.team-standing .team-selected-row :is(th,td) { background: var(--accent-surface); }
.team-standing .team-current-standing { color: var(--accent); }
.team-standing .team-col-points { font-weight: 700; }
.team-competitions { margin-block: 0 12px; }
.team-competitions a { min-height: 44px; }

.team-scorers h2 { margin-block: 6px 10px; }
.team-scorers ol { border-block-start: 1px solid var(--line); }
.team-scorers li a { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 54px; padding-block: 5px; border-block-end: 1px solid var(--line); }
.team-goals { color: var(--game); font-size: 12px; text-align: end; flex: none; }
.team-goals strong { font-size: 16px; }
.team-goals small { display: block; color: var(--secondary); }
.team-player-ident { display: flex; align-items: center; gap: 7px; min-width: 0; }
.team-player-ident > span:last-child { min-width: 0; }
.team-player-ident strong, .team-player-ident small { display: block; overflow-wrap: anywhere; }
.team-player-ident strong { font-size: 14px; line-height: 1.25; }
.team-player-ident small { margin-block-start: 2px; color: var(--secondary); font-size: 12px; }
.team-player-photo, .team-player-placeholder { display: grid; flex: none; place-items: center; width: 38px; height: 38px; border-radius: 50%; object-fit: contain; background: var(--team-surface); color: var(--secondary); }
.team-squad { display: grid; gap: 20px; }
.team-squad h2, .team-transfers h2 { margin-block-end: 8px; font-size: clamp(20px,2vw,25px); }
.team-squad h2 small, .team-alumni summary small { color: var(--secondary); font-size: 13px; }
.team-squad ul { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.team-squad-player { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 3px 6px; min-height: 63px; height: 100%; padding: 7px 9px; border-radius: 7px; border: 1px solid var(--line); }
.team-player-stat { grid-column: 1 / -1; margin-inline-start: 45px; color: var(--secondary); font-size: 11px; }
.team-player-status { color: var(--accent); font-size: 11px; font-weight: 700; }
.team-alumni { padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; }
.team-alumni summary { padding-block: 9px; min-height: 44px; font-weight: 700; cursor: pointer; }
.team-alumni ul { padding-block-end: 8px; }
.team-alumni a { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-height: 44px; padding-inline: 6px; border-block-end: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; }
.team-alumni a small { color: var(--secondary); }
.team-transfer-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 14px; margin-block-end: 6px; }
.team-transfer-toolbar h2 { margin: 0; }
.team-transfer-year { margin-block-end: 27px; border-block-start: 1px solid var(--line); }
.team-transfer-year > header { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,530px); align-items: start; gap: 8px 20px; padding-block: 13px 11px; }
.team-transfer-year h3 { font-size: clamp(25px,2.4vw,34px); font-family: var(--display); line-height: 1.15; }
.team-transfer-accounting { display: grid; gap: 5px; }
.team-transfer-totals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 3px; font-variant-numeric: tabular-nums; }
.team-transfer-totals > div { padding: 6px 9px; border-radius: 6px; background: var(--team-surface); }
.team-transfer-totals dt { color: var(--secondary); font-size: 12px; }
.team-transfer-totals dd { margin-block-start: 1px; font-size: clamp(15px,1.2vw,18px); font-weight: 700; overflow-wrap: anywhere; }
.team-transfer-totals .team-balance-positive { color: var(--game); background: var(--game-surface); }
.team-transfer-totals .team-balance-negative { color: var(--accent); background: var(--accent-surface); }
.team-transfer-accounting p { color: var(--secondary); font-size: 12px; }
.team-transfer-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px clamp(18px,3vw,42px); }
.team-transfer-direction h4 { margin: 0; padding: 0 4px 5px; border-block-end: 1px solid var(--line); font-size: 16px; }
.team-transfer-direction h4 span { margin-inline-start: 3px; color: var(--secondary); font-size: 12px; }
.team-transfer-direction > p { padding: 9px 4px 2px; font-size: 13px; }
.team-transfers li { display: grid; grid-template-columns: minmax(0,1fr) minmax(62px,auto); align-items: center; gap: 5px 10px; min-height: 56px; padding: 6px 4px; border-block-end: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; }
.team-transfer-player { display: flex; align-items: center; gap: 7px; min-width: 0; min-height: 44px; }
.team-transfer-player .team-player-photo { width: 32px; height: 32px; }
.team-transfer-player > span { min-width: 0; }
.team-transfer-player small, .team-transfer-meta time { display: block; color: var(--secondary); font-size: 12px; }
.team-transfer-meta { text-align: end; font-variant-numeric: tabular-nums; }
.team-transfer-unknown { color: var(--secondary); }

@media (hover: hover) {
  .team-fixture:hover, .team-squad-player:hover { background: var(--team-surface); }
  .team-standing a:hover, .team-scorers a:hover, .team-alumni a:hover, a.team-transfer-player:hover { color: var(--accent); text-decoration: underline; }
}

@media (max-width: 1130px) {
  .team-overview { grid-template-columns: minmax(0,1fr); }
  .team-overview-side { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 782px) {
  .team-squad ul { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 650px) {
  .team-overview-matches, .team-overview-side, .team-competition-list { grid-template-columns: minmax(0,1fr); }
  .team-transfer-year > header, .team-transfer-columns { grid-template-columns: minmax(0,1fr); }
  .team-transfer-year { margin-block-end: 21px; }
  .team-overview .team-fixtures li:nth-child(n+5) { display: none; }
  .team-topline { margin-block-end: 10px; }
  .team-page-heading { margin-block-end: 11px; }
  .team-context { font-size: 13px; }
  .team-heading-tools { justify-content: space-between; width: 100%; }
  .team-heading-tools .league-picker { margin-inline-start: auto; }
  .team-page-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 4px; margin-block-end: 13px; }
  .team-page-tabs a { min-height: 44px; padding-inline: 3px; font-size: 13px; }
  .team-fixture { min-height: 55px; }
}
@media (max-width: 520px) {
  .team-squad ul { grid-template-columns: minmax(0,1fr); }
}

.team-page-logo { flex: none; }
.team-season-label { color: var(--secondary); font-size: 13px; font-weight: 700; }
.team-form-marks { display: flex; flex-wrap: wrap; gap: 4px; }
.team-outcome {
  display: inline-grid; place-items: center; min-width: 16px; height: 20px; padding: 0 3px;
  border-radius: 4px; background: var(--team-surface); color: var(--secondary); font-size: 11px; font-weight: 700;
}
.team-outcome-win { color: var(--game); background: var(--game-surface); }
.team-outcome-loss { color: var(--accent); background: var(--accent-surface); }
.team-live { color: var(--accent); }
.team-fixture-opponent img, .team-standing img { flex: none; object-fit: contain; }
.team-more { display: inline-flex; align-items: center; flex: none; gap: 7px; min-height: 44px; color: var(--accent); font-size: 13px; font-weight: 700; }
.team-more:hover { text-decoration: underline; }
.team-standing tbody th > :is(a,span) { gap: 7px; }
.team-table-scroll { overflow-x: auto; }
.team-table-scroll .team-standing { min-width: 476px; }
.team-competitions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.team-competitions a {
  display: inline-flex; align-items: center; padding: 5px 10px; border: 1px solid var(--line);
  border-radius: 7px; color: var(--secondary); font-size: 13px; font-weight: 700;
}
.team-competitions a:hover, .team-competitions a[aria-current] {
  color: var(--accent); background: var(--accent-surface); border-color: transparent;
}
.team-news { display: grid; padding: 0; margin: 0; list-style: none; }
.team-news a { display: flex; align-items: center; min-height: 44px; padding-block: 6px; border-block-end: 1px solid var(--line); }
.team-news a:hover { color: var(--accent); }
.team-overview-alumni { margin-block-start: 25px; }
.team-transfer-direction > p { color: var(--secondary); }
.team-transfer-toolbar .league-picker nav { min-width: 136px; }
@media (max-width: 400px) {
  .team-fixture { grid-template-columns: minmax(40px, .24fr) minmax(0, 1fr) auto; }
  .team-standing tbody th img { width: 18px; height: 18px; }
}
