/* Player ratings share one live/official display, with published rapid and blitz. */
.player-summary h1 {font-size:28px;font-weight:600;line-height:1.3;overflow-wrap:anywhere;}
.profile-facts {grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:16px;}
.profile-facts > div {padding:8px 0;}
.profile-country-value {display:flex;align-items:center;gap:6px;line-height:1.4;}
.profile-country-value .f24 {display:inline-flex;align-items:center;flex:none;}
.profile-country-value .flag {vertical-align:middle;}
.profile-fide-ratings {margin-top:16px;border-top:1px solid #e5e7eb;padding-top:20px;color:#111827;}
.profile-ratings-heading {display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;margin-bottom:16px;}
.profile-ratings-heading h2 {font-size:20px;font-weight:600;}
.profile-rating-switch {display:flex;gap:4px;padding:4px;border:1px solid #d1d5db;border-radius:8px;background:#f3f4f6;}
.profile-rating-switch button {padding:10px 14px;min-height:44px;border-radius:5px;font-size:14px;font-weight:600;color:#4b5563;}
.profile-rating-switch button[aria-pressed="true"] {background:#1f2937;color:#fff;}
.profile-rating-switch button:focus-visible,.profile-ratings-footer button:focus-visible {outline:2px solid #2563eb;outline-offset:2px;}
.profile-rating-cards {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;}
.profile-rating-card {padding:18px 20px;border:1px solid #d1d5db;border-radius:8px;background:#f9fafb;min-width:0;}
.profile-rating-value {font-size:34px;line-height:1.2;font-weight:700;font-variant-numeric:tabular-nums;}
.profile-rating-top {display:flex;flex-wrap:wrap;align-items:baseline;gap:10px;}
.profile-rating-delta {font-size:16px;font-weight:600;}
.profile-rapid .profile-rating-value {color:#ea580c;}
.profile-blitz .profile-rating-value {color:#0369a1;}
.profile-rating-card h3 {font-size:17px;font-weight:600;margin-top:14px;}
.profile-rating-source {font-size:12px;color:#6b7280;margin-top:6px;}
.profile-ratings-footer {display:flex;flex-wrap:wrap;align-items:center;gap:10px 20px;font-size:14px;margin-top:14px;}
.profile-ratings-footer a,.profile-ratings-footer button {text-decoration:underline;color:#007d83;min-height:44px;display:inline-flex;align-items:center;}
.profile-ratings-footer [hidden],.profile-rating-delta[hidden] {display:none;}
.profile-rating-update {color:#92400e;font-size:12px;}
.dark .profile-fide-ratings {color:#f3f4f6;border-color:#374151;}
.dark .profile-rating-card,.dark .profile-rating-switch {background:#111827;border-color:#4b5563;}
.dark .profile-rating-switch button {color:#d1d5db;}
.dark .profile-rating-switch button[aria-pressed="true"] {background:#e5e7eb;color:#111827;}
.dark .profile-rapid .profile-rating-value {color:#fdba74;}
.dark .profile-blitz .profile-rating-value {color:#7dd3fc;}
.dark .profile-rating-source {color:#9ca3af;}
.dark .profile-ratings-footer a,.dark .profile-ratings-footer button {color:#5eead4;}
.dark .profile-rating-update {color:#fcd34d;}
@media(max-width:600px) {
 .player-summary h1 {font-size:24px;}
 .profile-facts {grid-template-columns:repeat(2,minmax(0,1fr));}
 .profile-rating-cards {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
 .profile-classical {grid-column:1 / -1;}
 .profile-rating-card {padding:14px 10px;}
 .profile-rating-value {font-size:26px;}
 .profile-rating-card h3 {font-size:15px;}
 .profile-rating-switch {width:100%;}
 .profile-rating-switch button {flex:1;}
}


.profile-records {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:16px;}
.profile-record-panel {padding:16px 20px;border:1px solid #e5e7eb;border-radius:8px;min-width:0;}
.profile-record-panel h3 {font-size:16px;font-weight:600;margin-bottom:12px;}
.profile-record-panel dl > div {display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px 16px;margin:8px 0;font-size:14px;}
.profile-record-panel dt {color:#64748b;}
.profile-record-panel dd {font-weight:600;font-variant-numeric:tabular-nums;}
.profile-record-panel dd span {color:#64748b;font-weight:400;margin-left:6px;}
.profile-record-panel a {text-decoration:underline;}
.profile-record-note {font-size:12px;color:#64748b;margin-top:12px;}
.profile-chart-section {margin:24px 0;color:#111827;min-width:0;}
.profile-chart-heading {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;}
.profile-chart-heading h2 {font-size:22px;font-weight:600;}
.profile-chart-ranges {display:flex;gap:2px;background:#f3f4f6;border:1px solid #d1d5db;border-radius:6px;padding:3px;}
.profile-chart-ranges button,.profile-chart-types button {min-height:44px;padding:8px 12px;font-size:14px;border-radius:4px;font-weight:500;}
.profile-chart-ranges button[aria-pressed="true"] {background:#1f2937;color:#fff;}
.profile-chart-types {display:flex;flex-wrap:wrap;gap:6px;margin-top:16px;}
.profile-chart-types button {border:1px solid #d1d5db;color:#475569;}
.profile-chart-types button[aria-pressed="true"] {border-color:#4f46e5;background:#eef2ff;color:#4338ca;}
.profile-chart-types button:focus-visible,.profile-chart-ranges button:focus-visible {outline:2px solid #2563eb;outline-offset:2px;}
.profile-chart-summary {font-size:13px;color:#64748b;margin:12px 0 0;min-height:20px;}
.profile-history-chart {min-height:280px;}
.profile-chart-footer {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;color:#64748b;font-size:12px;}
.profile-chart-footer button {text-decoration:underline;min-height:44px;color:#007d83;}
.profile-chart-values summary {cursor:pointer;font-size:14px;min-height:44px;display:flex;align-items:center;text-decoration:underline;}
.profile-chart-table-scroll {max-height:260px;overflow:auto;}
.profile-chart-table-scroll table {width:100%;font-size:13px;border-collapse:collapse;}
.profile-chart-table-scroll th,.profile-chart-table-scroll td {text-align:right;padding:8px 12px;border-bottom:1px solid #e5e7eb;}
.profile-chart-table-scroll th:first-child,.profile-chart-table-scroll td:first-child {text-align:left;}
.profile-chart-table-scroll th {position:sticky;top:0;background:#f9fafb;}
.dark .profile-record-panel {border-color:#374151;}
.dark .profile-record-panel dt,.dark .profile-record-panel dd span,.dark .profile-record-note,.dark .profile-chart-summary,.dark .profile-chart-footer {color:#9ca3af;}
.dark .profile-chart-section {color:#f3f4f6;}
.dark .profile-chart-ranges {background:#111827;border-color:#4b5563;}
.dark .profile-chart-ranges button[aria-pressed="true"] {background:#e5e7eb;color:#111827;}
.dark .profile-chart-types button {border-color:#4b5563;color:#d1d5db;}
.dark .profile-chart-types button[aria-pressed="true"] {background:#312e81;border-color:#818cf8;color:#e0e7ff;}
.dark .profile-chart-footer button {color:#5eead4;}
.dark .profile-chart-table-scroll th {background:#111827;}
.dark .profile-chart-table-scroll td,.dark .profile-chart-table-scroll th {border-color:#374151;}
@media(max-width:600px){.profile-records {grid-template-columns:1fr;}.profile-record-panel {padding:14px;}.profile-chart-heading h2 {font-size:20px;}.profile-chart-types {gap:4px;}.profile-chart-types button {padding:8px 10px;font-size:13px;}.profile-chart-ranges {margin-left:auto;}}

.profile-title {display:inline-block;font-size:18px;vertical-align:middle;padding:3px 7px;background:#475569;color:#fff;border-radius:4px;line-height:1.25;}
.profile-birth-age {font-size:13px;color:#64748b;}
.dark .profile-birth-age {color:#9ca3af;}

.profile-chart-downloads {display:flex;gap:16px;flex-wrap:wrap;}
.profile-chart-export-status {font-size:12px;color:#92400e;}
.profile-chart-downloads button:disabled {opacity:.5;}
.dark .profile-chart-export-status {color:#fcd34d;}
