:root {
    color-scheme: dark;
    --cidama-bg-deep: #050B13;
    --cidama-bg: #081321;
    --cidama-surface: #0E1B2A;
    --cidama-surface-elevated: #142338;
    --cidama-border: #24364D;
    --cidama-text: #F4F7FB;
    --cidama-text-secondary: #B7C1CF;
    --cidama-text-muted: #8491A4;
    --cidama-blue: #6876F5;
    --cidama-cyan: #36C8C5;
    --cidama-gradient: linear-gradient(135deg, #6876F5 0%, #36C8C5 100%);
}

* { box-sizing: border-box; }
html { background: var(--cidama-bg-deep); }
body {
    min-width: 0;
    margin: 0;
    background: radial-gradient(circle at 50% -8rem, rgba(104,118,245,.14), transparent 32rem), var(--cidama-bg-deep);
    color: var(--cidama-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}
a { color: var(--cidama-cyan); text-decoration-thickness: .08em; text-underline-offset: .22em; }
a:hover { color: #7ADAD8; text-decoration-thickness: .13em; }
a:focus-visible { outline: 3px solid rgba(54,200,197,.48); outline-offset: 4px; border-radius: 5px; }
.legal-shell { width: min(calc(100% - 40px), 780px); margin-inline: auto; }
.legal-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: max(30px, env(safe-area-inset-top)) 0 24px; }
.legal-header.legal-header-sticky {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: clamp(12px, 4vw, 24px);
    padding: max(10px, calc(env(safe-area-inset-top) + 10px)) 0 10px;
    border-bottom: 1px solid rgba(183,193,207,.12);
    background: rgba(5,11,19,.94);
    box-shadow: 0 10px 24px rgba(5,11,19,.2);
    backdrop-filter: blur(14px);
}
.legal-brand { display: grid; gap: 3px; color: var(--cidama-text); text-decoration: none; }
.legal-brand strong { color: var(--cidama-cyan); font-size: 13px; font-weight: 900; letter-spacing: .25em; }
.legal-brand span { color: var(--cidama-text-muted); font-size: 12px; letter-spacing: 0; }
.legal-back { min-height: 44px; display: inline-flex; align-items: center; flex: 0 0 auto; color: var(--cidama-text-secondary); font-size: 13px; font-weight: 750; }
.legal-main { padding-bottom: 44px; }
.legal-card { padding: clamp(24px, 5vw, 46px); border: 1px solid var(--cidama-border); border-radius: 24px; background: rgba(14,27,42,.92); box-shadow: 0 22px 60px rgba(0,0,0,.22); }
h1, h2 { color: var(--cidama-text); line-height: 1.2; letter-spacing: -.025em; }
h1 { margin: 0 0 8px; font-size: clamp(2.25rem, 6vw, 3rem); }
h2 { margin: 2.15em 0 .7em; font-size: clamp(1.22rem, 3.5vw, 1.55rem); }
p, address, ul { margin: 0 0 1em; }
p, li, address { color: var(--cidama-text-secondary); }
address { padding: 2px 0 2px 15px; border-left: 2px solid var(--cidama-border); font-style: normal; }
ul { padding-left: 1.3em; }
li + li { margin-top: .3em; }
.legal-card section { padding-top: 2px; }
.legal-card section + section { margin-top: 36px; padding-top: 30px; border-top: 1px solid rgba(183,193,207,.12); }
.legal-card section h2 { margin-top: 0; }
.legal-date { color: var(--cidama-text-muted); font-size: .875rem; }
.legal-lead { color: var(--cidama-text); font-size: 1.08rem; }
.legal-email { display: inline-block; font-weight: 800; }
.legal-footer { padding: 0 0 max(32px, env(safe-area-inset-bottom)); color: var(--cidama-text-muted); text-align: center; }
.legal-footer nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 9px; min-height: 52px; padding-top: 18px; border-top: 1px solid rgba(183,193,207,.12); }
.legal-footer a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px; color: var(--cidama-text-muted); }
.legal-footer a[aria-current="page"] { color: var(--cidama-cyan); font-weight: 800; text-decoration: none; }

@media (max-width: 600px) {
    .legal-shell { width: min(calc(100% - 32px), 780px); }
    .legal-header { display: grid; align-items: start; gap: 14px; padding-bottom: 20px; }
    .legal-header.legal-header-sticky { display: flex; align-items: center; padding-bottom: 10px; }
    .legal-header-sticky .legal-brand span { display: none; }
    .legal-back { justify-self: start; }
    .legal-card { padding: 25px 20px; border-radius: 21px; }
    h1 { font-size: clamp(2.05rem, 11vw, 2.7rem); }
    h2 { font-size: 1.3rem; }
    .legal-card section + section { margin-top: 30px; padding-top: 25px; }
}

@media (max-width: 359px) {
    .legal-shell { width: min(calc(100% - 24px), 780px); }
    .legal-card { padding-inline: 17px; }
}

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

@media print {
    :root { color-scheme: light; }
    body { background: white; color: black; font-size: 11pt; }
    .legal-shell { width: 100%; }
    .legal-header { padding-top: 0; }
    .legal-header.legal-header-sticky { position: static; padding-top: 0; border-bottom: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
    .legal-card { padding: 0; border: 0; box-shadow: none; }
    p, li, address, a { color: black; }
    .legal-back, .legal-footer { display: none; }
}
