/* ==========================================================================
   Who Wants to Be a Bible Millionaire?  —  BibleChallenger.com
   Modernised stylesheet (replaces the 2005 absolute-positioned layout).
   ========================================================================== */

:root {
	--navy-900: #01031c;
	--navy-800: #050a3a;
	--navy-700: #0a1560;
	--navy-600: #12227f;
	--navy-500: #1c34a8;
	--gold-400: #f5cf6b;
	--gold-500: #e0ac2b;
	--gold-600: #a97a12;
	--amber: #ff9d1c;
	--green: #17a34a;
	--green-dark: #0b6b2f;
	--red: #d92b3f;
	--red-dark: #8a1526;
	--ink: #f4f6ff;
	--ink-dim: #a9b4dd;
	--edge: 18px; /* horizontal inset of the hexagon points */
	--panel-radius: 14px;
	--shadow: 0 10px 30px rgba(0, 0, 0, .45);
	/* No web fonts: nothing to download, no flash of unstyled text, works offline.
	   --font        running text — questions, answers, article copy.
	   --font-display headings, answer letters, buttons.
	   --font-num    anything numeric. Georgia's figures are old-style (3,4,5,7,9
	                 sit below the baseline) and proportionally spaced, so the
	                 money ladder would neither align nor sit level in it. */
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-display: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
	--font-num: var(--font);
	--display-tracking: 0;
	--display-weight: 700;

	/* Small labels — "Time", "Banked", the question strapline, review captions.
	   Set in bold Georgia at sentence case: no uppercase transform and no
	   letterspacing, so hierarchy comes from weight and size rather than from
	   the tracked-out caps convention. Change these seven to restyle all of
	   them at once. */
	--label-family: var(--font-display);
	--label-transform: none;
	--label-caps: normal;
	--label-tracking: 0;
	--label-style: normal;
	--label-weight: 700;
	--label-scale: 1.1;

	/* Type sizes. The question and the answers are what people actually read,
	   so they lead; everything else is set relative to them. Raise --fs-body
	   and these four together to scale the whole interface. */
	--fs-body:     18px;
	--fs-question: clamp(1.2rem, 2.9vw, 1.5rem);
	--fs-answer:   clamp(1.1rem, 2.5vw, 1.2rem);
	--fs-ladder:   1rem;
	--fs-copy:     1.06rem;
}

/* every micro-label in the interface routes through this */
.status__label,
.question__meta,
.modal h3,
.review__ref,
.call__who {
	font-family: var(--label-family);
	font-variant-caps: var(--label-caps);
	text-transform: var(--label-transform);
	letter-spacing: var(--label-tracking);
	font-style: var(--label-style);
	font-weight: var(--label-weight);
}

*, *::before, *::after { box-sizing: border-box; }

/* the components below set `display`, which would otherwise beat [hidden] */
[hidden] { display: none !important; }

