/* ─────────────────────────────────────────────────────────────────
   Block: raw — admin.super-gated HTML escape hatch (T9)
   ----------------------------------------------------------------
   Wrapper for arbitrary user-supplied HTML. Keep styling minimal —
   the section participates in the scheme system; the injected HTML
   brings its own styling. Tokenised padding ensures the wrapper
   breathes when authors omit margins.
   ───────────────────────────────────────────────────────────── */

.block-raw {
    background: var(--scheme-bg);
    color: var(--scheme-fg);
    font-family: var(--ds-font-body);
    /* Senior-UX (T5 2026-05-07): floor body type at 18px / 1.6 so any
       plain <p>, <li>, <a> the author pastes inherits a presbyopia-safe
       default (any inline-styled HTML still wins via specificity). */
    font-size: var(--ds-fs-body, 1.125rem);
    line-height: var(--ds-lh-body, 1.6);
    padding-top: var(--ds-space-7);
    padding-bottom: var(--ds-space-7);
    min-height: var(--ds-section-py-lg);
    /* Sweep-B1 (2026-05-08): container hygiene — author-pasted HTML
       (esp. inline-styled cards, embeds, marquees) sometimes ships
       hard widths or right-side overflow. Cap the wrapper to its
       content box so nothing bleeds horizontally past the section
       edge. min-width:0 + overflow-wrap chain protects against
       unbroken token (URL/model-number) overflow inside <p>/<a>. */
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-wrap: break-word;
}
.block-raw a {
    color: var(--ds-cta);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}
.block-raw a:hover { color: var(--ds-cta-dk, var(--ds-cta)); }

/* Sweep-B1 (2026-05-08): tables in author-pasted markup get the same
   responsive scroll treatment as the content module — wide tables
   would otherwise punch through the section on phones. */
.block-raw table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
@media (min-width: 769px) {
    .block-raw table {
        display: table;
        overflow-x: visible;
    }
}
@media (max-width: 768px) {
    .block-raw {
        padding-top: var(--ds-space-6);
        padding-bottom: var(--ds-space-6);
    }
}

/* Senior-UX (T5 2026-05-07-bugs): keep verbatim HTML overflow contained
   on small screens — authors often paste media that does not respect the
   viewport. Plus a defensive guard against the global
   `#features ul li::before` checkmark rule in theme.min.css. */
.block-raw img,
.block-raw video,
.block-raw iframe,
.block-raw dotlottie-player,
.block-raw svg {
    max-width: 100%;
    height: auto;
}
.block-raw pre,
.block-raw code {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.block-raw ul li::before {
    content: none !important;
    background: none !important;
    display: none !important;
}
