/* Styles for IP Portal */
:root {
  --bg: oklch(0.98 0.01 80);
  --bg-2: oklch(0.96 0.015 75);
  --ink: oklch(0.22 0.015 60);
  --ink-2: oklch(0.42 0.02 60);
  --ink-3: oklch(0.58 0.015 60);
  --line: oklch(0.88 0.015 75);
  --line-2: oklch(0.93 0.012 75);
  --gold: oklch(0.72 0.12 75);
  --gold-deep: oklch(0.58 0.13 70);
  --terracotta: oklch(0.6 0.14 35);
  --sage: oklch(0.62 0.08 150);
  --card: #fff;
  --shadow-sm: 0 1px 2px oklch(0.3 0.04 60 / 0.06), 0 2px 6px oklch(0.3 0.04 60 / 0.04);
  --shadow-md: 0 4px 12px oklch(0.3 0.04 60 / 0.08), 0 12px 32px oklch(0.3 0.04 60 / 0.06);
  --shadow-lg: 0 12px 40px oklch(0.3 0.04 60 / 0.14), 0 24px 80px oklch(0.3 0.04 60 / 0.1);
}
[data-theme="royal"] {
  --bg: oklch(0.97 0.01 260);
  --bg-2: oklch(0.95 0.015 260);
  --gold: oklch(0.55 0.12 265);
  --gold-deep: oklch(0.4 0.14 265);
  --terracotta: oklch(0.58 0.14 15);
  --line: oklch(0.88 0.02 260);
}
[data-theme="slate"] {
  --bg: oklch(0.96 0.005 260);
  --bg-2: oklch(0.93 0.008 260);
  --ink: oklch(0.2 0.01 260);
  --gold: oklch(0.45 0.03 260);
  --gold-deep: oklch(0.3 0.04 260);
  --terracotta: oklch(0.55 0.1 30);
  --line: oklch(0.88 0.008 260);
}

:root {
  /* --bg: #f8fafc; */
  --panel: #ffffff;
  --border: #e2e8f0;
  --text-primary: #5a67d8;
  --text-main: #0f172a;
  --text-muted: #2d3748;
  --text-light: #718096;
  --text-soft: #c3dafe;
  --text-accent: #ed8936;
  --text-invert: #f7fafc;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
  /* wizard motion */
  --wiz-dur: 420ms;
  --wiz-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* layering */
  --z-wizard: 80;
  --z-loader: 90;
}

/* =========================================================
   CINEMA LOADER (FIREFOX-SAFE: NO color-mix, NO backdrop-filter)
========================================================= */
#cinemaLoader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text-main);
}

.gate-seq {
  text-align: center;
  animation: gate-zoom 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.gate {
  --w: clamp(120px, 14vw, 240px);
  --h: calc(var(--w) * 1.75);
  --r: calc(var(--w) * 0.6);
  --pad: 8px;
  position: relative;
  width: 320px; /* mobile (default) */
  height: 600px;
  border-radius: var(--r) var(--r) 14px 14px;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.2));
  perspective: 1000px;
}

/* tablet and above */
@media (min-width: 600px) {
  .gate {
    width: 400px;
  }
}
.gate-frame {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.75));
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 0 0 6px rgba(79, 70, 229, 0.14);
}

.gate-title {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: calc(var(--w) * 0.92);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-size: calc(var(--w) * 0.17);
  color: var(--text);
}

.gate-door {
  position: absolute;
  top: var(--pad);
  bottom: var(--pad);
  width: calc(50% - var(--pad));
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72)), radial-gradient(60% 50% at 50% 10%, rgba(79, 70, 229, 0.18), transparent 60%);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border);
  transform-style: preserve-3d;
  z-index: 6;
}

.gate-door-left {
  left: var(--pad);
  border-radius: var(--r) 0 10px 10px;
  transform-origin: center left;
  animation: door-left-open 1100ms ease-out 450ms forwards;
}

.gate-door-right {
  right: var(--pad);
  border-radius: 0 var(--r) 10px 10px;
  transform-origin: center right;
  animation: door-right-open 1100ms ease-out 450ms forwards;
}

@keyframes door-left-open {
  to {
    transform: rotateY(82deg);
  }
}
@keyframes door-right-open {
  to {
    transform: rotateY(-82deg);
  }
}
@keyframes gate-zoom {
  from {
    transform: scale(1.06);
    opacity: 0.95;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.loader-ui {
  margin-top: var(--s-3);
  display: grid;
  gap: var(--s-1);
  width: min(360px, 100vw - 48px);
}

.loader-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2);
  font-size: var(--fs-sm);
  color: var(--muted);
}

.loader-percent {
  font-weight: 800;
  font-size: var(--fs-md);
  color: var(--text);
}

.loader-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--borderSoft);
  overflow: hidden;
}

.loader-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #ffffff);
  transition: width 0.2s ease;
}

#cinemaLoader.fade-out {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
}



* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; 
scroll-behavior: smooth;}
body {
  font-family: 'Tajawal', 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  direction: rtl;
  text-align: right;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4 { margin: 0; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
button { font-family: inherit; cursor: pointer; }

/* === NAV === */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1360px; margin: 0 auto;
  padding: 14px 32px;
  display: flex; align-items: center; gap: 28px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand img { height: 44px; width: auto; }
.nav-brand-text { line-height: 1.1; }
.nav-brand-ar { font-weight: 800; font-size: 16px; }
.nav-brand-en { font-size: 10px; letter-spacing: 0.12em; color: var(--ink-3); font-family: 'Inter', sans-serif; }
.nav-links { display: flex; gap: 4px; margin-inline-start: auto; }
.nav-link {
  background: transparent; border: 0; padding: 8px 14px;
  color: var(--ink-2); font-size: 14px; font-weight: 500;
  border-radius: 8px;
}
.nav-link:hover { background: var(--bg-2); color: var(--ink); }
.nav-cta {
  display: none;
  background: var(--ink); color: var(--bg);
  border: 0; padding: 10px 18px; border-radius: 10px;
  font-weight: 600; font-size: 14px;
}
/* === NAV RESPONSIVE UPDATE === */

/* Base improvement */
.nav-inner {
  flex-wrap: wrap;
}

/* Tablet */
@media (max-width: 980px) {
  .nav-inner {
    padding: 12px 20px;
    gap: 16px;
  }

  .nav-links {
    width: 100%;
    order: 3;
    justify-content: center;
    flex-wrap: wrap;
    margin-inline-start: 0;
  }

  .nav-link {
    padding: 8px 10px;
    font-size: 13px;
  }

  .nav-cta {
    display: inline-flex;
    margin-inline-start: auto;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .nav-inner {
    flex-direction: row;
    align-items: center;
  }

  .nav-brand img {
    height: 36px;
  }

  .nav-brand-ar {
    font-size: 14px;
  }

  .nav-brand-en {
    font-size: 9px;
  }

  .nav-links {
    display: none;
  }

  .nav-cta {
    display: inline-flex;
    padding: 8px 14px;
    font-size: 13px;
  }
}
/* hide CTA on mobile */
@media (max-width: 640px) {
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: block;
    background: transparent;
    border: 0;
    font-size: 22px;
    margin-inline-start: auto;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
    flex-direction: column;
    padding: 12px 20px;
  }

  .nav-links.open {
    display: flex;
  }
}

/* hide toggle on desktop */
.nav-toggle {
  display: none;
}
/* hamburger icon */
.nav-toggle {
  display: none;
  width: 32px;
  height: 24px;
  position: relative;
  background: transparent;
  border: 0;
}

.nav-toggle span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: 0.3s;
}

.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle span:nth-child(3) { bottom: 0; }

/* mobile */
@media (max-width: 640px) {
  .nav-toggle {
    display: block;
    margin-inline-start: auto;
  }
}
/* === HERO === */
.hero {
  max-width: 1360px; margin: 0 auto;
  padding: 80px 32px 60px;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px; border: 1px solid var(--line);
  border-radius: 99px; font-size: 12px; color: var(--ink-2);
  background: var(--card);
}
.hero-kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }
.hero h1 {
  font-size: clamp(40px, 4.2vw, 64px);
  line-height: 1.15; margin: 20px 0;
  text-wrap: pretty;
}
.hero h1 em { font-style: normal; color: var(--gold-deep); position: relative; }
.hero h1 em::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 4px; height: 10px;
  background: oklch(0.85 0.1 75 / 0.4); z-index: -1;
}
.hero p { font-size: 18px; color: var(--ink-2); max-width: 56ch; text-wrap: pretty; text-align: justify; }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; }
.hero-stats { display: flex; gap: 40px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.hs-val { font-size: 28px; font-weight: 800; color: var(--gold-deep); font-family: 'Inter', sans-serif; }
.hs-lbl { font-size: 13px; color: var(--ink-3); }

.hero-viz {
  aspect-ratio: 1;
  position: relative;
  background: radial-gradient(circle at 50% 50%, oklch(0.95 0.03 75), var(--bg));
  border-radius: 24px; border: 1px solid var(--line);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.hero-viz img { width: 62%; filter: drop-shadow(0 10px 40px oklch(0.3 0.05 75 / 0.15)); }
.hero-viz-rings::before, .hero-viz-rings::after {
  content: ''; position: absolute; inset: 0;
  border-radius: 50%; border: 1px solid oklch(0.75 0.06 75 / 0.3);
  margin: auto;
}
.hero-viz-rings::before { width: 70%; height: 70%; }
.hero-viz-rings::after { width: 90%; height: 90%; border-style: dashed; }
/* === HERO MODERN + RESPONSIVE === */

/* layout refinement */
.hero {
  max-width: 1360px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) clamp(16px, 4vw, 32px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 5vw, 60px);
  align-items: center;
}

/* text improvements */
.hero h1 {
  font-size: clamp(28px, 5vw, 56px);
  line-height: 1.2;
  margin: 16px 0;
}

.hero p {
  font-size: clamp(14px, 2.5vw, 18px);
  line-height: 1.7;
  max-width: 50ch;
  text-align: start;
}

/* CTA */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* stats → modern grid */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.hs-val {
  font-size: clamp(18px, 3vw, 26px);
}

.hs-lbl {
  font-size: 12px;
}

/* viz fix */
.hero-viz {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  aspect-ratio: 1;
}

/* ================== */
/* Tablet */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero p {
    margin-inline: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    text-align: center;
  }

  .hero-viz {
    order: -1;
    max-width: 320px;
  }
}

