/* ============================================================================
   Ink: numbered document sections (compare, glossary, legal, release pages)
   Pattern: .ink-row--third where the left cell holds a sticky head
   (red number + heading) and the right cell holds prose or structured copy.
   Candidate for promotion into ink.css.
   ========================================================================== */

/* Sticky head in the left third */
.ink-sec__head {
    position: sticky;
    top: calc(var(--ink-sticky-top) + 28px);
}
.ink-sec__num {
    display: block;
    font-size: 12px;
    line-height: 18px;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--red-text);
}
.ink-sec__num + * { margin-top: 12px; }
.ink-sec__title { text-wrap: balance; }
.ink-sec__head .ink-label + .ink-sec__title { margin-top: 12px; }
.ink-sec .ink-cell:last-child { padding-bottom: 40px; }
.ink-sec [id] { scroll-margin-top: 24px; }
.ink-sec[id] { scroll-margin-top: 0; }

/* Contents list: ruled links with red numbers, flowing into columns */
.ink-toc {
    columns: 3;
    column-gap: 32px;
}
.ink-toc--2 { columns: 2; }
.ink-toc a {
    display: grid;
    grid-template-columns: 40px 1fr;
    align-items: baseline;
    padding: 12px 0;
    border-top: var(--rule) solid var(--ink);
    break-inside: avoid;
    font-size: 16px;
    line-height: 22px;
    font-weight: 500;
    text-decoration: none;
}
.ink-toc a > span:first-child {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--red-text);
}
.ink-toc a:hover { color: var(--red-text); }

/* Closing bar with a back button */
.ink-backbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 28px var(--pad);
    border-bottom: var(--rule) solid var(--ink);
}

/* Notice strip (ink band, small text allowed on ink) */
.ink-notice {
    padding: 18px var(--pad);
    border-bottom: var(--rule) solid var(--ink);
    font-size: 15px;
    line-height: 22px;
    word-spacing: 0.04em;
}
.ink-notice strong { color: var(--paper); letter-spacing: 0.06em; }

@media (max-width: 1100px) {
    .ink-toc { columns: 2; }
}

@media (max-width: 860px) {
    .ink-sec__head { position: static; }
    /* Stacked: head and body read as one block, no rule between them */
    .ink-row.ink-sec > .ink-cell:first-child { border-bottom: 0; padding-bottom: 0; }
    .ink-row.ink-sec > .ink-cell:last-child { padding-top: 18px; }
    .ink-toc,
    .ink-toc--2 { columns: 1; }
}
