/* İmtahan nəticəsi kartı (yığcam, üfüqi). Konteyner enindən asılı: geniş = 3 sütun, dar = bal ikinci sətirdə. */
.rc-wrap { container-type: inline-size; min-width: 0; }
.rc {
    --rc-bg: #e0f2fe; --rc-fg: #0c4a6e; --rc-line: #e2e8f0;
    position: relative;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    grid-template-areas: "media main score";
    align-items: center;
    gap: 4px 12px;
    padding: 10px 12px 10px 10px;
    border: 1px solid var(--rc-line);
    border-radius: 14px;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 2px rgb(15 23 42 / .06);
    transition: box-shadow .18s ease, border-color .18s ease;
}
.rc:hover { box-shadow: 0 6px 16px rgb(15 23 42 / .12); border-color: #94a3b8; }
.rc:focus-within { box-shadow: 0 0 0 3px #1d4ed8; }
.rc--first { --rc-bg: #fef3c7; --rc-fg: #78350f; --rc-line: #f59e0b; }
.rc--second { --rc-bg: #e2e8f0; --rc-fg: #0f172a; --rc-line: #94a3b8; }
.rc--third { --rc-bg: #ffedd5; --rc-fg: #7c2d12; --rc-line: #ea580c; }
.rc--top { --rc-bg: #ede9fe; --rc-fg: #4c1d95; --rc-line: #a78bfa; }
.rc--excellent, .rc--good { --rc-bg: #d1fae5; --rc-fg: #064e3b; }
.rc--high { --rc-bg: #dbeafe; --rc-fg: #1e3a8a; }
.rc--passed { --rc-bg: #ccfbf1; --rc-fg: #134e4a; }
.rc--failed { --rc-bg: #fee2e2; --rc-fg: #7f1d1d; }

.rc__media { grid-area: media; position: relative; width: 72px; height: 72px; }
.rc__ph, .rc__zoom { position: absolute; inset: 0; border-radius: 12px; overflow: hidden; }
.rc__ph { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.75rem; font-weight: 800; }
.rc__zoom { z-index: 2; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.rc__zoom img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.rc__zoom:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
.rc__badge { position: absolute; z-index: 3; right: -6px; bottom: -6px; display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 999px; border: 2px solid #fff; font-size: 0.75rem; font-weight: 800; background: #fde68a; color: #78350f; pointer-events: none; }
.rc__badge--second { background: #cbd5e1; color: #0f172a; }
.rc__badge--third { background: #fdba74; color: #7c2d12; }
.rc__badge--top { background: #fde68a; color: #78350f; }
.rc__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.rc__main { grid-area: main; min-width: 0; }
.rc__name { margin: 0; font-size: 0.9375rem; line-height: 1.25; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rc__link { color: inherit; text-decoration: none; }
.rc__link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: 14px; }
.rc__link:focus-visible { outline: none; }
.rc__exam { margin: 2px 0 0; font-size: 0.8125rem; line-height: 1.3; color: #475569; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rc__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 4px 0 0; font-size: 0.75rem; color: #475569; }
.rc__subj { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: #1e293b; }
.rc__subj i { width: 10px; height: 10px; border-radius: 999px; flex: 0 0 auto; }
.rc__rank { font-weight: 700; color: #334155; }
.rc__star { font-weight: 700; color: #92400e; }

.rc__score { grid-area: score; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 64px; }
.rc__num { font-size: 1.5rem; line-height: 1; font-weight: 800; color: var(--rc-fg); font-variant-numeric: tabular-nums; }
.rc__max { font-size: 0.75rem; color: #475569; }
.rc__pct { display: inline-flex; padding: 2px 8px; border-radius: 999px; background: var(--rc-bg); color: var(--rc-fg); font-size: 0.8125rem; font-weight: 800; }

/* Dar kart: bal ikinci sətirdə */
@container (max-width: 299px) {
    .rc { grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "media main" "media score"; align-items: start; }
    .rc__score { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 2px; }
    .rc__num { font-size: 1.375rem; }
}
@media (prefers-reduced-motion: reduce) { .rc { transition: none; } }
