/* ==========================================================
   VetEntrusted Academie
   Reader Design System – vaste huisstijl v2
   Bestand: wwwroot/css/reader-design-system.css

   Hoofdprincipes:
   - Afgeronde gradient-header binnen de pagina
   - Vier vaste documentgegevenskaarten
   - Iedere hoofdsectie als ruime, afgeronde kaart
   - Eén consistente contentbreedte en padding
   - Gelijke weergave in editor, reader, preview en PDF
   - Responsive voor desktop, laptop, tablet en mobiel
========================================================== */


/* ==========================================================
   1. Documentbasis en design tokens
========================================================== */

.reader-design-document {
    --reader-primary: #0d9488;
    --reader-primary-dark: #0f766e;
    --reader-primary-deep: #163b65;
    --reader-accent: #14b8a6;
    --reader-soft: #f0fdfa;
    --reader-page: #ffffff;
    --reader-surface: #ffffff;
    --reader-surface-subtle: #f7fbfb;
    --reader-text: #17324d;
    --reader-muted: #607586;
    --reader-heading: #102a43;
    --reader-border: #d7e7e5;
    --reader-border-strong: #bdd8d5;
    --reader-warning: #b45309;
    --reader-warning-bg: #fff7ed;
    --reader-danger: #dc2626;
    --reader-danger-bg: #fff1f2;
    --reader-info: #2563eb;
    --reader-info-bg: #eff6ff;
    --reader-purple: #7c3aed;
    --reader-purple-bg: #faf5ff;
    --reader-success: #0f766e;
    --reader-success-bg: #ecfdf5;
    --reader-content-width: 1120px;
    --reader-document-padding: clamp(0.875rem, 3vw, 2rem);
    --reader-hero-padding: clamp(1.4rem, 4vw, 2.75rem);
    --reader-card-padding: clamp(1.1rem, 2.7vw, 1.8rem);
    --reader-section-gap: clamp(0.9rem, 2vw, 1.15rem);
    --reader-hero-radius: 1.5rem;
    --reader-card-radius: 1.125rem;
    --reader-meta-radius: 0.875rem;
    --reader-shadow: 0 10px 28px rgba(15, 59, 101, 0.055);
    --reader-shadow-strong: 0 14px 34px rgba(15, 59, 101, 0.18);
    box-sizing: border-box;
    width: min(var(--reader-content-width), 100%);
    max-width: 100%;
    margin: 0 auto;
    padding: var(--reader-document-padding);
    color: var(--reader-text);
    background: var(--reader-page);
    border: 0;
    border-radius: 1.5rem;
    line-height: 1.62;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 1rem;
    text-align: left;
    overflow-wrap: anywhere;
}

    .reader-design-document *,
    .reader-design-document *::before,
    .reader-design-document *::after {
        box-sizing: border-box;
    }

    .reader-design-document p,
    .reader-design-document ul,
    .reader-design-document ol,
    .reader-design-document blockquote,
    .reader-design-document table,
    .reader-design-document figure,
    .reader-design-document pre {
        max-width: 100%;
    }

    .reader-design-document p {
        margin: 0 0 1rem;
    }

        .reader-design-document p:last-child,
        .reader-design-document ul:last-child,
        .reader-design-document ol:last-child {
            margin-bottom: 0;
        }

    .reader-design-document img,
    .reader-design-document video,
    .reader-design-document svg {
        max-width: 100%;
        height: auto;
    }

    .reader-design-document a {
        color: var(--reader-primary-dark);
        font-weight: 750;
        text-decoration-thickness: 0.08em;
        text-underline-offset: 0.18em;
    }

    .reader-design-document strong {
        color: inherit;
        font-weight: 850;
    }

    .reader-design-document code {
        color: #0f172a;
        background: #f1f5f9;
        border: 1px solid #e2e8f0;
        border-radius: 0.4rem;
        padding: 0.1rem 0.35rem;
        font-size: 0.92em;
    }


/* ==========================================================
   2. Vaste afgeronde documentheader
========================================================== */

