/* Shared public-page width. Operational room layouts retain their own sizes. */
.p4s-content-master {
    --p4s-public-content-width: 1240px;
    --p4s-public-ink: #17384b;
    --p4s-public-teal: #007f82;
    --p4s-public-line: #d6e4ec;
    --p4s-public-gold: #ad8018;
}

.p4s-content-master .p4s-shell__header-row,
.p4s-content-master .p4s-shell__footer-inner,
.p4s-content-master .p4s-shell-main .container.p4s-article-page,
.p4s-content-master .p4s-shell-main .container.p4s-article-index-page,
.p4s-content-master .p4s-shell-main .container.p4s-link-exchange-page,
.p4s-content-master .p4s-shell-main .p4s-article-index-breadcrumbs .container,
.p4s-content-master .p4s-home .p4s-home__wide,
.p4s-content-master .p4s-home .p4s-home__container {
    max-width: var(--p4s-public-content-width);
}

/* The full navigation must fit the same frame, including signed-in links. */
@media (min-width: 1101px) {
    .p4s-content-master .p4s-shell__header-row { gap: 14px; }
    .p4s-content-master .p4s-shell__brand { gap: 14px; }
    .p4s-content-master .p4s-shell__brand-logo { width: 260px; }
    .p4s-content-master .p4s-shell__brand-copy { min-width: 190px; padding-left: 14px; }
    .p4s-content-master .p4s-shell__nav-wrap { gap: 12px; }
    .p4s-content-master .p4s-shell__nav { gap: 12px; }
    .p4s-content-master .p4s-shell__header-actions { gap: 10px; }
    .p4s-content-master .p4s-shell__nav-link,
    .p4s-content-master .p4s-shell__login { font-size: 12.5px; }
    .p4s-content-master .p4s-shell__header-actions .p4s-button {
        min-height: 50px;
        padding: 12px 16px;
        font-size: 13px;
    }
}

@media (min-width: 1101px) and (max-width: 1180px) {
    .p4s-content-master .p4s-shell__brand-copy { display: none; }
}

