/* Legal pages. Loads after category.css (head, background, tiles, the seg switch); adds the document switch under the
   title, the side list of sections and the reading styles for the text. */

.lg-tabs { margin-top: 26px; width: max-content; max-width: 100%; }
.lg-tabs .seg__opt { padding: 10px 18px; font-size: 13px; text-align: center; text-decoration: none; }
.lg-tabs .seg__opt[aria-current="page"] { color: #0b0c12; } /* the white behind it is the sliding thumb */

.lg-main { align-items: start; }

/* Side list: number + section name; the one being read is lit. */
.lg-toc {
    position: sticky;
    top: 110px;
    display: grid;
    gap: 14px;
    max-height: calc(100vh - 140px);
    overflow: auto;
    padding: 22px 14px 22px 22px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.02);
    scrollbar-width: none; /* still scrolls on short screens, without a bar */
}
.lg-toc::-webkit-scrollbar { display: none; }

.lg-toc__label { font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.lg-toc nav { display: grid; gap: 2px; }

.lg-toc a {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.35;
    color: var(--muted);
    text-decoration: none;
    transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.lg-toc a b { font-size: 12px; font-weight: 800; color: var(--faint); font-variant-numeric: tabular-nums; padding-top: 1px; }
.lg-toc a:hover { color: #fff; background: rgba(255, 255, 255, 0.04); }
.lg-toc a.is-on { color: #fff; background: rgba(167, 123, 255, 0.14); }
.lg-toc a.is-on b { color: #c4a6ff; }

/* The text. */
.lg-doc {
    max-width: 900px;
    padding: clamp(26px, 3vw, 56px);
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.02);
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
    transition: opacity 0.26s var(--ease), filter 0.26s var(--ease);
}

.lg-doc.is-out { opacity: 0; filter: blur(8px); }

.lg-doc > :first-child { margin-top: 0; }
.lg-doc p { margin: 0 0 14px; }
.lg-doc strong { color: #fff; font-weight: 700; }
.lg-doc u { text-decoration: none; color: #fff; }
.lg-doc a { color: #c4a6ff; text-decoration: none; word-break: break-word; }
.lg-doc a:hover { text-decoration: underline; }

.lg-doc :is(h2, h3, .lg-sec) { scroll-margin-top: 110px; }

.lg-doc h2 {
    margin: 48px 0 16px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: #fff;
    font-family: 'Gilroy', 'Inter', sans-serif;
    font-size: clamp(22px, 1.6vw, 28px);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.lg-doc h3 { margin: 30px 0 10px; color: #fff; font-size: 17px; font-weight: 800; line-height: 1.35; }
.lg-doc > h3:not(:first-child):not(h2 ~ h3) { padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, 0.07); }

.lg-doc ul { margin: 0 0 14px; padding-left: 20px; }
.lg-doc ul li::marker { color: #a77bff; }
.lg-doc li > p { margin-bottom: 8px; }

/* Terms: numbered clauses (01) with numbered points (1.1). */
.lg-doc > ol { counter-reset: clause; margin: 0; padding: 0; list-style: none; }
.lg-doc > ol > li { counter-increment: clause; }
.lg-doc .lg-sec {
    display: flex;
    gap: 12px;
    margin: 40px 0 14px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font-family: 'Gilroy', 'Inter', sans-serif;
    font-size: clamp(20px, 1.4vw, 24px);
    line-height: 1.3;
}
.lg-doc .lg-sec::before { content: counter(clause, decimal-leading-zero); color: #c4a6ff; font-weight: 800; }
.lg-doc .lg-sec strong { font-weight: 800; }
.lg-doc > ol ol { counter-reset: point; margin: 0; padding: 0; list-style: none; }
.lg-doc > ol ol > li { counter-increment: point; position: relative; padding-left: 52px; }
.lg-doc > ol ol > li::before {
    content: counter(clause) "." counter(point);
    position: absolute;
    left: 0;
    top: 0;
    color: var(--faint);
    font-weight: 700;
    font-size: 13px;
    line-height: 25px;
    font-variant-numeric: tabular-nums;
}

/* Privacy: tables. */
.lg-doc table { width: 100%; margin: 6px 0 22px; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
.lg-doc :is(th, td) { padding: 12px 14px; border: 1px solid rgba(255, 255, 255, 0.08); text-align: left; vertical-align: top; }
.lg-doc th { color: #fff; font-weight: 800; background: rgba(255, 255, 255, 0.03); }

@media (max-width: 960px) {
    .lg-toc { display: none; }
    .lg-tabs { width: 100%; }
    .lg-tabs .seg__opt { padding: 10px 6px; font-size: 12px; }
}
