
:root {
  --ink: #0f172a;
  --muted: #475569;
  --bg: #f1f5f9;
  --card: #ffffff;
  --line: #e2e8f0;
  --brand: #0f4c81;
  --brand-2: #0ea5a4;
  --code-bg: #0b1220;
  --code-fg: #e2e8f0;
  --warn: #b45309;
  --ok: #047857;
  --font: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Noto Sans Arabic", Arial, sans-serif;
  --mono: "Cascadia Code", Consolas, "Courier New", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  direction: ltr !important;
  background:
    radial-gradient(1200px 500px at 10% -10%, #dbeafe 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #ccfbf1 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.75;
}
a { color: var(--brand); text-decoration-thickness: 1px; }
a:hover { color: var(--brand-2); }
.topbar {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid var(--line);
  display: flex; gap: 1rem; align-items: center; justify-content: space-between;
  padding: .75rem 1.25rem;
}
.topbar .brand { font-weight: 700; color: var(--brand); letter-spacing: .02em; }
.topbar nav { display: flex; flex-wrap: wrap; gap: .65rem; font-size: .92rem; }
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  background: #ecfeff; color: #155e75; border: 1px solid #a5f3fc;
  border-radius: 999px; padding: .15rem .65rem; font-size: .78rem; font-weight: 600;
}
.layout {
  max-width: 1100px; margin: 0 auto; padding: 1.25rem 1.25rem 4rem;
}
.hero {
  background: linear-gradient(135deg, #0f4c81 0%, #0ea5a4 100%);
  color: #fff; border-radius: 18px; padding: 1.6rem 1.7rem; margin: 1rem 0 1.5rem;
  box-shadow: 0 18px 40px rgba(15,76,129,.22);
}
.hero h1 { margin: 0 0 .4rem; font-size: clamp(1.45rem, 2.4vw, 2rem); }
.hero p { margin: .25rem 0; opacity: .95; }
.meta-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .65rem; margin-top: 1rem;
}
.meta-grid div {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px; padding: .55rem .7rem; font-size: .88rem;
}
.meta-grid strong { display: block; font-size: .72rem; opacity: .85; font-weight: 600; }
.content {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 1.4rem 1.5rem 2rem; box-shadow: 0 8px 24px rgba(15,23,42,.04);
}
.content h1, .content h2, .content h3, .content h4,
.content p, .content li, .content td, .content th, .content blockquote {
  unicode-bidi: plaintext;
}
.content h1 { font-size: 1.55rem; border-bottom: 1px solid var(--line); padding-bottom: .4rem; }
.content h2 { font-size: 1.28rem; margin-top: 1.8rem; color: var(--brand); }
.content h3 { font-size: 1.08rem; margin-top: 1.3rem; }
.content table {
  width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .92rem;
  direction: ltr !important;
}
.content th, .content td {
  border: 1px solid var(--line); padding: .45rem .55rem; vertical-align: top; text-align: start;
}
.content th { background: #f8fafc; }
.content blockquote {
  margin: 1rem 0; padding: .7rem 1rem; border-left: 4px solid var(--brand-2);
  background: #f0fdfa; color: var(--muted);
}
.content code:not(pre code) {
  direction: ltr !important; unicode-bidi: isolate;
  font-family: var(--mono); font-size: .88em;
  background: #eef2ff; color: #312e81; padding: .08rem .3rem; border-radius: 5px;
}
.pre-wrap {
  position: relative; margin: 1rem 0;
}
.pre-wrap pre {
  direction: ltr !important; text-align: left !important; unicode-bidi: isolate;
  background: var(--code-bg); color: var(--code-fg);
  border-radius: 12px; padding: 2.4rem 1rem 1rem; overflow-x: auto;
  font-family: var(--mono); font-size: .86rem; line-height: 1.55;
  white-space: pre;
}
.copy-btn {
  position: absolute; top: .55rem; right: .55rem; z-index: 2;
  border: 0; border-radius: 8px; cursor: pointer;
  background: #1e293b; color: #e2e8f0; font-size: .75rem; font-weight: 600;
  padding: .35rem .6rem;
}
.copy-btn.copied { background: var(--ok); color: #fff; }
.url-box {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px;
  padding: .55rem .75rem; margin: .7rem 0; font-family: var(--mono); font-size: .84rem;
  direction: ltr !important; unicode-bidi: isolate;
}
.url-box a { word-break: break-all; }
.direct-link {
  display: inline-flex; align-items: center; gap: .25rem;
  direction: ltr !important; unicode-bidi: isolate;
  margin-inline-start: .35rem; padding: .1rem .5rem;
  border: 1px solid #93c5fd; border-radius: 999px;
  background: #eff6ff; color: #1d4ed8; font-size: .76rem;
  font-weight: 700; text-decoration: none; white-space: nowrap;
}
.direct-link:hover { background: #dbeafe; color: #1e40af; }
.section-links {
  display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
  margin: -.55rem 0 1rem; padding: .55rem .65rem;
  background: linear-gradient(90deg, #eff6ff, #f0fdfa);
  border: 1px solid #bfdbfe; border-radius: 10px;
  direction: ltr !important; unicode-bidi: isolate;
}
.section-links strong { color: #334155; font-size: .78rem; margin-right: .2rem; }
.section-links a {
  display: inline-flex; align-items: center; padding: .15rem .5rem;
  border: 1px solid #93c5fd; border-radius: 999px;
  background: #fff; color: #1d4ed8; font-size: .76rem;
  font-weight: 700; text-decoration: none; white-space: nowrap;
}
.section-links a:hover { background: #dbeafe; }
.nav-coverage {
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 10px; padding: .6rem .75rem; color: #166534;
}
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: .9rem; margin: 1.2rem 0;
}
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.05rem;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(15,23,42,.08); }
.card h3 { margin: 0 0 .35rem; font-size: 1rem; color: var(--brand); }
.card p { margin: 0; color: var(--muted); font-size: .9rem; }
.footer {
  margin-top: 1.5rem; color: var(--muted); font-size: .85rem; text-align: center;
}
.toc {
  background: #f8fafc; border: 1px solid var(--line); border-radius: 12px;
  padding: .8rem 1rem; margin: 0 0 1.2rem;
}
.toc ul { margin: .3rem 0; padding-left: 1.2rem; }
.side-note { font-size: .86rem; color: var(--muted); }
@media (max-width: 720px) {
  .content { padding: 1rem; }
  .topbar { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   VISUAL TUTORIAL SYSTEM — diagrams, flows, screens, chips
   Read the pictures first; text is optional backup.
   ============================================================ */

.ok   { background: #f0fdf4; border: 1px solid #bbf7d0; border-left: 4px solid var(--ok);   border-radius: 10px; padding: .6rem .85rem; margin: .9rem 0; }
.warn { background: #fffbeb; border: 1px solid #fde68a; border-left: 4px solid var(--warn); border-radius: 10px; padding: .6rem .85rem; margin: .9rem 0; }
.ok p:last-child, .warn p:last-child { margin-bottom: 0; }
.note-sm { font-size: .85rem; color: var(--muted); margin: .4rem 0 0; }

.viz-banner {
  margin: 0 0 1.4rem; padding: 1rem 1.15rem; border-radius: 14px; color: #fff;
  background: linear-gradient(135deg, #0f4c81 0%, #0ea5a4 100%);
  box-shadow: 0 12px 28px rgba(15,76,129,.2);
}
.viz-banner h2 { margin: 0; color: #fff !important; border: 0; font-size: 1.2rem; }
.viz-banner p { margin: .3rem 0 0; opacity: .92; font-size: .9rem; }

.track {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: 1rem 0;
}
@media (max-width: 800px) { .track { grid-template-columns: 1fr; } }
.track .lane {
  border-radius: 14px; padding: .85rem; border: 1px solid var(--line); background: #fff;
}
.track .lane.dev  { border-top: 4px solid #2563eb; }
.track .lane.adm  { border-top: 4px solid #059669; }
.track .lane.impl { border-top: 4px solid #d97706; }
.track .lane h3 { margin: 0 0 .5rem; font-size: 1rem; }
.track .lane ul { margin: 0; padding-left: 1.1rem; font-size: .88rem; color: var(--muted); }
.track .lane a { font-weight: 700; font-size: .82rem; }

.flow {
  display: flex; flex-wrap: wrap; gap: .45rem; align-items: center;
  margin: 1rem 0; padding: .85rem; background: #0b1220; border-radius: 14px;
  color: #e2e8f0; font-family: var(--mono); font-size: .82rem;
}
.flow .n {
  background: #1e293b; border: 1px solid #334155; border-radius: 10px;
  padding: .45rem .65rem; min-width: 5.5rem; text-align: center;
}
.flow .n b { display: block; color: #7dd3fc; font-size: .72rem; letter-spacing: .04em; }
.flow .n.dev b { color: #93c5fd; }
.flow .n.adm b { color: #6ee7b7; }
.flow .n.impl b { color: #fcd34d; }
.flow .arrow { color: #64748b; font-weight: 700; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .7rem 0; }
.chip {
  display: inline-flex; align-items: center; gap: .3rem;
  border-radius: 999px; padding: .2rem .65rem; font-size: .78rem; font-weight: 700;
  border: 1px solid var(--line); background: #fff;
}
.chip.do   { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.chip.dont { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.chip.url  { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.chip.mod  { background: #faf5ff; color: #6b21a8; border-color: #e9d5ff; }

.screen {
  margin: 1rem 0; border-radius: 14px; overflow: hidden;
  border: 1px solid #1e293b; background: #0b1220; color: #e2e8f0;
  box-shadow: 0 14px 30px rgba(15,23,42,.18); font-family: var(--mono); font-size: .82rem;
}
.screen .bar {
  display: flex; gap: .4rem; align-items: center; padding: .45rem .7rem;
  background: #111827; border-bottom: 1px solid #1f2937;
}
.screen .dot { width: .5rem; height: .5rem; border-radius: 50%; }
.screen .dot.r { background: #f87171; }
.screen .dot.a { background: #fbbf24; }
.screen .dot.g { background: #34d399; }
.screen .ttl { color: #7dd3fc; font-weight: 700; margin-left: .4rem; }
.screen .path { margin-left: auto; color: #94a3b8; font-size: .74rem; }
.screen .body { display: grid; grid-template-columns: 160px 1fr; min-height: 160px; }
@media (max-width: 700px) { .screen .body { grid-template-columns: 1fr; } }
.screen .side { background: #111827; padding: .55rem; border-right: 1px solid #1f2937; }
.screen .side div { padding: .28rem .4rem; border-radius: 6px; color: #94a3b8; margin: .15rem 0; }
.screen .side div.on { background: rgba(14,165,164,.22); color: #99f6e4; }
.screen .main { padding: .7rem .85rem; }
.screen .row {
  display: grid; grid-template-columns: 110px 1fr; gap: .5rem;
  padding: .28rem 0; border-bottom: 1px dashed #1f2937;
}
.screen .row span:first-child { color: #94a3b8; }
.screen .cap {
  background: #f8fafc; color: var(--ink); border-top: 1px solid var(--line);
  padding: .55rem .75rem; font-family: var(--font); font-size: .88rem;
}
.screen .cap strong { color: var(--brand); }

.stepboard {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .55rem; margin: 1rem 0; counter-reset: st;
}
.stepboard .s {
  counter-increment: st; position: relative;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: .7rem .7rem .7rem .7rem; min-height: 88px;
}
.stepboard .s::before {
  content: counter(st); display: inline-grid; place-items: center;
  width: 1.4rem; height: 1.4rem; border-radius: 50%; margin-bottom: .35rem;
  background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700;
}
.stepboard .s b { display: block; font-size: .9rem; color: var(--brand); }
.stepboard .s span { display: block; font-size: .8rem; color: var(--muted); margin-top: .2rem; }

.modmap {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: .65rem; margin: 1rem 0;
}
.modmap a {
  display: block; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: .7rem .8rem; transition: transform .15s ease, box-shadow .15s ease;
}
.modmap a:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(15,23,42,.08); }
.modmap a h4 { margin: 0 0 .25rem; color: var(--brand); font-size: .95rem; }
.modmap a p { margin: 0; font-size: .82rem; color: var(--muted); }
.modmap a .go { display: inline-block; margin-top: .4rem; font-size: .76rem; font-weight: 700; color: #1d4ed8; }

.pathline {
  display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: 1rem 0;
}
.pathline a, .pathline span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.4rem; padding: .35rem .55rem; border-radius: 10px;
  font-weight: 800; font-size: .85rem; text-decoration: none;
}
.pathline a { background: #0f4c81; color: #fff; }
.pathline a:hover { background: #0ea5a4; color: #fff; }
.pathline span.sep { background: transparent; color: #94a3b8; min-width: auto; padding: 0; }

.glance {
  border: 1px solid var(--line); border-radius: 14px; background: #fff;
  padding: .85rem 1rem; margin: 0 0 1.4rem;
  box-shadow: 0 8px 20px rgba(15,23,42,.04);
}
.glance h3 { margin: 0 0 .55rem; font-size: 1.05rem; color: var(--brand); }
.glance .grid3 {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem;
}
@media (max-width: 800px) { .glance .grid3 { grid-template-columns: 1fr; } }
.glance .box {
  background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: .55rem .65rem;
}
.glance .box strong { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.glance .box p { margin: .25rem 0 0; font-size: .88rem; }

@media print {
  .screen, .flow, .stepboard .s, .glance { break-inside: avoid; }
  .screen { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ========== Zero²Hero: themes, centered layout, right TOC ========== */
:root,
html[data-theme="ocean"] {
  --ink: #0f172a;
  --muted: #475569;
  --bg: #f1f5f9;
  --card: #ffffff;
  --line: #e2e8f0;
  --brand: #0f4c81;
  --brand-2: #0ea5a4;
  --accent-soft: #e0f2fe;
}
html[data-theme="forest"] {
  --brand: #14532d;
  --brand-2: #059669;
  --bg: #f0fdf4;
  --accent-soft: #dcfce7;
}
html[data-theme="dusk"] {
  --brand: #4c1d95;
  --brand-2: #db2777;
  --bg: #faf5ff;
  --accent-soft: #f3e8ff;
}
html[data-theme="sand"] {
  --brand: #9a3412;
  --brand-2: #d97706;
  --bg: #fffbeb;
  --accent-soft: #ffedd5;
}
html[data-theme="slate"] {
  --brand: #1e293b;
  --brand-2: #64748b;
  --bg: #f8fafc;
  --accent-soft: #e2e8f0;
}

body.z2h-centered .layout,
body.z2h-centered .content,
body.z2h-centered .hero,
body.z2h-centered .mega-header,
body.z2h-centered .aca-hero,
body.z2h-centered .aca-page-header,
body.z2h-centered .section-title,
body.z2h-centered .section-sub,
body.z2h-centered .foot-note,
body.z2h-centered .pill-row,
body.z2h-centered .bilingual-box,
body.z2h-centered .cards,
body.z2h-centered .track-grid {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
body.z2h-centered .layout { max-width: 980px; }
body.z2h-centered .content p,
body.z2h-centered .content li,
body.z2h-centered .bilingual-box p,
body.z2h-centered .track-card p,
body.z2h-centered .card p {
  text-align: center;
}
body.z2h-centered .content pre,
body.z2h-centered .pre-wrap,
body.z2h-centered .url-box,
body.z2h-centered table,
body.z2h-centered .flow,
body.z2h-centered .screen {
  text-align: left !important;
  direction: ltr !important;
}
body.z2h-centered .track-grid,
body.z2h-centered .cards,
body.z2h-centered .pill-row {
  justify-content: center;
}
body.z2h-centered .topbar {
  justify-content: center;
  flex-wrap: wrap;
}
body.z2h-centered .topbar nav {
  justify-content: center;
}

/* Legacy theme strip (hidden when unified header chrome is present) */
.z2h-theme-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  justify-content: center;
  padding: .45rem 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
body:has(.z2h-site-chrome) > .z2h-theme-bar { display: none !important; }
.z2h-theme-label {
  font-size: .78rem;
  font-weight: 800;
  color: var(--muted);
  margin-inline-end: .35rem;
}
.z2h-theme-btn {
  border: 1px solid var(--line);
  background: var(--accent-soft);
  color: var(--brand);
  border-radius: 999px;
  padding: .2rem .7rem;
  font-size: .75rem;
  font-weight: 800;
  cursor: pointer;
}
.z2h-theme-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* Index drawer — always a right-side panel (never a bottom strip) */
.z2h-toc-fab {
  position: fixed !important;
  right: 0 !important;
  top: 42% !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 90 !important;
  writing-mode: horizontal-tb;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  background: var(--brand);
  color: #fff;
  padding: .65rem .45rem;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
  box-shadow: -4px 8px 20px rgba(15,23,42,.18);
}
.z2h-toc-fab span { display: block; opacity: .85; font-weight: 600; font-size: .65rem; }

.z2h-toc {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  width: min(300px, 88vw) !important;
  max-width: 300px !important;
  height: 100vh !important;
  max-height: 100vh !important;
  z-index: 95 !important;
  margin: 0 !important;
  background: #fff !important;
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 40px rgba(15,23,42,.18);
  transform: translateX(105%) !important;
  transition: transform .22s ease;
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  text-align: start;
  overflow: hidden;
}
body.z2h-toc-open .z2h-toc { transform: translateX(0) !important; }
/* Overlay drawer — do not push footer beside the index */
body.z2h-toc-open .layout,
body.z2h-toc-open .z2h-site-footer,
body.z2h-toc-open .aca-page-header {
  margin-right: 0 !important;
}
.z2h-toc-head {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
}
.z2h-toc-close {
  border: 0;
  background: rgba(255,255,255,.2);
  color: #fff;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
}
.z2h-toc-nav {
  overflow: auto !important;
  padding: .75rem;
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  gap: .35rem;
  flex: 1 1 auto;
}
.z2h-toc-nav a {
  display: block !important;
  width: 100%;
  padding: .45rem .6rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-size: .84rem;
  border: 1px solid transparent;
  white-space: normal;
}
.z2h-toc-nav a:hover {
  background: var(--accent-soft);
  border-color: var(--line);
  color: var(--brand);
}

/* Academic page header — full-bleed brand block */
.aca-page-header,
.aca-hero {
  text-align: center;
  color: #fff;
  background:
    radial-gradient(900px 320px at 50% -10%, rgba(255,255,255,.16), transparent 55%),
    linear-gradient(145deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 52%, #041c30) 48%, var(--brand-2) 100%);
  margin: 0 0 1.75rem;
  padding: 1.75rem 1.25rem 0;
  box-shadow: 0 18px 48px rgba(4,28,48,.22);
}
.aca-page-header-inner {
  max-width: 920px;
  margin: 0 auto;
  padding-bottom: 0;
}
.aca-brand-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  margin-bottom: .35rem;
}
.aca-seal {
  width: 68px; height: 68px; margin: 0;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.9);
  display: grid; place-items: center;
  font-weight: 900; font-size: 1.05rem; letter-spacing: .04em;
  background: rgba(0,0,0,.22);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.aca-kicker {
  margin: 0;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .92;
}
.aca-brand-title,
.aca-hero h1 {
  margin: .15rem 0 .75rem;
  font-size: clamp(2.05rem, 5.2vw, 3rem);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.12;
}
.aca-brand-title span,
.aca-hero h1 span {
  color: #99f6e4;
}
.aca-page-header .aca-ar,
.aca-hero .aca-ar {
  margin: 0 auto .55rem;
  max-width: 40rem;
  font-size: clamp(1.02rem, 2.2vw, 1.28rem);
  font-weight: 700;
  line-height: 1.75;
}
.aca-page-header .aca-en,
.aca-hero .aca-en {
  margin: 0 auto 1.15rem;
  max-width: 40rem;
  font-size: clamp(.92rem, 1.9vw, 1.05rem);
  opacity: .9;
  line-height: 1.55;
  direction: ltr;
}
.aca-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin: 0 auto 1.25rem;
  max-width: 52rem;
}
.aca-cta a {
  background: #fff;
  color: var(--brand);
  font-weight: 800;
  padding: .55rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: .88rem;
  line-height: 1.3;
  transition: transform .15s ease, background .15s ease;
}
.aca-cta a:hover {
  transform: translateY(-1px);
  background: #ecfeff;
  color: var(--brand);
}
.aca-cta a.ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.75);
}
.aca-cta a.ghost:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.aca-page-header .aca-band,
.aca-hero + .aca-band {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: center;
  margin: 0 -1.25rem;
  padding: .85rem 1rem;
  background: rgba(0,0,0,.18);
  border-top: 1px solid rgba(255,255,255,.12);
}
.aca-band {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  justify-content: center;
  margin: 0 0 1.5rem;
}
.aca-page-header .aca-band span,
.aca-band span {
  background: rgba(255,255,255,.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,.22);
  font-size: .74rem;
  font-weight: 800;
  padding: .28rem .65rem;
  border-radius: 999px;
}
/* Standalone band (legacy pages) keeps soft chips */
main .aca-band span {
  background: var(--accent-soft);
  color: var(--brand);
  border-color: transparent;
}
@media (max-width: 720px) {
  .aca-page-header { padding: 1.35rem 1rem 0; }
  .aca-cta a { width: 100%; text-align: center; }
}

/* Beta announcement modal — academic */
body.z2h-modal-open { overflow: hidden; }
.z2h-beta-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4, 28, 48, .62);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 1.25rem;
}
.z2h-beta-card {
  width: min(560px, 100%);
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 1.6rem 1.5rem 1.35rem;
  text-align: center;
  box-shadow: 0 30px 80px rgba(4,28,48,.35);
  animation: z2hPop .28s ease;
}
@keyframes z2hPop {
  from { transform: translateY(12px) scale(.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.z2h-beta-seal {
  width: 64px; height: 64px; margin: 0 auto .7rem;
  border-radius: 50%; display: grid; place-items: center;
  font-weight: 900; color: #fff;
  background: linear-gradient(135deg, var(--brand, #0f4c81), var(--brand-2, #0ea5a4));
  border: 3px solid rgba(15,76,129,.25);
}
.z2h-beta-eyebrow {
  margin: 0 0 .35rem; font-size: .72rem; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; color: var(--brand, #0f4c81);
}
.z2h-beta-card h2 {
  margin: 0 0 .65rem; font-size: clamp(1.25rem, 3vw, 1.55rem);
  color: #0f172a; line-height: 1.35;
}
.z2h-beta-ar {
  margin: 0 auto .75rem; max-width: 36rem;
  line-height: 1.8; color: #334155; direction: rtl; unicode-bidi: plaintext;
}
.z2h-beta-en {
  margin: .75rem auto 0; max-width: 36rem;
  font-size: .9rem; color: #64748b; direction: ltr; line-height: 1.5;
}
.z2h-beta-list {
  margin: .75rem auto; padding: 0; list-style: none;
  text-align: start; max-width: 34rem; direction: rtl;
}
.z2h-beta-list li {
  padding: .45rem .65rem; margin: .35rem 0;
  background: #f1f5f9; border-radius: 10px; border: 1px solid #e2e8f0;
  font-size: .9rem; line-height: 1.55; color: #1e293b;
}
.z2h-beta-actions {
  display: flex; flex-wrap: wrap; gap: .55rem; justify-content: center; margin-top: 1.1rem;
}
.z2h-beta-primary {
  border: 0; border-radius: 999px; padding: .55rem 1.2rem;
  background: var(--brand, #0f4c81); color: #fff; font-weight: 800; cursor: pointer;
}
.z2h-beta-ghost {
  border: 1.5px solid #cbd5e1; border-radius: 999px; padding: .5rem 1.05rem;
  background: #fff; color: #334155; font-weight: 700; cursor: pointer;
}

.z2h-beta-list li {
  display: grid;
  gap: .25rem;
}
.z2h-bi-ar {
  display: block;
  direction: rtl;
  unicode-bidi: plaintext;
  line-height: 1.55;
}
.z2h-bi-en {
  display: block;
  direction: ltr;
  text-align: left;
  font-size: .86rem;
  color: #64748b;
  line-height: 1.45;
}
