/* =============================================================================
   Aura4 — shared stylesheet for static, server-rendered content pages
   Palette mirrors the app shell and privacy policy: purple / gold on near-black
   ========================================================================== */

:root {
  --purple: #8b5cf6;
  --purple-dim: rgba(139, 92, 246, 0.14);
  --gold: #fbbf24;
  --bg: #0a0a0a;
  --bg-alt: #1a1a2e;
  --surface: rgba(255, 255, 255, 0.025);
  --text: #f5f5f7;
  --body: #e4e4e7;
  --muted: #a1a1aa;
  --border: rgba(139, 92, 246, 0.18);
  --radius: 20px;
  --measure: 780px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  background-image: radial-gradient(1200px 600px at 50% -10%, var(--bg-alt) 0%, var(--bg) 55%);
  background-repeat: no-repeat;
  color: var(--text);
  line-height: 1.9;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

.skip {
  position: absolute; right: -9999px; top: 0;
  background: var(--purple); color: #fff; padding: 12px 20px;
  border-radius: 0 0 12px 0; font-weight: 700; z-index: 100;
}
.skip:focus { right: 0; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* ---------- header / nav ---------- */
header.site {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}
.bar {
  max-width: 1120px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img { height: 42px; width: auto; }
.brand b {
  font-weight: 900; font-size: 1.28rem; letter-spacing: 0.03em;
  background: linear-gradient(90deg, var(--purple), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand span { color: var(--muted); font-size: 0.8rem; font-weight: 600; }
nav.site ul { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; }
nav.site a {
  color: var(--body); text-decoration: none; font-weight: 600; font-size: 0.94rem;
  padding: 7px 13px; border-radius: 999px; display: block;
  transition: background 0.18s, color 0.18s;
}
nav.site a:hover { background: var(--purple-dim); color: var(--text); }
nav.site a[aria-current="page"] { background: var(--purple-dim); color: var(--gold); }

/* ---------- layout ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 56px 24px 96px; }
.wrap.narrow { max-width: var(--measure); }

.crumbs { color: var(--muted); font-size: 0.86rem; margin-bottom: 22px; }
.crumbs a { color: var(--purple); text-decoration: none; }
.crumbs a:hover { color: var(--gold); }

.eyebrow {
  display: inline-block; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.16em; color: var(--gold);
  border: 1px solid rgba(251, 191, 36, 0.35);
  padding: 5px 13px; border-radius: 999px; margin-bottom: 20px;
}

h1 {
  font-size: clamp(1.95rem, 4.6vw, 2.85rem); font-weight: 900;
  line-height: 1.3; margin-bottom: 14px; letter-spacing: -0.01em;
}
h1 .accent { color: var(--purple); }

.lede { font-size: clamp(1.03rem, 2.1vw, 1.18rem); color: var(--body); max-width: 68ch; }

.meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
  color: var(--muted); font-size: 0.87rem;
  margin: 26px 0 34px; padding-bottom: 26px;
  border-bottom: 1px solid var(--border);
}
.meta .dot { color: var(--border); }

/* ---------- prose ---------- */
.prose { max-width: var(--measure); }
.prose h2 {
  font-size: clamp(1.4rem, 2.8vw, 1.72rem); font-weight: 800;
  margin: 52px 0 16px; line-height: 1.4; scroll-margin-top: 90px;
}
.prose h2::before {
  content: ""; display: block; width: 46px; height: 3px; margin-bottom: 16px;
  background: linear-gradient(90deg, var(--purple), var(--gold)); border-radius: 3px;
}
.prose h3 {
  font-size: 1.14rem; font-weight: 700; color: var(--purple);
  margin: 32px 0 10px; line-height: 1.5;
}
.prose p { color: var(--body); margin-bottom: 18px; }
.prose ul, .prose ol { margin: 0 22px 22px 0; padding-right: 8px; color: var(--body); }
.prose li { margin-bottom: 10px; }
.prose li::marker { color: var(--purple); font-weight: 700; }
.prose strong { color: var(--text); font-weight: 700; }
.prose a { color: var(--purple); font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(139, 92, 246, 0.4); }
.prose a:hover { color: var(--gold); border-color: var(--gold); }

blockquote {
  border-right: 3px solid var(--gold);
  background: rgba(251, 191, 36, 0.05);
  padding: 18px 22px; margin: 28px 0; border-radius: 0 14px 14px 0;
  color: var(--text); font-size: 1.02rem;
}

.note {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 16px; padding: 22px 24px; margin: 30px 0;
}
.note b { display: block; color: var(--gold); margin-bottom: 8px; font-size: 0.95rem; letter-spacing: 0.02em; }
.note p:last-child { margin-bottom: 0; }

.table-scroll { overflow-x: auto; margin: 28px 0; border: 1px solid var(--border); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 520px; }
caption { caption-side: bottom; color: var(--muted); font-size: 0.82rem; padding: 12px 16px; text-align: right; }
th, td { padding: 13px 18px; text-align: right; border-bottom: 1px solid var(--border); }
th { background: var(--purple-dim); color: var(--text); font-weight: 800; font-size: 0.88rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.015); }

/* ---------- table of contents ---------- */
.toc {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius); padding: 24px 26px; margin: 34px 0 44px;
}
.toc b { display: block; font-size: 0.95rem; color: var(--gold); margin-bottom: 12px; letter-spacing: 0.02em; }
.toc ol { margin: 0 20px 0 0; color: var(--body); }
.toc li { margin-bottom: 7px; }
.toc a { color: var(--body); text-decoration: none; font-weight: 600; }
.toc a:hover { color: var(--purple); }

/* ---------- cards ---------- */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); margin-top: 38px; }
.card {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius); padding: 28px 26px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
a.card { text-decoration: none; color: inherit; }
a.card:hover { border-color: rgba(139, 92, 246, 0.5); transform: translateY(-3px); background: rgba(139, 92, 246, 0.05); }
.card .kicker { font-size: 0.73rem; font-weight: 800; letter-spacing: 0.13em; color: var(--gold); }
.card h2, .card h3 { font-size: 1.16rem; font-weight: 800; line-height: 1.55; margin: 0; color: var(--text); }
.card h2::before { display: none; }
.card p { color: var(--muted); font-size: 0.93rem; line-height: 1.75; margin: 0; }
.card .more { color: var(--purple); font-weight: 700; font-size: 0.89rem; margin-top: auto; padding-top: 6px; }

/* ---------- ads: only ever placed inside long-form editorial pages ---------- */
.ad-slot { margin: 44px 0; max-width: var(--measure); }
.ad-slot > span {
  display: block; font-size: 0.68rem; letter-spacing: 0.18em;
  color: #71717a; margin-bottom: 8px; font-weight: 700;
}
.ad-slot ins { display: block; min-height: 90px; }

/* ---------- footer ---------- */
footer.site { border-top: 1px solid var(--border); background: rgba(0, 0, 0, 0.35); }
.foot { max-width: 1120px; margin: 0 auto; padding: 52px 24px 40px; }
.foot-cols { display: grid; gap: 34px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.foot h4 { font-size: 0.8rem; letter-spacing: 0.14em; color: var(--gold); font-weight: 800; margin-bottom: 14px; }
.foot ul { list-style: none; }
.foot li { margin-bottom: 9px; }
.foot a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.foot a:hover { color: var(--purple); }
.foot p { color: var(--muted); font-size: 0.92rem; margin-bottom: 9px; }
.foot .legal {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.85rem; text-align: center;
}

@media (max-width: 640px) {
  .wrap { padding: 38px 20px 70px; }
  body { line-height: 1.82; }
  nav.site a { font-size: 0.88rem; padding: 6px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
