:root {
    --green: #73ad4d;
    --blue: #243c9f;
    --white: #fff;
    --aqua: #78c8c7;
    --shadow: 0 18px 50px rgb(25 54 18 / 28%);
}

* { box-sizing: border-box; }

html { background: var(--green); }

body {
    margin: 0;
    color: var(--white);
    background: var(--green);
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
}

.page-shell {
    width: min(100%, 722px);
    margin: 0 auto;
    overflow: hidden;
}

.hero { display: block; width: 100%; height: auto; }

.quiz { padding: 0 34px 18px; }

.question {
    min-width: 0;
    margin: 0 0 54px;
    padding: 0;
    border: 0;
}

.question legend {
    width: 100%;
    margin-bottom: 12px;
    color: var(--blue);
    font-size: clamp(22px, 4vw, 27px);
    line-height: 1.15;
    font-weight: 800;
}

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

.answer {
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: start;
    gap: 10px;
    cursor: pointer;
    font-size: clamp(20px, 3.6vw, 25px);
    line-height: 1.12;
}

.answer input {
    width: 21px;
    height: 21px;
    margin: 1px 0 0;
    appearance: none;
    border: 2px solid var(--white);
    border-radius: 50%;
    background: var(--aqua);
    box-shadow: 0 0 0 1px rgb(0 0 0 / 7%);
}

.answer input:checked { background: radial-gradient(circle, var(--blue) 0 43%, var(--aqua) 47%); }
.answer input:focus-visible { outline: 4px solid rgb(255 255 255 / 55%); outline-offset: 3px; }

.question-error { display: none; margin: 9px 0 0 32px; color: #65191c; font-size: 15px; }
.question.invalid .question-error { display: block; }
.question.invalid legend { color: #65191c; }

.submit-wrap { display: flex; justify-content: center; margin: 6px 0 44px; }

.submit-button,
.restart-button {
    border: 0;
    border-radius: 14px;
    padding: 20px 38px;
    color: var(--white);
    background: var(--blue);
    box-shadow: 0 5px 0 rgb(16 35 124 / 22%);
    font: inherit;
    font-size: 28px;
    cursor: pointer;
}

.submit-button:disabled { opacity: .65; cursor: wait; }
.submit-button:focus-visible, .restart-button:focus-visible, .dialog-close:focus-visible { outline: 4px solid var(--white); outline-offset: 4px; }
.form-message { min-height: 1.2em; text-align: center; }
.footer-art { display: block; width: 250px; max-width: 45%; height: auto; margin: 0 auto 30px; }

.result-dialog {
    width: min(92vw, 680px);
    max-height: 90vh;
    padding: 28px;
    overflow: auto;
    border: 0;
    border-radius: 26px;
    color: #24321f;
    background: #f8f5e9;
    box-shadow: var(--shadow);
}

.result-dialog::backdrop { background: rgb(18 39 12 / 70%); backdrop-filter: blur(4px); }
.dialog-close { position: absolute; top: 9px; right: 14px; border: 0; color: var(--blue); background: transparent; font-size: 38px; line-height: 1; cursor: pointer; }
.result-layout { display: grid; grid-template-columns: minmax(150px, 34%) 1fr; gap: 26px; align-items: center; }
.result-image { display: block; width: 100%; max-height: 390px; object-fit: contain; }
.result-kicker { margin: 0 0 4px; color: var(--green); text-transform: uppercase; letter-spacing: .11em; font-size: 14px; }
.result-copy h2 { margin: 0 0 14px; color: var(--blue); font-size: 31px; line-height: 1.05; }
.result-copy p, .result-copy li { font-weight: 400; line-height: 1.45; }
.result-copy h3 { margin-bottom: 6px; color: var(--blue); }
.result-copy ul { margin-top: 0; padding-left: 21px; }
.result-warning { padding-top: 10px; border-top: 1px solid #d6d0b9; font-size: 13px; }
.result-warning:empty { display: none; }
.restart-button { display: block; margin: 22px auto 0; padding: 13px 22px; font-size: 18px; }

@media (max-width: 560px) {
    .quiz { padding-inline: 22px; }
    .question { margin-bottom: 42px; }
    .result-dialog { padding: 25px 20px; }
    .result-layout { grid-template-columns: 1fr; gap: 10px; }
    .result-image { width: min(48vw, 210px); margin: 0 auto; max-height: 250px; }
}

@media (prefers-reduced-motion: no-preference) {
    .result-dialog[open] { animation: pop-in .22s ease-out; }
    @keyframes pop-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
}
