:root {
    --primary: #003366;
    --legal-ink: #172b43;
    --legal-muted: #5d6b7d;
    --legal-border: #dce4ec;
    --legal-teal: #147d92;
    color-scheme: light;
    scroll-padding-top: 96px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }

.legal-page {
    background: #fff;
    color: var(--legal-ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

.legal-page a { color: var(--primary); text-underline-offset: 4px; }
.legal-page a:hover { text-decoration: underline; }
.legal-page :focus-visible { outline: 3px solid var(--legal-teal); outline-offset: 4px; }
.legal-page button { font: inherit; cursor: pointer; }
.legal-container { width: min(1184px, calc(100% - 40px)); margin-inline: auto; }

.legal-skip {
    position: fixed;
    top: 8px;
    left: 12px;
    z-index: 20;
    padding: 10px 16px;
    background: #fff;
    border: 2px solid var(--primary);
    border-radius: 6px;
    transform: translateY(-160%);
}
.legal-skip:focus { transform: translateY(0); }

.legal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    border-bottom: 1px solid var(--legal-border);
}
.legal-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 80px; }
.legal-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 800; line-height: 1.1; text-decoration: none; }
.legal-brand img { flex: 0 0 auto; }
.legal-brand-caption { display: block; margin-top: 7px; color: var(--legal-muted); font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.legal-header-links { display: flex; align-items: center; gap: 28px; }
.legal-header-links a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; font-size: 13px; font-weight: 600; text-decoration: none; }
.legal-header-links .legal-home-link { color: var(--legal-muted); }
.legal-header-links .legal-signin { display: none; border: 1px solid var(--legal-border); border-radius: 8px; padding: 0 18px; }

