:root {
    color-scheme: dark;
    --bg: #0b1015;
    --bg-deep: #070b10;
    --surface: rgba(20, 27, 36, .9);
    --surface-solid: #141b23;
    --text: #eef2f6;
    --text-soft: #d6dde6;
    --muted: #9aa8b5;
    --subtle: #758493;
    --line: rgba(174, 195, 210, .12);
    --line-strong: rgba(174, 195, 210, .22);
    --accent: #89c7f4;
    --gold: #d4b06a;
    --success: #7bc5a2;
    --danger: #e28d99;
    --shadow: 0 32px 96px rgba(0, 0, 0, .38);
    --display: "Iowan Old Style", "Baskerville", "Times New Roman", ui-serif, serif;
    --body: Inter, "SF Pro Display", "Avenir Next", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; background: var(--bg); }
body { min-width: 320px; min-height: 100%; margin: 0; color: var(--text); background: linear-gradient(180deg, var(--bg-deep), var(--bg) 38%, var(--bg-deep)); font-family: var(--body); line-height: 1.6; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.legal-ambient { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background-image: linear-gradient(rgba(155, 207, 238, .024) 1px, transparent 1px), linear-gradient(90deg, rgba(155, 207, 238, .024) 1px, transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(to bottom, black, transparent 78%); }
.legal-ambient span { position: absolute; border-radius: 50%; filter: blur(10px); }
.legal-ambient span:nth-child(1) { width: 55vw; height: 55vw; left: 4%; top: -40%; background: radial-gradient(circle, rgba(97, 184, 236, .14), transparent 68%); }
.legal-ambient span:nth-child(2) { width: 44vw; height: 44vw; right: -22%; top: 15%; background: radial-gradient(circle, rgba(217, 177, 91, .08), transparent 69%); }
.legal-ambient span:nth-child(3) { width: 48vw; height: 48vw; left: 28%; bottom: -38%; background: radial-gradient(circle, rgba(126, 120, 232, .08), transparent 68%); }

.legal-shell { position: relative; z-index: 1; width: min(100% - 40px, 1280px); margin: 0 auto; }
.legal-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg-deep) 82%, transparent); backdrop-filter: blur(24px) saturate(120%); }
.legal-header__inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.legal-brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.legal-brand__mark { position: relative; width: 29px; height: 31px; flex: 0 0 auto; }
.legal-brand__mark span { position: absolute; top: 5px; width: 14px; height: 21px; border: 1px solid rgba(186, 225, 249, .68); border-radius: 5px; background: linear-gradient(160deg, rgba(180, 225, 252, .12), rgba(55, 107, 139, .02)); }
.legal-brand__mark span:nth-child(1) { left: 0; transform: rotate(-13deg); }
.legal-brand__mark span:nth-child(2) { left: 8px; top: 2px; z-index: 2; height: 25px; border-color: var(--accent); box-shadow: 0 0 18px rgba(112, 198, 250, .12); }
.legal-brand__mark span:nth-child(3) { right: 0; transform: rotate(13deg); }
.legal-brand__name { color: transparent; font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: .045em; background: linear-gradient(105deg, #e6bd67, #fff0bd 20%, #71bce7 43%, #d8efff 56%, #e9c775 77%, #6eb8e2); -webkit-background-clip: text; background-clip: text; }
.legal-header__actions { display: flex; align-items: center; gap: 10px; }
.legal-language { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); }
.legal-language button { min-width: 42px; height: 34px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; font-size: .74rem; font-weight: 760; }
.legal-language button.is-active { color: var(--text); background: rgba(126, 202, 246, .12); box-shadow: inset 0 0 0 1px rgba(126, 202, 246, .14); }
.legal-app-link { min-height: 42px; display: inline-flex; align-items: center; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text-soft); background: rgba(255,255,255,.025); text-decoration: none; font-size: .84rem; font-weight: 680; }
.legal-app-link:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 35%, var(--line-strong)); background: rgba(126, 202, 246, .08); }

.legal-main { padding: 68px 0 96px; }
.legal-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 430px); gap: 42px; align-items: end; padding-bottom: 46px; border-bottom: 1px solid var(--line); }
.legal-eyebrow { display: block; margin-bottom: 16px; color: var(--accent); font-size: .68rem; font-weight: 780; letter-spacing: .17em; text-transform: uppercase; }
.legal-hero h1 { max-width: 840px; margin: 0; font-family: var(--display); font-size: clamp(2.6rem, 6vw, 5.1rem); font-weight: 520; line-height: .96; letter-spacing: -.052em; }
.legal-hero p { max-width: 790px; margin: 22px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.72; }
.legal-meta-card { display: grid; gap: 11px; padding: 21px 22px; border: 1px solid var(--line); border-radius: 18px; color: var(--muted); background: linear-gradient(145deg, rgba(255,255,255,.032), rgba(255,255,255,.012)); box-shadow: inset 0 1px 0 rgba(255,255,255,.025); font-size: .78rem; }
.legal-meta-card span + span { padding-top: 11px; border-top: 1px solid var(--line); }

