/* WDF Debate Quizzes – clean app layout */
.wdfq {
	--ink: #172033; --muted: #5E6B82; --line: #E3E8EF; --soft: #F5F7FA;
	--accent: #2B59C3; --accent-d: #1F45A0; --accent-bg: #EEF3FD;
	--ok: #0E9384; --ok-ink: #0A6A5F; --ok-bg: #E7F6F3;
	--no: #D86A12; --no-ink: #A3480A; --no-bg: #FFF3E8;
	--gold: #C29012; --silver: #7D8896; --bronze: #A0602B;
	color: var(--ink); font-family: inherit; font-size: 17px; line-height: 1.55;
	max-width: 720px; margin: 0 auto 2.5em;
}
.wdfq *, .wdfq *::before, .wdfq *::after { box-sizing: border-box; }
.wdfq h2, .wdfq h3, .wdfq p { margin: 0; color: inherit; }
.wdfq ol, .wdfq ul { margin: 0; padding: 0; list-style: none; }
.wdfq a { text-decoration: none; }
.wdfq :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wdfq-muted { color: var(--muted); }
.wdfq-small { font-size: .9em; color: var(--muted); }

/* Buttons & links */
.wdfq-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 28px; border: 0; border-radius: 12px; font: inherit; font-weight: 600; cursor: pointer; transition: background-color .15s; }
.wdfq-primary, a.wdfq-primary { background: var(--accent); color: #fff !important; }
.wdfq-primary:hover { background: var(--accent-d); }
.wdfq-primary:disabled { background: #C9D2E3; cursor: not-allowed; }
.wdfq-link, a.wdfq-link { color: var(--accent) !important; font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; }
.wdfq-link:hover { text-decoration: underline; }
.wdfq-back { display: inline-block; margin-bottom: 18px; color: var(--muted) !important; font-size: .92em; }

/* Quiz screen */
.wdfq-top { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.wdfq-exit { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--muted) !important; font-size: 26px; line-height: 1; }
.wdfq-exit:hover { background: var(--soft); }
.wdfq-track { flex: 1; height: 8px; border-radius: 99px; background: #E8ECF2; overflow: hidden; }
.wdfq-track span { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .35s ease; }
.wdfq-count { flex: none; color: var(--muted); font-size: .9em; font-variant-numeric: tabular-nums; }
.wdfq-context { color: var(--muted); font-size: .92em; margin-bottom: 8px !important; }
.wdfq-question { font-size: 1.6em; line-height: 1.3; font-weight: 650; letter-spacing: -.01em; margin-bottom: 26px !important; max-width: 34ch; }
.wdfq-tag { display: inline-block; margin: -14px 0 20px !important; padding: 2px 10px; border-radius: 99px; background: var(--soft); color: var(--muted); font-size: .85em; }

.wdfq-choices { display: grid; gap: 12px; }
.wdfq-choice { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); font-size: 1em; line-height: 1.4; cursor: pointer; transition: border-color .12s, background-color .12s; }
.wdfq-choice:hover:not(:disabled) { border-color: #C5CFDF; background: var(--soft); }
.wdfq-choice:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wdfq-key { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 9px; font-weight: 700; font-size: .9em; color: var(--muted); }
.wdfq-choice-text { flex: 1; }
.wdfq-mark { flex: none; width: 24px; text-align: center; font-weight: 800; font-size: 1.15em; }
.wdfq-choice[aria-checked="true"] { border-color: var(--accent); background: var(--accent-bg); }
.wdfq-choice[aria-checked="true"] .wdfq-key { background: var(--accent); border-color: var(--accent); color: #fff; }
.wdfq-choice:disabled { cursor: default; }
.wdfq-choice.is-correct { border-color: var(--ok); background: var(--ok-bg); }
.wdfq-choice.is-correct .wdfq-key { background: var(--ok); border-color: var(--ok); color: #fff; }
.wdfq-choice.is-correct .wdfq-mark { color: var(--ok-ink); }
.wdfq-choice.is-wrong { border-color: var(--no); background: var(--no-bg); }
.wdfq-choice.is-wrong .wdfq-key { background: var(--no); border-color: var(--no); color: #fff; }
.wdfq-choice.is-wrong .wdfq-mark { color: var(--no-ink); }
.wdfq-choice.is-dim { opacity: .5; }

.wdfq-feedback { margin-top: 20px; padding: 18px 20px; border-radius: 14px; animation: wdfq-up .2s ease-out; }
.wdfq-feedback.is-ok { background: var(--ok-bg); }
.wdfq-feedback.is-no { background: var(--no-bg); }
.wdfq-fb-head { font-weight: 700; font-size: 1.1em; margin-bottom: 4px !important; }
.is-ok .wdfq-fb-head { color: var(--ok-ink); }
.is-no .wdfq-fb-head { color: var(--no-ink); }
.wdfq-fb-answer { margin-bottom: 8px !important; }
.wdfq-fb-why { color: #33405A; }
.wdfq-fb-why span { font-weight: 600; color: var(--ink); }
@keyframes wdfq-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.wdfq-footer { display: flex; justify-content: flex-end; margin-top: 24px; }
.wdfq-footer .wdfq-btn { min-width: 170px; }
.wdfq-footer-split { justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.wdfq-links { display: flex; gap: 22px; flex-wrap: wrap; }

/* Results */
.wdfq-result-main { display: grid; grid-template-columns: 196px 1fr; gap: 32px; align-items: center; }
.wdfq-result-main .wdfq-question { margin-bottom: 6px !important; }
.wdfq-tiers { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 18px !important; }
.wdfq-tier { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; font-size: .84em; line-height: 1.3; color: var(--muted); }
.wdfq-tier-name { font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.wdfq-tier-name::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #D5DBE5; flex: none; }
.wdfq-tier-bronze .wdfq-tier-name::before { background: var(--bronze); }
.wdfq-tier-silver .wdfq-tier-name::before { background: var(--silver); }
.wdfq-tier-gold .wdfq-tier-name::before { background: var(--gold); }
.wdfq-tier.is-here { background: var(--soft); box-shadow: inset 0 0 0 2px var(--ink); }
.wdfq-tier-you { margin-top: 2px; color: var(--accent); font-weight: 600; }
.wdfq-sectionline { display: flex; gap: 16px; align-items: center; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.wdfq-sectionline p { margin-bottom: 2px !important; }
.wdfq-earned { margin-top: 4px !important; }
.wdfq-result .wdfq-footer { margin-top: 28px; }

.wdfq-review { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }
.wdfq-review summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.wdfq-review ol { margin-top: 12px !important; display: grid; gap: 14px; counter-reset: q; }
.wdfq-review li { padding-left: 14px; border-left: 3px solid var(--ok); }
.wdfq-review li.is-no { border-left-color: var(--no); }
.wdfq-review-q { font-weight: 600; }

/* Pie */
.wdfq-pie { flex: none; display: flex; justify-content: center; }
.wdfq-pie-svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.wdfq-pie-svg text { font-family: inherit; }
.wdfq-pie-num { font-size: 32px; font-weight: 700; fill: #172033; }
.wdfq-pie-cap { font-size: 12px; fill: #5E6B82; }
.wdfq-zone-label { font-size: 9px; font-weight: 800; fill: #fff; pointer-events: none; }
.wdfq-zone-label.dark { fill: #172033; }
.wdfq-slice:hover, .wdfq-zone:hover { opacity: .85; }

/* Start card on video pages */
.wdfq-intro { padding: 26px 28px; border: 1px solid var(--line); border-radius: 16px; }
.wdfq-intro-title { font-size: 1.4em; font-weight: 650; margin-bottom: 6px !important; }
.wdfq-best { margin-top: 6px !important; }
.wdfq-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 20px; }

/* Section page & hub */
.wdfq-head { margin-bottom: 22px; }
.wdfq-title { font-size: 1.9em; line-height: 1.2; font-weight: 700; letter-spacing: -.015em; margin-bottom: 6px !important; }
.wdfq-summary { display: flex; gap: 26px; align-items: center; padding: 22px 24px; border-radius: 16px; background: var(--soft); margin-bottom: 18px; }
.wdfq-summary-body { flex: 1; min-width: 0; }
.wdfq-summary-line { margin-bottom: 8px !important; }
.wdfq-summary .wdfq-muted { margin-top: 10px; }
.wdfq-meter { display: block; height: 6px; border-radius: 99px; background: #E3E8EF; overflow: hidden; margin: 6px 0; }
.wdfq-meter span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.wdfq-list > li { border-bottom: 1px solid var(--line); }
.wdfq-row { display: flex; align-items: center; gap: 16px; padding: 16px 8px; color: var(--ink) !important; border-radius: 10px; }
.wdfq-row:hover { background: var(--soft); }
.wdfq-status { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font-weight: 700; font-size: .9em; }
.wdfq-status-todo { border: 2px solid var(--line); color: var(--muted); }
.wdfq-status-gold { background: var(--gold); color: #fff; }
.wdfq-status-silver { background: var(--silver); color: #fff; }
.wdfq-status-bronze { background: var(--bronze); color: #fff; }
.wdfq-status-none { background: var(--ok); color: #fff; }
.wdfq-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wdfq-row-title { font-weight: 600; line-height: 1.35; }
.wdfq-row-meta { font-size: .88em; color: var(--muted); }
.wdfq-row-end { flex: none; display: flex; align-items: center; gap: 16px; font-size: .92em; }
.wdfq-score { color: var(--muted); font-variant-numeric: tabular-nums; }
.wdfq-row-go { color: var(--accent); font-weight: 600; }
.wdfq-lock { color: var(--muted); }
.wdfq-list.is-locked .wdfq-row-title { color: #3A465C; }
.wdfq-medal { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .82em; font-weight: 600; color: #fff; }
.wdfq-medal-gold { background: var(--gold); } .wdfq-medal-silver { background: var(--silver); } .wdfq-medal-bronze { background: var(--bronze); }

/* Members box */
.wdfq-gate { padding: 22px 24px; border-radius: 16px; background: var(--soft); margin-bottom: 18px; }
.wdfq-gate h3 { font-size: 1.15em; font-weight: 650; margin-bottom: 6px !important; }
.wdfq-gate p { color: var(--muted); margin-bottom: 16px !important; max-width: 60ch; }
.wdfq-gate .wdfq-small { margin: 12px 0 0 !important; }
.wdfq-runner.is-locked .wdfq-question { margin-bottom: 20px !important; }

/* Progress page */
.wdfq-psec { padding: 20px 0; border-bottom: 1px solid var(--line); }
.wdfq-psec-top { display: flex; gap: 18px; align-items: center; }
.wdfq-psec-body { flex: 1; min-width: 0; }
.wdfq-psec h3 { font-size: 1.1em; font-weight: 650; margin-bottom: 4px !important; }
.wdfq-psec-go { flex: none; font-size: .92em; }
.wdfq-psec .wdfq-review { margin: 14px 0 0 114px; padding-top: 0; border: 0; }
.wdfq-table { width: 100%; border-collapse: collapse; font-size: .9em; margin-top: 8px; }
.wdfq-table th, .wdfq-table td { text-align: left; padding: 7px 4px; border-bottom: 1px solid var(--line); }
.wdfq-table th { color: var(--muted); font-weight: 600; }
.wdfq-table td:nth-child(n+2), .wdfq-table th:nth-child(n+2) { text-align: right; white-space: nowrap; }

.wdfq-note { padding: 14px 18px; border-radius: 12px; background: var(--soft); margin: 16px 0 !important; }
.wdfq-error { background: var(--no-bg); color: var(--no-ink); }
.wdfq-loading { height: 220px; border-radius: 16px; background: linear-gradient(90deg, var(--soft) 25%, #EBEFF4 50%, var(--soft) 75%); background-size: 200% 100%; animation: wdfq-sh 1.2s infinite linear; }
@keyframes wdfq-sh { to { background-position: -200% 0; } }
.wdfq-runner + .wdfq-runner { margin-top: 36px; }

@media (max-width: 600px) {
	.wdfq { font-size: 16px; }
	.wdfq-question { font-size: 1.35em; }
	.wdfq-footer .wdfq-btn { width: 100%; }
	.wdfq-footer-split .wdfq-btn { order: -1; }
	.wdfq-result-main { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 18px; }
	.wdfq-tiers { grid-template-columns: repeat(2, 1fr); text-align: left; }
	.wdfq-summary { flex-direction: column; align-items: stretch; }
	.wdfq-row-end .wdfq-score { display: none; }
	.wdfq-psec-top { flex-wrap: wrap; }
	.wdfq-psec .wdfq-review { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .wdfq *, .wdfq *::before { transition: none !important; animation: none !important; } }
.wdfq-gate .wdfq-btn { min-height: 48px; padding: 10px 22px; line-height: 1.25; text-align: center; }
@media (max-width: 600px) {
	.wdfq-gate .wdfq-btn { width: 100%; }
	.wdfq-lock-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.wdfq-row { gap: 12px; padding: 14px 4px; }
}
