/* ==========================================================================
   TERMS OF SERVICE AND PRIVACY POLICY: a readable legal document
   ========================================================================== */

.tos-hero__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.875rem;
}

.tos-hero__logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--dira-border-strong);
}

.tos-hero__brand {
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--dira-primary);
}

.tos-hero__title {
    max-width: 20em;
}

.tos-hero__meta {
    font-size: 14px;
    line-height: 22px;
    font-weight: 600;
    color: var(--dira-muted);
    overflow-wrap: anywhere;
}

/* Layout */
.tos-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
}

.tos-toc {
    display: none;
}

.tos-doc {
    min-width: 0;
    max-width: 46rem;
}

.tos-part + .tos-part {
    margin-top: clamp(3rem, 7vw, 5rem);
    padding-top: clamp(2rem, 5vw, 3rem);
    border-top: 1px solid var(--dira-border-strong);
}

.tos-part > h2 {
    margin-bottom: 1.5rem;
}

.tos-part > p {
    margin-bottom: 1rem;
}

.tos-sec {
    padding-top: 1.75rem;
    margin-top: 1.75rem;
    border-top: 1px solid var(--dira-border);
}

.tos-sec h3 {
    margin-bottom: 0.875rem;
    font-size: 19px;
    line-height: 28px;
    font-weight: 700;
    color: var(--dira-ink);
}

.tos-doc p {
    font-size: 16px;
    line-height: 28px;
    color: #2A2748;
}

.tos-doc p + p,
.tos-doc p + ul,
.tos-doc ul + p {
    margin-top: 1rem;
}

.tos-doc strong {
    font-weight: 700;
    color: var(--dira-ink);
}

.tos-doc ul {
    list-style: none;
    padding: 0;
    margin-top: 0.875rem;
}

.tos-doc li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 16px;
    line-height: 26px;
    color: #2A2748;
}

.tos-doc li + li {
    margin-top: 0.5rem;
}

.tos-doc li::before {
    content: '';
    position: absolute;
    left: 0.25rem;
    top: 0.625rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dira-primary);
}

/* Disclaimer block */
.tos-doc .legal-block {
    margin-top: 1rem;
    padding: 1.25rem 1.5rem;
    border-left: 3px solid var(--dira-primary);
    border-radius: 0 var(--dira-radius) var(--dira-radius) 0;
    background: var(--dira-lavender);
}

.tos-doc .legal-block p.caps {
    font-size: 13px;
    line-height: 22px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--dira-ink);
}

@media (min-width: 1025px) {
    .tos-layout {
        grid-template-columns: 17rem minmax(0, 1fr);
        gap: 4rem;
    }

    .tos-toc {
        display: block;
        position: sticky;
        top: calc(var(--dira-header-h) + 2rem);
        max-height: calc(100dvh - var(--dira-header-h) - 4rem);
        overflow-y: auto;
        padding-right: 0.5rem;
    }

    .tos-toc__group {
        margin: 1.5rem 0 0.625rem;
        font-size: 11px;
        line-height: 14px;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--dira-primary);
    }

    .tos-toc__group:first-child {
        margin-top: 0;
    }

    .tos-toc ol {
        list-style: none;
        padding: 0;
        border-left: 2px solid var(--dira-border-strong);
    }

    .tos-toc a {
        display: block;
        padding: 0.375rem 0 0.375rem 0.875rem;
        margin-left: -2px;
        border-left: 2px solid transparent;
        font-size: 13px;
        line-height: 20px;
        color: var(--dira-muted);
        transition: color var(--dira-dur-fast) var(--dira-ease), border-color var(--dira-dur-fast) var(--dira-ease);
    }

    .tos-toc a:hover {
        color: var(--dira-primary);
        border-left-color: var(--dira-primary);
    }

    .tos-toc a:focus-visible {
        outline: 2px solid var(--dira-primary);
        outline-offset: 2px;
    }
}

.tos-doc [id],
.tos-part[id] {
    scroll-margin-top: calc(var(--dira-header-h) + 1.5rem);
}
