.legal-policy {
    color: #1f2937;
}

.legal-policy__meta {
    margin: 0 0 24px;
    color: #6b7280;
}

.legal-policy__lead {
    margin: 0 0 20px;
    font-size: 17px;
    line-height: 1.7;
}

.legal-policy__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 24px 0 32px;
}

.legal-policy__card,
.legal-policy__section {
    border: 1px solid #d9e1ec;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.05);
}

.legal-policy__card {
    padding: 18px 20px;
}

.legal-policy__card h2,
.legal-policy__card h3,
.legal-policy__section h2,
.legal-policy__section h3 {
    margin-top: 0;
}

.legal-policy__card p:last-child,
.legal-policy__section p:last-child {
    margin-bottom: 0;
}

.legal-policy__sections {
    display: grid;
    gap: 16px;
}

.legal-policy__section {
    padding: 24px;
}

.legal-policy__section ul,
.legal-policy__section ol {
    margin: 0;
    padding-left: 20px;
}

.legal-policy__section li + li {
    margin-top: 8px;
}

.legal-policy__table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    overflow: hidden;
}

.legal-policy__table th,
.legal-policy__table td {
    padding: 14px 16px;
    border: 1px solid #d9e1ec;
    vertical-align: top;
    text-align: left;
}

.legal-policy__table thead th {
    background: #eef2f7;
    font-weight: 700;
}

.cookie-preferences-trigger {
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cookie-preferences-trigger:hover {
    color: #4f46e5;
}

.cookie-consent {
    position: fixed;
    inset: 0;
    z-index: 1200;
    pointer-events: none;
}

.cookie-consent[hidden] {
    display: none;
}

.cookie-consent__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cookie-consent.is-visible {
    pointer-events: auto;
}

.cookie-consent.is-visible .cookie-consent__backdrop {
    opacity: 1;
}

.cookie-consent__panel {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: min(560px, calc(100% - 32px));
    border: 1px solid #d9e1ec;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    transform: translateY(24px);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.cookie-consent.is-visible .cookie-consent__panel {
    transform: translateY(0);
    opacity: 1;
}

.legacy-body .cookie-consent__panel {
    bottom: 84px;
}

.cookie-consent__body {
    padding: 22px;
}

.cookie-consent__eyebrow {
    margin: 0 0 6px;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cookie-consent__title {
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.2;
}

.cookie-consent__text {
    margin: 0;
    color: #4b5563;
    line-height: 1.6;
}

.cookie-consent__text a {
    color: #4f46e5;
}

.cookie-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.cookie-consent__button {
    border: 1px solid transparent;
    border-radius: 999px;
    min-height: 42px;
    padding: 0 16px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cookie-consent__button:hover {
    transform: translateY(-1px);
}

.cookie-consent__button--primary {
    background: #4f46e5;
    color: #fff;
}

.cookie-consent__button--primary:hover {
    background: #4338ca;
}

.cookie-consent__button--secondary {
    border-color: #d9e1ec;
    background: #fff;
    color: #1f2937;
}

.cookie-consent__button--secondary:hover {
    background: #eef2f7;
}

.cookie-consent__preferences {
    padding: 0 22px 22px;
    display: grid;
    gap: 12px;
}

.cookie-consent__preferences[hidden] {
    display: none;
}

.cookie-consent__option {
    border: 1px solid #d9e1ec;
    border-radius: 14px;
    background: #f8fafc;
    padding: 14px 16px;
}

.cookie-consent__option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cookie-consent__option-title {
    margin: 0;
    font-size: 16px;
}

.cookie-consent__option p {
    margin: 8px 0 0;
    color: #4b5563;
}

.cookie-consent__toggle {
    width: 18px;
    height: 18px;
}

.cookie-consent__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .cookie-consent__panel,
    .legacy-body .cookie-consent__panel {
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto;
    }

    .legal-policy__section,
    .legal-policy__card,
    .cookie-consent__body,
    .cookie-consent__preferences {
        padding: 18px;
    }

    .legal-policy__table,
    .legal-policy__table tbody,
    .legal-policy__table tr,
    .legal-policy__table th,
    .legal-policy__table td,
    .legal-policy__table thead {
        display: block;
        width: 100%;
    }

    .legal-policy__table thead {
        display: none;
    }

    .legal-policy__table tr + tr {
        margin-top: 12px;
    }

    .legal-policy__table td {
        border-top: 0;
    }

    .legal-policy__table td:first-child {
        border-top: 1px solid #d9e1ec;
        font-weight: 700;
        background: #eef2f7;
    }
}
