.legal-page {
    font-family: "Manrope", sans-serif;
    color: #10243a;
}

.legal-page h1,
.legal-page h2,
.legal-page h3,
.legal-page strong,
.legal-page .legal-kicker,
.legal-page .legal-site-header nav,
.legal-page .legal-document-actions {
    font-family: "Sora", sans-serif;
}

.legal-site-header {
    width: min(1180px, calc(100% - 44px));
    min-height: 92px;
    margin: 0 auto;
    padding-right: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-sizing: border-box;
}

.legal-brand {
    display: inline-flex;
    align-items: center;
}

.legal-brand img {
    width: 184px;
    height: auto;
    display: block;
}

.legal-site-header nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legal-site-header nav a {
    min-height: 43px;
    padding: 10px 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #31506a;
    border: 1px solid transparent;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 700;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.legal-site-header nav a:hover,
.legal-site-header nav a:focus-visible {
    color: #006f6b;
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(12, 166, 157, 0.28);
    transform: translateY(-1px);
}

.legal-site-header nav .legal-login-link {
    color: #ffffff;
    background: linear-gradient(135deg, #04aa9f, #05857f);
    box-shadow: 0 10px 22px rgba(5, 133, 127, 0.2);
}

.legal-site-header nav .legal-login-link:hover,
.legal-site-header nav .legal-login-link:focus-visible {
    color: #ffffff;
    background: linear-gradient(135deg, #079c94, #006f6b);
    border-color: transparent;
}

.legal-main {
    width: min(1180px, calc(100% - 44px));
    margin: 0 auto;
    padding: 18px 0 54px;
}

.legal-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 270px;
    padding: clamp(34px, 5vw, 62px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 38px;
    color: #ffffff;
    background:
        radial-gradient(circle at 92% 10%, rgba(255, 196, 31, 0.95) 0 9%, transparent 32%),
        linear-gradient(135deg, #052f3c 0%, #064f57 52%, #05857f 100%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: 0 22px 55px rgba(4, 52, 63, 0.2);
}

.legal-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 280px;
    height: 280px;
    right: 17%;
    bottom: -205px;
    border: 48px solid rgba(32, 210, 196, 0.24);
    border-radius: 50%;
}

.legal-hero-copy {
    max-width: 720px;
}

.legal-kicker {
    width: fit-content;
    margin-bottom: 14px;
    padding: 7px 11px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #083d47;
    background: #ffc52e;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.legal-hero h1 {
    max-width: 700px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(2rem, 4.6vw, 3.55rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.legal-hero-copy > p {
    max-width: 650px;
    margin: 18px 0 0;
    color: rgba(239, 253, 252, 0.84);
    font-size: 1.02rem;
    line-height: 1.75;
}

.legal-hero-badge {
    min-width: 225px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 13px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.23);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.legal-hero-badge > i {
    color: #ffc52e;
    font-size: 1.6rem;
}

.legal-hero-badge span {
    display: grid;
    gap: 4px;
}

.legal-hero-badge strong {
    color: #ffffff;
    font-size: 0.84rem;
}

.legal-hero-badge small {
    color: rgba(239, 253, 252, 0.76);
    font-size: 0.72rem;
    line-height: 1.35;
}

.legal-document-tabs {
    margin: 22px 0;
    padding: 7px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(195, 215, 225, 0.78);
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(37, 65, 85, 0.08);
    backdrop-filter: blur(14px);
}

.legal-document-tabs > a {
    min-width: 0;
    min-height: 91px;
    padding: 15px 17px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #476178;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 15px;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.legal-document-tabs > a:hover,
.legal-document-tabs > a:focus-visible {
    color: #063f47;
    background: rgba(241, 253, 251, 0.9);
    border-color: rgba(7, 171, 159, 0.25);
    transform: translateY(-1px);
}

.legal-document-tabs > a.is-active {
    color: #073d46;
    background: linear-gradient(135deg, #ffffff, #effcf9);
    border-color: rgba(4, 170, 159, 0.34);
    box-shadow: 0 9px 22px rgba(5, 133, 127, 0.11);
}

.legal-tab-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #04b8ac, #087e79);
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(5, 133, 127, 0.18);
}

.legal-document-tabs > a:not(.is-active) .legal-tab-icon {
    color: #087e79;
    background: #e0f8f4;
    box-shadow: none;
}

.legal-document-tabs > a > span:last-child {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.legal-document-tabs strong {
    color: inherit;
    font-size: 0.86rem;
    line-height: 1.35;
}

.legal-document-tabs small {
    color: #6b8195;
    font-size: 0.74rem;
    line-height: 1.4;
}

.legal-viewer-card {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(195, 215, 225, 0.84);
    border-radius: 24px;
    box-shadow: 0 20px 52px rgba(24, 63, 78, 0.12);
}

.legal-document-header {
    padding: 19px 21px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #dce8ed;
}

.legal-document-header > div {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 13px;
}

.legal-document-mark {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    color: #0a746f;
    background: #dcf8f3;
    border-radius: 15px;
    font-size: 1.25rem;
}

.legal-document-header small {
    color: #0a8d84;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

.legal-document-header h2 {
    margin: 3px 0 2px;
    color: #10243a;
    font-size: clamp(1rem, 2.2vw, 1.34rem);
    line-height: 1.3;
}

.legal-document-header p {
    margin: 0;
    color: #718397;
    font-size: 0.77rem;
    line-height: 1.45;
}

.legal-document-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
}

.legal-document-actions a {
    min-height: 42px;
    padding: 9px 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #076f69;
    background: #ffffff;
    border: 1px solid #8bd8d1;
    border-radius: 11px;
    text-decoration: none;
    font-size: 0.73rem;
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.legal-document-actions a.is-download {
    color: #083d47;
    background: #ffc52e;
    border-color: #efae10;
}

.legal-document-actions a:hover,
.legal-document-actions a:focus-visible {
    box-shadow: 0 8px 18px rgba(23, 80, 91, 0.15);
    transform: translateY(-1px);
}

.legal-pdf-frame {
    padding: 12px;
    background: #dce6ea;
}

.legal-pdf-frame object {
    width: 100%;
    height: clamp(680px, 78vh, 980px);
    display: block;
    background: #ffffff;
    border: 0;
    border-radius: 14px;
}

.legal-pdf-fallback {
    min-height: 560px;
    padding: 35px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    text-align: center;
}

.legal-pdf-fallback > i {
    color: #dc5446;
    font-size: 3rem;
}

.legal-pdf-fallback h3,
.legal-pdf-fallback p {
    margin: 0;
}

.legal-pdf-fallback a {
    margin-top: 8px;
    padding: 11px 16px;
    color: #ffffff;
    background: #05857f;
    border-radius: 11px;
    text-decoration: none;
    font-weight: 800;
}

.legal-contact-card {
    margin-top: 22px;
    padding: 24px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    background: linear-gradient(135deg, #fff9df, #ffffff);
    border: 1px solid rgba(233, 177, 21, 0.36);
    border-radius: 20px;
    box-shadow: 0 14px 36px rgba(80, 72, 25, 0.08);
}

.legal-contact-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    color: #704c00;
    background: #ffd767;
    border-radius: 16px;
    font-size: 1.3rem;
}

.legal-contact-card h2 {
    margin: 0 0 5px;
    color: #173146;
    font-size: 1.05rem;
}

.legal-contact-card p {
    margin: 0;
    color: #627589;
    font-size: 0.84rem;
    line-height: 1.55;
}

.legal-contact-card > a {
    padding: 11px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #006f6b;
    background: #ffffff;
    border: 1px solid rgba(6, 143, 134, 0.28);
    border-radius: 12px;
    text-decoration: none;
    font-family: "Sora", sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
}

html[data-theme="dark"] .legal-page,
body.dark-mode.legal-page {
    color: #e4f1f3;
}

html[data-theme="dark"] .legal-brand img,
body.dark-mode.legal-page .legal-brand img {
    filter:
        drop-shadow(1px 0 0 rgba(255, 255, 255, .9))
        drop-shadow(-1px 0 0 rgba(255, 255, 255, .9))
        drop-shadow(0 1px 0 rgba(255, 255, 255, .9))
        drop-shadow(0 -1px 0 rgba(255, 255, 255, .9));
}

html[data-theme="dark"] .legal-site-header nav a,
body.dark-mode.legal-page .legal-site-header nav a {
    color: #b8d3d7;
}

html[data-theme="dark"] .legal-document-tabs,
body.dark-mode.legal-page .legal-document-tabs,
html[data-theme="dark"] .legal-viewer-card,
body.dark-mode.legal-page .legal-viewer-card {
    background: rgba(12, 38, 46, 0.92);
    border-color: rgba(126, 170, 179, 0.25);
}

html[data-theme="dark"] .legal-document-tabs > a,
body.dark-mode.legal-page .legal-document-tabs > a {
    color: #b6cbd0;
}

html[data-theme="dark"] .legal-document-tabs > a.is-active,
body.dark-mode.legal-page .legal-document-tabs > a.is-active {
    color: #e9fffc;
    background: linear-gradient(135deg, #163f47, #12343c);
    border-color: rgba(69, 211, 198, 0.34);
}

html[data-theme="dark"] .legal-document-tabs small,
body.dark-mode.legal-page .legal-document-tabs small,
html[data-theme="dark"] .legal-document-header p,
body.dark-mode.legal-page .legal-document-header p {
    color: #9ab4bb;
}

html[data-theme="dark"] .legal-document-header,
body.dark-mode.legal-page .legal-document-header {
    border-bottom-color: rgba(126, 170, 179, 0.22);
}

html[data-theme="dark"] .legal-document-header h2,
body.dark-mode.legal-page .legal-document-header h2 {
    color: #f2fbfc;
}

html[data-theme="dark"] .legal-document-actions a,
body.dark-mode.legal-page .legal-document-actions a {
    color: #a8ede6;
    background: #163a42;
    border-color: #397b7a;
}

html[data-theme="dark"] .legal-document-actions a.is-download,
body.dark-mode.legal-page .legal-document-actions a.is-download {
    color: #12303a;
    background: #ffc52e;
    border-color: #eeb117;
}

html[data-theme="dark"] .legal-pdf-frame,
body.dark-mode.legal-page .legal-pdf-frame {
    background: #08252c;
}

html[data-theme="dark"] .legal-contact-card,
body.dark-mode.legal-page .legal-contact-card {
    background: linear-gradient(135deg, #263715, #102f37 65%);
    border-color: rgba(238, 185, 41, 0.3);
}

html[data-theme="dark"] .legal-contact-card h2,
body.dark-mode.legal-page .legal-contact-card h2 {
    color: #f4fbfc;
}

html[data-theme="dark"] .legal-contact-card p,
body.dark-mode.legal-page .legal-contact-card p {
    color: #a9bdc3;
}

html[data-theme="dark"] .legal-contact-card > a,
body.dark-mode.legal-page .legal-contact-card > a {
    color: #91e8df;
    background: #143941;
    border-color: rgba(87, 213, 201, 0.26);
}

@media (max-width: 840px) {
    .legal-hero {
        grid-template-columns: 1fr;
    }

    .legal-hero-badge {
        width: fit-content;
    }

    .legal-document-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .legal-document-actions {
        width: 100%;
    }

    .legal-document-actions a {
        flex: 1;
    }

    .legal-contact-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .legal-contact-card > a {
        grid-column: 1 / -1;
        justify-content: center;
    }
}

@media (max-width: 680px) {
    .legal-site-header,
    .legal-main {
        width: min(100% - 28px, 1180px);
    }

    .legal-site-header {
        min-height: 76px;
    }

    .legal-brand img {
        width: 142px;
    }

    .legal-site-header nav a {
        min-width: 42px;
        padding: 9px 11px;
    }

    .legal-site-header nav a:not(.legal-login-link) span {
        display: none;
    }

    .legal-main {
        padding-top: 8px;
    }

    .legal-hero {
        min-height: 0;
        padding: 29px 24px;
        border-radius: 22px;
    }

    .legal-hero-copy > p {
        font-size: 0.9rem;
        line-height: 1.65;
    }

    .legal-document-tabs {
        grid-template-columns: 1fr;
    }

    .legal-document-tabs > a {
        min-height: 80px;
    }

    .legal-document-header {
        padding: 16px;
    }

    .legal-document-header > div {
        align-items: flex-start;
    }

    .legal-document-header p {
        display: none;
    }

    .legal-document-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .legal-pdf-frame {
        padding: 6px;
    }

    .legal-pdf-frame object {
        height: 72vh;
        min-height: 520px;
        border-radius: 11px;
    }

    .legal-contact-card {
        padding: 19px;
    }
}

@media (max-width: 430px) {
    .legal-site-header nav .legal-login-link span {
        display: none;
    }

    .legal-contact-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .legal-contact-icon {
        margin: 0 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .legal-page *,
    .legal-page *::before,
    .legal-page *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