body.millionaire {
	margin: 0;
	padding: 0 0 3rem;
	font-family: var(--font);
	font-size: var(--fs-body);
	line-height: 1.55;
	color: var(--ink);
	background: var(--navy-900) radial-gradient(120% 80% at 50% 0%, #12206b 0%, #060a34 45%, #01031c 100%) fixed;
}

.wrap {
	max-width: 1080px;
	margin: 0 auto;
	padding: 0 1rem;
}

.site-head {
	text-align: center;
	padding: 1.25rem 0 .5rem;
}

.site-head img { width: 220px; max-width: 60%; height: auto; }

.page-title {
	font-family: var(--font-display);
	font-weight: var(--display-weight);
	letter-spacing: var(--display-tracking);
	font-size: clamp(1.6rem, 4.5vw, 2.6rem);
	line-height: 1.15;
	margin: .4rem 0 .35rem;
	color: var(--gold-400);
	text-shadow: 0 2px 10px rgba(0, 0, 0, .6);
}

.page-subtitle {
	margin: 0 auto 1.5rem;
	max-width: 60ch;
	color: var(--ink-dim);
}

/* --------------------------------------------------------------------------
   Board layout
   -------------------------------------------------------------------------- */

.game {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: 1fr;
	align-items: start;
}

@media (min-width: 900px) {
	.game {
		grid-template-columns: minmax(0, 1fr) 250px;
	}
}

.board {
	min-width: 0;
	background: linear-gradient(180deg, rgba(12, 24, 96, .85), rgba(3, 6, 40, .9));
	border: 1px solid rgba(140, 165, 255, .28);
	border-radius: var(--panel-radius);
	box-shadow: var(--shadow);
	padding: 1rem;
}

@media (min-width: 640px) {
	.board { padding: 1.35rem; }
}

/* Status strip ------------------------------------------------------------ */

.status {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: .5rem;
	margin-bottom: .9rem;
}

.status__cell {
	background: rgba(0, 0, 0, .3);
	border: 1px solid rgba(140, 165, 255, .22);
	border-radius: 10px;
	padding: .45rem .5rem;
	text-align: center;
	min-width: 0;
}

.status__label {
	display: block;
	font-size: calc(.74rem * var(--label-scale));
	color: var(--ink-dim);
}

.status__value {
	font-family: var(--font-num);
	display: block;
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--gold-400);
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}

.timer-track {
	height: 6px;
	margin-top: .55rem;
	border-radius: 99px;
	background: rgba(255, 255, 255, .12);
	overflow: hidden;
}

.timer-bar {
	height: 100%;
	width: 100%;
	border-radius: 99px;
	background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
	transition: width .95s linear, background-color .3s;
}

