/* Terms of Service and Privacy and Cookie Policy (legal/terms.html, legal/privacy.html).
 * Plain reading pages on the house neutrals: near-black ink on white, one quiet
 * accent, the brand fonts from brand.css. Light by default, dark when the
 * visitor's system asks for it. No script is needed to read either page;
 * legal.js only marks the section being read in the contents. */
.lg {
    --lg-bg: #ffffff;
    --lg-ink: #101418;
    --lg-ink-2: #4b555e;
    --lg-ink-3: #5a646d;
    --lg-line: rgba(16, 20, 24, 0.14);
    --lg-line-2: rgba(16, 20, 24, 0.08);
    --lg-fill: rgba(16, 20, 24, 0.04);
    --lg-accent: #101418;
    --lg-link: #4a2fa0;
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    background: var(--lg-bg); color: var(--lg-ink);
    font-family: var(--vantage-font-body, 'General Sans', 'Hanken Grotesk', sans-serif);
    font-size: 16.5px; line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: dark) {
    .lg {
        --lg-bg: #161616; --lg-ink: #ececec; --lg-ink-2: #b0b0b0; --lg-ink-3: #9a9a9a;
        --lg-line: rgba(255, 255, 255, 0.16); --lg-line-2: rgba(255, 255, 255, 0.09);
        --lg-fill: rgba(255, 255, 255, 0.05); --lg-accent: #fafafa; --lg-link: #c3a8ff;
    }
}
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.lg-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px); box-sizing: border-box; }
.lg a { color: var(--lg-link); text-underline-offset: 3px; }
.lg a:focus-visible, .lg summary:focus-visible, .lg-table-wrap:focus-visible { outline: 2px solid var(--lg-accent); outline-offset: 3px; border-radius: 4px; }

.lg-skip { position: absolute; left: 12px; top: -48px; z-index: 20; padding: 10px 14px; background: var(--lg-ink); color: var(--lg-bg) !important; border-radius: 8px; }
.lg-skip:focus { top: 12px; }

/* Bar */
.lg-bar { position: sticky; top: 0; z-index: 10; background: var(--lg-bg); border-bottom: 1px solid var(--lg-line-2); }
.lg-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.lg a.lg-mark { display: inline-flex; align-items: center; }
.lg-mark img { display: block; height: 30px; width: auto; }
.lg-docs { display: flex; gap: 4px; }
.lg .lg-docs a { padding: 8px 14px; border-radius: 999px; color: var(--lg-ink-2); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.lg .lg-docs a:hover { background: var(--lg-fill); color: var(--lg-ink); }
.lg .lg-docs a[aria-current="page"] { background: var(--lg-ink); color: var(--lg-bg); }

/* Title */
.lg-hero { padding: clamp(32px, 6vw, 80px) 0 clamp(24px, 4vw, 48px); }
.lg-title { margin: 0 0 18px; font-family: var(--vantage-font-heading, 'Satoshi', sans-serif); font-weight: 700; font-size: clamp(32px, 5.4vw, 56px); line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance; }
.lg-meta p { margin: 0 0 4px; max-width: 70ch; color: var(--lg-ink-2); font-size: 15px; }
.lg-meta p:first-child strong { color: var(--lg-ink); font-weight: 600; }

/* Layout */
.lg-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; padding-bottom: clamp(48px, 8vw, 112px); }
.lg-toc { position: sticky; top: 88px; max-height: calc(100vh - 112px); overflow-y: auto; }
.lg-toc-box summary { list-style: none; cursor: default; margin: 0 0 10px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lg-ink-3); }
.lg-toc-box summary::-webkit-details-marker { display: none; }
.lg-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--lg-line-2); }
.lg .lg-toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--lg-ink-2); text-decoration: none; font-size: 14px; line-height: 1.4; }
.lg .lg-toc a:hover { color: var(--lg-ink); }
.lg .lg-toc a[aria-current="true"] { color: var(--lg-ink); font-weight: 600; border-left-color: var(--lg-accent); }

/* Document */
.lg-doc { max-width: 74ch; }
.lg-doc h2 { margin: 2.6em 0 0.7em; font-family: var(--vantage-font-heading, 'Satoshi', sans-serif); font-size: clamp(22px, 2.6vw, 28px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; }
.lg-doc h2:first-child { margin-top: 0; }
.lg-doc h3 { margin: 1.9em 0 0.5em; font-family: var(--vantage-font-heading, 'Satoshi', sans-serif); font-size: 18px; line-height: 1.3; letter-spacing: -0.01em; font-weight: 650; }
.lg-doc p { margin: 0 0 1em; }
.lg-doc strong { font-weight: 600; }
.lg-doc :target { animation: lg-flash 1.6s ease-out; }
@keyframes lg-flash { from { background: var(--lg-fill); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .lg-doc :target { animation: none; } }

/* Numbered clauses: the number hangs in its own column, so wrapped lines align. */
.lg-cl { display: grid; grid-template-columns: 3.6em minmax(0, 1fr); column-gap: 0.4em; }
.lg-n { color: var(--lg-ink-3); font-variant-numeric: tabular-nums; font-weight: 500; }
.lg-t { min-width: 0; overflow-wrap: anywhere; }

/* Schedule D table */
.lg-table-wrap { margin: 1.2em 0 1.6em; overflow-x: auto; border: 1px solid var(--lg-line-2); border-radius: 12px; }
.lg-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
.lg-table th, .lg-table td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--lg-line-2); }
.lg-table thead th { background: var(--lg-fill); font-size: 12.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--lg-ink-2); }
.lg-table tbody th { width: 28%; min-width: 150px; font-weight: 600; }
.lg-table tr:last-child th, .lg-table tr:last-child td { border-bottom: 0; }

/* Footer */
.lg-foot { padding: 32px 0 44px; background: var(--lg-fill); font-size: 13.5px; color: var(--lg-ink-2); }
.lg-foot p { margin: 0 0 6px; }

/* Narrow screens: the contents folds into a closed disclosure above the text. */
@media (max-width: 880px) {
    .lg-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .lg-toc { position: static; max-height: none; overflow: visible; }
    .lg-toc-box { border: 1px solid var(--lg-line); border-radius: 12px; padding: 0 16px; }
    .lg-toc-box summary { cursor: pointer; margin: 0; padding: 14px 0; }
    .lg-toc-box[open] summary { border-bottom: 1px solid var(--lg-line-2); margin-bottom: 8px; }
    .lg-toc ol { border-left: 0; padding-bottom: 10px; }
    .lg .lg-toc a { padding: 9px 0; margin: 0; border-left: 0; }
    .lg-cl { grid-template-columns: 3.1em minmax(0, 1fr); }
}
@media (max-width: 480px) {
    .lg { font-size: 16px; }
    .lg-bar-row { padding-top: 8px; padding-bottom: 8px; }
}

@media print {
    .lg-bar, .lg-toc, .lg-skip { display: none; }
    .lg { font-size: 11pt; color: #000; background: #fff; }
    .lg-layout { display: block; }
    .lg-doc { max-width: none; }
    .lg-doc h2 { break-after: avoid; }
    .lg-cl { break-inside: avoid; }
    .lg a { color: inherit; text-decoration: none; }
}
