/* Medaliați Olimpici CNOS. Culorile și fonturile preiau variabilele temei Olympic.md, dacă există. */
.cm {
	--cm-head: var(--navy, #0A1A3A);
	--cm-ink: var(--ink, #0E1525);
	--cm-muted: var(--muted, #5B6478);
	--cm-line: var(--line, #E3E6EC);
	--cm-paper: var(--white, #FFFFFF);
	--cm-accent: var(--gold, #FFD200);
	--cm-link: var(--blue, #0046AE);
	--cm-display: var(--font-display, inherit);
	font-family: var(--font-body, inherit);
	color: var(--cm-ink);
}
.cm *, .cm *::before, .cm *::after { box-sizing: border-box; }
.cm a { text-decoration: none; }
.cm [hidden] { display: none !important; }
.cm-wrap { max-width: var(--container, 1280px); margin: 0 auto; padding-left: var(--gutter, 24px); padding-right: var(--gutter, 24px); }

/* Antet */
.cm-head { background: var(--cm-head); color: #fff; }
.cm-head > .cm-wrap { padding-top: 48px; padding-bottom: 48px; }
.has-overlay-header .cm-head > .cm-wrap { padding-top: 180px; }
.cm-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: rgba(255, 255, 255, .72); margin-bottom: 18px; }
.cm-crumbs a { color: rgba(255, 255, 255, .82); }
.cm-crumbs a:hover { color: #fff; }
.cm-title { margin: 0; font-family: var(--cm-display); font-weight: 900; font-size: clamp(42px, 6.4vw, 96px); line-height: .92; }
.cm-lead { margin: 18px 0 0; max-width: 40em; font-size: 19px; line-height: 1.55; color: rgba(255, 255, 255, .88); }
.cm-note { margin: 12px 0 0; font-size: 14px; color: rgba(255, 255, 255, .7); max-width: 46em; }

.cm-tally { margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.cm-tally > div { display: flex; flex-direction: column; gap: 4px; min-width: 132px; padding: 16px 18px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 6px; }
.cm-tally dt { display: flex; align-items: center; gap: 8px; font-size: 15px; color: rgba(255, 255, 255, .85); }
.cm-tally dd { margin: 0; font-family: var(--cm-display); font-weight: 800; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }

/* Medalii */
.cm-dots { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.cm-dot { display: inline-block; width: 12px; height: 12px; border-radius: 999px; flex-shrink: 0; }
.cm-dot--lg { width: 20px; height: 20px; }
.cm-dot--gold { background: linear-gradient(135deg, #F6D365, #C9962B); }
.cm-dot--silver { background: linear-gradient(135deg, #EEF1F5, #9AA3AF); }
.cm-dot--bronze { background: linear-gradient(135deg, #E3A574, #A0612F); }
.cm-dots--lg .cm-dot { width: 22px; height: 22px; }

/* Bara de unelte */
.cm-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 28px; padding-bottom: 8px; }
.cm-views { display: flex; gap: 24px; border-bottom: 1px solid var(--cm-line); }
.cm-views button { min-height: 44px; padding: 0 0 10px; margin-bottom: -1px; border: 0; border-bottom: 3px solid transparent; background: none; font: inherit; font-size: 16px; font-weight: 500; color: var(--cm-muted); cursor: pointer; }
.cm-views button[aria-selected="true"] { color: var(--cm-ink); font-weight: 700; border-bottom-color: var(--cm-link); }
.cm-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.cm-search input, .cm-select select { min-height: 46px; padding: 0 14px; border: 1px solid var(--cm-line); border-radius: 6px; background: var(--cm-paper); font: inherit; font-size: 15px; color: var(--cm-ink); }
.cm-search input { width: 240px; max-width: 100%; }
.cm-check { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; min-height: 44px; cursor: pointer; }
.cm-check input { width: 18px; height: 18px; }

.cm-body { padding-top: 28px; padding-bottom: 80px; }
.cm-empty { font-size: 17px; color: var(--cm-muted); padding: 32px 0; }

/* Card */
.cm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 20px; }
.cm-card { display: flex; flex-direction: column; background: var(--cm-paper); border: 1px solid var(--cm-line); border-radius: 6px; overflow: hidden; color: var(--cm-ink); transition: border-color .15s; }
.cm-card:hover { border-color: var(--cm-ink); }
.cm-card:hover .cm-card-name { text-decoration: underline; text-underline-offset: 4px; }
.cm-card-photo { aspect-ratio: 4 / 5; background: #E6EAF1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cm-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-initials { font-family: var(--cm-display); font-weight: 800; font-size: 56px; color: #9AA6BD; letter-spacing: .02em; }
.cm-initials--lg { font-size: 120px; color: rgba(255, 255, 255, .5); }
.cm-card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex-grow: 1; }
.cm-card-disc { font-size: 14px; font-weight: 600; color: var(--cm-link); }
.cm-card-name { font-size: 20px; line-height: 1.2; }
.cm-card-name strong { font-weight: 800; }
.cm-card-foot { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding-top: 8px; }
.cm-card-games { font-size: 14px; color: var(--cm-muted); }

/* Rând */
.cm-rows { border-top: 1px solid var(--cm-line); }
.cm-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 2fr) auto; gap: 16px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--cm-line); color: var(--cm-ink); }
.cm-row:hover .cm-row-name { text-decoration: underline; text-underline-offset: 4px; }
.cm-row-name { font-weight: 700; font-size: 18px; }
.cm-row-disc, .cm-row-games { font-size: 15px; color: var(--cm-muted); }

/* Vederea pe ediții */
.cm-games { list-style: none; margin: 0; padding: 0; }
.cm-games-item { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 2fr); gap: 16px 40px; padding: 24px 0; border-top: 1px solid var(--cm-line); }
.cm-games-head { display: flex; gap: 16px; align-items: baseline; }
.cm-games-year { font-family: var(--cm-display); font-weight: 800; font-size: 36px; line-height: 1; font-variant-numeric: tabular-nums; }
.cm-games-title { display: block; font-weight: 700; font-size: 18px; color: var(--cm-ink); }
a.cm-games-title:hover { color: var(--cm-link); text-decoration: underline; }
.cm-games-team { display: block; font-size: 14px; color: var(--cm-muted); margin-top: 2px; }
.cm-games-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cm-games-list li { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 12px; align-items: baseline; }
.cm-games-list a { font-weight: 700; color: var(--cm-ink); }
.cm-games-list a:hover { color: var(--cm-link); text-decoration: underline; }
.cm-games-what { grid-column: 2; font-size: 14px; color: var(--cm-muted); }

/* Profil */
.cm-head-grid { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; }
.cm-head-text { flex: 1 1 520px; min-width: 0; padding-bottom: 8px; }
.cm-name { margin: 0; font-family: var(--cm-display); line-height: .9; }
.cm-name-first { display: block; font-weight: 600; font-size: clamp(26px, 3vw, 40px); color: rgba(255, 255, 255, .85); margin-bottom: 6px; }
.cm-name-last { display: block; font-weight: 900; font-size: clamp(56px, 9vw, 132px); letter-spacing: -.015em; overflow-wrap: anywhere; }
.cm-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 24px 0 0; font-size: 18px; color: rgba(255, 255, 255, .9); }
.cm-head-photo { flex: 0 1 340px; min-width: 0; aspect-ratio: 4 / 5; border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, .08); display: flex; align-items: center; justify-content: center; }
.cm-head-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cm-columns { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding-top: 56px; }
.cm-main { flex: 999 1 560px; min-width: 0; max-width: 780px; display: flex; flex-direction: column; gap: 56px; }
.cm-side { flex: 1 1 260px; min-width: 0; max-width: 360px; }
.cm-h2 { margin: 0 0 20px; font-family: var(--cm-display); font-weight: 800; font-size: clamp(28px, 3vw, 40px); line-height: 1.05; }

.cm-timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--cm-line); }
.cm-timeline li { display: grid; grid-template-columns: 72px auto minmax(0, 1fr); gap: 16px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--cm-line); }
.cm-tl-year { font-family: var(--cm-display); font-weight: 800; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.cm-tl-main { display: flex; flex-direction: column; gap: 4px; }
.cm-tl-title { font-weight: 700; font-size: 18px; }
.cm-tl-title a { color: var(--cm-link); }
.cm-tl-title a:hover { text-decoration: underline; }
.cm-tl-meta { font-size: 15px; color: var(--cm-muted); }
.cm-bio .entry-content { font-size: 18px; line-height: 1.7; }

.cm-facts { margin: 0; background: var(--cm-paper); border: 1px solid var(--cm-line); border-radius: 6px; }
.cm-facts > div { padding: 16px 20px; border-bottom: 1px solid var(--cm-line); }
.cm-facts > div:last-child { border-bottom: 0; }
.cm-facts dt { font-size: 14px; color: var(--cm-muted); }
.cm-facts dd { margin: 4px 0 0; font-weight: 700; font-size: 17px; }

.cm-others { padding-top: 24px; padding-bottom: 80px; }

@media (max-width: 760px) {
	.has-overlay-header .cm-head > .cm-wrap { padding-top: 150px; }
	.cm-head-photo { flex-basis: 100%; max-width: 280px; order: -1; }
	.cm-tally > div { min-width: calc(50% - 6px); }
	.cm-tools { flex-direction: column; align-items: stretch; }
	.cm-search input { width: 100%; }
	.cm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.cm-card-name { font-size: 17px; }
	.cm-games-item { grid-template-columns: minmax(0, 1fr); }
	.cm-row { grid-template-columns: minmax(0, 1fr) auto; }
	.cm-row-disc, .cm-row-games { display: none; }
	.cm-timeline li { grid-template-columns: 56px auto minmax(0, 1fr); gap: 12px; }
	.cm-tl-year { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .cm a { transition: none; } }
