/*
 * Quiz Hub - /quiz-hub/
 *
 * The playable quiz landing. Rebuilt from a React prototype into the
 * Momentum design: 3px navy outlines, bold tight Inter, orange eyebrow,
 * pill buttons. List layout (full-width quiz rows). Conditionally
 * enqueued on the quiz-hub page only (see inc/enqueue.php). Depends on
 * the shared tokens + .skg-btn / .skg-eyebrow / .skg-wrap from main.css.
 */

/* Line-style icons rendered via the inline <symbol> sprite. fill/stroke
   are inherited properties, so set them on the referencing <svg>. */
.skg-qh-icon {
	display: block; fill: none; stroke: currentColor;
	stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}

/* ============ HERO ============ */
.skg-qh-hero {
	background: var(--skg-soft);
	border-bottom: 3px solid var(--skg-navy);
}
.skg-qh-hero .skg-wrap {
	max-width: 860px; text-align: center;
	padding: clamp(56px, 8vw, 92px) 28px;
}
.skg-qh-hero h1 {
	font-size: clamp(2.5rem, 5.4vw, 3.9rem);
	letter-spacing: -.03em; margin: 16px 0 16px;
}
.skg-qh-hero p {
	font-size: 1.16rem; color: var(--skg-muted);
	font-weight: 500; max-width: 600px; margin: 0 auto;
	line-height: 1.55;
}
.skg-qh-badges {
	display: flex; flex-wrap: wrap; gap: 10px;
	justify-content: center; margin-top: 28px;
}
.skg-qh-badge {
	display: inline-flex; align-items: center; gap: 7px;
	font-weight: 800; font-size: .85rem; color: var(--skg-navy);
	background: #fff; border: 2.5px solid var(--skg-navy);
	border-radius: var(--skg-r-pill); padding: 8px 16px;
}
.skg-qh-badge svg { width: 16px; height: 16px; }

/* ============ LIST ============ */
.skg-qh-list { padding: clamp(56px, 8vw, 92px) 0; }
.skg-qh-rows { display: flex; flex-direction: column; gap: 20px; }

.skg-qh-card {
	display: flex; align-items: center; gap: 26px;
	width: 100%; text-align: left; font: inherit;
	background: #fff; cursor: pointer;
	border: 3px solid var(--skg-navy); border-radius: var(--skg-r);
	padding: 24px 30px; color: var(--skg-ink);
	transition: box-shadow .15s ease, transform .15s ease;
}
.skg-qh-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 18px 38px -18px rgba(34, 45, 64, .45);
}
.skg-qh-card:focus-visible {
	outline: 3px solid var(--skg-blue); outline-offset: 3px;
}

