/* Global template tune: calmer heading scale across the theme */
body.amma-med-theme h1 {
    font-size: clamp(30px, 4.4vw, 54px);
    line-height: 1.04;
}

body.amma-med-theme h2 {
    font-size: clamp(24px, 3.2vw, 42px);
    line-height: 1.08;
}

body.amma-med-theme h3 {
    font-size: clamp(20px, 2.2vw, 30px);
    line-height: 1.16;
}

body.amma-med-theme .amma-page-top__title {
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.02;
}

body.amma-med-theme .amma-section-title {
    font-size: clamp(24px, 3.2vw, 42px);
    line-height: 1.08;
}

body.amma-med-theme .amma-contact-card h3,
body.amma-med-theme .amma-info-box h3,
body.amma-med-theme .amma-doc-card__title,
body.amma-med-theme .amma-service-card-v2__title,
body.amma-med-theme .amma-doctor-card-v2__name,
body.amma-med-theme .amma-search-result__title {
    font-size: clamp(20px, 2.1vw, 24px);
}

body.amma-homepage .amma-home-hero__title {
    font-size: clamp(28px, 3.4vw, 36px);
}

.amma-archive-services-hero__title {
    font-size: clamp(32px, 4.2vw, 54px);
    line-height: 1.02;
}

.smed-cat-hero__title {
    font-size: clamp(30px, 3.8vw, 46px);
    line-height: 1.02;
}

/* Shared company page patterns */
body.amma-med-theme .amma-company-summary-grid,
body.amma-med-theme .amma-company-cards,
body.amma-med-theme .amma-company-doc-grid,
body.amma-med-theme .amma-authority-grid {
    display: grid;
    gap: 18px;
}

body.amma-med-theme .amma-company-summary-grid,
body.amma-med-theme .amma-company-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.amma-med-theme .amma-company-doc-grid,
body.amma-med-theme .amma-authority-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.amma-med-theme .amma-company-summary-card,
body.amma-med-theme .amma-company-fact-card,
body.amma-med-theme .amma-company-doc-card,
body.amma-med-theme .amma-company-link-card,
body.amma-med-theme .amma-company-note,
body.amma-med-theme .amma-company-route-card,
body.amma-med-theme .amma-company-data-card,
body.amma-med-theme .amma-authority-card,
body.amma-med-theme .amma-legal-notice,
body.amma-med-theme .amma-legal-source-card {
    padding: 26px;
}

body.amma-med-theme .amma-company-summary-card,
body.amma-med-theme .amma-company-fact-card,
body.amma-med-theme .amma-company-doc-card,
body.amma-med-theme .amma-company-link-card,
body.amma-med-theme .amma-company-note,
body.amma-med-theme .amma-company-route-card,
body.amma-med-theme .amma-company-data-card,
body.amma-med-theme .amma-authority-card,
body.amma-med-theme .amma-legal-notice,
body.amma-med-theme .amma-legal-source-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--amma-border);
    border-radius: 26px;
    box-shadow: 0 18px 42px rgba(22, 54, 99, 0.08);
}

body.amma-med-theme .amma-company-summary-card,
body.amma-med-theme .amma-company-fact-card,
body.amma-med-theme .amma-legal-notice {
    display: grid;
    gap: 10px;
}

body.amma-med-theme .amma-company-summary-card__label,
body.amma-med-theme .amma-company-fact-card__label,
body.amma-med-theme .amma-company-doc-card__type,
body.amma-med-theme .amma-company-pill,
body.amma-med-theme .amma-authority-card__meta,
body.amma-med-theme .amma-company-note__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(47, 128, 237, 0.08);
    color: var(--amma-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

body.amma-med-theme .amma-company-summary-card__value,
body.amma-med-theme .amma-company-fact-card__value {
    color: var(--amma-title);
    font-size: clamp(20px, 2.3vw, 28px);
    font-weight: 800;
    line-height: 1.14;
    letter-spacing: -0.03em;
}

body.amma-med-theme .amma-company-summary-card p,
body.amma-med-theme .amma-company-fact-card p,
body.amma-med-theme .amma-company-doc-card p,
body.amma-med-theme .amma-company-link-card p,
body.amma-med-theme .amma-company-note p,
body.amma-med-theme .amma-company-route-card p,
body.amma-med-theme .amma-company-data-card p,
body.amma-med-theme .amma-authority-card p,
body.amma-med-theme .amma-legal-notice p,
body.amma-med-theme .amma-legal-source-card p {
    margin: 0;
    color: var(--amma-muted);
    font-size: 15px;
    line-height: 1.65;
}

body.amma-med-theme .amma-company-overview,
body.amma-med-theme .amma-about-route,
body.amma-med-theme .amma-legal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
    gap: 22px;
    align-items: start;
}

