:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-alt: #f1f5f9;
    --border-color: #e2e8f0;
    --radius: 8px;
    --font-heading: system-ui, -apple-system, sans-serif;
    --font-body: ui-sans-serif, system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-page);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Header & Nav */
.site-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.logo-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
}

.main-nav a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--primary);
}

/* Main Content */
main {
    flex: 1;
    padding: 2.5rem 0;
}

.hero-section {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--text-dark);
}

.lead-text {
    font-size: 1.125rem;
    color: var(--text-muted);
}

.content-section {
    margin-bottom: 3rem;
    padding-top: 1.5rem;
}

.content-section h2 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.content-section p {
    margin-bottom: 1.25rem;
    color: #334155;
}

.content-section ul {
    margin: 0 0 1.5rem 1.5rem;
    color: #334155;
}

.content-section li {
    margin-bottom: 0.5rem;
}

.bg-light {
    background-color: var(--bg-alt);
    padding: 2rem;
    border-radius: var(--radius);
}

/* Quiz Styles */
.quiz-section {
    margin: 0 auto 4rem;
}

.quiz-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.quiz-card.hidden {
    display: none;
}

.quiz-card h2 {
    margin-bottom: 1rem;
}

.quiz-benefits {
    margin: 1.5rem 0 2rem 1.5rem;
    color: var(--text-muted);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.progress-indicator {
    margin-bottom: 1.5rem;
}

#question-counter {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--bg-alt);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

#question-text {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.options-grid {
    display: grid;
    gap: 1rem;
}

.option-btn {
    text-align: left;
    background: var(--bg-alt);
    border: 2px solid transparent;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-dark);
}

.option-btn:hover {
    background: #e2e8f0;
}

.option-btn.selected {
    border-color: var(--primary);
    background: #eff6ff;
}

.score-display {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin: 1.5rem 0 1rem;
}

.score-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
}

.score-band {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.score-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.explanations {
    margin-bottom: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.explanation-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-alt);
    border-left: 4px solid var(--border-color);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.explanation-item.correct {
    border-left-color: #10b981;
}

.explanation-item.incorrect {
    border-left-color: #ef4444;
}

/* Footer */
.site-footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-nav {
    margin-top: 0.5rem;
}

.footer-nav a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-nav a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
    .flex-between {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav a {
        margin: 0 0.75rem;
    }
    
    .quiz-card {
        padding: 1.5rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
