/* Shared styles for the Terms and Privacy pages (public/terms.html,
   public/privacy.html). Colours follow the CAPTCHA page's theme: the inline
   script in each page's <head> sets <html data-theme> from the same saved
   'captcha-theme' choice that public/index.html uses. */

/* ✅ SAFE — colours and spacing */
:root {
  --bg:        #030712;
  --surface:   rgba(13, 17, 38, 0.88);
  --border:    rgba(124, 58, 237, 0.26);
  --text:      #e2e8f0;
  --muted:     #94a3b8;
  --heading:   #f1f5f9;
  --accent:    #a78bfa;
  --summary:   rgba(124, 58, 237, 0.10);
}
html[data-theme="light"] {
  --bg:        #f0edff;
  --surface:   rgba(255, 255, 255, 0.90);
  --border:    rgba(124, 58, 237, 0.32);
  --text:      #1e1b4b;
  --muted:     #4c4a73;
  --heading:   #1e1b4b;
  --accent:    #6d28d9;
  --summary:   rgba(124, 58, 237, 0.07);
}
/* no script (so no data-theme): follow the system setting */
@media (prefers-color-scheme: light) {
  html:not([data-theme]) {
    --bg: #f0edff; --surface: rgba(255, 255, 255, 0.90); --border: rgba(124, 58, 237, 0.32);
    --text: #1e1b4b; --muted: #4c4a73; --heading: #1e1b4b; --accent: #6d28d9; --summary: rgba(124, 58, 237, 0.07);
  }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(ellipse at top, rgba(124, 58, 237, 0.14), transparent 60%);
  background-attachment: fixed;
}

.legal-top {
  max-width: 760px;
  margin: 0 auto;
  padding: 22px 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.legal-top a { color: var(--muted); text-decoration: none; }
.legal-top a:hover, .legal-top a[aria-current="page"] { color: var(--accent); }
.legal-top nav { display: flex; gap: 16px; }

.legal-doc {
  max-width: 760px;
  margin: 18px auto 0;
  padding: 32px clamp(18px, 5vw, 44px) 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}
@media (max-width: 600px) {
  .legal-doc { margin: 14px 0 0; border-radius: 0; border-left: 0; border-right: 0; }
}

h1 { margin: 0 0 4px; font-size: clamp(26px, 6vw, 32px); line-height: 1.2; color: var(--heading); }
h2 { margin: 32px 0 8px; font-size: 18px; color: var(--heading); }
p, ul { margin: 0 0 12px; }
ul { padding-left: 22px; }
li { margin-bottom: 6px; }
a { color: var(--accent); }
strong { color: var(--heading); }

.legal-date { margin-bottom: 22px; color: var(--muted); font-size: 13.5px; }

.legal-summary {
  margin: 0 0 8px;
  padding: 16px 20px;
  background: var(--summary);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.legal-summary h2 { margin-top: 0; font-size: 15px; }
.legal-summary ul { margin-bottom: 0; }

.legal-contact { list-style: none; padding: 0; }
.legal-contact li { margin-bottom: 4px; }

.legal-foot {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 16px 40px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}
.legal-foot a { color: var(--muted); }
