.hero {
    padding: 56px 0 20px;
}

.hero-home {
    padding-top: 60px;
}

.hero-home-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 26px;
    align-items: stretch;
}

.hero-home-text,
.hero-home-visual {
    background: linear-gradient(135deg, rgba(124, 121, 184, 0.10), rgba(124, 121, 184, 0.03));
    border: 1px solid rgba(124, 121, 184, 0.15);
    border-radius: 32px;
    box-shadow: var(--shadow);
}

.hero-home-text {
    padding: 42px;
}

.hero-home-visual {
    position: relative;
    padding: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-kicker {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 18px;
}

.hero-home-text h1 {
    margin: 0 0 14px;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.03;
    max-width: 760px;
}

.hero-home-text p {
    margin: 0;
    max-width: 720px;
    color: var(--muted);
    font-size: 1.06rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.hero-mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 30px;
}

.mini-stat {
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(226, 230, 240, 0.9);
    border-radius: 18px;
    padding: 18px;
}

.mini-stat strong {
    display: block;
    font-size: 1.55rem;
    margin-bottom: 6px;
}

.mini-stat span {
    color: var(--muted);
    font-size: 0.95rem;
}

.hero-visual-card {
    width: 100%;
    max-width: 430px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 18px 35px rgba(34, 42, 70, 0.12);
}

.hero-visual-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.hero-flag {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: var(--surface-soft);
    font-size: 1.6rem;
    border: 1px solid var(--border);
}

.hero-visual-top h3 {
    margin: 0 0 6px;
    font-size: 1.2rem;
}

.hero-visual-top p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.96rem;
}

.hero-visual-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.hero-visual-lines {
    margin-top: 24px;
    display: grid;
    gap: 12px;
}

.hero-line {
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #e5e8f6, #f1f3fb);
}

.hero-line.short {
    width: 70%;
}

.hero-floating {
    position: absolute;
    padding: 12px 16px;
    border-radius: 999px;
    background: white;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    font-weight: 800;
    color: var(--primary-dark);
}

.hero-floating-one {
    top: 26px;
    right: 24px;
}

.hero-floating-two {
    bottom: 28px;
    left: 24px;
}

.home-apq-section {
    padding-top: 38px;
    padding-bottom: 14px;
}

.home-apq-shell {
    overflow: hidden;
    position: relative;
    border-radius: 34px;
    background:
        radial-gradient(circle at 12% 10%, rgba(124, 121, 184, 0.18), transparent 32%),
        radial-gradient(circle at 86% 18%, rgba(115, 178, 147, 0.14), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 248, 255, 0.92));
    box-shadow: 0 28px 70px rgba(50, 59, 92, 0.12);
}

.home-apq-body {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 26px;
}

.home-apq-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 330px);
    align-items: center;
    gap: 34px;
    margin-bottom: 0;
}

.home-apq-heading {
    max-width: 820px;
}

.home-apq-kicker {
    margin-bottom: 14px;
}

.home-apq-heading h2 {
    max-width: 940px;
}

.home-apq-heading p {
    max-width: 760px;
}

.home-apq-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.home-apq-highlights span,
.home-apq-summary-chips span {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--primary);
    font-size: 0.94rem;
    font-weight: 800;
    background: rgba(124, 121, 184, 0.1);
    border: 1px solid rgba(124, 121, 184, 0.13);
}

.home-apq-actions {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.home-apq-actions .button {
    box-shadow: 0 16px 34px rgba(124, 121, 184, 0.22);
}

.home-apq-spotlight {
    display: grid;
    gap: 12px;
    justify-items: start;
    padding: 24px;
    border-radius: 28px;
    color: var(--text);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(239, 241, 252, 0.88)),
        radial-gradient(circle at top right, rgba(124, 121, 184, 0.22), transparent 50%);
    border: 1px solid rgba(124, 121, 184, 0.16);
    box-shadow: 0 20px 48px rgba(42, 48, 80, 0.1);
}

.home-apq-spotlight-label {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: rgba(124, 121, 184, 0.1);
}

.home-apq-spotlight-time {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.home-apq-spotlight-time strong {
    font-size: clamp(3.2rem, 7vw, 5.2rem);
    line-height: 0.88;
    letter-spacing: -0.08em;
}

.home-apq-spotlight-time span {
    padding-bottom: 8px;
    color: var(--muted);
    font-weight: 900;
}

.home-apq-spotlight-divider {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), rgba(124, 121, 184, 0.14));
}

.home-apq-spotlight p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.45;
}

.home-apq-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: end;
    gap: 18px;
    padding: 20px 0 0;
    border-top: 1px solid rgba(124, 121, 184, 0.12);
}

