/* ==========================================================================
   GERMAN-A1-SENTENCE-GRAMMAR-QUICK-GUESS-2.CSS — scoped Bauhaus retint +
   navbar redesign for the Sentence Grammar Quick Guess (coordinating vs.
   subordinating conjunctions) lesson. Same typewriter + guess-popup quiz
   mechanic as german-a1-sentence-grammar-quick-guess.html, just a different
   grammar topic — this file is regenerated directly from that page's CSS
   with an sgq->vcd class-prefix rename, so the two stay in exact sync.
   .card/.card-badge/.card-header-flex/.hub-tag-badge/.badge- variants/
   .topic-chip- variants/.progress-container/.progress-bar-fill/
   .success-card/.success-icon-wrap/.next-page-btn/.story-check-status are all
   inherited from see-test.css.
   ========================================================================== */

html:root {
    --bg: #f7f2e7;
    --surface: #ffffff;
    --surface-2: #fbf7ee;
    --ink: #191726;
    --ink-soft: #5a5470;
    --ink-faint: #9089a3;
    --accent: #e0432b;
    --accent-2: #c23621;
    --accent-soft: rgba(224, 67, 43, 0.12);
    --gold: #b4870a;
    --gold-soft: rgba(239, 176, 0, 0.18);
    --line: #e7dec7;
    --line-strong: #d8cba8;

    --shadow-sm: 0 1px 2px rgba(25, 23, 38, 0.06), 0 1px 1px rgba(25, 23, 38, 0.04);
    --shadow-md: 0 10px 24px -8px rgba(25, 23, 38, 0.16), 0 2px 8px -2px rgba(25, 23, 38, 0.06);
    --shadow-lg: 0 0 0 1px rgba(25, 23, 38, 0.04), 0 16px 40px -16px rgba(224, 67, 43, 0.28);

    --serif: "Futura", "Avenir Next", Avenir, "Century Gothic", system-ui, sans-serif;

    --color-nom: #1d5fa6; --color-nom-bg: #e5eef8;
    --color-acc: #e0432b; --color-acc-bg: #fbe7e3;
    --color-irr: #b4870a; --color-irr-bg: #faf1d6;
    --color-coo: #0f7168; --color-coo-bg: #e2f2f0;
    --color-sub: #6c4ba6; --color-sub-bg: #eee8f7;
    --color-neg: #b8355f; --color-neg-bg: #f8e5eb;
}

@media (prefers-color-scheme: dark) {
    html:root {
        --bg: #131220;
        --surface: #1c1a2c;
        --surface-2: #211f34;
        --ink: #f3eee1;
        --ink-soft: #b3abc9;
        --ink-faint: #867f9c;
        --accent: #ff5b41;
        --accent-2: #ff7b62;
        --accent-soft: rgba(255, 91, 65, 0.16);
        --gold: #ffcb3d;
        --gold-soft: rgba(255, 203, 61, 0.18);
        --line: #33304a;
        --line-strong: #413c5c;

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 10px 28px -10px rgba(0, 0, 0, 0.55);
        --shadow-lg: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 16px 44px -16px rgba(255, 91, 65, 0.35);

        --color-nom: #5b98e8; --color-nom-bg: rgba(91, 152, 232, 0.16);
        --color-acc: #ff5b41; --color-acc-bg: rgba(255, 91, 65, 0.16);
        --color-irr: #ffcb3d; --color-irr-bg: rgba(255, 203, 61, 0.18);
        --color-coo: #2fb6a8; --color-coo-bg: rgba(47, 182, 168, 0.16);
        --color-sub: #9a7bd6; --color-sub-bg: rgba(154, 123, 214, 0.18);
        --color-neg: #e06a94; --color-neg-bg: rgba(224, 106, 148, 0.18);
    }
}