.legal-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 36px 0 0;
    background: #092c50;
    color: #fff;
}
.legal-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 440px;
    height: 440px;
    top: -180px;
    right: -240px;
    border: 1px solid #31516f;
    border-radius: 50%;
    box-shadow: 0 0 0 64px #ffffff04, 0 0 0 128px #ffffff03;
    pointer-events: none;
}
.legal-eyebrow { display: block; color: #b7dce6; font-size: 11px; font-weight: 700; letter-spacing: .16em; }
.legal-hero h1 { margin: 14px 0 20px; font-size: clamp(32px, 5vw, 52px); font-weight: 700; line-height: 1.15; letter-spacing: -.035em; overflow-wrap: anywhere; }
.legal-document-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding-bottom: 28px; }
.legal-updated { margin: 0; color: #d2deeb; font-size: 13px; line-height: 1.8; }
.legal-page .legal-print { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid #5f7790; border-radius: 7px; padding: 8px 14px; background: transparent; color: #fff; font-size: 12px; font-weight: 600; }
.legal-print:hover { background: #ffffff0d; }
.legal-hero :focus-visible { outline-color: #b7e7ed; }
.legal-documents { display: flex; flex-wrap: wrap; gap: 0 16px; border-top: 1px solid #395570; }
.legal-documents a { position: relative; display: flex; align-items: center; min-height: 56px; padding: 12px 0; color: #d2deeb; font-size: 12px; font-weight: 500; text-decoration: none; }
.legal-documents a[aria-current="page"] { color: #fff; }
.legal-documents a[aria-current="page"]::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: #81d2dc; border-radius: 3px 3px 0 0; }
.legal-tab-detail { display: none; }

.legal-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 32px; padding-block: 28px 48px; }
.tc-toc { min-width: 0; overflow: hidden; border: 1px solid var(--legal-border); border-radius: 10px; background: #f8fafc; }
.tc-toc summary { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 60px; padding: 16px 40px 16px 18px; color: var(--legal-ink); font-size: 14px; font-weight: 700; list-style: none; cursor: pointer; }
.tc-toc summary::-webkit-details-marker { display: none; }
.tc-toc summary::after { content: ""; position: absolute; top: 25px; right: 20px; width: 7px; height: 7px; border: solid var(--legal-muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.tc-toc[open] summary::after { top: 28px; transform: rotate(225deg); }
.tc-toc summary:focus-visible { outline-offset: -4px; border-radius: 8px; }
.legal-contents-count { color: var(--legal-muted); font-size: 11px; font-weight: 500; }
.legal-toc-links { padding: 0 8px 12px; }
.tc-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: legal-section; }
.tc-toc li { counter-increment: legal-section; }
.tc-toc a { display: flex; align-items: baseline; gap: 10px; min-height: 44px; padding: 10px; border-radius: 6px; color: var(--legal-muted); font-size: 13px; line-height: 1.5; text-decoration: none; }
.tc-toc a::before { content: counter(legal-section, decimal-leading-zero); flex: 0 0 20px; color: var(--legal-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.tc-toc a:hover, .tc-toc a[aria-current="location"] { background: #e8f1f6; color: var(--primary); }
.tc-toc a[aria-current="location"] { box-shadow: inset 3px 0 var(--legal-teal); font-weight: 600; }

.legal-article { min-width: 0; overflow-wrap: anywhere; }
.tc-section { padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid #e7edf3; scroll-margin-top: 16px; }
.tc-section:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.tc-section h2 { margin: 0 0 18px; color: #102e4b; font-size: 22px; font-weight: 650; line-height: 1.4; letter-spacing: -.025em; }
.tc-section h3 { margin: 24px 0 12px; font-size: 18px; line-height: 1.5; }
.tc-section p { margin: 0 0 16px; }
.tc-section ul, .tc-section ol { margin: 0 0 20px; padding-left: 24px; }
.tc-section li { padding-left: 4px; margin-bottom: 10px; }
.tc-section li::marker { color: var(--legal-teal); }
.tc-section strong { font-weight: 650; color: #122a43; }
.tc-section a { text-decoration: underline; text-decoration-color: #b2c4d6; text-decoration-thickness: 1px; }
.tc-section a:hover { text-decoration-color: currentColor; }
.tc-section > :last-child { margin-bottom: 0; }

.cookie-table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--legal-border); border-radius: 10px; }
.cookie-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 14px; line-height: 1.6; }
.cookie-table th { padding: 16px; background: #edf4f8; color: var(--primary); text-align: left; font-size: 12px; font-weight: 700; }
.cookie-table td { padding: 18px 16px; vertical-align: top; border-top: 1px solid var(--legal-border); }
.cookie-table th:first-child { width: 22%; }
.cookie-table tr:nth-child(even) td { background: #f8fafc; }
.badge-session, .badge-persist { display: inline-block; padding: 3px 9px; border: 1px solid #c8dee7; border-radius: 6px; background: #edf6fa; color: #24576c; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-persist { border-color: #cbe2dc; background: #edf7f3; color: #27634f; }

.legal-help { display: flex; align-items: flex-start; flex-direction: column; gap: 20px; margin-bottom: 48px; padding: 28px; border: 1px solid var(--legal-border); border-radius: 12px; background: #f5f8fb; }
.legal-help .legal-eyebrow { color: var(--legal-teal); }
.legal-help h2 { margin: 8px 0; color: var(--primary); font-size: 22px; line-height: 1.4; letter-spacing: -.02em; }
.legal-help p { margin: 0; color: var(--legal-muted); font-size: 14px; }
.legal-contact-link { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 46px; padding: 10px 18px; border: 1px solid var(--legal-border); border-radius: 7px; background: #fff; font-size: 13px; font-weight: 600; text-decoration: none; }

.legal-footer { border-top: 1px solid var(--legal-border); background: #f8fafc; }
.legal-footer-top { display: flex; justify-content: space-between; gap: 20px; padding-block: 28px 22px; }
.legal-footer-brand { font-size: 23px; font-weight: 750; line-height: 1.3; text-decoration: none; }
.legal-footer-brand span { display: block; max-width: 170px; margin-top: 8px; color: var(--legal-muted); font-size: 12px; font-weight: 400; }
.legal-back-top { display: inline-flex; align-items: center; align-self: flex-start; gap: 8px; min-height: 44px; font-size: 12px; text-decoration: none; white-space: nowrap; }
.legal-footer-bottom { display: flex; flex-direction: column; gap: 12px; padding-block: 20px 28px; border-top: 1px solid var(--legal-border); color: var(--legal-muted); font-size: 12px; }
.legal-footer-bottom p { margin: 0; }
.legal-footer-bottom nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.legal-footer-bottom a { display: inline-flex; align-items: center; min-height: 44px; color: var(--legal-muted); text-decoration: none; }

@media (min-width: 600px) {
    .legal-container { width: min(1184px, calc(100% - 64px)); }
    .legal-header-links .legal-signin { display: inline-flex; }
    .legal-hero { padding-top: 48px; }
    .legal-hero::before { top: -230px; right: -40px; width: 600px; height: 600px; }
    .legal-document-meta { justify-content: space-between; padding-bottom: 36px; }
    .legal-documents { gap: 32px; }
    .legal-documents a { font-size: 14px; min-height: 60px; }
    .legal-tab-detail { display: inline; }
    .legal-layout { gap: 40px; padding-block: 40px 64px; }
    .tc-section h2 { font-size: 25px; }
    .legal-help { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; padding: 32px; }
    .legal-contact-link { flex-shrink: 0; }
}

@media (min-width: 1024px) {
    .legal-layout { grid-template-columns: 272px minmax(0, 1fr); gap: 56px; padding-block: 52px 72px; }
    .tc-toc { position: sticky; top: 104px; }
    .legal-toc-links { max-height: calc(100vh - 200px); max-height: calc(100dvh - 200px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
    .legal-article { max-width: 784px; }
    .tc-section { padding-bottom: 36px; margin-bottom: 36px; }
    .legal-footer-bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (max-height: 480px) {
    .legal-header { position: relative; }
    .tc-toc { position: static; }
    .legal-toc-links { max-height: none; overflow: visible; }
    :root { scroll-padding-top: 24px; }
}

@media (prefers-reduced-motion: no-preference) {
    .legal-page a, .legal-page button { transition: color .15s, background-color .15s; }
}

@media (forced-colors: active) {
    .legal-documents a[aria-current="page"] { border-bottom: 3px solid LinkText; }
    .tc-toc a[aria-current="location"] { outline: 1px solid Highlight; outline-offset: -2px; }
}

@media print {
    :root { scroll-padding-top: 0; }
    .legal-page { color: #000; background: #fff; font-size: 11pt; }
    .legal-container { width: 100%; max-width: none; }
    .legal-header, .legal-skip, .legal-documents, .legal-print, .tc-toc, .legal-help, .legal-footer { display: none !important; }
    .legal-hero { padding: 0 0 20px; color: #000; background: #fff; border-bottom: 1px solid #aaa; }
    .legal-hero::before { display: none; }
    .legal-hero .legal-eyebrow, .legal-updated { color: #333; }
    .legal-hero h1 { font-size: 26pt; }
    .legal-document-meta { padding: 0; }
    .legal-layout { display: block; padding: 24px 0 0; }
    .legal-article { max-width: none; }
    .tc-section { margin-bottom: 24px; padding-bottom: 20px; }
    .tc-section h2 { break-after: avoid; font-size: 16pt; }
    .tc-section p, .tc-section li { orphans: 3; widows: 3; }
    .cookie-table-wrap { overflow: visible; }
    .cookie-table { min-width: 0; font-size: 9pt; }
    .cookie-table tr { break-inside: avoid; }
    .cookie-table th, .cookie-table td { padding: 8px; }
}
