:root {
    color-scheme: light;
    --bg: #f6f7f4;
    --panel: #ffffff;
    --text: #1f2933;
    --muted: #667085;
    --line: #d9ded8;
    --accent: #0f766e;
    --accent-ink: #ffffff;
    --correct-bg: #edf7f1;
    --correct-line: #15803d;
    --incorrect-bg: #fff1f2;
    --incorrect-line: #be123c;
    --shadow: 0 22px 70px rgba(31, 41, 51, 0.10);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
    font: inherit;
}

.app-shell {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 28px;
}

.quiz-panel {
    background: var(--panel);
    border: 1px solid rgba(31, 41, 51, 0.08);
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 760px;
    padding: 30px;
    width: min(100%, 760px);
}

.quiz-panel--status {
    text-align: center;
}

.quiz-header {
    align-items: flex-start;
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.brand,
.eyebrow,
.meta,
.progress {
    margin: 0;
}

.brand {
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 700;
}

.meta,
.progress,
.eyebrow {
    color: var(--muted);
    font-size: 0.86rem;
}

.progress {
    background: #eef4f3;
    border: 1px solid #d4e7e4;
    border-radius: 999px;
    color: #0f5f59;
    flex: 0 0 auto;
    font-weight: 700;
    padding: 6px 10px;
}

.question {
    margin: 34px 0 24px;
}

h1 {
    font-size: 1.55rem;
    line-height: 1.3;
    margin: 0;
}

.answers {
    display: grid;
    gap: 10px;
}

.answer {
    align-items: flex-start;
    background: #fbfcfb;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    display: grid;
    gap: 12px;
    grid-template-columns: 30px 1fr;
    line-height: 1.45;
    min-height: 58px;
    padding: 14px;
    text-align: left;
    transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
    width: 100%;
}

.answer:hover:not(:disabled),
.answer:focus-visible {
    border-color: var(--accent);
    outline: none;
    transform: translateY(-1px);
}

.answer:disabled {
    cursor: default;
    opacity: 1;
}

.answer-letter {
    align-items: center;
    background: #edf2f2;
    border-radius: 999px;
    color: #334155;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 800;
    height: 30px;
    justify-content: center;
    line-height: 1;
    text-transform: uppercase;
    width: 30px;
}

.answer--correct {
    background: var(--correct-bg);
    border-color: var(--correct-line);
}

.answer--correct .answer-letter {
    background: var(--correct-line);
    color: #ffffff;
}

.answer--incorrect {
    background: var(--incorrect-bg);
    border-color: var(--incorrect-line);
}

.answer--incorrect .answer-letter {
    background: var(--incorrect-line);
    color: #ffffff;
}

.answer--muted {
    color: var(--muted);
}

.feedback {
    border-left: 4px solid var(--line);
    margin-top: 24px;
    padding: 2px 0 2px 16px;
}

.feedback--correct {
    border-color: var(--correct-line);
}

.feedback--incorrect {
    border-color: var(--incorrect-line);
}

.feedback p {
    line-height: 1.55;
    margin: 8px 0;
}

.feedback-title {
    font-weight: 800;
}

.feedback-explanation {
    color: #344054;
}

.quiz-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

.primary-action {
    background: var(--accent);
    border: 0;
    border-radius: 8px;
    color: var(--accent-ink);
    cursor: pointer;
    font-weight: 800;
    min-height: 44px;
    padding: 0 18px;
}

.primary-action:hover,
.primary-action:focus-visible {
    background: #115e59;
    outline: none;
}

#blazor-error-ui {
    background: #fff7ed;
    border-top: 1px solid #fed7aa;
    bottom: 0;
    box-shadow: 0 -8px 30px rgba(31, 41, 51, 0.10);
    color: #7c2d12;
    display: none;
    left: 0;
    padding: 0.75rem 1rem;
    position: fixed;
    right: 0;
    z-index: 1000;
}

#blazor-error-ui .reload {
    color: #7c2d12;
    font-weight: 800;
    margin-left: 0.5rem;
}

#blazor-error-ui .dismiss {
    color: #7c2d12;
    cursor: pointer;
    position: absolute;
    right: 1rem;
}

.loading-progress {
    display: block;
    height: 6rem;
    margin: 20vh auto 1rem;
    position: relative;
    width: 6rem;
}

.loading-progress circle {
    fill: none;
    stroke: #d9ded8;
    stroke-width: 0.6rem;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.loading-progress circle:last-child {
    stroke: var(--accent);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    color: var(--muted);
    font-weight: 700;
    inset: calc(20vh + 2.4rem) 0 auto 0;
    position: absolute;
    text-align: center;
}

.loading-progress-text::after {
    content: var(--blazor-load-percentage-text, "Loading");
}

@media (max-width: 640px) {
    .app-shell {
        align-items: stretch;
        padding: 14px;
    }

    .quiz-panel {
        box-shadow: none;
        padding: 20px;
    }

    .quiz-header {
        align-items: flex-start;
    }

    h1 {
        font-size: 1.28rem;
    }

    .answer {
        grid-template-columns: 28px 1fr;
        min-height: 54px;
        padding: 12px;
    }
}