/* ================= NAVBAR (redesigned, scoped to this page only —
   identical markup/rules to german-a1-verb-conjugation-drill.css's navbar) ================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
}

.brand-word {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    color: var(--ink);
}

.brand-word b {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-links > a {
    font-family: var(--mono);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 8px;
    color: var(--ink-soft);
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-links > a:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.navbar .dropdown-item {
    position: relative;
}

.navbar .dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-family: var(--mono);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 9px 14px;
    border-radius: 8px;
    color: var(--ink-soft);
    text-decoration: none;
    border: none;
    background: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.navbar .dropdown-trigger:hover,
.navbar .dropdown-item.open .dropdown-trigger {
    background: var(--surface-2);
    color: var(--ink);
}

.navbar .dropdown-trigger.active {
    color: var(--accent);
}

.navbar .caret {
    transition: transform 0.18s ease;
    font-size: 0.7em;
}

.navbar .dropdown-item.open .caret {
    transform: rotate(180deg);
}

.navbar .dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 230px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    padding: 14px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
    overflow: hidden;
}

.navbar .dropdown-menu::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--gold), var(--color-nom));
}

.navbar .dropdown-item.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.navbar .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--ink-soft);
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.navbar .dropdown-menu a:hover {
    background: var(--surface-2);
    color: var(--ink);
    transform: translateX(2px);
}

.dropdown-flag {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.15s ease;
}

.dropdown-flag-es {
    background: linear-gradient(to bottom, #c60b1e 0 25%, #ffc400 25% 75%, #c60b1e 75% 100%);
}

.dropdown-flag-fr {
    background: linear-gradient(to right, #0055a4 0 33.33%, #ffffff 33.33% 66.66%, #ef4135 66.66% 100%);
}

.navbar .dropdown-menu a:hover .dropdown-flag-es {
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), 0 0 0 3px var(--color-acc-bg);
}

.navbar .dropdown-menu a:hover .dropdown-flag-fr {
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), 0 0 0 3px var(--color-nom-bg);
}

.dropdown-lang-name {
    flex: 1;
}

.dropdown-soon-badge {
    font-family: var(--mono);
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gold);
    background: var(--gold-soft);
    padding: 3px 7px;
    border-radius: 999px;
    flex-shrink: 0;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 860px) {
    .nav-links {
        position: fixed;
        inset: 60px 0 auto 0;
        background: var(--surface);
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-md);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
        gap: 2px;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links > a,
    .navbar .dropdown-trigger {
        width: 100%;
    }

    .navbar .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 14px;
        margin-top: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }

    .navbar .dropdown-menu::before {
        display: none;
    }

    .navbar .dropdown-item.open .dropdown-menu {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }
}

/* --- Page-specific tokens beyond the shared navbar/token block above: this
   page (unlike german-a1-verb-conjugation-drill.html) has real interactive
   content — a correct/incorrect guess popup — so it needs --good/--bad too. --- */
:root {
    --good: #2f9e58;
    --good-soft: #e6f4ea;
    --bad: #d64545;
    --bad-soft: #fbe9e9;
}

@media (prefers-color-scheme: dark) {
    :root {
        --good: #6bc98a;
        --good-soft: rgba(107, 201, 138, 0.14);
        --bad: #e58080;
        --bad-soft: rgba(229, 128, 128, 0.14);
    }
}

/* .vcd-popup-overlay below sets an explicit `display: flex` for its visible
   state, which — at equal specificity — beats the browser's built-in
   `[hidden] { display: none }` rule once this stylesheet loads. Without this
   override the popup overlay renders full-screen on page load instead of
   staying hidden. */
[hidden] { display: none !important; }

/* ================= PAGE / BACK LINK (ported from .sj-page/.sj-back-link) ================= */
.vcd-page {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 94px 16px 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vcd-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    text-decoration: none;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 999px;
    padding: 6px 16px 6px 6px;
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.vcd-back-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--accent);
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.vcd-back-link:hover {
    background: var(--accent);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.vcd-back-link:hover .vcd-back-link-icon {
    transform: translateX(-2px);
}

/* ================= HERO (ported from .sj-hero-card — plain card,
   no decorative circles) ================= */
.vcd-hero-card {
    padding: 36px 34px;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
}

.vcd-hero-card > .hub-tag-badge {
    position: static;
    display: inline-flex;
    margin: 0 0 14px;
}

.vcd-hero-card h1 {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0 0 10px;
}

.vcd-hero-sub {
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.65;
    max-width: 600px;
    margin: 0 0 22px;
}

.vcd-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

/* ================= PROGRESS (ported from .sj-progress-card) ================= */
.vcd-progress-card {
    padding: 18px 22px;
    border-radius: 18px;
}

.vcd-progress-card .card-header-flex {
    margin-bottom: 0;
}

/* ================= TYPEWRITER CARD ================= */
.vcd-typewriter-card {
    padding: 32px 34px;
    border-radius: 22px;
}

.vcd-score-inline {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ink-soft);
    white-space: nowrap;
    flex-shrink: 0;
}

