/* Compact athlete views and local charts; colours also apply to comparison lines. */
:root { --athlete-0: #087e8b; --athlete-1: #8653b4; --athlete-2: #806319; --athlete-3: #384c65; }
:root[data-theme="dark"] { --athlete-0: #5dcad3; --athlete-1: #c7a0ed; --athlete-2: #ddc36b; --athlete-3: #a3bad5; }
.athlete-colour-0 { --athlete-colour: var(--athlete-0); }
.athlete-colour-1 { --athlete-colour: var(--athlete-1); }
.athlete-colour-2 { --athlete-colour: var(--athlete-2); }
.athlete-colour-3 { --athlete-colour: var(--athlete-3); }
.athlete-dot { display:inline-block; flex:0 0 8px; width:8px; height:8px; border-radius:50%; background:var(--athlete-colour); margin-right:5px; }
.discipline-dot { display:inline-block; width:6px; height:6px; margin-right:5px; border-radius:50%; background:var(--muted); vertical-align:middle; }
.discipline-boulder { background:var(--boulder); }
.discipline-lead, .discipline-top_rope { background:var(--lead); }
.discipline-speed { background:var(--speed); }
.compact-medals { display:inline-flex; align-items:center; gap:9px; white-space:nowrap; }
.compact-medals > span { display:inline-flex; align-items:center; gap:3px; }
.compact-medals .cup { width:13px; height:13px; }
.athlete-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.athlete-heading h1 { margin:0 0 5px; font-size:24px; line-height:1.2; }
.athlete-heading p { margin:0; line-height:1.6; }
.athlete-heading p a { color:var(--muted); }
.profile-gender { display:inline-flex; vertical-align:middle; margin-right:4px; }
.profile-gender svg { width:15px; height:15px; }
.athlete-actions { display:flex; gap:6px; flex-shrink:0; }
.profile-layout, .profile-main, .profile-side { min-width:0; }
.profile-layout { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; align-items:start; align-content:start; }
.profile-main, .profile-side { display:flex; flex-direction:column; gap:16px; }
.profile-side { grid-row:1; }
.season-summary .section-heading, .career-card .section-heading, .chart-card .section-heading { margin:0 0 8px; }
.profile-strip.stat-strip { display:grid; grid-template-columns:0.7fr 1.4fr 1fr 0.9fr; gap:0; margin:0; }
.profile-strip.stat-strip > div { padding:0 6px; }
.profile-strip.stat-strip > div:first-child { padding-left:0; }
.profile-strip.stat-strip dd { font-size:18px; margin-top:5px; }
.profile-strip.stat-strip .compact-medals { font-size:13px; gap:4px; }
.profile-strip.stat-strip dt { min-height:30px; line-height:1.25; }
.result-mobile-group { display:none; }
.compact-ranks { list-style:none; padding:0; margin:12px 0 0; }
.compact-ranks li { border-top:1px solid var(--line); }
.compact-ranks li > a { display:grid; grid-template-columns:minmax(0,1fr) auto 64px; gap:8px; align-items:center; min-height:36px; text-decoration:none; color:var(--ink); font-size:13px; }
.compact-ranks a > span:last-child { text-align:right; }
.compact-ranks small { color:var(--muted); font-size:12px; margin-left:4px; }
.compact-ranks li.muted { padding-top:10px; }
.career-table { min-width:540px; }
.career-table th, .career-table td { padding:8px; }
.career-table td:first-child { white-space:nowrap; }
.career-ranks { display:grid; gap:4px; font-size:12px; }
.career-ranks a { color:var(--ink); text-decoration:none; }
.career-ranks a:hover { color:var(--accent-text); }
.career-ranks strong { margin-left:4px; }
.result-season.card { padding:0; margin-bottom:8px; overflow:clip; }
.result-season > summary { position:sticky; top:var(--bar-height); z-index:1; display:flex; align-items:center; gap:10px; min-height:40px; padding:8px 12px; background:var(--surface-2); border-bottom:1px solid var(--line); cursor:pointer; font-size:14px; }
.result-season > summary::before { content:'+'; width:12px; color:var(--muted); }
.result-season[open] > summary::before { content:'−'; }
.result-season > summary > span { margin-left:auto; }
.profile-results { min-width:570px; }
.profile-results th, .profile-results td { padding:8px; vertical-align:top; font-size:12px; }
.profile-results td:first-child { width:48%; }
.profile-results .result-event { display:block; font-size:13px; line-height:1.35; font-weight:600; color:var(--ink); text-decoration:none; }
.profile-results .cell-detail { margin:2px 0 4px; font-size:12px; }
.profile-results .place-value { font-size:14px; gap:3px; }
.profile-results .cup { width:12px; height:12px; }
.result-source summary { cursor:pointer; min-height:28px; color:var(--muted); font-size:12px; }
.result-source > span { display:block; max-width:260px; padding:4px 0; font-size:12px; color:var(--muted); }
.result-source-link { display:inline-flex; width:40px; min-height:40px; align-items:center; justify-content:center; color:var(--muted); font-size:18px; text-decoration:none; }
.group-points { display:grid; grid-template-columns:1fr auto 10px; align-items:center; gap:5px; white-space:nowrap; margin-bottom:4px; }
.counted-dot { color:var(--muted); font-size:12px; margin-left:3px; }
.counted-dot.is-counted { color:var(--accent-text); }
.chart-card { min-width:0; overflow:hidden; }
.chart-card .section-heading h2 { margin:0; }
.chart-tabs { display:inline-flex; border:1px solid var(--line); border-radius:6px; margin-top:10px; overflow:hidden; }
.chart-tabs[hidden], .chart-legend[hidden] { display:none; }
.chart-tabs button { min-height:40px; padding:6px 14px; border:0; border-radius:0; background:transparent; color:var(--muted); font-size:13px; font-weight:600; }
.chart-tabs button[aria-pressed="true"] { color:var(--accent-text); background:var(--surface-2); box-shadow:inset 0 -2px var(--accent); }
.chart-axis-label { color:var(--muted); margin:12px 0 2px; font-size:12px; }
.chart-canvas { width:100%; min-width:0; position:relative; }
.chart-canvas:empty { display:none; }
.chart-canvas .uplot { font-family:Inter,sans-serif; }
.chart-legend { display:flex; gap:4px; flex-wrap:wrap; margin-top:6px; max-height:180px; overflow-y:auto; }
.chart-legend-chip { min-height:40px; max-width:100%; padding:5px 8px; display:flex; align-items:center; gap:6px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink); text-align:left; font-size:12px; line-height:1.35; }
.chart-legend-chip[aria-pressed="false"] { color:var(--muted); background:var(--surface-2); text-decoration:line-through; }
.legend-swatch { flex:0 0 16px; width:16px; border-top:2px solid; background:transparent; }
.legend-swatch.discipline-lead { border-top-style:dashed; }
.legend-swatch.discipline-speed { border-top-style:dotted; }
.chart-tooltip { display:none; font-size:12px; line-height:1.5; color:var(--muted); padding:8px; border-radius:6px; background:var(--surface-2); overflow-wrap:anywhere; max-height:110px; overflow-y:auto; }
.chart-ready .chart-tooltip { display:block; }
.chart-data { margin-top:6px; font-size:12px; }
.chart-data summary, .shared-events summary { min-height:40px; display:flex; align-items:center; gap:8px; cursor:pointer; color:var(--muted); font-size:12px; }
.chart-data summary::before, .shared-events summary::before { content:'+'; font-size:16px; }
.chart-data[open] summary::before, .shared-events[open] summary::before { content:'−'; }
.chart-data table { font-size:12px; min-width:460px; }
.chart-explanation { line-height:1.5; margin:8px 0; }
.athlete-chips { display:flex; flex-wrap:nowrap; overflow-x:auto; gap:6px; margin:0 0 12px; padding-bottom:4px; }
.athlete-chips > * { flex:0 0 auto; white-space:nowrap; }
.athlete-chip { max-width:100%; display:flex; align-items:center; border:1px solid var(--line); background:var(--surface); border-radius:6px; overflow:hidden; }
.athlete-chip a { min-height:40px; color:var(--ink); text-decoration:none; display:flex; align-items:center; padding:6px 10px; font-size:13px; font-weight:600; }
.athlete-chip .chip-remove { justify-content:center; padding:6px; min-width:40px; font-size:20px; color:var(--muted); border-left:1px solid var(--line); }
.add-athlete { min-height:40px; padding:6px 10px; display:inline-flex; align-items:center; border:1px dashed var(--line); color:var(--accent-text); border-radius:6px; font-size:13px; text-decoration:none; }
.compare-filters { display:flex; align-items:end; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.compare-filters > label:not(.checkbox-label) { display:grid; gap:4px; color:var(--muted); font-size:12px; }
.compare-filters select { min-height:40px; max-width:100%; padding:7px 24px 7px 8px; font-size:13px; }
.compare-filters .checkbox-label { display:flex; align-items:center; gap:6px; min-height:40px; font-size:12px; }
.compare-filters input[type="checkbox"] { width:16px; min-height:16px; accent-color:var(--accent); }
.compare-filters > button { margin-left:auto; }
.head-to-head { margin:12px 0; }
.head-to-head h2 { margin:0; }
.duel-score { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:12px; padding:10px 0; }
.duel-score > a { font-size:14px; font-weight:600; text-decoration:none; color:var(--ink); overflow-wrap:anywhere; }
.duel-score > a:last-child { text-align:right; }
.duel-score strong { font-size:24px; color:var(--ink); white-space:nowrap; }
.duel-score strong span { font-weight:400; color:var(--muted); }
.shared-events table { min-width:520px; }
.shared-events th, .shared-events td { padding:8px; font-size:12px; }
.shared-events table .place-value { font-size:14px; }
.comparison-stats { margin:12px 0; }
.comparison-table { min-width:540px; }
.comparison-table th, .comparison-table td { text-align:center; padding:10px; font-size:13px; }
.comparison-table th:first-child { text-align:left; min-width:140px; }
.comparison-table thead th:not(:first-child) { min-width:150px; }
.comparison-table thead a { color:var(--ink); text-decoration:none; }
.comparison-table .career-ranks { text-align:left; }
.compare-choices { list-style:none; padding:0; }
.compare-choices li + li { border-top:1px solid var(--line); }
.compare-choices a { min-height:44px; display:flex; justify-content:space-between; align-items:center; gap:12px; text-decoration:none; color:var(--ink); font-size:14px; }
.compare-choices a > span:first-child { display:flex; align-items:center; gap:6px; }
.follow-grid { display:grid; gap:12px; margin-bottom:16px; }
.follow-card { min-width:0; }
.follow-card-heading { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.follow-card-heading h2 { margin:0; font-size:16px; }
.follow-card-heading h2 a { color:var(--ink); text-decoration:none; }
.follow-card-heading p { margin:4px 0 0; }
.follow-card h3 { font-size:12px; color:var(--muted); font-weight:600; margin:16px 0 6px; }
.follow-strip.stat-strip { margin:12px 0; }
.follow-strip.stat-strip dd { font-size:18px; }
.follow-strip.stat-strip .compact-medals { font-size:13px; }
.follow-results { list-style:none; padding:0; margin:0; }
.follow-results li { display:grid; grid-template-columns:36px minmax(0,1fr) auto; align-items:center; gap:8px; padding:8px 0; border-top:1px solid var(--line); }
.follow-results a { font-size:13px; font-weight:600; color:var(--ink); text-decoration:none; }
.follow-results small { display:block; color:var(--muted); font-size:12px; margin-top:3px; }
.follow-place .place-value { font-size:14px; gap:3px; }
.follow-place .cup { width:12px; height:12px; }
.follow-points { display:grid; gap:5px; font-size:12px; color:var(--muted); text-align:right; white-space:nowrap; }
.follow-points strong { color:var(--ink); margin-left:4px; }
.follow-picker { margin-top:16px; }
.follow-picker .search-bar { margin:12px 0 0; }
.choice-list { list-style:none; padding:0; margin:10px 0 0; }
.choice-list li { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:44px; padding:5px 0; border-top:1px solid var(--line); font-size:13px; }
.choice-list a { color:var(--ink); }
.search-bar:has(#cmp-q) { display:grid; }
.search-input-row { display:flex; gap:8px; }
.search-input-row input { width:100%; min-width:0; }
.participation-bars { list-style:none; padding:0; display:grid; gap:12px; margin:12px 0 4px; }
.participation-bars li { display:grid; grid-template-columns:minmax(0,1fr) 32px; gap:6px 10px; align-items:center; }
.participation-bars a { grid-column:1 / -1; display:flex; gap:10px; font-size:12px; color:var(--ink); text-decoration:none; }
.participation-bars time { flex:0 0 40px; color:var(--muted); }
.participation-track { height:6px; border-radius:3px; background:var(--surface-2); overflow:hidden; }
.participation-track span { display:block; height:100%; background:var(--accent); border-radius:inherit; }
.participation-bars strong { font-size:13px; text-align:right; }
@media (min-width:700px) { .follow-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .participation-bars li { grid-template-columns:minmax(0,1fr) minmax(100px,1fr) 32px; } .participation-bars a { grid-column:auto; } }
@media (min-width:1024px) { .profile-layout { grid-template-columns:minmax(0,1.45fr) minmax(0,1fr); align-items:start; } .profile-side { grid-row:auto; grid-column:2; } .profile-main { grid-column:1; grid-row:1; } }
@media (max-width:699px) { .athlete-heading { align-items:flex-start; flex-direction:column; gap:10px; } .athlete-heading h1 { font-size:24px; } .athlete-actions { width:100%; } .athlete-actions > * { flex:1; text-align:center; } .career-total { display:block; } .profile-strip.stat-strip > div { padding:0 5px; } .chart-legend { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); } .chart-legend-chip { min-width:0; } .compare-filters > label:not(.checkbox-label) { flex:1 1 110px; } .compare-filters .checkbox-label { flex:1 1 130px; } .compare-filters > button { width:100%; } }

@media (max-width:699px) {
  .profile-results { min-width:0; table-layout:fixed; }
  .profile-results th, .profile-results td { padding:8px 6px; }
  .profile-results th:first-child, .profile-results td:first-child { width:auto; }
  .profile-results th:nth-child(3), .profile-results td:nth-child(3) { width:46px; }
  .profile-results th:nth-child(4), .profile-results td:nth-child(4) { width:88px; }
  .profile-results .result-group, .profile-results .result-source-column { display:none; }
  .result-mobile-group { display:block; color:var(--muted); font-size:12px; margin:3px 0; }
  .profile-results .group-points { grid-template-columns:1fr auto; gap:2px; }
  .profile-results .group-points > span:first-child { grid-column:1 / -1; font-size:12px; }
  .profile-results .result-source > span { overflow-wrap:anywhere; }
}
@media (max-width:699px) {
  .compare-filters { display:grid; grid-template-columns:minmax(0,1fr) auto; }
  .compare-filters > label:not(.checkbox-label) { grid-column:1 / -1; }
  .compare-filters select { width:100%; }
  .compare-filters > button { width:auto; }
}

.legend-swatch.discipline-top_rope { border-top-style:double; }
