/* ═══════════════════════════════════════════════════════════
   SLYRA — Legal pages (terms, privacy, cookies, DPA, affiliate terms)
   Loaded after main.css. The texts keep their markup (.terms-*); this sheet reads them the way a
   long legal text reads best: one centred column, a large light title, the date under it, the
   contents as a numbered list at the head of the text (scripts/legal.js), numbered sections.
   No sidebar, no cards: the text alone.
═══════════════════════════════════════════════════════════ */

body.legal {
  --bg:         #FAFAFA;
  --card:       #FFFFFF;
  --text:       #111113;
  --text-dim:   #2B2B30;
  --text-muted: #6E6E75;
  --border:     rgba(17,17,19,0.08);
  --border-hov: rgba(17,17,19,0.16);
  --lg-mint-soft: rgba(0,245,160,0.16);
  background: var(--bg);
  color: var(--text-dim);
}
body.legal .nav--light,
body.legal .nav--light.nav--scrolled,
body.legal .nav-mobile { background: var(--bg); }
body.legal a:focus-visible,
body.legal button:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }

/* From one legal page to the next: the browser fades one into the other */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.18s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

body.legal .terms-page { min-height: 0; padding: 56px 24px 120px; background: var(--bg); }
body.legal .terms-layout { display: block; max-width: 880px; margin: 0 auto; }
body.legal .terms-inner { max-width: none; }
.lg-docs { display: none; }

/* The language of the text, a small switch above the title */
.lg-top { max-width: 880px; margin: 0 auto 8px; display: flex; justify-content: flex-end; }
.lg-lang { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 100px; background: var(--card); }
.lg-lang-btn {
  min-height: 32px; padding: 0 12px; border: none; border-radius: 100px; background: none; cursor: pointer;
  font-family: var(--font); font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; color: var(--text-muted);
}
.lg-lang-btn:hover { color: var(--text); }
.lg-lang-btn[aria-pressed="true"] { background: var(--text); color: #fff; }

/* Title and date */
body.legal .terms-header { margin: 0 0 56px; padding: 0; border: none; }
body.legal .terms-eyebrow { display: none; }
body.legal .terms-h1 {
  font-size: clamp(38px, 5.4vw, 56px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--text);
  text-wrap: balance;
  margin: 0 0 18px;
}
body.legal .terms-meta { display: block; padding: 0; border: none; background: none; font-size: clamp(18px, 2.2vw, 22px); font-weight: 400; color: var(--text); letter-spacing: -0.01em; }
body.legal .terms-meta span { color: inherit; font-weight: 400; }

/* The contents: numbered links, as many lines as sections */
.lg-contents { margin: 0 0 72px; }
.lg-contents-title { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; color: var(--text); margin: 0 0 22px; }
.lg-contents-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.lg-contents-list a { font-size: 16px; line-height: 1.45; color: var(--text); text-decoration: none; }
.lg-contents-list a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* The sections, numbered by the page itself (1., 2., …): the "Article 1" labels are not shown */
body.legal .terms-version { counter-reset: lg-section; }
body.legal .terms-section { counter-increment: lg-section; margin: 0 0 48px; scroll-margin-top: 24px; }
body.legal .terms-section-num { display: none; }
body.legal .terms-divider { display: none; }
body.legal .terms-h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  text-wrap: balance;
  margin: 0 0 18px;
}
body.legal .terms-h2::before { content: counter(lg-section) ". "; }
body.legal .terms-body { font-size: 16px; line-height: 1.6; color: var(--text-dim); }
body.legal .terms-body p { margin: 0 0 16px; }
body.legal .terms-body p:last-child { margin-bottom: 0; }
body.legal .terms-body strong { color: var(--text); font-weight: 600; }
body.legal .terms-body ul { display: block; list-style: disc; padding-left: 32px; margin: 12px 0 18px; }
body.legal .terms-body li { padding-left: 4px; margin-bottom: 10px; line-height: 1.55; }
body.legal .terms-body li::marker { color: var(--text); }
body.legal .terms-body a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
body.legal .terms-body a:hover { text-decoration-color: var(--accent); text-decoration-thickness: 2px; opacity: 1; }

/* The cookies page: its button to change one's choices */
.lg-choices { display: inline-flex; align-items: center; gap: 9px; margin-top: 6px; min-height: 44px; padding: 0 22px; border: none; border-radius: 100px; background: var(--ink); color: #fff; font-family: var(--font); font-size: 14.5px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.lg-choices:hover { background: var(--ink-hover); }
.lg-choices::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

@media (max-width: 640px) {
  body.legal .terms-page { padding: 32px 16px 88px; }
  body.legal .terms-header { margin-bottom: 40px; }
  .lg-contents { margin-bottom: 56px; }
  .lg-contents-list { gap: 14px; }
  body.legal .terms-body { font-size: 15.5px; }
  body.legal .terms-body ul { padding-left: 24px; }
}
