:root {
	--parchment: #f3ead9;
	--parchment-2: #ece0c8;
	--ink: #2b2117;
	--muted: #705f48;
	--wood: #5c3a21;
	--burgundy: #7a1f2b;
	--gold: #a9812f;
	--line: #d9c9a8;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
	background: var(--parchment);
	color: var(--ink);
	font-family: Georgia, "Palatino Linotype", serif;
	line-height: 1.6;
}
a { color: inherit; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 1.5rem; }

header.site {
	text-align: center; padding: 3rem 0 2rem;
	border-bottom: 4px double var(--wood);
}
.crest {
	width: 56px; height: 56px; margin: 0 auto 1rem; border: 2px solid var(--wood);
	border-radius: 50%; display: flex; align-items: center; justify-content: center;
	font-size: 1.6rem; color: var(--wood); background: var(--parchment-2);
}
.masthead { font-size: 2.4rem; margin: 0; letter-spacing: 0.02em; color: var(--wood); }
.masthead a { text-decoration: none; color: inherit; }
.dek { color: var(--muted); font-style: italic; margin-top: 0.4rem; }
nav.top { display: flex; justify-content: center; gap: 2rem; margin-top: 1.5rem; font-family: system-ui, sans-serif; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
nav.top a { color: var(--burgundy); text-decoration: none; }
nav.top a:hover { text-decoration: underline; }

.hero { text-align: center; padding: 2.5rem 0; }
.hero h1 { font-size: 1.9rem; color: var(--ink); margin: 0 0 1rem; }
.hero p { color: var(--muted); max-width: 38rem; margin: 0 auto; }
.ornament { text-align: center; color: var(--gold); font-size: 1.2rem; margin: 1.5rem 0; letter-spacing: 0.5rem; }
.datestamp { font-family: system-ui, sans-serif; font-size: 0.8rem; color: var(--burgundy); text-transform: uppercase; letter-spacing: 0.08em; }

section.block { padding: 2rem 0; }
h2.section-title { text-align: center; font-size: 1.5rem; color: var(--wood); margin: 0 0 1.75rem; font-variant: small-caps; }

.frame { background: var(--parchment-2); border: 1px solid var(--line); border-radius: 4px; padding: 1.5rem; box-shadow: inset 0 0 0 4px var(--parchment); }
.table-scroll { overflow-x: auto; }

table.rating { width: 100%; border-collapse: collapse; }
table.rating th { text-align: left; font-family: system-ui, sans-serif; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 0.5rem 0.6rem; border-bottom: 2px solid var(--wood); white-space: nowrap; }
table.rating td { padding: 0.6rem; border-bottom: 1px solid var(--line); }
table.rating td.rank { font-style: italic; color: var(--burgundy); font-weight: 700; width: 2.5rem; }
table.rating td.rating-val { text-align: right; font-weight: 700; color: var(--wood); font-variant-numeric: tabular-nums; }
table.rating a { color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--gold); }
table.rating a:hover { color: var(--burgundy); }
table.rating tbody tr:nth-child(even) { background: rgba(169,129,47,0.06); }

.source-note { font-family: system-ui, sans-serif; font-size: 0.72rem; color: var(--muted); text-align: center; margin-top: 0.85rem; }
.source-note a { color: var(--burgundy); }

.player-cell { white-space: nowrap; }
.title-badge { display: inline-block; background: var(--burgundy); color: var(--parchment); font-family: system-ui, sans-serif; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.02em; padding: 0.05rem 0.28rem; border-radius: 3px; margin-right: 0.35rem; vertical-align: middle; }
.flag-icon { width: 16px; height: 12px; margin-left: 0.4rem; vertical-align: middle; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }

.record-plaque { text-align: center; padding: 1.5rem; border: 2px solid var(--gold); border-radius: 4px; background: var(--parchment-2); margin-bottom: 1.5rem; }
.record-plaque .big { font-size: 1.6rem; color: var(--wood); font-weight: 700; }
.record-plaque .small { color: var(--muted); font-size: 0.9rem; margin-top: 0.3rem; }

.champ-note { max-width: 40rem; margin: 0 auto; text-align: center; color: var(--ink); }
.champ-note b { color: var(--burgundy); }

.timeline { list-style: none; padding: 0; margin: 1.5rem auto 0; max-width: 30rem; }
.timeline li { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px dotted var(--line); font-family: system-ui, sans-serif; font-size: 0.9rem; }
.timeline li .nm { font-family: Georgia, serif; font-style: italic; color: var(--wood); }
.timeline li .yr { color: var(--muted); }