/* ================== */
/* Mobile */
@media (max-width: 640px) {
  .hero {
    padding-top: 30px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero p {
    font-size: 14px;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .hero-viz {
    max-width: 260px;
  }
}
/* === SECTION === */
.section {
  max-width: 1360px; margin: 0 auto;
  padding: 90px 32px;
}
/* === SECTION HEAD FINAL FIX === */

.section-head {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 48px;
}

/* group (eyebrow + title + subtitle) */
.section-head > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* remove width limits */
.section-title {
  max-width: none;
  line-height: 1.2;
}

.section-lede {
  max-width: none;
  line-height: 1.8;
  text-align: right;
}

/* ================== */
/* Tablet */
@media (max-width: 980px) {
  .section-head {
    flex-direction: column;
    gap: 12px;
  }
}

/* ================== */
/* Mobile */
@media (max-width: 640px) {
  .section-title {
    font-size: 24px;
  }

  .section-lede {
    font-size: 14px;
  }
}
/* === MAP === */
.map-container {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start;
}
.ksa-map-wrap {
  position: relative; aspect-ratio: 5/4;
  background: linear-gradient(160deg, oklch(0.97 0.02 75), oklch(0.94 0.03 70));
  border-radius: 20px; border: 1px solid var(--line);
  padding: 20px; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.ksa-map { width: 100%; height: 100%; display: block; }
.map-pin {
  position: absolute; transform: translate(50%, -50%);
  background: transparent; border: 0; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.pin-dot {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--pin); color: #fff;
  display: grid; place-items: center; font-size: 18px; font-weight: 700;
  box-shadow: 0 6px 20px color-mix(in oklch, var(--pin) 50%, transparent), 0 0 0 4px color-mix(in oklch, var(--pin) 20%, transparent);
  transition: transform 0.2s;
}
.pin-pulse {
  position: absolute; top: 0; width: 44px; height: 44px; border-radius: 50%;
  background: var(--pin); opacity: 0.35;
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.35; }
  100% { transform: scale(2.2); opacity: 0; }
}
.pin-label {
  font-size: 12px; font-weight: 600; padding: 4px 10px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.map-pin:hover .pin-dot { transform: scale(1.1); }
.map-pin.is-active .pin-dot { transform: scale(1.15); box-shadow: 0 8px 28px color-mix(in oklch, var(--pin) 60%, transparent), 0 0 0 6px color-mix(in oklch, var(--pin) 25%, transparent); }
.map-pin.is-active .pin-label { background: var(--pin); color: #fff; border-color: var(--pin); }

.map-legend {
  position: absolute; bottom: 20px; right: 20px;
  background: color-mix(in oklch, var(--card) 92%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 18px;
  max-width: 280px;
}
.legend-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.legend-sub { font-size: 11px; color: var(--ink-3); }

.map-node {
  position: absolute; transform: translate(50%, -50%);
  background: var(--card); border: 2px solid var(--pin);
  border-radius: 14px; padding: 12px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 120px; box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.node-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--pin); color: #fff; display: grid; place-items: center; font-size: 16px; font-weight: 700; }
.node-title { font-size: 12px; font-weight: 600; }
.map-node.is-active { background: var(--pin); color: #fff; transform: translate(50%, -50%) scale(1.08); }
.map-node.is-active .node-icon { background: #fff; color: var(--pin); }

.compass-node { min-width: 140px; }
/* === MAP MODERN + RESPONSIVE === */

/* layout refinement */
.map-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(20px, 4vw, 40px);
  align-items: start;
}

/* map wrapper */
.ksa-map-wrap {
  padding: clamp(12px, 3vw, 20px);
  border-radius: 18px;
}

/* pins scale */
.pin-dot {
  width: clamp(32px, 4vw, 44px);
  height: clamp(32px, 4vw, 44px);
  font-size: clamp(14px, 2vw, 18px);
}

.pin-pulse {
  width: 100%;
  height: 100%;
}

/* label fix */
.pin-label {
  font-size: clamp(10px, 1.8vw, 12px);
  padding: 3px 8px;
}

/* legend */
.map-legend {
  max-width: 220px;
  font-size: 11px;
}

/* ================== */
/* Tablet */
@media (max-width: 980px) {
  .map-container {
    grid-template-columns: 1fr;
  }

  .map-legend {
    position: static;
    margin-top: 12px;
  }
}

/* ================== */
/* Mobile */
@media (max-width: 640px) {
  .ksa-map-wrap {
    aspect-ratio: 1;
  }

  .pin-dot {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .pin-label {
    display: none;
  }

  .map-legend {
    display: none;
  }
}
/* Pillar panel */
.pillar-panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 28px;
  box-shadow: var(--shadow-md); position: relative;
  border-top: 4px solid var(--accent);
}
.panel-close {
  position: absolute; top: 14px; left: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--line);
  font-size: 20px; line-height: 1; color: var(--ink-2);
}
.panel-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.panel-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: color-mix(in oklch, var(--accent) 15%, var(--card));
  color: var(--accent); display: grid; place-items: center; font-size: 26px;
  flex-shrink: 0;
}
.panel-region { font-size: 12px; color: var(--ink-3); }
.panel-title { font-size: 22px; margin: 4px 0; }
.panel-en { font-size: 12px; color: var(--ink-3); font-family: 'Inter', sans-serif; letter-spacing: 0.08em; }
.panel-desc { color: var(--ink-2); font-size: 15px; margin: 12px 0 20px; }
.panel-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.stat-card {
  background: var(--bg-2); border-radius: 12px; padding: 14px 12px;
  text-align: center; border: 1px solid var(--line-2);
}
.stat-val { font-size: 20px; font-weight: 800; color: var(--accent); font-family: 'Inter', sans-serif; direction: rtl; }
.stat-lbl { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.inits-title { font-weight: 700; font-size: 13px; margin-bottom: 10px; color: var(--ink-2); }
.panel-inits ul { list-style: none; padding: 0; margin: 0; }
.panel-inits li { padding: 8px 0; font-size: 14px; border-bottom: 1px dashed var(--line-2); display: flex; gap: 10px; }
.panel-inits li:last-child { border-bottom: 0; }
.dash { color: var(--accent); font-weight: 700; }

.panel-empty {
  background: var(--card); border: 1px dashed var(--line);
  border-radius: 20px; padding: 60px 28px; text-align: center;
}
.panel-empty .pe-icon {
  font-size: 40px; color: var(--gold); margin-bottom: 12px;
}
.panel-empty p { color: var(--ink-3); font-size: 14px; margin: 6px 0 0; }

/* === BUTTONS === */
.btn {
  border: 0; padding: 11px 20px; border-radius: 10px;
  font-weight: 600; font-size: 14px; font-family: inherit;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.15s;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--gold-deep); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg-2); border-color: var(--ink-3); }
.btn-success { background: var(--sage); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn:disabled { opacity: 0.7; cursor: default; }

/* === VOLUMES / BENCH === */
.bench-scene {
  position: relative; height: 520px;
  border-radius: 24px; overflow: hidden;
  background: linear-gradient(180deg, oklch(0.35 0.04 40) 0%, oklch(0.22 0.03 40) 70%, oklch(0.18 0.02 40) 100%);
  box-shadow: var(--shadow-lg);
  perspective: 1600px;
}
.bench-backdrop {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, oklch(0.3 0.02 50), oklch(0.22 0.02 50));
}
.bench-wall {
  position: absolute; top: 0; left: 0; right: 0; height: 60%;
  background:
    repeating-linear-gradient(90deg, transparent, transparent 40px, oklch(0.25 0.02 50 / 0.4) 40px, oklch(0.25 0.02 50 / 0.4) 41px),
    linear-gradient(180deg, oklch(0.32 0.03 55), oklch(0.22 0.02 50));
}
.bench-emblem {
  position: absolute; top: 12%; left: 50%; transform: translateX(-50%);
  font-size: 90px; color: oklch(0.72 0.12 75 / 0.4);
  filter: drop-shadow(0 4px 20px oklch(0.72 0.12 75 / 0.3));
}
.bench-cloth {
  position: absolute; bottom: 30%; left: 0; right: 0; height: 14%;
  background: linear-gradient(180deg, oklch(0.4 0.1 30), oklch(0.28 0.08 30));
  box-shadow: inset 0 4px 12px oklch(0.2 0.05 30 / 0.6);
}
.bench-top {
  position: absolute; bottom: 0; left: 0; right: 0; height: 45%;
  background: linear-gradient(180deg, oklch(0.35 0.05 45), oklch(0.22 0.03 40));
  border-top: 2px solid oklch(0.5 0.08 60);
  display: flex; justify-content: center; align-items: end;
  padding-bottom: 40px;
  transform-style: preserve-3d;
}
.bench-books {
  display: flex; gap: 6px; align-items: end;
  transform: rotateX(8deg);
  transform-origin: bottom center;
}
.bench-book {
  position: relative; width: 78px; height: 220px;
  background: transparent; border: 0; padding: 0; cursor: pointer;
  transition: transform 0.3s;
}
.bench-book:hover { transform: translateY(-16px); }
/* ADD LABEL TO BOOK */

.bench-book {
  position: relative;
}

.bench-book::after {
  content: attr(data-title);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translate(-50%, 10px);
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
}

.bench-book:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}
.book-spine {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, color-mix(in oklch, var(--c) 90%, #000 10%), var(--c) 50%, color-mix(in oklch, var(--c) 80%, #000 20%));
  border-radius: 3px 3px 2px 2px;
  box-shadow: inset -3px 0 8px oklch(0.15 0.05 30 / 0.5), inset 3px 0 8px oklch(0.15 0.05 30 / 0.3), 0 8px 24px oklch(0.1 0.02 30 / 0.6);
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 6px;
  color: oklch(0.95 0.04 75);
}
.spine-band {
  width: 100%; height: 12px;
  background: linear-gradient(90deg, oklch(0.75 0.14 75), oklch(0.85 0.1 75), oklch(0.7 0.14 75));
  border-radius: 1px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px oklch(0 0 0 / 0.4);
}
.spine-band.bottom { margin-top: auto; margin-bottom: 0; }
.spine-roman {
  font-size: 28px; font-weight: 800; font-family: 'Inter', serif;
  color: oklch(0.85 0.12 75);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.spine-title {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-weight: 700; font-size: 13px; line-height: 1.3;
  flex: 1; text-align: center;
}
.spine-sub {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 9px; opacity: 0.8; margin-top: 6px;
}
.book-top {
  position: absolute; top: -6px; left: 1px; right: 1px;
  height: 6px; background: oklch(0.88 0.04 75);
  transform: skewX(-20deg);
  border-radius: 1px;
}
.book-pages {
  position: absolute; bottom: -3px; left: 2px; right: 2px;
  height: 3px; background: oklch(0.86 0.04 75);
}
.bench-gavel {
  position: absolute; bottom: 48px; right: 12%;
  width: 90px; height: 40px;
}
.gavel-head {
  position: absolute; right: 0; top: 0;
  width: 40px; height: 30px;
  background: linear-gradient(180deg, oklch(0.35 0.04 40), oklch(0.22 0.03 30));
  border-radius: 6px;
  box-shadow: 0 4px 8px oklch(0.1 0 0 / 0.5);
}
.gavel-handle {
  position: absolute; right: 30px; top: 12px;
  width: 60px; height: 6px;
  background: linear-gradient(90deg, oklch(0.3 0.03 40), oklch(0.22 0.03 30));
  border-radius: 3px;
}
.gavel-block {
  position: absolute; right: -10px; top: 30px;
  width: 70px; height: 10px;
  background: linear-gradient(180deg, oklch(0.25 0.02 40), oklch(0.18 0.02 30));
  border-radius: 2px;
}
.bench-plaque {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  font-size: 13px; color: oklch(0.8 0.05 75 / 0.8);
  letter-spacing: 0.04em;
}
.bench-floor {
  position: absolute; bottom: 0; left: 0; right: 0; height: 8px;
  background: linear-gradient(180deg, oklch(0.18 0.02 40), oklch(0.1 0.01 30));
}

/* Shelf layout */
.shelf-scene {
  background: oklch(0.93 0.03 75);
  border-radius: 24px; padding: 40px 40px 0;
  box-shadow: var(--shadow-md);
}
.shelf-row { display: flex; gap: 8px; justify-content: center; align-items: end; height: 260px; }
.shelf-book {
  width: 80px; height: 240px; border: 0; padding: 0;
  background: linear-gradient(180deg, color-mix(in oklch, var(--c) 88%, #000), var(--c));
  border-radius: 4px 4px 0 0;
  box-shadow: inset -3px 0 8px oklch(0.15 0.05 30 / 0.5), 0 4px 12px oklch(0.1 0 0 / 0.3);
  color: #fff; padding: 14px 6px;
  display: flex; flex-direction: column; align-items: center;
  transition: transform 0.2s;
}
.shelf-book:hover { transform: translateY(-10px); }
.sh-roman { font-size: 24px; font-weight: 800; font-family: 'Inter', sans-serif; opacity: 0.9; }
.sh-title { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 700; font-size: 13px; flex: 1; margin-top: 12px; }
.sh-year { font-size: 9px; opacity: 0.8; font-family: 'Inter', sans-serif; }
.shelf-wood {
  height: 20px; margin: 0 -40px;
  background: linear-gradient(180deg, oklch(0.4 0.06 50), oklch(0.3 0.05 45));
  box-shadow: 0 6px 16px oklch(0.1 0.02 30 / 0.4);
}
/* === PANEL RESPONSIVE FIX === */

/* grid fix */
.panel-stats {
  grid-template-columns: repeat(3, 1fr);
}

/* ================== */
/* Tablet */
@media (max-width: 980px) {
  .panel-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .pillar-panel {
    padding: 22px;
  }

  .panel-title {
    font-size: 20px;
  }
}

/* ================== */
/* Mobile */
@media (max-width: 640px) {
  .panel-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .panel-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .panel-title {
    font-size: 18px;
  }

  .panel-desc {
    font-size: 14px;
  }

  .panel-stats {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 12px;
  }

  .panel-inits li {
    font-size: 13px;
  }
}
/* === MOBILE CLICK CLARITY FIX === */

/* make books larger & centered */
@media (max-width: 640px) {

  .bench-books {
    justify-content: center;
    gap: 10px;
    transform: rotate(90deg) translate(-64%, 50%);
    transform: none;
  }

  .bench-book {
    width: 64px;
    height: 180px;
  }

  /* add visual hint */
  .bench-book {
    animation: floatHint 2.5s ease-in-out infinite;
  }

  @keyframes floatHint {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
  }

  /* glow to show clickable */
  .bench-book::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 6px;
    background: radial-gradient(circle, oklch(0.75 0.12 75 / 0.25), transparent 70%);
    opacity: 0.8;
    z-index: -1;
  }

  /* add instruction text */
  .bench-plaque::after {
    content: "اضغط على أي مجلد";
    display: block;
    font-size: 12px;
    margin-top: 6px;
    color: oklch(0.8 0.05 75);
    opacity: 0.9;
  }

  /* reduce distraction */
  .bench-emblem {
    opacity: 0.2;
    font-size: 60px;
  }

  .bench-gavel {
    opacity: 0.3;
    transform: scale(0.8);
  }
}
/* Cards layout */
.vol-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.vol-card {
  position: relative; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 28px 20px; text-align: right;
  border-top: 4px solid var(--c);
  box-shadow: var(--shadow-sm); transition: all 0.2s;
  cursor: pointer;
}
.vol-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.vol-card-ribbon {
  display: inline-block; padding: 4px 10px;
  background: var(--c); color: #fff;
  border-radius: 6px; font-weight: 700; font-family: 'Inter', sans-serif; font-size: 13px;
  margin-bottom: 14px;
}
.vol-card-title { font-size: 14px; color: var(--ink-3); font-weight: 500; }
.vol-card-sub { font-size: 20px; font-weight: 700; margin: 4px 0 14px; }
.vol-card-meta { display: flex; gap: 14px; color: var(--ink-3); font-size: 12px; margin-bottom: 8px; }
.vol-card-year { font-size: 12px; color: var(--ink-3); font-family: 'Inter', sans-serif; }
.vol-card-arrow { position: absolute; bottom: 20px; left: 20px; color: var(--c); font-size: 20px; }

/* Volume modal */
.vol-modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: oklch(0.1 0.02 40 / 0.55);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: 20px; animation: fade 0.2s;
}
@keyframes fade { from { opacity: 0; } }
.vol-modal, .course-modal {
  background: var(--card); border-radius: 20px;
  padding: 32px; max-width: 640px; width: 100%;
  max-height: 90vh; overflow: auto;
  position: relative; box-shadow: var(--shadow-lg);
  border-top: 5px solid var(--c, var(--gold));
  animation: pop 0.25s;
}
@keyframes pop { from { transform: scale(0.96); opacity: 0; } }
.modal-close {
  position: absolute; top: 16px; left: 16px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--line);
  font-size: 22px; color: var(--ink-2);
}
.vol-modal-head { display: flex; gap: 20px; align-items: center; margin-bottom: 24px; }
.vol-modal-roman {
  width: 64px; height: 64px; border-radius: 14px;
  background: var(--c); color: #fff;
  display: grid; place-items: center;
  font-size: 28px; font-weight: 800; font-family: 'Inter', serif;
}
.vol-modal-title { font-size: 22px; }
.vol-modal-en { font-size: 12px; color: var(--ink-3); font-family: 'Inter', sans-serif; }
.vol-modal-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.vol-modal-stats > div {
  background: var(--bg-2); border-radius: 12px; padding: 14px;
  text-align: center;
}
.vol-modal-stats strong { display: block; font-size: 24px; color: var(--c); font-family: 'Inter', sans-serif; }
.vol-modal-stats span { font-size: 12px; color: var(--ink-3); }
.vms-title { font-weight: 700; font-size: 14px; margin-bottom: 12px; }
.vol-modal-section { margin-bottom: 24px; }
.vol-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vol-chip { padding: 6px 12px; background: var(--bg-2); border-radius: 99px; font-size: 13px; border: 1px solid var(--line-2); }
.featured-case {
  background: var(--bg-2); border-radius: 12px; padding: 18px;
  border-inline-start: 3px solid var(--c);
}
.case-no { font-size: 12px; color: var(--ink-3); font-family: 'Inter', sans-serif; }
.case-title { font-weight: 700; font-size: 16px; margin: 6px 0; }
.case-court { font-size: 12px; color: var(--ink-3); }
.case-summary { font-size: 14px; color: var(--ink-2); margin: 10px 0 0; }
.vol-modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
/* === MODAL RESPONSIVE === */

.vol-modal,
.course-modal {
  width: min(640px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(20px, 4vw, 32px);
}

/* ================== */
/* Tablet */
@media (max-width: 980px) {
  .vol-modal,
  .course-modal {
    width: 90vw;
  }
}

/* ================== */
/* Mobile */
@media (max-width: 640px) {
  .vol-modal,
  .course-modal {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    padding: 20px 16px;
  }

  .modal-close {
    top: 12px;
    left: 12px;
  }

  .vol-modal-head {
    flex-direction: column;
    gap: 12px;
  }

  .vol-modal-stats {
    grid-template-columns: 1fr;
  }

  .cm-grid {
    grid-template-columns: 1fr;
  }

  .vol-modal-actions,
  .cm-actions {
    flex-direction: column;
  }
}
/* === COURSES === */
.courses-toolbar {
  display: grid; grid-template-columns: 1.5fr auto auto auto;
  gap: 16px; padding: 16px; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px;
  margin-bottom: 16px; align-items: center;
}
.search-field {
  position: relative; display: flex; align-items: center;
  background: var(--bg-2); border-radius: 10px; padding: 0 14px;
}
.search-icon { color: var(--ink-3); font-size: 18px; }
.search-field input {
  background: transparent; border: 0; flex: 1;
  padding: 12px 10px; font-family: inherit; font-size: 14px;
  color: var(--ink); outline: none;
}
.chip-group { display: flex; gap: 6px; }
.chip {
  padding: 8px 14px; border-radius: 99px;
  background: var(--bg-2); border: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2);
}
.chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pillar-select {
  padding: 10px 14px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line);
  font-family: inherit; font-size: 13px; color: var(--ink);
}
.results-meta {
  display: flex; gap: 12px; justify-content: space-between;
  padding: 0 8px 14px; color: var(--ink-3); font-size: 13px;
}
.badge-reg { background: var(--sage); color: #fff; padding: 3px 10px; border-radius: 99px; font-size: 12px; }
.courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.course-card {
  position: relative; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 22px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow-sm); transition: all 0.2s;
}
.course-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--pc); }
.course-card.is-featured { border-top: 4px solid var(--gold); }
.featured-ribbon {
  position: absolute; top: 14px; left: 14px;
  background: var(--gold); color: #fff;
  padding: 3px 10px; border-radius: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
}
.course-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.course-mode { padding: 2px 10px; background: var(--bg-2); border-radius: 6px; }
.course-level { font-weight: 600; color: var(--pc); }
.course-title { font-size: 17px; line-height: 1.3; margin: 4px 0 0; }
.course-instructor { font-size: 13px; color: var(--ink-2); }
.course-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--ink-3); }
.course-pillar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
.pillar-dot { width: 8px; height: 8px; border-radius: 50%; }
.seats-bar {
  position: relative; height: 6px; background: var(--bg-2); border-radius: 3px;
  overflow: hidden;
}
.seats-fill { position: absolute; inset: 0 auto 0 0; border-radius: 3px; }
.seats-label { position: absolute; top: -18px; right: 0; font-size: 11px; color: var(--ink-3); }
.course-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px dashed var(--line-2); margin-top: 6px; }
.course-price { font-size: 18px; font-weight: 800; color: var(--ink); font-family: 'Inter', sans-serif; direction: rtl; }
.course-actions { display: flex; gap: 6px; }

