:root {
    --border-radius-small: 9px;
    --border-radius-medium: 13px;
    --border-radius-big: 20px;
    --green-200: hsl(39, 83%, 64%);
    --green-400: hsl(38, 67%, 48%);
    --yellow-200: hsl(40, 100%, 62%);
    --blue-200: hsl(230, 79%, 71%);
    --blue-400: hsl(229, 53%, 61%);
    --red-200: hsl(358, 71%, 58%);
    --gray-1000: #070707;
    --gray-900: #0b0b0b;
    --gray-800: #131313;
    --gray-700: #1A1A1A;
    --gray-600: #1e1e1e;
    --gray-500: #232323;
    --gray-400: #303030;
    --gray-300: #343434;
    --gray-100: #828282;
    --gray-50: #B9B9B9;
    --gray-0: #E1E1E1;
    --background-radial: radial-gradient(rgba(215, 168, 76, .25) 1.2px, transparent 1px);
    --background-size-small: 20px 20px;
}

* { box-sizing: border-box; word-wrap: break-word; }
html { scroll-behavior: smooth; }

body {
    color: #fff;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: var(--gray-900);
    overflow-x: hidden;
    background-image: var(--background-radial);
    background-size: var(--background-size-small);
}

h1 { font-family: 'Silkscreen', sans-serif; font-size: 3rem; font-weight: 700; }
h2 { font-size: 1.7rem; margin: 3rem 0 0.6rem; font-family: 'Silkscreen', sans-serif; line-height: 1.25; }
h2 .lead { color: var(--green-200); }
p { margin: 0; font-size: 1rem; color: var(--gray-0); }
small { color: #9f9f9f; font-size: 0.8rem; }
a { color: inherit; }
button { font: inherit; }

.highlight { color: var(--green-200); }
.warning { color: var(--red-200) !important; }

.nav-wrapper {
    font-family: 'Silkscreen', sans-serif;
    position: fixed;
    top: 0;
    width: 100vw;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 14px 1em;
    width: 100%;
    background-color: var(--gray-600);
    box-shadow: 0 5px 40px rgba(0,0,0,.7);
}

.nav .section {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav .section a {
    color: #fff;
    text-decoration: none;
    font-size: .85rem;
    transition: color .15s ease-in-out;
}

.nav .section a:hover { color: var(--green-200); }
.nav .logo img {
    height: 2.2em;
    width: auto;
    border-radius: 9px;
    transition: transform .1s ease-in-out;
}
.nav .logo:hover img { transform: scale(1.1); }

header {
    position: relative;
    width: 100%;
    min-height: 430px;
    background:
        linear-gradient(to bottom, rgba(0,0,0,.74) 0%, rgba(11,11,11,.3) 58%, var(--gray-900) 100%),
        linear-gradient(90deg, rgba(11,11,11,.98) 0%, rgba(11,11,11,.76) 35%, rgba(11,11,11,.1) 72%, rgba(11,11,11,.72) 100%),
        url('/goethe-stieler-1828.jpg') no-repeat right 7vw top 82px;
    background-size: auto, auto, min(40vw, 430px) auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
}

header .title {
    width: min(650px, 88vw);
    text-align: left;
    padding: 92px 5vw 56px;
    margin-left: min(5vw, 72px);
    position: relative;
    z-index: 2;
}

.portrait-credit {
    position: absolute;
    right: 4vw;
    bottom: 34px;
    z-index: 2;
    color: rgba(225,225,225,.76);
    font-size: .78rem;
    text-shadow: 0 2px 4px rgba(0,0,0,.85);
}

header .title h1 {
    font-size: clamp(2.3rem, 8vw, 5em);
    margin: 0 0 .5rem;
    line-height: 1.1em;
    text-shadow: 2px 8px 2px rgba(0,0,0,.8);
}

header .title p {
    font-family: 'Silkscreen', sans-serif;
    filter: drop-shadow(2px 2px 2px rgba(0,0,0,.8));
}

.spell-visual {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.water {
    position: absolute;
    border: 1px solid rgba(111,198,255,.3);
    background: linear-gradient(180deg, rgba(111,198,255,.35), rgba(75,91,255,.08));
    box-shadow: 0 0 34px rgba(111,198,255,.2);
}

.water-a {
    left: 0;
    right: 0;
    bottom: 0;
    height: 62px;
    opacity: .55;
}

.water-b {
    right: 20vw;
    bottom: 62px;
    width: 110px;
    height: 34px;
    border-radius: 50%;
    opacity: .42;
}

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 4vw 4rem;
}

.intro {
    border: 1px solid var(--gray-400);
    border-radius: var(--border-radius-small);
    background-color: var(--gray-800);
    padding: 1.2rem 1.4rem;
    margin: 2.5rem 0 1rem;
    box-shadow: 0 0 10px rgba(0,0,0,.2);
}

.intro p + p { margin-top: .4rem; }

.quiz-shell {
    margin-top: 1.4rem;
    border: 1px solid var(--gray-400);
    border-radius: var(--border-radius-small);
    background:
        linear-gradient(135deg, rgba(215,168,76,.1), transparent 28%),
        var(--gray-800);
    overflow: hidden;
    box-shadow: 0 0 18px rgba(0,0,0,.25);
}

.quiz-topline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--gray-400);
}

