/* =========================================================
   DMD TYPOGRAPHY / READABILITY — v1.23.0
   Raises microcopy, metadata, captions and supporting text
   without flattening the editorial type hierarchy.
   Loaded after all page-specific styles.
   ========================================================= */

:root {
    --md-type-label: clamp(11.5px, .82vw, 12.5px);
    --md-type-meta: clamp(12.5px, .9vw, 13.5px);
    --md-type-caption: clamp(12.5px, .92vw, 14px);
    --md-type-support: clamp(14px, 1vw, 15.5px);
    --md-type-toc: clamp(13px, .92vw, 14px);
    --md-type-small-body: clamp(14.5px, 1.05vw, 16px);
    --md-leading-label: 1.4;
    --md-leading-meta: 1.5;
    --md-leading-support: 1.7;
}

/* Shared labels / eyebrows / kickers. */
.site-main :is(
    [class*="eyebrow"],
    [class*="kicker"],
    [class*="section-label"],
    .md-video-card-label,
    .md-journal-label,
    .md-feature-story__label,
    .md-gallery-card__label
) {
    font-size: var(--md-type-label);
    line-height: var(--md-leading-label);
}

.site-main :is(
    [class*="__label"] > span,
    [class*="__label"] > small,
    [class*="-label"] > span,
    [class*="-label"] > small
) {
    font-size: var(--md-type-label);
    line-height: var(--md-leading-label);
}

/* Metadata should be secondary, never microscopic. */
.site-main :is(
    [class*="meta"],
    [class*="counter"],
    [class*="readtime"]
) {
    font-size: var(--md-type-meta);
    line-height: var(--md-leading-meta);
}

.site-main :is(
    [class*="meta"],
    [class*="counter"],
    [class*="readtime"]
) :is(span, p, small, time, a, strong) {
    font-size: inherit;
    line-height: inherit;
}

.site-main small {
    font-size: var(--md-type-meta);
    line-height: var(--md-leading-meta);
}

/* Breadcrumbs / TOCs / in-page navigation. */
.md-breadcrumb li,
.dmd-cluster-breadcrumb,
.dmd-pcluster-breadcrumb {
    font-size: var(--md-type-meta);
    line-height: 1.45;
}

:is(
    .md-procedure-toc nav a,
    .md-body-area-toc nav a,
    .md-location-toc nav a,
    .md-treatment-side nav a,
    .md-concern-side__toc a,
    .md-article-toc__links a,
    .md-toc-panel__links a,
    .md-long-about .toc-links a
) {
    font-size: var(--md-type-toc);
    line-height: 1.5;
}

:is(
    .md-procedure-toc nav a[data-level="3"],
    .md-body-area-toc nav a[data-level="3"],
    .md-location-toc nav a[data-level="3"],
    .md-treatment-side nav a[data-level="3"],
    .md-concern-side__toc a[data-level="3"],
    .md-article-toc__links a[data-level="3"],
    .md-toc-panel__links a[data-level="3"]
) {
    font-size: calc(var(--md-type-toc) - .5px);
}

/* Captions and editorial image notes. */
.site-main .md-procedure-content figcaption,
.site-main .md-article-featured figcaption,
.site-main .md-article-content figcaption,
.site-main .md-article-content .wp-element-caption,
.site-main .md-standard-page__content figcaption,
.site-main .md-standard-page__content .wp-caption-text,
.site-main .md-gallery-card figcaption {
    font-size: var(--md-type-caption);
    line-height: 1.6;
}

.site-main .md-procedure-content figcaption::before {
    font-size: var(--md-type-label);
}

/* Procedure supporting copy. */
.md-procedure-facts__note,
.md-procedure-content .dmd-media-placeholder p,
.md-procedure-content .dmd-recovery__note,
.md-procedure-content .dmd-tradeoffs__note,
.md-procedure-review__identity > p:last-child,
.md-procedure-v2 .md-procedure-review__identity > p:last-child,
.md-procedure-v2 .md-procedure-faq__head > p:last-child {
    font-size: var(--md-type-support);
    line-height: var(--md-leading-support);
}

