/* ==========================================================================
   GERMAN-A1-COURSE.CSS — scoped styles for german-a1-course.html,
   now the A1 Beginner Course landing page linked from german-courses-page.html:
   an A1 Course context card + a 2x2 preview grid of the site's other A1
   flagship pieces (Story / 1000 Words / Grammar Path / Letters). .card/
   .hub-tag-badge/.badge-* are inherited from see-test.css.

   This file also re-themes the whole page: it redeclares the shared design
   tokens (--bg/--surface/--ink/--accent/--gold/--line/--serif/--color-*)
   with the same "modern Bauhaus" values used on german-a0-absolute-foundations.css/
   german-a0-grammar-path.css/german-courses-page.css. Because this stylesheet is only ever
   linked from german-a1-course.html and loads after see-test.css,
   every shared component that reads those tokens picks up the new
   palette on THIS page only. Uses "html:root" rather than plain ":root"
   for the override — see a1-highlights.css for why that extra
   specificity is worth the insurance.
   ========================================================================== */

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;

    --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;

    --line-strong: #d8cba8;
    --accent-glow: rgba(224, 67, 43, 0.45);

    --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;
        --accent-glow: rgba(255, 91, 65, 0.4);

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

/* Vibrant Bauhaus accent strip across the top of the popup — same three
   primaries used throughout the site's topic-color system (matches
   german-courses-page.html). */
.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);
}

/* --- Language flag swatches + "Soon" badges (matches german-courses-page.html) --- */
.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;
    }

    /* The gradient strip is positioned relative to the popup's own box —
       once that box goes position:static for the mobile stacked layout,
       there's no floating panel left for it to sit across, so drop it. */
    .navbar .dropdown-menu::before {
        display: none;
    }

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

    .nav-toggle {
        display: flex;
    }
}

.cj-page {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    padding: 88px 16px 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- Back link, matching .a0-back-link/.a0s-back-link/.a1h-back-link --- */
.cj-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;
}

.cj-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;
}

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

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

/* --- A1 Course context card: matches a1-start.html's own hero treatment
   (badge/heading/stats/pill-links), so this brief topic page still shows
   where Conjugation sits inside the full A1 course. --- */
.cj-course-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    text-align: left;
    padding: 40px 32px;
    border-radius: 26px;
    box-shadow: var(--shadow-lg);
}

.cj-course-card::before,
.cj-course-card::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
}

.cj-course-card::before {
    width: 220px;
    height: 220px;
    right: -80px;
    top: -90px;
    background: radial-gradient(circle at 30% 30%, var(--gold), transparent 70%);
    opacity: 0.55;
}

.cj-course-card::after {
    width: 150px;
    height: 150px;
    right: 40px;
    top: 90px;
    border: 20px solid var(--color-nom);
    opacity: 0.16;
}

.cj-course-card > .card-badge {
    position: static;
    display: inline-flex;
    margin: 0 0 14px;
}

.cj-course-card h2 {
    font-family: var(--serif);
    font-weight: 800;
    letter-spacing: -0.01em;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    line-height: 1.05;
    color: var(--ink);
    margin: 0 0 10px;
}

.cj-course-sub {
    color: var(--ink-soft);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 0 24px;
}

.cj-course-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 22px;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface-2);
}

.cj-course-stat {
    flex: 1;
    min-width: 120px;
    padding: 14px 16px;
    text-align: left;
    border-left: 1px solid var(--line);
}

.cj-course-stat:first-child {
    border-left: none;
}

.cj-course-stat-num {
    display: block;
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.cj-course-stat:nth-child(2) .cj-course-stat-num { color: var(--color-nom); }
.cj-course-stat:nth-child(3) .cj-course-stat-num { color: var(--color-coo); }

.cj-course-stat-label {
    display: block;
    font-family: var(--mono);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-soft);
    margin-top: 3px;
}

/* --- Time commitment callout: a small highlighted strip, ported from
   german-a0-course.css's identical .cj-time-commitment. --- */
.cj-time-commitment {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--gold-soft);
    border-radius: 14px;
    padding: 14px 18px;
    margin: 18px 0 22px;
}

.cj-time-icon {
    flex-shrink: 0;
    font-size: 1.1rem;
    line-height: 1;
}

