.profile-page { display:block; max-width:1040px; width:100%; margin:0 auto; }
.profile-breadcrumb { display:flex; flex-wrap:wrap; gap:.65rem; color:var(--text-secondary); font-size:.85rem; margin-bottom:1.5rem; }
.profile-breadcrumb a { color:var(--link); text-decoration:none; }
.profile-hero { display:flex; align-items:center; gap:1.8rem; padding:2rem; border:1px solid var(--surface-border); border-radius:24px; background:var(--surface-gradient); }
.profile-hero > div { min-width:0; }
.profile-hero h1 { font-size:clamp(1.7rem,4vw,2.8rem); margin:.4rem 0; overflow-wrap:anywhere; }
.profile-eyebrow { font-size:.72rem; letter-spacing:.1em; text-transform:uppercase; color:var(--text-secondary); margin:0; }
.profile-subtitle { color:var(--text-secondary); margin:.5rem 0 1rem; }
.profile-portrait { width:144px; height:160px; object-fit:cover; object-position:top; border-radius:18px; background:var(--surface-muted); flex-shrink:0; }
.profile-team-mark { display:grid; place-items:center; width:120px; height:120px; flex-shrink:0; border-radius:24px; color:var(--text-highlight); background:var(--accent-soft); font:600 2.8rem var(--font-heading); }
.profile-team-mark { position:relative; overflow:hidden; }
.profile-team-logo { position:absolute; inset:0; width:100%; height:100%; padding:.4rem; object-fit:contain; background:var(--surface); }
.profile-match-heading { display:flex; align-items:center; justify-content:space-between; gap:.8rem; flex-wrap:wrap; margin:.4rem 0; }
.profile-scorecard-link { flex-shrink:0; min-height:40px; }
.profile-seasons { padding:0 1.3rem 1.3rem; }
.profile-season { border:1px solid var(--surface-border); border-radius:12px; margin-top:.7rem; overflow:hidden; }
.profile-season > summary { display:flex; align-items:center; flex-wrap:wrap; gap:.4rem 1rem; padding:1rem; cursor:pointer; list-style:none; background:var(--surface-muted); }
.profile-season > summary::-webkit-details-marker { display:none; }
.profile-season > summary > span:first-child { font-weight:600; }
.profile-season > summary::after { content:'+'; margin-left:auto; color:var(--text-highlight); }
.profile-season[open] > summary::after { content:'−'; }
.profile-season-totals { font-size:.75rem; color:var(--text-secondary); }
.profile-season h3 { font-size:.85rem; padding:0 1rem; margin:1rem 0; }
.profile-season > summary:focus-visible { outline:2px solid var(--link); outline-offset:-2px; }
.profile-highlights { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin:1rem 0; padding:1.3rem .5rem; border-block:1px solid var(--surface-border); }
.profile-highlights > div { padding:.3rem 1rem; border-right:1px solid var(--surface-border); }
.profile-highlights > div:last-child { border:0; }
.profile-highlights dt, .profile-stat-grid dt { font-size:.8rem; color:var(--text-secondary); }
.profile-highlights dd { font:600 clamp(1.25rem,3vw,2rem) var(--font-heading); margin:.35rem 0 0; }
.profile-highlights--details dd { font-size:1rem; line-height:1.5; overflow-wrap:anywhere; }
.profile-note { color:var(--text-secondary); font-size:.8rem; line-height:1.7; margin:1rem 0; }
.profile-panel { border:1px solid var(--surface-border); border-radius:18px; margin:1rem 0; background:var(--surface); overflow:hidden; }
.profile-panel > summary { cursor:pointer; display:flex; align-items:center; gap:.7rem; list-style:none; padding:1.1rem 1.3rem; font-weight:600; }
.profile-panel > summary::-webkit-details-marker { display:none; }
.profile-panel > summary::after { content:'+'; color:var(--text-highlight); font-size:1.4rem; }
.profile-panel > summary > span:first-child { margin-right:auto; }
.profile-panel[open] > summary::after { content:'−'; }
.profile-panel-hint { display:block; color:var(--text-secondary); font-size:.75rem; font-weight:400; margin-top:.2rem; }
.profile-panel-total { font-size:.8rem; color:var(--text-highlight); white-space:nowrap; }
.profile-panel-total + span { margin-left:0; }
.profile-stat-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); background:var(--surface); border-top:1px solid var(--surface-border); margin:0; }
.profile-stat-grid > div { border-bottom:1px solid var(--surface-border); padding:1.15rem 1.3rem; }
.profile-stat-grid dd { font:500 1.25rem var(--font-heading); margin:.4rem 0 0; }
.profile-panel > .profile-note { padding:0 1.3rem; }
.profile-chips { display:flex; flex-wrap:wrap; gap:.5rem; }
.profile-team-list { padding:0 1.3rem 1.3rem; }
.profile-player-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.5rem; padding:0 1.3rem 1.3rem; }
.profile-player-link { display:flex; align-items:center; justify-content:space-between; gap:.7rem; padding:.8rem; border-radius:10px; background:var(--surface-muted); color:var(--text-primary); text-decoration:none; overflow-wrap:anywhere; }
.profile-player-link > span:last-child { color:var(--text-highlight); }
.profile-player-link:hover { background:var(--accent-soft); color:var(--link); }
.profile-page a:focus-visible, .profile-panel > summary:focus-visible { outline:2px solid var(--link); outline-offset:-2px; }
.profile-match-list { padding:0 1.3rem; }
.profile-match-list article { padding:1rem 0; border-top:1px solid var(--surface-border); }
.profile-match-list h3 { font-size:1rem; margin:.5rem 0; }
.profile-match-list h3 span { font-weight:400; color:var(--text-secondary); }
.profile-match-list article > p:last-child { font-size:.85rem; color:var(--text-secondary); margin:0; }
.profile-empty { padding:1.3rem; background:var(--surface-muted); border-radius:16px; }
.profile-chart-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:1rem; padding:0 1.3rem 1.3rem; }
.profile-chart-card { min-width:0; border:1px solid var(--surface-border); border-radius:14px; background:var(--surface-muted); padding:1rem; }
.profile-chart-card:only-child { grid-column:1 / -1; }
.profile-chart-card h3 { font-size:1rem; margin:0 0 .8rem; }
.profile-chart-legend { display:flex; flex-wrap:wrap; gap:.5rem 1rem; font-size:.75rem; margin-bottom:1rem; }
.profile-chart-legend span { display:inline-flex; align-items:center; gap:.4rem; }
.profile-chart-legend i { width:.65rem; height:.65rem; background:currentColor; border-radius:50%; }
.profile-chart-series-0 { color:var(--text-highlight); }
.profile-chart-series-1 { color:var(--text-primary); }
.profile-chart-series-2 { color:var(--text-secondary); }
.profile-chart-scroll, .profile-chart-table-scroll { overflow-x:auto; overscroll-behavior-x:contain; }
.profile-chart { display:block; width:100%; height:auto; }
.profile-chart text { fill:var(--text-secondary); font:11px var(--font-body, sans-serif); }
.profile-chart .profile-chart-value { fill:var(--text-primary); font-weight:600; pointer-events:none; }
.profile-chart-gridline { stroke:var(--surface-border); stroke-width:1; }
.profile-chart-line { fill:none; stroke:currentColor; stroke-width:2.5; }
.profile-chart-line.profile-chart-series-1 { stroke-dasharray:6 4; }
.profile-chart-point { fill:currentColor; cursor:pointer; outline:none; }
.profile-chart-hit { fill:transparent; stroke:transparent; }
.profile-chart-point:focus-visible .profile-chart-hit, .profile-chart-point.is-selected .profile-chart-hit { stroke:currentColor; stroke-width:2; }
.profile-chart-readout { color:var(--text-secondary); font-size:.75rem; min-height:2.8em; line-height:1.5; margin:.8rem 0; }
.profile-chart-data > summary { cursor:pointer; font-size:.8rem; color:var(--link); padding:.5rem 0; }
.profile-chart-data table { border-collapse:collapse; width:100%; font-size:.8rem; }
.profile-chart-data caption { text-align:left; font-size:.75rem; color:var(--text-secondary); padding:.75rem 0; }
.profile-chart-data th, .profile-chart-data td { padding:.6rem; border-bottom:1px solid var(--surface-border); text-align:right; white-space:nowrap; }
.profile-chart-data th:first-child { text-align:left; }
.profile-chart-scroll:focus-visible, .profile-chart-table-scroll:focus-visible, .profile-chart-data > summary:focus-visible { outline:2px solid var(--link); outline-offset:-2px; }
@media(max-width:600px) {
    .profile-chart-grid { padding:0 .7rem .7rem; }
    .profile-chart-card { padding:.8rem; }
    .profile-seasons { padding:0 .7rem .7rem; }
    .profile-season > summary { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.35rem .5rem; padding:.8rem; }
    .profile-season > summary::after { grid-column:2; grid-row:1 / 3; }
    .profile-season-totals { grid-column:1; font-size:.7rem; }
    .profile-hero { gap:1rem; padding:1.2rem; align-items:flex-start; }
    .profile-portrait { width:80px; height:96px; border-radius:12px; }
    .profile-team-mark { width:70px; height:80px; font-size:1.7rem; border-radius:16px; }
    .profile-eyebrow { font-size:.65rem; letter-spacing:.05em; }
    .profile-hero h1 { font-size:1.5rem; }
    .profile-subtitle { font-size:.8rem; }
    .profile-highlights { padding:.8rem 0; }
    .profile-highlights > div { padding:.3rem .5rem; }
    .profile-highlights dt { font-size:.7rem; }
    .profile-highlights dd { font-size:1.15rem; }
    .profile-stat-grid, .profile-player-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .profile-panel > summary { padding:1rem; }
    .profile-stat-grid > div { padding:1rem; }
    .profile-player-grid { padding:0 1rem 1rem; font-size:.85rem; }
    .profile-panel-hint { font-size:.7rem; }
}
.profile-directory-search { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.profile-directory-search label { flex-basis: 100%; }
.profile-directory-search input { flex: 1 1 220px; min-width: 0; }
.profile-autocomplete { position: relative; flex: 1 1 220px; min-width: 0; }
.profile-autocomplete input { width: 100%; }
.profile-suggestions {
    position: absolute; top: calc(100% + .25rem); inset-inline: 0; z-index: 10;
    max-height: 320px; overflow-y: auto; overscroll-behavior: contain;
    background: var(--surface); border: 1px solid var(--surface-border);
    border-radius: 12px; box-shadow: var(--shadow-card);
}
.profile-suggestions a { display: block; padding: .85rem 1rem; color: var(--text-primary); text-decoration: none; overflow-wrap: anywhere; }
.profile-suggestions a:hover, .profile-suggestions a[aria-selected="true"] { background: var(--accent-soft); }
