/* ═══════════════════════════════════════════════════════════════════════
   The legal pages (terms, data processing agreement, privacy policy and
   their archived versions; owner, 2026-12-02: typography and spacing only,
   the words stay as they are). Loaded by public/legal_base.html alone,
   after site.css, whose tokens it reads. Every class here is `lg-`; the
   text itself is plain HTML (h2, p, ul, ol, table) styled under .lg-text.
   ═══════════════════════════════════════════════════════════════════════ */

/* the opening: tag, title, the day it took effect, the three documents */
.lg-head { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.lg-grid { position: absolute; inset: 0; pointer-events: none; }
.lg-head-in { position: relative; padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(28px, 4vw, 44px); }
.lg-head h1 { margin-top: 18px; max-width: 18ch; font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.1; letter-spacing: -.03em; color: var(--ink); text-wrap: balance; }
.lg-updated { margin-top: 16px; max-width: 68ch; font-size: 15px; line-height: 1.65; color: var(--muted); text-wrap: pretty; }
.lg-updated a, .lg-archived a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.lg-updated a:hover { text-decoration-color: currentColor; }
.lg-archived { margin-top: 18px; max-width: 68ch; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--orange) 26%, transparent); background: var(--orange-tint); font-size: 14.5px; font-weight: 500; color: var(--text); }
.lg-archived::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: none; }

.lg-chips { margin-top: 22px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
.lg-chips::-webkit-scrollbar { display: none; }
.lg-chips a { flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color .18s, border-color .18s; }
.lg-chips a:hover { color: var(--text); border-color: var(--faint); }
.lg-chips a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
@media (min-width: 1000px) { .lg-chips { display: none; } }

/* three columns: documents · text · contents */
.lg-art { display: grid; gap: 32px; padding-top: clamp(28px, 4vw, 52px); padding-bottom: clamp(56px, 7vw, 96px); }
@media (min-width: 1000px) { .lg-art { grid-template-columns: 210px minmax(0, 1fr); gap: 56px; } }
@media (min-width: 1240px) { .lg-art { grid-template-columns: 210px minmax(0, 1fr) 230px; gap: 56px; } }
.lg-side, .lg-toc { display: none; }
@media (min-width: 1000px) { .lg-side { display: block; position: sticky; top: 96px; align-self: start; } }
@media (min-width: 1240px) { .lg-toc { display: block; position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; } }
.lg-side h2, .lg-toc h2 { font-size: 12.5px; font-weight: 600; color: var(--faint); letter-spacing: .02em; margin-bottom: 10px; }
.lg-side ol, .lg-toc ol { display: grid; gap: 1px; border-left: 1px solid var(--line); }
.lg-side a, .lg-toc a { display: block; margin-left: -1px; padding: 7px 0 7px 14px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.4; color: var(--muted); transition: color .18s, border-color .25s; }
.lg-toc a { display: grid; grid-template-columns: 22px minmax(0, 1fr); padding-block: 5px; font-size: 13.5px; }
.lg-toc a span { color: var(--faint); font-variant-numeric: tabular-nums; }
.lg-side a:hover, .lg-toc a:hover { color: var(--text); }
.lg-side a[aria-current="page"], .lg-toc a.lg-on { color: var(--text); font-weight: 600; border-color: var(--ink); }
.lg-toc a.lg-on span { color: var(--blue); }
.lg-print { margin-top: 22px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13.5px; font-weight: 500; color: var(--muted); background: var(--card); cursor: pointer; }
.lg-print:hover { color: var(--text); border-color: var(--faint); }

/* the contents on a phone and a tablet */
.lg-tocm { margin-bottom: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--soft); }
.lg-tocm summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; font-weight: 600; font-size: 15px; color: var(--text); }
.lg-tocm summary::-webkit-details-marker { display: none; }
.lg-tocm summary svg { width: 18px; height: 18px; color: var(--muted); transition: transform .2s; }
.lg-tocm[open] summary svg { transform: rotate(180deg); }
.lg-tocm ol { padding: 0 18px 14px; display: grid; gap: 2px; font-size: 15px; }
.lg-tocm a { display: grid; grid-template-columns: 26px minmax(0, 1fr); padding-block: 5px; color: var(--muted); }
.lg-tocm a span { color: var(--faint); font-variant-numeric: tabular-nums; }
.lg-tocm a:hover { color: var(--text); }
@media (min-width: 1240px) { .lg-tocm { display: none; } }

