/* Reading styles only: cdo-prose is never attached to the CMS editor.
   Imported H1/H2/H3 became H4/H5/H6 during recovery. They are real headings,
   not small print. Keep the content file and its CMS page boundaries intact. */
.cdo-prose { font: 17px/1.7 var(--cdo-body); color: var(--cdo-text); }
.cdo-prose :where(p, ul, ol, dl, blockquote, figure, pre, table) { margin: 0 0 20px; }
.cdo-prose :where(p, ul, ol, blockquote) { max-width: 78ch; }
.cdo-prose :where(h1, h2, h3, h4, h5, h6) {
    margin: 32px 0 14px; color: var(--cdo-text);
    font-family: var(--cdo-heading); font-weight: 700; line-height: 1.35;
    letter-spacing: -.015em; text-wrap: pretty; scroll-margin-top: 24px;
}
.cdo-prose :where(h1, h2, h4) { font-size: clamp(23px, 2.4vw, 28px); }
.cdo-prose :where(h3, h5) { font-size: 23px; }
.cdo-prose h6 { font-size: 20px; }
.cdo-prose > :is(h1, h2, h3):first-child {
    margin: 0 0 28px; padding: 0 0 24px; border-bottom: 1px solid var(--cdo-line);
    font-size: clamp(27px, 3.2vw, 38px); line-height: 1.2; letter-spacing: -.025em;
}
.cdo-prose :where(h4, h5, h6) + :where(h4, h5, h6) { margin-top: 18px; }

/* Inline legacy sizes/fonts must follow the reading hierarchy. Accessibility
   mode owns all text size, font and colour overrides while it is enabled. */
html:not(.tw-a11y-enabled) .cdo-prose :where(p, li, td, th, dt, dd, span, font, strong, b, em, i, u) {
    font-family: inherit !important; font-size: inherit !important; line-height: inherit !important;
}
html:not(.tw-a11y-enabled) .cdo-prose :where(span, font) { color: inherit !important; background-color: transparent !important; }
.cdo-prose :where(strong, b) { font-weight: 700; }
.cdo-prose a { overflow-wrap: anywhere; text-decoration-thickness: 1px; }
.cdo-prose :where(ul, ol) { padding-left: 1.4em; }
.cdo-prose li { padding-left: .2em; margin-bottom: 8px; }
.cdo-prose li > :where(ul, ol) { margin: 8px 0 12px; }
.cdo-prose li > p { margin-bottom: 8px; }
.cdo-prose hr { height: 1px; margin: 32px 0; border: 0; background: var(--cdo-line); }
.cdo-prose blockquote { padding: 20px 24px; border-left: 4px solid var(--cdo-brand); border-radius: 0 12px 12px 0; background: var(--cdo-surface-soft); }
.cdo-prose blockquote > :last-child { margin-bottom: 0; }
.cdo-prose pre { overflow-x: auto; padding: 16px; background: var(--cdo-surface-soft); border-radius: 8px; }
.cdo-prose code { font-family: ui-monospace, Consolas, monospace; }
.cdo-prose .cdo-spacer { display: none; }
.cdo-prose > :last-child, .cdo-news-card > :last-child { margin-bottom: 0; }

/* Restored section links should not inherit tiny browser-default H6 sizes. */
.cdo-prose .cdo-section-link { margin: 12px 0; font-size: 18px; line-height: 1.45; }
.cdo-prose .cdo-section-link a { display: block; padding: 15px 18px; border: 1px solid var(--cdo-line); border-radius: 10px; background: var(--cdo-surface-soft); text-decoration: none; }
.cdo-prose .cdo-section-link a:hover { border-color: var(--cdo-brand); text-decoration: underline; }

/* Standalone documents, with a separate original Download action where present.
   No repeated references are hidden: the same document may occur in many contexts. */
.cdo-prose .wp-block-file { display: flex; align-items: stretch; gap: 10px; margin: 0 0 14px; }
.cdo-prose a.cdo-file-link { position: relative; display: block; flex: 1; min-width: 0; min-height: 64px; margin: 0; padding: 17px 16px 17px 68px; border: 1px solid var(--cdo-line); border-radius: 10px; background: var(--cdo-surface); color: var(--cdo-text); font-size: 16px; line-height: 1.55; text-decoration: none; }
.cdo-prose a.cdo-file-link::before { content: attr(data-extension); position: absolute; left: 12px; top: 14px; display: grid; place-items: center; width: 42px; height: 36px; border-radius: 7px; background: var(--cdo-surface-soft); color: var(--cdo-brand-strong); font: 700 10px/1 var(--cdo-body); text-transform: uppercase; }
.cdo-prose a.cdo-file-link:hover { border-color: var(--cdo-brand); text-decoration: underline; }
.cdo-prose .cdo-file-action { display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 10px 12px; border: 1px solid var(--cdo-line); border-radius: 10px; font-size: 14px; background: var(--cdo-surface-soft); }

