/* Shared typography and spacing density for every public school template. */
:root {
    --public-section-space: clamp(2.5rem, 3.5vw, 3.25rem);
    --public-section-space-hero: clamp(2.75rem, 4vw, 3.75rem);
    --public-heading-gap: clamp(1.35rem, 2.4vw, 2rem);
}

/* Keep long Vietnamese display headings readable without dominating the page. */
#main-content h1 {
    font-size: clamp(2.2rem, 3.8vw, 3.3rem) !important;
    line-height: 1.18 !important;
    overflow-wrap: anywhere;
    text-wrap: pretty;
}

#main-content h2 {
    font-size: clamp(1.75rem, 2.75vw, 2.5rem) !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere;
    text-wrap: pretty;
}

/* The native templates use different section class names; direct main sections
   give one consistent vertical rhythm while preserving their own colors/layouts. */
#main-content > section:not(.cv-editorial-hero):not(.cv3-page-hero):not(.dream-home-hero):not(.vt-home-hero):not(.global-cta):not(.trust-strip):not([class*="strip"]):not([class*="ticker"]):not([class*="tools"]):not([class*="map"]):not([class*="breadcrumb"]) {
    padding-top: var(--public-section-space) !important;
    padding-bottom: var(--public-section-space) !important;
}

#main-content > section:first-child:not(.cv-editorial-hero):not(.cv3-page-hero):not(.dream-home-hero):not(.vt-home-hero):is(.hero, [class*="-hero"], [class*="_hero"]) {
    padding-top: var(--public-section-space-hero) !important;
    padding-bottom: var(--public-section-space-hero) !important;
}

/* Common section-heading components across Phuong Nghi and all Worlds themes. */
#main-content :is(
    .section-heading,
    .world-heading,
    .vt-heading,
    .family-heading,
    .science-heading,
    .fairy-heading,
    .animal-heading,
    .nature-heading,
    .space-heading,
    .dream-heading,
    .safari-heading
) {
    margin-bottom: var(--public-heading-gap) !important;
}

/* A flex eyebrow does not inherit text alignment from its heading. Center the
   complete decoration + label group only when the heading explicitly opts in
   to centered alignment. This shared rule also covers present and future
   theme-specific kicker, label and badge names without touching split/left
   headings. */
#main-content [class*="heading--center"] > :is(
    .eyebrow,
    [class*="-eyebrow"],
    [class*="-kicker"],
    [class*="-label"],
    [class*="-badge"]
) {
    justify-content: center !important;
    text-align: center !important;
}

#main-content :is(.section-copy, .world-copy, .family-copy, .science-copy, .fairy-copy, .animal-copy, .nature-copy, .space-copy, .dream-copy) h2 {
    margin-bottom: 1rem !important;
}

#main-content :is(.section-copy, .world-copy, .family-copy, .science-copy, .fairy-copy, .animal-copy, .nature-copy, .space-copy, .dream-copy) > p {
    margin-bottom: .9rem !important;
}

/* Builder blocks follow the same compact rhythm as native template sections. */
#main-content .pb-section {
    padding-top: var(--public-section-space) !important;
    padding-bottom: var(--public-section-space) !important;
}

/* Shared contract for featured and listing thumbnails on every news page.
   Each template remains responsible for its own ratio, radius and art
   direction; this baseline only guarantees a full, centred, distortion-free
   crop whenever an editor uploads an image with a different proportion. */
:where(.tenant-post-thumbnail) {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: var(--tenant-post-thumbnail-ratio, 16 / 10);
    overflow: hidden;
}

:where(.tenant-post-thumbnail) > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Keep the dynamic cover on every native/Portable post at its original ratio.
   Card thumbnails intentionally retain the cropped 16:10 contract above. */
.article-page #main-content img.tenant-post-cover {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    margin-inline: auto;
    object-fit: contain;
    object-position: center;
}

/* Safe image widths written by the tenant article editor. */
#main-content figure[class*="content-image-size-"] {
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
}