.reader-design-cover {
    width: 100%;
    margin: 0;
    padding: var(--reader-hero-padding);
    color: #ffffff;
    background: radial-gradient(circle at 88% 8%, rgba(255, 255, 255, 0.13), transparent 18rem), linear-gradient(135deg, var(--reader-primary-deep) 0%, var(--reader-primary-dark) 48%, var(--reader-primary) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--reader-hero-radius);
    box-shadow: var(--reader-shadow-strong);
    overflow: hidden;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.reader-design-cover-inner {
    width: 100%;
    max-width: 58rem;
    margin: 0;
}

.reader-design-cover-kicker {
    margin: 0 0 0.55rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.reader-design-cover h1 {
    max-width: 58rem;
    margin: 0;
    color: #ffffff;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
    font-weight: 950;
    text-wrap: balance;
}

.reader-design-subtitle {
    max-width: 54rem;
    margin: 0.8rem 0 0;
    color: #e6fffb;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.5;
    font-weight: 650;
}


/* ==========================================================
   3. Documentgegevens: code, versie, eigenaar, herziening
========================================================== */

.reader-design-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
    margin: 1.125rem 0 0;
}

.reader-design-meta-card {
    min-width: 0;
    padding: 0.9rem 1rem;
    background: var(--reader-surface-subtle);
    border: 1px solid var(--reader-border);
    border-radius: var(--reader-meta-radius);
    box-shadow: 0 4px 14px rgba(15, 59, 101, 0.025);
}

.reader-design-meta-label,
.reader-design-meta-value {
    display: block;
}

.reader-design-meta-label {
    margin-bottom: 0.2rem;
    color: var(--reader-heading);
    font-size: 0.82rem;
    line-height: 1.25;
    font-weight: 900;
}

.reader-design-meta-value {
    color: var(--reader-text);
    font-size: 0.92rem;
    line-height: 1.42;
    font-weight: 600;
    overflow-wrap: anywhere;
}


/* ==========================================================
   4. Body en hoofdsecties
========================================================== */

.reader-design-body {
    width: 100%;
    margin: 1.35rem 0 0;
    padding: 0;
}

.reader-section-card,
.reader-learning-goals,
.reader-key-concepts,
.reader-summary-block {
    width: 100%;
    max-width: 100%;
    margin: 0 0 var(--reader-section-gap);
    padding: var(--reader-card-padding);
    background: var(--reader-surface);
    border: 1px solid var(--reader-border);
    border-radius: var(--reader-card-radius);
    box-shadow: var(--reader-shadow);
    overflow: hidden;
    break-inside: auto;
}

    .reader-section-card:last-child,
    .reader-learning-goals:last-child,
    .reader-key-concepts:last-child,
    .reader-summary-block:last-child {
        margin-bottom: 0;
    }

.reader-section-introduction {
    background: linear-gradient(180deg, rgba(240, 253, 250, 0.72), rgba(255, 255, 255, 0.92));
}

.reader-section-card > h2,
.reader-learning-goals > h2,
.reader-key-concepts > h2,
.reader-summary-block > h2 {
    margin: 0 0 1rem;
    padding: 0 0 0.65rem;
    color: var(--reader-primary-dark);
    border-bottom: 1px solid var(--reader-border);
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
    font-weight: 950;
    scroll-margin-top: 8rem;
    text-wrap: balance;
}

.reader-section-card h3,
.reader-learning-goals h3,
.reader-key-concepts h3,
.reader-summary-block h3,
.reader-mini-summary h3,
.reader-checklist h3,
.reader-atlas-card h3,
.reader-block-clinical-tip h3,
.reader-block-warning h3,
.reader-block-practice h3 {
    margin: 1.4rem 0 0.65rem;
    color: var(--reader-heading);
    font-size: clamp(1.15rem, 2vw, 1.48rem);
    line-height: 1.22;
    letter-spacing: -0.02em;
    font-weight: 900;
}

.reader-section-card h4,
.reader-learning-goals h4,
.reader-key-concepts h4,
.reader-summary-block h4,
.reader-mini-summary h4,
.reader-checklist h4,
.reader-atlas-card h4 {
    margin: 1.15rem 0 0.5rem;
    color: var(--reader-heading);
    font-size: clamp(1.02rem, 1.6vw, 1.22rem);
    line-height: 1.25;
    font-weight: 850;
}

.reader-section-card > h2 + p,
.reader-section-card > h2 + ul,
.reader-section-card > h2 + ol,
.reader-section-card > h2 + h3 {
    margin-top: 0;
}

.reader-section-subtitle {
    margin: -0.3rem 0 1rem;
    color: var(--reader-muted);
    font-size: 1.02rem;
    font-weight: 650;
}


/* ==========================================================
   5. Lijsten, leerdoelen en kernbegrippen
========================================================== */

.reader-design-document ul,
.reader-design-document ol {
    margin-top: 0.45rem;
    margin-bottom: 1rem;
    padding-left: 1.35rem;
}

.reader-design-document li {
    margin-bottom: 0.38rem;
    padding-left: 0.1rem;
}

.reader-learning-goals {
    background: var(--reader-soft);
    border-left: 6px solid var(--reader-primary);
}

.reader-key-concepts {
    background: #ffffff;
}

.reader-concept-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: flex-start;
}

    .reader-concept-grid span {
        padding: 0.45rem 0.78rem;
        color: var(--reader-primary-dark);
        background: var(--reader-soft);
        border: 1px solid var(--reader-border);
        border-radius: 999px;
        font-weight: 850;
        line-height: 1.25;
    }


