/* The article of the legal pages (app/public/legal/*.html), between <!-- legal:start --> and <!-- legal:end -->.
   The web site (web/src/lib/legal.ts) shows the same article inside its own frame and imports this file in
   web/src/app/globals.css: every rule is scoped to .legal, with its own colors, and does not rely on the page's. */

.legal {
  --l-ink: #ffffff; --l-text: rgb(255 255 255 / 0.86); --l-muted: #a1a5af; --l-line: #2a2c33; --l-surface: #17181d;
  --l-accent: #2ee6a6; --l-accent-soft: #0f2a21; --l-warning: #ffb547;
  color: var(--l-text); font-size: 17px; line-height: 1.6; overflow-wrap: break-word;
}
.legal a { color: var(--l-accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.legal a:focus-visible, .legal summary:focus-visible { outline: 3px solid var(--l-accent); outline-offset: 2px; border-radius: 4px; }
.legal ul { list-style: disc; }
.legal ol { list-style: decimal; }
.legal table { border-collapse: collapse; }
.legal code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: var(--l-surface); border: 1px solid var(--l-line); border-radius: 6px; padding: 0 4px; }
.legal h1 { color: var(--l-ink); font-weight: 700; font-size: 34px; line-height: 1.12; letter-spacing: -0.01em; margin: 18px 0 6px; }
.legal h2 { color: var(--l-ink); font-weight: 700; font-size: 23px; line-height: 1.25; margin: 34px 0 8px; }
.legal h3 { color: var(--l-ink); font-weight: 700; font-size: 19px; line-height: 1.3; margin: 22px 0 6px; }
.legal p, .legal ul, .legal ol { margin: 0 0 12px; }
.legal ul, .legal ol { padding-left: 1.3em; }
.legal li { margin: 0 0 6px; }
.legal li::marker { color: var(--l-muted); }
.legal strong, .legal b { color: var(--l-ink); font-weight: 600; }
.legal .meta { color: var(--l-muted); font-size: 15px; margin-bottom: 14px; }
.legal .draft { border: 2px solid var(--l-warning); color: var(--l-warning); border-radius: 14px; padding: 12px 16px; font-size: 15px; font-weight: 600; line-height: 1.45; }
.legal .ph { background: rgb(255 181 71 / 0.14); color: var(--l-warning); border-radius: 6px; padding: 0 4px; font-weight: 600; white-space: nowrap; }
.legal .short { background: var(--l-surface); border: 1px solid var(--l-line); border-radius: 18px; padding: 16px 18px 6px; margin: 18px 0 10px; }
.legal .short h2 { margin-top: 0; font-size: 20px; }
.legal .short li { margin-bottom: 8px; }
.legal .key { background: var(--l-accent-soft); border-left: 4px solid var(--l-accent); border-radius: 10px; padding: 12px 16px; color: var(--l-ink); }
.legal .key p:last-child { margin-bottom: 0; }
.legal nav.toc { border-top: 1px solid var(--l-line); border-bottom: 1px solid var(--l-line); padding: 10px 0 4px; margin: 18px 0 6px; font-size: 16px; }
.legal nav.toc p { color: var(--l-muted); font-weight: 600; margin-bottom: 6px; }
.legal nav.toc ol { columns: 2 220px; column-gap: 24px; padding-left: 1.4em; }
.legal nav.toc li { break-inside: avoid; }
.legal .table-box { overflow-x: auto; margin: 10px 0 16px; border: 1px solid var(--l-line); border-radius: 14px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--l-line); }
.legal tr:last-child td { border-bottom: 0; }
.legal th { color: var(--l-ink); background: var(--l-surface); font-weight: 600; }
.legal td:first-child { color: var(--l-ink); font-weight: 600; min-width: 7.5em; }
.legal details { background: var(--l-surface); border: 1px solid var(--l-line); border-radius: 16px; padding: 0 16px; margin: 0 0 10px; }
.legal summary { display: list-item; cursor: pointer; color: var(--l-ink); font-weight: 600; font-size: 18px; padding: 14px 0; list-style-position: outside; margin-left: 1.1em; }
.legal details[open] summary { border-bottom: 1px solid var(--l-line); margin-bottom: 12px; }
.legal details > :last-child { margin-bottom: 14px; }
.legal .path { color: var(--l-ink); font-weight: 600; }
.legal .muted { color: var(--l-muted); font-size: 15px; }

/* On phones, the two-column-plus tables of the privacy policy become one card per row: no sideways scrolling. */
@media (max-width: 599px) {
  .legal table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .legal table.stack, .legal table.stack tbody, .legal table.stack tr, .legal table.stack td { display: block; width: 100%; }
  .legal table.stack tr { padding: 12px 14px; border-bottom: 1px solid var(--l-line); }
  .legal table.stack tr:last-child { border-bottom: 0; }
  .legal table.stack td { padding: 2px 0; border: 0; min-width: 0; }
  .legal table.stack td:first-child { font-size: 16px; }
  .legal table.stack td:last-child { color: var(--l-muted); }
  .legal table.why td:last-child::before { content: "Why: "; color: var(--l-ink); font-weight: 600; }
  .legal table.when td:last-child::before { content: "When: "; color: var(--l-ink); font-weight: 600; }
  .legal:lang(fr) table.why td:last-child::before { content: "Pourquoi : "; }
  .legal:lang(fr) table.when td:last-child::before { content: "Quand : "; }
}
@media (min-width: 600px) {
  .legal { font-size: 18px; }
  .legal h1 { font-size: 40px; }
}
@media print {
  .legal { --l-ink: #000; --l-text: #111; --l-muted: #444; --l-line: #bbb; --l-surface: #fff; --l-accent: #064; --l-accent-soft: #fff; --l-warning: #840; }
}