.md-procedure-content :is(.dmd-practice__item, .dmd-in-practice__item) p,
.md-procedure-content .dmd-comparison__card p,
.md-procedure-content .dmd-comparison__card li,
.md-procedure-content .dmd-recovery__timeline p,
.md-procedure-content .dmd-medical-review p,
.md-procedure-faq__head > p:last-child,
.md-procedure-v2 .md-procedure-content .dmd-clinical-insight p,
.md-procedure-v2 .md-procedure-content .dmd-clinical-insight li {
    font-size: var(--md-type-small-body);
    line-height: var(--md-leading-support);
}

.md-procedure-content .dmd-comparison__table td {
    font-size: var(--md-type-support);
    line-height: 1.6;
}

/* Concern / Body Area / Treatment / Location. */
.md-concern-path p,
.md-concern-side__item p,
.md-body-area-lens p,
.md-treatment-snapshot__note,
.md-location-journey__rail p,
.md-location-context__cards p {
    font-size: var(--md-type-support);
    line-height: var(--md-leading-support);
}

.md-concern-question-card span,
.md-body-area-content,
.md-concern-content,
.md-treatment-content,
.md-location-content {
    text-rendering: optimizeLegibility;
}

.md-treatment-method article p,
.md-treatment-method article span,
.md-treatment-snapshot__grid span,
.md-concern-path span,
.md-body-area-hero__trust,
.md-body-area-lens article > span,
.md-location-stamp span {
    font-size: var(--md-type-label);
    line-height: var(--md-leading-label);
}

.md-location-stamp small {
    font-size: var(--md-type-meta);
}

/* Cluster parent / Procedure collection. */
.dmd-cluster-chapter__body > p,
.dmd-cluster-item__copy p,
.dmd-cluster-section-head > p,
.dmd-cluster-decision p:not(.dmd-cluster-section-label),
.dmd-pcluster-section-head > p,
.dmd-pcluster-question p,
.dmd-pcluster-family > p,
.dmd-pcluster-featured-card p,
.dmd-pcluster-decision__step p,
.dmd-pcluster-next__grid > div:last-child p {
    font-size: var(--md-type-support);
    line-height: var(--md-leading-support);
}

.dmd-cluster-chapter__meta,
.dmd-cluster-item__number,
.dmd-cluster-item__type,
.dmd-pcluster-switcher > p,
.dmd-pcluster-switcher li > span,
.dmd-pcluster-family__meta,
.dmd-pcluster-featured-card small,
.dmd-pcluster-concern-grid a small,
.dmd-pcluster-crosslinks__grid small {
    font-size: var(--md-type-label);
    line-height: var(--md-leading-label);
}

.dmd-cluster-chapter__links a {
    font-size: var(--md-type-meta);
    line-height: 1.5;
}

/* Journal / Archive / Single post. */
.md-journal-lead__content > p:not(.md-journal-label),
.md-journal-slide__body > p,
.md-journal-card__body > p,
.md-journal-manifesto__inner > div p,
.md-archive-card__body > p,
.md-article-author p:not(.md-article-author__eyebrow),
.md-article-consultation > div:last-child > p,
.md-related-card__body > p {
    font-size: var(--md-type-support);
    line-height: var(--md-leading-support);
}

.md-journal-topics__label,
.md-journal-topics a,
.md-journal-chapter__title p,
.md-journal-chapter__title > a,
.md-journal-chapter__stories span,
.md-journal-more p,
.md-story-meta,
.md-archive-hero__meta p,
.md-related-posts__head p,
.md-article-meta__label,
.md-article-tags__label,
.md-article-tags a,
.md-article-author a {
    font-size: var(--md-type-meta);
    line-height: var(--md-leading-meta);
}

.md-journal-topics sup {
    font-size: 10px;
}