.empty-state {
  padding: 60px 20px; text-align: center;
  background: var(--card); border-radius: 16px; border: 1px dashed var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-icon { font-size: 48px; color: var(--ink-3); }

.course-modal h3 { font-size: 22px; margin-bottom: 8px; }
.cm-meta { font-size: 13px; color: var(--ink-3); }
.cm-desc { margin: 16px 0; color: var(--ink-2); }
.cm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
.cm-grid > div {
  padding: 12px; background: var(--bg-2); border-radius: 10px;
}
.cm-grid span { display: block; font-size: 11px; color: var(--ink-3); }
.cm-grid strong { font-size: 15px; }
.cm-actions { display: flex; gap: 10px; }

.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: var(--sage); color: #fff;
  padding: 14px 24px; border-radius: 12px;
  box-shadow: var(--shadow-lg); z-index: 200;
  animation: slideUp 0.3s;
  font-weight: 600;
}
@keyframes slideUp { from { transform: translate(-50%, 20px); opacity: 0; } }
a{
  text-decoration: none;
}
/* === COMPASS === */
.compass-split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.compass-viz {
  background: linear-gradient(160deg, oklch(0.96 0.02 75), oklch(0.93 0.03 70));
  border: 1px solid var(--line); border-radius: 24px;
  padding: 40px; box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}
