/* Shared presentation for the existing website and mobile policy content. */
.legal-page {
    --legal-ink: #233449;
    --legal-muted: #536477;
    --legal-accent: #227858;
    clear: both;
    padding: 48px 24px 72px;
    background: #f3f6f5;
    color: var(--legal-ink);
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    line-height: 1.85;
    overflow-wrap: anywhere;
}

.legal-document,
.legal-extension {
    max-width: 920px;
    margin: 0 auto;
    padding: 48px 64px;
    border: 1px solid #dfe7e3;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(31, 59, 46, .035);
}

.legal-extension {
    margin-top: 32px;
    border-top: 4px solid var(--legal-accent);
}

/* CMS HTML carries Bootstrap utility classes; normalize them only inside policies. */
.legal-page :is(section, .container, .row, [class*="col-"], .card, .card-body) {
    float: none !important;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
}

.legal-page :is(.text-white, .text-dark, .text-muted) {
    color: var(--legal-muted) !important;
}

.legal-page :is(h1, h2, h3, h4, h5, h6) {
    color: var(--legal-ink) !important;
    font-family: inherit;
    font-weight: 600;
    line-height: 1.4;
    text-align: left !important;
    text-transform: none;
    scroll-margin-top: 120px;
}

.legal-page :is(h1, h2) {
    margin: 0 0 16px !important;
    font-size: clamp(1.65rem, 3vw, 2rem);
    letter-spacing: -.035em;
}

.legal-page .legal-document > :is(h2, h3),
.legal-document > section > .container > :is(h2, h3) {
    margin: 0 0 12px !important;
    color: var(--legal-ink) !important;
    font-size: clamp(1.65rem, 3vw, 2rem);
    letter-spacing: -.035em;
}

.legal-page :is(h3, h4, h5) {
    margin: 32px 0 12px !important;
    font-size: 1.125rem;
    letter-spacing: -.015em;
}

.legal-document .card-body > :is(h3, h4, h5):first-child {
    margin-top: 0 !important;
}

.legal-page p {
    margin: 0 0 18px !important;
    padding: 0 !important;
    color: var(--legal-muted);
    font-size: inherit;
    line-height: inherit;
    text-align: left !important;
}

.legal-document > h3 + p,
.legal-document > section > .container > h3 + p,
.legal-extension h2 + p {
    margin: 0 0 32px !important;
    padding-bottom: 24px !important;
    border-bottom: 1px solid #e4ebe7;
    color: #647367 !important;
    font-size: .8125rem;
    line-height: 1.6;
}

.legal-page :is(ul, ol) {
    margin: 12px 0 20px !important;
    padding: 0 0 0 24px !important;
    list-style-position: outside;
}

.legal-page ul { list-style-type: disc; }
.legal-page ol { list-style-type: decimal; }

.legal-page li {
    margin: 0 0 8px;
    padding-left: 4px;
    color: var(--legal-muted);
    font-size: inherit;
    line-height: inherit;
}

.legal-page li::marker { color: var(--legal-accent); }
.legal-page :is(strong, b) { color: var(--legal-ink); font-weight: 600; }

.legal-page a {
    color: #245ba0;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.legal-page a:hover { color: var(--legal-accent); }
.legal-page a:focus-visible { outline: 3px solid #227858; outline-offset: 4px; border-radius: 2px; }
.legal-page [id] { scroll-margin-top: 120px; }

.legal-page address {
    margin: 20px 0 0;
    padding: 20px 24px;
    border-left: 3px solid #b4d3c3;
    border-radius: 0 8px 8px 0;
    background: #f3f8f5;
    color: var(--legal-ink);
    font-size: .9375rem;
    font-style: normal;
    line-height: 1.9;
}

.legal-page h6 {
    margin: 28px 0 0;
    padding-top: 20px;
    border-top: 1px solid #e4ebe7;
    color: var(--legal-muted) !important;
    font-size: .8125rem;
    font-weight: 400;
}

@media (max-width: 767px) {
    .legal-page { padding: 24px 16px 40px; }
    .legal-document, .legal-extension { padding: 28px 24px; border-radius: 12px; }
    .legal-extension { margin-top: 20px; }
}

@media (max-width: 400px) {
    .legal-page { padding-right: 10px; padding-left: 10px; }
    .legal-document, .legal-extension { padding: 24px 18px; }
}

@media print {
    .legal-page { padding: 0; background: #fff; color: #000; font-size: 11pt; }
    .legal-document, .legal-extension { max-width: none; padding: 16px 0; border: 0; box-shadow: none; }
    .legal-page :is(h2, h3, h4, h5) { break-after: avoid; }
    .legal-page :is(p, li) { orphans: 3; widows: 3; }
}
