/* ==========================================================================
   SITE RESKIN: reading pages (terms, privacy, the API page). 15 Oct 2026.
   Loaded only in the preview, through request.reskinCss = "legal" (see
   includes/header.cfm). Builds on the shared rs- blocks in reskin.css.

   The look: a calm wash hero, then the text as a white "document" on the
   cream page, about 70 characters a line, with a contents list beside it on
   a laptop (sticky) and folded under "On this page" on a phone.
   No coloured edge bars, no new fonts, plain hyphens in any text.
   ========================================================================== */

/* Calm wash hero for a page of text */
.rs-doc-hero { padding: 26px 0 28px; }
.rs-doc-hero .rs-lead { max-width: 38em; }
.rs-doc-hero .rs-muted { margin: 12px 0 0; }

/* The page body: contents + document */
.rs-doc-wrap { padding: 22px 0 44px; }
.rs-doc {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}
.rs-doc > * { min-width: 0; }

/* Contents list. Phone: a folded <details>. Laptop: a sticky column. */
.rs-legal-toc ol {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.45;
}
.rs-legal-toc li + li { margin-top: 2px; }
.rs-legal-toc a {
    display: block;
    padding: 6px 0;
    color: var(--rs-body) !important;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.rs-legal-toc a:hover, .rs-legal-toc a:focus { color: var(--rs-green) !important; text-decoration: underline; }
.rs-legal-toc--phone {
    background: #fff;
    border: 1px solid var(--rs-hair);
    border-radius: var(--rs-radius);
    padding: 0 18px;
}
.rs-legal-toc--phone summary {
    cursor: pointer;
    list-style: none;
    padding: 13px 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--rs-label);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.rs-legal-toc--phone summary::-webkit-details-marker { display: none; }
.rs-legal-toc--phone summary::after {
    content: "\F282"; /* bootstrap-icons chevron-down */
    font-family: "bootstrap-icons";
    font-size: 13px;
    letter-spacing: 0;
    color: var(--rs-green);
    transition: transform 0.2s ease;
}
.rs-legal-toc--phone[open] summary::after { transform: rotate(180deg); }
.rs-legal-toc--phone ol { padding: 0 0 12px; border-top: 1px solid var(--rs-hair); }
.rs-legal-toc--phone li { border-bottom: 1px solid var(--rs-hair); margin: 0; }
.rs-legal-toc--phone li:last-child { border-bottom: none; }
.rs-legal-toc--phone a { padding: 10px 0; }

/* The document: white paper, comfortable measure */
.rs-doc-body {
    background: #fff;
    border: 1px solid var(--rs-hair);
    border-radius: var(--rs-radius);
    padding: 22px 20px 10px;
    overflow-wrap: break-word;
}
.rs-doc-body > * { max-width: 37em; }
.rs-page .rs-doc-body h2 {
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: -0.3px;
    margin: 30px 0 10px;
}
.rs-page .rs-doc-body h2:first-child,
.rs-page .rs-doc-body > .rs-doc-note:first-child h2 { margin-top: 0; }
.rs-doc-n { color: var(--rs-num); font-weight: 700; margin-right: 2px; }
.rs-doc-body p,
.rs-doc-body li { font-size: 15.5px; line-height: 1.75; color: var(--rs-body); }
.rs-doc-body p { margin: 0 0 14px; }
.rs-doc-body ul { padding-left: 1.15em; margin: 0 0 16px; }
.rs-doc-body li { margin-bottom: 10px; padding-left: 2px; }
.rs-doc-body li::marker { color: var(--rs-num); }
.rs-doc-body strong { color: var(--rs-ink); }
.rs-doc-body a { overflow-wrap: anywhere; }

/* Long lists (what we collect, how long we keep it, your rights): rows with hairlines */
.rs-doc-body .rs-doc-list { list-style: none; padding: 0; margin: 4px 0 18px; border-top: 1px solid var(--rs-hair); }
.rs-doc-body .rs-doc-list li { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--rs-hair); }

/* A paragraph that matters more than the rest: a soft wash panel, no edge bar */
.rs-doc-note {
    background: var(--rs-wash);
    border-radius: var(--rs-radius-sm);
    padding: 16px 18px 4px;
    margin: 26px 0 18px;
}
/* (0,3,1) so the laptop rule ".rs-page .rs-doc-body h2 { margin-top: 38px }" below cannot win */
.rs-page .rs-doc-body .rs-doc-note h2 { margin-top: 0; }
.rs-doc-note p { color: var(--rs-ink); }

/* Help line under the document */
.rs-doc-after { margin: 18px 0 0; font-size: 14.5px; color: var(--rs-body); }

@media (min-width: 768px) {
    .rs-doc-body { padding: 32px 36px 18px; }
}

@media (min-width: 992px) {
    .rs-doc-hero { padding: 44px 0 46px; }
    .rs-doc-wrap { padding: 44px 0 72px; }
    /* The frame is the menu's own width (Rhys 15 Oct); the title lines up with the contents and
       the logo. The document keeps a reading width, left-aligned beside the contents. */
    .rs-doc {
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 64px;
        align-items: start;
    }
    /* On a short laptop screen the list scrolls inside itself instead of running off the bottom */
    .rs-legal-toc--side {
        position: sticky;
        top: 100px;
        padding-top: 6px;
        max-height: calc(100vh - 116px);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }
    .rs-legal-toc--side a:focus-visible { outline-offset: -2px; }
    .rs-legal-toc--side li + li { margin-top: 0; }
    .rs-legal-toc--side .rs-eyebrow { margin-bottom: 8px; }
    .rs-legal-toc--side ol { border-top: 1px solid var(--rs-hair); padding-top: 6px; }
    .rs-doc-body { padding: 44px 48px 26px; max-width: 800px; }
    .rs-api .rs-doc-body { max-width: none; }
    .rs-doc-body > * { max-width: none; }
    .rs-page .rs-doc-body h2 { font-size: 24px; margin-top: 38px; }
    .rs-doc-body p,
    .rs-doc-body li { font-size: 16.5px; }
    .rs-doc-note { padding: 20px 24px 6px; }
}