.compass-frame {
  position: relative; width: 490px; height: 490px; max-width: 100%;
  aspect-ratio: 1;
}
.compass-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, oklch(0.96 0.02 75), oklch(0.92 0.04 70));
  box-shadow: 0 0 0 8px oklch(0.85 0.1 75 / 0.3), inset 0 0 40px oklch(0.7 0.08 70 / 0.2);
}
.compass-ticks { position: absolute; inset: 8%; border-radius: 50%; }
.tick {
  position: absolute; top: 0; left: 50%;
  width: 1px; height: 10px;
  background: var(--gold-deep);
  transform-origin: center 200%;
}
.compass-rose {
  position: absolute; inset: 0; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.compass-item {
   position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(0, 0);
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 14px;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-sm);
  min-width: 120px; justify-content: center;
  margin-top: -28px; margin-left: -60px;
  font-size: 12px;
}
.compass-item.is-active {
  background: var(--gold); color: #fff; border-color: var(--gold);
  box-shadow: 0 6px 20px oklch(0.72 0.12 75 / 0.5);
}
.ci-icon { font-size: 16px; font-weight: 700; }
/* smooth needle rotation */

 
.compass-needle {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 4px; height: 60%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.needle-n, .needle-s {
  position: absolute; left: 0; right: 0;
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  left: -4px;
}
.needle-n { top: 0; border-bottom: 50% solid var(--terracotta); height: 50%; background: var(--terracotta); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.needle-s { bottom: 0; background: oklch(0.3 0.02 60); height: 50%; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.needle-center {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gold-deep);
  box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--gold-deep);
}
.compass-cardinal {
  position: absolute; font-weight: 800; color: var(--gold-deep); font-size: 14px;
}
.compass-cardinal.n { top: 12px; left: 50%; transform: translateX(-50%); }
.compass-cardinal.s { bottom: 12px; left: 50%; transform: translateX(-50%); }
.compass-cardinal.e { right: 12px; top: 50%; transform: translateY(-50%); }
.compass-cardinal.w { left: 12px; top: 50%; transform: translateY(-50%); }

.compass-reading {
  text-align: center; max-width: 360px;
}
.reading-label { font-size: 11px; color: var(--gold-deep); letter-spacing: 0.2em; font-weight: 700; }
.reading-title { font-size: 22px; font-weight: 700; margin: 6px 0 10px; }
.reading-desc { color: var(--ink-2); font-size: 14px; }

.knowledge-hub { background: var(--card); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-md); }
.kb-tabs { display: flex; background: var(--bg-2); border-bottom: 1px solid var(--line); overflow-x: auto; }
.kb-tab {
  flex: 1; padding: 14px 16px; background: transparent; border: 0;
  font-size: 13px; color: var(--ink-2); font-weight: 600;
  white-space: nowrap; position: relative;
  border-bottom: 3px solid transparent;
}
.kb-tab.is-active { color: var(--ink); background: var(--card); border-bottom-color: var(--gold); }
.kb-content { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.kb-card {
  display: flex; gap: 16px; padding: 16px;
  background: var(--bg-2); border-radius: 12px;
  border: 1px solid var(--line-2);
}
.kb-marker {
  flex-shrink: 0; width: 40px; height: 40px;
  border-radius: 10px; background: var(--gold);
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-family: 'Inter', sans-serif; direction: rtl;
}
.kb-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.kb-sub { color: var(--ink-2); font-size: 13px; line-height: 1.6; }
/* === COMPASS RESPONSIVE FIX === */

/* ================== */
/* Tablet */
@media (max-width: 980px) {

  .compass-split {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .compass-frame {
    width: 380px;
    height: 380px;
  }

  .compass-item {
    min-width: 100px;
    font-size: 11px;
    padding: 8px 10px;
    margin-left: -50px;
    margin-top: -24px;
  }

  .compass-reading {
    text-align: right;
    max-width: 100%;
  }
}

/* ================== */
/* Mobile */
@media (max-width: 640px) {

  .compass-viz {
    padding: 20px;
  }

  .compass-frame {
    width: 260px;
    height: 260px;
  }

  .compass-item {
    min-width: auto;
    padding: 6px 8px;
    font-size: 10px;
    margin-left: -40px;
    margin-top: -20px;
  }

  .ci-icon {
    font-size: 12px;
  }

  /* hide labels keep icon only */
  .ci-title {
    display: none;
  }

  .compass-reading {
    text-align: right;
  }

  .reading-title {
    font-size: 18px;
  }

  .reading-desc {
    font-size: 13px;
  }

  /* knowledge */
  .kb-tabs {
    flex-wrap: nowrap;
  }

  .kb-content {
    padding: 16px;
  }

  .kb-card {
    padding: 12px;
  }

  .kb-marker {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
}
/* === COMPASS POSITION FIX === */

/* center + scale properly */
.compass-frame {
  width: clamp(260px, 70vw, 420px);
  height: auto;
  margin: 0 auto;
}

/* improve items distribution */
.compass-item {
  min-width: auto;
  padding: 8px 10px;
  font-size: 11px;
  margin: 0;
  transform: translate(-50%, -50%);
}

/* ================== */
/* Mobile fine tuning */
@media (max-width: 640px) {
  .compass-item {
    padding: 6px 8px;
    font-size: 10px;
  }
}


/* === TABS FIX (MODERN) === */

.kb-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: transparent;
  border-bottom: none;
}

/* make tabs pill style */
.kb-tab {
  flex: unset;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-size: 12px;
  transition: all 0.2s ease;
}

/* active */
.kb-tab.is-active {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}

/* scroll behavior */
.kb-tabs {
  overflow-x: auto;
  scrollbar-width: none;
}

.kb-tabs::-webkit-scrollbar {
  display: none;
}

/* mobile spacing */
@media (max-width: 640px) {
  .kb-tabs {
    padding: 4px;
    flex-wrap: wrap;
  justify-content: center;
  }

  .kb-tab {
    font-size: 11px;
    padding: 6px 12px;
  }
}
/* === FIX FLOAT BUTTONS POSITION + SIZE === */

/* base normalize */
.compass-frame {
  position: relative;
}

/* all floating buttons */
.compass-frame .btn,
.compass-frame button {
  position: absolute;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

/* precise positions */
.compass-frame .btn:nth-child(1) { top: -10px; left: 50%; transform: translateX(-50%); }
.compass-frame .btn:nth-child(2) { top: 20%; right: -10px; }
.compass-frame .btn:nth-child(3) { bottom: 20%; right: -10px; }
.compass-frame .btn:nth-child(4) { bottom: -10px; left: 50%; transform: translateX(-50%); }
.compass-frame .btn:nth-child(5) { bottom: 20%; left: -10px; }
.compass-frame .btn:nth-child(6) { top: 20%; left: -10px; }

/* mobile tighter */
@media (max-width: 640px) {
  .compass-frame .btn,
  .compass-frame button {
    width: 30px;
    height: 30px;
  }

  .compass-frame .btn:nth-child(1) { top: -6px; }
  .compass-frame .btn:nth-child(2),
  .compass-frame .btn:nth-child(3) { right: -6px; }

  .compass-frame .btn:nth-child(4) { bottom: -6px; }
  .compass-frame .btn:nth-child(5),
  .compass-frame .btn:nth-child(6) { left: -6px; }
}
/* === NEWS STRIP === */
.news-strip {
  display: none;
  max-width: 1360px; margin: 0 auto;
  padding: 0 32px;
}
.news-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.news-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px;
  border-inline-start: 3px solid var(--gold);
}
.news-tag { display: inline-block; padding: 3px 10px; background: var(--bg-2); border-radius: 6px; font-size: 11px; color: var(--gold-deep); font-weight: 700; margin-bottom: 10px; }
.news-title { font-size: 15px; font-weight: 600; line-height: 1.4; }
.news-date { font-size: 12px; color: var(--ink-3); margin-top: 8px; }

/* === FOOTER === */
.footer {
  margin-top: 80px;
  background: linear-gradient(180deg, oklch(0.25 0.02 50), oklch(0.18 0.015 45));
  color: oklch(0.92 0.02 75);
  padding: 60px 32px 30px;
}
#courses{
  display: none;
}
.hashtag{
  display: flex;
  gap: 5px;
}
.footer-inner { max-width: 1360px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 50px; }
.footer-brand { display: flex; gap: 14px; align-items: start; }
.footer-brand img { height: 60px; }
.footer-brand-text { font-weight: 700; font-size: 18px; margin-bottom: 6px; }
.footer-brand-desc { font-size: 13px; color: oklch(0.75 0.02 75); max-width: 34ch; line-height: 1.7; }
.footer-col-title { font-size: 12px; letter-spacing: 0.18em; color: var(--gold); font-weight: 700; margin-bottom: 14px; text-transform: uppercase; font-family: 'Inter', sans-serif; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: oklch(0.85 0.02 75); text-decoration: none; font-size: 14px; }
.footer-col a:hover { color: var(--gold); }

.hashtag-banner {

  /* background: linear-gradient(100deg, oklch(0.75 0.14 75), oklch(0.6 0.14 50)); */
  background: linear-gradient(100deg, rgba(225, 160, 53, 0), rgba(192, 99, 37, 0));
  border-radius: 24px; padding: 44px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 30px; margin-bottom: 40px;
  position: relative; overflow: hidden;
    display: none;
}
.hashtag-banner::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 90% 50%, oklch(1 0 0 / 0.2), transparent 50%);
}
.hashtags { position: relative; display: flex; flex-direction: column; gap: 8px; }
.hashtag-big {
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 800; color: #fff;
  line-height: 1.2;
  text-shadow: 0 2px 8px oklch(0.3 0.05 40 / 0.3);
}
.hashtag-big span { opacity: 0.7; margin-left: 6px; }
.hashtag-sub { color: oklch(1 0 0 / 0.9); font-size: 15px; }
.hashtag-emblem {
  position: relative;
  width: 120px; height: 120px; border-radius: 50%;
  background: oklch(1 0 0 / 0.15);
  display: grid; place-items: center;
  font-size: 52px; color: #fff;
  border: 2px solid oklch(1 0 0 / 0.4);
  flex-shrink: 0;
}
.footer-bottom {
  padding-top: 30px; border-top: 1px solid oklch(1 0 0 / 0.1);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: oklch(0.7 0.015 75);
  flex-wrap: wrap; gap: 12px;
}