.home-apq-filters .filter-group {
    display: grid;
    gap: 12px;
    align-content: start;
}

.home-apq-filters .filter-label {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
}

.home-apq-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: var(--muted);
    padding: 18px 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(124, 121, 184, 0.12);
}

.home-apq-summary-copy {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.home-apq-summary-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.home-apq-summary strong {
    color: var(--text);
    font-size: 1.55rem;
    line-height: 1;
}

.home-apq-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.home-apq-card {
    height: 100%;
    border-radius: 26px;
    cursor: pointer;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 251, 255, 0.96));
    border-color: rgba(124, 121, 184, 0.14);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.home-apq-card:hover,
.home-apq-card:focus-visible {
    transform: translateY(-5px);
    box-shadow: 0 26px 46px rgba(34, 42, 70, 0.15);
    border-color: rgba(124, 121, 184, 0.28);
}

.home-apq-card:focus-visible {
    outline: 3px solid rgba(124, 121, 184, 0.26);
    outline-offset: 4px;
}

/* Default APQ theme palette. Topic-specific classes (set on the outer
   .home-apq-card element OR on a Games Studio card wrapper) override
   these via CSS custom properties; anything that consumes
   var(--apq-theme-*) downstream will pick up the right colours. */
.home-apq-card,
.themed-card {
    --apq-theme-from: rgba(124, 121, 184, 0.18);
    --apq-theme-to: rgba(196, 232, 219, 0.30);
    --apq-theme-accent: rgba(124, 121, 184, 0.35);
}

.home-apq-card-body {
    position: relative;
    display: grid;
    gap: 14px;
    height: 100%;
    padding: 14px;
}

.home-apq-card-media {
    position: relative;
    width: 100%;
    height: 170px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(124, 121, 184, 0.13);
    background:
        radial-gradient(circle at 30% 25%, var(--apq-theme-from), transparent 55%),
        radial-gradient(circle at 80% 80%, var(--apq-theme-to), transparent 50%),
        linear-gradient(135deg, #ffffff 0%, #f7f8fd 100%);
}

.home-apq-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-apq-card-ribbon {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 6px 11px;
    border-radius: 999px;
    color: var(--primary-dark);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(124, 121, 184, 0.18);
    box-shadow: 0 10px 18px rgba(42, 48, 80, 0.08);
}

.home-apq-card-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    text-align: center;
}

.home-apq-card-placeholder-emoji {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(124, 121, 184, 0.18);
    font-size: 2.4rem;
    line-height: 1;
    box-shadow: 0 12px 22px rgba(42, 48, 80, 0.08);
}

.home-apq-card-placeholder-label {
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(124, 121, 184, 0.16);
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.home-apq-card-content {
    display: grid;
    gap: 12px;
    align-content: start;
}

.home-apq-card-content h3 {
    margin: 0;
    font-size: 1.22rem;
    line-height: 1.18;
    letter-spacing: -0.025em;
}

.home-apq-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.home-apq-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(124, 121, 184, 0.10);
    border: 1px solid rgba(124, 121, 184, 0.16);
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
}

.home-apq-chip-icon {
    font-size: 0.95rem;
    line-height: 1;
}

.home-apq-chip-label {
    line-height: 1;
}

.home-apq-chip-topic {
    background: var(--apq-theme-from);
    border-color: var(--apq-theme-accent);
}

.home-apq-card-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 2px;
    padding-top: 12px;
    color: var(--primary);
    font-weight: 900;
    font-size: 0.95rem;
    border-top: 1px solid rgba(124, 121, 184, 0.12);
}

.home-apq-card-cta span:last-child {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 10px 18px rgba(124, 121, 184, 0.22);
    transition: transform 180ms ease;
}

.home-apq-card:hover .home-apq-card-cta span:last-child {
    transform: translateX(2px);
}

/* --- Per-topic colour palettes ---------------------------------------- */

