/* Bankruptcy Quiz — static site styles. */
:root {
	--brand: #445a67;      /* slate blue */
	--brand-dark: #33454f;
	--accent: #7cc278;     /* green (CTA) */
	--accent-dark: #66a862;
	--ink: #1f2a30;
	--muted: #5b6b73;
	--line: #d9e0e3;
	--bg: #eef2f4;
	--card: #ffffff;
	--err: #d93025;
	--radius: 10px;
	--maxw: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	color: var(--ink);
	background: var(--bg);
	line-height: 1.6;
}
h1, h2, h3, h4 { font-family: "Roboto Slab", Georgia, "Times New Roman", serif; line-height: 1.25; }
a { color: var(--brand); }
img { max-width: 100%; height: auto; display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

.skip-link {
	position: absolute; left: -9999px; top: 0; background: var(--brand); color: #fff;
	padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* Header */
.site-header { background: var(--brand); padding: 18px 0; }
.logo-link { display: inline-block; }
.logo { width: 100%; max-width: 340px; height: auto; }

/* Hero */
.hero { background: var(--brand-dark); color: #fff; padding: 40px 0 28px; text-align: center; }
.hero h1 { margin: 0 auto; max-width: 820px; font-size: clamp(1.5rem, 4vw, 2.4rem); }
.hero-sub { margin: 14px auto 0; max-width: 620px; color: #d6dfe3; font-size: 1.05rem; }

/* Quiz layout */
.quiz-section { padding: 32px 0 56px; }
.quiz-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 880px) { .quiz-grid { grid-template-columns: 1.4fr 1fr; align-items: start; } }

.quiz-card {
	background: var(--brand);
	color: #fff;
	border-radius: var(--radius);
	padding: 26px 24px 30px;
	box-shadow: 0 10px 30px rgba(0,0,0,.12);
}

/* Progress */
.quiz-progress { margin-bottom: 22px; }
.progress-label { margin: 0 0 8px; font-weight: 500; color: #fff; }
.progress-track { background: rgba(255,255,255,.22); border-radius: 999px; height: 26px; overflow: hidden; }
.progress-bar {
	background: var(--brand-dark);
	color: #fff; height: 100%; min-width: 34px;
	display: flex; align-items: center; justify-content: flex-end;
	padding-right: 10px; font-size: .8rem; font-weight: 600;
	border-radius: 999px; transition: width .35s ease;
}

/* Steps */
.quiz-form { margin: 0; }
.step { border: 0; margin: 0; padding: 0; }
.step[hidden] { display: none; }
.step legend { font-size: 1.25rem; font-weight: 600; color: #fff; padding: 0; margin-bottom: 18px; }

.choices { display: flex; flex-direction: column; gap: 12px; }
.choice {
	display: flex; align-items: flex-start; gap: 12px;
	background: rgba(255,255,255,.08);
	border: 1px solid rgba(255,255,255,.28);
	border-radius: 8px; padding: 14px 16px; cursor: pointer;
	transition: background .18s ease, border-color .18s ease;
}
.choice:hover { background: rgba(255,255,255,.16); }
.choice input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; flex: 0 0 auto; }
.choice span { color: #fff; }
.choice:has(input:checked) { background: rgba(124,194,120,.22); border-color: var(--accent); }
.choice:has(input:focus-visible) { outline: 2px solid #fff; outline-offset: 2px; }

/* Text fields */
.field { margin-bottom: 6px; }
.field label { display: block; color: #fff; font-size: .9rem; margin-bottom: 6px; }
.field input {
	width: 100%; padding: 12px 14px; font-size: 1rem;
	border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.name-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .name-grid { grid-template-columns: 1fr; } }

.req-star { color: #ffd0d0; }
.req-legend { color: #d6dfe3; font-size: .82rem; margin: 16px 0 0; }

/* Honeypot — visually hidden but present in DOM */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Error state */
.err-msg { display: none; color: #ffd7d3; font-size: .9rem; margin: 10px 0 0; font-weight: 500; }
.step.has-error .err-msg { display: block; }
.field.has-error input { border-color: var(--err); box-shadow: 0 0 0 2px rgba(217,48,37,.25); }

.form-error-banner {
	display: none; background: #fdecea; color: #611a15; border: 1px solid #f5c2c0;
	border-radius: 8px; padding: 12px 14px; margin-bottom: 18px; font-size: .95rem;
}
.form-error-banner.show { display: block; }

/* Nav buttons */
.quiz-nav { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.btn {
	font: inherit; font-weight: 500; padding: .7em 1.5em; border-radius: 4px;
	cursor: pointer; border: 2px solid transparent; transition: background .25s ease, border-color .25s ease;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-secondary { background: transparent; border-color: rgba(255,255,255,.6); color: #fff; }
.btn-secondary:hover { background: rgba(255,255,255,.14); }
.btn:disabled { opacity: .65; cursor: default; }

/* Info column */
.info-card {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 22px 22px; box-shadow: 0 4px 14px rgba(0,0,0,.05);
}
.info-card p { margin: 0 0 14px; color: var(--ink); }
.info-card .fine-print { color: var(--muted); font-size: .85rem; margin-bottom: 0; }

/* Footer */
.site-footer { background: var(--brand-dark); color: #cdd7dc; padding: 34px 0 10px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-col h4 { margin: 0 0 8px; color: #fff; }
.footer-col p { margin: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links a, .copyright a { color: #cdd7dc; }
.footer-links a:hover, .copyright a:hover { color: #fff; }
.copyright { border-top: 1px solid rgba(255,255,255,.14); margin-top: 24px; padding-top: 14px; font-size: .85rem; }
.copyright p { margin: 0; }
