/* ============================================================
   CAV PATHOLOGY · Embolism
   Scaffold styling — ONLY the "content pending" placeholder stubs,
   labeled figure/interactive mount points, and the master-matrix
   table placeholder used by the four empty Embolism topic pages.
   All real component styling arrives with its content in later
   prompts. Everything is page-scoped under each Embolism content
   div so nothing leaks into other modules.
   ============================================================ */

/* Uniform vertical rhythm between top-level section cards */
#cavEmbolismFoundationsTopicContent .topic-section-card + .topic-section-card,
#cavEmbolismVteTopicContent .topic-section-card + .topic-section-card,
#cavEmbolismSpecialTopicContent .topic-section-card + .topic-section-card,
#cavEmbolismIschemiaTopicContent .topic-section-card + .topic-section-card {
    margin-top: 24px;
}

/* Page-intent line under each topic title */
#cavEmbolismFoundationsTopicContent .emb-page-intent,
#cavEmbolismVteTopicContent .emb-page-intent,
#cavEmbolismSpecialTopicContent .emb-page-intent,
#cavEmbolismIschemiaTopicContent .emb-page-intent {
    font-size: 15px;
    line-height: 1.6;
    color: var(--muted-strong, #3a4256);
    margin: 4px 0 0;
    max-width: 78ch;
}

/* A sub-group heading inside a scaffold page (e.g. DVT vs PE halves) */
#cavEmbolismFoundationsTopicContent .emb-subhead,
#cavEmbolismVteTopicContent .emb-subhead,
#cavEmbolismSpecialTopicContent .emb-subhead,
#cavEmbolismIschemiaTopicContent .emb-subhead {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--accent, #2d6cdf);
    margin: 2px 0 10px;
}

/* Plain "content pending" text stub under a section header */
#cavEmbolismFoundationsTopicContent .emb-stub-pending,
#cavEmbolismVteTopicContent .emb-stub-pending,
#cavEmbolismSpecialTopicContent .emb-stub-pending,
#cavEmbolismIschemiaTopicContent .emb-stub-pending {
    margin: 8px 0 0;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(120, 144, 196, 0.10);
    color: var(--muted, #5a6478);
    font-size: 14px;
    font-style: italic;
}

/* A labeled mount point reserved for a later-prompt interactive or
   BioRender figure. Dashed + centered so later prompts can find it
   at a glance and distinguish it from a plain text stub. */
#cavEmbolismFoundationsTopicContent .emb-mount,
#cavEmbolismVteTopicContent .emb-mount,
#cavEmbolismSpecialTopicContent .emb-mount,
#cavEmbolismIschemiaTopicContent .emb-mount {
    margin: 10px 0 0;
    padding: 28px 18px;
    border: 1px dashed rgba(96, 132, 224, 0.6);
    border-radius: 14px;
    background: rgba(96, 132, 224, 0.07);
    text-align: center;
    color: var(--muted, #5a6478);
    font-size: 14px;
}

#cavEmbolismFoundationsTopicContent .emb-mount-label,
#cavEmbolismVteTopicContent .emb-mount-label,
#cavEmbolismSpecialTopicContent .emb-mount-label,
#cavEmbolismIschemiaTopicContent .emb-mount-label {
    display: block;
    font-weight: 700;
    font-style: normal;
    color: var(--text, #1f2638);
    margin-bottom: 4px;
}

/* Figure-slot variant — same dashed frame, taller to read as an empty
   image well awaiting a BioRender base + coordinate-mapped overlay. */
#cavEmbolismFoundationsTopicContent .emb-mount.is-figure,
#cavEmbolismVteTopicContent .emb-mount.is-figure,
#cavEmbolismSpecialTopicContent .emb-mount.is-figure,
#cavEmbolismIschemiaTopicContent .emb-mount.is-figure {
    padding: 44px 18px;
    border-style: dashed;
    border-color: rgba(120, 144, 196, 0.6);
    background: rgba(120, 144, 196, 0.06);
}

/* Master comparison matrix placeholder — an empty, labeled table so
   the layout reads correctly while no values are fabricated. */
