/* Quiz, leaderboard and content import pages. Uses the tokens of app.css. */

.wide-card, .form-card.wide { max-width: 720px; margin: 0 auto 16px; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Quiz */
.quiz .progress { color: var(--muted); font-size: .9rem; margin: 0 0 4px; }
.stem { font-family: var(--font-text); font-size: 1.15rem; font-weight: 500; white-space: pre-line; }
.choices { border: 0; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.choices.two { grid-template-columns: 1fr 1fr; }
.choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}
.choice input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--turquoise); }
.choice:has(input:checked) { border-color: var(--turquoise); background: #E9F8F6; }
.rows { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}
.row select {
    min-height: 44px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    flex: none;
}
.row.match { flex-wrap: wrap; }
.row.match span { flex: 1 1 100%; font-weight: 500; }
/* A select is as wide as its longest option; min-width: 0 lets it shrink to the phone width. */
.row.match select { flex: 1 1 100%; width: 100%; min-width: 0; }

.verdict { display: inline-block; padding: 4px 14px; border-radius: 999px; font-weight: 700; margin: 0 0 8px; }
.verdict.right { background: #E6F6EC; color: #166534; }
.verdict.wrong { background: var(--danger-bg); color: var(--danger); }
.points { display: inline-block; margin: 0 8px 8px; padding: 4px 12px; border-radius: 999px; background: var(--amber); color: var(--navy); font-weight: 700; }
.review { margin: 0 0 16px; padding-inline-start: 1.2em; }
.review li { padding: 4px 0; }
.review li.right { color: #166534; font-weight: 500; }
.review li.wrong { color: var(--danger); }
.quiz { overflow-wrap: break-word; }
.tag { display: inline-block; max-width: 100%; margin-inline-start: 6px; padding: 0 8px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: .8rem; font-weight: 400; }
.explanation { border-inline-start: 4px solid var(--turquoise); padding: 4px 12px; margin: 0 0 16px; background: var(--bg); border-radius: 6px; }
.explanation p { margin: 4px 0; }
.score { font-size: 1.2rem; }

/* Tables: leaderboard and import summary */
.table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: .95rem; }
.table th, .table td { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: start; }
.table th { color: var(--muted); font-weight: 500; }
.table tr.me td { background: #FFF3D6; font-weight: 700; }
.table tr.gap td { text-align: center; color: var(--muted); border-bottom: 0; }
.table tr.warn td { background: #FFF8EA; }
.leaderboard td:first-child, .leaderboard th:first-child { width: 3.5em; }
.you { color: var(--muted); font-weight: 400; }
.tabs { display: flex; gap: 8px; margin: 0 0 16px; }
.tabs a {
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    text-decoration: none;
    color: var(--navy);
}
.tabs a.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Import report */
.report { margin-top: 16px; }
.error-list { padding-inline-start: 1.2em; color: var(--danger); }
.error-list li { padding: 2px 0; }
.leaderboard td:nth-child(3) { font-size: .85rem; color: var(--muted); }