/* ==========================================================
   6. Callouts, stappen, tips en waarschuwingen
========================================================== */

.clinical-pearl,
.pdf-callout-warning,
.reader-mini-summary,
.reader-checklist,
.reader-block-clinical-tip,
.reader-block-warning,
.reader-block-practice,
.reader-intermezzo,
.reader-callout,
.reader-callout-info,
.reader-callout-warning,
.reader-callout-danger,
.reader-callout-success {
    width: 100%;
    margin: 1.15rem 0;
    padding: 1.05rem 1.2rem;
    border-radius: 0.95rem;
    break-inside: avoid;
}

.clinical-pearl,
.reader-block-clinical-tip {
    color: #065f46;
    background: var(--reader-success-bg);
    border: 1px solid #a7f3d0;
    border-left: 6px solid var(--reader-primary);
}

.pdf-callout-warning,
.reader-block-warning,
.reader-callout-warning {
    color: #7c2d12;
    background: var(--reader-warning-bg);
    border: 1px solid #fed7aa;
    border-left: 6px solid var(--reader-warning);
}

.reader-block-practice,
.reader-callout-info {
    color: #1e3a8a;
    background: var(--reader-info-bg);
    border: 1px solid #bfdbfe;
    border-left: 6px solid var(--reader-info);
}

.reader-callout-danger {
    color: #991b1b;
    background: var(--reader-danger-bg);
    border: 1px solid #fecdd3;
    border-left: 6px solid var(--reader-danger);
}

.reader-callout-success {
    color: #065f46;
    background: var(--reader-success-bg);
    border: 1px solid #a7f3d0;
    border-left: 6px solid var(--reader-success);
}

.reader-mini-summary {
    background: #f8fafc;
    border: 1px solid var(--reader-border);
}

.reader-checklist {
    background: #ffffff;
    border: 1px solid var(--reader-border);
}

.clinical-pearl-title {
    display: block;
    margin-bottom: 0.35rem;
    color: #065f46;
    font-size: 1.02rem;
    font-weight: 950;
}

.reader-intermezzo {
    color: #4c1d95;
    background: linear-gradient(135deg, var(--reader-purple-bg), #ffffff);
    border: 1px solid #e9d5ff;
    border-left: 6px solid var(--reader-purple);
    box-shadow: 0 10px 26px rgba(76, 29, 149, 0.07);
}

    .reader-intermezzo h3,
    .reader-intermezzo h4 {
        margin-top: 0;
        color: #6b21a8;
    }

.reader-intermezzo-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
    color: #6b21a8;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.reader-checklist ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.reader-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.55rem;
}

    .reader-checklist li > span:first-child {
        flex: 0 0 auto;
        color: var(--reader-primary);
        font-weight: 950;
    }

.reader-step-card {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--reader-border);
    border-radius: 1rem;
    background: #f8fdfc;
}