/* the text: a reading column, numbered sections parted by a hairline */
.lg-body { min-width: 0; max-width: 720px; }
.lg-text { font-size: 16px; line-height: 1.75; color: color-mix(in srgb, var(--text) 86%, var(--muted)); overflow-wrap: break-word; hyphens: manual; }
@media (min-width: 640px) { .lg-text { font-size: 16.5px; } }
.lg-text > :first-child { margin-top: 0; }
.lg-text h2 { scroll-margin-top: 96px; margin-top: clamp(40px, 5vw, 56px); padding-top: clamp(28px, 3.4vw, 36px); border-top: 1px solid var(--line); font-family: var(--display); font-weight: 600; font-size: clamp(1.25rem, 2vw, 1.45rem); line-height: 1.3; letter-spacing: -.015em; color: var(--ink); text-wrap: balance; }
.lg-text > h2:first-child { border-top: 0; padding-top: 6px; }
.lg-text h3 { margin-top: 26px; font-family: var(--display); font-weight: 600; font-size: 1.08rem; line-height: 1.4; color: var(--ink); }
.lg-text p { margin-top: 14px; text-wrap: pretty; }
.lg-text h2 + p, .lg-text h2 + ul, .lg-text h2 + ol, .lg-text h2 + div { margin-top: 16px; }
.lg-text strong, .lg-text b { font-weight: 600; color: var(--text); }
.lg-text a { color: var(--blue); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--blue) 35%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.lg-text a:hover { text-decoration-color: currentColor; }
.lg-text ul, .lg-text ol { margin-top: 14px; display: grid; gap: 10px; padding-left: 0 !important; }
.lg-text ul > li { position: relative; padding-left: 24px; list-style: none; }
.lg-text ul > li::before { content: ""; position: absolute; left: 6px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); box-shadow: inset 0 0 0 1px var(--faint); }
.lg-text ol { counter-reset: lg-item; }
.lg-text ol > li { position: relative; padding-left: 38px; list-style: none; counter-increment: lg-item; }
.lg-text ol > li::before { content: counter(lg-item); position: absolute; left: 0; top: .18em; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--panel); color: var(--ink); font: 600 12.5px/1 var(--body); font-variant-numeric: tabular-nums; }
.lg-text li > ul, .lg-text li > ol { margin-top: 10px; }
.lg-text code { font-size: .9em; padding: 1px 6px; border-radius: 6px; background: var(--panel); }
.lg-text button { color: var(--blue) !important; }

/* the agreement's annex: a hairline table in a soft frame */
.lg-text div:has(> table) { margin-top: 18px; border: 1px solid var(--line); border-radius: 16px; overflow-x: auto; background: var(--card); }
.lg-text table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14.5px; line-height: 1.55; }
.lg-text > table { margin-top: 18px; }
.lg-text th, .lg-text td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); color: color-mix(in srgb, var(--text) 86%, var(--muted)); }
.lg-text th { font-weight: 600; font-size: 13px; color: var(--muted); background: var(--soft); white-space: nowrap; }
.lg-text tr:last-child td { border-bottom: 0; }
.lg-text td:first-child { font-weight: 600; color: var(--text); }

/* paper: the text alone, black on white */
@media print {
  .site-nav, header, footer, .foot, .lg-side, .lg-toc, .lg-tocm, .lg-chips, .lg-grid, #partner-consent, [data-consent] { display: none !important; }
  .lg-head { border: 0; background: none !important; }
  .lg-head-in, .lg-art { padding: 0 !important; max-width: none; }
  .lg-art { display: block; }
  .lg-body { max-width: none; }
  .lg-text, .lg-text h2, .lg-head h1, .lg-updated, .lg-text td { color: #000 !important; }
  .lg-text { font-size: 11pt; line-height: 1.55; }
  .lg-text h2 { break-after: avoid; border-top-color: #ccc; margin-top: 18pt; padding-top: 10pt; }
  .lg-text a { color: #000; }
}