#cavEmbolismFoundationsTopicContent .emb-matrix-placeholder {
    margin: 12px 0 0;
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
#cavEmbolismFoundationsTopicContent .emb-matrix-placeholder th {
    text-align: left;
    padding: 10px 12px;
    background: rgba(96, 132, 224, 0.10);
    border: 1px solid rgba(96, 132, 224, 0.22);
    color: var(--text, #1f2638);
    font-weight: 800;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
#cavEmbolismFoundationsTopicContent .emb-matrix-placeholder td {
    padding: 14px 12px;
    border: 1px dashed rgba(120, 144, 196, 0.4);
    color: var(--muted, #5a6478);
    font-style: italic;
}

/* ============================================================
   EMBOLISM FOUNDATIONS — page content (Blocks 1, 3, 4, 5, 6)
   Scoped to the Foundations content div. The router (Block 2) is
   styled in embolism-router.css.
   ============================================================ */

/* Block 1 — Hook */
#cavEmbolismFoundationsTopicContent .emb-hook {
    font-size: 16.5px;
    line-height: 1.65;
    color: #111111;
    margin: 6px 0 0;
    max-width: 80ch;
}
#cavEmbolismFoundationsTopicContent .emb-hook strong { color: #111111; }

/* Shared body copy */
#cavEmbolismFoundationsTopicContent .emb-body {
    font-size: 15px;
    line-height: 1.6;
    color: #111111;
    margin: 10px 0 0;
    max-width: 80ch;
}

/* Block 3 — Definitions */
#cavEmbolismFoundationsTopicContent .emb-def-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 12px;
}
#cavEmbolismFoundationsTopicContent .emb-def {
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-left: 5px solid var(--accent, #2d6cdf);
    border-radius: 14px;
    background: #ffffff;
    padding: 14px 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
#cavEmbolismFoundationsTopicContent .emb-def-term {
    font-size: 15.5px; font-weight: 800; color: #111111; margin-bottom: 5px;
}
#cavEmbolismFoundationsTopicContent .emb-def-body { font-size: 14.5px; line-height: 1.55; color: #111111; margin: 0; }

/* Block 4 — Cascade */
#cavEmbolismFoundationsTopicContent .emb-cascade {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin: 12px 0 4px;
    padding: 16px 18px;
    border-radius: 16px;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.07), rgba(220, 38, 38, 0.07));
    border: 1px solid rgba(15, 23, 42, 0.08);
}
#cavEmbolismFoundationsTopicContent .emb-cascade-step {
    font-size: 15.5px; font-weight: 800; color: #111111;
}
#cavEmbolismFoundationsTopicContent .emb-cascade-note { font-weight: 600; font-size: 13px; color: var(--muted-strong, #3a4256); }
#cavEmbolismFoundationsTopicContent .emb-cascade-arrow { font-size: 20px; font-weight: 800; color: var(--accent, #2d6cdf); }
#cavEmbolismFoundationsTopicContent .emb-cascade-end .cav-term { color: #b91c1c; }

#cavEmbolismFoundationsTopicContent .emb-handoff {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    margin-left: 4px;
    border: 1px solid rgba(45, 108, 223, 0.4);
    border-radius: 999px;
    background: rgba(45, 108, 223, 0.08);
    color: var(--accent, #2d6cdf);
    font-size: 14px; font-weight: 700; cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
#cavEmbolismFoundationsTopicContent .emb-handoff:hover { background: rgba(45, 108, 223, 0.16); border-color: var(--accent, #2d6cdf); }
#cavEmbolismFoundationsTopicContent .emb-handoff:focus-visible { outline: 2px solid var(--accent, #2d6cdf); outline-offset: 2px; }

/* Block 5 — 8 types chips + rule */
#cavEmbolismFoundationsTopicContent .emb-typechips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 0;
}
#cavEmbolismFoundationsTopicContent .emb-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 9px 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    text-align: left;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
#cavEmbolismFoundationsTopicContent .emb-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.10);
    border-color: var(--accent, #2d6cdf);
}
#cavEmbolismFoundationsTopicContent .emb-chip:focus-visible { outline: 2px solid var(--accent, #2d6cdf); outline-offset: 2px; }
#cavEmbolismFoundationsTopicContent .emb-chip.is-thrombo {
    border-color: rgba(37, 99, 235, 0.5);
    background: rgba(37, 99, 235, 0.06);
}
#cavEmbolismFoundationsTopicContent .emb-chip-name { font-size: 14px; font-weight: 800; color: #111111; }
#cavEmbolismFoundationsTopicContent .emb-chip-trigger { font-size: 12px; font-weight: 600; color: var(--muted-strong, #3a4256); }

