/* --- Terms & Conditions Page --- */

.terms-section {
    padding: 12rem 0 6rem;
    min-height: 100vh;
    background-color: var(--surface-dark-0);
    color: var(--text-dark-primary);
}

.terms-container {
    max-width: 800px;
    margin: 0 auto;
}

.terms-header {
    text-align: center;
    margin-bottom: 4rem;
}

.terms-header h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    color: var(--orange-100);
    margin-bottom: 0;
}

/* --- Terms Content --- */
.terms-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.terms-block {
    padding: 2rem 0;
    border-bottom: 1px solid color-mix(in srgb, var(--border-dark) 40%, transparent);
}

.terms-block:last-child {
    border-bottom: none;
}

.terms-block h2 {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-dark-heading);
    margin-bottom: 1rem;
    text-transform: none;
    letter-spacing: 0;
    font-family: var(--font-heading);
    font-weight: 600;
}

.terms-block p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-dark-secondary);
    margin-bottom: 0.75rem;
}

.terms-block p:last-child {
    margin-bottom: 0;
}

.terms-block ul {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0;
}

.terms-block ul li {
    position: relative;
    padding: 0.4rem 0 0.4rem 1.6rem;
    color: var(--text-dark-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.terms-block ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.85rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-solid);
    opacity: 0.7;
}

/* --- Rendered (Markdown) terms body ---
   When dynamic-content.js hydrates terms_body_md it replaces the static
   .terms-block articles with flat headings/paragraphs/lists. These rules give
   that flat structure the same look, using an h2 top-border as the separator. */
.terms-content > h2 {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-dark-heading);
    margin: 0 0 1rem;
    padding-top: 2rem;
    border-top: 1px solid color-mix(in srgb, var(--border-dark) 40%, transparent);
    text-transform: none;
    letter-spacing: 0;
    font-family: var(--font-heading);
    font-weight: 600;
}

.terms-content > h2:first-child {
    padding-top: 0;
    border-top: none;
}

.terms-content > p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-dark-secondary);
    margin-bottom: 0.75rem;
}

.terms-content > ul {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 1.5rem;
}

.terms-content > ul li {
    position: relative;
    padding: 0.4rem 0 0.4rem 1.6rem;
    color: var(--text-dark-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.terms-content > ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.85rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-solid);
    opacity: 0.7;
}

/* --- Back Button --- */
.terms-back {
    text-align: center;
    margin-top: 4rem;
    padding-bottom: 2rem;
}

@media (max-width: 768px) {
    .terms-section {
        padding: 8rem 0 4rem;
    }

    .terms-header {
        margin-bottom: 2.5rem;
    }

    .terms-block {
        padding: 1.5rem 0;
    }
}