.timer-bar.is-warn { background: linear-gradient(90deg, #e07b18, var(--amber)); }
.timer-bar.is-danger { background: linear-gradient(90deg, var(--red-dark), var(--red)); }

/* Question panel ---------------------------------------------------------- */

.question {
	position: relative;
	background: linear-gradient(180deg, rgba(10, 21, 96, .95), rgba(5, 10, 58, .95));
	border: 2px solid rgba(140, 165, 255, .45);
	border-radius: 12px;
	padding: 1rem 1.15rem;
	min-height: 5.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-size: var(--fs-question);
	line-height: 1.45;
	overflow-wrap: break-word;
}

.question__meta {
	display: block;
	font-size: calc(.78rem * var(--label-scale));
	color: var(--ink-dim);
	margin-bottom: .45rem;
}

/* Answers ----------------------------------------------------------------- */

.answers {
	display: grid;
	grid-template-columns: 1fr;
	gap: .6rem;
	margin: .9rem 0 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 640px) {
	.answers {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: .7rem .9rem;
	}
}

.answers > li { display: flex; min-width: 0; }

.answer {
	position: relative;
	display: block;
	flex: 1 1 auto;
	min-width: 0;
	padding: 2px;                 /* becomes the gold edge */
	border: 0;
	margin: 0;
	background: linear-gradient(180deg, var(--gold-400), var(--gold-600));
	clip-path: polygon(var(--edge) 0, calc(100% - var(--edge)) 0, 100% 50%, calc(100% - var(--edge)) 100%, var(--edge) 100%, 0 50%);
	cursor: pointer;
	font: inherit;
	color: inherit;
	text-align: left;
	transition: transform .12s ease, filter .12s ease;
	-webkit-tap-highlight-color: transparent;
}

.answer__face {
	display: flex;
	align-items: center;
	gap: .55rem;
	width: 100%;
	min-height: 3.7rem;
	padding: .7rem 1.5rem;
	background: linear-gradient(180deg, #0d1a63, #050b33);
	clip-path: polygon(var(--edge) 0, calc(100% - var(--edge)) 0, 100% 50%, calc(100% - var(--edge)) 100%, var(--edge) 100%, 0 50%);
	transition: background .18s ease;
}

.answer__letter {
	font-family: var(--font-display);
	flex: 0 0 auto;
	font-weight: 700;
	color: var(--gold-400);
	font-size: var(--fs-answer);
}

.answer__text {
	flex: 1 1 auto;
	min-width: 0;
	font-size: var(--fs-answer);
	line-height: 1.35;
	overflow-wrap: break-word;
	hyphens: auto;
}

.answer:hover:not(:disabled) { transform: translateY(-1px); }
.answer:hover:not(:disabled) .answer__face { background: linear-gradient(180deg, #17288c, #0a1352); }

.answer:focus { outline: none; }
.answer:focus-visible .answer__face {
	box-shadow: inset 0 0 0 3px #fff;
	background: linear-gradient(180deg, #17288c, #0a1352);
}

.answer:disabled { cursor: default; }

/* answered — the pause before the reveal */
.answer.is-locked .answer__face {
	color: #1a1000;
	animation: pulse-amber .7s ease-in-out infinite alternate;
}
.answer.is-locked .answer__letter { color: #1a1000; }

@keyframes pulse-amber {
	from { background: linear-gradient(180deg, #ffb03a, #e07b18); }
	to   { background: linear-gradient(180deg, #ffd98a, #ff9d1c); }
}

.answer.is-correct .answer__face {
	background: linear-gradient(180deg, #23c766, var(--green-dark));
	color: #fff;
}
.answer.is-correct .answer__letter { color: #fff; }

.answer.is-wrong .answer__face {
	background: linear-gradient(180deg, #f0475c, var(--red-dark));
	color: #fff;
}
.answer.is-wrong .answer__letter { color: #fff; }

.answer.is-gone { filter: grayscale(1) brightness(.5); }
.answer.is-gone .answer__text { visibility: hidden; }

/* lifeline hint (phone / audience suggestion) */
.answer.is-hinted .answer__face { box-shadow: inset 0 0 0 2px var(--gold-400); }

@media (prefers-reduced-motion: reduce) {
	.answer, .answer__face, .timer-bar { transition: none; }
	.answer.is-locked .answer__face { animation: none; }
}

/* Controls ---------------------------------------------------------------- */

.controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	margin-top: 1rem;
	padding-top: .9rem;
	border-top: 1px solid rgba(140, 165, 255, .2);
}

.lifelines {
	display: flex;
	gap: .5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lifeline {
	display: grid;
	place-items: center;
	gap: 1px;
	width: 66px;
	min-height: 54px;
	padding: .3rem;
	border: 2px solid var(--gold-500);
	border-radius: 50% / 34%;
	background: radial-gradient(circle at 50% 30%, #1d2f9c, #060c3c);
	color: var(--ink);
	font: inherit;
	font-size: .68rem;
	line-height: 1.1;
	letter-spacing: .02em;
	text-align: center;
	cursor: pointer;
	transition: transform .12s ease, box-shadow .12s ease;
}

.lifeline__icon { font-size: 1.25rem; line-height: 1; }
.lifeline:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 0 14px rgba(245, 207, 107, .5); }
.lifeline:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.lifeline.is-used,
.lifeline:disabled { cursor: default; opacity: .45; }

.lifeline.is-used { position: relative; }

.lifeline.is-used::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top left, transparent calc(50% - 1.5px), var(--red) calc(50% - 1.5px), var(--red) calc(50% + 1.5px), transparent calc(50% + 1.5px));
}

.btn {
	font-family: var(--font-display);
	display: inline-block;
	padding: .55rem 1.15rem;
	border: 2px solid var(--gold-500);
	border-radius: 99px;
	background: transparent;
	color: var(--gold-400);
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}

.btn:hover { background: var(--gold-500); color: #1a1000; }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.btn--primary {
	background: linear-gradient(180deg, var(--gold-400), var(--gold-500));
	color: #1a1000;
	font-size: 1.1rem;
}

.btn--primary:hover { filter: brightness(1.08); background: linear-gradient(180deg, var(--gold-400), var(--gold-500)); color: #1a1000; }

.btn--ghost { border-color: rgba(140, 165, 255, .5); color: var(--ink-dim); }
.btn--ghost:hover { background: rgba(140, 165, 255, .18); color: var(--ink); }

.controls__right { display: flex; gap: .5rem; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Prize ladder
   -------------------------------------------------------------------------- */

.ladder-panel {
	background: linear-gradient(180deg, rgba(12, 24, 96, .85), rgba(3, 6, 40, .9));
	border: 1px solid rgba(140, 165, 255, .28);
	border-radius: var(--panel-radius);
	box-shadow: var(--shadow);
	padding: .6rem;
}

.ladder {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ladder__row {
	font-family: var(--font-num);
	display: grid;
	grid-template-columns: 1.75rem 1fr;
	align-items: center;
	gap: .4rem;
	padding: .2rem .5rem;
	border-radius: 6px;
	font-size: var(--fs-ladder);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--gold-400);
}

.ladder__num { color: var(--ink-dim); font-size: .84rem; font-weight: 500; text-align: right; }
.ladder__row.is-safe { color: #fff; }
.ladder__row.is-won { color: var(--ink-dim); }

.ladder__row.is-current {
	background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
	color: #1a1000;
}

.ladder__row.is-current .ladder__num { color: #1a1000; }

.ladder-toggle { display: block; width: 100%; margin-bottom: .5rem; }

@media (min-width: 900px) {
	.ladder-toggle { display: none; }
	.ladder-panel .ladder { display: flex !important; }
}

@media (max-width: 899px) {
	.ladder-panel .ladder[hidden] { display: none; }
}

/* --------------------------------------------------------------------------
   Overlay (lifeline theatre + game over)
   -------------------------------------------------------------------------- */

.overlay {
	position: fixed;
	inset: 0;
	z-index: 50;
	display: grid;
	place-items: center;
	padding: 1rem;
	background: rgba(1, 3, 20, .82);
	backdrop-filter: blur(3px);
}

.overlay[hidden] { display: none; }

.modal {
	width: min(560px, 100%);
	max-height: 86vh;
	overflow-y: auto;
	background: linear-gradient(180deg, #0b1660, #04072c);
	border: 2px solid var(--gold-500);
	border-radius: var(--panel-radius);
	box-shadow: 0 24px 60px rgba(0, 0, 0, .7);
	padding: 1.25rem;
}

.modal h2 {
	font-family: var(--font-display);
	font-weight: var(--display-weight);
	letter-spacing: var(--display-tracking);
	margin: 0 0 .75rem;
	font-size: 1.5rem;
	color: var(--gold-400);
}

.modal h3 {
	margin: 1.1rem 0 .4rem;
	font-size: calc(1rem * var(--label-scale));
	color: var(--ink-dim);
}

.modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
	margin-top: 1.1rem;
}

/* Phone a friend ---------------------------------------------------------- */

.call {
	display: flex;
	flex-direction: column;
	gap: .55rem;
	margin: 0;
	padding: 0;
	list-style: none;
	min-height: 9rem;
}

.call__line {
	max-width: 92%;
	padding: .5rem .8rem;
	border-radius: 12px;
	background: rgba(255, 255, 255, .1);
	font-size: 1.02rem;
	line-height: 1.45;
	animation: fade-up .25s ease;
}

.call__line--you {
	align-self: flex-end;
	background: linear-gradient(180deg, #1c34a8, #14257c);
	border-bottom-right-radius: 3px;
}

.call__line--friend {
	align-self: flex-start;
	background: linear-gradient(180deg, #2c2f4d, #1c1e35);
	border-bottom-left-radius: 3px;
}

.call__line--system {
	align-self: center;
	background: none;
	color: var(--ink-dim);
	font-size: .9rem;
	font-style: italic;
	letter-spacing: .04em;
}

.call__who { display: block; font-size: calc(.74rem * var(--label-scale)); color: var(--gold-400); }

@keyframes fade-up {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) { .call__line { animation: none; } }

/* Ask the audience -------------------------------------------------------- */

.poll {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: .6rem;
	align-items: end;
	height: 200px;
	margin: 0;
	padding: .75rem .25rem 0;
	border-bottom: 2px solid rgba(140, 165, 255, .35);
}

.poll__col {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: center;
	gap: .3rem;
	height: 100%;
	min-width: 0;
}

.poll__pct { font-family: var(--font-num); font-size: .92rem; font-weight: 700; color: var(--gold-400); font-variant-numeric: tabular-nums; }

.poll__bar {
	width: 100%;
	border-radius: 4px 4px 0 0;
	background: linear-gradient(180deg, var(--gold-400), var(--gold-600));
	height: 0;
	transition: height .9s cubic-bezier(.2, .8, .3, 1);
}

.poll__col.is-empty .poll__bar { background: rgba(255, 255, 255, .12); }

.poll__labels {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: .6rem;
	padding: .4rem .25rem 0;
	text-align: center;
	font-weight: 700;
	color: var(--ink-dim);
}

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

/* Game-over review -------------------------------------------------------- */

.result-amount {
	font-family: var(--font-num);
	font-size: 2.25rem;
	font-weight: 800;
	color: var(--gold-400);
	font-variant-numeric: tabular-nums;
	margin: .2rem 0 .6rem;
}

.review {
	background: rgba(0, 0, 0, .3);
	border: 1px solid rgba(140, 165, 255, .25);
	border-radius: 10px;
	padding: .85rem 1rem;
}

.review__q { margin: 0 0 .7rem; font-size: 1.1rem; line-height: 1.45; }

.review__ref { display: block; margin-top: .35rem; font-size: calc(.78rem * var(--label-scale)); color: var(--ink-dim); }

.review__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }

.review__item {
	display: grid;
	grid-template-columns: 1.4rem 1.2rem 1fr;
	gap: .4rem;
	align-items: start;
	padding: .4rem .55rem;
	border-radius: 7px;
	background: rgba(255, 255, 255, .06);
	font-size: 1.02rem;
	line-height: 1.4;
}

.review__item.is-correct { background: rgba(23, 163, 74, .3); box-shadow: inset 0 0 0 1px rgba(35, 199, 102, .7); }
.review__item.is-yours { background: rgba(217, 43, 63, .28); box-shadow: inset 0 0 0 1px rgba(240, 71, 92, .7); }
.review__mark { text-align: center; }
.review__letter { font-weight: 700; color: var(--gold-400); }

.history { margin-top: 1rem; }
.history > summary { cursor: pointer; color: var(--gold-400); font-weight: 600; }
.history .review { margin-top: .7rem; }

/* --------------------------------------------------------------------------
   Article content below the game
   -------------------------------------------------------------------------- */

.content { margin-top: 2.5rem; }
.content h2 {
	font-family: var(--font-display);
	font-weight: var(--display-weight);
	letter-spacing: var(--display-tracking);
	color: var(--gold-400);
	font-size: 1.45rem;
	margin: 2rem 0 .6rem;
}
.content h3 {
	font-family: var(--font-display);
	color: #fff;
	font-size: 1.14rem;
	margin: 1.3rem 0 .35rem;
}
.content p, .content li { color: #d5dcf7; font-size: var(--fs-copy); }
.content a { color: var(--gold-400); }
.content ul { padding-left: 1.2rem; }

.faq { display: grid; gap: .6rem; margin-top: .8rem; }

.faq__item {
	background: rgba(255, 255, 255, .05);
	border: 1px solid rgba(140, 165, 255, .22);
	border-radius: 10px;
	padding: .7rem 1rem;
}

.faq__item > summary { cursor: pointer; font-weight: 600; color: #fff; }
.faq__item p { margin: .6rem 0 0; }

.visually-hidden {
	position: absolute;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}