#main-content figure.content-image-size-25 { width: 25%; }
#main-content figure.content-image-size-50 { width: 50%; }
#main-content figure.content-image-size-75 { width: 75%; }
#main-content figure.content-image-size-100 { width: 100%; }
#main-content figure[class*="content-image-size-"] > img,
#main-content figure[class*="content-image-size-"] > a > img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin-right: auto;
    margin-left: auto;
}

:where(.tenant-cms-content figure > figcaption) {
    margin-top: .55rem;
    color: var(--theme-text-muted, #66756e);
    font-size: .82rem;
    line-height: 1.5;
    text-align: center;
    overflow-wrap: anywhere;
}

/* Alignment and indentation classes written by the shared tenant article
   editor. Every public template marks the sanitized article body with this
   class so the saved formatting does not depend on a theme-specific prose
   selector. */
.tenant-cms-content .text-align-left { text-align: left; }
.tenant-cms-content .text-align-center { text-align: center; }
.tenant-cms-content .text-align-right { text-align: right; }
.tenant-cms-content .text-align-justify {
    text-align: justify;
    text-justify: inter-word;
}
.tenant-cms-content .content-indent-1 { margin-left: 2rem; }
.tenant-cms-content .content-indent-2 { margin-left: 4rem; }
.tenant-cms-content .content-indent-3 { margin-left: 6rem; }

/* Safe tables created by the shared article editor. Keeping this contract in
   the common public layer prevents wide tables from overflowing any theme. */
.tenant-cms-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: clamp(1.35rem, 3vw, 2rem) 0;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: .94em;
    line-height: 1.55;
}

.tenant-cms-content caption {
    padding: 0 0 .65rem;
    color: var(--post-seo-accent, var(--tenant-primary, var(--theme-primary, #276c57)));
    font-weight: 800;
    text-align: left;
}

.tenant-cms-content :is(th, td) {
    min-width: 7.5rem;
    padding: .7rem .8rem;
    border: 1px solid #d7dfdb;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.tenant-cms-content th {
    background: #f1f6f3;
    background: color-mix(
        in srgb,
        var(--post-seo-accent, var(--tenant-primary, var(--theme-primary, #276c57))) 9%,
        #fff
    );
    font-weight: 800;
}

.tenant-cms-content tbody tr:nth-child(even) td {
    background: #fafcfb;
}

/* Canonical article-body rhythm for every native, Page Builder and Portable
   HTML template. Page titles and headings outside saved article HTML retain
   the larger template-specific scale. */
.article-page #main-content .tenant-cms-content :is(h2, h3, h4) {
    margin-block: .72em .28em !important;
    line-height: 1.24 !important;
    letter-spacing: -.012em;
    text-wrap: pretty;
}

.article-page #main-content .tenant-cms-content h2 {
    font-size: clamp(1.42rem, 1.8vw, 1.58rem) !important;
}

.article-page #main-content .tenant-cms-content h3 {
    font-size: clamp(1.18rem, 1.45vw, 1.32rem) !important;
}

.article-page #main-content .tenant-cms-content h4 {
    font-size: clamp(1.04rem, 1.25vw, 1.15rem) !important;
}

.article-page #main-content .tenant-cms-content h5 {
    margin-top: 1.25em;
    margin-bottom: .4em;
    font-size: 1.08rem !important;
}

.article-page #main-content .tenant-cms-content h6 {
    margin-top: 1.2em;
    margin-bottom: .35em;
    font-size: 1rem !important;
}

/* Shared post-render SEO components: TOC and the school contact CTA are
   generated after the saved article HTML has passed the server sanitizer. */