.quiz-topline > div {
    min-height: 78px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .25rem;
}

.quiz-topline > div + div { border-left: 1px solid var(--gray-400); }
.quiz-topline strong {
    font-family: 'Silkscreen', sans-serif;
    font-size: 1.35rem;
}

.progress {
    height: 8px;
    background-color: var(--gray-600);
}

.progress span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--green-200), var(--yellow-200));
    transition: width .2s ease;
}

.question-panel,
.result-panel {
    padding: clamp(1.15rem, 3vw, 2rem);
}

.question-panel h2,
.result-panel h2 {
    margin-top: .4rem;
    margin-bottom: 1rem;
}

.eyebrow {
    color: var(--green-200);
    font-family: 'Silkscreen', sans-serif;
    font-size: .86rem;
}

.answers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin: 1.3rem 0 1rem;
}

.answer-btn {
    min-height: 74px;
    border: 1px solid var(--gray-400);
    border-radius: var(--border-radius-small);
    background-color: var(--gray-700);
    color: #fff;
    cursor: pointer;
    padding: .9rem 1rem;
    text-align: left;
    font-weight: 600;
    line-height: 1.35;
    transition: border-color .15s ease-in-out, background-color .15s ease-in-out, transform .15s ease-in-out;
}

.answer-btn:hover:not(:disabled) {
    border-color: var(--green-200);
    background-color: var(--gray-600);
    transform: translateY(-1px);
}

.answer-btn:disabled { cursor: default; }
.answer-btn.correct {
    border-color: var(--green-200);
    background-color: rgba(95,212,0,.14);
}
.answer-btn.wrong {
    border-color: var(--red-200);
    background-color: rgba(211,85,89,.16);
}

.feedback {
    min-height: 68px;
    border: 1px solid var(--gray-400);
    border-radius: var(--border-radius-small);
    background-color: rgba(7,7,7,.45);
    padding: .9rem 1rem;
    color: var(--gray-0);
}

.feedback.is-correct { border-color: rgba(95,212,0,.75); }
.feedback.is-wrong { border-color: rgba(211,85,89,.75); }

.quiz-actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    margin-top: 1rem;
}

.primary-btn,
.secondary-btn {
    min-height: 46px;
    border-radius: var(--border-radius-small);
    border: 1px solid transparent;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    padding: .7rem 1rem;
    transition: filter .15s ease-in-out, transform .15s ease-in-out, border-color .15s ease-in-out;
}

.primary-btn {
    background-color: var(--green-400);
    border-color: var(--green-200);
}

.secondary-btn {
    background-color: var(--gray-600);
    border-color: var(--gray-400);
}

.primary-btn:hover:not(:disabled),
.secondary-btn:hover:not(:disabled) {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.primary-btn:disabled {
    cursor: not-allowed;
    filter: grayscale(1) brightness(.7);
}

.result-meter {
    height: 14px;
    border-radius: 999px;
    background-color: var(--gray-600);
    margin: 1rem 0 1.2rem;
    overflow: hidden;
}

.result-meter span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--green-200), var(--yellow-200));
    transition: width .25s ease;
}