/* Editorial hierarchy shared by the public service and information pages. */
.p4s-content-master .p4s-shell-main .p4s-article-page h1,
.p4s-content-master .p4s-shell-main .p4s-article-index-page h1,
.p4s-content-master .p4s-shell-main .p4s-link-exchange-title {
    color: var(--p4s-public-ink);
    font-size: 42px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.p4s-content-master .p4s-article-page h1 > a {
    color: inherit;
}
.p4s-content-master .p4s-shell-main .p4s-topic-home .p4s-topic-home__section-title,
.p4s-content-master .p4s-shell-main .p4s-topic-home .p4s-topic-home__quote-title {
    color: var(--p4s-public-ink);
    font-size: 30px;
    line-height: 1.45;
}
.p4s-content-master .p4s-shell-main .p4s-topic-home .p4s-topic-home__lede,
.p4s-content-master .p4s-shell-main .p4s-article-page .p4s-hero-intro {
    font-size: 16px;
    line-height: 1.85;
}

/* Existing controls retain their own sizes; these are public navigation CTAs. */
.p4s-content-master .p4s-shell-main .p4s-topic-home .p4s-topic-home__button,
.p4s-content-master .p4s-shell__header .p4s-button {
    min-height: 48px;
    border-radius: 0 !important;
    box-shadow: none;
    font-weight: 700;
}
.p4s-content-master .p4s-shell-main .p4s-topic-home .p4s-topic-home__button--primary,
.p4s-content-master .p4s-shell-main .p4s-topic-home .p4s-academic-v2__hero-upload-continue,
.p4s-content-master .p4s-shell-main .p4s-home__button,
.p4s-content-master .p4s-academic-v2__mobile-bar-button--primary,
.p4s-content-master .p4s-faq-hub__mobile-bar-button--primary,
.p4s-content-master .p4s-order-hub__mobile-bar-button--primary,
.p4s-content-master .p4s-pricing__mobile-bar-button--primary,
.p4s-content-master .p4s-shell__header .p4s-button--gold {
    border-color: var(--p4s-public-gold);
    background: var(--p4s-public-gold);
    color: #fff !important;
    box-shadow: none;
}
.p4s-content-master .p4s-shell-main .p4s-home__button {
    min-height: 48px;
    border-radius: 0;
}
.p4s-content-master .p4s-shell-main .p4s-topic-home .p4s-topic-home__button--secondary {
    border-color: var(--p4s-public-line);
    background: #fff;
    color: var(--p4s-public-teal) !important;
    box-shadow: none;
}
.p4s-content-master .p4s-shell-main .p4s-topic-home .p4s-topic-home__button:hover,
.p4s-content-master .p4s-shell__header .p4s-button:hover {
    filter: brightness(0.94);
}
.p4s-content-master .p4s-shell-main .p4s-topic-home a:focus-visible,
.p4s-content-master .p4s-shell__header a:focus-visible,
.p4s-content-master .p4s-shell__footer a:focus-visible {
    outline: 3px solid var(--p4s-public-teal);
    outline-offset: 4px;
}

/* Match the approved service layout while keeping every page's existing copy. */
.p4s-content-master .p4s-topic-home--academic-v2:not(.p4s-topic-home--editorial) {
    --p4s-service-section-padding: 36px 40px;
    --p4s-service-section-background: #fff;
}
.p4s-content-master .p4s-topic-home--academic-v2:not(.p4s-topic-home--editorial) .p4s-academic-v2__hero {
    padding: 32px 40px;
    gap: 32px;
    background: linear-gradient(120deg, #fff, #eff8fc);
}
.p4s-content-master .p4s-topic-home--academic-v2:not(.p4s-topic-home--editorial) > .p4s-topic-home__section {
    margin-top: 0;
}
.p4s-content-master .p4s-topic-home--academic-v2:not(.p4s-topic-home--editorial) > .p4s-academic-v2__split-grid {
    padding: 36px 40px;
    margin-top: 0;
}
.p4s-content-master .p4s-topic-home--academic-v2:not(.p4s-topic-home--editorial) > #p4s-academic-feedback,
.p4s-content-master .p4s-topic-home--academic-v2:not(.p4s-topic-home--editorial) > #p4s-academic-overview,
.p4s-content-master .p4s-topic-home--academic-v2:not(.p4s-topic-home--editorial) > #p4s-academic-quote {
    --p4s-service-section-background: #eff8fc;
}
.p4s-content-master .p4s-topic-home .p4s-academic-v2__hero-proof,
.p4s-content-master .p4s-topic-home .p4s-academic-v2__hero-upload-card,
.p4s-content-master .p4s-topic-home .p4s-topic-home__review-card,
.p4s-content-master .p4s-topic-home .p4s-academic-v2__faq-card,
.p4s-content-master .p4s-topic-home .p4s-topic-home__quote-shell,
.p4s-content-master .p4s-article-index-page .p4s-article-index-card,
.p4s-content-master .p4s-contact-card {
    border-radius: 0 !important;
    box-shadow: none;
}
.p4s-content-master .p4s-shell-main :is(
    .p4s-faq-hub__stage-card, .p4s-faq-hub__route-card,
    .p4s-faq-hub__process-card, .p4s-faq-hub__policy-card,
    .p4s-faq-hub__faq-card, .p4s-faq-hub__category-card,
    .p4s-faq-hub__quote-shell, .p4s-faq-hub__support-card,
    .p4s-order-hub__stage-card, .p4s-order-hub__category-card,
    .p4s-order-hub__quick-card, .p4s-order-hub__route-card,
    .p4s-order-hub__payment-card, .p4s-order-hub__process-card,
    .p4s-order-hub__support-card, .p4s-order-hub__faq-card,
    .p4s-order-hub__quote-shell, .p4s-pricing__panel-card,
    .p4s-pricing__rate-card, .p4s-pricing__card,
    .p4s-pricing__compare-card, .p4s-article-index-hero,
    .p4s-article-index-toolbar, .p4s-legacy-sitemap-tree
) {
    border-radius: 0 !important;
    box-shadow: none;
}

/* The legacy TreeView emits nowrap cells that otherwise widen mobile pages. */
.p4s-content-master .p4s-link-exchange-page img {
    max-width: 100%;
    height: auto;
}
.p4s-content-master .p4s-legacy-sitemap-tree table {
    display: block;
    max-width: 100%;
}
.p4s-content-master .p4s-legacy-sitemap-tree tbody { display: block; }
.p4s-content-master .p4s-legacy-sitemap-tree tr { display: flex; }
.p4s-content-master .p4s-legacy-sitemap-tree td:not(:last-child) {
    width: 20px;
    flex: 0 0 20px;
}
.p4s-content-master .p4s-legacy-sitemap-tree td:last-child {
    flex: 1 1 0;
    min-width: 0;
}
.p4s-content-master .p4s-legacy-sitemap-tree td,
.p4s-content-master .p4s-legacy-sitemap-tree a {
    white-space: normal !important;
    overflow-wrap: anywhere;
}
.p4s-content-master .p4s-legacy-sitemap-tree a {
    display: inline-block;
    padding-top: 5px;
    padding-bottom: 5px;
    line-height: 1.6;
}
.p4s-content-master .p4s-legacy-sitemap-tree a,
.p4s-content-master .p4s-legacy-sitemap-tree span {
    font-size: 14px !important;
}

@media (min-width: 1280px) {
    .p4s-content-master .p4s-shell__nav-link,
    .p4s-content-master .p4s-shell__login { font-size: 14px; }
}
@media (max-width: 991px) {
    .p4s-content-master .p4s-topic-home--academic-v2:not(.p4s-topic-home--editorial) .p4s-academic-v2__hero {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (max-width: 767px) {
    .p4s-content-master .p4s-shell-main .p4s-article-page h1,
    .p4s-content-master .p4s-shell-main .p4s-article-index-page h1,
    .p4s-content-master .p4s-shell-main .p4s-link-exchange-title {
        font-size: 30px;
        line-height: 1.45;
    }
    .p4s-content-master .p4s-shell-main .p4s-topic-home .p4s-topic-home__section-title,
    .p4s-content-master .p4s-shell-main .p4s-topic-home .p4s-topic-home__quote-title {
        font-size: 25px;
    }
    .p4s-content-master .p4s-topic-home--academic-v2:not(.p4s-topic-home--editorial) {
        --p4s-service-section-padding: 28px 18px;
    }
    .p4s-content-master .p4s-topic-home--academic-v2:not(.p4s-topic-home--editorial) .p4s-academic-v2__hero {
        padding: 24px 18px;
        gap: 24px;
    }
    .p4s-content-master .p4s-topic-home--academic-v2:not(.p4s-topic-home--editorial) > .p4s-academic-v2__split-grid {
        padding: 28px 18px;
    }
    .p4s-content-master .p4s-link-exchange-page table,
    .p4s-content-master .p4s-link-exchange-page tbody,
    .p4s-content-master .p4s-link-exchange-page tr,
    .p4s-content-master .p4s-link-exchange-page td {
        display: block;
        width: 100% !important;
        max-width: 100%;
        height: auto;
        text-align: left;
        overflow-wrap: anywhere;
    }
    .p4s-content-master .p4s-link-exchange-page input,
    .p4s-content-master .p4s-link-exchange-page select,
    .p4s-content-master .p4s-link-exchange-page a,
    .p4s-content-master .p4s-link-exchange-page span {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .p4s-content-master .p4s-link-exchange-page [id$="Label3"],
    .p4s-content-master .p4s-link-exchange-page [id$="Label5"],
    .p4s-content-master .p4s-link-exchange-page [id$="LinkButton1"] {
        height: auto !important;
        padding: 10px;
    }
}
@media (max-width: 400px) {
    .p4s-content-master .p4s-topic-home--academic-v2 .p4s-academic-v2__trust-strip {
        grid-template-columns: minmax(0, 1fr);
    }
}