.article-page {
    --post-seo-accent: var(--tenant-primary, var(--theme-primary, var(--green-700, #276c57)));
    --post-seo-on-accent: var(--tenant-on-primary, var(--theme-on-primary, #fff));
}

.article-page .tenant-post-toc {
    margin: clamp(1rem, 2.5vw, 1.5rem) 0;
    padding: clamp(.8rem, 2vw, 1rem);
    border: 1px solid #d7dfdb;
    border: 1px solid color-mix(in srgb, var(--post-seo-accent) 25%, transparent);
    border-radius: 1rem;
    background: #f8faf9;
    background: color-mix(in srgb, var(--post-seo-accent) 7%, #fff);
    font-size: .875rem;
    font-weight: 400;
    line-height: 1.5;
}

.article-page .tenant-post-toc__title {
    margin: 0 0 .5rem !important;
    color: var(--post-seo-accent);
    font-size: .9rem;
    font-weight: 400;
    line-height: 1.4;
}

.article-page details.tenant-post-toc--compact { padding-block: 0; }

.article-page .tenant-post-toc--compact summary {
    display: flex;
    min-height: 3rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    list-style: none;
}

.article-page .tenant-post-toc--compact summary::-webkit-details-marker { display: none; }

.article-page .tenant-post-toc--compact summary:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--post-seo-accent) 55%, #fff);
    outline-offset: 4px;
    border-radius: .35rem;
}

.article-page .tenant-post-toc--compact summary .tenant-post-toc__title { margin: 0 !important; }

.article-page .tenant-post-toc__compact-label {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--post-seo-accent);
    font-size: .75rem;
    font-weight: 400;
    white-space: nowrap;
}

.article-page .tenant-post-toc__compact-label::after {
    width: .55rem;
    height: .55rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    content: "";
    transform: translateY(-.15rem) rotate(45deg);
}

.article-page .tenant-post-toc__compact-label--hide { display: none; }
.article-page .tenant-post-toc--compact[open] .tenant-post-toc__compact-label--show { display: none; }
.article-page .tenant-post-toc--compact[open] .tenant-post-toc__compact-label--hide { display: inline; }
.article-page .tenant-post-toc--compact[open] .tenant-post-toc__compact-label::after { transform: translateY(.15rem) rotate(225deg); }
.article-page .tenant-post-toc--compact[open] ol { margin-bottom: .9rem; }

.article-page .tenant-post-toc ol {
    display: grid;
    gap: .25rem;
    margin: 0;
    padding-left: 1.2rem;
}

.article-page .tenant-post-toc li {
    margin: 0;
    padding-left: .2rem;
}

.article-page .tenant-post-toc__level-3 {
    margin-left: 1rem !important;
    font-size: .95em;
}

.article-page .tenant-post-toc__level-4 {
    margin-left: 2rem !important;
    font-size: .9em;
}

.article-page .tenant-post-toc a {
    color: inherit;
    font-weight: 400;
    text-decoration-thickness: .08em;
    text-underline-offset: .2em;
}

.article-page .tenant-post-toc a:hover {
    color: var(--post-seo-accent);
}

.article-page :is(h2, h3)[id] {
    scroll-margin-top: 7rem;
}

.article-page .school-footer-cta {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: clamp(2.25rem, 5vw, 3.5rem) 0 0;
    padding: clamp(1.25rem, 3.5vw, 1.85rem);
    border: 1px solid #d7dfdb;
    border: 1px solid color-mix(in srgb, var(--post-seo-accent) 22%, #d7dfdb);
    border-radius: 1rem;
    background: #f8faf9;
    background: color-mix(in srgb, var(--post-seo-accent) 6%, #f8faf9);
}

.article-page #main-content .tenant-cms-content .school-footer-cta h3 {
    margin: 0 0 .85rem !important;
    color: inherit;
    font-size: clamp(1.05rem, 1.45vw, 1.25rem) !important;
    line-height: 1.28 !important;
    letter-spacing: normal;
    text-wrap: balance;
}

.article-page .school-footer-cta p {
    margin: .35rem 0;
    font-size: .9rem;
    line-height: 1.55;
}

.article-page .school-footer-cta__button {
    display: inline-flex;
    align-self: flex-end;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    margin-top: .8rem;
    padding: .65rem 1rem;
    border: 2px solid var(--post-seo-accent);
    border-radius: .75rem;
    background: var(--post-seo-accent);
    color: var(--post-seo-on-accent);
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
}

/* Article furniture is intentionally more compact than page-level headings.
   Page Builder field rules have greater specificity and can still override
   these defaults independently for Desktop, Tablet and Mobile. */
.article-page #main-content :is(aside, div):has(> .tenant-post-visit-action) > h2 {
    font-size: clamp(1.125rem, 1.45vw, 1.3rem) !important;
    line-height: 1.22 !important;
    text-wrap: balance;
}

.article-page #main-content > section:has([data-pb-field-key="post-related-all"]) h2,
.article-page #main-content > .tenant-section--soft .tenant-section-heading > h2,
.article-page #main-content h2[data-pb-field-key="portable-post-related-title"] {
    font-size: clamp(1.5rem, 2.2vw, 2rem) !important;
    line-height: 1.14 !important;
    text-wrap: balance;
}

.article-page .school-footer-cta__button:hover {
    filter: brightness(.94);
    transform: translateY(-1px);
}

.article-page .school-footer-cta__button:focus-visible,
.article-page .tenant-post-toc a:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--post-seo-accent) 55%, #fff);
    outline-offset: 3px;
}