#cavEmbolismFoundationsTopicContent .emb-rule {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 0;
    padding: 13px 16px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.10);
    border: 1px solid rgba(245, 158, 11, 0.4);
    font-size: 15px; line-height: 1.5; color: #111111;
}
#cavEmbolismFoundationsTopicContent .emb-rule-icon { font-size: 18px; flex: none; }

/* Block 6 — Master comparison matrix */
#cavEmbolismFoundationsTopicContent .emb-matrix-wrap {
    margin-top: 12px;
    overflow: visible;   /* let cav-term tooltips escape the table */
}
#cavEmbolismFoundationsTopicContent .emb-matrix {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
#cavEmbolismFoundationsTopicContent .emb-matrix thead th {
    text-align: left;
    padding: 11px 12px;
    background: rgba(96, 132, 224, 0.12);
    border: 1px solid rgba(96, 132, 224, 0.22);
    color: var(--text, #1f2638);
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
#cavEmbolismFoundationsTopicContent .emb-matrix td {
    padding: 12px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    vertical-align: top;
    line-height: 1.5;
    color: #111111;
}
#cavEmbolismFoundationsTopicContent .emb-matrix tbody tr:nth-child(even) td { background: rgba(96, 132, 224, 0.035); }
#cavEmbolismFoundationsTopicContent .emb-matrix tbody tr:hover td { background: rgba(96, 132, 224, 0.08); }
#cavEmbolismFoundationsTopicContent .emb-thin { color: var(--muted, #5a6478); font-style: italic; }

#cavEmbolismFoundationsTopicContent .emb-type-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: none;
    background: none;
    color: var(--accent, #2d6cdf);
    font-size: 13.5px; font-weight: 800; cursor: pointer;
    text-align: left;
}
#cavEmbolismFoundationsTopicContent .emb-type-link:hover { text-decoration: underline; }
#cavEmbolismFoundationsTopicContent .emb-type-link:focus-visible { outline: 2px solid var(--accent, #2d6cdf); outline-offset: 2px; border-radius: 4px; }

/* keep tooltips readable inside the dense matrix */
#cavEmbolismFoundationsTopicContent .cav-term::after { max-width: min(260px, 86vw); }

/* ---------- Responsive: stack the matrix into labeled rows ---------- */
@media (max-width: 720px) {
    #cavEmbolismFoundationsTopicContent .emb-def-grid { grid-template-columns: 1fr; }
    #cavEmbolismFoundationsTopicContent .emb-matrix thead { display: none; }
    #cavEmbolismFoundationsTopicContent .emb-matrix,
    #cavEmbolismFoundationsTopicContent .emb-matrix tbody,
    #cavEmbolismFoundationsTopicContent .emb-matrix tr,
    #cavEmbolismFoundationsTopicContent .emb-matrix td { display: block; width: 100%; }
    #cavEmbolismFoundationsTopicContent .emb-matrix tr {
        margin-bottom: 14px;
        border: 1px solid rgba(15, 23, 42, 0.12);
        border-radius: 12px;
        overflow: hidden;
    }
    #cavEmbolismFoundationsTopicContent .emb-matrix td { border: none; border-bottom: 1px solid rgba(15, 23, 42, 0.07); }
    #cavEmbolismFoundationsTopicContent .emb-matrix td:last-child { border-bottom: none; }
    #cavEmbolismFoundationsTopicContent .emb-matrix td::before {
        content: attr(data-label);
        display: block;
        font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
        color: var(--accent, #2d6cdf);
        margin-bottom: 3px;
    }
    /* the Type cell already shows the link; don't double-label it */
    #cavEmbolismFoundationsTopicContent .emb-matrix td[data-label="Type"]::before { display: none; }
}
