/* Terms of Service — Orbit layout (load last) */

body.terms-orbit {
    position: relative;
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
    color: #f4f6ff;
    background-color: #05060f;
    background-image:
        radial-gradient(1.2px 1.2px at 12% 18%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 78% 32%, rgba(103, 232, 249, 0.7), transparent),
        linear-gradient(180deg, #07091a 0%, #05060f 42%, #0a0d22 100%);
    background-attachment: fixed;
    height: 100%;
    overflow: hidden;
}

body.terms-orbit::before {
    content: "";
    position: fixed;
    inset: -25%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 42% 36% at 16% 22%, rgba(34, 211, 238, 0.22), transparent 58%),
        radial-gradient(ellipse 38% 42% at 86% 12%, rgba(129, 140, 248, 0.22), transparent 56%),
        radial-gradient(ellipse 46% 34% at 48% 88%, rgba(167, 139, 250, 0.16), transparent 52%);
    filter: blur(16px);
}

body.terms-orbit > .site-scroll {
    position: fixed !important;
    top: var(--site-header-min-height);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    overflow-x: hidden;
    overflow-y: auto;
    contain: paint;
    clip-path: inset(0);
    -webkit-clip-path: inset(0);
}

body.terms-orbit > *:not(.main-nav) {
    position: relative;
    z-index: 0;
}

body.terms-orbit > .main-nav {
    z-index: 5000 !important;
}

body.terms-orbit .nav-links a:not(.btn) {
    color: #e2e8f0 !important;
    font-weight: 600;
}

body.terms-orbit .portal-btn {
    color: #94a3b8 !important;
}

body.terms-orbit .portal-btn.active {
    background: transparent !important;
    color: #67e8f9 !important;
}

body.terms-orbit .btn-primary {
    background: linear-gradient(135deg, #22d3ee, #818cf8) !important;
    color: #061018 !important;
}

body.terms-orbit .btn-login {
    color: #f8fafc !important;
    border-color: rgba(226, 232, 255, 0.5) !important;
    background: rgba(8, 12, 32, 0.55) !important;
}

.terms-page {
    width: min(1180px, calc(100% - 8%));
    margin: 0 auto;
    padding: 1.5rem 0 3.5rem;
}

.terms-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.7fr);
    gap: 1.75rem;
    align-items: end;
    margin-bottom: 1.75rem;
}

.terms-kicker {
    margin: 0 0 0.55rem;
    color: #67e8f9;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.terms-hero h1 {
    margin: 0 0 0.7rem;
    color: #f8fafc;
    font-size: clamp(2rem, 4.2vw, 3.15rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.08;
}

.terms-hero-lead {
    margin: 0;
    max-width: 38rem;
    color: #cbd5e1;
    font-size: 1.02rem;
    line-height: 1.55;
}

.terms-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    padding: 1.1rem 1.2rem;
    background: rgba(12, 16, 36, 0.62);
    border: 1px solid rgba(165, 180, 252, 0.18);
    border-radius: 18px;
}

.terms-hero-meta div {
    flex: 1 1 9rem;
}