.review-list {
    display: grid;
    gap: .65rem;
    margin-top: 1rem;
}

.review-item {
    border: 1px solid var(--gray-400);
    border-radius: var(--border-radius-small);
    background-color: rgba(7,7,7,.28);
    padding: .85rem 1rem;
}

.review-item strong {
    display: block;
    color: #fff;
    margin-bottom: .25rem;
}

.review-item span { color: var(--gray-50); }
.review-item.is-correct { border-color: rgba(95,212,0,.55); }
.review-item.is-wrong { border-color: rgba(211,85,89,.55); }

.row { border: 1px solid var(--gray-400); border-top: none; }
.collapsible { border: 1px solid #2f2f2f; }
.collapsible .title {
    color: #fff;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    text-align: left;
    outline: none;
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: background-color .15s ease-in-out;
}
.collapsible .title:hover { background-color: var(--gray-800); }
.collapsible .title::after { content: "\002B"; font-weight: 700; color: var(--green-200); }
.collapsible.active .title::after { content: "\2212"; }
.collapsible .content-wrapper {
    max-height: 0;
    transition: max-height .2s ease-out;
    overflow: hidden;
    padding: 0 18px;
}
.collapsible .content-wrapper > div { padding-bottom: 16px; }
.collapsible .content-wrapper p + p { margin-top: .6rem; }

footer {
    border-top: 1px solid var(--gray-400);
    background-color: var(--gray-1000);
}

footer .content-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 4vw 2rem;
}

footer .nav-cols {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    background: none;
    box-shadow: none;
    padding: 0;
}

footer .section {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

footer .section span {
    font-family: 'Silkscreen', sans-serif;
    color: var(--green-200);
    margin-bottom: .3rem;
}

footer .section a {
    color: var(--gray-50);
    text-decoration: none;
    font-size: .9rem;
}

footer .section a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-team {
    margin-top: .8rem;
}

.team-title {
    margin: .2rem 0 .75rem;
}

.team-title h3 {
    color: #fff;
    font-family: 'Silkscreen', sans-serif;
    font-size: 1rem;
    margin: 0;
    text-decoration: underline;
    text-decoration-color: var(--green-200);
    text-decoration-thickness: 4px;
    text-underline-offset: 4px;
}

.team-title p {
    color: var(--gray-50);
    font-size: .8rem;
    margin-top: .35rem;
}

.team-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: .65rem;
}

.team-wrapper.compact .team-card {
    width: 126px;
    min-height: 128px;
    padding: .85rem .7rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border-radius: 4px;
    border: 2px solid #2f2f2f;
    background-color: var(--gray-800);
    text-align: center;
}

.team-card .avatar {
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--green-200), var(--blue-200));
    color: #111;
    font-family: 'Silkscreen', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
}

.team-card h3 {
    font-size: .92rem;
    margin: 0;
}

footer .copyright {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

@media(max-width: 820px) {
    .answers { grid-template-columns: 1fr; }
    .spell-visual { opacity: .7; }
}

@media(max-width: 700px) {
    .nav {
        gap: 16px;
        flex-wrap: wrap;
    }

    .nav .section { gap: 16px; }
    .nav .logo {
        order: -1;
        flex-basis: 100%;
        text-align: center;
    }

    header { min-height: 500px; }
    header .title {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        padding-top: 145px;
    }
    header {
        justify-content: center;
        background-position: center, center, center top 118px;
        background-size: auto, auto, 300px auto;
    }
    .portrait-credit {
        left: 4vw;
        right: 4vw;
        text-align: center;
    }
    .quiz-topline { grid-template-columns: 1fr; }
    .quiz-topline > div + div {
        border-left: none;
        border-top: 1px solid var(--gray-400);
    }
    .quiz-actions {
        flex-direction: column-reverse;
    }
    .primary-btn,
    .secondary-btn {
        width: 100%;
    }
}
