/*
 * Topic Pages Styling (Privacy Notice, Terms etc.)
 * Scope: .html-topic-page only — does NOT affect other pages
 */

/* Hide the page title bar */
.html-topic-page .page-title {
    display: none !important;
}

/* Container: full width, left aligned */
.html-topic-page .page.topic-page {
    text-align: left !important;
    max-width: none !important;
    width: 100% !important;
}

/* Page body: override theme max-width (1000px) and centering */
.html-topic-page .topic-page .page-body,
.topic-page .page-body {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    line-height: 1.6;
    text-align: left !important;
}

/* --- Headings --- */

/* Base: all headings gray, semibold */
.html-topic-page .page-body h1,
.html-topic-page .page-body h2,
.html-topic-page .page-body h3,
.html-topic-page .page-body h4,
.html-topic-page .page-body h5,
.html-topic-page .page-body h6 {
    font-size: 20px !important;
    font-weight: 600 !important;
    text-align: left !important;
    margin-top: 24px !important;
    margin-bottom: 12px !important;
    color: var(--gray6) !important;
    line-height: 1.4 !important;
    letter-spacing: -0.02em !important;
}

/* Title block: h1 (first child) — bold, dark blue, own line */
.html-topic-page .page-body > h1:first-child {
    display: block !important;
    color: var(--primery-dark-blue) !important;
    font-weight: 900 !important;
    margin: 20px 0 4px 0 !important;
}

/* Title block: h2 group after h1 — inline flow, dark blue */
.html-topic-page .page-body > h1:first-child + h2,
.html-topic-page .page-body > h1:first-child + h2 + h2,
.html-topic-page .page-body > h1:first-child + h2 + h2 + h2 {
    display: inline !important;
    color: var(--primery-dark-blue) !important;
    font-weight: 800 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Space between inline h2 elements */
.html-topic-page .page-body > h1:first-child + h2::after,
.html-topic-page .page-body > h1:first-child + h2 + h2::after {
    content: " " !important;
    word-spacing: 0.3em;
}

/* Gap between title block and body content */
.html-topic-page .page-body > h1:first-child + h2 + h2 + h2 + *,
.html-topic-page .page-body > h1:first-child + h2 + h2 + * {
    margin-top: 28px !important;
}

/* --- Body text --- */

.html-topic-page .page-body p,
.html-topic-page .page-body li {
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
    text-align: left !important;
    color: var(--gray6) !important;
    letter-spacing: -0.02em !important;
}

.html-topic-page .page-body p {
    margin-bottom: 16px !important;
}

.html-topic-page .page-body p:last-child {
    margin-bottom: 0 !important;
}

/* --- Lists --- */

.html-topic-page .page-body ul,
.html-topic-page .page-body ol {
    margin-left: 20px !important;
    margin-bottom: 16px !important;
    padding-left: 0 !important;
}

.html-topic-page .page-body li {
    margin-bottom: 8px !important;
}

.html-topic-page .page-body li:last-child {
    margin-bottom: 0 !important;
}

/* --- Links --- */

.html-topic-page .page-body a {
    color: var(--primery-blue) !important;
    text-decoration: underline !important;
    font-size: 14px !important;
    font-weight: 400 !important;
}

.html-topic-page .page-body a:hover {
    color: var(--primery-dark-blue) !important;
}

/* --- Bold text --- */

.html-topic-page .page-body strong,
.html-topic-page .page-body b {
    font-weight: 600 !important;
    color: var(--gray6) !important;
}

/* --- Override RTL theme div margins --- */

.html-topic-page .page-body div {
    margin: 0 !important;
}

/* --- Mobile --- */

@media all and (max-width: 767px) {
    .html-topic-page .page-body h1,
    .html-topic-page .page-body h2,
    .html-topic-page .page-body h3,
    .html-topic-page .page-body h4,
    .html-topic-page .page-body h5,
    .html-topic-page .page-body h6 {
        font-size: 18px !important;
        margin-top: 20px !important;
        margin-bottom: 10px !important;
    }
}

/* --- RTL Support --- */

html[dir="rtl"] .html-topic-page .page-body h1,
html[dir="rtl"] .html-topic-page .page-body h2,
html[dir="rtl"] .html-topic-page .page-body h3,
html[dir="rtl"] .html-topic-page .page-body h4,
html[dir="rtl"] .html-topic-page .page-body h5,
html[dir="rtl"] .html-topic-page .page-body h6,
html[dir="rtl"] .html-topic-page .page-body p,
html[dir="rtl"] .html-topic-page .page-body li {
    text-align: right !important;
}

html[dir="rtl"] .html-topic-page .page-body ul,
html[dir="rtl"] .html-topic-page .page-body ol {
    margin-left: 0 !important;
    margin-right: 20px !important;
}