.terms-hero-meta dt {
    margin: 0 0 0.2rem;
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.terms-hero-meta dd {
    margin: 0;
    color: #e8ecff;
    font-size: 0.92rem;
    font-weight: 650;
}

.terms-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.terms-toc {
    position: sticky;
    top: 0.75rem;
    padding: 1rem 0.85rem;
    background: rgba(12, 16, 36, 0.7);
    border: 1px solid rgba(165, 180, 252, 0.16);
    border-radius: 18px;
    backdrop-filter: blur(16px);
}

.terms-toc h2 {
    margin: 0 0 0.75rem;
    padding: 0 0.45rem;
    color: #e8ecff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.terms-toc ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.terms-toc a {
    display: grid;
    grid-template-columns: 1.6rem 1fr;
    gap: 0.45rem;
    align-items: baseline;
    padding: 0.42rem 0.5rem;
    border-radius: 10px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
}

.terms-toc a span {
    color: #67e8f9;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.terms-toc a:hover {
    color: #e2e8f0;
    background: rgba(103, 232, 249, 0.08);
}

.terms-toc a.active {
    color: #f8fafc;
    background: rgba(103, 232, 249, 0.12);
}

.terms-doc {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-width: 0;
}

.terms-doc-section {
    margin: 0 !important;
    padding: 1.35rem 1.45rem 1.4rem !important;
    background: rgba(12, 16, 36, 0.72);
    border: 1px solid rgba(165, 180, 252, 0.16);
    border-radius: 18px;
}

.terms-doc-section > h2 {
    display: flex;
    gap: 0.7rem;
    align-items: baseline;
    margin: 0 0 0.85rem !important;
    padding: 0 0 0.75rem;
    border-bottom: 1px solid rgba(165, 180, 252, 0.14);
    color: #f8fafc !important;
    font-size: 1.12rem !important;
    font-weight: 750;
    letter-spacing: -0.02em;
    line-height: 1.3 !important;
}

.terms-doc-section > h3 {
    margin: 1rem 0 0.45rem !important;
    color: #a5f3fc !important;
    font-size: 0.92rem !important;
    font-weight: 700;
}

.terms-doc-section > p,
.terms-doc-section > ul > li {
    color: #cbd5e1 !important;
    font-size: 0.92rem !important;
    line-height: 1.7 !important;
    text-align: left;
}

.terms-doc-section > p {
    margin: 0 0 0.75rem !important;
}

.terms-doc-section > p:last-child {
    margin-bottom: 0 !important;
}

.terms-doc-section > ul {
    margin: 0.15rem 0 0.75rem !important;
    padding-left: 1.15rem;
}

.terms-doc-section > ul > li {
    margin: 0 0 0.45rem !important;
}

.terms-doc-section > ul > li:last-child {
    margin-bottom: 0 !important;
}

.terms-doc-section strong {
    color: #f8fafc;
    font-weight: 700;
}

.terms-doc-section .escrow-notice-box {
    margin: 0.35rem 0 0.95rem !important;
    padding: 0.95rem 1.05rem !important;
    background: rgba(127, 29, 29, 0.28) !important;
    border: 1px solid rgba(248, 113, 113, 0.38) !important;
    border-left: 3px solid #f87171 !important;
    border-radius: 0 14px 14px 0 !important;
    box-shadow: none !important;
}

.terms-doc-section .escrow-notice-box > p {
    margin: 0 !important;
    color: #fecaca !important;
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
}

.terms-doc-section .escrow-notice-box strong {
    color: #fee2e2;
}

.terms-page-footer {
    margin-top: 2.25rem;
    padding: 1.4rem 0 0.4rem;
    border-top: 1px solid rgba(165, 180, 252, 0.14);
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.5rem;
    justify-content: space-between;
    align-items: center;
}

.terms-page-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.35rem;
}

.terms-page-footer a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
}

.terms-page-footer a:hover {
    color: #67e8f9;
}

.terms-page-footer p {
    margin: 0;
    color: #64748b;
    font-size: 0.82rem;
}

@media (max-width: 900px) {
    .terms-page {
        width: min(100% - 1.5rem, 1180px);
    }

    .terms-hero,
    .terms-shell {
        grid-template-columns: 1fr;
    }

    .terms-toc {
        position: sticky;
        top: 0;
        z-index: 4;
        padding: 0.7rem 0.55rem;
        overflow-x: auto;
    }

    .terms-toc h2 {
        display: none;
    }

    .terms-toc ol {
        display: flex;
        gap: 0.35rem;
        width: max-content;
    }

    .terms-toc a {
        display: inline-flex;
        white-space: nowrap;
        padding: 0.4rem 0.7rem;
        background: rgba(8, 12, 32, 0.55);
        font-size: 0.74rem;
    }

    .terms-toc a span {
        display: none;
    }
}
