/*
 * Shared styles for the marketing site's "legal-ish" pages — Privacy,
 * Complaints, and any future T&Cs / acceptable use that needs the same
 * long-form layout. Mirrors the design language of /Support and /Login
 * (centred content well, eyebrow + title heading, soft surface) so all
 * four off-the-funnel pages read as one site, not three different ones.
 */

.legal-section {
    background: var(--surface, #f6f6f8);
    padding: 4.5rem 1.25rem 5rem;
    min-height: calc(100vh - 80px);
}

.legal-section-inner {
    max-width: 820px;
    margin: 0 auto;
}

.legal-section-head {
    text-align: center;
    margin-bottom: 3rem;
}

.legal-section-head .section-title {
    margin: 0.4rem 0 0.65rem;
}

.legal-section-head .section-sub {
    max-width: 580px;
    margin: 0 auto;
}

.legal-article {
    background: #fff;
    border: 1px solid var(--ink-100);
    border-radius: 16px;
    padding: 2.75rem 2.75rem 2.5rem;
}

.legal-article h2 {
    font-family: 'Sora', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ink-900);
    margin: 2.25rem 0 0.85rem;
    line-height: 1.35;
}

.legal-article h2:first-child {
    margin-top: 0;
}

/* h1/h3/ol appear in the T&Cs body (admin-authored Quill HTML), not in
   the hand-written Privacy/Complaints markup — cover them so a pasted
   document renders with the same rhythm. */
.legal-article h1 {
    font-family: 'Sora', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink-900);
    margin: 0 0 1rem;
    line-height: 1.3;
}

.legal-article h3 {
    font-family: 'Sora', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink-900);
    margin: 1.75rem 0 0.65rem;
    line-height: 1.35;
}

.legal-article ol {
    margin: 0 0 1.25rem;
    padding-left: 1.4rem;
    color: var(--ink-700);
    line-height: 1.7;
}

.legal-article ol li {
    margin: 0.25rem 0;
}

/* ── Generated CIS extras ─────────────────────────────────── */
/* Code-rendered plan table ({{plan_table}} token) — brand header row,
   centred figures. Structure comes from CisService, never the editor. */
.cis-plan-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0 1.5rem;
    font-size: 0.9rem;
}
.cis-plan-table th {
    background: var(--rush-maroon);
    color: #fff;
    font-weight: 600;
    padding: 0.65rem 0.75rem;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.3;
}
.cis-plan-table th:first-child { border-radius: 8px 0 0 0; text-align: left; }
.cis-plan-table th:last-child { border-radius: 0 8px 0 0; }
.cis-plan-table td {
    padding: 0.7rem 0.75rem;
    text-align: center;
    border: 1px solid var(--ink-100);
    border-top: none;
    color: var(--ink-800);
}
.cis-plan-table td:first-child { text-align: left; font-weight: 700; color: var(--ink-900); }

/* Brand-coloured section headers on the generated CIS — set apart from
   the plainer /terms typography. */
.cis-article h2 {
    color: var(--rush-maroon);
    border-bottom: 2px solid var(--ink-100);
    padding-bottom: 0.35rem;
}

@media (max-width: 720px) {
    .cis-plan-table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Historic-version notice shown on /terms/v{n} when n isn't the active
   version — the page is a legal snapshot, make that unmistakable. */
.legal-version-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-bottom: 1.25rem;
    padding: 0.9rem 1.1rem;
    background: #fdf6e7;
    border: 1px solid #ecd9a8;
    border-radius: 12px;
    color: #7a5c14;
    font-size: 0.92rem;
    line-height: 1.55;
}

.legal-version-banner i {
    margin-top: 0.2rem;
}

.legal-version-banner a {
    color: var(--rush-maroon);
    font-weight: 600;
    text-decoration: none;
}

.legal-version-banner a:hover {
    text-decoration: underline;
}

.legal-article p {
    color: var(--ink-700);
    line-height: 1.7;
    margin: 0 0 1rem;
}

.legal-article ul {
    margin: 0 0 1.25rem;
    padding-left: 1.4rem;
    color: var(--ink-700);
    line-height: 1.7;
}

.legal-article ul li {
    margin: 0.25rem 0;
}

.legal-article a {
    color: var(--rush-maroon);
    font-weight: 600;
    text-decoration: none;
}

.legal-article a:hover {
    text-decoration: underline;
}

/* Contact-block — used at the foot of Complaints for the TIO details
   and Privacy for "how to reach us". Sits as a compact callout. */
.legal-contact {
    margin-top: 1.5rem;
    padding: 1.1rem 1.25rem;
    background: var(--surface, #f6f6f8);
    border-radius: 12px;
    border: 1px solid var(--ink-100);
}

.legal-contact h3 {
    font-family: 'Sora', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.55rem;
    color: var(--ink-900);
}

.legal-contact dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.35rem 0.85rem;
    margin: 0;
    font-size: 0.92rem;
}

.legal-contact dt {
    font-weight: 600;
    color: var(--ink-500);
}

.legal-contact dd {
    margin: 0;
    color: var(--ink-800);
    word-break: break-word;
}

@media (max-width: 720px) {
    .legal-section { padding: 2.5rem 1rem 3.5rem; }
    .legal-article { padding: 1.75rem 1.4rem 1.85rem; }
    .legal-article h2 { font-size: 1.1rem; }
    .legal-section-head .section-title { font-size: 1.65rem; }
    .legal-contact dl { grid-template-columns: 1fr; gap: 0.1rem; }
    .legal-contact dt { margin-top: 0.4rem; }
}
