:root {
    --page-bg: #b4cae8;
    --page-bg-mid: #c9daf0;
    --surface: #f4f8fd;
    --elevated: #ffffff;
    --border: rgba(15, 35, 60, 0.16);
    --accent: #0d5eb3;
    --accent-hover: #0a4d94;
    --text: #0f1a2c;
    --text-muted: #2c3d52;
    --focus: #0a4d94;
    --radius: 14px;
    --radius-lg: 18px;
    --shadow: 0 6px 28px rgba(15, 35, 60, 0.12);
    --disclaimer-bg: rgba(255, 255, 255, 0.55);
    --disclaimer-border: rgba(15, 35, 60, 0.12);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.policy-body {
    margin: 0;
    min-height: 100dvh;
    padding: 1.25rem 1.125rem 0;
    display: flex;
    flex-direction: column;
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--text);
    background: var(--page-bg);
    background-image:
        linear-gradient(165deg, var(--page-bg-mid) 0%, var(--page-bg) 45%, #a8c0e0 100%),
        radial-gradient(ellipse 100% 70% at 50% 0%, rgba(255, 255, 255, 0.45), transparent 55%);
}

.policy-header {
    max-width: 840px;
    margin: 0 auto 1rem;
    padding: 1.35rem 1.25rem;
    text-align: center;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.policy-updated {
    margin: 0 0 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.policy-header h1 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1.25;
}

.policy-main {
    flex: 1 0 auto;
    width: 100%;
    max-width: 840px;
    margin: 0 auto;
    padding: 1.15rem 1.125rem 2rem;
}

.policy-back {
    margin: 0 0 1rem;
}

.policy-back a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    background: var(--elevated);
    border: 2px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.policy-back a:hover {
    background: rgba(13, 94, 179, 0.1);
    border-color: rgba(13, 94, 179, 0.35);
    color: var(--accent);
}

.policy-back a:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.policy-content {
    padding: 1.4rem 1.3rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.policy-content h2 {
    margin: 1.5rem 0 0.65rem;
    padding-bottom: 0.4rem;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--accent);
    border-bottom: 1px solid rgba(13, 94, 179, 0.15);
}

.policy-content h2:first-child {
    margin-top: 0;
}

.policy-content p {
    margin: 0 0 0.85rem;
    color: var(--text);
}

.policy-content ul {
    margin: 0 0 1rem;
    padding-left: 1.35rem;
}

.policy-content li {
    margin: 0.4rem 0;
    color: var(--text);
}

.policy-content li::marker {
    color: var(--accent);
}

.policy-content a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.policy-content a:hover {
    color: var(--accent-hover);
}

.policy-content code {
    padding: 0.15em 0.45em;
    font-size: 0.88em;
    font-family: ui-monospace, "Cascadia Code", monospace;
    color: var(--text);
    background: rgba(13, 94, 179, 0.08);
    border: 1px solid rgba(13, 94, 179, 0.12);
    border-radius: 6px;
}

.policy-content strong {
    font-weight: 700;
    color: var(--text);
}

.policy-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    max-width: 840px;
    margin: 0 auto;
    padding: 1.5rem 1.125rem 2.25rem;
    text-align: center;
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.policy-footer p {
    margin: 0;
    width: 100%;
    max-width: 44rem;
    padding: 0.9rem 1.1rem;
    background: var(--disclaimer-bg);
    border: 1px solid var(--disclaimer-border);
    border-radius: var(--radius);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.policy-footer__ai {
    font-size: 0.8125rem;
    line-height: 1.5;
}

.policy-footer a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.policy-footer a:hover {
    color: var(--accent-hover);
}

.chat-icon {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, background 0.2s ease;
}

.chat-icon:hover {
    transform: scale(1.06);
    background: var(--accent-hover);
}

.chat-icon:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.chat-icon img {
    width: 26px;
    height: 26px;
}

@media (min-width: 480px) {
    .policy-body {
        padding: 1.65rem 1.5rem 0;
    }

    .policy-header {
        padding: 1.5rem 1.5rem;
    }

    .policy-header h1 {
        font-size: 1.75rem;
    }

    .policy-main {
        padding: 1.35rem 1.5rem 2.25rem;
    }

    .policy-content {
        padding: 1.55rem 1.45rem;
    }

    .policy-content h2 {
        font-size: 1.15rem;
    }
}

@media (min-width: 640px) {
    .policy-header,
    .policy-main,
    .policy-footer {
        max-width: 900px;
    }
}

@media (max-width: 600px) {
    .chat-icon {
        width: 48px;
        height: 48px;
    }

    .chat-icon img {
        width: 22px;
        height: 22px;
    }
}
