/* ============================================================
   UQ.Rocks — shared theme for sub-pages (privacy / support /
   terms / extension landing). Mirrors style.css tokens, plus
   page-chrome utilities. The main app links style.css separately.
   ============================================================ */

:root {
  --bg:           #0a0a0a;
  --bg-2:         #111111;
  --surface:      #161616;
  --surface-2:    #1d1d1d;
  --surface-3:    #262626;
  --border:       rgba(255, 255, 255, 0.06);
  --border-hi:    rgba(255, 255, 255, 0.10);
  --text:         #f5f5f5;
  --text-2:       #d4d4d4;
  --muted:        rgba(245, 245, 245, 0.65);
  --muted-soft:   rgba(245, 245, 245, 0.40);
  --muted-faint:  rgba(245, 245, 245, 0.22);

  --accent:       #c8ff00;
  --accent-2:     #d9ff4a;
  --accent-soft:  rgba(200, 255, 0, 0.12);
  --accent-glow:  rgba(200, 255, 0, 0.35);
  --danger:       #ff4d6d;

  --font-sans:    'Geist', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

/* Theme presets — same as style.css */
:root[data-theme="magenta"] {
  --bg: #160a13; --bg-2: #1d1019;
  --surface: #211420; --surface-2: #2a1a28; --surface-3: #352230;
  --accent: #ff3aa1; --accent-2: #ff5eb5;
  --accent-soft: rgba(255, 58, 161, 0.13);
  --accent-glow: rgba(255, 58, 161, 0.42);
}
:root[data-theme="cyan"] {
  --bg: #06121a; --bg-2: #0c1a26;
  --surface: #11212e; --surface-2: #172a3a; --surface-3: #203247;
  --accent: #3decec; --accent-2: #6ff3f3;
  --accent-soft: rgba(61, 236, 236, 0.13);
  --accent-glow: rgba(61, 236, 236, 0.4);
}
:root[data-theme="amber"] {
  --bg: #161008; --bg-2: #1d160c;
  --surface: #221a10; --surface-2: #2a2014; --surface-3: #34291a;
  --accent: #ffaa00; --accent-2: #ffbe3d;
  --accent-soft: rgba(255, 170, 0, 0.16);
  --accent-glow: rgba(255, 170, 0, 0.45);
}
:root[data-theme="violet"] {
  --bg: #0e0a1a; --bg-2: #150f24;
  --surface: #19132c; --surface-2: #211a38; --surface-3: #2a2348;
  --accent: #a78bfa; --accent-2: #c4adff;
  --accent-soft: rgba(167, 139, 250, 0.16);
  --accent-glow: rgba(167, 139, 250, 0.42);
}
:root[data-theme="paper"] {
  --bg: #f6f4ee;
  --bg-2: #ebe7dc;
  --surface: #ffffff;
  --surface-2: #f1ede1;
  --surface-3: #e6e0d0;
  --border: rgba(20, 18, 14, 0.08);
  --border-hi: rgba(20, 18, 14, 0.14);
  --text: #14120e;
  --text-2: #3a3631;
  --muted: rgba(20, 18, 14, 0.62);
  --muted-soft: rgba(20, 18, 14, 0.42);
  --muted-faint: rgba(20, 18, 14, 0.22);
  --accent: #ff3a2d;
  --accent-2: #ff5440;
  --accent-soft: rgba(255, 58, 45, 0.10);
  --accent-glow: rgba(255, 58, 45, 0.32);
  --danger: #d12a44;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; background: var(--bg); }

body {
  font-family: var(--font-sans);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;

  background-image:
    radial-gradient(ellipse 1200px 700px at 70% -10%, var(--accent-soft) 0%, transparent 55%),
    radial-gradient(ellipse 800px 600px at 0% 100%, rgba(255, 255, 255, 0.02) 0%, transparent 60%);
}
:root[data-theme="paper"] body {
  background-image:
    radial-gradient(ellipse 1200px 700px at 70% -10%, rgba(255, 58, 45, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 800px 600px at 0% 100%, rgba(0, 0, 0, 0.025) 0%, transparent 60%);
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--accent-2); }

p { color: var(--text-2); }

code {
  background: var(--surface-2);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--accent);
}

strong { color: var(--text); font-weight: 600; }

button { font-family: inherit; }

h1, h2, h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--text);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  padding: 0.95rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  border-bottom: 1px solid var(--border);
}
:root[data-theme="paper"] .site-header { background: rgba(246, 244, 238, 0.78); }