.vcd-animated-feed {
    font-family: var(--serif);
    font-size: 1.15rem;
    line-height: 1.9;
    font-weight: 400;
    color: var(--ink);
    min-height: 6.5em;
}

.vcd-animated-feed::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1.05em;
    margin-left: 2px;
    vertical-align: text-bottom;
    background: var(--accent);
    animation: vcdCaretBlink 0.9s step-end infinite;
}
@keyframes vcdCaretBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.vcd-typewriter-card.is-paused .vcd-animated-feed::after { animation-play-state: paused; opacity: 0; }

/* Nominative/accusative phrases pop in with a little scale bounce once
   revealed after a guess, so the correct-case reveal reads as a small
   payoff rather than just appearing. */
.vcd-reveal-pop {
    animation: vcdRevealPop 0.32s ease;
}
@keyframes vcdRevealPop {
    0% { transform: scale(0.85); opacity: 0.4; }
    60% { transform: scale(1.06); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* ================= GUESS POPUP ================= */
.vcd-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 18, 30, 0.42);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: vcdOverlayFade 0.2s ease;
}
@keyframes vcdOverlayFade { from { opacity: 0; } to { opacity: 1; } }

.vcd-popup-box {
    width: 100%;
    max-width: 380px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
    padding: 28px 26px;
    text-align: center;
    animation: vcdPopupIn 0.22s cubic-bezier(0.2, 0.8, 0.3, 1.2);
}
@keyframes vcdPopupIn {
    from { transform: translateY(10px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.vcd-popup-label {
    display: block;
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-faint);
    margin-bottom: 10px;
}

.vcd-popup-phrase {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--ink);
    margin: 0 0 22px;
    word-break: break-word;
}

.vcd-popup-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Base pill-button shape ported from german-a1-sentence-journal.css's
   .sj-btn (page-specific there too — each page keeps its own copy, same
   as every other duplicated component on this site); these two rules
   layer on the nominative/accusative fill colors (same --color-nom-bg/
   --color-acc-bg used by .topic-chip-1/.topic-chip-2). */
.vcd-popup-choice {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 14px 10px;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.vcd-popup-choice-coo { background: var(--color-coo-bg); color: var(--color-coo); }
.vcd-popup-choice-sub { background: var(--color-sub-bg); color: var(--color-sub); }

.vcd-popup-choice:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.vcd-popup-choice:disabled { cursor: default; }

.vcd-popup-choice.is-correct-answer { border-color: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.vcd-popup-choice.is-wrong-answer { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }

/* ================= COMPLETE (ported from .sj-complete-card, layered on
   see-test.css's shared .success-card/.success-icon-wrap) ================= */
.vcd-complete-card {
    text-align: center;
    padding: 40px 34px;
    border-radius: 22px;
}

.vcd-complete-card h3 {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ink);
    margin: 4px 0 8px;
}

.vcd-results-score {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 22px;
}

.vcd-results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    margin-bottom: 24px;
}

.vcd-result-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
}

.vcd-result-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
}
.vcd-result-row.is-correct .vcd-result-icon { background: var(--good); }
.vcd-result-row.is-wrong .vcd-result-icon { background: var(--bad); }

.vcd-result-phrase {
    flex: 1;
    font-weight: 600;
    color: var(--ink);
    font-size: 0.9rem;
}

.vcd-result-case {
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 10px;
    border-radius: 999px;
    flex-shrink: 0;
}
.vcd-result-case-coordinating { background: var(--color-coo-bg); color: var(--color-coo); }
.vcd-result-case-subordinating { background: var(--color-sub-bg); color: var(--color-sub); }

.vcd-results-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 18px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 640px) {
    .vcd-hero-card,
    .vcd-typewriter-card,
    .vcd-complete-card {
        padding: 26px 22px;
    }

    .vcd-animated-feed { font-size: 1.05rem; }

    .vcd-popup-choices { grid-template-columns: 1fr; }
}
