/* ==========================================================================
   Legal & POPIA — shared with Terms & Conditions via the same class names
   ========================================================================== */

.legal-section { position: relative; }

.legal-head {
    max-width: 44rem;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

/* ---------- Compliance form cards ---------- */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1.25rem, 2.5vw, 1.875rem);
}

.document-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.document-icon {
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    margin-bottom: 1.25rem;
    border-radius: var(--r-md);
    background: linear-gradient(145deg, rgba(156, 204, 81, 0.28), rgba(83, 134, 101, 0.16));
    border: 1px solid rgba(156, 204, 81, 0.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    color: var(--ngp-forest);
}

.document-title {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 0.6875rem;
}

.document-description {
    flex: 1;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--ink-muted);
    margin-bottom: 1.75rem;
}

/* ---------- Policy prose ---------- */
.legal-policy::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(36rem 26rem at 82% 12%, rgba(156, 204, 81, 0.18), transparent 66%),
        linear-gradient(180deg, rgba(238, 243, 236, 0.7), rgba(250, 248, 242, 0.3));
}

.policy-prose { max-width: 54rem; }

.policy-block + .policy-block {
    margin-top: 2.25rem;
    padding-top: 2.25rem;
    border-top: 1px solid rgba(83, 134, 101, 0.16);
}

.policy-heading {
    font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
    font-weight: 600;
    margin-bottom: 0.875rem;
}

.policy-text {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--ink-muted);
}

.policy-text + .policy-text { margin-top: 0.875rem; }
.policy-text strong { color: var(--ngp-forest); font-weight: 600; }
.policy-text-top { margin-top: 1.125rem; }
.policy-text-sm { margin-top: 1rem; font-size: 0.8125rem; color: var(--ink-soft); }

.policy-link {
    color: var(--ngp-sage);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(83, 134, 101, 0.38);
    transition: color var(--t-fast), border-color var(--t-fast);
}

.policy-link:hover { color: var(--ngp-forest); border-color: var(--ngp-forest); }

/* ---------- Cookie categories ---------- */
.cookie-category {
    margin-top: 1.5rem;
    padding: 1.25rem 1.375rem;
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(83, 134, 101, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.625rem;
}

.cookie-category-name {
    font-size: 0.9375rem;
    font-weight: 600;
}

.cookie-badge {
    padding: 0.3125rem 0.75rem;
    border-radius: var(--r-pill);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    white-space: nowrap;
}

.cookie-badge-required {
    background: rgba(83, 134, 101, 0.16);
    border: 1px solid rgba(83, 134, 101, 0.35);
    color: var(--ngp-forest);
}

.cookie-badge-optional {
    background: rgba(230, 201, 130, 0.2);
    border: 1px solid rgba(190, 150, 70, 0.35);
    color: #7a5c1e;
}

.cookie-list {
    margin-top: 0.875rem;
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.cookie-list li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--ink-muted);
}

.cookie-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5625rem;
    width: 0.4375rem;
    height: 0.4375rem;
    border-radius: 50%;
    background: linear-gradient(140deg, var(--ngp-leaf-bright), var(--ngp-sage));
}

.cookie-list strong { color: var(--ngp-forest); font-weight: 600; }

/* ---------- Manage preferences ---------- */
.policy-block-manage .manage-prefs-btn { margin-top: 1.25rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .documents-grid { grid-template-columns: 1fr; }
    .document-card .btn { width: 100%; }
    .cookie-category-header { align-items: flex-start; }
}