/* === TWEAKS PANEL === */
.tweaks-panel {
  position: fixed; bottom: 24px; left: 24px; z-index: 300;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 20px;
  box-shadow: var(--shadow-lg);
  width: 300px;
  font-size: 13px;
}
.tweaks-panel.is-hidden { display: none; }
.tweaks-head { font-weight: 700; font-size: 15px; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.tweaks-head button { background: transparent; border: 0; font-size: 20px; color: var(--ink-3); }
.tweak-group { margin-bottom: 16px; }
.tweak-label { font-size: 11px; color: var(--ink-3); letter-spacing: 0.1em; font-weight: 600; margin-bottom: 8px; text-transform: uppercase; font-family: 'Inter', sans-serif; }
.tweak-options { display: flex; flex-wrap: wrap; gap: 6px; }
.tweak-opt {
  padding: 6px 10px; border-radius: 8px;
  background: var(--bg-2); border: 1px solid var(--line);
  font-size: 12px; color: var(--ink-2);
}
.tweak-opt.is-active { background: var(--gold); color: #fff; border-color: var(--gold); }

/* Responsive */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .map-container, .compass-split, .footer-top { grid-template-columns: 1fr; }
  .courses-toolbar { grid-template-columns: 1fr; }
  .footer-top { gap: 30px; }
  .news-row { grid-template-columns: 1fr; }
}
/* === FOOTER RESPONSIVE IMPROVEMENT === */

/* ================== */
/* Tablet */
@media (max-width: 980px) {

  .footer {
    padding: 50px 24px 24px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .footer-brand {
    grid-column: span 2;
  }

  .footer-brand img {
    height: 50px;
  }

  .footer-brand-desc {
    max-width: 100%;
  }
}

/* ================== */
/* Mobile */
@media (max-width: 640px) {

  .footer {
    padding: 40px 16px 20px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-brand {
    flex-direction: column;
    gap: 10px;
  }

  .footer-brand img {
    height: 44px;
  }

  .footer-col-title {
    font-size: 11px;
  }

  .footer-col a {
    font-size: 13px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* tweaks panel fix */
  .tweaks-panel {
    width: calc(100vw - 32px);
    left: 16px;
    bottom: 16px;
  }
}