.site-header .logo-container {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.site-header .logo-container a {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
}

.brand-glyph {
  display: inline-grid;
  place-items: center;
  width: 26px; height: 26px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: -0.04em;
  flex-shrink: 0;
}

.site-header img { display: none; }

.site-header h1 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.site-header .brand-accent { color: var(--accent); }

.header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-links {
  display: flex;
  gap: 0.15rem;
  align-items: center;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.86rem;
  font-family: var(--font-sans);
  letter-spacing: -0.005em;
  transition: background 0.16s ease, color 0.16s ease;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.is-active { color: var(--text); background: var(--surface-2); }

/* ---------- Theme picker ---------- */
.theme-picker {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.theme-swatch {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border-hi);
  cursor: pointer;
  position: relative;
  padding: 0;
  transition: transform 0.18s ease;
}
.theme-swatch:hover { transform: scale(1.18); }
.theme-swatch.is-active::after {
  content: '';
  position: absolute;
  inset: -5px;
  border: 1.5px solid var(--text);
  border-radius: 50%;
  pointer-events: none;
}
.theme-swatch[data-theme="lime"]    { background: #c8ff00; }
.theme-swatch[data-theme="magenta"] { background: #ff3aa1; }
.theme-swatch[data-theme="cyan"]    { background: #3decec; }
.theme-swatch[data-theme="amber"]   { background: #ffaa00; }
.theme-swatch[data-theme="violet"]  { background: #a78bfa; }
.theme-swatch[data-theme="paper"]   { background: linear-gradient(135deg, #f6f4ee 50%, #14120e 50%); }

@media (max-width: 720px) {
  .theme-picker { display: none; }
}

/* ---------- Page layout ---------- */
.page {
  position: relative;
  z-index: 1;
  padding: 3rem 1.5rem 4rem;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.page--wide { max-width: 1180px; }

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-soft);
  margin-bottom: 1.25rem;
}
.page-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-glow);
}

.page-title {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.page-lede {
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 720px;
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 2.5rem;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.section-title:first-of-type { margin-top: 0; }

.content-text {
  margin-bottom: 1.1rem;
  color: var(--text-2);
  line-height: 1.7;
}

.content-text + ul,
.content-text + ol { margin-top: -0.25rem; }

ul, ol {
  margin-left: 1.4rem;
  margin-bottom: 1.4rem;
}
li {
  margin-bottom: 0.4rem;
  color: var(--text-2);
  line-height: 1.7;
}
li::marker { color: var(--accent); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
}

.card + .card { margin-top: 1rem; }

@media (max-width: 640px) {
  .card { padding: 1.5rem 1.25rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.35rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 6px 18px var(--accent-soft);
}
.btn-primary:hover {
  background: var(--accent-2);
  color: var(--bg);
  box-shadow: 0 10px 26px var(--accent-glow);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-hi);
}
.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.back-link:hover { color: var(--accent); }

/* ---------- Updated-on stamp ---------- */
.timestamp {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted-soft);
}
.timestamp strong { color: var(--text); font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 3rem;
  padding: 2rem 1.5rem 2.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1340px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer a {
  color: var(--muted);
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  transition: color 0.16s ease, background 0.16s ease;
}
.site-footer a:hover { color: var(--text); background: var(--surface); }

.site-footer .mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  color: var(--text);
}

/* ---------- Responsive ---------- */
@media screen and (max-width: 768px) {
  .site-header { padding: 0.75rem 1rem; gap: 0.75rem; }
  .page { padding: 2rem 1rem 3rem; }
  .nav-links a { font-size: 0.8rem; padding: 0.35rem 0.7rem; }
}
