/* Extend the existing viewer; retain its brand, native dialog and close action. */
body .document-viewer.eext-enhanced[open] {
    display: flex; flex-direction: column; overflow: hidden;
    height: min(900px, calc(100dvh - 32px));
}
body .eext-enhanced .document-viewer__toolbar,
body .eext-enhanced .eext-modes { flex: 0 0 auto; }
body .eext-enhanced .document-viewer__content {
    flex: 1 1 auto; min-height: 0; max-height: none; overflow: auto;
}
body .document-card__body .eext-open {
    display: inline-flex; align-items: center; min-height: 44px;
    max-width: 100%; padding: 8px 0;
    border: 0; background: transparent; color: #143b65;
    font: inherit; font-weight: 600; cursor: pointer;
    text-align: start; text-decoration: underline; text-underline-offset: .2em;
}
body .document-card__body .eext-open:hover { color: #80611f; }
body .eext-open[hidden], body .eext-modes[hidden],
body .eext-text[hidden], body .document-viewer [data-document-image][hidden] { display: none; }
body .eext-modes {
    display: flex; flex-wrap: wrap; gap: 8px;
    justify-content: center; padding: 12px 20px; background: #fff;
    border-top: 1px solid #dce5ed;
}
body .eext-modes button {
    min-height: 44px; padding: 10px 14px;
    border: 1px solid #718196; border-radius: 3px;
    background: #fff; color: #143b65; font: inherit; cursor: pointer;
}
body .eext-modes button[aria-pressed=true] {
    background: #143b65; border-color: #143b65; color: #fff;
    text-decoration: underline; text-underline-offset: .2em;
}
body .eext-text { max-width: 72ch; margin-inline: auto; color: #102f56; }
body .eext-text > h3:first-child { margin-top: 0; }
body .eext-enhanced [data-document-close] {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; min-width: 44px; min-height: 44px;
    padding: 0; line-height: 1; cursor: pointer;
}
body .eext-enhanced [data-document-close] svg {
    display: block; width: 18px; height: 18px; flex: none;
    fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round;
}
body .library-orbit__controls {
    display: grid; grid-template-columns: 44px minmax(0, auto) 44px;
    justify-content: center; align-items: center; gap: 10px 16px;
}
body .library-orbit__controls [data-orbit-prev] { grid-column: 1; grid-row: 1; }
body .library-orbit__controls [data-orbit-dots] { grid-column: 2; grid-row: 1; }
body .library-orbit__controls [data-orbit-next] { grid-column: 3; grid-row: 1; }
body .library-orbit__controls [data-orbit-motion] {
    grid-column: 2; grid-row: 2; justify-self: center;
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; min-width: 44px; min-height: 44px;
    padding: 0; border: 1px solid #718196; border-radius: 50%;
    background: transparent; color: #143b65; cursor: pointer;
}
body .library-orbit__controls [data-orbit-motion][hidden] { display: none; }
body .library-orbit__controls [data-orbit-motion]:hover {
    color: #80611f; border-color: #80611f; background: #faf7ef;
}
body .library-orbit__controls [data-orbit-motion] svg {
    display: block; width: 18px; height: 18px; fill: none;
    stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
body .library-orbit__controls [data-orbit-motion]:focus-visible {
    outline: 3px solid #102f56; outline-offset: 3px;
}
body .eext-text h3 { margin: 1.5em 0 .6em; color: inherit; }
body .eext-text p, body .eext-text li { line-height: 1.65; }
body .eext-text a, body .eext-static a {
    color: #143b65; text-decoration: underline; text-underline-offset: .2em;
    overflow-wrap: anywhere;
}
body .eext-table {
    width: 100%; table-layout: fixed; border-collapse: collapse;
    margin: 24px 0 32px; background: #fff; color: #102f56;
    font: inherit; font-variant-numeric: tabular-nums;
}
body .eext-table caption {
    color: #143b65; font-weight: 700; text-align: start;
    line-height: 1.5; padding-bottom: 12px; caption-side: top;
}
body .eext-table th, body .eext-table td {
    padding: 12px; border: 1px solid #718196;
    text-align: start; vertical-align: top;
    line-height: 1.5; overflow-wrap: anywhere;
}
body .eext-table th:first-child { width: 62%; }
body .eext-table thead th { background: #edf6fd; }
body .eext-table tbody th { font-weight: 600; }
body .eext-notes { margin-block: 32px; }
body .eext-notes li + li { margin-top: 12px; }
body .eext-static details { margin-block: 24px; }
body .eext-static summary { min-height: 44px; padding: 10px 0; cursor: pointer; }
body :is(.eext-open, .eext-modes button, .eext-text a):focus-visible {
    outline: 3px solid #102f56; outline-offset: 3px;
}
@media (max-width: 480px) {
    body .eext-modes { padding: 10px 12px; }
    body .eext-table th, body .eext-table td { padding: 9px 7px; }
    body .eext-table th:first-child { width: 57%; }
}
@media (max-width: 1024px) {
    /* Breathing room below both carousels, without changing the desktop composition. */
    body [data-library-orbit] { padding-bottom: 24px; }
    body .library-orbit__controls { margin-top: 20px; }
}
@media (forced-colors: active) {
    body .eext-modes button[aria-pressed=true] { border: 3px solid Highlight; }
}