.home-apq-card-alphabet {
    --apq-theme-from: rgba(217, 106, 142, 0.20);
    --apq-theme-to: rgba(255, 196, 0, 0.20);
    --apq-theme-accent: rgba(217, 106, 142, 0.35);
}
.home-apq-card-action {
    --apq-theme-from: rgba(255, 138, 101, 0.22);
    --apq-theme-to: rgba(255, 196, 80, 0.22);
    --apq-theme-accent: rgba(255, 138, 101, 0.40);
}
.home-apq-card-numbers {
    --apq-theme-from: rgba(58, 184, 192, 0.22);
    --apq-theme-to: rgba(106, 143, 212, 0.22);
    --apq-theme-accent: rgba(58, 184, 192, 0.40);
}
.home-apq-card-colours {
    --apq-theme-from: rgba(255, 196, 80, 0.28);
    --apq-theme-to: rgba(217, 106, 142, 0.20);
    --apq-theme-accent: rgba(255, 178, 80, 0.45);
}
.home-apq-card-animals {
    --apq-theme-from: rgba(120, 187, 122, 0.24);
    --apq-theme-to: rgba(58, 184, 192, 0.22);
    --apq-theme-accent: rgba(120, 187, 122, 0.40);
}
.home-apq-card-greet {
    --apq-theme-from: rgba(217, 106, 142, 0.22);
    --apq-theme-to: rgba(196, 232, 219, 0.30);
    --apq-theme-accent: rgba(217, 106, 142, 0.40);
}
.home-apq-card-assess {
    --apq-theme-from: rgba(120, 187, 122, 0.26);
    --apq-theme-to: rgba(196, 232, 219, 0.30);
    --apq-theme-accent: rgba(120, 187, 122, 0.40);
}
.home-apq-card-revision {
    --apq-theme-from: rgba(124, 121, 184, 0.22);
    --apq-theme-to: rgba(58, 184, 192, 0.22);
    --apq-theme-accent: rgba(124, 121, 184, 0.40);
}
/* "body parts" gets a dedicated class because `home-apq-card-body` is
   already used for the inner body element. */
.home-apq-card-body-parts {
    --apq-theme-from: rgba(106, 143, 212, 0.22);
    --apq-theme-to: rgba(196, 232, 219, 0.28);
    --apq-theme-accent: rgba(106, 143, 212, 0.40);
}

.home-apq-empty {
    margin-top: 6px;
}

@media (max-width: 1100px) {
    .hero-home-layout {
        grid-template-columns: 1fr;
    }

    .home-apq-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .hero-mini-stats {
        grid-template-columns: 1fr;
    }

    .home-apq-filters {
        grid-template-columns: 1fr;
    }

    .home-apq-header {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .home-apq-spotlight {
        max-width: 100%;
    }

    .home-apq-actions {
        justify-content: flex-start;
    }

    .home-apq-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-apq-summary-copy {
        flex-wrap: wrap;
    }

    .home-apq-summary-chips {
        justify-content: flex-start;
    }

    .home-apq-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .hero-home-text,
    .hero-home-visual {
        padding: 24px 20px;
    }

    .home-apq-grid {
        grid-template-columns: 1fr;
    }

    .home-apq-filters {
        padding: 16px;
    }
}

/* Teacher quickpicks hero
   Designed for an in-field teacher: phone in hand, class in front of them,
   needs to identify their sequence in milliseconds. Big tap targets, big flag,
   high-contrast typography, distinct colour per tile. */

.hero-quickpicks {
    padding: 40px 0 24px;
}

.quickpicks-header {
    text-align: center;
    margin-bottom: 28px;
}

.quickpicks-title {
    margin: 0 0 8px;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
}

.quickpicks-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
}

.quickpicks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.quickpick-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 200px;
    padding: 22px 22px 20px;
    border-radius: 24px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid rgba(34, 42, 70, 0.08);
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.quickpick-tile:hover,
.quickpick-tile:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(34, 42, 70, 0.14);
    outline: none;
}

.quickpick-tile--english-elem {
    background: linear-gradient(150deg, #fff4d6 0%, #ffe5a8 100%);
}

.quickpick-tile--german-elem {
    background: linear-gradient(150deg, #ffd9d9 0%, #ffb6b6 100%);
}

.quickpick-tile--english-kg {
    background: linear-gradient(150deg, #d9efff 0%, #a8d6ff 100%);
}

.quickpick-flag {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 8px;
}

.quickpick-level {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

.quickpick-language {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.05;
    margin-bottom: 12px;
}

.quickpick-meta {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    color: var(--text);
    font-weight: 700;
    font-size: 0.95rem;
}

.quickpick-tile--disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.3);
}

.quickpick-soon {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quickpicks-other {
    margin-top: 22px;
    text-align: center;
}

.quickpicks-other-link {
    color: var(--muted);
    font-size: 0.95rem;
    text-decoration: none;
    border-bottom: 1px dashed rgba(109, 116, 135, 0.4);
    padding-bottom: 2px;
}

.quickpicks-other-link:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
}

@media (max-width: 760px) {
    .hero-quickpicks {
        padding: 24px 0 16px;
    }

    .quickpicks-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .quickpick-tile {
        min-height: 140px;
        padding: 18px 20px;
    }

    .quickpick-flag {
        font-size: 2.4rem;
        margin-bottom: 4px;
    }

    .quickpick-language {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }
}