.legal-state { margin: 38px 0; padding: 22px; border: 1px solid var(--line); border-radius: 16px; color: var(--muted); background: var(--surface); }
.legal-state.is-error { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.legal-layout { display: grid; grid-template-columns: 285px minmax(0, 1fr); gap: 48px; align-items: start; padding-top: 50px; }
.legal-sidebar { min-width: 0; }
.legal-sidebar__sticky { position: sticky; top: 105px; display: grid; gap: 16px; }
.legal-sidebar__label { color: var(--subtle); font-size: .66rem; font-weight: 780; letter-spacing: .16em; text-transform: uppercase; }
.legal-sidebar nav { display: grid; gap: 5px; }
.legal-sidebar nav a { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 9px; align-items: start; padding: 10px 11px; border: 1px solid transparent; border-radius: 11px; color: var(--muted); text-decoration: none; font-size: .78rem; line-height: 1.35; }
.legal-sidebar nav a:hover { color: var(--text-soft); border-color: var(--line); background: rgba(255,255,255,.027); }
.legal-nav-number { color: var(--accent); font-family: var(--display); }
.legal-support-link { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; margin-top: 5px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--text-soft); background: rgba(255,255,255,.02); text-decoration: none; font-size: .78rem; font-weight: 680; }

.legal-documents { min-width: 0; display: grid; gap: 34px; }
.legal-document { scroll-margin-top: 96px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(150deg, rgba(15, 23, 31, .92), rgba(8, 13, 18, .96)); box-shadow: 0 20px 64px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.026); }
.legal-document__header { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 20px; padding: 31px 34px 28px; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 0 0, rgba(113, 193, 240, .08), transparent 38%); }
.legal-document__number { color: var(--gold); font-family: var(--display); font-size: 1.5rem; line-height: 1; }
.legal-document__header h2 { margin: 0; font-family: var(--display); font-size: clamp(1.8rem, 3vw, 2.55rem); font-weight: 540; line-height: 1.06; letter-spacing: -.035em; }
.legal-document__header p { max-width: 820px; margin: 12px 0 0; color: var(--muted); font-size: .87rem; line-height: 1.65; }
.legal-section { padding: 27px 34px 29px 112px; border-bottom: 1px solid var(--line); }
.legal-section:last-child { border-bottom: 0; }
.legal-section h3 { margin: 0 0 16px; color: var(--text-soft); font-family: var(--display); font-size: 1.28rem; font-weight: 590; letter-spacing: -.018em; }
.legal-section p { margin: 0 0 13px; color: var(--muted); font-size: .88rem; line-height: 1.76; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.legal-section li { position: relative; padding-left: 22px; color: var(--muted); font-size: .88rem; line-height: 1.72; }
.legal-section li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 6px; height: 6px; border: 1px solid var(--accent); border-radius: 50%; }
.legal-note { margin-top: 18px; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--gold) 28%, var(--line)); border-radius: 14px; color: var(--text-soft); background: color-mix(in srgb, var(--gold) 6%, transparent); font-size: .84rem; line-height: 1.67; }

.legal-footer { position: relative; z-index: 1; border-top: 1px solid var(--line); color: var(--subtle); }
.legal-footer__inner { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 28px; font-size: .73rem; }

@media (max-width: 980px) {
    .legal-hero { grid-template-columns: 1fr; align-items: start; }
    .legal-meta-card { max-width: 600px; }
    .legal-layout { grid-template-columns: 1fr; gap: 28px; }
    .legal-sidebar__sticky { position: static; }
    .legal-sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .legal-support-link { width: fit-content; }
}

@media (max-width: 680px) {
    .legal-shell { width: min(100% - 24px, 1280px); }
    .legal-header__inner { min-height: 64px; }
    .legal-app-link { display: none; }
    .legal-main { padding: 46px 0 70px; }
    .legal-hero { gap: 28px; padding-bottom: 34px; }
    .legal-hero h1 { font-size: clamp(2.25rem, 12vw, 3.6rem); }
    .legal-hero p { font-size: .9rem; }
    .legal-layout { padding-top: 34px; }
    .legal-sidebar nav { grid-template-columns: 1fr; }
    .legal-document { border-radius: 19px; }
    .legal-document__header { grid-template-columns: 1fr; gap: 12px; padding: 25px 21px 23px; }
    .legal-document__number { font-size: 1.1rem; }
    .legal-section { padding: 23px 21px 25px; }
    .legal-section h3 { font-size: 1.15rem; }
    .legal-section p, .legal-section li { font-size: .84rem; }
    .legal-footer__inner { min-height: 108px; align-items: flex-start; justify-content: center; flex-direction: column; padding: 25px 0; }
}

@media print {
    :root { color-scheme: light; --text: #111; --text-soft: #222; --muted: #333; --subtle: #555; --line: #d8d8d8; }
    body { background: #fff; }
    .legal-ambient, .legal-header, .legal-sidebar, .legal-footer { display: none !important; }
    .legal-shell { width: 100%; }
    .legal-main { padding: 0; }
    .legal-hero { display: block; padding-bottom: 24px; }
    .legal-meta-card { margin-top: 20px; box-shadow: none; }
    .legal-layout { display: block !important; padding-top: 24px; }
    .legal-document { break-before: page; border: 0; box-shadow: none; background: #fff; }
    .legal-document:first-child { break-before: auto; }
    .legal-document__header, .legal-section { padding-left: 0; padding-right: 0; background: #fff; }
}