/* Video / Gallery. */
.md-video-section-head > p,
.md-video-card__body p,
.md-gallery-index__head > p {
    font-size: var(--md-type-support);
    line-height: var(--md-leading-support);
}

.md-video-hero-slide__badge,
.md-video-hero-slide__caption > span,
.md-video-hero__counter,
.md-video-card-label,
.md-video-row-head > span,
.md-video-feature__links button,
.md-video-feature__links a,
.md-gallery-filterbar__inner > p,
.md-gallery-lightbox__info > span,
.md-gallery-lightbox__info > p {
    font-size: var(--md-type-label);
    line-height: var(--md-leading-label);
}

.md-video-card__body a,
.md-video-channel-line strong,
.md-video-channel-line small,
.md-video-hero__connecting small,
.md-video-modal__bar strong {
    font-size: var(--md-type-meta);
    line-height: var(--md-leading-meta);
}

.md-video-search input,
.md-video-chips button {
    font-size: var(--md-type-meta);
}

/* Standard pages and long-form editorial pages. */
.md-standard-page__content :is(.wp-block-button__link, a.button, button, input[type="submit"]),
.md-approach .md-button,
.mdh-button,
.mdh-arrow-link,
.mdh-text-link {
    font-size: var(--md-type-label);
}

.md-approach .md-principle p,
.md-approach .md-checks p,
.md-approach .md-step p,
.md-competencies .md-time p,
.md-competencies .md-card p,
.mdh-pillar p,
.mdh-procedure-content p,
.mdh-time p,
.mdc-channel p,
.mdc-process-step p,
.mdcs-step p,
.mdcs-question-item p,
.mdcs-proof-head > p,
.mdcs-proof-card p,
.mdcs-detailed-form > p,
.md-long-about .timeline-card p {
    font-size: var(--md-type-support);
    line-height: var(--md-leading-support);
}

.md-long-about .toc-panel p,
.md-v2 .v2-copper p,
.md-v2 .v2-step p {
    font-size: var(--md-type-meta);
    line-height: 1.6;
}

/* Header / mega menu: improve utility readability without enlarging core nav. */
.md-search-trigger small,
.md-language-switcher a,
.md-language-switcher span,
.md-mega__eyebrow,
.md-mega__all,
.md-mega__link small,
.md-mega__featured a span,
.md-mobile-nav__brand-text span,
.md-mobile-submenu a small,
.md-search-overlay__eyebrow {
    font-size: 10.5px;
    line-height: 1.35;
}

.md-mega__intro p,
.md-search-result p {
    font-size: 14px;
    line-height: 1.65;
}

.md-header-consultation {
    font-size: 11px;
}

/* Footer: keep hierarchy but remove 8–10px microcopy. */
.md-footer-brand > p:first-of-type,
.md-footer-consultation,
.md-footer-column > span,
.md-footer-column > a.md-footer-column__heading,
.md-footer-location__eyebrow,
.md-footer-map__label,
.md-footer-social__heading > span,
.md-footer-social__label {
    font-size: var(--md-type-label);
    line-height: var(--md-leading-label);
}

.md-footer-column li a,
.md-footer-brand__statement,
.md-footer-bottom p,
.md-footer-bottom__links a,
.md-footer-certificate__copy small,
.md-footer-social__heading small,
.md-footer-social__instagram a {
    font-size: var(--md-type-meta);
    line-height: 1.55;
}

/* Do not let mobile breakpoints shrink supporting text back to 8–10px. */
@media (max-width: 700px) {
    :root {
        --md-type-label: 11.5px;
        --md-type-meta: 12.5px;
        --md-type-caption: 13px;
        --md-type-support: 14.5px;
        --md-type-toc: 13px;
        --md-type-small-body: 15px;
    }

    .md-approach .md-hero-foot,
    .md-approach .md-timeline,
    .md-competencies .md-hero-foot {
        font-size: var(--md-type-label);
        line-height: 1.45;
    }

    .md-footer-bottom {
        line-height: 1.5;
    }
}
