/* Shared by every page on cruxapp.ai: the palette, the top bar and the footer
   (and the text pages' type). The app's palette: cruxapp/constants/theme.ts. */

:root {
    --bg: #0E1116;
    --surface: #161A21;
    --line: #252B35;
    --text: #E8EBF0;
    --muted: #9CA3AF;
    --faint: #6B7280;
    --gold: #E0B12D;
    --body: #C3C8D0;
    --wrap: 1120px;
    --gutter: 24px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ─── Top bar ─── */
.top {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg);
    border-bottom: 1px solid transparent;
    transition: border-color .2s;
}

.top.scrolled {
    border-bottom-color: var(--line);
}

.top .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 20px;
    letter-spacing: -0.01em;
}

.brand img {
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.top-cta {
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    transition: border-color .2s;
}

.top-cta:hover {
    border-color: var(--muted);
}

/* ─── Footer ─── */
footer .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 40px;
    padding-bottom: 48px;
    font-size: 14px;
    color: var(--faint);
}

footer {
    border-top: 1px solid var(--line);
}

footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

footer nav a {
    text-decoration: none;
}

footer nav a:hover {
    color: var(--text);
}

.dti img {
    width: 40px;
    height: 40px;
    opacity: .7;
    display: block;
}

.dti:hover img {
    opacity: 1;
}

@media (max-width: 860px) {
    :root {
        --gutter: 20px;
    }
}

/* ─── Text pages (support, privacy, terms) ─── */
.doc article {
    max-width: 720px;
    padding: 72px 0 120px;
}

.doc h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.doc .updated {
    margin-top: 12px;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 14px;
    color: var(--faint);
}

.doc .lede {
    margin-top: 16px;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: var(--muted);
}

.doc h2 {
    margin: 56px 0 12px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.doc h3 {
    margin: 28px 0 8px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.doc p,
.doc li,
.doc td {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 17px;
    line-height: 1.7;
    color: var(--body);
}

.doc p {
    margin: 12px 0 0;
    text-wrap: pretty;
}

.doc ul,
.doc ol {
    margin: 12px 0 0;
    padding-left: 1.25em;
}

.doc li {
    margin-top: 6px;
}

.doc li::marker {
    color: var(--faint);
}

.doc strong {
    color: var(--text);
    font-weight: 600;
}

.doc a {
    color: var(--gold);
    text-decoration: underline;
    text-decoration-color: rgba(224, 177, 45, .4);
    text-underline-offset: 3px;
}

.doc a:hover {
    text-decoration-color: var(--gold);
}

.doc .table-wrap {
    margin-top: 20px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.doc table {
    width: 100%;
    border-collapse: collapse;
}

.doc th {
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    background: var(--surface);
}

.doc td {
    padding: 12px 16px;
    font-size: 15px;
    vertical-align: top;
    border-top: 1px solid var(--line);
}

.doc .box {
    margin-top: 16px;
    padding: 20px 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
}

.doc .box p {
    margin: 0;
}

/* Support: the email, as the page's one action. */
.doc .contact {
    display: block;
    margin-top: 32px;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    text-decoration: none;
    transition: border-color .2s;
}

.doc .contact:hover {
    border-color: var(--muted);
}

.doc .contact p {
    margin: 0;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 14px;
    color: var(--muted);
}

.doc .contact p + p {
    margin-top: 4px;
    font-size: 20px;
    font-weight: 600;
    color: var(--gold);
}

.doc .contact p + p + p {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 400;
    color: var(--faint);
}