/* Keep the admissions action visually centred inside a post sidebar across
   native packages and template snapshots without changing a theme's button
   width. Imported portable themes inherit the semantic wrapper contract; the
   route-scoped fallback also covers previously imported markup. */
.article-page #main-content .tenant-post-visit-action {
    display: flex !important;
    max-width: 100%;
    justify-content: center !important;
}

.article-page #main-content .tenant-post-visit-cta {
    max-width: 100%;
    text-align: center;
}

.article-page #main-content aside a[href*="/tuyen-sinh"]:not(.tenant-post-visit-cta) {
    display: flex !important;
    width: fit-content !important;
    max-width: 100%;
    margin-inline: auto !important;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Keep the default-theme footer slogan in the same text column as the
   school name and tagline, including the legacy sibling markup. */
.template-phuong-nghi .footer-brand > .footer-brand__slogan {
    margin: -5px 0 0 70px;
}

.template-cau-vong .footer-brand > .footer-brand__slogan {
    margin: -10px 0 0 66px;
}

.template-vuon-tuoi-tho .vt-footer__brand > .footer-brand__slogan {
    margin: -5px 0 0 3.8rem;
}

.template-worlds .world-footer__identity > .footer-brand__slogan {
    margin: -8px 0 0 4.35rem;
}

@media (max-width: 700px) {
    :root {
        --public-section-space: 2.5rem;
        --public-section-space-hero: 2.75rem;
        --public-heading-gap: 1.5rem;
    }

    #main-content h1 {
        font-size: clamp(2rem, 9.5vw, 2.75rem) !important;
    }

    #main-content h2 {
        font-size: clamp(1.65rem, 7.4vw, 2.15rem) !important;
    }

    .template-phuong-nghi .footer-brand > .footer-brand__slogan {
        margin-top: -3px;
        margin-left: 63px;
    }

    .template-cau-vong .footer-brand > .footer-brand__slogan {
        margin-top: -6px;
        margin-left: 60px;
    }

    .template-vuon-tuoi-tho .vt-brand--footer small,
    .template-worlds .world-brand--footer .world-brand__text small {
        display: block;
    }

    .template-vuon-tuoi-tho .vt-footer__brand > .footer-brand__slogan,
    .template-worlds .world-footer__identity > .footer-brand__slogan {
        margin-top: -5px;
        margin-left: 3.8rem;
    }

    .article-page .tenant-post-toc__level-3 {
        margin-left: .35rem !important;
    }

    .article-page .tenant-post-toc__level-4 {
        margin-left: .7rem !important;
    }

    .article-page .school-footer-cta__button {
        align-self: stretch;
        width: 100%;
    }

    .tenant-cms-content .content-indent-2,
    .tenant-cms-content .content-indent-3 {
        margin-left: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .article-page .school-footer-cta__button:hover {
        transform: none;
    }
}
/* School-level typography selected in Cài đặt trường. */
body[data-school-font] {
    font-family: var(--school-font-family, "Roboto", Arial, sans-serif);
}
body[data-school-font] :is(h1, h2, h3, h4, h5, h6, button, input, select, textarea) {
    font-family: var(--school-font-family, "Roboto", Arial, sans-serif);
}

