/* XAG legal pages (Terms, Privacy, Refund policy). Load after site.css: same colours and type, with a calm long-form
   reading layout. Self-contained: no external fonts, no external requests. Uses the :root tokens from site.css. */

.page-legal .top { opacity: 1; transform: none; }
.page-legal .film { display: none; }

.legal {
  width: min(100% - 2.5rem, 70ch);
  margin-inline: auto;
  padding-block: calc(var(--nav-h) + var(--lang-h, 0px) + clamp(2rem, 7vw, 4.5rem)) clamp(3rem, 9vw, 6rem);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  overflow-wrap: break-word;
}

.legal-back { margin-bottom: 1.4rem; font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; }
.legal .legal-back a { display: inline-block; padding: 0.5rem 0; color: var(--ink-2); text-decoration: none; transition: color 0.3s; }
.legal .legal-back a:hover, .legal .legal-back a:focus-visible { color: var(--ink); }
.legal .chapter-mark { margin-bottom: 1.4rem; }

.legal h1 {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2rem, 1.1rem + 4vw, 3.6rem);
  line-height: 1.08; letter-spacing: -0.022em;
  margin-bottom: 0.9rem;
}
.legal-meta { margin-bottom: 1.8rem; font-size: 0.9rem; color: var(--ink-2); }

/* draft notice and the "In short" box */
.legal-draft, .legal-short { position: relative; margin-bottom: 1.6rem; padding: 1.2rem 1.4rem; }
.legal-draft { border: 1px dashed rgba(242, 246, 255, 0.4); color: var(--ink-2); font-size: 0.95rem; }
.legal-short {
  border: 1px solid rgba(255, 176, 0, 0.35);
  background: linear-gradient(180deg, rgba(255, 176, 0, 0.06), rgba(255, 176, 0, 0));
}
.legal-short::before {
  content: ""; position: absolute; top: -1px; left: -1px; width: 2.2rem; height: 2.2rem;
  border-top: 1px solid var(--gold); border-left: 1px solid var(--gold);
}
.legal-aside-k {
  display: block; margin-bottom: 0.7rem;
  font-size: 0.68rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold);
}
.legal-draft p, .legal-short p, .legal-short ul { margin-bottom: 0; }
.legal-short li { margin-bottom: 0.4rem; }
.legal-short li:last-child { margin-bottom: 0; }

/* headings, clauses, lists */
.legal h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.55rem);
  line-height: 1.25; letter-spacing: -0.01em;
  margin: 2.8rem 0 1rem; padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.legal p { margin-bottom: 1rem; }
.legal .clause { position: relative; padding-left: 3rem; }
.legal .clause .num { position: absolute; left: 0; top: 0; color: var(--gold); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.legal ul, .legal ol { margin: 0 0 1.2rem; padding: 0; list-style: none; }
.legal .clause + ul, .legal .clause + ol { margin-left: 3rem; }
.legal li { position: relative; margin-bottom: 0.55rem; padding-left: 1.4rem; }
.legal ul > li::before { content: ""; position: absolute; left: 0; top: 0.85em; width: 0.55rem; height: 1px; background: var(--gold); }
.legal ol { counter-reset: step; }
.legal ol > li { counter-increment: step; }
.legal ol > li::before { content: counter(step) "."; position: absolute; left: 0; top: 0; color: var(--gold); font-variant-numeric: tabular-nums; }
.legal strong { font-weight: 600; }

.legal a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.legal a:hover, .legal a:focus-visible { text-decoration-thickness: 2px; }

/* placeholders and "to confirm" tags: easy to spot, easy to search for */
.legal mark.ph { padding: 0.05em 0.3em; border-radius: 2px; background: rgba(255, 176, 0, 0.16); color: #ffd36b; font-weight: 500; }

.legal-nav { margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line); font-size: 0.95rem; color: var(--ink-2); }
.legal-nav a { display: inline-block; padding: 0.25rem 0; }

@media (max-width: 480px) {
  .legal { font-size: 1rem; }
  .legal .clause { padding-left: 2.6rem; }
  .legal .clause + ul, .legal .clause + ol { margin-left: 2.6rem; }
}

@media print {
  .page-legal .top, .page-legal .keylight, .page-legal .foot, .page-legal .lang, .page-legal .lang-noscript, .legal-back, .legal .chapter-mark { display: none !important; }
  .legal { width: auto; padding-block: 0; color: #000; font-size: 11pt; }
  .legal h1, .legal h2, .legal a, .legal .num, .legal-aside-k { color: #000; }
  .legal h2 { border-top-color: #999; }
  .legal-draft, .legal-short { border-color: #000; background: none; color: #000; }
  .legal mark.ph { background: #eee; color: #000; }
  .legal-meta, .legal-nav { color: #000; }
}