.cj-time-commitment p {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--ink-soft);
    margin: 0;
}

.cj-time-commitment strong {
    color: var(--ink);
}

.cj-course-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cj-course-link {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink);
    background: var(--surface);
    border: 1.5px solid var(--ink);
    padding: 9px 14px;
    border-radius: 999px;
}

.badge-blue { background-color: var(--color-nom-bg); color: var(--color-nom); }
.badge-red  { background-color: var(--color-acc-bg); color: var(--color-acc); }
.badge-teal { background-color: var(--color-coo-bg); color: var(--color-coo); }
.badge-soon { background-color: var(--surface-2); color: var(--ink-faint); border: 1px dashed var(--line-strong); }
.badge-locked { background-color: var(--surface-2); color: var(--ink-faint); border: 1px dashed var(--line-strong); }
.badge-gold { background-color: var(--color-irr-bg); color: var(--color-irr); }
.badge-violet { background-color: var(--color-sub-bg); color: var(--color-sub); }
.badge-rose { background-color: var(--color-neg-bg); color: var(--color-neg); }

/* --- A1 Course pieces: a compact 2x2 preview grid of the site's other
   A1 flagship pieces, sitting between the A1 Course context card and the
   Conjugation content itself. --- */
.cj-pieces-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.cj-piece-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.cj-piece-card > .hub-tag-badge {
    position: static;
    display: inline-flex;
    align-self: flex-start;
    margin: 0 0 12px;
}

.cj-piece-card h4 {
    font-family: var(--serif);
    font-weight: 800;
    font-size: 1rem;
    color: var(--ink);
    margin: 0 0 8px;
}

.cj-piece-card p {
    color: var(--ink-soft);
    font-size: 0.86rem;
    line-height: 1.55;
    margin: 0 0 14px;
}

/* --- Visual previews: a small, honest sample of what each real page
   actually looks like, instead of a text description of its features. --- */
.cj-piece-visual {
    background: var(--surface-2);
    border-radius: 12px;
    padding: 14px 16px;
}

/* Story: one highlighted sentence, same .hl-base spans used everywhere
   else on the site the story appears. */
.cj-piece-visual-eyebrow {
    display: block;
    font-family: var(--mono);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-faint);
    margin-bottom: 6px;
}

.cj-piece-story-sentence {
    font-family: var(--serif);
    font-size: 0.98rem;
    line-height: 1.5;
    color: var(--ink);
    margin: 0;
}

/* 1000 Words: a couple of real German/English word-tile pairs. */
.cj-piece-visual-words {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cj-piece-word-chip {
    display: flex;
    align-items: baseline;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.84rem;
}

.cj-piece-word-chip b {
    font-family: var(--serif);
    font-weight: 700;
    color: var(--ink);
}

.cj-piece-word-chip small {
    color: var(--ink-faint);
    font-size: 0.74rem;
}

/* Grammar Path: the six planned topic nodes as small colored circles,
   matching the same topic colors used for .hl-base spans everywhere. */
.cj-piece-visual-nodes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: none;
    padding: 4px 0 0;
}

.cj-piece-node {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-family: var(--serif);
    font-weight: 800;
    font-size: 0.78rem;
    color: #fff;
    cursor: default;
}

.cj-piece-node-nom { background: var(--color-nom); }
.cj-piece-node-acc { background: var(--color-acc); }
.cj-piece-node-irr { background: var(--color-irr); }
.cj-piece-node-coo { background: var(--color-coo); }
.cj-piece-node-sub { background: var(--color-sub); }
.cj-piece-node-neg { background: var(--color-neg); }

/* Letters: a tiny quiz-question mockup, matching the choice-box look
   used on the real letter-course pages. */
.cj-piece-quiz-q {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 10px;
}

.cj-piece-quiz-choices {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cj-piece-quiz-choice {
    font-size: 0.8rem;
    padding: 7px 12px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink-soft);
}

.cj-piece-quiz-choice-correct {
    border-color: var(--color-coo);
    background: var(--color-coo-bg);
    color: var(--color-coo);
    font-weight: 700;
}

/* Sentence Journal: a loose scatter of word-bank chips, hinting at the
   click-to-arrange interaction on the real page. */