.share-action-status {
    position: fixed;
    z-index: 1200;
    right: 1rem;
    bottom: 1rem;
    max-width: min(28rem, calc(100vw - 2rem));
    padding: .8rem 1rem;
    border: 1px solid color-mix(in srgb, var(--tenant-primary, var(--theme-primary, #276c57)) 28%, transparent);
    border-radius: .8rem;
    background: #fff;
    color: #24483c;
    box-shadow: 0 14px 38px rgb(24 62 49 / 18%);
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.45;
}

.share-action-status.is-error {
    border-color: #e2b3a9;
    color: #7c3126;
    background: #fff7f4;
}

.share-action-status[hidden] { display: none; }

/* Shared public-footer contract.
   Footer content may use the full presentation area without widening the
   page content containers used by the rest of each template. */
.site-footer > :is(.site-footer__grid, .site-footer__bottom),
.vt-footer > :is(.vt-footer__grid, .vt-footer__bottom),
.world-footer > :is(.world-footer__grid, .world-footer__bottom),
.tmn-footer > :is(.tmn-footer__grid, .tmn-footer__bottom),
.tenant-footer > :is(.tenant-footer__grid, .tenant-footer__bottom) {
    width: min(calc(100% - clamp(2rem, 5vw, 7rem)), 1640px);
    max-width: none;
    margin-inline: auto;
}

.site-footer__grid,
.vt-footer__grid,
.world-footer__grid {
    grid-template-columns: minmax(240px, 1.25fr) minmax(180px, .72fr) minmax(280px, 1.05fr) minmax(230px, .9fr);
    column-gap: clamp(2rem, 4vw, 5rem);
    row-gap: 2.25rem;
}

.tmn-footer__grid,
.tenant-footer__grid {
    grid-template-columns: minmax(240px, 1.25fr) minmax(180px, .72fr) minmax(280px, 1.05fr) minmax(230px, .9fr);
    column-gap: clamp(2rem, 4vw, 5rem);
    row-gap: 2.25rem;
}

:is(.site-footer, .vt-footer, .world-footer, .tmn-footer, .tenant-footer) .footer-section {
    display: grid;
    align-content: start;
    row-gap: 1rem;
}

:is(.site-footer, .vt-footer, .world-footer, .tmn-footer, .tenant-footer) .footer-section > :is(h2, h3) {
    margin: 0;
    line-height: 1.3;
}

:is(.site-footer, .vt-footer, .world-footer, .tmn-footer, .tenant-footer) .footer-list {
    display: grid;
    gap: .9rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

:is(.site-footer, .vt-footer, .world-footer, .tmn-footer, .tenant-footer) .footer-list__item {
    position: relative;
    min-width: 0;
    padding-inline-start: 1rem;
    overflow-wrap: anywhere;
    line-height: 1.55;
}

:is(.site-footer, .vt-footer, .world-footer, .tmn-footer, .tenant-footer) .footer-list__item::before {
    position: absolute;
    top: .69em;
    inset-inline-start: 0;
    width: .38rem;
    height: .38rem;
    border-radius: 50%;
    background: currentColor;
    content: "";
    opacity: .82;
}

:is(.site-footer, .vt-footer, .world-footer, .tmn-footer, .tenant-footer) .footer-list__label {
    color: inherit;
    font-weight: 800;
    margin-inline-end: .18rem;
}

:is(.site-footer, .vt-footer, .world-footer, .tmn-footer, .tenant-footer) address.footer-list__value {
    display: inline;
    font-style: normal;
}

:is(.site-footer, .vt-footer, .world-footer, .tmn-footer, .tenant-footer) .footer-list__separator {
    display: inline-block;
    padding-inline: .35rem;
    opacity: .62;
}

:is(.site-footer, .vt-footer, .world-footer, .tmn-footer, .tenant-footer) .footer-section--newsletter .tenant-social-links {
    margin-top: .15rem;
}

/* Keep the school identity consistent across every public template and Page Builder preview. */
:is(.site-header, .site-footer) .brand > img,
:is(.tmn-header, .tmn-footer) .tmn-brand > img,
:is(.tenant-header, .tenant-footer) .tenant-brand > img {
    display: block;
    flex: 0 0 auto;
    aspect-ratio: 1;
    padding: 0;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
    border-radius: 50%;
    object-fit: cover;
    box-shadow: none;
}

:is(.vt-header, .vt-footer) .vt-brand__mark,
:is(.world-header, .world-footer) .world-brand__mark {
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
    border-radius: 50%;
    box-shadow: none;
}

:is(.vt-header, .vt-footer) .vt-brand__mark > img,
:is(.world-header, .world-footer) .world-brand__mark > img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border-radius: 50%;
    object-fit: cover;
}

:is(.world-header, .world-footer) .world-brand:hover .world-brand__mark {
    border-radius: 50%;
}

:is(
    .site-header,
    .site-footer,
    .vt-header,
    .vt-footer,
    .world-header,
    .world-footer,
    .tmn-header,
    .tmn-footer,
    .tenant-header,
    .tenant-footer
) .school-logo-frame {
    display: grid !important;
    flex: 0 0 auto !important;
    aspect-ratio: 1 !important;
    place-items: center !important;
    overflow: hidden !important;
    border: 1px solid color-mix(in srgb, currentColor 10%, transparent) !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    line-height: 0 !important;
}

:is(
    .site-header,
    .site-footer,
    .vt-header,
    .vt-footer,
    .world-header,
    .world-footer,
    .tmn-header,
    .tmn-footer,
    .tenant-header,
    .tenant-footer
) .school-logo-frame > img {
    display: block !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    object-fit: cover !important;
    box-shadow: none !important;
    transform: scale(1.18) !important;
    transform-origin: center !important;
}

.footer-newsletter__label,
.footer-newsletter__honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

:is(.tmn-footer, .tenant-footer) .footer-newsletter-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 24%);
    border-radius: 999px;
    background: rgb(255 255 255 / 9%);
}

:is(.tmn-footer, .tenant-footer) .footer-newsletter-form input[type="email"] {
    min-width: 0;
    padding: .75rem 1rem;
    border: 0;
    outline: 0;
    color: inherit;
    background: transparent;
}

:is(.tmn-footer, .tenant-footer) .footer-newsletter-form input[type="email"]::placeholder {
    color: currentColor;
    opacity: .7;
}

:is(.tmn-footer, .tenant-footer) .footer-newsletter-form button {
    min-width: 3rem;
    border: 0;
    color: #173e34;
    background: var(--tenant-accent, var(--tmn-accent, #f5a45d));
    font-weight: 900;
    cursor: pointer;
}

:is(
    .site-footer .brand--footer .brand__text,
    .vt-footer .vt-brand--footer > span:last-child,
    .world-footer .world-brand--footer .world-brand__text,
    .tmn-footer .tmn-brand > span,
    .tenant-footer .tenant-brand--footer > span
) {
    display: grid;
    align-content: start;
    row-gap: .3rem;
}

:is(
    .site-footer .brand--footer .brand__text,
    .vt-footer .vt-brand--footer > span:last-child,
    .world-footer .world-brand--footer .world-brand__text,
    .tmn-footer .tmn-brand > span,
    .tenant-footer .tenant-brand--footer > span
) > :is(strong, small, .footer-brand__slogan) {
    display: block;
    margin-top: 0;
    line-height: 1.5;
}

@media (max-width: 1180px) {
    .site-footer__grid,
    .vt-footer__grid,
    .world-footer__grid,
    .tmn-footer__grid,
    .tenant-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: clamp(1.75rem, 5vw, 3.5rem);
    }

    .site-footer__grid > :last-child,
    .tenant-footer__grid > div:first-child {
        grid-column: auto;
        max-width: none;
    }
}

@media (max-width: 700px) {
    .site-footer > :is(.site-footer__grid, .site-footer__bottom),
    .vt-footer > :is(.vt-footer__grid, .vt-footer__bottom),
    .world-footer > :is(.world-footer__grid, .world-footer__bottom),
    .tmn-footer > :is(.tmn-footer__grid, .tmn-footer__bottom),
    .tenant-footer > :is(.tenant-footer__grid, .tenant-footer__bottom) {
        width: min(calc(100% - 1.75rem), 1640px);
    }

    .site-footer__grid,
    .vt-footer__grid,
    .world-footer__grid,
    .tmn-footer__grid,
    .tenant-footer__grid {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 2rem;
    }

    .site-footer__grid > :last-child,
    .tenant-footer__grid > div:first-child {
        grid-column: auto;
    }
}
.content-view-count {
    display: inline-flex;
    align-items: center;
    gap: .34rem;
    white-space: nowrap;
    color: inherit;
    font: inherit;
    font-variant-numeric: tabular-nums;
    opacity: .82;
}

.content-view-count svg {
    width: 1.05em;
    height: 1.05em;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.content-view-count .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/* Canonical tenant privacy layout: one calm reading column, without the
   theme-specific cards, sidebars or narrow prose widths. */
#main-content > .tenant-privacy-section {
    padding-top: clamp(3.75rem, 7vw, 6.5rem) !important;
    padding-bottom: clamp(3.75rem, 7vw, 6.5rem) !important;
    background: #fff;
}

#main-content .tenant-privacy-policy {
    display: block;
    width: min(calc(100% - 2rem), 68rem);
    max-width: 68rem;
    margin-inline: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: inherit;
    background: transparent;
    box-shadow: none;
}

#main-content .tenant-privacy-policy > h2 {
    margin: 2.15rem 0 .75rem !important;
    color: var(--tenant-primary-ink, var(--theme-primary-ink, var(--green-900, var(--tmn-primary, #174b3a))));
    font-size: clamp(1.22rem, 2vw, 1.5rem) !important;
    line-height: 1.32 !important;
}

#main-content .tenant-privacy-policy > h2:first-child {
    margin-top: 0 !important;
}

#main-content .tenant-privacy-policy > p {
    margin: 0;
    font-size: clamp(.98rem, 1.2vw, 1.06rem);
    line-height: 1.75;
}

#main-content .tenant-privacy-policy a {
    color: var(--tenant-primary, var(--theme-primary, var(--green-700, var(--tmn-primary, #24755f))));
    overflow-wrap: anywhere;
    text-underline-offset: .16em;
}

#main-content .tenant-privacy-updated {
    margin-top: .85rem;
}

@media (max-width: 700px) {
    #main-content > .tenant-privacy-section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    #main-content .tenant-privacy-policy {
        width: min(calc(100% - 1.5rem), 68rem);
    }
}

/* A grid's automatic minimum must not be dictated by an email, select or
   file input. Managed Page Builder widths retain their explicit overrides. */
#main-content { min-width: 0; overflow-wrap: anywhere; }
#main-content :where(form, fieldset, input, select, textarea) {
    min-width: 0;
}
#main-content :where(input, select, textarea) { max-width: 100%; }

/* The school identity may wrap, but must never consume the menu's space.
   Keep typography editable through the existing responsive Page Builder. */
:is(.site-header, .vt-header, .world-header, .tmn-header, .tenant-header)
    :is(.site-header__inner, .vt-header__inner, .world-header__inner, .tmn-header__inner, .tenant-header__inner) {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    height: auto;
    padding-block: .75rem;
}
.tenant-header .tenant-header__inner { grid-template-columns: minmax(0, 1fr) auto auto; }
:is(.site-header, .site-footer, .vt-header, .vt-footer, .world-header, .world-footer, .tmn-header, .tmn-footer, .tenant-header, .tenant-footer)
    :is(.brand, .vt-brand, .world-brand, .tmn-brand, .tenant-brand) {
    min-width: 0;
    max-width: 100%;
    flex-shrink: 1;
}
:is(.brand, .vt-brand, .world-brand, .tmn-brand, .tenant-brand) > span:not(.school-logo-frame) {
    min-width: 0;
    max-width: 100%;
}
:is(.site-header, .site-footer, .vt-header, .vt-footer, .world-header, .world-footer, .tmn-header, .tmn-footer, .tenant-header, .tenant-footer)
    :is(.brand, .vt-brand, .world-brand, .tmn-brand, .tenant-brand) :is(strong, small) {
    max-width: none;
    max-height: none;
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
    overflow-wrap: anywhere;
    line-height: 1.4;
}
:is(.site-header, .vt-header, .world-header, .tmn-header, .tenant-header)
    :is(.brand, .vt-brand, .world-brand, .tmn-brand, .tenant-brand) strong {
    font-size: clamp(1rem, 1.3vw, 1.2rem);
}
[data-pb-shell-section="shell-header"] :is(.nav-toggle, .world-nav-toggle, .vt-nav-toggle, .tmn-nav-toggle, .tenant-menu-button) {
    box-sizing: border-box;
    display: none;
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    flex: 0 0 48px;
    padding: 11px;
    justify-self: end;
    cursor: pointer;
}
[data-pb-shell-section="shell-header"] :is(button, a):focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

/* A single breakpoint and dropdown geometry across the public packages.
   Theme colors and corner shapes remain owned by each package. */
@media (max-width: 1088px) {
    :is(.site-header, .vt-header, .world-header, .tmn-header, .tenant-header)
        :is(.site-header__inner, .vt-header__inner, .world-header__inner, .tmn-header__inner, .tenant-header__inner) {
        grid-template-columns: minmax(0, 1fr) 48px;
        column-gap: .75rem;
    }
    [data-pb-shell-section="shell-header"] :is(.nav-toggle, .world-nav-toggle, .vt-nav-toggle, .tmn-nav-toggle, .tenant-menu-button) {
        display: block;
        grid-column: 2;
        grid-row: 1;
    }
    [data-pb-shell-section="shell-header"] nav[aria-label="Điều hướng chính"] {
        position: absolute;
        z-index: 50;
        inset: 100% 0 auto;
        display: none;
        grid-template-columns: minmax(0, 1fr);
        width: auto;
        min-width: 0;
        max-width: none;
        max-height: var(--public-nav-available-height, 60vh);
        margin: 0;
        padding: .75rem;
        gap: .25rem;
        overflow-y: auto;
        overscroll-behavior: contain;
        border: 1px solid var(--theme-border, #dce5e0);
        border-radius: 1rem;
        background: var(--theme-surface, #fff);
        box-shadow: 0 12px 30px rgb(20 35 40 / 12%);
    }
    [data-pb-shell-section="shell-header"] [aria-expanded="true"] ~ nav[aria-label="Điều hướng chính"] { display: grid; }
    [data-pb-shell-section="shell-header"] [aria-expanded="false"] ~ nav[aria-label="Điều hướng chính"] { display: none; }
    [data-pb-shell-section="shell-header"] nav[aria-label="Điều hướng chính"] > a {
        display: flex;
        min-width: 0;
        min-height: 44px;
        height: auto;
        align-items: center;
        justify-content: flex-start;
        padding: .65rem .9rem;
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.45;
        text-align: start;
    }
    [data-pb-shell-section="shell-header"] nav > .vt-nav__indicator,
    .tenant-header .tenant-header__cta { display: none; }
}

/* Readable saved content: full line width, indented bullets and intact words.
   Explicit center/right formatting from the editor remains available. */
.tenant-cms-content {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
}
.article-page #main-content .tenant-cms-content :is(h2, h3, h4, h5, h6) {
    max-width: none;
    width: auto;
    white-space: normal;
    overflow-wrap: anywhere;
}
.tenant-cms-content :is(ul, ol):not([class]) {
    padding-inline-start: 1.5em;
    margin-inline: 0;
    list-style-position: outside;
}
.tenant-cms-content :is(ul, ol):not([class]) > li { padding-inline-start: .15em; }
.tenant-cms-content :is(h2, h3, h4, h5, h6).text-align-justify { text-align: start; }
