/*
 * Terms & Conditions clause layout.
 *
 * Clause numbers are literal text rather than CSS counters, because the
 * document cross-references them by number ("clause 4.3") and they must match
 * the signed PDF exactly.
 *
 * Each level sets two values: --off is how far the clause is nested, --num is
 * the width reserved for its number. A negative text-indent of --num pulls the
 * number back into that reserved gutter, so wrapped lines align under the
 * first line's text rather than under the number.
 */

.tc-body p {
    margin: 0 0 0.7rem;
}

.tc-body h2 {
    margin-top: 2.6rem;
}

.tc-body h2 .tc-secnum {
    color: var(--indigo-600);
}

.tc-body .tc-l1 { --off: 0rem;       --num: 2.6rem; }
.tc-body .tc-l2 { --off: 0rem;       --num: 2.8rem; }
.tc-body .tc-l3 { --off: 1.5rem;  --num: 3.6rem; }
.tc-body .tc-l4 { --off: 3rem;    --num: 4.4rem; }
.tc-body .tc-la { --off: 1.5rem;  --num: 2.2rem; }
.tc-body .tc-lr { --off: 3rem;    --num: 2.2rem; }

.tc-body .tc-l1,
.tc-body .tc-l2,
.tc-body .tc-l3,
.tc-body .tc-l4,
.tc-body .tc-la,
.tc-body .tc-lr {
    padding-left: calc(var(--off) + var(--num));
    text-indent: calc(-1 * var(--num));
}

.tc-body .tc-n {
    display: inline-block;
    width: calc(var(--num) - 0.28rem);
    text-indent: 0;
    color: var(--indigo-600);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Definitions in Schedule 2 lead with the defined term, not a number. */
.tc-body .tc-def {
    padding-left: 1.5rem;
}

.tc-body .tc-term {
    font-weight: 600;
}

/* Conspicuous disclaimers are set in capitals in the source document and stay
 * that way; a tighter size and looser leading keep them readable. */
.tc-body .tc-caps {
    font-size: 0.86em;
    letter-spacing: 0.01em;
    line-height: 1.7;
}

.tc-body .tc-note {
    margin: 2rem 0;
    padding: 0.9rem 1.1rem;
    text-indent: 0;
    border-left: 3px solid var(--indigo-600);
    background: rgba(77, 68, 255, 0.05);
}

.tc-body .tc-note a {
    color: var(--indigo-600);
    text-decoration: underline;
}

.tc-body .tc-part {
    margin-top: 3.4rem;
    padding-top: 2.2rem;
    border-top: 1px solid rgba(14, 17, 20, 0.12);
}

.tc-body .tc-partsub {
    margin-top: 0.2rem;
}

.tc-body .legal-meta {
    margin-bottom: 2rem;
}

@media (max-width: 640px) {
    .tc-body .tc-l3 { --off: 0.8rem; }
    .tc-body .tc-l4 { --off: 1.6rem; }
    .tc-body .tc-la { --off: 0.8rem; }
    .tc-body .tc-lr { --off: 1.6rem; }
    .tc-body .tc-def { padding-left: 0.8rem; }
}