body.amma-med-theme .amma-company-richtext p + p,
body.amma-med-theme .amma-legal-richtext p + p {
    margin-top: 14px;
}

body.amma-med-theme .amma-company-richtext p,
body.amma-med-theme .amma-company-richtext ul,
body.amma-med-theme .amma-company-richtext ol,
body.amma-med-theme .amma-legal-richtext p,
body.amma-med-theme .amma-legal-richtext ul,
body.amma-med-theme .amma-legal-richtext ol {
    color: var(--amma-text);
}

body.amma-med-theme .amma-company-data-list {
    display: grid;
    gap: 14px;
}

body.amma-med-theme .amma-company-data-row {
    display: grid;
    grid-template-columns: minmax(110px, 150px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding-top: 14px;
    border-top: 1px solid rgba(217, 230, 248, 0.9);
}

body.amma-med-theme .amma-company-data-row:first-child {
    padding-top: 0;
    border-top: 0;
}

body.amma-med-theme .amma-company-data-row__label {
    color: var(--amma-muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

body.amma-med-theme .amma-company-data-row__value {
    color: var(--amma-title);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
}

body.amma-med-theme .amma-company-pill-row,
body.amma-med-theme .amma-legal-anchor-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

body.amma-med-theme .amma-company-pill,
body.amma-med-theme .amma-legal-anchor-link {
    padding-inline: 14px;
    min-height: 40px;
    text-transform: none;
    letter-spacing: 0;
    font-size: 14px;
}

body.amma-med-theme .amma-legal-anchor-link {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--amma-border);
    color: var(--amma-title);
    border-radius: 999px;
    font-weight: 700;
}

body.amma-med-theme .amma-legal-anchor-link:hover {
    border-color: rgba(47, 128, 237, 0.35);
    color: var(--amma-accent);
    background: #fff;
}

body.amma-med-theme .amma-company-doc-card,
body.amma-med-theme .amma-company-link-card {
    display: grid;
    gap: 14px;
}

body.amma-med-theme .amma-company-doc-card__head,
body.amma-med-theme .amma-company-link-card__head {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

body.amma-med-theme .amma-company-doc-card__title,
body.amma-med-theme .amma-company-link-card__title,
body.amma-med-theme .amma-authority-card__title,
body.amma-med-theme .amma-company-note h3,
body.amma-med-theme .amma-company-route-card h3,
body.amma-med-theme .amma-company-data-card h3,
body.amma-med-theme .amma-legal-source-card h3 {
    margin: 0;
    color: var(--amma-title);
    font-size: clamp(20px, 2.1vw, 24px);
    line-height: 1.2;
}

body.amma-med-theme .amma-company-doc-card__actions,
body.amma-med-theme .amma-company-link-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

body.amma-med-theme .amma-company-doc-card__source {
    color: var(--amma-muted);
    font-size: 13px;
    line-height: 1.55;
}

body.amma-med-theme .amma-company-note {
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0%, rgba(238, 245, 255, 0.94) 100%);
}

body.amma-med-theme .amma-company-note__eyebrow {
    margin-bottom: 6px;
}

body.amma-med-theme .amma-company-note p + p {
    margin-top: 12px;
}

body.amma-med-theme .amma-about-route__image-wrap {
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid var(--amma-border);
    background: #f7fbff;
}

body.amma-med-theme .amma-about-route__image {
    width: 100%;
    height: auto;
}

body.amma-med-theme .amma-about-route__highlights {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

body.amma-med-theme .amma-about-route__item {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(247, 251, 255, 0.96);
    border: 1px solid var(--amma-border);
    color: var(--amma-title);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.55;
}

body.amma-med-theme .amma-company-link-collection {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

body.amma-med-theme .amma-company-link-collection a {
    color: var(--amma-title);
    font-weight: 700;
}

body.amma-med-theme .amma-company-link-collection a:hover {
    color: var(--amma-accent);
}

body.amma-med-theme .amma-legal-summary {
    margin-top: 20px;
}

body.amma-med-theme .amma-legal-notices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

body.amma-med-theme .amma-legal-source-card {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

body.amma-med-theme .amma-authority-card {
    display: grid;
    gap: 12px;
}

body.amma-med-theme .amma-authority-card__meta {
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
}

body.amma-med-theme .amma-authority-card__list {
    display: grid;
    gap: 12px;
}

body.amma-med-theme .amma-authority-card__row {
    display: grid;
    gap: 4px;
}

body.amma-med-theme .amma-authority-card__row strong {
    color: var(--amma-title);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

body.amma-med-theme .amma-authority-card__row span,
body.amma-med-theme .amma-authority-card__row a {
    color: var(--amma-text);
    font-size: 15px;
    line-height: 1.6;
}

body.amma-med-theme .amma-authority-card__row a {
    font-weight: 700;
}

body.amma-med-theme .amma-company-route-card .amma-btn,
body.amma-med-theme .amma-company-doc-card .amma-btn,
body.amma-med-theme .amma-company-link-card .amma-btn,
body.amma-med-theme .amma-legal-source-card .amma-btn {
    align-self: start;
}

body.amma-med-theme .amma-page-top.amma-about-hero .amma-page-top__wrap,
body.amma-med-theme .amma-page-top.amma-legal-hero .amma-page-top__wrap {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(247, 251, 255, 0.95) 100%);
}

body.amma-med-theme .amma-about-hero .amma-page-top__lead,
body.amma-med-theme .amma-legal-hero .amma-page-top__lead {
    max-width: 72ch;
}

body.amma-med-theme .amma-page-top__media .amma-page-top__image {
    border-radius: 24px;
    background: #f7fbff;
}

body.amma-med-theme .amma-company-section-head {
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
}

body.amma-med-theme .amma-company-section-head p {
    margin: 0;
    color: var(--amma-muted);
    font-size: 16px;
    line-height: 1.7;
}

body.amma-med-theme .amma-company-doc-card__footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

body.amma-med-theme .amma-company-doc-card__footer-links a {
    color: var(--amma-accent);
    font-size: 14px;
    font-weight: 700;
}

@media (max-width: 1180px) {
    body.amma-med-theme .amma-company-summary-grid,
    body.amma-med-theme .amma-company-cards,
    body.amma-med-theme .amma-legal-notices {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    body.amma-med-theme .amma-company-overview,
    body.amma-med-theme .amma-about-route,
    body.amma-med-theme .amma-legal-layout,
    body.amma-med-theme .amma-company-doc-grid,
    body.amma-med-theme .amma-authority-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    body.amma-med-theme .amma-page-top__title {
        font-size: clamp(30px, 8vw, 42px);
    }

    body.amma-med-theme .amma-section-title {
        font-size: clamp(22px, 7vw, 32px);
    }

    body.amma-med-theme .amma-company-summary-grid,
    body.amma-med-theme .amma-company-cards,
    body.amma-med-theme .amma-legal-notices {
        grid-template-columns: 1fr;
    }

    body.amma-med-theme .amma-company-summary-card,
    body.amma-med-theme .amma-company-fact-card,
    body.amma-med-theme .amma-company-doc-card,
    body.amma-med-theme .amma-company-link-card,
    body.amma-med-theme .amma-company-note,
    body.amma-med-theme .amma-company-route-card,
    body.amma-med-theme .amma-company-data-card,
    body.amma-med-theme .amma-authority-card,
    body.amma-med-theme .amma-legal-notice,
    body.amma-med-theme .amma-legal-source-card {
        padding: 22px;
    }

    body.amma-med-theme .amma-company-data-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    body.amma-med-theme .amma-company-doc-card__actions .amma-btn,
    body.amma-med-theme .amma-company-link-card__actions .amma-btn,
    body.amma-med-theme .amma-legal-source-card .amma-btn,
    body.amma-med-theme .amma-company-route-card .amma-btn {
        width: 100%;
    }
}

/* v3 legal library refresh */
body.amma-med-theme .amma-legal-hero-card {
    padding-bottom: 6px;
}

body.amma-med-theme .amma-page-top__actions--legal {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

body.amma-med-theme .amma-legal-summary--compact {
    align-items: stretch;
}

body.amma-med-theme .amma-legal-layout--wide {
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 28px;
}

body.amma-med-theme .amma-legal-intro-card {
    display: grid;
    gap: 22px;
}

body.amma-med-theme .amma-company-section-head--with-count {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

body.amma-med-theme .amma-legal-section-card {
    display: grid;
    gap: 24px;
    padding: 28px;
    border-radius: 28px;
}

body.amma-med-theme .amma-legal-section-card__count {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(47, 128, 237, 0.08);
    color: var(--amma-accent);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

body.amma-med-theme .amma-legal-doc-list {
    display: grid;
    gap: 14px;
}

body.amma-med-theme .amma-legal-doc-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 22px;
    border: 1px solid rgba(216, 229, 245, 0.92);
    background: rgba(255, 255, 255, 0.96);
}

body.amma-med-theme .amma-legal-doc-row__type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 14px;
    background: rgba(47, 128, 237, 0.1);
    color: var(--amma-accent);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

body.amma-med-theme .amma-legal-doc-row__body {
    min-width: 0;
    display: grid;
    gap: 10px;
}

body.amma-med-theme .amma-legal-doc-row__head {
    display: grid;
    gap: 8px;
}

body.amma-med-theme .amma-legal-doc-row__title {
    margin: 0;
    color: var(--amma-title);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
}

body.amma-med-theme .amma-legal-doc-row__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.amma-med-theme .amma-legal-doc-row__meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(247, 251, 255, 0.94);
    border: 1px solid rgba(216, 229, 245, 0.92);
    color: var(--amma-muted);
    font-size: 12px;
    font-weight: 700;
}

body.amma-med-theme .amma-legal-doc-row__text {
    margin: 0;
    color: var(--amma-muted);
    font-size: 14px;
    line-height: 1.65;
}

body.amma-med-theme .amma-legal-doc-row__actions {
    display: flex;
    align-items: center;
}

body.amma-med-theme .amma-authority-grid--readable {
    gap: 16px;
}

body.amma-med-theme .amma-legal-source-card--inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 8px;
}

body.amma-med-theme .amma-legal-extra-details {
    padding: 22px 24px;
    border-radius: 24px;
}

body.amma-med-theme .amma-legal-extra-details summary {
    cursor: pointer;
    color: var(--amma-title);
    font-size: 18px;
    font-weight: 800;
    list-style: none;
}

body.amma-med-theme .amma-legal-extra-details summary::-webkit-details-marker {
    display: none;
}

body.amma-med-theme .amma-legal-extra-details__content {
    margin-top: 16px;
    color: var(--amma-muted);
}

body.amma-med-theme .amma-legal-anchor-nav--dense .amma-legal-anchor-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

body.amma-med-theme .amma-legal-anchor-nav--dense .amma-legal-anchor-link strong {
    color: var(--amma-accent);
    font-size: 12px;
    font-weight: 900;
}

@media (max-width: 991px) {
    body.amma-med-theme .amma-company-section-head--with-count,
    body.amma-med-theme .amma-legal-source-card--inline {
        flex-direction: column;
        align-items: flex-start;
    }

    body.amma-med-theme .amma-legal-layout--wide {
        grid-template-columns: 1fr;
    }

    body.amma-med-theme .amma-legal-doc-row {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    body.amma-med-theme .amma-legal-doc-row__actions {
        width: 100%;
    }

    body.amma-med-theme .amma-legal-doc-row__actions .amma-btn {
        width: 100%;
    }
}

@media (max-width: 767px) {
    body.amma-med-theme .amma-legal-section-card {
        padding: 20px;
        border-radius: 24px;
    }

    body.amma-med-theme .amma-legal-doc-row {
        padding: 16px;
        border-radius: 18px;
    }

    body.amma-med-theme .amma-legal-doc-row__title {
        font-size: 18px;
    }

    body.amma-med-theme .amma-page-top__actions--legal .amma-btn {
        width: 100%;
    }
}