.cj-piece-visual-journal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cj-piece-journal-chip {
    display: inline-block;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 14px;
    font-family: var(--serif);
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--ink);
}

.cj-piece-journal-chip-accent {
    background: var(--color-neg-bg);
    border-color: var(--color-neg);
    color: var(--color-neg);
}

.cj-piece-link {
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cj-piece-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cj-piece-card .cj-lock-note,
.cj-test-card .cj-lock-note {
    margin: 10px 0 0;
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--bad);
}

/* --- Locked pieces (Sentence Journal until the Grammar Path is done, the
   placement test until the Sentence Journal is done): greyscale + inert.
   Pointer events are cut off in CSS for the mouse case; german-a1-course.js
   also preventDefault()s the click so keyboard activation can't slip
   through. --- */
.cj-piece-link.is-locked {
    filter: grayscale(1);
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.cj-piece-link.is-locked:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

.cj-piece-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    margin-top: auto;
    padding-top: 14px;
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--accent);
}

/* --- Small aside noting more content of this kind is planned, without
   undermining the fact that this one piece is real and linked. --- */
.cj-piece-note {
    font-size: 0.72rem;
    font-style: italic;
    color: var(--ink-faint);
    margin: 10px 0 0;
}

/* --- A1 Grammar Terms: now a regular .cj-piece-card (see the shared
   .cj-piece-card/h4/p rules above) sitting side-by-side with Learning Tips
   instead of its own wide card, so .cj-terms-chips is the only thing left
   to style here — the same six topic chips used on german-a1-grammar.html's
   own A1 section, wrapped in .cj-piece-visual for the same grey preview-box
   chrome every other piece card uses. --- */
.cj-terms-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* --- A1 -> A2 placement test: a wide "coming soon" card at the bottom
   of the page, reusing .cj-course-stats-row's exact stat treatment.
   Ported from german-a0-course.css's .cj-test-card. --- */
.cj-test-card > .hub-tag-badge {
    position: static;
    display: inline-flex;
    margin: 0 0 14px;
}

.cj-test-card h3 {
    font-family: var(--serif);
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--ink);
    margin: 0 0 10px;
}

.cj-test-card > p {
    font-size: 0.94rem;
    line-height: 1.6;
    color: var(--ink-soft);
    margin: 0 0 18px;
}

/* --- Reveal on scroll --- */
.cj-reveal {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .cj-reveal {
        opacity: 0;
        transform: translateY(14px);
        transition: opacity 0.5s ease, transform 0.5s ease;
    }

    .cj-reveal.is-visible {
        opacity: 1;
        transform: none;
    }
}

/* --- Responsive --- */
@media (max-width: 560px) {
    .cj-pieces-grid {
        grid-template-columns: 1fr;
    }

    .cj-course-stats-row {
        flex-direction: column;
    }

    .cj-course-stat {
        border-left: none;
        border-top: 1px solid var(--line);
    }

    .cj-course-stat:first-child {
        border-top: none;
    }
}

/* ================= "WHAT YOU WILL LEARN" INTRO POPUP =================
   Covers the page on load (see german-a1-course.js). Shown every visit for
   now — a "don't show again" localStorage flag is a planned follow-up. */
.cj-intro-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(20, 17, 30, 0.55);
    padding: 20px;
}

.cj-intro-modal-overlay.is-open {
    display: flex;
}

.cj-intro-modal {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--surface);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    padding: 40px 36px;
}

.cj-intro-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    line-height: 1;
    color: var(--ink-faint);
    background: var(--surface-2);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.cj-intro-modal-close:hover {
    background: var(--line);
    color: var(--ink);
}

.cj-intro-modal h2 {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 24px;
}

.cj-intro-modal-row {
    padding: 18px 0;
    border-top: 1px dashed var(--line-strong);
}

.cj-intro-modal-row:first-of-type {
    border-top: none;
    padding-top: 0;
}

.cj-intro-modal-row-title {
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 8px;
}

.cj-intro-modal-row-note {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--ink-soft);
    margin: 0;
}

@media (max-width: 640px) {
    .cj-intro-modal {
        padding: 30px 24px;
    }

    .cj-intro-modal h2 {
        font-size: 1.3rem;
    }
}
