/* style.css – ADHS-freundliches Design mit Dark Mode, Accessibility, Speech & Spiele */
:root {
    --primary: #7c6bb0;
    --primary-dark: #655a92;
    --secondary: #4db6ac;
    --accent: #e07a5f;
    --bg: #f8f6f9;
    --card-bg: #ffffff;
    --text: #2c3e50;
    --text-muted: #6c757d;
    --border: #e0dce5;
    --success: #4caf50;
    --radius: 16px;
    --shadow: 0 6px 20px rgba(124, 107, 176, 0.12);
    --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-size: 1.125rem;
    --link: #5b4fd1;
    --link-hover: #4437b8;
    --link-visited: #7c4ed8;
}

[data-theme="dark"] {
    --primary: #a78bfa;
    --primary-dark: #8b6fc9;
    --secondary: #5eead4;
    --accent: #fb923c;
    --bg: #1a1625;
    --card-bg: #2a2438;
    --text: #f1f5f9;
    --text-muted: #cbd5e1;
    --border: #3f3a4a;
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    --link: #8bdcf4;
    --link-hover: #c4b5fd;
    --link-visited: #b9b6ff;
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: .5rem 1rem;
    z-index: 1000;
    border-radius: 0 0 8px 0;
    transition: top .2s;
}
.skip-link:focus {
    top: 0;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

button:focus-visible, a:focus-visible, .answer-btn:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    background: linear-gradient(135deg, var(--bg) 0%, #eef7f6 100%);
    color: var(--text);
    line-height: 1.65;
    font-size: var(--font-size);
    transition: background .3s ease, color .3s ease;
}
[data-theme="dark"] body {
    background: linear-gradient(135deg, #1a1625 0%, #1e293b 100%);
}


a:not(.btn):not(.control-btn):not(.lang-btn):not(.skip-link) {
    color: var(--link);
    font-weight: 600;
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.18em;
    text-decoration-skip-ink: auto;
    overflow-wrap: anywhere;
    transition: color .2s ease, text-decoration-color .2s ease, background-color .2s ease;
}

a:not(.btn):not(.control-btn):not(.lang-btn):not(.skip-link):visited {
    color: var(--link-visited);
}

a:not(.btn):not(.control-btn):not(.lang-btn):not(.skip-link):hover,
a:not(.btn):not(.control-btn):not(.lang-btn):not(.skip-link):focus-visible {
    color: var(--link-hover);
    text-decoration-thickness: 3px;
}

.info-card a:not(.btn) {
    border-radius: .35rem;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.info-card a:not(.btn):hover,
.info-card a:not(.btn):focus-visible {
    background: rgba(167, 139, 250, 0.12);
}

.site-footer a:not(.btn) {
    color: #f1f5f9 !important;
    text-decoration-color: rgba(255,255,255,.55);
}

.site-footer a:not(.btn):visited {
    color: #e2e8f0 !important;
}

.site-footer a:not(.btn):hover,
.site-footer a:not(.btn):focus-visible {
    color: #ffffff !important;
    text-decoration-color: rgba(255,255,255,.9);
    background: rgba(255,255,255,.08);
}

.container { max-width: 920px; margin: 0 auto; padding: 0 1.5rem; }

.site-header {
    background: linear-gradient(135deg, var(--primary), #9b87d4);
    color: white;
    padding: 1.25rem 0;
    box-shadow: var(--shadow);
    position: relative;
}
.header-controls {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    display: flex;
    gap: .5rem;
    align-items: center;
}
.control-btn {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    color: white;
    border-radius: 8px;
    padding: .4rem .7rem;
    font-size: .9rem;
    cursor: pointer;
    transition: background .2s;
}
.control-btn:hover { background: rgba(255,255,255,.25); }

.logo { margin: 0; font-size: 2.1rem; font-weight: 700; }
.tagline { margin: .4rem 0 0; opacity: .95; font-size: 1.05rem; }

.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2.5rem;
    align-items: center;
    padding: 3.5rem 0 2rem;
}
.hero-content h2 { font-size: 2.4rem; margin-top: 0; color: var(--primary); line-height: 1.2; }
.highlight { 
    background: #fff4e6; 
    padding: .9rem 1.2rem; 
    border-radius: var(--radius); 
    border-left: 5px solid var(--accent); 
    margin: 1.2rem 0;
}
[data-theme="dark"] .highlight { background: #3d2f1f; color: #fed7aa; }

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    min-height: 52px;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover, .btn-primary:focus { 
    background: var(--primary-dark); 
    transform: translateY(-2px); 
    box-shadow: 0 6px 16px rgba(124, 107, 176, 0.3); 
}
.btn-secondary { background: var(--secondary); color: #1a1625; }
.btn-large { font-size: 1.3rem; padding: 1.1rem 2.8rem; }
.btn:focus { outline: 3px solid var(--accent); outline-offset: 3px; }

.hero-visual { text-align: center; }
.hero-visual img { max-width: 100%; height: auto; border-radius: var(--radius); }

.quiz-section, .result-section { padding: 2rem 0 3rem; }
.hidden { display: none; }

.progress-container { margin-bottom: 2rem; }
.progress-bar {
    height: 14px;
    background: #e9e6ef;
    border-radius: 7px;
    overflow: hidden;
}
[data-theme="dark"] .progress-bar { background: #3f3a4a; }
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    width: 0%;
    transition: width .5s ease;
    border-radius: 7px;
}
.progress-text { display: block; text-align: right; margin-top: .6rem; font-weight: 600; color: var(--primary); }

.question-container {
    background: var(--card-bg);
    padding: 2.2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: bounceIn .55s ease;
    border: 1px solid var(--border);
}
@keyframes bounceIn {
    0% { opacity: 0; transform: scale(.92) translateY(15px); }
    70% { opacity: 1; transform: scale(1.02); }
    100% { transform: scale(1); }
}

.question-text { font-size: 1.45rem; margin-bottom: 1.8rem; font-weight: 500; line-height: 1.4; }
.stage-label { 
    display: inline-block; 
    background: var(--secondary); 
    color: #1a1625; 
    padding: .3rem .8rem; 
    border-radius: 20px; 
    font-size: .85rem; 
    margin-bottom: 1rem; 
}

.answer-options { display: grid; gap: .8rem; }
.answer-btn {
    background: #f7f5fa;
    border: 2px solid transparent;
    padding: 1.1rem 1.2rem;
    border-radius: var(--radius);
    font-size: 1.1rem;
    cursor: pointer;
    text-align: left;
    transition: all .18s;
    color: var(--text);
}
[data-theme="dark"] .answer-btn { 
    background: #3a3248; 
    color: #f1f5f9;
}
.answer-btn:hover, .answer-btn:focus {
    background: #efeaf5;
    border-color: var(--primary);
    transform: translateX(6px);
    color: #2c3e50;
}
[data-theme="dark"] .answer-btn:hover, 
[data-theme="dark"] .answer-btn:focus { 
    background: #5a4d70; 
    color: #ffffff;
}
.answer-btn.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary-dark);
}

.feedback {
    margin-top: 1.8rem;
    text-align: center;
    font-size: 1.25rem;
    min-height: 2.2rem;
    color: var(--secondary);
    font-weight: 600;
}

.result-card {
    background: var(--card-bg);
    padding: 2.8rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: bounceIn .6s ease;
    text-align: center;
    border: 1px solid var(--border);
}
.score-big { font-size: 4.2rem; font-weight: 800; color: var(--primary); margin: .4rem 0; }
.confetti { font-size: 2.2rem; animation: confettiPop .9s ease infinite; display: inline-block; margin-bottom: .5rem; }
@keyframes confettiPop {
    0%, 100% { transform: scale(1) rotate(0); }
    50% { transform: scale(1.25) rotate(8deg); }
}

.strengths-box {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    padding: 1.2rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    text-align: left;
}
.strengths-box h4 { margin-top: 0; }

.info-section, .games-section { padding: 3rem 0; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.info-card {
    background: var(--card-bg);
    padding: 1.6rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-top: 5px solid var(--secondary);
}

.site-footer {
    background: #2c3e50;
    color: #d0d5db;
    padding: 2.5rem 0;
    margin-top: 2rem;
    font-size: .95rem;
}
[data-theme="dark"] .site-footer { background: #0f0c14; }
.disclaimer { background: #34495e; color: white; padding: 1.1rem; border-radius: var(--radius); margin-bottom: 1.2rem; }

.resume-banner {
    background: var(--accent);
    color: white;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    text-align: center;
}

.speech-btn {
    background: var(--secondary);
    color: #1a1625;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: .6rem;
    vertical-align: middle;
    transition: transform .2s;
}
.speech-btn:hover { transform: scale(1.1); }
.speech-btn.speaking { animation: pulse 1s infinite; }
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.speech-controls {
    display: flex;
    gap: .5rem;
    align-items: center;
    margin-top: .8rem;
}
.speech-controls button {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    color: white;
    border-radius: 8px;
    padding: .35rem .6rem;
    font-size: .85rem;
    cursor: pointer;
}

/* Spiele */
.game-box {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border);
    min-height: 300px;
}
.game-target {
    width: 200px;
    height: 200px;
    margin: 1.5rem auto;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    user-select: none;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.game-target.waiting { background: #f87171; color: white; }
.game-target.ready { background: #4ade80; color: #14532d; transform: scale(1.08); }
.game-target.star { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: white; font-size: 4rem; }
.game-target.bomb { background: linear-gradient(135deg, #ef4444, #b91c1c); color: white; font-size: 4rem; }
.game-stats { margin-top: 1rem; font-size: 1.2rem; font-weight: 600; }
.kid-feedback { font-size: 1.4rem; margin: .8rem 0; min-height: 2rem; }

/* Sprach-Buttons */
.lang-buttons {
    display: flex;
    border: 2px solid var(--primary);
    border-radius: 12px;
    overflow: hidden;
}
.lang-btn {
    background: transparent;
    border: none;
    padding: .5rem 1rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
    transition: all .2s;
}
.lang-btn.active {
    background: var(--primary);
    color: white;
}
.lang-btn:hover:not(.active) {
    background: rgba(124, 107, 176, 0.15);
}

/* ===== Container Queries ===== */

.info-card,
.question-container,
.result-card,
.game-box {
    container-type: inline-size;
}

@container (max-width: 400px) {
    .info-card h4 { font-size: 1rem; }
    .info-card p { font-size: .95rem; }
    .question-text { font-size: 1.2rem; }
    .answer-btn { padding: .85rem 1rem; font-size: 1rem; }
    .game-target { width: 140px; height: 140px; font-size: 2.2rem; }
    .score-big { font-size: 3rem; }
}

@container (min-width: 500px) {
    .info-card { padding: 1.8rem; }
    .question-container { padding: 2.4rem; }
}

/* Fallback für Browser ohne Container Query Support bleibt über Media Queries erhalten */

/* Tablets and smaller */
@media (max-width: 900px) {
    .container { padding: 0 1.2rem; }
    .hero { gap: 1.5rem; }
    .hero-content h2 { font-size: 2rem; }
    .info-grid { grid-template-columns: 1fr 1fr; }
}

/* Mobile */
@media (max-width: 750px) {
    .hero { 
        grid-template-columns: 1fr; 
        padding: 2rem 0 1.5rem;
    }
    .hero-visual { order: -1; margin-bottom: 1rem; }
    .hero-content h2 { font-size: 1.8rem; }
    .question-text { font-size: 1.3rem; }
    .question-container { padding: 1.5rem; }
    .header-controls { 
        position: static; 
        justify-content: center; 
        margin-top: .8rem; 
        flex-wrap: wrap;
    }
    .game-target { width: 160px; height: 160px; font-size: 2.5rem; }
    .info-grid { grid-template-columns: 1fr; }
    .btn-large { font-size: 1.15rem; padding: 1rem 2rem; }
    .result-card { padding: 1.8rem; }
    .score-big { font-size: 3.2rem; }
}

/* Small phones */
@media (max-width: 480px) {
    body { font-size: 1rem; }
    .logo { font-size: 1.6rem; }
    .tagline { font-size: .95rem; }
    .hero-content h2 { font-size: 1.5rem; }
    .question-text { font-size: 1.15rem; }
    .answer-btn { padding: .9rem 1rem; font-size: 1rem; }
    .game-target { width: 140px; height: 140px; font-size: 2.2rem; }
    .control-btn { padding: .3rem .5rem; font-size: .8rem; }
    .lang-switch { margin-top: .5rem; }
}

.consent-banner {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 1rem 1.2rem;
    border-radius: var(--radius);
    margin: 1rem auto;
    max-width: 920px;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    box-shadow: var(--shadow);
}
.consent-banner p { margin: 0; font-size: .95rem; }
@media print {
    .site-header, .site-footer, .btn, .header-controls, .lang-switch, .hero, .info-section, .games-section, #feedback {
        display: none !important;
    }
    .result-card {
        box-shadow: none;
        border: 1px solid #ccc;
        max-width: 100%;
    }
    body { background: white; color: black; }
}

/* Visible language controls on the questionnaire, results and guide */
.header-languages { border-color: rgba(255,255,255,.65); flex-shrink: 0; }
.header-languages .lang-btn { color: #fff; padding: .35rem .55rem; }
.header-languages .lang-btn.active { background: #40316c; color: white; }
.header-languages .lang-btn:hover:not(.active) { background: rgba(255,255,255,.25); }
@media (max-width: 760px) {
    .header-controls { max-width: 100%; }
    .header-languages .lang-btn { padding: .35rem .55rem; }
}

/* Quality pass: readable controls, predictable focus and reduced-motion */
.answer-btn { min-height: 48px; overflow-wrap: anywhere; text-align: left; }
.lang-btn { min-width: 44px; min-height: 40px; }
.question-text, .info-card, .result-card { overflow-wrap: anywhere; }
#progress-bar { overflow:hidden; }
@media (max-width: 480px) { .container { padding-left: 1rem; padding-right: 1rem; } .speech-controls { display:flex; flex-wrap:wrap; gap:.5rem; } }
@media print { .confetti {display:none!important;} }


/* SO-ADHS 1.3.2 — visueller Feinschliff: ohne Änderungen an Quiz oder Sprachlogik */
:root {
    --surface-soft: #f4f2fa;
    --card-outline: rgba(92, 78, 133, .14);
}
[data-theme="dark"] {
    --surface-soft: #332c43;
    --card-outline: rgba(199, 183, 247, .15);
}

/* Einheitliche Karten, mit ruhiger Tiefe und ohne verspringende Inhalte */
.info-card,
.question-container,
.result-card,
.game-box {
    border: 1px solid var(--card-outline);
    box-shadow: 0 10px 28px rgba(31, 25, 59, .09);
}
[data-theme="dark"] .info-card,
[data-theme="dark"] .question-container,
[data-theme="dark"] .result-card,
[data-theme="dark"] .game-box {
    box-shadow: 0 12px 28px rgba(0, 0, 0, .23);
}
.info-card {
    border-top: 4px solid var(--secondary);
    display: flex;
    flex-direction: column;
    gap: .35rem;
    min-width: 0;
}
.info-card h3,
.info-card h4 { line-height: 1.35; margin-top: .4rem; margin-bottom: .45rem; }
.info-card p { margin-top: .35rem; margin-bottom: .8rem; }
.info-card .btn { margin-top: auto; align-self: flex-start; }

/* Quellen: eine dezente, gut lesbare Informationseinheit statt Browser-Standardlink */
.evidence-card {
    gap: .7rem;
    padding: clamp(1.35rem, 3.5vw, 2rem);
    background: var(--card-bg);
}
.evidence-card h3 { margin: 0; }
.evidence-card p { margin: 0; }
.evidence-card .evidence-sources {
    border-top: 1px solid var(--border);
    padding-top: .9rem;
    margin-top: .15rem;
}
.evidence-card .source-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    max-width: 100%;
    line-height: 1.5;
    font-weight: 650;
    padding: .5rem .7rem;
    border: 1px solid var(--border);
    border-radius: .65rem;
    background: var(--surface-soft);
    text-decoration: none !important;
    overflow-wrap: anywhere;
}
.evidence-card .source-link::after {
    content: '↗';
    font-size: 1.05em;
    line-height: 1;
    flex-shrink: 0;
}
.evidence-card .source-link:hover,
.evidence-card .source-link:focus-visible {
    background: var(--surface-soft) !important;
    border-color: var(--primary);
    text-decoration: underline !important;
    text-underline-offset: .2em;
}

/* Konsistente Buttons: Hover, Tastatur, kleine Bildschirme */
.btn {
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
}
.btn-primary {
    color: #fff;
    background: #6551ac;
    box-shadow: 0 4px 12px rgba(77, 57, 145, .17);
}
.btn-primary:hover,
.btn-primary:focus-visible { background: #51418f; }
[data-theme="dark"] .btn-primary { background: #a78bfa; color: #1a132c; }
[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn-primary:focus-visible { background: #c4b5fd; color: #1a132c; }
.btn-secondary:hover { filter: brightness(.96); }
.btn:active { transform: translateY(0); }
.answer-btn { box-shadow: inset 0 0 0 1px transparent; }
.answer-btn:hover { box-shadow: inset 0 0 0 1px var(--primary); }

/* Ruhiger Footer: besserer Abstand, Quellen und Rechtliches visuell getrennt */
.site-footer {
    background: #233044;
    border-top: 1px solid rgba(255,255,255,.1);
    line-height: 1.65;
}
[data-theme="dark"] .site-footer { background: #100e19; }
.site-footer .container { max-width: 920px; }
.site-footer .disclaimer {
    padding: 1.2rem 1.35rem;
    background: #364a61;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
}
[data-theme="dark"] .site-footer .disclaimer { background: #302b41; }
.site-footer .footer-sources { color: #dbe2ed; }
.site-footer .footer-legal {
    padding-top: 1rem;
    margin-top: 1.1rem;
    border-top: 1px solid rgba(255,255,255,.17);
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .4rem .6rem;
}
.site-footer .footer-legal a { border-radius: .3rem; }

@media (max-width: 480px) {
    .info-card { padding: 1.25rem; }
    .evidence-card { padding: 1.3rem; }
    .evidence-card .source-link { width: 100%; box-sizing: border-box; }
    .btn { padding: .85rem 1.25rem; min-height: 48px; }
    .site-footer { padding: 2rem 0; }
}
@media (prefers-reduced-motion: reduce) {
    .btn, .info-card, .source-link { transition: none !important; }
}


/* Magazinangebote: klarer, responsiver Themenbereich – v1.3.4 */
.related-section { padding: 1rem 0 3.5rem; }
.related-shell {
    border: 1px solid var(--border);
    border-radius: 1.6rem;
    padding: clamp(1.1rem, 3.4vw, 2.1rem);
    background: linear-gradient(160deg, rgba(124,107,176,.075), rgba(77,182,172,.045) 45%, transparent 80%), var(--card-bg);
    box-shadow: 0 14px 40px rgba(48,40,78,.085);
}
.related-heading {
    position: relative; overflow: hidden;
    display: flex; justify-content: space-between; gap: 1rem;
    align-items: center; padding: clamp(1.15rem, 3vw, 1.8rem);
    margin-bottom: 1.2rem; border-radius: 1.2rem;
    color: #fff; background: linear-gradient(120deg, #544487 0%, #7460a5 52%, #2f8681 110%);
}
.related-intro { position: relative; z-index: 1; max-width: 36rem; }
.related-heading h2 { color: #fff; font-size: clamp(1.5rem, 3.8vw, 2.15rem); line-height: 1.2; letter-spacing: -.025em; margin: .55rem 0 .5rem; }
.related-heading p { color: #f5f1ff; font-size: .98rem; margin: 0; }
.related-kicker { display: inline-block; color: #f3f5ff; font-size: .73rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.related-heading-art { align-self: stretch; display: grid; place-items: center; min-width: 5rem; font-size: clamp(3.8rem, 9vw, 6rem); opacity: .38; line-height: 1; position: relative; }
.related-heading-art span { position: absolute; right: 0; bottom: 0; font-size: 2.2rem; }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.related-card {
    --related-accent: #7663b7; --related-tint: rgba(118,99,183,.12);
    position: relative; min-width: 0; display: flex; flex-direction: column; align-items: flex-start;
    padding: clamp(1.15rem, 2.5vw, 1.55rem); border: 1px solid var(--border); border-radius: 1.2rem;
    border-top: 4px solid var(--related-accent);
    background: var(--card-bg); box-shadow: 0 4px 18px rgba(33,28,60,.06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.related-card--flow { --related-accent: #248d78; --related-tint: rgba(36,141,120,.12); }
.related-card--physio { --related-accent: #3777b7; --related-tint: rgba(55,119,183,.12); }
.related-card--autism { --related-accent: #8362bd; --related-tint: rgba(131,98,189,.13); }
.related-card--gym { --related-accent: #c17340; --related-tint: rgba(193,115,64,.13); }
.related-card--strategy { --related-accent: #4c789d; --related-tint: rgba(76,120,157,.13); }
.related-card--jarvis { --related-accent: #5b81ce; --related-tint: rgba(91,129,206,.14); }
.related-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(33,28,60,.13); }
.related-card-top { display: flex; width: 100%; justify-content: space-between; align-items: flex-start; margin-bottom: .8rem; }
.related-icon { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 1rem; background: var(--related-tint); font-size: 1.65rem; }
.related-number { font-size: .78rem; letter-spacing: .07em; font-weight: 800; color: var(--text-muted); }
.related-card h3 { font-size: clamp(1.16rem, 2.4vw, 1.34rem); line-height: 1.3; margin: 0 0 .55rem; color: var(--text); overflow-wrap: anywhere; }
.related-card .related-subtitle { font-size: .76rem; letter-spacing: .035em; font-weight: 800; color: var(--text); border: 1px solid var(--border); background: var(--related-tint); border-radius: 999px; padding: .28rem .68rem; margin: 0 0 .65rem; }
.related-card .related-description { color: var(--text-muted); font-size: .97rem; line-height: 1.55; margin: 0 0 1.4rem; }
.related-card .related-link {
    margin-top: auto; width: 100%; min-height: 46px; box-sizing: border-box;
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    padding: .7rem .9rem; border-radius: .75rem; border: 1px solid var(--border);
    background: var(--related-tint); color: var(--text) !important; font-size: .91rem;
    line-height: 1.3; font-weight: 750; text-decoration: none !important; overflow-wrap: anywhere;
}
.related-card .related-link:hover, .related-card .related-link:focus-visible { background: var(--card-bg); border-color: var(--related-accent); box-shadow: inset 0 0 0 1px var(--related-accent); }
.related-arrow { font-size: 1.1rem; flex: none; }
.related-extra { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.15rem; margin-top: 1rem; border: 1px solid var(--border); border-radius: 1rem; background: var(--card-bg); }
.related-extra-icon { display: grid; place-items: center; width: 3rem; height: 3rem; flex: none; background: rgba(124,107,176,.12); border-radius: .85rem; font-size: 1.4rem; }
.related-extra-copy { flex: 1 1 14rem; min-width: 0; }
.related-extra-copy strong { display: block; font-size: 1.03rem; line-height: 1.35; }
.related-extra p { margin: .2rem 0 0; color: var(--text-muted); font-size: .9rem; }
.related-extra > a { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; flex-shrink: 0; min-height: 44px; box-sizing: border-box; padding: .55rem .8rem; border: 1px solid var(--border); border-radius: .7rem; background: rgba(124,107,176,.08); text-decoration: none !important; font-size: .88rem; }
.related-extra > a:hover, .related-extra > a:focus-visible { background: rgba(124,107,176,.16); border-color: var(--primary); }
.related-note { display: flex; gap: .55rem; align-items: flex-start; font-size: .85rem; color: var(--text-muted); line-height: 1.55; margin: 1.15rem .2rem 0; }
.related-note > span:first-child { flex: none; }
[data-theme="dark"] .related-shell { background: linear-gradient(145deg, rgba(167,139,250,.12), transparent 55%), var(--card-bg); box-shadow: none; }
[data-theme="dark"] .related-card { box-shadow: none; }
[data-theme="dark"] .related-card--flow { --related-accent: #66d9bd; }
[data-theme="dark"] .related-card--physio { --related-accent: #77b7f4; }
[data-theme="dark"] .related-card--autism { --related-accent: #c5acfa; }
[data-theme="dark"] .related-card--gym { --related-accent: #f0ad77; }
[data-theme="dark"] .related-card--strategy { --related-accent: #93c5fd; }
[data-theme="dark"] .related-card--jarvis { --related-accent: #8fb9ff; }
@media (max-width: 680px) {
    .related-grid { grid-template-columns: minmax(0, 1fr); }
    .related-heading-art { min-width: 2.4rem; opacity: .22; }
    .related-extra { flex-wrap: wrap; }
    .related-extra > a { width: 100%; justify-content: space-between; }
}
@media (max-width: 390px) { .related-heading-art { display: none; } .related-shell { padding: .85rem; } }
@media (prefers-reduced-motion: reduce) { .related-card { transition: none; } .related-card:hover { transform: none; } }
