.terms-page {
    min-height: 100vh;
    color: var(--np-on-surface);
    background: var(--np-bg-deep);
}

body:has(.terms-page) > .navbar {
    display: none !important;
}

body.user-app:has(.terms-page) > main {
    padding-top: 0 !important;
}

.terms-header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 64px;
    padding: 0 var(--container-margin);
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    align-items: center;
    background: rgba(24, 28, 34, 0.94);
    border-bottom: 1px solid var(--np-glass-border);
    backdrop-filter: blur(14px);
}

.terms-header a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--np-primary);
    border-radius: 50%;
    text-decoration: none;
}

.terms-header a:hover,
.terms-header a:focus-visible {
    color: var(--np-primary-fixed);
    background: var(--np-glass);
}

.terms-header h1 {
    margin: 0;
    overflow: hidden;
    color: var(--np-on-surface);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.terms-content {
    width: min(100%, 768px);
    margin: 0 auto;
    padding: 40px var(--container-margin) 64px;
}

.terms-meta {
    margin-bottom: 24px;
}

.terms-meta span {
    display: block;
    color: var(--np-primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.terms-meta p {
    margin: 5px 0 0;
    color: var(--np-on-surface-variant);
    font-size: 0.82rem;
}

.terms-sections {
    display: grid;
    gap: 24px;
}

.terms-section {
    --terms-accent: var(--np-primary);
    padding: 24px;
    background: var(--np-surface-container);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.terms-section:hover {
    background: var(--np-surface-high);
    border-color: color-mix(in srgb, var(--terms-accent) 35%, transparent);
}

.terms-section.is-purple {
    --terms-accent: var(--np-vibrant-purple);
}

.terms-section.is-amber {
    --terms-accent: var(--np-warning);
}

.terms-section.is-red {
    --terms-accent: var(--np-error);
}

.terms-section h2 {
    margin: 0 0 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--np-on-surface);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
}

.terms-section h2 i {
    width: 24px;
    flex: 0 0 24px;
    margin-top: 3px;
    color: var(--terms-accent);
    text-align: center;
}

.terms-section p {
    margin: 0;
    color: var(--np-on-surface-variant);
    font-size: 1rem;
    line-height: 1.7;
}

.terms-section p + p {
    margin-top: 14px;
}

.terms-section a {
    color: var(--np-primary);
    font-weight: 700;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.terms-section a:hover,
.terms-section a:focus {
    color: var(--np-primary-fixed);
    text-decoration: underline;
}

@media (max-width: 575.98px) {
    .terms-content {
        padding-top: 32px;
        padding-bottom: 48px;
    }

    .terms-sections {
        gap: 20px;
    }

    .terms-section {
        padding: 20px;
    }

    .terms-section h2 {
        font-size: 1.12rem;
    }

    .terms-section p {
        font-size: 0.94rem;
    }
}