.reader-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 50%;
    color: #ffffff;
    background: var(--reader-primary-dark);
    font-size: 1.08rem;
    font-weight: 950;
}


/* ==========================================================
   7. Tabellen
========================================================== */

.reader-table-wrap {
    width: 100%;
    margin: 1.25rem 0;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 0.95rem;
    -webkit-overflow-scrolling: touch;
}

.reader-design-document table,
.reader-table {
    width: 100%;
    min-width: 100%;
    margin: 1.25rem 0;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border: 1px solid var(--reader-border);
    border-radius: 0.95rem;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(215, 231, 229, 0.16);
}

    .reader-design-document caption,
    .reader-table caption {
        caption-side: top;
        padding: 0.75rem 0.85rem;
        color: var(--reader-primary-dark);
        background: var(--reader-soft);
        border: 1px solid var(--reader-border);
        border-bottom: 0;
        border-radius: 0.85rem 0.85rem 0 0;
        text-align: left;
        font-weight: 900;
    }

    .reader-design-document th,
    .reader-design-document td,
    .reader-table th,
    .reader-table td {
        padding: 0.72rem 0.78rem;
        vertical-align: top;
        text-align: left;
        border-right: 1px solid var(--reader-border);
        border-bottom: 1px solid var(--reader-border);
    }

    .reader-design-document tr > :last-child,
    .reader-table tr > :last-child {
        border-right: 0;
    }

    .reader-design-document tbody tr:last-child td,
    .reader-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .reader-design-document th,
    .reader-table th {
        color: #ffffff;
        background: linear-gradient(135deg, var(--reader-primary-deep), var(--reader-primary-dark));
        font-weight: 900;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .reader-design-document tbody tr:nth-child(even) td,
    .reader-table tbody tr:nth-child(even) td {
        background: #f8fbfb;
    }


/* ==========================================================
   8. Formules, blockquotes en pagina-einde
========================================================== */

.formula {
    width: 100%;
    margin: 1.15rem 0;
    padding: 1rem 1.15rem;
    color: #e6fffb;
    background: #102f3a;
    border: 1px solid #1e4b59;
    border-radius: 0.85rem;
    font-family: Consolas, "Liberation Mono", monospace;
    text-align: center;
    overflow-x: auto;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.reader-design-document blockquote {
    margin: 1.15rem 0;
    padding: 1rem 1.15rem;
    color: var(--reader-text);
    background: var(--reader-soft);
    border: 1px solid var(--reader-border);
    border-left: 6px solid var(--reader-primary);
    border-radius: 0.9rem;
}

.reader-page-break,
.pdf-page-break {
    display: block;
    height: 1px;
    margin: 2rem 0;
    border-top: 2px dashed #94a3b8;
    break-before: page;
    page-break-before: always;
}

    .reader-page-break::before,
    .pdf-page-break::before {
        content: "Pagina-einde";
        display: inline-block;
        padding: 0.15rem 0.55rem;
        color: #64748b;
        background: #ffffff;
        border: 1px solid #cbd5e1;
        border-radius: 999px;
        font-size: 0.75rem;
        font-weight: 800;
        transform: translateY(-50%);
    }


/* ==========================================================
   9. Figuren en afbeelding-layouts
========================================================== */

.reader-design-document figure {
    margin: 1.35rem 0;
}

.reader-design-document figcaption {
    margin-top: 0.6rem;
    color: var(--reader-muted);
    font-size: 0.9rem;
    line-height: 1.45;
    font-weight: 650;
    text-align: center;
}

.reader-image-text-grid {
    display: grid;
    grid-template-columns: minmax(250px, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(1rem, 2.5vw, 1.75rem);
    align-items: start;
    width: 100%;
    margin: 1.4rem 0;
}

.reader-text-left-image-right {
    grid-template-columns: minmax(0, 1.1fr) minmax(250px, 0.9fr);
}

.reader-image-text-content {
    min-width: 0;
}

    .reader-image-text-content > :first-child {
        margin-top: 0;
    }

.reader-image-card {
    min-width: 0;
    margin: 1.25rem 0;
    padding: 0.8rem;
    background: #ffffff;
    border: 1px solid var(--reader-border);
    border-radius: 1rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    break-inside: avoid;
}

.reader-image-text-grid .reader-image-card,
.reader-atlas-card .reader-image-card {
    margin: 0;
}

.reader-image-card img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 0.75rem;
}

.reader-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 1rem;
    color: #64748b;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 0.85rem;
    text-align: center;
    font-weight: 750;
}

.reader-image-full-width {
    width: 100%;
}

    .reader-image-full-width .reader-image-placeholder {
        min-height: 280px;
    }

.reader-image-wrap-section {
    width: 100%;
    margin: 1.4rem 0;
    display: flow-root;
}

.reader-image-float-right {
    float: right;
    width: min(42%, 420px);
    margin: 0.25rem 0 1rem 1.4rem;
}

.reader-image-float-left {
    float: left;
    width: min(42%, 420px);
    margin: 0.25rem 1.4rem 1rem 0;
}


/* ==========================================================
   10. Atlas en kaartgrids
========================================================== */

.reader-atlas-grid,
.reader-atlas-grid-two,
.reader-atlas-grid-four,
.reader-card-grid {
    display: grid;
    gap: 1rem;
    width: 100%;
    margin: 1.35rem 0;
}

.reader-atlas-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.reader-atlas-grid-two,
.reader-atlas-grid-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reader-atlas-card,
.reader-info-card {
    min-width: 0;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid var(--reader-border);
    border-radius: 1rem;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
    break-inside: avoid;
}

    .reader-atlas-card > h3,
    .reader-info-card > h3 {
        margin-top: 0.85rem;
    }


/* ==========================================================
   11. Layoutpresets
========================================================== */

.reader-layout-procedure-checklist .reader-section-card > h2,
.reader-layout-procedure-steps .reader-section-card > h2,
.reader-layout-protocol-checklist .reader-section-card > h2 {
    padding-left: 0.8rem;
    border-left: 7px solid var(--reader-primary);
    border-bottom-color: transparent;
}

.reader-layout-protocol-checklist .reader-section-card {
    border-left: 7px solid var(--reader-primary);
}

.reader-layout-reference-manual,
.reader-layout-professional-book {
    --reader-card-padding: clamp(1.05rem, 2.4vw, 1.65rem);
}

    .reader-layout-reference-manual table,
    .reader-layout-professional-book table {
        font-size: 0.96rem;
    }

.reader-layout-atlas-four .reader-atlas-grid,
.reader-layout-atlas-four .reader-atlas-grid-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reader-layout-article {
    --reader-content-width: 920px;
    --reader-card-padding: clamp(1.2rem, 3vw, 2rem);
}

.reader-layout-article .reader-section-card {
    border-left: 4px solid var(--reader-border-strong);
}

.reader-layout-article .reader-section-card > h2 {
    max-width: 28ch;
}

.reader-layout-scientific-paper {
    --reader-content-width: 980px;
    --reader-card-padding: clamp(1rem, 2.4vw, 1.6rem);
    font-family: Georgia, "Times New Roman", serif;
}

.reader-layout-scientific-paper .reader-design-cover,
.reader-layout-scientific-paper .reader-design-meta-grid,
.reader-layout-scientific-paper .reader-section-card {
    box-shadow: none;
}

.reader-layout-scientific-paper .reader-section-card {
    border-radius: 0.45rem;
}

.reader-layout-scientific-paper table {
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 0.92rem;
}

.reader-layout-case-report {
    --reader-content-width: 1000px;
}

.reader-layout-case-report .reader-section-card {
    border-top: 5px solid var(--reader-primary);
}

.reader-layout-case-report .reader-block-warning,
.reader-layout-case-report .reader-block-clinical-tip {
    break-inside: avoid;
}


/* ==========================================================
   12. Editor shell en sticky toolbar
========================================================== */

.vea-reader-editor-shell {
    --vea-editor-toolbar-top: 72px;
    position: relative;
    width: 100%;
    max-width: 100%;
}

.vea-reader-toolbar-sticky {
    position: sticky;
    top: var(--vea-editor-toolbar-top);
    z-index: 120;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #dce7ee;
    border-radius: 1.1rem 1.1rem 0 0;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.vea-reader-toolbar-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vea-reader-toolbar-group {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding-right: 0.5rem;
    margin-right: 0.25rem;
    border-right: 1px solid #dce7ee;
}

    .vea-reader-toolbar-group:last-child {
        padding-right: 0;
        margin-right: 0;
        border-right: 0;
    }

.vea-toolbar-label {
    margin-right: 0.15rem;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.vea-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 36px;
    border-radius: 999px;
    font-weight: 800;
    white-space: nowrap;
}

.vea-toolbar-dropdown-menu {
    --vea-dropdown-max-height: min(70dvh, 42rem);
    min-width: 280px;
    max-width: min(420px, calc(100vw - 1rem));
    max-height: var(--vea-dropdown-max-height);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 0.5rem;
    background: #ffffff;
    border: 1px solid #dce7ee;
    border-radius: 1rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
    -webkit-overflow-scrolling: touch;
}

.vea-toolbar-dropdown-menu:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

.vea-toolbar-dropdown-menu::-webkit-scrollbar {
    width: 0.72rem;
}

.vea-toolbar-dropdown-menu::-webkit-scrollbar-thumb {
    background: #a8bac7;
    border: 0.2rem solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
}

.vea-dropdown-featured-item {
    background: linear-gradient(135deg, #eff6ff, #f0fdfa);
    border: 1px solid #bfdbfe;
}

    .vea-toolbar-dropdown-menu .dropdown-item {
        padding: 0.65rem 0.75rem;
        color: #0f172a;
        border-radius: 0.75rem;
        font-weight: 650;
        white-space: normal;
    }

        .vea-toolbar-dropdown-menu .dropdown-item:hover,
        .vea-toolbar-dropdown-menu .dropdown-item:focus {
            color: #0f766e;
            background: #f0fdfa;
        }

        .vea-toolbar-dropdown-menu .dropdown-item small {
            display: block;
            margin-top: 0.15rem;
            color: #64748b;
            font-weight: 500;
            line-height: 1.35;
        }

.vea-toolbar-divider-title {
    padding: 0.45rem 0.75rem 0.25rem;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.vea-reader-editor-shell .rz-html-editor {
    border-color: #dce7ee;
    border-radius: 0 0 1.1rem 1.1rem;
    overflow: hidden;
}

.vea-reader-editor-shell .rz-html-editor-toolbar {
    position: sticky;
    top: calc(var(--vea-editor-toolbar-top) + 64px);
    z-index: 110;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.vea-reader-editor-shell .rz-html-editor-content {
    min-height: 680px;
    background: #ffffff;
}

.vea-reader-editor-shell [contenteditable="true"] {
    outline: none;
}

    .vea-reader-editor-shell [contenteditable="true"]:focus {
        box-shadow: inset 0 0 0 2px rgba(13, 148, 136, 0.14);
    }


/* ==========================================================
   13. Reader Design Studio modal
========================================================== */

.reader-design-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.reader-design-modal-card {
    display: flex;
    flex-direction: column;
    width: min(1600px, 96vw);
    height: min(920px, 94vh);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.35rem;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
    overflow: hidden;
}

.reader-design-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.reader-design-modal-kicker {
    margin: 0 0 0.25rem;
    color: #0f766e;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.reader-design-modal-header h2 {
    margin: 0;
    color: #0f172a;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.reader-design-modal-header p:last-child {
    margin: 0.25rem 0 0;
    color: #64748b;
}

.reader-design-modal-body {
    flex: 1;
    min-height: 0;
    padding: 1rem;
    background: #f8fafc;
    overflow: auto;
}

.reader-design-studio-grid {
    display: grid;
    grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.reader-design-control-panel,
.reader-design-preview-panel {
    min-width: 0;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
}

.reader-design-options-box {
    display: grid;
    gap: 0.65rem;
    padding: 0.85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
}

.reader-design-extra {
    min-height: 110px;
    resize: vertical;
}

.reader-design-warning-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.8rem;
    color: #78350f;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0.85rem;
    font-size: 0.9rem;
}

.reader-design-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

    .reader-design-preview-header h3 {
        margin: 0;
        color: #0f172a;
        font-weight: 950;
    }

.reader-design-empty-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    padding: 1rem;
    color: #64748b;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    text-align: center;
}

.reader-design-preview-frame {
    max-height: 640px;
    padding: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    overflow: auto;
}

    .reader-design-preview-frame .reader-design-document {
        border-radius: 0;
    }

.reader-design-result-box,
.reader-design-medical-box {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 1rem;
}

.reader-design-result-box {
    color: #134e4a;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
}

.reader-design-medical-box {
    color: #78350f;
    background: #fffbeb;
    border: 1px solid #fde68a;
}


/* ==========================================================
   14. Knoppen en toegankelijkheid
========================================================== */

.btn-teal {
    color: #ffffff;
    background-color: #0d9488;
    border-color: #0d9488;
}

    .btn-teal:hover,
    .btn-teal:focus {
        color: #ffffff;
        background-color: #0f766e;
        border-color: #0f766e;
    }

.btn-outline-teal {
    color: #0f766e;
    background-color: #ffffff;
    border-color: #0d9488;
}

    .btn-outline-teal:hover,
    .btn-outline-teal:focus {
        color: #ffffff;
        background-color: #0d9488;
        border-color: #0d9488;
    }

.reader-design-document :focus-visible,
.vea-reader-editor-shell :focus-visible,
.reader-design-modal-card :focus-visible {
    outline: 3px solid rgba(20, 184, 166, 0.45);
    outline-offset: 3px;
}

.reader-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ==========================================================
   15. Responsive
========================================================== */

@media (max-width: 1100px) {
    .reader-design-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .reader-design-document {
        --reader-document-padding: 1rem;
    }

    .reader-design-studio-grid {
        grid-template-columns: 1fr;
    }

    .reader-atlas-grid-four,
    .reader-layout-atlas-four .reader-atlas-grid,
    .reader-layout-atlas-four .reader-atlas-grid-four {
        grid-template-columns: 1fr;
    }

    .vea-reader-editor-shell {
        --vea-editor-toolbar-top: 56px;
    }

    .vea-reader-toolbar-group {
        padding-right: 0;
        border-right: 0;
    }

    /* Grote reader-navigatie mag op kleine schermen plaats maken voor leesruimte. */
    .reader-document-header,
    .reader-top-strip,
    .reader-toolbar,
    .reader-action-bar,
    .reader-chapter-overview {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .reader-design-document {
        --reader-document-padding: 0.75rem;
        --reader-hero-padding: 1.35rem 1.1rem;
        --reader-card-padding: 1rem;
        --reader-section-gap: 0.8rem;
        --reader-hero-radius: 1.15rem;
        --reader-card-radius: 1rem;
        border-radius: 1rem;
        font-size: 0.98rem;
    }

    .reader-design-cover h1 {
        font-size: clamp(1.8rem, 8vw, 2.45rem);
        letter-spacing: -0.035em;
    }

    .reader-design-meta-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        margin-top: 0.8rem;
    }

    .reader-design-meta-card {
        padding: 0.78rem 0.9rem;
    }

    .reader-design-body {
        margin-top: 0.85rem;
    }

    .reader-image-text-grid,
    .reader-text-left-image-right,
    .reader-atlas-grid-two,
    .reader-atlas-grid-four {
        grid-template-columns: 1fr;
    }

    .reader-image-float-right,
    .reader-image-float-left {
        float: none;
        width: 100%;
        margin: 1rem 0;
    }

    .reader-image-placeholder,
    .reader-image-full-width .reader-image-placeholder {
        min-height: 150px;
    }

    .reader-design-document table,
    .reader-table {
        display: block;
        width: max-content;
        min-width: 100%;
        max-width: none;
        overflow-x: auto;
        white-space: normal;
        -webkit-overflow-scrolling: touch;
    }

        .reader-design-document th,
        .reader-design-document td,
        .reader-table th,
        .reader-table td {
            min-width: 9rem;
        }

    .reader-design-modal-card {
        width: 100%;
        height: 96vh;
        border-radius: 1rem;
    }

    .reader-design-modal-header,
    .reader-design-preview-header {
        flex-direction: column;
        align-items: stretch;
    }

    .vea-reader-toolbar-sticky {
        top: var(--vea-editor-toolbar-top);
        padding: 0.6rem;
        border-radius: 0.9rem 0.9rem 0 0;
    }

    .vea-reader-toolbar-inner {
        gap: 0.4rem;
    }

    .vea-toolbar-label {
        display: none;
    }

    .vea-toolbar-btn {
        min-height: 34px;
        font-size: 0.85rem;
    }

    .vea-toolbar-dropdown-menu {
        min-width: 260px;
    }

    .vea-reader-editor-shell .rz-html-editor-toolbar {
        top: calc(var(--vea-editor-toolbar-top) + 58px);
    }
}

@media (max-width: 575.98px) {
    .reader-design-document {
        --reader-document-padding: 0.5rem;
        --reader-hero-padding: 1.2rem 1rem;
        --reader-card-padding: 0.95rem;
    }

    .reader-design-cover-kicker {
        font-size: 0.7rem;
        letter-spacing: 0.09em;
    }

    .reader-design-subtitle {
        font-size: 0.96rem;
    }

    .reader-section-card > h2,
    .reader-learning-goals > h2,
    .reader-key-concepts > h2,
    .reader-summary-block > h2 {
        font-size: clamp(1.35rem, 6vw, 1.75rem);
        line-height: 1.15;
    }

    .reader-step-card {
        grid-template-columns: 2.35rem minmax(0, 1fr);
        gap: 0.7rem;
        padding: 0.85rem;
    }

    .reader-step-number {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 0.95rem;
    }

    .vea-reader-toolbar-inner {
        align-items: stretch;
    }

    .vea-reader-toolbar-group {
        width: 100%;
        justify-content: flex-start;
    }

    .vea-toolbar-btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}


/* ==========================================================
   16. Print en PDF-export
========================================================== */

@media print {
    .reader-design-document {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        color: #111827;
        background: #ffffff;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        font-size: 10.5pt;
        line-height: 1.5;
    }

    .reader-design-cover {
        margin: 0 0 0.35cm;
        padding: 0.75cm;
        border-radius: 0.45cm;
        box-shadow: none;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .reader-design-meta-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.2cm;
        margin: 0 0 0.35cm;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .reader-design-meta-card {
        padding: 0.28cm 0.32cm;
        box-shadow: none;
    }

    .reader-design-body {
        margin-top: 0;
    }

    .reader-section-card,
    .reader-learning-goals,
    .reader-key-concepts,
    .reader-summary-block,
    .clinical-pearl,
    .pdf-callout-warning,
    .reader-mini-summary,
    .reader-checklist,
    .reader-intermezzo,
    .reader-block-clinical-tip,
    .reader-block-warning,
    .reader-block-practice,
    .reader-atlas-card,
    .reader-image-card {
        box-shadow: none;
    }

    .reader-section-card {
        break-inside: auto;
        page-break-inside: auto;
    }

        .reader-section-card > h2,
        .reader-learning-goals > h2,
        .reader-key-concepts > h2,
        .reader-summary-block > h2 {
            break-after: avoid;
            page-break-after: avoid;
        }

    .reader-design-document table,
    .reader-table {
        display: table;
        width: 100%;
        max-width: 100%;
        break-inside: auto;
        page-break-inside: auto;
        box-shadow: none;
    }

        .reader-design-document tr,
        .reader-table tr {
            break-inside: avoid;
            page-break-inside: avoid;
        }

    .reader-image-text-grid,
    .reader-atlas-grid-two,
    .reader-atlas-grid-four {
        gap: 0.35cm;
    }

    .reader-page-break,
    .pdf-page-break {
        height: 0;
        margin: 0;
        border: 0;
        break-before: page;
        page-break-before: always;
    }

        .reader-page-break::before,
        .pdf-page-break::before {
            display: none;
            content: "";
        }

    .vea-reader-toolbar-sticky,
    .rz-html-editor-toolbar,
    .reader-document-header,
    .reader-top-strip,
    .reader-toolbar,
    .reader-action-bar,
    .reader-chapter-overview {
        display: none !important;
    }
}