/* Keep tables as tables. Their own focusable wrapper scrolls on narrow screens. */
.cdo-prose .cdo-table-scroll { width: 100%; max-width: 100%; overflow: auto; margin: 24px 0; border: 1px solid var(--cdo-line); border-radius: 12px; }
.cdo-prose table { display: table; width: 100%; max-width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.55; }
.cdo-prose .cdo-table-scroll > table { margin: 0; }
.cdo-prose .cdo-table-scroll--wide > table { min-width: 960px; }
.cdo-prose :where(td, th) { padding: 13px 16px; border: 1px solid var(--cdo-line); vertical-align: top; text-align: left; min-width: 90px; }
.cdo-prose th, .cdo-prose tr.cdo-table-heading { background: var(--cdo-surface-soft); font-weight: 700; }
.cdo-prose tr:nth-child(even):not(.cdo-table-heading) { background: var(--cdo-bg); }
.cdo-prose td :last-child, .cdo-prose th :last-child { margin-bottom: 0; }
.cdo-prose .cdo-table-scroll--wide td strong { font-weight: 500; }
.cdo-prose .cdo-table-scroll--wide .cdo-table-heading strong { font-weight: 700; }
.cdo-prose .wp-block-table { margin-inline: 0; }

/* Illustrations remain in reading order, without blanket floats or cropping. */
.cdo-prose figure { max-width: 100%; margin-inline: 0; }
.cdo-prose :where(.wp-block-image, .wp-block-embed) { margin-block: 24px; }
.cdo-prose img { max-width: 100%; height: auto; border-radius: 8px; vertical-align: middle; }
.cdo-prose .wp-block-image img { display: block; margin-inline: auto; }
.cdo-prose .wp-block-video { width: 100%; min-width: 0; margin-block: 24px; }
.cdo-prose video { display: block; width: 100%; max-width: 100%; height: auto; object-fit: contain; }
.cdo-prose figcaption, .cdo-prose .gallery-caption { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--cdo-muted); }
.cdo-prose .wp-block-embed iframe { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; }
.cdo-prose .wp-embed-aspect-4-3 iframe { aspect-ratio: 4 / 3; }
.cdo-prose iframe { max-width: 100%; }

/* The six direction illustrations on the homepage form two rows of three. */
.cdo-prose .cdo-direction-image-block { width: 100%; margin-block: 16px; }
.cdo-prose .cdo-direction-image-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; float: none; width: 100%; margin: 0; }
.cdo-prose .cdo-direction-image-row > a { display: block; min-width: 0; }
.cdo-prose .cdo-direction-image-row img { display: block; width: 100%; height: auto; margin: 0; object-fit: contain; }
.cdo-prose .cdo-direction-image-separator { display: none; }
@media (max-width: 700px) {
    .cdo-prose .cdo-direction-image-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 420px) {
    .cdo-prose .cdo-direction-image-row { grid-template-columns: minmax(0, 1fr); }
}

/* Support both WordPress gallery generations, overriding old ID-based floats.
   Galleries are groups of images, never the entire text article. */
.cdo-prose .gallery, .cdo-prose ul.wp-block-gallery, .cdo-prose .blocks-gallery-grid, .cdo-prose .cdo-media-grid {
    display: grid !important; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 16px; width: 100%; max-width: 100%; margin: 24px 0 !important; padding: 0; list-style: none;
}
.cdo-prose .columns-1, .cdo-prose .columns-1 .blocks-gallery-grid { grid-template-columns: minmax(0, 1fr); }
.cdo-prose .gallery > br { display: none; }
.cdo-prose .gallery .gallery-item, .cdo-prose .blocks-gallery-item {
    float: none !important; width: auto !important; min-width: 0; margin: 0 !important; padding: 0;
}
.cdo-prose :where(.gallery-icon, .blocks-gallery-item figure) { margin: 0; }
.cdo-prose .gallery img { border: 0 !important; }
.cdo-prose :where(.gallery, .wp-block-gallery, .cdo-media-grid) img {
    display: block; width: 100%; height: auto; object-fit: contain; margin: 0;
}
.cdo-prose .cdo-media-grid > figure { margin: 0; }
.cdo-prose .cdo-media-grid + p { margin-top: 20px; }
.cdo-prose .cdo-news-title { margin-top: 0; font-weight: 700; }
html:not(.tw-a11y-enabled) .cdo-prose .cdo-news-title { font-size: 22px !important; font-family: var(--cdo-heading) !important; line-height: 1.4 !important; }
.cdo-page--contacts .cdo-prose p { text-align: left; }

@media (max-width: 640px) {
    .cdo-prose { font-size: 16px; line-height: 1.65; }
    .cdo-prose > :is(h1, h2, h3):first-child { margin-bottom: 24px; padding-bottom: 20px; }
    .cdo-prose h5 { font-size: 21px; }
    .cdo-prose h6 { font-size: 19px; }
    .cdo-prose .wp-block-file { flex-wrap: wrap; gap: 6px; }
    .cdo-prose a.cdo-file-link { flex-basis: 100%; }
    .cdo-prose .cdo-file-action { padding: 6px 12px; }
    .cdo-prose .cdo-table-scroll { border-radius: 8px; }
    .cdo-prose :where(td, th) { padding: 10px 12px; }
    .cdo-prose .gallery, .cdo-prose ul.wp-block-gallery, .cdo-prose .blocks-gallery-grid, .cdo-prose .cdo-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .cdo-prose .columns-1, .cdo-prose .columns-1 .blocks-gallery-grid { grid-template-columns: minmax(0, 1fr); }
}

@media print {
    .cdo-prose .cdo-table-scroll { overflow: visible; }
    .cdo-prose .cdo-table-scroll--wide > table { min-width: 0; }
    .cdo-news-card.is-cdo-hidden { display: block; }
    .cdo-news-more { display: none; }
}
