.football-profile .team-page { max-width: 1340px; }
.team-page section, .team-page aside { scroll-margin-top: 20px; }
.team-page a:hover { text-decoration: underline; text-decoration-color: var(--lime); text-underline-offset: 3px; }
.team-page .team-hero { background: var(--panel); color: var(--text); border-color: var(--line); border-top: 4px solid var(--lime); border-radius: 10px; min-height: 172px; }
.team-page .team-hero::after { display: none; }
.team-page .profile-emblem { background: #fff; border-color: var(--line); border-radius: 10px; color: var(--text); }
.team-page .profile-identity p, .team-page .profile-identity .profile-kicker { color: var(--muted); }
.team-page .profile-identity a { color: var(--nav); }
.team-page .profile-identity .page-title { color: var(--text); }
.team-hero-form { margin-left: auto; flex: none; }
.team-hero-form > span { display: block; margin-bottom: 9px; font-size: .8rem; font-weight: 700; }
.team-hero-form small { display: block; margin-top: 6px; color: var(--muted); font-size: .65rem; }
.team-form { display: flex; gap: 5px; }
.team-result { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 5px; font-size: .76rem; font-weight: 800; background: #e9edf1; color: #46515f; }
.team-result.win { background: #e2f3e8; color: #17663b; }
.team-result.draw { background: #edf0f4; color: #485460; }
.team-result.lose { background: #fce5e6; color: #a62436; }
.team-summary { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.team-page .team-summary > div { padding: 16px; border-radius: 8px; }
.team-summary dd { font-size: clamp(1.5rem, 2.5vw, 2rem); font-variant-numeric: tabular-nums; }
.team-summary dt { font-size: .76rem; }
.team-competitions { margin-bottom: 16px; scroll-margin-top: 18px; }
.team-competition-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 0; }
.team-competition-tabs a { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .84rem; font-weight: 700; }
.team-competition-tabs a:hover { border-color: var(--nav); }
.team-competition-tabs a[aria-current] { border-color: var(--nav); background: var(--nav); color: var(--panel); }
.team-competition-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 205px), 1fr)); gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.team-competition-list a { display: grid; gap: 5px; height: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); overflow-wrap: anywhere; }
.team-competition-list a:hover { border-color: var(--nav); }
.team-competition-list span { color: var(--muted); font-size: .8rem; }
.team-competition-list b { color: var(--nav); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.team-competition-table { margin-top: 12px; }
.team-competition-table > summary { padding: 10px 0; color: var(--nav); font-weight: 700; cursor: pointer; }
.team-sections { display: flex; flex-wrap: wrap; gap: 0 24px; padding: 0 18px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.team-sections a { padding: 15px 0; font-size: .86rem; font-weight: 750; }
.team-sections a:last-child { margin-left: auto; color: var(--muted); }
.team-layout { display: grid; grid-template-columns: minmax(0, 1fr) 324px; gap: 20px; align-items: start; }
.team-main, .team-sidebar { min-width: 0; }
.team-page .profile-panel { margin-bottom: 20px; border-radius: 8px; }
.team-page .profile-section-heading { gap: 8px 16px; }
.team-page .profile-section-heading h2 { border-left: 3px solid var(--lime); padding-left: 9px; color: var(--text); font-size: 1.07rem; }
.team-page .profile-section-heading a { color: var(--text); font-size: .74rem; font-weight: 750; }
.team-news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; margin-top: 18px; }
.team-news-card { min-width: 0; }
.team-news-card a { display: block; }
.team-news-image { display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg); color: var(--muted); border-radius: 5px; }
.team-news-image span { font-weight: 900; font-size: .8rem; letter-spacing: .12em; }
.team-news-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.team-news-card time { display: block; margin-top: 9px; color: var(--muted); font-size: .68rem; }
.team-news-card h3 { margin: 5px 0 0; font-size: .95rem; line-height: 1.4; letter-spacing: -.015em; }
.team-stat-table-wrap { overflow-x: auto; margin-top: 12px; }
.team-stat-table { border-collapse: collapse; width: 100%; font-size: .84rem; font-variant-numeric: tabular-nums; }
.team-stat-table th, .team-stat-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: center; }
.team-stat-table th:first-child { text-align: left; padding-left: 0; font-weight: 500; }
.team-stat-table thead th { font-weight: 750; color: var(--muted); font-size: .74rem; }
.team-stat-table tbody td:first-of-type { font-weight: 800; background: var(--bg); }
.team-note { color: var(--muted); font-size: .75rem; line-height: 1.65; margin: 14px 0; }
.team-subheading { margin: 24px 0 12px; font-size: .9rem; }
.team-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0 22px; }
.team-metrics > div { padding: 16px; border: 1px solid var(--line); border-radius: 6px; }
.team-metrics dt { font-size: .78rem; color: var(--muted); }
.team-metrics dd { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin: 8px 0 12px; }
.team-metrics strong { font-size: 1.65rem; }
.team-metrics dd span { color: var(--muted); font-size: .7rem; }
.team-meter { height: 5px; border-radius: 10px; background: var(--line); overflow: hidden; }
.team-meter span { display: block; height: 100%; background: var(--lime); }
.team-streaks { margin: 0; }
.team-streaks > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .85rem; }
.team-streaks dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.team-records { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.team-records > div { background: var(--bg); border-radius: 6px; padding: 14px; }
.team-records h3 { margin: 0 0 10px; font-size: .78rem; color: var(--muted); }
.team-records a { display: grid; gap: 5px; font-size: .76rem; line-height: 1.4; }
.team-records strong { font-size: 1.45rem; }
.team-records small { color: var(--muted); }
.team-squad-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.team-squad-groups > div { min-width: 0; }
.team-squad-groups h3 span { color: var(--muted); font-weight: 500; font-size: .75rem; }
.team-page .profile-roster a:hover, .team-page .profile-roster a > span:last-child { color: var(--nav); }
.team-page .profile-number { color: var(--text); font-size: .78rem; }
.team-page .profile-roster strong { font-size: .83rem; }
.team-page .profile-roster small { font-size: .7rem; }
.team-fixtures { margin: 0; padding: 0; list-style: none; }
.team-fixtures li { border-bottom: 1px solid var(--line); }
.team-fixtures li:last-child { border-bottom: 0; }
.team-fixtures a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; padding: 15px 0; }
.team-fixture-meta { grid-column: 1 / -1; display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 3px 10px; color: var(--muted); font-size: .65rem; }
.team-fixture-teams { display: grid; gap: 5px; font-size: .8rem; line-height: 1.35; }
.team-fixture-teams .is-team { font-weight: 750; }
.team-fixture-score { font-size: .85rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.team-fixtures .team-result { grid-column: 2; justify-self: end; width: 22px; height: 22px; font-size: .65rem; margin-top: -3px; }
.team-more-matches { margin-top: 8px; border-top: 1px solid var(--line); }
.team-more-matches summary { padding: 12px 0 0; cursor: pointer; font-size: .8rem; font-weight: 700; }
.team-more-matches summary:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
@media (max-width: 1050px) {
    .team-layout { grid-template-columns: minmax(0, 1fr) 285px; gap: 14px; }
    .team-page .profile-panel { padding: 16px; }
    .team-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .team-news-grid { gap: 18px 12px; }
    .team-hero-form { flex-basis: 100%; margin-left: 0; }
    .team-hero { flex-wrap: wrap; }
}
@media (max-width: 800px) {
    .team-layout { display: flex; flex-direction: column; }
    .team-layout.is-competition .team-sidebar { order: -1; }
    .team-main, .team-sidebar { width: 100%; }
    .team-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
    .team-sidebar > .team-note { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
    .team-page .team-hero { padding: 20px 16px; gap: 16px; }
    .team-page .profile-identity { flex: 1; }
    .team-page .profile-identity > p:last-child { font-size: .74rem; line-height: 1.6; }
    .team-hero-form { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
    .team-hero-form > span { margin: 0; }
    .team-hero-form small { flex-basis: 100%; margin: 0; }
    .team-page .team-summary > div { padding: 12px 10px; }
    .team-summary { gap: 8px; }
    .team-summary dt { font-size: .67rem; }
    .team-sections { gap: 0 16px; padding-inline: 12px; }
    .team-sections a { font-size: .76rem; padding-block: 12px; }
    .team-sections a:last-child { margin-left: 0; }
    .team-page .profile-panel { padding: 14px; }
    .team-news-grid, .team-sidebar, .team-squad-groups { grid-template-columns: minmax(0, 1fr); }
    .team-news-card a { display: grid; grid-template-columns: 35% minmax(0, 1fr); align-items: start; gap: 12px; }
    .team-news-card time { margin-top: 0; font-size: .63rem; }
    .team-news-card h3 { font-size: .84rem; }
    .team-news-image { aspect-ratio: 4 / 3; }
    .team-news-image span { font-size: .5rem; letter-spacing: 0; }
    .team-stat-table { font-size: .75rem; }
    .team-stat-table th, .team-stat-table td { padding: 10px 5px; }
    .team-stat-table thead th { font-size: .68rem; }
    .team-metrics { gap: 8px; }
    .team-metrics > div { padding: 12px; }
    .team-metrics dt { font-size: .72rem; }
    .team-records { grid-template-columns: minmax(0, 1fr); }
}
