/*
 * Home-check quiz: progress bar + the "result is in" completion state.
 * Rendered by js/quiz-engine.js on the six *-check.html pages, loaded AFTER
 * custom.css (which still owns the base quiz look). Nov 28 2026, Eliott:
 * "the answer looks like another question, it needs an indicator like
 * 'the results are in'". Gold stays for the primary button and accents;
 * the done state is green, the same green as the GREEN result badge.
 * Every text colour here is >= 4.5:1 on the card (#1A2230).
 */

/* progress: "Question N of M" + a thin bar */
.qe-quiz-sub .qe-prog-text { display: block; color: rgba(240, 240, 240, 0.72); }
.qe-prog-check { display: inline-block; margin-right: 7px; color: #5fc98a; font-weight: 700; }
.qe-prog-bar { display: block; height: 4px; margin-top: 8px; background: rgba(255, 255, 255, 0.1); border-radius: 2px; overflow: hidden; }
.qe-prog-fill { display: block; height: 100%; background: var(--amber); border-radius: 2px; transition: width 0.25s ease; }
.qe-prog-bar.is-done .qe-prog-fill { background: #5fc98a; }

/* the finished card reads differently from a question card */
.qe-quiz.qe-quiz-done { border-top: 4px solid #5fc98a; }
.qe-result-banner {
	display: flex; align-items: center; gap: 10px;
	margin: 0 0 18px; padding: 12px 14px;
	border-radius: var(--radius-btn);
	background: rgba(95, 201, 138, 0.12); border: 1px solid rgba(95, 201, 138, 0.35);
	font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 19px;
	text-transform: uppercase; letter-spacing: 1px; color: #8fe0b0;
}
.qe-result-check {
	display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
	width: 26px; height: 26px; border-radius: 50%;
	background: #5fc98a; color: #0f1a14; font-size: 15px; letter-spacing: 0;
}

/* secondary actions at the bottom of the result */
.qe-result-actions {
	display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 20px;
	margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border);
}
.qe-result-actions .pc-back,
.qe-result-actions .pc-restart { display: inline-block; margin: 0; color: rgba(240, 240, 240, 0.66); }
.qe-result-actions .pc-back:hover,
.qe-result-actions .pc-restart:hover { color: var(--amber); }

/* result lists and comparison boxes are information, never pickable */
.pc-result .pc-compare-box,
.pc-result .pc-reasons li { cursor: default; }

@media (prefers-reduced-motion: reduce) {
	.qe-prog-fill { transition: none; }
}

/* Result, desktop: result on the left, the lead form on the right (owner, Nov 28 2026).
 * 1. At >= 992px the card widens past the single-column question cap, only while it
 *    shows a result. Selector is (0,3,0) on purpose so a page-level cap such as
 *    ".qe-quiz-section .qe-quiz" (0,2,0) never wins over it.
 * 2. The two columns are a CONTAINER query on the card, not a viewport query: they
 *    only appear when the card itself is at least 820px wide. On a page that still
 *    has the old intro column (a half-width card) the result stays one column, so
 *    this branch is safe to merge before or after the single-column page change.
 * 3. Below that: one column in DOM order, the form after the result, as before. */
@media (min-width: 992px) {
	.qe-quiz-section .qe-quiz.qe-quiz--result { max-width: 1160px; width: 100%; }
}
/* inline-size containment makes a shrink-to-fit card collapse to zero width (a
 * centered grid item with margin:auto is shrink-to-fit), so the result card always
 * takes the full width it is allowed. */
.qe-quiz.qe-quiz--result { container-type: inline-size; container-name: qe-result; width: 100%; box-sizing: border-box; }
@container qe-result (min-width: 820px) {
	.qe-result-grid {
		display: grid;
		grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
		grid-template-areas: "main aside" "actions aside";
		grid-template-rows: auto 1fr;
		column-gap: 40px;
		align-items: start;
	}
	.qe-result-main { grid-area: main; min-width: 0; }
	.qe-result-aside {
		grid-area: aside; align-self: start;
		position: sticky; top: calc(var(--qe-sticky-top, 0px) + 24px);
		padding-left: 32px; border-left: 1px solid var(--border);
	}
	.qe-result-aside .pc-lead { margin-top: 0; border-top: 0; padding-top: 0; }
	.qe-result-actions { grid-area: actions; align-self: start; }
}

/* position:sticky needs every ancestor between the form and the page scroll to be a
 * non-scroll container. The theme sets overflow:hidden on #page and overflow-x:hidden
 * on html and body, each of which silently turns sticky off. overflow-x:clip clips the
 * same way without creating a scroll container. Scoped to a page that is showing a
 * quiz result on a wide screen; browsers without :has or clip keep the theme's rules
 * and the form simply doesn't stick. */
@media (min-width: 992px) {
	html:has(.qe-quiz--result),
	html:has(.qe-quiz--result) body { overflow-x: clip; overflow-y: visible; }
	#page.site:has(.qe-quiz--result) { overflow: clip; }
}

/* Charger comparison (owner ruling Nov 28 2026): a table on wider screens,
 * two labelled blocks on phones. One column may carry "Fits your answers". */
.pc-ctable-wrap { margin: 4px 0 20px; }
.pc-ctable { width: 100%; border-collapse: collapse; table-layout: fixed; font-family: Barlow, sans-serif; font-size: 13.5px; }
.pc-ctable th, .pc-ctable td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); color: rgba(240, 240, 240, 0.86); font-weight: 400; line-height: 1.5; }
.pc-ctable thead th { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: 0.5px; color: #F0F0F0; border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
.pc-ctable thead td { width: 26%; }
.pc-ctable tbody th { color: rgba(240, 240, 240, 0.66); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.4px; }
.pc-ctable .is-fit { background: rgba(95, 201, 138, 0.07); }
.pc-fit { display: inline-block; margin: 6px 0 0; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(95, 201, 138, 0.5); color: #8fe0b0; font-family: Barlow, sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 0.3px; text-transform: none; white-space: nowrap; }
.pc-ctable thead .pc-fit { display: table; }
.pc-fit-reason { font-family: Barlow, sans-serif; font-size: 13.5px; color: #F0F0F0; margin: 12px 0 8px; line-height: 1.55; }
.pc-fit-reason strong { color: #8fe0b0; font-weight: 600; }
.pc-ctable-note { font-family: Barlow, sans-serif; font-size: 12.5px; color: rgba(240, 240, 240, 0.72); margin: 0 0 6px; line-height: 1.55; }
.pc-cblocks { display: none; }
.pc-cblock { border: 1px solid rgba(255, 255, 255, 0.12); border-radius: var(--radius-btn); padding: 12px 14px; margin: 0 0 10px; }
.pc-cblock.is-fit { border-color: rgba(95, 201, 138, 0.5); background: rgba(95, 201, 138, 0.06); }
.pc-cblock-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 16px; text-transform: uppercase; letter-spacing: 0.5px; color: #F0F0F0; margin: 0 0 8px; }
.pc-cblock-title .pc-fit { margin: 0 0 0 8px; vertical-align: middle; }
.pc-cblock dl { margin: 0; }
.pc-cblock dt { font-family: Barlow, sans-serif; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; color: rgba(240, 240, 240, 0.66); margin: 8px 0 2px; }
.pc-cblock dd { font-family: Barlow, sans-serif; font-size: 15px; color: rgba(240, 240, 240, 0.9); margin: 0; line-height: 1.5; }
@media (max-width: 599px) {
	.pc-ctable { display: none; }
	.pc-cblocks { display: block; }
}

/* Generator sizer (generators.html, js/generator-sizer.js): same progress bar, banner and
 * two-column result, re-inked for its white card on the light panel (every text colour
 * >= 4.5:1 on #FFFFFF). The panel sits beside the page's left menu, so the card is narrower
 * than a quiz-page card: the two result columns start at a 560px card (desktop only), and
 * split closer to even because the sizer's result column is short. */
.qe-gen-light .qe-gen-sizer .qe-quiz-sub .qe-prog-text { color: #6B7075; }
.qe-gen-light .qe-gen-sizer .qe-prog-check { color: #1E7A47; }
.qe-gen-light .qe-gen-sizer .qe-prog-bar { background: #E6E3DC; }
.qe-gen-light .qe-gen-sizer .qe-prog-bar.is-done .qe-prog-fill { background: #2E9E5E; }
.qe-gen-light .qe-gen-sizer.qe-quiz.qe-quiz-done { border-top: 4px solid #2E9E5E; }
.qe-gen-light .qe-gen-sizer .qe-result-banner { background: #EAF6EF; border-color: rgba(30, 122, 71, 0.35); color: #1E6B40; }
.qe-gen-light .qe-gen-sizer .qe-result-check { background: #2E9E5E; color: #FFFFFF; }
.qe-gen-light .qe-gen-sizer .qe-result-actions { border-top-color: #D7D4CC; }
.qe-gen-light .qe-gen-sizer .qe-result-actions .pc-back,
.qe-gen-light .qe-gen-sizer .qe-result-actions .pc-restart { color: #6B7075; }
.qe-gen-light .qe-gen-sizer .qe-result-actions .pc-back:hover,
.qe-gen-light .qe-gen-sizer .qe-result-actions .pc-restart:hover { color: #8A5A0E; }
.qe-gen-sizer .qe-result-main .qe-gen-sizer-cta { margin-bottom: 14px; }
@media (min-width: 992px) {
	@container qe-result (min-width: 560px) {
		.qe-gen-sizer .qe-result-grid {
			display: grid;
			grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
			grid-template-areas: "main aside" "actions aside";
			grid-template-rows: auto 1fr;
			column-gap: 32px;
			align-items: start;
		}
		.qe-gen-sizer .qe-result-main { grid-area: main; min-width: 0; }
		.qe-gen-sizer .qe-result-aside {
			grid-area: aside; align-self: start;
			position: sticky; top: calc(var(--qe-sticky-top, 0px) + 24px);
			padding-left: 28px; border-left: 1px solid #D7D4CC;
		}
		.qe-gen-sizer .qe-result-aside .pc-lead { margin-top: 0; border-top: 0; padding-top: 0; }
		.qe-gen-sizer .qe-result-actions { grid-area: actions; align-self: start; }
	}
}

/* "Keep going" cards at the end of a result (js/keep-going.js, owner Nov 28 2026): the
 * related checks, so nobody has to go back to the home page to find the next one. One
 * column of compact cards, quiet next to the result itself. The card footer line ("The
 * three EV checks: ...") is hidden while a result shows, because the cards replace it. */
.qe-quiz.qe-quiz--result .qe-quiz-more { display: none; }
.qe-keep { margin: 22px 0 4px; padding-top: 16px; border-top: 1px solid var(--border); }
.qe-keep-head { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 3px; color: rgba(240, 240, 240, 0.72); margin: 0 0 10px; }
.qe-keep-cards { display: grid; gap: 10px; }
a.qe-keep-card {
	display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center;
	padding: 10px 12px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: var(--radius-btn);
	background: rgba(255, 255, 255, 0.02); text-decoration: none; transition: border-color 0.2s, background 0.2s;
}
a.qe-keep-card:hover, a.qe-keep-card:focus-visible { border-color: rgba(232, 160, 32, 0.55); background: rgba(255, 255, 255, 0.04); }
a.qe-keep-card:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.qe-keep-thumb { display: block; width: 96px; height: 53px; object-fit: cover; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.08); box-sizing: border-box; }
.qe-keep-glyph { display: flex; align-items: center; justify-content: center; background: rgba(232, 160, 32, 0.08); }
.qe-keep-glyph svg { width: 26px; height: 26px; fill: none; stroke: var(--amber); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.qe-keep-body { display: block; min-width: 0; }
.qe-keep-name { display: block; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 16px; text-transform: uppercase; letter-spacing: 0.5px; color: #F0F0F0; line-height: 1.2; }
.qe-keep-line { display: block; font-family: Barlow, sans-serif; font-size: 13.5px; line-height: 1.45; color: rgba(240, 240, 240, 0.78); margin: 2px 0 3px; }
.qe-keep-cta { display: block; font-family: Barlow, sans-serif; font-size: 13px; font-weight: 600; color: var(--amber); }
@media (max-width: 420px) {
	a.qe-keep-card { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
	.qe-keep-thumb { width: 64px; height: 44px; }
}
/* the sizer's white card */
.qe-gen-light .qe-gen-sizer .qe-keep { border-top-color: #D7D4CC; }
.qe-gen-light .qe-gen-sizer .qe-keep-head { color: #6B7075; }
.qe-gen-light .qe-gen-sizer a.qe-keep-card { border-color: #D7D4CC; background: #FFFFFF; }
.qe-gen-light .qe-gen-sizer a.qe-keep-card:hover,
.qe-gen-light .qe-gen-sizer a.qe-keep-card:focus-visible { border-color: #8A5A0E; background: #FAF8F3; }
.qe-gen-light .qe-gen-sizer .qe-keep-glyph { background: #F5F1E6; border-color: #E6E3DC; }
.qe-gen-light .qe-gen-sizer .qe-keep-glyph svg { stroke: #8A5A0E; }
.qe-gen-light .qe-gen-sizer .qe-keep-name { color: #1B2025; }
.qe-gen-light .qe-gen-sizer .qe-keep-line { color: #3A4046; }
.qe-gen-light .qe-gen-sizer .qe-keep-cta { color: #8A5A0E; }

/* "Straight answers" (Nov 28 2026): plain questions and answers under each quiz, in the
 * page source, so search engines and AI assistants can read what the quiz says without
 * clicking through it. Collapsed by default so the quiz stays the page. The FAQPage
 * structured data is generated FROM this markup by tools/seo-head.js. */
.qe-faq-section { background: var(--dark-2); padding: 56px 0 64px; border-bottom: 1px solid var(--border); }
.qe-faq { max-width: 860px; margin: 0 auto; }
.qe-faq .qe-h2 { font-size: 30px; margin-bottom: 8px; }
.qe-faq-sub { font-family: Barlow, sans-serif; font-size: 15px; line-height: 1.6; color: rgba(240, 240, 240, 0.72); margin: 0 0 22px; }
.qe-faq-item { border-top: 1px solid var(--border); }
.qe-faq-item:last-child { border-bottom: 1px solid var(--border); }
.qe-faq-item > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 14px; padding: 16px 2px; }
.qe-faq-item > summary::-webkit-details-marker { display: none; }
.qe-faq-item > summary::before { content: '+'; flex: 0 0 auto; width: 14px; font-family: Barlow, sans-serif; font-weight: 600; font-size: 18px; color: var(--amber); line-height: 1; }
.qe-faq-item[open] > summary::before { content: '\2212'; }
.qe-faq-item > summary:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.qe-faq-q { margin: 0; font-family: Barlow, sans-serif; font-weight: 600; font-size: 16.5px; line-height: 1.45; color: #F0F0F0; text-transform: none; letter-spacing: 0; }
.qe-faq-a { padding: 0 2px 18px 28px; }
.qe-faq-a p { font-family: Barlow, sans-serif; font-size: 15px; line-height: 1.65; color: rgba(240, 240, 240, 0.8); margin: 0; }
.qe-faq-more { font-family: Barlow, sans-serif; font-size: 14px; line-height: 1.7; color: rgba(240, 240, 240, 0.72); margin: 22px 0 0; }
.qe-faq-more a { color: var(--amber); text-decoration: none; }
.qe-faq-more a:hover { color: var(--amber-light); text-decoration: underline; }
/* the charger page's comparison, as a real table in the source */
.qe-faq-table-wrap { margin: 0 0 34px; }
.qe-faq-table-wrap .qe-h2 { margin-bottom: 14px; }
.qe-faq-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-family: Barlow, sans-serif; font-size: 14px; }
.qe-faq-table caption { caption-side: bottom; text-align: left; font-size: 13px; line-height: 1.55; color: rgba(240, 240, 240, 0.72); padding-top: 10px; }
.qe-faq-table th, .qe-faq-table td { text-align: left; vertical-align: top; padding: 11px 12px; border-bottom: 1px solid var(--border); color: rgba(240, 240, 240, 0.86); font-weight: 400; line-height: 1.5; }
.qe-faq-table thead th { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: 0.5px; color: #F0F0F0; border-bottom-color: rgba(255, 255, 255, 0.18); }
.qe-faq-table thead td { width: 26%; }
.qe-faq-table tbody th { color: rgba(240, 240, 240, 0.7); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.4px; }
@media (max-width: 599px) {
	.qe-faq-section { padding: 40px 0 48px; }
	.qe-faq .qe-h2 { font-size: 25px; }
	.qe-faq-table thead td { width: 30%; }
	.qe-faq-table th, .qe-faq-table td { padding: 9px 6px; font-size: 13px; }
	.qe-faq-table thead th { font-size: 13.5px; }
	.qe-faq-a { padding-left: 2px; }
}
/* generators.html: the same block inside the light sizer panel */
.qe-gen-light .qe-faq-section { background: transparent; border-bottom: 0; padding: 36px 0 8px; }
.qe-gen-light .qe-faq-sub, .qe-gen-light .qe-faq-more { color: #3A4046; }
.qe-gen-light .qe-faq-item { border-color: #D7D4CC; }
.qe-gen-light .qe-faq-q { color: #1B2025; }
.qe-gen-light .qe-faq-a p { color: #3A4046; }
.qe-gen-light .qe-faq-item > summary::before { color: #8A5A0E; }
.qe-gen-light .qe-faq-more a { color: #8A5A0E; text-decoration: underline; }
.qe-gen-light .qe-faq-section > .container { width: auto; max-width: none; padding: 0; margin: 0; }
.qe-gen-light .qe-faq { max-width: none; }
