:root {
    color-scheme: light;
    --legal-navy: #081b33;
    --legal-blue: #0f5fa8;
    --legal-cyan: #13a8a8;
    --legal-ink: #15253b;
    --legal-muted: #65758b;
    --legal-line: #dbe5ef;
    --legal-card: rgba(255, 255, 255, .94);
    --legal-bg: #eef4f9;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 280px;
    color: var(--legal-ink);
    background:
        radial-gradient(circle at 5% 0%, rgba(19, 168, 168, .11), transparent 27rem),
        radial-gradient(circle at 100% 10%, rgba(15, 95, 168, .12), transparent 34rem),
        var(--legal-bg);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
}

a { color: var(--legal-blue); text-underline-offset: 3px; }
.legal-header {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    padding: 12px clamp(20px, 5vw, 82px);
    border-bottom: 1px solid rgba(219, 229, 239, .92);
    background: rgba(248, 251, 254, .88);
    box-shadow: 0 8px 30px rgba(14, 35, 61, .05);
    backdrop-filter: blur(14px);
}
.legal-brand { display: inline-flex; align-items: center; }
.legal-brand img { display: block; width: 208px; max-height: 50px; }
.legal-nav { display: flex; align-items: center; gap: 8px; }
.legal-nav a {
    padding: 10px 14px;
    border-radius: 11px;
    color: #53657d;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}
.legal-nav a:hover, .legal-nav a.is-active { color: #fff; background: var(--legal-navy); }
.legal-nav .legal-home-link { color: var(--legal-blue); background: #e5f0fb; }

.legal-shell { width: min(1240px, calc(100% - 36px)); margin: 42px auto 72px; }
.legal-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(30px, 5vw, 58px);
    border-radius: 26px;
    color: #fff;
    background: linear-gradient(135deg, #07182e 0%, #0b3158 58%, #0b777d 120%);
    box-shadow: 0 28px 70px rgba(6, 29, 54, .20);
}
.legal-hero::after {
    position: absolute;
    right: -90px;
    bottom: -130px;
    width: 390px;
    height: 390px;
    border: 58px solid rgba(255, 255, 255, .05);
    border-radius: 50%;
    content: "";
}
.legal-kicker { position: relative; z-index: 1; color: #6ee7df; font-size: 12px; font-weight: 900; letter-spacing: .16em; }
.legal-hero h1 { position: relative; z-index: 1; max-width: 820px; margin: 12px 0 10px; font-size: clamp(34px, 6vw, 64px); line-height: 1.04; letter-spacing: -.045em; }
.legal-hero > p { position: relative; z-index: 1; max-width: 760px; margin: 0; color: #c8d8ea; font-size: clamp(15px, 2vw, 19px); }
.legal-meta { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.legal-meta span { padding: 8px 12px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 999px; color: #dae8f5; background: rgba(255, 255, 255, .07); font-size: 12px; font-weight: 700; }
.legal-meta a { color: #fff; }

.legal-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 26px; }
.legal-toc {
    position: sticky;
    top: 102px;
    display: grid;
    gap: 3px;
    padding: 18px;
    border: 1px solid var(--legal-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .75);
    box-shadow: 0 14px 32px rgba(17, 43, 71, .06);
}
.legal-toc strong { margin: 0 0 8px 10px; color: var(--legal-navy); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.legal-toc a { padding: 8px 10px; border-radius: 9px; color: #617289; font-size: 13px; font-weight: 700; text-decoration: none; }
.legal-toc a:hover { color: var(--legal-blue); background: #eaf3fb; }
.legal-card { padding: clamp(24px, 4vw, 48px); border: 1px solid var(--legal-line); border-radius: 22px; background: var(--legal-card); box-shadow: 0 20px 50px rgba(17, 43, 71, .08); }
.legal-card section { position: relative; scroll-margin-top: 105px; padding: 4px 0 34px 58px; border-bottom: 1px solid var(--legal-line); }
.legal-card section + section { padding-top: 34px; }
.legal-card section:last-child { padding-bottom: 0; border-bottom: 0; }
.legal-number { position: absolute; top: 5px; left: 0; display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(135deg, var(--legal-blue), var(--legal-cyan)); font-size: 12px; font-weight: 900; box-shadow: 0 8px 18px rgba(15, 95, 168, .22); }
.legal-card section + section .legal-number { top: 35px; }
.legal-card h2 { margin: 0 0 14px; color: var(--legal-navy); font-size: clamp(21px, 3vw, 28px); line-height: 1.2; letter-spacing: -.025em; }
.legal-card h3 { margin: 0 0 6px; color: var(--legal-navy); font-size: 15px; }
.legal-card p { margin: 0 0 14px; color: #53657b; }
.legal-card p:last-child { margin-bottom: 0; }
.legal-card ul { margin: 0; padding-left: 21px; color: #53657b; }
.legal-card li + li { margin-top: 8px; }
.legal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.legal-grid > div { padding: 18px; border: 1px solid var(--legal-line); border-radius: 14px; background: #f8fbfe; }
.legal-grid p { margin: 0; font-size: 13px; }
.legal-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 20px; }
.legal-details div { padding: 14px 16px; border: 1px solid var(--legal-line); border-radius: 13px; background: #f8fbfe; }
.legal-details dt { color: #75859a; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; }
.legal-details dd { margin: 5px 0 0; color: var(--legal-navy); font-size: 14px; font-weight: 800; overflow-wrap: anywhere; }
.legal-table-wrap { overflow-x: auto; margin: 4px 0 17px; border: 1px solid var(--legal-line); border-radius: 14px; }
.legal-table-wrap table { width: 100%; min-width: 680px; border-collapse: collapse; }
.legal-table-wrap th, .legal-table-wrap td { padding: 14px 16px; border-bottom: 1px solid var(--legal-line); text-align: left; vertical-align: top; font-size: 13px; }
.legal-table-wrap th { color: var(--legal-navy); background: #edf5fb; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.legal-table-wrap tr:last-child td { border-bottom: 0; }

.legal-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px clamp(20px, 5vw, 82px); color: #8a9aaf; background: var(--legal-navy); font-size: 12px; }
.legal-footer div { display: flex; gap: 18px; }
.legal-footer a { color: #c8d8ea; font-weight: 700; text-decoration: none; }

@media (max-width: 900px) {
    .legal-header { position: relative; align-items: flex-start; gap: 14px; }
    .legal-nav { flex-wrap: wrap; justify-content: flex-end; }
    .legal-layout { grid-template-columns: 1fr; }
    .legal-toc { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .legal-toc strong { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .legal-header { flex-direction: column; padding: 14px 18px; }
    .legal-brand img { width: 180px; }
    .legal-nav { width: 100%; justify-content: flex-start; }
    .legal-nav a { padding: 8px 9px; font-size: 11px; }
    .legal-shell { width: min(100% - 20px, 1240px); margin-top: 14px; }
    .legal-hero { padding: 28px 22px; border-radius: 18px; }
    .legal-toc { grid-template-columns: 1fr 1fr; padding: 12px; }
    .legal-card { padding: 24px 18px; border-radius: 18px; }
    .legal-card section, .legal-card section + section { padding-left: 0; padding-top: 62px; }
    .legal-card section:first-child { padding-top: 58px; }
    .legal-number, .legal-card section + section .legal-number { top: 12px; }
    .legal-grid, .legal-details { grid-template-columns: 1fr; }
    .legal-footer { align-items: flex-start; flex-direction: column; }
    .legal-footer div { flex-direction: column; gap: 7px; }
}

/* Legal pages are standalone documents; keep legacy application rules out. */
html.legal-page{min-width:280px;background:var(--legal-bg)}
body.legal-page{width:100%;min-width:0;max-width:none;overflow-x:hidden}
.legal-page *{box-sizing:border-box}
.legal-page img{display:block;max-width:100%;height:auto}
.legal-page button,.legal-page input,.legal-page textarea{font:inherit}
.legal-page a{white-space:normal;overflow-wrap:anywhere}
.legal-brand{min-width:0;max-width:100%;flex:0 1 auto}
.legal-brand img{width:min(208px,48vw);height:auto;max-height:50px;object-fit:contain;object-position:left center}
.legal-nav{min-width:0;max-width:100%}
.legal-shell{min-width:0}
.legal-hero h1,.legal-hero p,.legal-card h2,.legal-card p,.legal-card li{overflow-wrap:anywhere}
.legal-card{min-width:0}
.legal-card section{min-width:0}
.legal-table-wrap{max-width:100%}
.legal-table-wrap table{display:table}
@media(max-width:900px){.legal-header{min-width:0}.legal-nav{flex:1 1 auto}.legal-toc{min-width:0}}
@media(max-width:640px){.legal-brand img{width:min(180px,78vw)}.legal-nav a{white-space:normal}.legal-meta span{max-width:100%}.legal-card section{overflow:hidden}}