.supporters { text-align: center; }
.supporters .sponsored-tag { display: block; font-family: system-ui, sans-serif; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-top: 1rem; }
.logos { display: flex; justify-content: center; gap: 2rem; margin-top: 1.5rem; flex-wrap: wrap; }
.logo-box { width: 60px; height: 60px; padding: 0.5rem; border: 1px solid var(--gold); border-radius: 8px; background: var(--parchment-2); display: flex; align-items: center; justify-content: center; text-decoration: none; }
.logo-box:hover { background: var(--parchment); }
.logo-box img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

footer.site-footer { text-align: center; padding: 2.5rem 0; color: var(--muted); font-family: system-ui, sans-serif; font-size: 0.8rem; border-top: 4px double var(--wood); margin-top: 1.5rem; }
footer.site-footer a { color: var(--burgundy); }

/* Player page */
.breadcrumb { font-family: system-ui, sans-serif; font-size: 0.8rem; color: var(--muted); text-align: center; margin: 1.5rem 0 0; }
.breadcrumb a { color: var(--burgundy); text-decoration: none; }

.player-hero { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: start; padding: 2.5rem 0; }
.player-photo { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border: 3px solid var(--wood); border-radius: 4px; display: block; }
.photo-credit { font-family: system-ui, sans-serif; font-size: 0.65rem; color: var(--muted); text-align: center; margin-top: 0.4rem; }
.photo-credit a { color: var(--muted); }
.player-hero h1 { font-size: 2rem; color: var(--wood); margin: 0 0 0.5rem; }
.player-hero .status-tag { display: inline-block; background: var(--burgundy); color: var(--parchment); font-family: system-ui, sans-serif; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.25rem 0.6rem; border-radius: 3px; margin-bottom: 0.75rem; }

.bio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem; margin: 1.5rem 0; }
.bio-item { background: var(--parchment-2); border: 1px solid var(--line); border-radius: 6px; padding: 0.7rem 0.85rem; overflow: hidden; }
.bio-item .label { font-family: system-ui, sans-serif; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.bio-item .value { font-size: 0.85rem; color: var(--wood); font-weight: 700; margin-top: 0.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.achievements { max-width: 40rem; margin: 0 auto; }
.achievements li { margin-bottom: 0.5rem; }

.external-links { text-align: center; font-family: system-ui, sans-serif; font-size: 0.85rem; margin-top: 1.5rem; }
.external-links a { color: var(--burgundy); }

@media (max-width: 620px) {
	.player-hero { grid-template-columns: 1fr; text-align: center; }
	.player-photo { max-width: 220px; margin: 0 auto; }
}

/* Detailed player profile: rating chart + compact accent-grid tables */
.chart-wrap { text-align: center; margin: 1.5rem 0; }
.chart-wrap svg { max-width: 100%; height: auto; }

.accent-grid { max-width: 700px; width: 100%; margin: 0 auto; font-family: system-ui, sans-serif; border-collapse: collapse; border-spacing: 0; }
.accent-grid th, .accent-grid td { font-weight: normal; text-align: inherit; padding: 0; margin: 0; }
.ag-head { display: grid; grid-template-columns: 90px 1fr auto; gap: 0.75rem; padding: 0 0.75rem 0.4rem; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border-bottom: 2px solid var(--wood); margin-bottom: 0.4rem; }
.ag-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 0.75rem; align-items: baseline; padding: 0.45rem 0.6rem 0.45rem 0.75rem; border-left: 3px solid var(--gold); background: var(--parchment-2); margin-bottom: 3px; font-size: 0.85rem; }
.ag-row.accent { border-left-color: var(--burgundy); background: #f0e2c8; }
.ag-row .ag-year { font-family: Georgia, serif; font-style: italic; color: var(--burgundy); font-weight: 700; font-size: 0.85rem; }
.ag-row .ag-main { color: var(--ink); }
.ag-row .ag-side { color: var(--wood); font-weight: 700; text-align: right; white-space: nowrap; font-size: 0.8rem; }

.table-source-note { font-family: system-ui, sans-serif; font-size: 0.72rem; color: var(--muted); text-align: center; margin-top: 0.75rem; }

@media (max-width: 560px) {
	.ag-head { display: none; }
	.ag-row { grid-template-columns: 1fr; gap: 0.15rem; }
	.ag-row .ag-side { text-align: left; }
}