/* Tone-coloured icon chip (--qh-tone / --qh-fg set inline per card). */
.skg-qh-ico {
	flex: none; width: 64px; height: 64px;
	display: grid; place-items: center;
	border: 3px solid var(--skg-navy); border-radius: var(--skg-r-sm);
	background: var(--qh-tone, var(--skg-blue));
	color: var(--qh-fg, #fff);
}
.skg-qh-ico svg { width: 30px; height: 30px; }

.skg-qh-main { flex: 1; min-width: 0; }
.skg-qh-tagline { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.skg-qh-cat {
	font-size: .72rem; font-weight: 900; letter-spacing: .09em;
	text-transform: uppercase; color: var(--skg-muted);
}
.skg-qh-hot {
	font-size: .68rem; font-weight: 900; letter-spacing: .06em;
	text-transform: uppercase; color: var(--skg-navy);
	background: var(--skg-orange); border: 2px solid var(--skg-navy);
	border-radius: var(--skg-r-pill); padding: 3px 10px;
}
.skg-qh-card h3 {
	font-size: 1.35rem; letter-spacing: -.02em; line-height: 1.2;
	margin: 0 0 5px; color: var(--skg-navy);
}
.skg-qh-card p {
	margin: 0; color: var(--skg-muted);
	font-size: .98rem; font-weight: 500; line-height: 1.5;
}

.skg-qh-meta {
	flex: none; display: flex; align-items: center; gap: 20px;
	color: var(--skg-muted); font-weight: 700; font-size: .9rem;
}
.skg-qh-meta span { display: inline-flex; align-items: center; gap: 7px; }
.skg-qh-meta svg { width: 16px; height: 16px; }

.skg-qh-go {
	flex: none; display: grid; place-items: center;
	width: 46px; height: 46px; border-radius: 50%;
	border: 2.5px solid var(--skg-navy); color: var(--skg-navy);
	background: #fff; transition: background .14s ease, color .14s ease, transform .14s ease;
}
.skg-qh-go svg { width: 20px; height: 20px; }
.skg-qh-card:hover .skg-qh-go {
	background: var(--skg-orange); transform: translateX(3px);
}

/* ============ CLOSING CTA ============ */
.skg-qh-cta {
	background: var(--skg-navy);
	border-top: 3px solid var(--skg-navy);
}
.skg-qh-cta .skg-wrap {
	text-align: center; padding: clamp(60px, 8vw, 96px) 28px;
}
.skg-qh-cta h2 {
	color: #fff; font-size: clamp(2rem, 4.4vw, 3rem);
	letter-spacing: -.03em; margin-bottom: 14px;
}
.skg-qh-cta p {
	color: #aab4c6; font-size: 1.1rem; font-weight: 500;
	max-width: 560px; margin: 0 auto 28px;
}

/* ============ PLAYER MODAL ============ */
.skg-qh-modal {
	position: fixed; inset: 0; z-index: 9999;
	display: none; align-items: center; justify-content: center;
	padding: 24px; background: rgba(34, 45, 64, .85);
	-webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.skg-qh-modal.is-open { display: flex; }
.skg-qh-box {
	position: relative; background: #fff; width: 100%; max-width: 600px;
	max-height: 92vh; overflow-y: auto;
	border: 3px solid var(--skg-navy); border-radius: var(--skg-r);
	--qh-tone: var(--skg-blue); --qh-fg: #fff;
}

.skg-qh-top {
	display: flex; align-items: center; justify-content: space-between;
	gap: 16px; padding: 22px 26px 14px;
}
.skg-qh-top .skg-qh-cat { font-size: .76rem; }
.skg-qh-close {
	flex: none; width: 40px; height: 40px; display: grid; place-items: center;
	background: var(--skg-soft); border: 2px solid var(--skg-navy);
	border-radius: 50%; cursor: pointer; color: var(--skg-navy);
}
.skg-qh-close svg { width: 18px; height: 18px; }
.skg-qh-close:hover { background: var(--skg-orange); }

.skg-qh-prog-wrap { padding: 0 26px; }
.skg-qh-prog {
	height: 8px; border-radius: var(--skg-r-pill);
	background: var(--skg-soft); border: 2px solid var(--skg-navy);
	overflow: hidden;
}
.skg-qh-prog-bar {
	height: 100%; width: 0; background: var(--qh-tone);
	transition: width .3s ease;
}
.skg-qh-count {
	margin-top: 10px; font-size: .8rem; font-weight: 900;
	letter-spacing: .03em; color: var(--skg-muted);
}

.skg-qh-body { padding: 22px 26px 32px; }
.skg-qh-q {
	font-size: 1.45rem; letter-spacing: -.02em; line-height: 1.25;
	margin: 0 0 22px; color: var(--skg-navy);
}
.skg-qh-answers { display: flex; flex-direction: column; gap: 12px; }
.skg-qh-ans {
	display: flex; align-items: center; gap: 16px; width: 100%;
	text-align: left; font: inherit; cursor: pointer;
	background: #fff; border: 2.5px solid var(--skg-line);
	border-radius: var(--skg-r-sm); padding: 14px 16px;
	transition: border-color .14s ease, background .14s ease, transform .14s ease;
}
.skg-qh-ans:hover { border-color: var(--skg-navy); background: var(--skg-soft); }
.skg-qh-ans.is-picked {
	border-color: var(--qh-tone); background: var(--skg-soft);
}
.skg-qh-ans-letter {
	flex: none; width: 32px; height: 32px; border-radius: 50%;
	display: grid; place-items: center; font-weight: 900; font-size: .85rem;
	background: var(--skg-soft); color: var(--skg-muted);
	border: 2px solid var(--skg-line);
	transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.skg-qh-ans.is-picked .skg-qh-ans-letter {
	background: var(--qh-tone); color: #fff; border-color: var(--qh-tone);
}
.skg-qh-ans-letter svg { width: 17px; height: 17px; }
.skg-qh-ans-label {
	font-size: 1rem; font-weight: 700; color: var(--skg-navy); line-height: 1.4;
}

/* Result screen */
.skg-qh-result { padding: 28px 30px 36px; text-align: center; }
.skg-qh-result-ico {
	width: 88px; height: 88px; margin: 0 auto 22px;
	display: grid; place-items: center;
	border: 3px solid var(--skg-navy); border-radius: var(--skg-r-sm);
	background: var(--qh-tone); color: var(--qh-fg);
}
.skg-qh-result-ico svg { width: 44px; height: 44px; }
.skg-qh-result-score {
	display: inline-flex; font-weight: 900; font-size: .82rem;
	letter-spacing: .03em; color: var(--skg-navy);
	background: var(--skg-soft); border: 2px solid var(--skg-navy);
	border-radius: var(--skg-r-pill); padding: 6px 16px; margin-bottom: 14px;
}
.skg-qh-result-eyebrow {
	font-size: .8rem; font-weight: 900; letter-spacing: .1em;
	text-transform: uppercase; color: var(--skg-orange); margin-bottom: 10px;
}
.skg-qh-result h2 {
	font-size: clamp(1.6rem, 3.4vw, 2.1rem); letter-spacing: -.02em;
	margin: 0 0 12px; color: var(--skg-navy);
}
.skg-qh-result p {
	color: var(--skg-muted); font-weight: 500; font-size: 1.05rem;
	line-height: 1.55; max-width: 46ch; margin: 0 auto 26px;
}
.skg-qh-result-actions {
	display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}
/* Keep the result CTAs compact and on a single line (the default .skg-btn
   sizing is built for full-width hero CTAs). */
.skg-qh-result-actions .skg-btn {
	padding: 13px 22px; font-size: .95rem; white-space: nowrap;
}
.skg-qh-result-actions .skg-qh-icon { width: 18px; height: 18px; }
.skg-qh-restart {
	margin-top: 22px; background: none; border: none; cursor: pointer;
	color: var(--skg-blue-deep); font-weight: 800; font-size: .9rem;
	text-decoration: underline; text-underline-offset: 3px;
}

/* Step fade animation */
.skg-qh-step { animation: skg-qh-fade .22s ease; }
@keyframes skg-qh-fade {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 760px) {
	.skg-qh-card { flex-wrap: wrap; gap: 16px 18px; padding: 20px; }
	.skg-qh-ico { width: 54px; height: 54px; }
	.skg-qh-ico svg { width: 26px; height: 26px; }
	.skg-qh-main { flex-basis: calc(100% - 72px); }
	.skg-qh-meta { order: 3; flex-basis: 100%; gap: 18px; }
	.skg-qh-go { display: none; }
	.skg-qh-q { font-size: 1.25rem; }
}
