/* ==========================================================================
   SACC legal pages — /terms, /privacy and the accept page (item 423)
   --------------------------------------------------------------------------
   The SACC house style on screen (CLAUDE.md "Technical Documents"): ruled, never
   boxed; one colour, the logo's teal, on numerals, rules and the wordmark; Segoe
   UI; a numeral gutter down the left edge. Surfaces and text come from the app's
   own tokens in sacc-modern.css, so both themes work; only the brand and its
   hairline tint are defined here, once per theme.

   Standalone pages: print.css is NOT linked. Its @media print sets
   html,body{width:100%} and @page{margin:0}, which overflows A4 on a page that
   brings its own margins (see the print.css note in KNOWLEDGE). The print rules
   for these pages are at the bottom of this file.
   ========================================================================== */

:root {
    --lg-brand: #286B68;   /* DESIGN-TOKEN-OK: SACC teal, sampled from the letterhead logo */
    --lg-rule: #C9DAD9;    /* DESIGN-TOKEN-OK: the logo's own antialias tint of the teal */
    --lg-font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
    --lg-brand: #6FB3AF;   /* DESIGN-TOKEN-OK: the teal lifted to read on the dark surface */
    --lg-rule: #3B4F4E;    /* DESIGN-TOKEN-OK: hairline tint for the dark surface */
}

body.lg {
    margin: 0;
    background: var(--sacc-surface);
    color: var(--sacc-text);
    font-family: var(--lg-font);
    font-size: 15px;
    line-height: 1.6;
}

.lg *, .lg *::before, .lg *::after { box-sizing: border-box; }

.lg a { color: var(--lg-brand); text-underline-offset: 2px; }

.lg-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 28px 16px 56px;
}

/* ── masthead: mark left, the two documents right, a brand rule under both ── */
.lg-mast {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px 24px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--lg-brand);
}
.lg-mark { display: block; height: 46px; width: auto; }
.lg-mark-dark { display: none; }
[data-theme="dark"] .lg-mark-light { display: none; }
[data-theme="dark"] .lg-mark-dark { display: block; }

.lg-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; }
.lg-nav a { text-decoration: none; }
.lg-nav a[aria-current="page"] { color: var(--sacc-text); font-weight: 600; }
.lg-nav button {
    font: inherit; color: var(--lg-brand); background: none; border: 0; padding: 0; cursor: pointer;
}
.lg-nav a:hover, .lg-nav button:hover { text-decoration: underline; }

/* ── title block ───────────────────────────────────────────────────────── */
.lg-title { margin: 28px 0 4px; font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.lg-meta { margin: 0 0 18px; font-size: 13px; color: var(--sacc-text-muted); }
.lg-meta strong { color: var(--sacc-text); font-weight: 600; }
.lg-intro { margin: 0 0 22px; }

/* ── contents: the section numbers, so a phone call can say "section 5" ── */
.lg-toc {
    list-style: none;
    margin: 0 0 30px;
    padding: 10px 0 0;
    border-top: 1px solid var(--lg-rule);
    columns: 2;
    column-gap: 32px;
    font-size: 14px;
}
.lg-toc li { break-inside: avoid; padding: 2px 0; }
.lg-toc a { text-decoration: none; color: var(--sacc-text); }
.lg-toc a:hover { color: var(--lg-brand); text-decoration: underline; }
.lg-toc .lg-n { display: inline-block; min-width: 1.8em; }

/* ── a section: numeral in the gutter, a hairline above the heading ────── */
.lg-n { color: var(--lg-brand); font-weight: 700; font-variant-numeric: tabular-nums; }

.lg-sec {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr);
    padding-top: 12px;
    margin-top: 22px;
    border-top: 1px solid var(--lg-rule);
    scroll-margin-top: 12px;
}
.lg-sec > .lg-n { font-size: 15px; line-height: 1.6; }
.lg-sec h2 {
    margin: 0 0 6px;
    font-size: 13px;
    line-height: 1.85;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--lg-brand);
}
.lg-sum { margin: 0 0 10px; font-weight: 600; }
.lg-sec p { margin: 0 0 8px; }
.lg-sec ul { margin: 0 0 10px; padding-left: 1.2em; }
.lg-sec li { margin: 0 0 4px; }

/* ── the closing line ──────────────────────────────────────────────────── */
.lg-foot {
    margin-top: 40px;
    padding-top: 10px;
    border-top: 1px solid var(--lg-rule);
    font-size: 12.5px;
    color: var(--sacc-text-muted);
}
.lg-foot a { color: inherit; }

/* ── accept page ───────────────────────────────────────────────────────── */
.lg-accept .lg-page { max-width: 640px; }
.lg-group { margin: 22px 0 0; padding-top: 10px; border-top: 1px solid var(--lg-rule); }
.lg-group h2 {
    margin: 0 0 8px; font-size: 13px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--lg-brand);
}
.lg-sums { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.lg-sums li { display: grid; grid-template-columns: 2.1rem minmax(0, 1fr); padding: 2px 0; }
.lg-form { margin-top: 26px; padding-top: 14px; border-top: 2px solid var(--lg-brand); }
.lg-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.lg-check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--lg-brand); flex: none; }
.lg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 16px; }
.lg-btn {
    font: inherit; font-weight: 600; font-size: 15px;
    padding: 10px 22px; min-height: 44px;
    color: var(--sacc-surface); background: var(--lg-brand);
    border: 1px solid var(--lg-brand); border-radius: 6px; cursor: pointer;
}
.lg-btn:hover { filter: brightness(1.08); }
.lg-btn:focus-visible, .lg-link:focus-visible, .lg-check input:focus-visible { outline: 2px solid var(--lg-brand); outline-offset: 2px; }
.lg-link {
    font: inherit; font-size: 14px; color: var(--sacc-text-muted);
    background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline;
}
.lg-error { margin: 12px 0 0; font-weight: 600; color: var(--sacc-danger-ink, var(--sacc-text)); }

/* ── phone width ───────────────────────────────────────────────────────── */
@media (max-width: 560px) {
    body.lg { font-size: 15px; }
    .lg-page { padding: 18px 16px 40px; }
    .lg-mark { height: 38px; }
    .lg-title { font-size: 23px; margin-top: 20px; }
    .lg-toc { columns: 1; }
    .lg-sec { grid-template-columns: 2rem minmax(0, 1fr); }
}

/* ── paper ─────────────────────────────────────────────────────────────── */
@media print {
    @page { size: A4; margin: 16mm 15mm 16mm 18mm; }
    :root, [data-theme="dark"] {
        --lg-brand: #286B68;   /* DESIGN-TOKEN-OK: paper is white in either theme */
        --lg-rule: #C9DAD9;    /* DESIGN-TOKEN-OK: paper is white in either theme */
    }
    [data-theme="dark"] .lg-mark-light { display: block; }
    [data-theme="dark"] .lg-mark-dark { display: none; }
    body.lg { background: none; font-size: 10pt; line-height: 1.45; }
    .lg-page { max-width: none; padding: 0; }
    .lg-nav, .lg-toc, .lg-noprint { display: none !important; }
    .lg-mark { height: 34px; }
    .lg-title { font-size: 18pt; margin-top: 14pt; }
    .lg-sec { margin-top: 12pt; padding-top: 6pt; }
    .lg-sec h2 { break-after: avoid; }
    .lg-sum { break-after: avoid; }
    .lg-sec li, .lg-sec p { orphans: 3; widows: 3; }
    .lg a { color: inherit; text-decoration: none; }
}
