/* Inner pages (privacy, terms, scholars, delete account, legal).
   Loaded after each page's own <style>: maps the page's old colour
   variables (renamed --o-*) onto the site palette, so light and dark
   themes both work, and restyles the shared hero. */

:root {
  --o-ink: var(--paper);
  --o-surface: var(--surface);
  --o-elevated: var(--surface-2);
  --o-border: var(--line);
  --o-gold: var(--gold-text);
  --o-gold-dim: var(--gold-soft);
  --o-gold-border: rgba(201, 168, 76, .45);
  --o-text: var(--ink);
  --o-muted: var(--muted);
  --o-faint: var(--muted);
  --o-red: #c0392b;
  --o-danger: #c0392b;
  --o-danger-dim: rgba(192, 57, 43, .08);
  --o-danger-border: rgba(192, 57, 43, .35);
}

body { background: var(--paper); color: var(--ink); font-family: var(--font-body); }
body.lang-ur { font-family: var(--font-urdu); }

/* Hero: the homepage's green band */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--green-deep); color: var(--on-green);
  border-bottom: 0;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='1'%3E%3Cpath d='M36 6 44.5 27.5 66 36 44.5 44.5 36 66 27.5 44.5 6 36 27.5 27.5Z'/%3E%3Crect x='21' y='21' width='30' height='30' transform='rotate(45 36 36)'/%3E%3Crect x='21' y='21' width='30' height='30'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 75%);
}
.hero h1 { color: var(--on-green); font-family: var(--font-display); font-weight: 400; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero p, .hero-sub, .hero-date, .hero-date span { color: rgba(247, 244, 236, .8); }
.hero-tag { color: var(--gold); background: rgba(201, 168, 76, .14); border-color: rgba(201, 168, 76, .45); }
.hero-arabic { color: var(--gold); }
.hero-disclaimer { color: var(--on-green); background: rgba(201, 168, 76, .14); border-color: rgba(201, 168, 76, .45); }
body.lang-ur .hero h1 { font-family: var(--font-urdu); line-height: 2.1; }

/* Headings inside the content use the site faces */
.section-block h2, .page-wrap h2 { font-family: var(--font-display); font-weight: 400; color: var(--green); }
:root[data-theme="dark"] .section-block h2, :root[data-theme="dark"] .page-wrap h2 { color: var(--quote); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .section-block h2, :root:not([data-theme="light"]) .page-wrap h2 { color: var(--quote); } }
body.lang-ur .section-block h2, body.lang-ur .page-wrap h2 { font-family: var(--font-urdu); line-height: 2; }
.page-wrap a { color: var(--green); }
:root[data-theme="dark"] .page-wrap a { color: var(--quote); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .page-wrap a { color: var(--quote); } }

/* Buttons and inputs that sat on the old dark ground */
input, textarea, select { background: var(--surface); color: var(--ink); border-color: var(--line); font: inherit; }

/* Right-to-left */
[dir="rtl"] .page-wrap ol, [dir="rtl"] .page-wrap ul { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .toc, [dir="rtl"] .callout { border-left-width: 1px; border-right: 3px solid var(--o-gold); }

/* Wide content never pushes the page sideways */
.page-wrap { overflow-wrap: anywhere; }
.page-wrap table { display: block; overflow-x: auto; }
