:root {
    color-scheme: light;
    --page-ink: #172033;
    --page-muted: #667085;
    --page-accent: #3867f5;
    --page-accent-soft: #edf2ff;
    --page-line: #e7eaf0;
    --page-surface: #ffffff;
}

* { box-sizing: border-box; }

body.legal-page,
body.contact-page {
    min-height: 100vh;
    margin: 0;
    color: var(--page-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    background: linear-gradient(135deg, #f4f7ff 0%, #f9fbff 48%, #f6f9ff 100%);
}

.legal-document {
    width: min(100% - 32px, 820px);
    margin: 0 auto;
    padding: 56px 0 64px;
}

.legal-document::before {
    display: block;
    width: 44px;
    height: 5px;
    margin-bottom: 18px;
    content: "";
    border-radius: 999px;
    background: var(--page-accent);
}

.legal-document h4 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 5vw, 2.6rem);
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: -.035em;
}

.legal-document h4 + p {
    padding-bottom: 26px;
    color: var(--page-muted);
    font-size: 1.04rem;
}

.legal-document h5 {
    margin: 34px 0 12px;
    padding-top: 24px;
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.4;
    border-top: 1px solid var(--page-line);
}

.legal-document p {
    margin: 0 0 14px;
    color: #475467;
    font-size: 0.98rem;
    line-height: 1.8;
}

.legal-document p:not(:has(+ p)):last-child { margin-bottom: 0; }

.legal-document p strong { color: var(--page-ink); }

.legal-document p:has(+ p):not(:has(strong)) { }

.legal-document a {
    color: #2454df;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.legal-document > p {
    padding-inline: 28px;
}

.legal-document > h4,
.legal-document > h5 { padding-inline: 28px; }

.legal-document > p:first-of-type {
    padding-top: 28px;
    border-radius: 18px 18px 0 0;
}

.legal-document > p:last-child {
    padding-bottom: 28px;
    border-radius: 0 0 18px 18px;
}

.legal-document > p,
.legal-document > h5 {
    background: var(--page-surface);
}

.legal-document > h5 + p { padding-top: 4px; }

.legal-document > p + p { margin-top: -14px; padding-top: 14px; }

.contact-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 28px 16px;
}

.contact-card {
    width: min(100%, 620px);
    padding: clamp(34px, 7vw, 62px);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 28px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 20px 60px rgba(45, 78, 150, .13);
}

.contact-icon {
    display: grid;
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    place-items: center;
    color: #fff;
    border-radius: 20px;
    background: linear-gradient(135deg, #5b7cfa, #3156df);
    box-shadow: 0 10px 20px rgba(49, 86, 223, .25);
}

.contact-card h1 {
    margin: 0;
    font-size: clamp(2rem, 6vw, 2.7rem);
    line-height: 1.15;
    letter-spacing: -.035em;
}

.contact-card > p {
    max-width: 420px;
    margin: 16px auto 30px;
    color: var(--page-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.contact-email {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 12px 20px;
    color: #2346bc;
    font-size: clamp(1rem, 4vw, 1.15rem);
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
    border: 1px solid #dce5ff;
    border-radius: 14px;
    background: #f4f7ff;
    transition: transform .2s ease, background-color .2s ease;
}

.contact-email:hover {
    color: #173ba8;
    text-decoration: none;
    background: #eaf0ff;
    transform: translateY(-2px);
}

.contact-note {
    margin: 22px 0 0;
    color: #98a2b3;
    font-size: .88rem;
}

@media (max-width: 560px) {
    .legal-document { width: min(100% - 24px, 820px); padding: 36px 0 44px; }
    .legal-document > p, .legal-document > h4, .legal-document > h5 { padding-inline: 20px; }
    .legal-document p { font-size: .95rem; line-height: 1.72; }
    .legal-document h5 { margin-top: 26px; padding-top: 20px; }
    .contact-card { border-radius: 22px; }
}
