/* Reset and Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #3a2a1a;
    background-color: #fdfaf5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #5a3e2b;
    color: #fff;
    padding: 8px 16px;
    z-index: 1000;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* Header */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e8ddd0;
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #5a3e2b;
    font-weight: 700;
    font-size: 1.1rem;
}

.logo-icon {
    flex-shrink: 0;
}

.site-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.site-nav a {
    text-decoration: none;
    color: #5a3e2b;
    font-weight: 500;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    border-bottom-color: #a67c52;
}

/* Main */
main {
    flex: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 20px 64px;
    width: 100%;
}

/* Hero */
.hero {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 48px 0 32px;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1 1 300px;
}

.hero h1 {
    font-size: 2.2rem;
    line-height: 1.25;
    color: #3a2a1a;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: #6b5a4a;
    margin-bottom: 24px;
    max-width: 420px;
}

.hero-note {
    font-size: 0.85rem;
    color: #8b7a6a;
    margin-top: 12px;
}

.hero-visual {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background-color: #7c5c3c;
    color: #fff;
    border: none;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    text-decoration: none;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background-color: #5a3e2b;
    outline: 2px solid #a67c52;
    outline-offset: 2px;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    display: inline-block;
    background-color: #fff;
    color: #5a3e2b;
    border: 2px solid #c4a882;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    background-color: #f5efe5;
    border-color: #7c5c3c;
    outline: none;
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-text {
    background: none;
    border: none;
    color: #7c5c3c;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
}

.btn-text:hover {
    color: #5a3e2b;
}

/* Quiz Container */
.quiz-container {
    background: #fff;
    border-radius: 16px;
    padding: 32px 24px;
    box-shadow: 0 2px 16px rgba(90, 62, 43, 0.08);
    margin-bottom: 32px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e8ddd0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background-color: #7c5c3c;
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.85rem;
    color: #8b7a6a;
    margin-bottom: 24px;
    text-align: right;
}

.question-card {
    display: none;
}

.question-card.active {
    display: block;
}

.question-text {
    font-size: 1.3rem;
    font-weight: 600;
    color: #3a2a1a;
    margin-bottom: 20px;
    display: block;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.option-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 2px solid #e8ddd0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    font-size: 1rem;
}

.option-card:hover {
    border-color: #a67c52;
    background-color: #fdfaf5;
}

.option-card input[type="radio"] {
    accent-color: #7c5c3c;
    width: 18px;
    height: 18px;
}

.option-card:has(input:checked) {
    border-color: #7c5c3c;
    background-color: #f5efe5;
}

.option-label {
    font-weight: 500;
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

/* Results */
.results-container {
    margin-bottom: 32px;
}

.results-container h2 {
    font-size: 1.8rem;
    color: #3a2a1a;
    margin-bottom: 20px;
}

.results-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 2px 16px rgba(90, 62, 43, 0.08);
    margin-bottom: 20px;
}

.results-card h3 {
    font-size: 1.2rem;
    color: #5a3e2b;
    margin-top: 20px;
    margin-bottom: 8px;
}

.results-card h3:first-child {
    margin-top: 0;
}

.results-card p,
.results-card li {
    color: #4a3a2a;
    line-height: 1.7;
}

.results-card ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 12px;
}

.results-card li {
    margin-bottom: 6px;
}

.results-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.history-panel {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 1px 8px rgba(90, 62, 43, 0.06);
}

.history-panel h3 {
    font-size: 1.1rem;
    color: #5a3e2b;
    margin-bottom: 12px;
}

.history-list {
    list-style: none;
    margin-bottom: 12px;
}

.history-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0e8dc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.history-list li:last-child {
    border-bottom: none;
}

.history-list button {
    font-size: 0.8rem;
    padding: 4px 10px;
    border: 1px solid #c4a882;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    color: #5a3e2b;
}

.history-list button:hover {
    background: #f5efe5;
}

/* Supporting Content */
.supporting-content {
    margin-top: 48px;
}

.supporting-content h2 {
    font-size: 1.7rem;
    color: #3a2a1a;
    margin-bottom: 24px;
}

.content-columns {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.content-block h3 {
    font-size: 1.15rem;
    color: #5a3e2b;
    margin-bottom: 10px;
}

.content-block p {
    color: #4a3a2a;
    margin-bottom: 12px;
}

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0e8dc;
    color: #4a3a2a;
}

.info-list li:last-child {
    border-bottom: none;
}

.scenario-block {
    margin-bottom: 32px;
}

.scenario-block h3 {
    font-size: 1.3rem;
    color: #3a2a1a;
    margin-bottom: 16px;
}

.scenario-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.scenario-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 8px rgba(90, 62, 43, 0.06);
    border-left: 4px solid #a67c52;
}

.scenario-card h4 {
    font-size: 1.05rem;
    color: #5a3e2b;
    margin-bottom: 8px;
}

.scenario-card p {
    color: #4a3a2a;
    font-size: 0.95rem;
    line-height: 1.6;
}

.assumptions-block {
    background: #fdfaf5;
    border: 1px solid #e8ddd0;
    border-radius: 12px;
    padding: 24px;
}

.assumptions-block h3 {
    font-size: 1.15rem;
    color: #5a3e2b;
    margin-bottom: 10px;
}

.assumptions-block p {
    color: #4a3a2a;
    margin-bottom: 10px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #3a2a1a;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Footer */
.site-footer {
    background-color: #3a2a1a;
    color: #d4c4b0;
    padding: 24px 20px;
    margin-top: auto;
}

.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.footer-tagline {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.footer-tagline a {
    color: #e8ddd0;
    text-decoration: underline;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 8px;
}

.footer-nav a {
    color: #d4c4b0;
    text-decoration: none;
    font-size: 0.85rem;
}

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

.footer-note {
    font-size: 0.8rem;
    color: #b0a090;
}

/* Responsive */
@media (max-width: 640px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 24px 0 16px;
    }

    .hero h1 {
        font-size: 1.7rem;
    }

    .hero-subtitle {
        max-width: 100%;
        font-size: 1rem;
    }

    .hero-visual {
        order: -1;
    }

    .quiz-container {
        padding: 20px 16px;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .quiz-nav {
        flex-direction: column;
    }

    .quiz-nav button {
        width: 100%;
    }

    .results-actions {
        flex-direction: column;
    }

    .results-actions button {
        width: 100%;
    }

    .content-columns {
        grid-template-columns: 1fr;
    }

    .scenario-cards {
        grid-template-columns: 1fr;
    }
}

@media print {
    .site-header,
    .site-footer,
    .quiz-nav,
    .results-actions,
    .history-panel,
    .skip-link,
    .toast {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .results-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}



/* 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;
}
