/*
 * Shared legal-page styling.
 * The layout prioritizes readable contracts, keyboard navigation, and reliable mobile behavior.
 */
:root {
    --navy: #0a1d2c;
    --navy-2: #132a3a;
    --accent: #087da8;
    --accent-dark: #075f82;
    --ink: #142330;
    --muted: #5d6a75;
    --line: #d9e0e5;
    --surface: #f2f4f5;
    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 7.5rem; }
body {
    margin: 0;
    background: var(--surface);
    color: var(--ink);
    font-family: "Montserrat", sans-serif;
    font-weight: var(--font-regular);
}
a, button { -webkit-tap-highlight-color: transparent; }
.site-container { width: min(1500px, calc(100% - 3rem)); max-width: none; }
.skip-link {
    position: fixed;
    top: .75rem;
    left: .75rem;
    z-index: 1100;
    padding: .7rem 1rem;
    border-radius: 8px;
    background: #fff;
    color: var(--navy);
    font-weight: 700;
    transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

/* The announcement and navigation intentionally match the product-page shell. */
.top-banner {
    overflow: hidden;
    border-bottom: 1px solid rgba(125, 211, 252, .16);
    background: #071a2b;
    color: #eaf4f8;
    font-size: .8125rem;
    font-weight: 500;
}
.top-banner-inner {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: clamp(.8rem, 2vw, 1.5rem);
}
.top-banner-message, .top-banner-link { display: inline-flex; align-items: center; }
.top-banner-message { gap: .55rem; line-height: 1.45; }
.top-banner-message > i { color: #7dd3fc; }
.top-banner-message strong { color: #fff; }
.top-banner-link {
    flex: 0 0 auto;
    gap: .35rem;
    color: #7dd3fc;
    font-weight: 700;
    text-decoration: none;
}
.top-banner-link:hover, .top-banner-link:focus-visible { color: #fff; }

.navbar {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    background: #fff;
}
.navbar-brand { margin-right: 2rem; }
.nav-link {
    padding: .5rem 1rem !important;
    color: var(--navy);
    font-size: .875rem;
    font-weight: 700;
}
.nav-link:hover, .nav-link.active { color: var(--accent); }
.dropdown-menu {
    padding: .5rem;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(20, 35, 48, .1);
    font-size: .875rem;
}
.navbar .dropdown.position-static { position: static !important; }
.mega-menu {
    right: 0;
    left: 0;
    width: 100%;
    margin-top: 0;
    padding: 2rem;
    border-top: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
}
.mega-menu-title, .nav-dropdown-heading {
    display: block;
    color: #64748b;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.mega-menu-title { margin-bottom: 1rem; }
.mega-menu-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .75rem;
    border-radius: 8px;
}
.mega-menu-item:hover { background: var(--surface); }
.mega-menu-icon {
    display: inline-grid;
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: 8px;
    background: #eaf6fd;
    color: #0369a1;
}
.mega-menu-copy { min-width: 0; }
.mega-menu-link {
    display: block;
    color: var(--navy);
    font-size: .9375rem;
    font-weight: 600;
    text-decoration: none;
}
.mega-menu-link:hover { color: var(--accent); }
.mega-menu-desc {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: .8125rem;
}
.nav-dropdown-menu {
    min-width: 17.5rem;
    margin-top: 0;
    padding: .65rem;
    border: 1px solid #e4eaf1;
    border-radius: 12px;
}
.nav-dropdown-heading { padding: .65rem .75rem .45rem; }
.nav-dropdown-menu .dropdown-item {
    padding: .75rem;
    border-radius: 8px;
    color: var(--navy);
    white-space: normal;
}
.nav-dropdown-menu .dropdown-item strong,
.nav-dropdown-menu .dropdown-item small { display: block; }
.nav-dropdown-menu .dropdown-item small {
    margin-top: .2rem;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 500;
}
.nav-dropdown-menu .dropdown-item:hover,
.nav-dropdown-menu .dropdown-item:focus { background: #eef8ff; color: #0369a1; }
.contact-menu { min-width: 19rem; }
.nav-utility {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-left: 1rem;
}
.utility-link {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .62rem .82rem;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--navy);
    font-size: .875rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.utility-link svg { width: 18px; height: 18px; }
.utility-login { border-color: #b9c5cd; background: #fff; }
.utility-register { border-color: var(--accent); background: var(--accent); color: #fff; }
.utility-login:hover, .utility-login:focus-visible { border-color: var(--accent); color: var(--accent-dark); }
.utility-register:hover, .utility-register:focus-visible { background: var(--accent-dark); color: #fff; }

/* The hero provides document identity and dates without distracting from the contract. */
.legal-hero { padding: 1rem 0 0; background: #fff; }
.legal-hero .site-container { width: calc(100% - 1rem); }
.legal-hero-panel {
    display: grid;
    min-height: clamp(340px, 30vw, 460px);
    align-items: end;
    overflow: hidden;
    border-radius: 16px;
    background: var(--navy);
    color: #fff;
}
.legal-hero-copy { padding: clamp(2.5rem, 6vw, 6rem); }
.legal-eyebrow {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin: 0 0 1rem;
    color: #7dd3fc;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.legal-eyebrow::before { width: 32px; height: 2px; content: ""; background: #148db8; }
.legal-hero h1 {
    max-width: 900px;
    margin: 0;
    font-size: clamp(2.25rem, 3.2vw, 3.35rem);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -.045em;
}
.legal-hero-lead {
    max-width: 760px;
    margin: 1.25rem 0 1.75rem;
    color: #c7d5df;
    font-weight: 500;
    line-height: 1.75;
}
.legal-dates {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}
.legal-dates.is-single .legal-date { min-width: 220px; }
.legal-date {
    padding: .75rem 1rem;
    border: 1px solid rgba(125, 211, 252, .24);
    border-radius: 10px;
    background: rgba(255, 255, 255, .04);
}
.legal-date span, .legal-date strong { display: block; }
.legal-date span {
    margin-bottom: .15rem;
    color: #91a8b8;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.legal-date strong { color: #f3f8fb; font-size: .82rem; }

.legal-layout { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.legal-sidebar { position: sticky; top: 7rem; }
.legal-toc {
    padding: 1.4rem;
    border: 1px solid #d4dde2;
    border-radius: 14px;
    background: #fff;
}
.legal-toc-title {
    margin: 0 0 1rem;
    color: #647482;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.legal-toc ol { display: grid; gap: .3rem; margin: 0; padding: 0; list-style: none; }
.legal-toc a {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: .55rem;
    padding: .55rem .6rem;
    border-radius: 7px;
    color: #445766;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}
.legal-toc a:hover, .legal-toc a:focus-visible { background: #eef3f5; color: var(--accent-dark); }
.legal-toc a span { color: var(--accent); font-size: .67rem; letter-spacing: .04em; }
.legal-actions { display: grid; gap: .55rem; margin-top: 1rem; }
.legal-action {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .65rem .8rem;
    border: 1px solid #c9d4db;
    border-radius: 9px;
    background: #fff;
    color: #19364a;
    font-size: .76rem;
    font-weight: 700;
    text-decoration: none;
}
button.legal-action { width: 100%; }
.legal-action:hover, .legal-action:focus-visible { border-color: var(--accent); color: var(--accent-dark); }

.legal-document {
    padding: clamp(1.6rem, 4vw, 4rem);
    border: 1px solid #d4dde2;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(20, 35, 48, .05);
}
.legal-introduction {
    margin-bottom: 1rem;
    padding: 0 0 2rem;
    border-bottom: 1px solid var(--line);
    color: #425767;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.85;
}
.legal-section { padding: 2.4rem 0; border-bottom: 1px solid var(--line); }
.legal-section:last-child { padding-bottom: 0; border-bottom: 0; }
.legal-section-heading {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
}
.legal-number {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid #c9d5dc;
    border-radius: 10px;
    background: #eef3f5;
    color: var(--accent-dark);
    font-size: .72rem;
    font-weight: 700;
}
.legal-section h2 {
    margin: .3rem 0 0;
    color: #10283a;
    font-size: clamp(1.25rem, 1.7vw, 1.55rem);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.25;
}
.legal-section p {
    margin: 0 0 1rem;
    color: #4f6270;
    font-size: .92rem;
    font-weight: 500;
    line-height: 1.8;
}
.legal-section p:last-child { margin-bottom: 0; }
.legal-list {
    display: grid;
    gap: .75rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}
.legal-list li {
    position: relative;
    padding-left: 1.35rem;
    color: #4f6270;
    font-size: .9rem;
    font-weight: 500;
    line-height: 1.75;
}
.legal-list li::before {
    position: absolute;
    top: .72rem;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    content: "";
}
.legal-contact {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin-top: 1.25rem;
}
.legal-contact a, .legal-contact div {
    min-width: 0;
    padding: 1rem;
    border: 1px solid #d8e0e5;
    border-radius: 10px;
    background: #f5f7f8;
    color: #263f51;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
}
.legal-contact i { display: block; margin-bottom: .6rem; color: var(--accent); font-size: 1.1rem; }
.legal-contact a:hover, .legal-contact a:focus-visible { border-color: var(--accent); color: var(--accent-dark); }

/* The footer remains one flat navy surface with the existing accreditation marks. */
.footer {
    padding: clamp(4rem, 7vw, 6rem) 0 1.5rem;
    background: #071a2b;
    color: #fff;
    font-size: .875rem;
}
.footer > .container-fluid { width: min(1560px, calc(100% - 3rem)); max-width: none; padding-right: 0 !important; padding-left: 0 !important; }
.footer-desc { max-width: 430px; margin-bottom: 1.75rem; color: #adbfcd; font-weight: 500; line-height: 1.75; }
.footer-title { margin-bottom: 1.25rem; color: #f4f8fb; font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links li { margin-bottom: .72rem; }
.footer-links a { color: #9fb1c0; font-weight: 500; line-height: 1.45; text-decoration: none; }
.footer-links a:hover, .footer-links a:focus-visible { color: #7dd3fc; }
.footer-contact { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; color: #b8c8d4; font-weight: 500; }
.footer-contact svg { flex-shrink: 0; width: 34px; height: 34px; padding: 7px; border: 1px solid rgba(125, 211, 252, .18); border-radius: 9px; color: #7dd3fc; }
.footer-social { display: flex; gap: .75rem; margin-top: 1.5rem; }
.footer-social a { display: flex; width: 38px; height: 38px; align-items: center; justify-content: center; border: 1px solid rgba(125, 211, 252, .17); border-radius: 9px; color: #c9d7e1; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .1); }
.footer-copyright { max-width: 950px; color: #8499a9; font-size: .8125rem; font-weight: 500; line-height: 1.8; }
.footer-copyright a { color: #9fb1c0; text-decoration: none; }
.footer-badges { display: flex; flex: 0 0 auto; gap: 1rem; }
.footer-accreditation-logo { display: inline-flex; width: 76px; height: 58px; align-items: center; justify-content: center; padding: .4rem; border-radius: 18px; background: #fff; }
.footer-accreditation-logo img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }

@media (min-width: 1200px) {
    .navbar .dropdown:hover > .dropdown-menu,
    .navbar .dropdown:focus-within > .dropdown-menu { display: block; }
}
@media (max-width: 1199.98px) {
    .navbar { padding: .7rem 0; }
    .navbar > .container-fluid { padding-right: 1rem !important; padding-left: 1rem !important; }
    .navbar-brand img { height: 36px; }
    .navbar-toggler { display: inline-grid; width: 44px; height: 44px; place-items: center; border-radius: 10px; }
    .navbar-collapse { max-height: calc(100dvh - 112px); margin-top: .7rem; padding: .7rem 0 1rem; overflow-y: auto; border-top: 1px solid var(--line); }
    .nav-secondary { align-items: stretch !important; flex-direction: column; gap: 0 !important; }
    .nav-link { display: flex; min-height: 46px; align-items: center; justify-content: space-between; }
    .navbar .dropdown.position-static { position: relative !important; }
    .navbar .dropdown-menu, .mega-menu, .nav-dropdown-menu, .contact-menu {
        position: static !important;
        width: 100% !important;
        min-width: 0;
        margin: .2rem 0 .65rem;
        transform: none !important;
        border: 1px solid var(--line);
        border-radius: 10px;
        box-shadow: none;
    }
    .mega-menu > .container-fluid { padding-right: 0 !important; padding-left: 0 !important; }
    .mega-menu [class*="col-"] { width: 100%; margin-bottom: .6rem !important; }
    .nav-utility { width: 100%; margin: .4rem 0 0; padding: .9rem .75rem 0; flex-wrap: wrap; border-top: 1px solid var(--line); }
    .utility-link { flex: 1 1 130px; min-height: 44px; }
    .legal-sidebar { position: static; margin-bottom: 1.25rem; }
    .legal-toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer > .container-fluid { width: min(100% - 2rem, 920px); }
    .footer-bottom { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 767.98px) {
    .site-container { width: min(100% - 1.25rem, 620px); }
    .legal-hero .site-container { width: calc(100% - 1rem); }
    .legal-hero-panel { border-radius: 12px; }
    .legal-hero-copy { padding: 2.6rem 1.4rem; }
    .legal-toc ol { grid-template-columns: 1fr; }
    .legal-document { padding: 1.35rem; border-radius: 12px; }
    .legal-section-heading { grid-template-columns: 38px minmax(0, 1fr); gap: .75rem; }
    .legal-number { width: 36px; height: 36px; }
    .legal-contact { grid-template-columns: 1fr; }
    .footer > .container-fluid { width: min(100% - 1.25rem, 620px); }
}
@media (max-width: 575.98px) {
    .top-banner-inner { justify-content: space-between; min-height: 48px; }
    .top-banner-detail, .top-banner-message > i { display: none; }
    .top-banner-message, .top-banner-link { font-size: .75rem; }
    .navbar > .container-fluid { padding-right: .75rem !important; padding-left: .75rem !important; }
    .navbar-brand img { height: 34px; }
    .legal-hero h1 { font-size: clamp(2rem, 10vw, 2.65rem); }
    .legal-dates { display: grid; grid-template-columns: 1fr 1fr; }
    .legal-dates.is-single { display: block; }
    .legal-dates.is-single .legal-date { display: inline-block; width: 100%; min-width: 0; }
    .legal-section { padding: 1.9rem 0; }
    .footer-badges { width: 100%; }
}
@media print {
    .top-banner, .navbar, .legal-sidebar, .footer { display: none !important; }
    body, .legal-hero, .legal-layout { background: #fff; }
    .legal-hero { padding: 0; }
    .legal-hero .site-container, .site-container { width: 100%; }
    .legal-hero-panel { min-height: 0; border-radius: 0; background: #fff; color: #000; }
    .legal-hero-copy { padding: 0 0 2rem; }
    .legal-eyebrow, .legal-hero-lead, .legal-date span { color: #333; }
    .legal-date { border-color: #aaa; background: #fff; }
    .legal-date strong { color: #000; }
    .legal-layout { padding: 0; }
    .legal-document { padding: 0; border: 0; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
