/* ============ Cybers.biz design system ============
   bg:      #070C16  deep navy (not pure black)
   surface: #0D1524 / raised #131E33
   defend:  #38BDF8  cyan   — learning & defense
   threat:  #FFB224  amber  — threats & labs
   text:    #E8EEF9 / muted #93A3BC
   type:    Space Grotesk display · Inter body · JetBrains Mono utility
==================================================== */

:root {
  --bg: #070C16;
  --surface: #0D1524;
  --raised: #131E33;
  --line: rgba(147, 163, 188, 0.16);
  --text: #E8EEF9;
  --muted: #93A3BC;
  --defend: #38BDF8;
  --defend-soft: rgba(56, 189, 248, 0.12);
  --threat: #FFB224;
  --threat-soft: rgba(255, 178, 36, 0.12);
  --danger: #F87171;
  --ok: #34D399;
  --radius: 14px;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* prevent any transition/animation flash before the page is ready */
html.preload *, html.preload *::before, html.preload *::after { transition: none !important; animation: none !important; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: calc(16px * var(--a11y-text-scale, 1));
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
  position: relative;
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.01em; }

.glow-cyan { color: var(--defend); text-shadow: 0 0 24px rgba(56,189,248,0.55); }

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 12, 22, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 20px;
  height: 64px; display: flex; align-items: center; gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: var(--text);
}
.brand-shield { width: 24px; height: 24px; color: var(--defend); }
.brand-dot { color: var(--defend); }
.nav-links { display: flex; gap: 4px; margin-inline-start: auto; }
.nav-links a {
  padding: 7px 11px; border-radius: 8px;
  font-size: 0.88rem; color: var(--muted); transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--defend-soft); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.xp-chip {
  font-family: var(--font-mono); font-size: 0.8rem;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--defend);
  white-space: nowrap;
}
.nav-burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-burger span { display: block; width: 20px; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; }

/* ============ HERO ============ */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
#netCanvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.5; }
.hero-inner {
  position: relative; max-width: 1180px; margin: 0 auto;
  padding: 72px 20px 90px; text-align: left;
}
.eyebrow {
  font-size: 0.78rem; letter-spacing: 0.08em;
  color: var(--defend); margin-bottom: 18px;
}
.eyebrow.threat { color: var(--threat); }
.eyebrow.defend { color: var(--defend); }
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700; max-width: 800px; margin-bottom: 22px;
}
.hero-sub { max-width: 620px; font-size: 1.1rem; color: var(--muted); margin-bottom: 34px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.hero-stats {
  display: flex; gap: 44px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 28px;
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-display); font-size: 1.7rem; color: var(--defend); }
.hero-stats span { font-size: 0.82rem; color: var(--muted); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; cursor: pointer; transition: all .15s;
}
.btn-primary {
  background: var(--defend); color: #04121F;
  box-shadow: 0 0 28px rgba(56,189,248,0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 40px rgba(56,189,248,0.5); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--defend); color: var(--defend); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 15px 34px; font-size: 1.05rem; }

/* ============ SECTIONS ============ */
.section { max-width: 1180px; margin: 0 auto; padding: 90px 20px; }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 12px; }
.section-sub { color: var(--muted); font-size: 1.02rem; }

/* ============ CARDS & GRIDS ============ */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: rgba(56,189,248,0.35); }
.card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.94rem; }
.card-icon {
  width: 44px; height: 44px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 16px;
}
.defend-bg { background: var(--defend-soft); border: 1px solid rgba(56,189,248,0.25); }
.threat-bg { background: var(--threat-soft); border: 1px solid rgba(255,178,36,0.25); }

/* Domains */
.grid-domains { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.domain-card { padding: 20px; }
.domain-card .card-icon { width: 38px; height: 38px; font-size: 1.1rem; margin-bottom: 12px; }
.domain-card h3 { font-size: 1rem; }
.domain-card p { font-size: 0.86rem; }

/* Threat flip cards */
.grid-threats { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.threat-card { perspective: 900px; cursor: pointer; min-height: 260px; height: 260px; background: none; border: 0; padding: 0; text-align: left; }
.threat-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform .5s; transform-style: preserve-3d;
}
.threat-card.flipped .threat-inner { transform: rotateY(180deg); }
.threat-face {
  position: absolute; inset: 0; backface-visibility: hidden;
  border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; overflow: hidden;
}
.threat-front {
  background: var(--surface); border: 1px solid rgba(255,178,36,0.25);
}
.threat-front .t-icon { font-size: 1.6rem; margin-bottom: 12px; }
.threat-front h3 { color: var(--threat); font-size: 1.05rem; margin-bottom: 8px; }
.threat-front p { color: var(--muted); font-size: 0.87rem; line-height: 1.55; margin-bottom: 12px; }
.threat-front .t-hint { margin-top: auto; padding-top: 8px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--threat); opacity: .8; }
.threat-back {
  background: var(--raised); border: 1px solid rgba(56,189,248,0.35);
  transform: rotateY(180deg);
}
.threat-back h4 { color: var(--defend); font-size: 0.85rem; font-family: var(--font-mono); margin-bottom: 8px; }
.threat-back p { color: var(--text); font-size: 0.87rem; }

/* ============ CAREERS ============ */
.careers-layout { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: start; }
.careers-list { display: flex; flex-direction: column; gap: 8px; }
.career-tab {
  text-align: left; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 13px 16px; cursor: pointer;
  color: var(--text); font-family: var(--font-body); transition: all .15s;
}
.career-tab .ct-title { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; }
.career-tab .ct-team { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }
.career-tab:hover { border-color: rgba(56,189,248,0.4); }
.career-tab.active { border-color: var(--defend); background: var(--defend-soft); }
.career-tab.active .ct-team { color: var(--defend); }
.career-detail { min-height: 420px; }
.career-detail h3 { font-size: 1.5rem; }
.cd-tagline { color: var(--defend); font-size: 0.95rem; margin-bottom: 18px; }
.cd-block { margin-bottom: 18px; }
.cd-block h4 { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; }
.cd-block p { color: var(--text); font-size: 0.94rem; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font-family: var(--font-mono); font-size: 0.76rem;
  padding: 5px 11px; border-radius: 999px;
  background: var(--raised); border: 1px solid var(--line); color: var(--text);
}
.pill.tool { border-color: rgba(56,189,248,0.3); color: var(--defend); }
.cd-path { list-style: none; counter-reset: step; }
.cd-path li {
  counter-increment: step; position: relative;
  padding: 6px 0 6px 38px; color: var(--text); font-size: 0.92rem;
}
.cd-path li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 7px;
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--defend);
  border: 1px solid rgba(56,189,248,0.35); border-radius: 6px; padding: 2px 5px;
}

/* ============ ROADMAP ============ */
.roadmap { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.rm-level { position: relative; }
.rm-level .rm-badge {
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--defend);
  border: 1px solid rgba(56,189,248,0.35); display: inline-block;
  padding: 3px 10px; border-radius: 999px; margin-bottom: 14px;
}
.rm-level h3 { font-size: 1.1rem; margin-bottom: 14px; }
.rm-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 9px; cursor: pointer;
  border: 1px solid transparent; transition: background .15s;
  user-select: none;
}
.rm-item:hover { background: var(--raised); }
.rm-check {
  width: 19px; height: 19px; border-radius: 6px; flex-shrink: 0;
  border: 1.5px solid var(--muted); display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: transparent; transition: all .15s;
}
.rm-item.done .rm-check { background: var(--defend); border-color: var(--defend); color: #04121F; }
.rm-item.done span { color: var(--muted); text-decoration: line-through; }
.rm-item span { font-size: 0.92rem; }
.rm-progress { height: 5px; background: var(--raised); border-radius: 99px; margin-top: 16px; overflow: hidden; }
.rm-progress i { display: block; height: 100%; background: var(--defend); border-radius: 99px; transition: width .3s; }

/* ============ LABS ============ */
.lab { margin-bottom: 22px; border-color: rgba(255,178,36,0.22); }
.lab:hover { border-color: rgba(255,178,36,0.4); }
.lab-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 12px; }
.lab-head h3 { font-size: 1.15rem; }
.lab-xp { font-size: 0.78rem; color: var(--threat); border: 1px solid rgba(255,178,36,0.35); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.lab-result { margin-top: 14px; font-weight: 600; min-height: 1.4em; }
.lab-result.ok { color: var(--ok); }
.lab-result.bad { color: var(--danger); }

/* Phishing inbox */
.inbox { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.mail {
  background: var(--raised); border: 1px solid var(--line); border-radius: 11px;
  padding: 16px 18px; cursor: pointer; text-align: left; width: 100%;
  color: var(--text); font-family: var(--font-body); transition: border-color .15s;
}
.mail:hover { border-color: var(--threat); }
.mail.correct { border-color: var(--ok); background: rgba(52,211,153,0.08); }
.mail.wrong { border-color: var(--danger); background: rgba(248,113,113,0.07); }
.mail-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 5px; }
.mail-from { font-family: var(--font-mono); font-size: 0.8rem; color: var(--defend); }
.mail-time { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.mail-subject { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.mail-body { color: var(--muted); font-size: 0.87rem; }
.mail-body .link { color: var(--defend); text-decoration: underline; }

/* Password lab */
.pw-input {
  width: 100%; margin-top: 16px; padding: 13px 16px;
  background: var(--raised); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font-size: 0.95rem; outline: none;
}
.pw-input:focus { border-color: var(--threat); }
.pw-meter { height: 8px; background: var(--raised); border-radius: 99px; margin-top: 12px; overflow: hidden; }
.pw-fill { height: 100%; width: 0; border-radius: 99px; background: var(--danger); transition: width .25s, background .25s; }
.pw-readout { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.8rem; }
#pwTier { color: var(--threat); }

/* Quiz */
.quiz-q { margin-bottom: 22px; }
.quiz-q h4 { font-size: 0.98rem; margin-bottom: 10px; }
.quiz-opts { display: flex; flex-direction: column; gap: 7px; }
.quiz-opt {
  text-align: left; background: var(--raised); border: 1px solid var(--line);
  border-radius: 9px; padding: 10px 14px; cursor: pointer; color: var(--text);
  font-family: var(--font-body); font-size: 0.9rem; transition: all .13s;
}
.quiz-opt:hover { border-color: var(--defend); }
.quiz-opt.selected { border-color: var(--defend); background: var(--defend-soft); }
.quiz-opt.right { border-color: var(--ok); background: rgba(52,211,153,0.1); }
.quiz-opt.wrong-pick { border-color: var(--danger); background: rgba(248,113,113,0.08); }
.quiz-explain { font-size: 0.83rem; color: var(--muted); margin-top: 7px; padding-left: 4px; border-left: 2px solid var(--defend); padding-left: 10px; }
.quiz-score { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 8px; }

/* ============ GLOSSARY ============ */
.glossary-search { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; flex-wrap: wrap; }
#glossaryInput {
  flex: 1; min-width: 260px; padding: 13px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font-size: 0.92rem; outline: none;
}
#glossaryInput:focus { border-color: var(--defend); box-shadow: 0 0 0 3px var(--defend-soft); }
.glossary-count { font-size: 0.78rem; color: var(--muted); }
.grid-glossary { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.gloss-card { padding: 20px 22px; }
.gloss-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.gloss-term { font-family: var(--font-mono); font-weight: 600; color: var(--defend); font-size: 1rem; }
.gloss-cat { font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }
.gloss-card p { font-size: 0.88rem; }
.gloss-ex { margin-top: 9px; font-size: 0.82rem; color: var(--muted); border-left: 2px solid var(--threat); padding-left: 10px; }

/* ============ AWARENESS ============ */
.aware-card h3 { display: flex; align-items: center; gap: 9px; }
.aware-card ul { list-style: none; margin-top: 10px; }
.aware-card li { position: relative; padding: 4px 0 4px 20px; color: var(--muted); font-size: 0.89rem; }
.aware-card li::before { content: "▸"; position: absolute; left: 0; color: var(--defend); }

/* ============ PROFILE / BADGES ============ */
.profile-card label { font-size: 0.72rem; letter-spacing: 0.06em; }
.profile-row { display: flex; gap: 10px; margin-top: 8px; margin-bottom: 22px; }
#profileName {
  flex: 1; padding: 11px 15px; background: var(--raised);
  border: 1px solid var(--line); border-radius: 10px; color: var(--text);
  font-family: var(--font-display); font-size: 0.95rem; outline: none;
}
#profileName:focus { border-color: var(--defend); }
.profile-stats { display: flex; gap: 36px; }
.profile-stats div { display: flex; flex-direction: column; }
.profile-stats strong { font-family: var(--font-display); font-size: 1.6rem; color: var(--defend); }
.profile-stats span { font-size: 0.8rem; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.badge {
  display: flex; align-items: center; gap: 8px;
  background: var(--raised); border: 1px solid rgba(255,178,36,0.4);
  padding: 8px 14px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--threat);
}

/* ============ CTA BAND ============ */
.cta-band {
  text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 120%, rgba(56,189,248,0.12), transparent 60%);
  padding: 56px 20px 64px;
}
.cta-band h2 { font-size: clamp(1.5rem, 3.5vw, 2.4rem); margin-bottom: 28px; }
.cta-band .btn { margin-bottom: 4px; }

/* ============ FOOTER ============ */
.footer { padding: 56px 20px 32px; }
.footer-inner {
  max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-start;
  gap: 40px; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid var(--line);
}
.footer-inner .muted { max-width: 340px; font-size: 0.88rem; margin-top: 12px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.footer-links a { color: var(--muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--defend); }
.footer-note { max-width: 1180px; margin: 24px auto 0; font-size: 0.75rem; color: var(--muted); }

/* ============ TOAST ============ */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--raised); border: 1px solid var(--defend);
  color: var(--text); padding: 12px 22px; border-radius: 12px;
  font-size: 0.85rem; opacity: 0; transition: all .3s; z-index: 100;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5); pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .careers-layout { grid-template-columns: 1fr; }
  .careers-list { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .career-tab { min-width: 190px; }
  .roadmap { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero-inner { padding: 32px 20px 60px; }
  .hero-stats { gap: 26px; }
  .section { padding: 64px 20px; }
}

/* ============ MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  #netCanvas { display: none; }
}
:focus-visible { outline: 2px solid var(--defend); outline-offset: 2px; }

/* ============ v2: language toggle, streak ============ */
.lang-toggle {
  background: transparent; border: 1px solid var(--line); color: var(--text);
  padding: 8px 16px; border-radius: 10px; cursor: pointer; font-size: 0.85rem;
  font-family: var(--font-display); font-weight: 600;
  transition: all .15s;
}
.lang-toggle:hover { border-color: var(--defend); color: var(--defend); }
.streak-chip {
  font-size: 0.8rem; padding: 5px 11px; border-radius: 999px;
  border: 1px solid rgba(255,178,36,0.35); background: var(--surface); color: var(--threat);
  white-space: nowrap;
}

/* ============ v2: Arabic typography & RTL ============ */
body.ar { font-family: "Cairo", var(--font-body); }
body.ar h1, body.ar h2, body.ar h3, body.ar h4,
body.ar .btn, body.ar .brand, body.ar .ct-title,
body.ar .quiz-score, body.ar .cert-name, body.ar #profileName { font-family: "Cairo", var(--font-display); }
[dir="rtl"] .cd-path li { padding: 6px 38px 6px 0; }
[dir="rtl"] .cd-path li::before { left: auto; right: 0; }
[dir="rtl"] .aware-card li { padding: 4px 20px 4px 0; }
[dir="rtl"] .aware-card li::before { left: auto; right: 0; content: "◂"; }
[dir="rtl"] .quiz-explain, [dir="rtl"] .gloss-ex { border-left: 0; padding-left: 0; border-right: 2px solid var(--defend); padding-right: 10px; }
[dir="rtl"] .gloss-ex { border-right-color: var(--threat); }
[dir="rtl"] .hero-inner, [dir="rtl"] .section-head { text-align: right; }

/* ============ v2: modals ============ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(4, 8, 16, 0.75); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal { position: relative; width: 100%; max-width: 420px; background: var(--raised); padding-top: 52px; }
.modal-close {
  position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line); border-radius: 8px;
  color: var(--muted); font-size: 0.95rem; cursor: pointer;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.1); }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 22px; }
.auth-tab {
  flex: 1; padding: 9px; border-radius: 9px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  font-family: var(--font-display); font-weight: 600; font-size: 0.88rem;
}
.auth-tab.active { border-color: var(--defend); color: var(--defend); background: var(--defend-soft); }
.modal label { display: block; font-size: 0.7rem; letter-spacing: .06em; margin-bottom: 6px; margin-top: 14px; }
.auth-input {
  width: 100%; padding: 12px 15px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; color: var(--text);
  font-size: 0.95rem; outline: none;
}
.auth-input:focus { border-color: var(--defend); }
.auth-error { color: var(--danger); font-size: 0.78rem; min-height: 1.3em; margin: 10px 0 6px; }
.auth-note { font-size: 0.8rem; margin-top: 14px; }
#authSubmit { width: 100%; }

/* ============ v2: profile / rank ============ */
.pu-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pu-rank { color: var(--defend); font-size: 0.82rem; margin-top: 4px; }
.rank-bar { height: 7px; background: var(--raised); border-radius: 99px; overflow: hidden; margin-top: 18px; }
.rank-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--defend), #7DD3FC); border-radius: 99px; transition: width .4s; }
.rank-next { font-size: 0.72rem; margin: 6px 0 18px; }
.profile-stats { display: flex; gap: 30px; flex-wrap: wrap; }

/* ============ v2: leaderboard ============ */
.lb-card { padding: 10px 22px 18px; overflow-x: auto; }
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th {
  text-align: start; font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: .07em; color: var(--muted); padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}
.lb-table td { padding: 11px 10px; font-size: 0.9rem; border-bottom: 1px solid rgba(147,163,188,0.07); }
.lb-table tr:last-child td { border-bottom: 0; }
.lb-rank { color: var(--defend); font-size: 0.78rem; }
.lb-self td { background: var(--defend-soft); }
.lb-self td:first-child { border-radius: 8px 0 0 8px; }
.lb-self td:last-child { border-radius: 0 8px 8px 0; }
[dir="rtl"] .lb-self td:first-child { border-radius: 0 8px 8px 0; }
[dir="rtl"] .lb-self td:last-child { border-radius: 8px 0 0 8px; }
.lb-me { margin-top: 14px; font-size: 0.8rem; }

/* ============ v2: certificate ============ */
.cert-modal { max-width: 560px; }
.cert {
  border: 1px solid rgba(56,189,248,0.4); border-radius: 12px;
  padding: 36px 30px; text-align: center;
  background:
    radial-gradient(ellipse at 50% -20%, rgba(56,189,248,0.14), transparent 55%),
    var(--surface);
}
.cert-shield { width: 40px; height: 40px; color: var(--defend); margin: 0 auto 10px; }
.cert-brand { font-size: 0.7rem; letter-spacing: 0.28em; color: var(--defend); margin-bottom: 16px; }
.cert h3 { font-size: 1.4rem; margin-bottom: 18px; }
.cert-line { color: var(--muted); font-size: 0.82rem; }
.cert-name { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--defend); margin: 6px 0 14px; }
.cert-course { font-weight: 600; margin: 4px 0 24px; }
.cert-meta { display: flex; justify-content: center; gap: 34px; flex-wrap: wrap; margin-bottom: 22px; }
.cert-meta div { display: flex; flex-direction: column; gap: 2px; }
.cert-meta span { font-size: 0.7rem; color: var(--muted); font-family: var(--font-mono); }
.cert-meta strong { font-size: 0.95rem; }
.cert-id { font-size: 0.72rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }

@media print {
  body * { visibility: hidden; }
  #certPrintable, #certPrintable * { visibility: visible; }
  #certPrintable {
    position: fixed; inset: 0; margin: auto; max-width: 640px; height: fit-content;
    background: white !important; color: #0D1524 !important; border-color: #0D1524;
  }
  #certPrintable .cert-line, #certPrintable .cert-meta span, #certPrintable .cert-id { color: #555 !important; }
  #certPrintable .cert-name, #certPrintable .cert-brand, #certPrintable .cert-shield { color: #0369A1 !important; }
}

/* ============ v3: mobile nav fixes ============ */
.btn { white-space: nowrap; }
.nav-inner { flex-wrap: nowrap; }
.brand { white-space: nowrap; flex-shrink: 0; }
body.ar .lang-toggle { font-family: "Cairo", var(--font-body); }
/* the toggle shows "العربية" even in English mode, so it always needs an Arabic-capable font */
.lang-toggle { font-family: "Cairo", var(--font-body); }

@media (max-width: 720px) {
  .brand-shield { width: 20px; height: 20px; }
  .hero-inner h1 { font-size: clamp(2rem, 9vw, 2.7rem); }
  .hero-stats { gap: 20px 28px; }
  .hero-stats strong { font-size: 1.5rem; }
}
@media (max-width: 400px) {
  .brand { font-size: 0.9rem; }
  .xp-chip { display: none; }
}

.modal-backdrop[hidden], [hidden] { display: none !important; }

/* ============ v4: AI mentor ============ */
.mentor-fab {
  position: fixed; bottom: 22px; right: 22px; left: auto; z-index: 80;
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(140deg, #0EA5E9, #0369A1);
  border: 1px solid rgba(56,189,248,0.6); color: #E8F6FF; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 30px rgba(14,165,233,0.35);
  transition: transform .15s;
}
.mentor-fab:hover { transform: translateY(-2px) scale(1.04); }
.mentor-fab svg { width: 30px; height: 30px; }
.mentor-fab-pulse {
  position: absolute; inset: -1px; border-radius: 50%;
  border: 1px solid rgba(56,189,248,0.55); animation: mentorPulse 2.4s ease-out infinite;
}
@keyframes mentorPulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.55); opacity: 0; } }

.mentor-panel {
  position: fixed; bottom: 92px; inset-inline-end: 22px; z-index: 85;
  width: min(390px, calc(100vw - 24px)); height: min(560px, calc(100dvh - 130px));
  display: flex; flex-direction: column;
  background: var(--raised); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.5); overflow: hidden;
}
.mentor-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(56,189,248,0.08), transparent);
}
.mentor-title { display: flex; align-items: center; gap: 11px; }
.mentor-title strong { display: block; font-family: var(--font-display); font-size: 0.98rem; }
body.ar .mentor-title strong { font-family: "Cairo", var(--font-display); }
.mentor-status { display: block; font-size: 0.66rem; color: var(--ok); letter-spacing: .05em; }
.mentor-avatar {
  width: 38px; height: 38px; border-radius: 11px; font-size: 1.15rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--defend-soft); border: 1px solid rgba(56,189,248,0.35);
}
.mentor-close { position: static; }
.mentor-log { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.msg {
  max-width: 86%; padding: 10px 13px; border-radius: 13px;
  font-size: 0.88rem; line-height: 1.55; overflow-wrap: break-word;
}
.msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-start-start-radius: 4px; }
.msg.me { align-self: flex-end; background: var(--defend-soft); border: 1px solid rgba(56,189,248,0.35); border-start-end-radius: 4px; }
.msg code { font-family: var(--font-mono); font-size: 0.8em; background: rgba(56,189,248,0.12); padding: 1px 5px; border-radius: 5px; }
.msg.typing { display: flex; gap: 5px; padding: 14px 16px; }
.msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .2s; }
.msg.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100% { opacity: .25; } 40% { opacity: 1; } }
.mentor-suggests { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 14px 8px; }
.mentor-sug {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  padding: 6px 11px; border-radius: 999px; font-size: 0.76rem; cursor: pointer; transition: all .15s;
}
.mentor-sug:hover { border-color: var(--defend); color: var(--defend); }
.mentor-inputrow { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
#mentorInput {
  flex: 1; padding: 11px 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 11px; color: var(--text);
  font-size: 0.9rem; outline: none; min-width: 0;
}
#mentorInput:focus { border-color: var(--defend); }
body.ar #mentorInput { font-family: "Cairo", var(--font-body); }
.mentor-send {
  width: 44px; border-radius: 11px; border: 0; cursor: pointer;
  background: linear-gradient(140deg, #0EA5E9, #0369A1); color: white; font-size: 1rem;
  flex-shrink: 0;
}
[dir="rtl"] .mentor-send { transform: scaleX(-1); }
@media (max-width: 480px) {
  .mentor-panel { bottom: 86px; inset-inline-end: 12px; }
  .mentor-fab { bottom: 16px; right: 16px; left: auto; }
}

/* ============ v5: academy multi-page ============ */
.page-head { padding-top: 74px; padding-bottom: 0; }
.page-head + .section { padding-top: 34px; }
.nav-links a.active { color: var(--defend); background: var(--defend-soft); }
.nav-pro { color: var(--threat) !important; }
.hero-home .hero-inner h1 { font-size: clamp(3rem, 9vw, 5.2rem); }
body:not(.ar) { font-family: var(--font-body); }

/* module cards */
.module-card { position: relative; text-decoration: none; display: block; }
.module-num {
  position: absolute; top: 20px; inset-inline-end: 22px;
  font-size: 2rem; font-weight: 600; color: rgba(147,163,188,0.18);
}
.module-open { display: inline-block; margin-top: 14px; font-size: 0.74rem; color: var(--defend); letter-spacing: .05em; }
.module-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 38px; }

/* pro */
.pro-perks { list-style: none; margin: 18px 0 22px; display: grid; gap: 12px; }
.pro-perks li { padding: 12px 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; font-size: 0.92rem; }
.pro-price { font-size: 1.6rem; color: var(--threat); }
.pro-price span[data-i18n] { font-size: 0.85rem; color: var(--muted); }
.pro-tag {
  font-size: 0.6rem; letter-spacing: .08em; color: #0B1220;
  background: linear-gradient(120deg, var(--threat), #FCD34D);
  padding: 2px 7px; border-radius: 6px; vertical-align: 2px;
}
#paypal-buttons { margin-top: 10px; }

/* admin */
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.adm-stat { padding: 20px 22px; text-align: center; }
.adm-stat strong { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--defend); }
.adm-stat span { font-size: 0.78rem; }
.adm-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.adm-toolbar .auth-input { margin: 0; }
.adm-tablewrap { overflow-x: auto; }
.adm-table td { white-space: nowrap; }
.adm-xp { width: 84px; padding: 6px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--text); }
.adm-role { padding: 6px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--text); }
.adm-actions { display: flex; gap: 6px; }

/* ============ v6: Arabic font EVERYWHERE ============ */
body.ar, body.ar h1, body.ar h2, body.ar h3, body.ar h4, body.ar h5,
body.ar p, body.ar a, body.ar li, body.ar span, body.ar button, body.ar input,
body.ar select, body.ar td, body.ar th, body.ar label, body.ar strong {
  font-family: "Cairo", "Inter", sans-serif;
}
body.ar .mono, body.ar .eyebrow, body.ar .lang-toggle, body.ar .streak-chip,
body.ar .xp-chip, body.ar .glossary-count, body.ar .rank-next {
  font-family: "Cairo", "JetBrains Mono", monospace;
}
body.ar [dir="ltr"], body.ar .mail-from, body.ar .cert-pill, body.ar .type-prompt, body.ar #typeLine, body.ar .gloss-en {
  font-family: "JetBrains Mono", monospace;
}

/* ============ v6: next-gen hero ============ */
.hero-v2 { position: relative; overflow: hidden; }
.aurora { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; pointer-events: none; }
.a1 { width: 560px; height: 560px; background: rgba(56,189,248,0.22); top: -180px; inset-inline-start: -120px; animation: drift1 16s ease-in-out infinite alternate; }
.a2 { width: 480px; height: 480px; background: rgba(2,132,199,0.20); bottom: -160px; inset-inline-end: -100px; animation: drift2 20s ease-in-out infinite alternate; }
.a3 { width: 320px; height: 320px; background: rgba(255,178,36,0.10); top: 30%; inset-inline-end: 22%; animation: drift1 24s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(60px, 40px) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-50px, -35px) scale(1.08); } }
.cyber-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    linear-gradient(rgba(56,189,248,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 30%, transparent 75%);
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px; border-radius: 999px; font-size: 0.74rem;
  border: 1px solid rgba(56,189,248,0.35); background: rgba(56,189,248,0.07);
  color: var(--defend); backdrop-filter: blur(6px);
}
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: livePulse 1.8s infinite; }
@keyframes livePulse { 50% { opacity: .4; } }
.grad-title {
  font-size: clamp(3.2rem, 10vw, 6rem) !important;
  background: linear-gradient(100deg, #E8F1FF 15%, #38BDF8 45%, #7DD3FC 60%, #E8F1FF 85%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradSlide 5.5s linear infinite;
  margin-top: 22px !important;
}
.grad-dot { color: transparent; }
@keyframes gradSlide { to { background-position: 220% center; } }
.hero-slogan {
  font-size: clamp(1.25rem, 3.6vw, 1.9rem); font-weight: 600; color: var(--text);
  margin-top: 6px; letter-spacing: .01em;
}
.hero-type {
  margin: 22px auto 0; max-width: 460px; text-align: left;
  background: rgba(7,12,22,0.75); border: 1px solid var(--line); border-radius: 11px;
  padding: 11px 16px; font-size: 0.82rem; color: var(--muted); backdrop-filter: blur(8px);
}
[dir="rtl"] .hero-type { text-align: left; }
.type-prompt { color: var(--ok); }
#typeLine { color: var(--defend); }
.type-caret { animation: caretBlink 1s steps(1) infinite; color: var(--defend); }
@keyframes caretBlink { 50% { opacity: 0; } }
.hero-stats.glass {
  margin-top: 40px; padding: 22px 10px; border-radius: 16px;
  border: 1px solid rgba(147,163,188,0.16); background: rgba(13,21,36,0.55);
  backdrop-filter: blur(10px); display: flex; gap: 0; flex-wrap: nowrap; justify-content: space-around; align-items: stretch;
}
.hero-stats.glass > div {
  flex: 1; padding: 4px 22px; align-items: center; text-align: center; gap: 6px;
  border-inline-end: 1px solid rgba(147,163,188,0.12);
}
.hero-stats.glass > div:last-child { border-inline-end: 0; }
.hero-stats.glass strong { font-size: 1.9rem; line-height: 1.1; }
.hero-stats.glass span { font-size: 0.78rem; line-height: 1.3; }

/* ============ v6: plans ============ */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; align-items: stretch; }
.plan-card { position: relative; display: flex; flex-direction: column; padding-top: 60px; }
.plan-hot { border-color: rgba(56,189,248,0.55); box-shadow: 0 0 42px rgba(56,189,248,0.12); }
.plan-pro, .plan-card.plan-pro { border-color: rgba(255,178,36,0.4); }
.plan-tag {
  position: absolute; top: 18px; inset-inline-start: 24px;
  font-size: 0.66rem; letter-spacing: .1em; padding: 5px 12px; border-radius: 999px;
  background: var(--defend-soft); color: var(--defend); border: 1px solid rgba(56,189,248,0.3);
  white-space: nowrap; z-index: 1;
}
.plan-pro .plan-tag { background: rgba(255,178,36,0.1); color: var(--threat); border-color: rgba(255,178,36,0.35); }
.plan-name { font-size: 1.25rem; }
.plan-price { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; color: var(--defend); margin: 6px 0 16px; }
.plan-pro .plan-price { color: var(--threat); }
.plan-feats { list-style: none; display: grid; gap: 9px; margin-bottom: 22px; flex: 1; }
.plan-feats li { font-size: 0.88rem; padding-inline-start: 24px; position: relative; color: var(--muted); }
.plan-feats li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--ok); font-weight: 700; }
.plan-cta .btn { width: 100%; }
.pp-slot { min-height: 44px; }
.plans-note { text-align: center; margin-top: 22px; font-size: 0.78rem; }
.fdn-tag {
  font-size: 0.6rem; letter-spacing: .08em; color: #06222E;
  background: linear-gradient(120deg, #38BDF8, #7DD3FC);
  padding: 2px 7px; border-radius: 6px; vertical-align: 2px;
}

/* ============ v6: certification roadmap ============ */
.certs-legend { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.certs-legend .cl { font-size: 0.7rem; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); }
.cl-0 { color: #4ADE80; border-color: rgba(74,222,128,0.4) !important; }
.cl-1 { color: #38BDF8; border-color: rgba(56,189,248,0.4) !important; }
.cl-2 { color: #FFB224; border-color: rgba(255,178,36,0.4) !important; }
.cl-3 { color: #F472B6; border-color: rgba(244,114,182,0.4) !important; }
.certs-row { margin-bottom: 16px; }
.certs-path { margin-bottom: 16px; font-size: 1.05rem; }
.certs-cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.certs-cell { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.certs-lvl { display: block; font-size: 0.62rem; letter-spacing: .09em; margin-bottom: 9px; }
.certs-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.cert-pill {
  font-family: var(--font-mono); font-size: 0.72rem; padding: 4px 9px; border-radius: 7px;
  background: rgba(147,163,188,0.07); border: 1px solid var(--line); color: var(--text);
}
.cert-pill.cl-0 { border-color: rgba(74,222,128,0.35); }
.cert-pill.cl-1 { border-color: rgba(56,189,248,0.35); }
.cert-pill.cl-2 { border-color: rgba(255,178,36,0.35); }
.cert-pill.cl-3 { border-color: rgba(244,114,182,0.35); }
.certs-credit { margin-top: 18px; font-size: 0.74rem; }
.certs-credit a { color: var(--defend); }

/* ============ v6: Help FAB ============ */
.mentor-fab { flex-direction: column; gap: 0; }
.fab-q { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1; }
body.ar .fab-q { font-family: var(--font-display); }
.fab-label { font-size: 0.56rem; font-weight: 600; letter-spacing: .04em; margin-top: 1px; }
.mentor-headbtns { display: flex; gap: 4px; }
.mentor-clear { position: static; font-size: 0.85rem; }

/* ============ v7: unified Arabic font on BOTH languages ============ */
body, h1, h2, h3, h4, h5, p, a, li, span, button, input, select, td, th, label, strong {
  font-family: "Cairo", "Space Grotesk", "Inter", sans-serif;
}
.mono, .eyebrow { font-family: "Cairo", "JetBrains Mono", monospace; }
.hero-type, .type-prompt, #typeLine, .type-caret, .mail-from, .cert-pill, .gloss-en,
[dir="ltr"].mono, .msg code, .pw-input, .cert-id, code {
  font-family: "JetBrains Mono", monospace !important;
}

/* v7: hero spacing — breathing room between terminal line and CTAs */
.hero-type { margin: 26px auto 0; }
.hero-ctas { margin-top: 30px; }
.hero-v2 .hero-stats.glass { margin-top: 36px; }

/* v7: term pills on plans */
.plan-term { font-size: 0.72rem; color: var(--muted); }
.term-pills { display: flex; gap: 8px; margin: 4px 0 18px; flex-wrap: wrap; }
.term-pill {
  flex: 1; min-width: 74px; padding: 8px 6px; border-radius: 10px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  font-size: 0.72rem; display: flex; flex-direction: column; gap: 2px; align-items: center;
  transition: all .15s;
}
.term-pill i { font-style: normal; font-size: 0.82rem; color: var(--text); font-weight: 600; }
.term-pill:hover { border-color: var(--defend); }
.term-pill.active { border-color: var(--defend); background: var(--defend-soft); color: var(--defend); }
.term-pill.active i { color: var(--defend); }
.plan-pro .term-pill.active { border-color: var(--threat); background: rgba(255,178,36,0.08); color: var(--threat); }
.plan-pro .term-pill.active i { color: var(--threat); }

/* v7: ICS module */
.ics-card { position: relative; }
.ics-list { list-style: none; margin-top: 10px; display: grid; gap: 7px; }
.ics-list li { font-size: 0.86rem; color: var(--muted); padding-inline-start: 20px; position: relative; }
.ics-list li::before { content: "▸"; position: absolute; inset-inline-start: 0; color: var(--defend); }
.ics-outcome { margin-top: 22px; border-color: rgba(74,222,128,0.35); }

/* v7: MCT signature on certificate */
.cert-sign {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 6px 0 18px; padding-top: 18px; border-top: 1px dashed var(--line);
}
.cert-signer { text-align: start; }
.cert-sig-name { font-weight: 700; font-size: 1.02rem; }
.cert-sig-title { font-size: 0.74rem; color: var(--muted); }
.mct-badge {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 14px; border-radius: 10px; font-weight: 700; font-size: 1rem; letter-spacing: .06em;
  color: #fff; background: linear-gradient(135deg, #0078D4, #005A9E);
  border: 1px solid rgba(255,255,255,0.25);
}
.mct-badge i { font-style: normal; font-size: 0.5rem; font-weight: 500; letter-spacing: .04em; opacity: .9; }
@media print {
  #certPrintable .mct-badge { background: #0078D4 !important; color: white !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #certPrintable .cert-sig-name { color: #0D1524 !important; }
}
.adm-months { margin-inline-start: 4px; padding: 6px 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--text); }

/* ============ v8: Foundations curriculum ============ */
.fnd-intro { position: relative; border-color: rgba(56,189,248,0.35); margin-bottom: 22px; padding-inline-start: 68px; }
.fnd-badge {
  position: absolute; inset-inline-start: 20px; top: 22px;
  width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  background: var(--defend-soft); border: 1px solid rgba(56,189,248,0.4); color: var(--defend); font-weight: 700; font-size: 0.8rem;
}
.fnd-track { display: grid; gap: 12px; position: relative; }
.fnd-item { display: flex; gap: 16px; align-items: flex-start; transition: border-color .15s, transform .15s; }
.fnd-item:hover { border-color: rgba(56,189,248,0.4); transform: translateX(-3px); }
[dir="ltr"] .fnd-item:hover { transform: translateX(3px); }
.fnd-num {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, rgba(56,189,248,0.15), rgba(2,132,199,0.08));
  border: 1px solid var(--line); color: var(--defend); font-size: 1.05rem; font-weight: 600;
}
.fnd-body h3 { font-size: 1.02rem; display: flex; align-items: center; gap: 9px; margin-bottom: 5px; }
.fnd-ico { font-size: 1.1rem; }
.fnd-body p { font-size: 0.88rem; }

/* ============ v9: frameworks, CIS, pro course ============ */
.fw-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.fw-tab {
  padding: 9px 16px; border-radius: 999px; cursor: pointer; font-size: 0.84rem;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted); transition: all .15s;
}
.fw-tab:hover { border-color: var(--defend); }
.fw-tab.active { border-color: var(--defend); background: var(--defend-soft); color: var(--defend); }
.fw-card { position: relative; }
.fw-code {
  display: inline-block; font-size: 0.72rem; letter-spacing: .05em; color: var(--defend);
  background: var(--defend-soft); border: 1px solid rgba(56,189,248,0.3);
  padding: 4px 10px; border-radius: 7px; margin-bottom: 12px;
}
.fw-note { font-size: 0.7rem; color: var(--muted); margin: 12px 0 8px; }
.fw-link { display: inline-block; margin-top: 14px; color: var(--defend); font-size: 0.8rem; }
.fw-cis-head { margin-bottom: 18px; }
.cis-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.cis-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.cis-num {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, rgba(56,189,248,0.16), rgba(2,132,199,0.08));
  border: 1px solid var(--line); color: var(--defend); font-weight: 700; font-size: 0.95rem;
}
.cis-ico { font-size: 1.4rem; flex-shrink: 0; }
.cis-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cis-titles strong { font-size: 0.92rem; line-height: 1.3; }
.cis-titles span { font-size: 0.68rem; }

.course-track { display: grid; gap: 16px; }
.course-card { border-inline-start: 3px solid var(--defend); }
.course-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.course-num {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, var(--defend-soft), rgba(2,132,199,0.1));
  border: 1px solid rgba(56,189,248,0.3); color: var(--defend); font-size: 1.15rem; font-weight: 700;
}
.course-head h3 { font-size: 1.12rem; }
.course-topics-label { font-size: 0.7rem; color: var(--muted); margin: 14px 0 8px; letter-spacing: .05em; }
.course-audience { margin-top: 22px; border-color: rgba(255,178,36,0.3); }
.course-aud-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; margin-top: 12px; }
.course-aud-list li { font-size: 0.86rem; color: var(--muted); padding-inline-start: 20px; position: relative; }
.course-aud-list li::before { content: "▹"; position: absolute; inset-inline-start: 0; color: var(--threat); }

/* ============ v10: Microsoft certs + vouchers ============ */
.ms-voucher-banner { border-color: rgba(255,178,36,0.4); background: linear-gradient(120deg, rgba(255,178,36,0.08), transparent); margin-bottom: 22px; }
.ms-voucher-banner p { font-size: 0.95rem; margin: 0; }
.ms-card { border-top: 3px solid var(--defend); }
.ms-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ms-code { color: #fff; font-family: var(--font-mono); font-weight: 700; font-size: 0.9rem; padding: 5px 12px; border-radius: 8px; letter-spacing: .03em; }
.ms-value { font-size: 0.72rem; color: var(--muted); }
.ms-tag { font-size: 0.88rem; margin-bottom: 16px; }
.ms-facts-label { font-size: 0.68rem; color: var(--muted); letter-spacing: .06em; margin: 14px 0 8px; }
.ms-facts { list-style: none; display: grid; gap: 5px; }
.ms-facts li { font-size: 0.82rem; color: var(--muted); padding-inline-start: 18px; position: relative; }
.ms-facts li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--ok); }
.ms-domains { display: grid; gap: 10px; }
.ms-domain { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; }
.ms-domain-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.ms-domain-head strong { font-size: 0.86rem; }
.ms-domain-head span { font-size: 0.72rem; flex-shrink: 0; }
.ms-domain p { font-size: 0.78rem; }
.ms-learn { margin-top: 22px; border-color: rgba(56,189,248,0.3); }
.ms-learn-list { list-style: none; display: grid; gap: 8px; margin-top: 12px; }
.ms-learn-list li { font-size: 0.86rem; color: var(--muted); padding-inline-start: 20px; position: relative; }
.ms-learn-list li::before { content: "📘"; position: absolute; inset-inline-start: 0; font-size: 0.8rem; }
.vouchers-card { border-color: rgba(255,178,36,0.35); }
.voucher-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(147,163,188,0.08); flex-wrap: wrap; }
.voucher-row:last-child { border-bottom: 0; }
.voucher-exam { font-weight: 700; color: var(--text); padding: 4px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.voucher-status { font-size: 0.8rem; }
.voucher-pending { color: var(--muted); }
.voucher-issued { color: var(--ok); }
.voucher-used { color: var(--defend); }
.voucher-code { font-size: 0.78rem; color: var(--threat); background: rgba(255,178,36,0.08); padding: 3px 8px; border-radius: 6px; }

/* ============ v11: Kuwait NBCC + GCC frameworks ============ */
.kw-intro { border-color: rgba(56,189,248,0.35); margin-bottom: 18px; }
.kw-funcs { display: grid; gap: 14px; }
.kw-func-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.kw-func-ico { font-size: 1.5rem; }
.kw-func-code { display: block; font-size: 0.68rem; color: var(--defend); letter-spacing: .05em; }
.kw-func-head strong { font-size: 1.05rem; }
.kw-func-count {
  margin-inline-start: auto; background: var(--defend-soft); color: var(--defend);
  border: 1px solid rgba(56,189,248,0.3); border-radius: 999px; padding: 3px 11px; font-size: 0.78rem;
}
.kw-ctrls { display: flex; flex-wrap: wrap; gap: 7px; }
.kw-ctrl {
  font-size: 0.72rem; padding: 5px 10px; border-radius: 7px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
}
.gcc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.gcc-country { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.gcc-flag { font-size: 1.5rem; }
.gcc-items { display: grid; gap: 14px; }
.gcc-item strong { font-size: 0.92rem; display: block; margin-bottom: 3px; }
.gcc-item p { font-size: 0.82rem; }
.gcc-link { color: var(--defend); }


/* tighten large vertical gaps site-wide (less overwhelming) */
.section { padding: 68px 24px; }
.page-head { padding-top: 78px; padding-bottom: 0; }
.page-head + .section { padding-top: 30px; }

/* ============ v12: preferences panel ============ */
.prefs-card { border-color: rgba(56,189,248,0.25); }
.prefs-head { margin-bottom: 18px; }
.prefs-head p { font-size: 0.85rem; margin-top: 4px; }
.prefs-group { margin-bottom: 20px; }
.prefs-group:last-of-type { margin-bottom: 8px; }
.prefs-group-title { font-size: 0.68rem; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; text-transform: uppercase; }
.prefs-toggles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.pref-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 15px; border-radius: 11px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); transition: border-color .15s;
}
.pref-toggle:hover { border-color: rgba(56,189,248,0.35); }
.pref-toggle span:first-child { font-size: 0.9rem; }
.pref-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.pref-switch {
  position: relative; flex-shrink: 0; width: 40px; height: 23px; border-radius: 999px;
  background: var(--line); transition: background .18s;
}
.pref-switch::after {
  content: ""; position: absolute; top: 2px; inset-inline-start: 2px;
  width: 19px; height: 19px; border-radius: 50%; background: #6B7A90; transition: all .18s;
}
.pref-toggle input:checked ~ .pref-switch { background: var(--defend); }
.pref-toggle input:checked ~ .pref-switch::after { inset-inline-start: 19px; background: #fff; }
[dir="rtl"] .pref-toggle input:checked ~ .pref-switch::after { inset-inline-start: 2px; inset-inline-end: 19px; }
.prefs-note { font-size: 0.76rem; margin-top: 6px; }

/* About page */
.about-lead { font-size: 1.05rem; line-height: 1.8; margin-bottom: 24px; border-inline-start: 3px solid var(--defend); }
.about-founder { margin-top: 22px; border-color: rgba(0,120,212,0.35); }
.about-founder-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.about-founder-inner h3 { margin-bottom: 4px; }
.about-cta { margin-top: 30px; }

/* Journey dashboard hub */
.dash-hub-head { margin: 28px 0 16px; }
.dash-hub-head h3 { font-size: 1.15rem; }
.dash-group { margin-bottom: 22px; }
.dash-group-title { font-size: 0.68rem; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; margin-bottom: 10px; }
.dash-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.dash-card {
  display: flex; align-items: center; gap: 12px; padding: 15px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 13px;
  text-decoration: none; color: var(--text); transition: all .15s;
}
.dash-card:hover { border-color: rgba(56,189,248,0.4); background: var(--defend-soft); transform: translateY(-2px); }
.dash-ico { font-size: 1.3rem; flex-shrink: 0; }
.dash-label { font-size: 0.92rem; font-weight: 500; flex: 1; }
.dash-arrow { opacity: .3; font-size: 1.2rem; }
[dir="ltr"] .dash-arrow { transform: scaleX(-1); }



#footerSlogan { color: var(--defend); letter-spacing: .01em; }

/* ============ v14: sessions, new labs, admin sessions ============ */
.sess-card { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.sess-main { flex: 1; min-width: 220px; }
.sess-when { font-size: 0.78rem; color: var(--defend); margin-bottom: 6px; }
.sess-meta { font-size: 0.76rem; color: var(--muted); margin-top: 8px; }
.sess-badge { font-size: 0.8rem; padding: 6px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.sess-badge.pending, .sess-badge.pending { color: var(--threat); }
.sess-badge.approved { color: var(--ok); }
.sess-badge.denied { color: var(--danger); }
.url-item { display: block; width: 100%; text-align: start; padding: 12px 15px; margin-bottom: 8px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); cursor: pointer; transition: all .15s; font-size: 0.85rem; }
.url-item:hover { border-color: var(--defend); }
.url-item.correct { border-color: var(--ok); background: rgba(74,222,128,0.08); }
.url-item.wrong { border-color: var(--danger); background: rgba(239,68,68,0.1); }
.sort-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; flex-wrap: wrap; }
.sort-label { font-size: 0.88rem; flex: 1; min-width: 160px; }
.sort-btns { display: flex; gap: 6px; }
.sort-btn { padding: 6px 14px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 0.8rem; }
.sort-btn.safe.sel { border-color: var(--ok); color: var(--ok); background: rgba(74,222,128,0.1); }
.sort-btn.risky.sel { border-color: var(--danger); color: var(--danger); background: rgba(239,68,68,0.1); }
.row-ok { border-color: rgba(74,222,128,0.4); }
.row-bad { border-color: rgba(239,68,68,0.4); }
/* admin sessions */
.adm-sess-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 14px 0 18px; align-items: center; }
.adm-sess-desc { grid-column: 1 / -1; }
.adm-proonly { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; }
.adm-sess-card { margin-top: 12px; }
.adm-sess-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.adm-sess-regs-label { font-size: 0.72rem; margin-bottom: 8px; }
.adm-regs { display: grid; gap: 6px; }
.adm-reg { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; flex-wrap: wrap; font-size: 0.85rem; }
.adm-reg-actions { display: flex; align-items: center; gap: 6px; }
.adm-reg .sess-badge { font-size: 0.7rem; padding: 3px 8px; }

/* ============ v15: more labs + expanded about ============ */
.cia-row, .ports-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; flex-wrap: wrap; }
.cia-label { font-size: 0.86rem; flex: 1; min-width: 180px; }
.cia-btns, .ports-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.cia-btn, .ports-btn { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 0.78rem; }
.cia-btn.sel, .ports-btn.sel { border-color: var(--defend); color: var(--defend); background: var(--defend-soft); }
.ports-num { font-size: 1.05rem; color: var(--defend); font-weight: 600; }
.ir-steps { display: flex; flex-direction: column; gap: 8px; }
.ir-step { display: flex; align-items: center; gap: 10px; padding: 12px 15px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; text-align: start; font-size: 0.88rem; transition: all .15s; }
.ir-step:hover:not(:disabled) { border-color: var(--defend); }
.ir-step i { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--defend); color: #04121f; font-size: 0.72rem; font-weight: 700; font-style: normal; flex-shrink: 0; }
.ir-step.picked, .ir-step.done { border-color: var(--ok); background: rgba(74,222,128,0.08); cursor: default; }

.about-section-head { margin: 34px 0 16px; }
.about-section-head h3 { font-size: 1.3rem; }
.about-help-card { display: flex; gap: 14px; align-items: flex-start; }
.about-help-ico { font-size: 1.6rem; flex-shrink: 0; }
.about-help-card h4 { font-size: 1rem; margin-bottom: 4px; }
.about-help-card p { font-size: 0.86rem; }
.about-mentor { margin-top: 22px; border-color: rgba(56,189,248,0.35); background: linear-gradient(120deg, rgba(56,189,248,0.06), transparent); }
.about-mentor h3 { font-size: 1.2rem; margin-bottom: 10px; }
.about-membership { margin-top: 22px; border-color: rgba(56,189,248,0.3); background: linear-gradient(135deg, rgba(56,189,248,0.05), rgba(255,178,36,0.03)); }
.about-membership h3 { font-size: 1.2rem; margin-bottom: 12px; }
.about-membership-text { font-size: 1rem; line-height: 1.85; color: var(--text); }



/* ============ v18: SMART labs accordion ============ */
.smart-banner { margin-bottom: 22px; border-color: rgba(56,189,248,0.3); background: linear-gradient(120deg, rgba(56,189,248,0.06), transparent); }
.smart-banner h3 { font-size: 1.1rem; margin-bottom: 8px; }
.smart-text { font-size: 0.9rem; line-height: 1.7; color: var(--muted); }
.smart-text b { color: var(--defend); font-weight: 700; }
.smart-prog { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.smart-prog-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.smart-prog-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--defend), var(--ok)); border-radius: 999px; transition: width .4s; }
.smart-prog span { font-size: 0.76rem; color: var(--muted); white-space: nowrap; }

.labs-accordion { display: flex; flex-direction: column; gap: 10px; }
.lab-acc { border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; transition: border-color .2s; }
.lab-acc.open { border-color: rgba(56,189,248,0.4); }
.lab-acc.is-done { border-color: rgba(74,222,128,0.3); }
.lab-acc-pro { border-color: rgba(255,178,36,0.3); }
.lab-acc-head {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  background: transparent; border: none; cursor: pointer; text-align: start; color: var(--text);
}
.lab-acc-head:hover { background: rgba(255,255,255,0.02); }
.lab-acc-ico { font-size: 1.5rem; flex-shrink: 0; }
.lab-acc-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.lab-acc-title { font-size: 1rem; font-weight: 600; }
.lab-acc-goal { font-size: 0.8rem; color: var(--muted); }
.lab-acc-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.lab-time { font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.lab-acc-meta .lab-xp { font-size: 0.78rem; color: var(--defend); background: var(--defend-soft); border: 1px solid rgba(56,189,248,0.25); padding: 3px 9px; border-radius: 7px; }
.lab-badge-done { display: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #04121f; font-size: 0.75rem; font-weight: 700; align-items: center; justify-content: center; }
.lab-badge-done.show { display: inline-flex; }
.lab-chev { font-size: 1.4rem; color: var(--muted); transition: transform .25s; line-height: 1; }
[dir="rtl"] .lab-chev { transform: scaleX(-1); }
.lab-acc.open .lab-chev { transform: rotate(90deg); }
[dir="rtl"] .lab-acc.open .lab-chev { transform: scaleX(-1) rotate(90deg); }
.lab-acc-body { max-height: 0; overflow: hidden; transition: max-height .32s ease, padding .32s ease; padding: 0 20px; }
.lab-acc.open .lab-acc-body { max-height: 1400px; padding: 4px 20px 22px; }



/* ============ v20: guest note + instructors ============ */
.guest-learn-note { margin-bottom: 20px; border-color: rgba(255,178,36,0.35); background: linear-gradient(120deg, rgba(255,178,36,0.07), transparent); }
.guest-learn-note p { font-size: 0.95rem; margin: 0; }
.about-instructors { margin-top: 22px; border-color: rgba(56,189,248,0.3); }
.about-instructors h3 { font-size: 1.2rem; margin-bottom: 10px; }
.about-instructors .fw-link { margin-top: 12px; }

/* ============================================================
   FINAL NAV — single, complete mobile drawer implementation.
   Breakpoint 900px so the desktop nav never overflows on phones/tablets.
   ============================================================ */
.drawer-head, .drawer-foot { display: none; }

@media (max-width: 900px) {
  /* header: solid, no backdrop-filter (it traps fixed children) */
  .nav { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: #070C16 !important; }
  .nav-inner { gap: 8px; padding: 0 14px; height: 58px; }
  .brand { flex-shrink: 0; }

  /* burger visible, controls in header hidden (they move into the drawer) */
  .nav-burger { display: flex !important; flex-direction: column; flex-shrink: 0; z-index: 1002; position: relative; }
  .nav-right .lang-toggle,
  .nav-right #authBtn,
  .nav-right .xp-chip,
  .nav-right .streak-chip { display: none !important; }
  .nav-right { margin-inline-start: auto; gap: 6px; }

  /* the drawer itself */
  #navLinks.nav-links {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    position: fixed;
    top: 0; bottom: 0;
    height: 100vh; height: 100dvh;
    width: min(86vw, 340px);
    margin: 0;
    padding: 20px 16px 24px;
    background: #0B1322;
    isolation: isolate;
    will-change: transform;
    box-shadow: 0 0 100px rgba(0,0,0,0.85);
    overflow-y: auto;
    z-index: 1001;
    transition: transform 0.3s ease;
    /* LTR: anchor + hide to the right */
    inset-inline-start: auto;
    inset-inline-end: 0;
    transform: translateX(100%);
  }
  html[dir="rtl"] #navLinks.nav-links {
    /* RTL: burger is on the left, so anchor + hide to the left */
    transform: translateX(-100%);
  }
  #navLinks.nav-links.open { transform: translateX(0) !important; }

  .drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 4px 4px 14px; margin-bottom: 6px;
    border-bottom: 1px solid rgba(148,163,184,0.12);
  }
  .drawer-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--defend); }
  body.ar .drawer-brand { font-family: "Cairo", var(--font-display); }
  .drawer-close {
    width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
    background: rgba(255,255,255,0.05); border: 1px solid var(--line); color: var(--text);
    font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  }

  #navLinks.nav-links a {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 15px 16px; margin: 0;
    font-size: 1.02rem; font-weight: 600; border-radius: 12px;
    color: #EAF2FF; background: rgba(255,255,255,0.035);
    border: 1px solid transparent;
  }
  #navLinks.nav-links a.active { background: var(--defend-soft); color: var(--defend); border-color: rgba(56,189,248,0.3); }
  #navLinks.nav-links a.nav-pro { color: var(--threat); }
  #navLinks.nav-links a::after { content: "\203A"; opacity: 0.3; font-size: 1.25rem; }
  html[dir="rtl"] #navLinks.nav-links a::after { content: "\2039"; }

  .drawer-foot { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(148,163,184,0.12); }
  .drawer-lang { width: 100%; padding: 13px; border-radius: 11px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); color: var(--text); font-size: 0.95rem; cursor: pointer; }
  body.ar .drawer-lang { font-family: "Cairo", var(--font-body); }
  .drawer-auth { width: 100%; justify-content: center; padding: 13px; font-size: 0.95rem; }

  /* scrim */
  #navScrim.nav-scrim { position: fixed; inset: 0; z-index: 1000; background: rgba(2,6,14,0.7); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
  #navScrim.nav-scrim.open { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  body.nav-open .mentor-fab { display: none !important; }
}

@media (min-width: 901px) {
  #navScrim.nav-scrim { display: none; }
  #navLinks.nav-links { transform: none; }
  .drawer-head, .drawer-foot { display: none; }
}

/* footer link alignment per direction */
html[dir="rtl"] .footer-links { align-items: flex-start; }
html:not([dir="rtl"]) .footer-links { align-items: flex-end; }
@media (max-width: 640px) {
  .footer-inner { flex-direction: column; gap: 22px; }
  .footer-links { flex-direction: row; flex-wrap: wrap; gap: 10px 20px; align-items: flex-start !important; }
}
/* ============================================================
   UI/UX polish pass (professional review)
   ============================================================ */
/* consistent, subtle card interaction */
.card { transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.module-card:hover, .dash-card:hover, .plan-card:hover, .fw-card:hover, .cis-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}
/* button press feedback */
.btn { transition: transform .12s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary:hover { box-shadow: 0 6px 24px rgba(56,189,248,0.3); }
/* clearer focus ring for keyboard users (a11y) */
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--defend); outline-offset: 2px; border-radius: 6px;
}
/* smoother section rhythm on desktop */
@media (min-width: 901px) {
  .section { padding: 72px 24px; }
  .hero-stats.glass strong { font-size: 2rem; }
}
/* prevent long words/links from overflowing cards */
.card p, .card h3, .fw-card, .cis-titles { overflow-wrap: anywhere; }
/* tighten hero terminal so it reads as a real prompt */
.hero-term-line, .term-line { letter-spacing: 0.01em; }

/* ============================================================
   Loading splash
   ============================================================ */
.splash {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 600px at 70% 20%, #0C1830 0%, #070C16 60%);
  transition: opacity .5s ease, visibility .5s ease;
}
.splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 24px; }
.splash-shield { width: 64px; height: 64px; color: var(--defend); animation: splashPulse 1.6s ease-in-out infinite; }
.splash-brand { font-family: "Cairo", var(--font-display); font-weight: 700; font-size: 2rem; color: #EAF2FF; }
body.ar .splash-brand { font-family: "Cairo", var(--font-display); }
.splash-brand .brand-dot { color: var(--defend); }
.splash-slogan { font-family: "Cairo", var(--font-body); font-size: 1rem; color: var(--muted); max-width: 320px; }
body.ar .splash-slogan { font-family: "Cairo", var(--font-body); }
.splash-bar { width: 180px; height: 4px; border-radius: 999px; background: rgba(56,189,248,0.15); overflow: hidden; margin-top: 8px; }
.splash-bar i { display: block; height: 100%; width: 40%; border-radius: 999px; background: linear-gradient(90deg, var(--defend), var(--ok)); animation: splashLoad 1.1s ease-in-out infinite; }
@keyframes splashPulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: .8; } }
@keyframes splashLoad { 0% { margin-inline-start: -40%; } 100% { margin-inline-start: 100%; } }
@media (prefers-reduced-motion: reduce) { .splash-shield, .splash-bar i { animation: none; } }

/* ============ Legal pages ============ */
.legal-doc { max-width: 820px; }
.legal-section { padding: 16px 0; border-bottom: 1px solid rgba(147,163,188,0.08); }
.legal-section:last-child { border-bottom: 0; }
.legal-section h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--text); }
.legal-section p { font-size: 0.92rem; line-height: 1.8; }

/* ============ Cookie banner (light & friendly) ============ */
.cookie-bar {
  position: fixed; z-index: 9000;
  inset-inline: 16px; bottom: 16px; max-width: 520px; margin-inline: auto;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 14px;
  background: rgba(11,19,34,0.96); border: 1px solid rgba(56,189,248,0.25);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  animation: cookieUp .4s ease;
}
@keyframes cookieUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.cookie-emoji { font-size: 1.5rem; flex-shrink: 0; }
.cookie-text { font-size: 0.85rem; line-height: 1.5; color: var(--text); flex: 1; margin: 0; }
body.ar .cookie-text { font-family: "Cairo", var(--font-body); }
.cookie-bar .btn-sm { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 520px) {
  .cookie-bar { flex-wrap: wrap; }
  .cookie-text { flex-basis: 100%; }
  .cookie-bar .btn-sm { width: 100%; }
}

/* ============ Desktop hero terminal — larger, terminal-window style ============ */
@media (min-width: 901px) {
  .hero-type {
    max-width: 640px;
    width: max-content;
    font-size: 1rem;
    padding: 40px 24px 18px 24px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.35);
    line-height: 1.6;
    white-space: nowrap;
    overflow-x: auto;
  }
  /* terminal window traffic-light dots on top */
  .hero-type::before {
    content: "";
    position: absolute; top: 14px; left: 18px;
    width: 11px; height: 11px; border-radius: 50%;
    background: #ff5f56;
    box-shadow: 18px 0 0 #ffbd2e, 36px 0 0 #27c93f;
  }
  /* push the prompt text below the dots */
  /* padding handled above */
  [dir="rtl"] .hero-type::before { left: auto; right: 18px; box-shadow: -18px 0 0 #ffbd2e, -36px 0 0 #27c93f; }
  .type-prompt { font-weight: 600; }
}

/* Microsoft thanks card */
.about-thanks { margin-top: 22px; border-color: rgba(56,189,248,0.28); background: linear-gradient(135deg, rgba(0,120,212,0.08), transparent); }
.about-thanks h3 { font-size: 1.2rem; margin-bottom: 10px; }

/* ============ Account settings ============ */
.acct-card { margin-top: 22px; }
.acct-card h3 { font-size: 1.15rem; margin-bottom: 16px; }
.acct-section { padding: 14px 0; border-bottom: 1px solid rgba(147,163,188,0.08); }
.acct-section:last-child { border-bottom: 0; }
.acct-label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.acct-row { display: flex; gap: 8px; flex-wrap: wrap; }
.acct-row .auth-input { flex: 1; min-width: 180px; }
.acct-col { display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.acct-toggle { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 0.9rem; color: var(--muted); cursor: pointer; }
.acct-toggle input { width: 18px; height: 18px; accent-color: var(--defend); flex-shrink: 0; }

/* ============ Announcement banner + admin CMS ============ */
.announce-bar { background: linear-gradient(90deg, var(--defend), #0369A1); color: #04121f; text-align: center; padding: 9px 16px; font-size: 0.88rem; font-weight: 600; }
.adm-cms-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; max-width: 620px; }
.adm-cms-grid .auth-input { width: 100%; }

/* ============ Exam ordering + admin ============ */
.ms-order { margin-top: 22px; }
.exam-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.exam-form .auth-input { flex: 1; min-width: 160px; }
.exam-form select.auth-input { max-width: 200px; }
.exam-mine { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(147,163,188,0.1); }
.exam-mine h4 { font-size: 0.95rem; margin-bottom: 10px; }
.exam-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 0.9rem; }
.exam-badge { padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.exam-requested { background: rgba(148,163,184,0.15); color: var(--muted); }
.exam-approved { background: rgba(56,189,248,0.15); color: var(--defend); }
.exam-fulfilled { background: rgba(74,222,128,0.15); color: var(--ok); }
.exam-rejected { background: rgba(248,113,113,0.15); color: var(--threat); }
.exam-code { background: rgba(74,222,128,0.12); color: var(--ok); padding: 3px 8px; border-radius: 6px; font-family: var(--font-mono); font-size: 0.82rem; }
.adm-mail-form .exam-form { margin-top: 0; }

/* ============ Overflow hardening (end-to-end review) ============ */
/* tables scroll instead of pushing layout wide */
.adm-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.adm-table { min-width: 0; }
/* terminals never widen the page */
.linux-term, .term-out { max-width: 100%; overflow-x: auto; }
.term-line, .term-res { overflow-wrap: anywhere; word-break: break-word; }
/* long codes / emails / vouchers wrap */
.exam-code, .cert-pill, .mail-from, code { overflow-wrap: anywhere; word-break: break-word; }
/* inputs never exceed their container */
.auth-input, input, select, textarea { max-width: 100%; }
/* images responsive */
img { max-width: 100%; height: auto; }
/* modal fits small screens */
.modal { max-width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow-y: auto; }
/* pre/code blocks scroll */
pre { overflow-x: auto; max-width: 100%; }
/* prevent any flex row from forcing overflow */
.exam-form, .acct-row, .adm-toolbar { max-width: 100%; }

/* ============ Journey guest box (single, centered) ============ */
.journey-guest { max-width: 560px; margin: 0 auto; text-align: center; padding: 44px 32px; }
.journey-guest-inner { display: flex; flex-direction: column; align-items: center; }
.journey-guest-icon { font-size: 3rem; margin-bottom: 12px; }
.journey-guest h3 { font-size: 1.5rem; margin-bottom: 12px; }
.journey-guest p { max-width: 420px; }

/* ============ Learn page — organized sections ============ */
.learn-sections { display: flex; flex-direction: column; gap: 8px; }
.learn-section { margin-bottom: 44px; }
.learn-section:last-child { margin-bottom: 0; }
.learn-section-head { margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid rgba(147,163,188,0.12); }
.learn-section-head h3 { font-size: 1.3rem; margin-bottom: 6px; }
.learn-section-head p { font-size: 0.92rem; max-width: 680px; }
.learn-section-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; align-items: stretch; }
.learn-section-grid .module-card {
  display: flex; flex-direction: column; min-height: 210px;
}
.learn-section-grid .module-card p {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis;
}
.learn-section-grid .module-open { margin-top: auto; }

/* ============ Admin revenue + promos ============ */
.rev-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 14px 0; }
.rev-stat { background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-align: center; }
.rev-stat strong { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--defend); }
.rev-stat span { font-size: 0.8rem; color: var(--muted); }
.rev-plans { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.rev-pill { padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); font-size: 0.85rem; }
.promo-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; align-items: center; }
.promo-form .auth-input { flex: 1; min-width: 120px; max-width: 200px; }

/* ============ Foundations — enriched content styling ============ */
.fnd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.fnd-head h3 { margin-bottom: 0; }
.fnd-time { font-size: 0.74rem; color: var(--muted); background: rgba(255,255,255,0.04); padding: 3px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line); }
.fnd-desc { font-size: 0.92rem; line-height: 1.7; margin-bottom: 14px; }
.fnd-learn { margin: 12px 0 14px; }
.fnd-learn-label { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--defend); font-weight: 700; margin-bottom: 8px; }
.fnd-learn ul { list-style: none; display: grid; gap: 7px; }
.fnd-learn li { position: relative; padding-inline-start: 22px; font-size: 0.87rem; color: var(--text); line-height: 1.5; }
.fnd-learn li::before { content: "▸"; position: absolute; inset-inline-start: 0; color: var(--defend); }
.fnd-skills { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(147,163,188,0.08); }
.fnd-skills-label { font-size: 0.72rem; color: var(--muted); }
.fnd-skill { font-size: 0.72rem; padding: 3px 10px; border-radius: 999px; background: var(--defend-soft); color: var(--defend); border: 1px solid rgba(56,189,248,0.2); }
.fnd-item { padding: 22px 24px; }
.fnd-body { flex: 1; min-width: 0; }
.fnd-num { flex-shrink: 0; }

/* ============ Learn page — premium module cards ============ */
.module-card { padding: 24px; border-radius: 16px; overflow: hidden; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.module-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(56,189,248,0.06), transparent 55%); opacity: 0; transition: opacity .2s; pointer-events: none; }
.module-card:hover::after { opacity: 1; }
.module-card .card-icon { font-size: 1.6rem; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 14px; margin-bottom: 14px; }
.module-card h3 { font-size: 1.08rem; margin-bottom: 7px; }
.module-card p { font-size: 0.88rem; line-height: 1.6; color: var(--muted); }
.module-num { font-size: 1.5rem; top: 18px; inset-inline-end: 20px; }

/* course card polish */
.course-card { padding: 26px; transition: border-color .18s, transform .18s; }
.course-card:hover { border-color: rgba(56,189,248,0.35); transform: translateY(-2px); }
.course-desc { font-size: 0.92rem; line-height: 1.7; margin-bottom: 16px; }
.course-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.course-num { font-size: 1.4rem; color: var(--defend); font-weight: 700; }

/* MS external resource cards */
.msres-card { border-color: rgba(56,189,248,0.25); }
.msres-card:hover { border-color: rgba(56,189,248,0.5); }
.learn-msres .learn-section-head h3 { color: var(--defend); }

/* ============ What-is lesson (rich content) ============ */
.lesson { margin-top: 32px; display: flex; flex-direction: column; gap: 28px; }
.lesson-block { background: rgba(255,255,255,0.02); border: 1px solid var(--line); border-radius: 16px; padding: 26px 28px; }
.lesson-block h3 { font-size: 1.2rem; margin-bottom: 16px; }
.lesson-list { list-style: none; display: grid; gap: 10px; }
.lesson-list li { position: relative; padding-inline-start: 22px; font-size: 0.92rem; line-height: 1.6; color: var(--text); }
.lesson-list li::before { content: "▸"; position: absolute; inset-inline-start: 0; color: var(--defend); }
.lesson-list li b { color: var(--text); font-weight: 700; }
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.lesson-item { background: rgba(255,255,255,0.02); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 5px; }
.lesson-item b { color: var(--defend); font-size: 0.92rem; }
.lesson-item span { color: var(--muted); font-size: 0.84rem; line-height: 1.5; }
.lesson-src { font-size: 0.74rem; color: var(--muted); opacity: 0.7; text-align: center; margin-top: 4px; }

/* ============================================================
   ACCESSIBILITY TOOLKIT
   ============================================================ */
/* Skip-to-content link */
.skip-link {
  position: fixed; top: -60px; inset-inline-start: 12px; z-index: 9999;
  background: var(--defend); color: #04121f; padding: 10px 18px; border-radius: 8px;
  font-weight: 700; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 12px; outline: 3px solid #fff; }

/* Accessibility FAB */
.a11y-fab {
  position: fixed; bottom: 78px; left: 22px; right: auto; z-index: 82;
  width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
  background: var(--defend); color: #04121f; border: 0; font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 22px rgba(0,0,0,0.35); transition: transform .15s;
}
.a11y-fab:hover { transform: scale(1.08); }
.a11y-fab:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Accessibility panel */
.a11y-panel {
  position: fixed; bottom: 84px; left: 22px; right: auto; z-index: 96;
  width: min(340px, calc(100vw - 44px)); max-height: 76vh; overflow-y: auto;
  background: var(--raised); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.a11y-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.a11y-head h3 { font-size: 1.15rem; }
.a11y-intro { font-size: 0.82rem; margin-bottom: 16px; }
.a11y-group { margin-bottom: 16px; }
.a11y-group-label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 8px; color: var(--muted); }
.a11y-stepper { display: flex; align-items: center; gap: 10px; }
.a11y-step {
  flex: 1; padding: 10px; border-radius: 10px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  font-weight: 700; font-size: 0.95rem;
}
.a11y-step:hover { border-color: var(--defend); }
.a11y-step:focus-visible { outline: 2px solid var(--defend); outline-offset: 1px; }
.a11y-step-val { min-width: 52px; text-align: center; font-size: 0.9rem; }
.a11y-toggles { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.a11y-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-radius: 12px; cursor: pointer; text-align: start;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); width: 100%;
}
.a11y-toggle:hover { border-color: rgba(56,189,248,0.4); }
.a11y-toggle:focus-visible { outline: 2px solid var(--defend); outline-offset: 1px; }
.a11y-toggle-txt { display: flex; flex-direction: column; gap: 2px; }
.a11y-toggle-txt b { font-size: 0.9rem; font-weight: 600; }
.a11y-toggle-txt small { font-size: 0.75rem; color: var(--muted); line-height: 1.4; }
.a11y-toggle-sw {
  flex-shrink: 0; width: 40px; height: 22px; border-radius: 999px;
  background: var(--line); position: relative; transition: background .15s;
}
.a11y-toggle-sw::after {
  content: ""; position: absolute; top: 2px; inset-inline-start: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s;
}
.a11y-toggle.on .a11y-toggle-sw { background: var(--defend); }
.a11y-toggle.on .a11y-toggle-sw::after { transform: translateX(18px); }
[dir="rtl"] .a11y-toggle.on .a11y-toggle-sw::after { transform: translateX(-18px); }
.a11y-reset { width: 100%; }

/* Reading guide ruler */
.a11y-guide-bar {
  position: fixed; inset-inline: 0; height: 40px; z-index: 88; pointer-events: none;
  background: rgba(56,189,248,0.10); border-top: 2px solid rgba(56,189,248,0.6);
  border-bottom: 2px solid rgba(56,189,248,0.6); transform: translateY(-50%);
  transition: opacity .1s; opacity: 0;
}

/* ---- Accessibility MODES ---- */
/* High contrast */
html.a11y-contrast {
  --text: #ffffff; --muted: #d4dce8; --line: rgba(255,255,255,0.35);
}
html.a11y-contrast body { background: #000010; }
html.a11y-contrast .card, html.a11y-contrast .module-card { border-color: rgba(255,255,255,0.4); }
html.a11y-contrast a { text-decoration: underline; }

/* Dyslexia-friendly / readable font */
html.a11y-dyslexia, html.a11y-dyslexia body,
html.a11y-dyslexia h1, html.a11y-dyslexia h2, html.a11y-dyslexia h3, html.a11y-dyslexia h4,
html.a11y-dyslexia p, html.a11y-dyslexia span, html.a11y-dyslexia li, html.a11y-dyslexia a,
html.a11y-dyslexia button, html.a11y-dyslexia input {
  font-family: Verdana, Tahoma, "Trebuchet MS", sans-serif !important;
  letter-spacing: 0.03em;
}

/* More spacing */
html.a11y-spacing body { line-height: 2 !important; letter-spacing: 0.05em !important; word-spacing: 0.12em !important; }
html.a11y-spacing p, html.a11y-spacing li { margin-bottom: 0.6em; }

/* Highlight links */
html.a11y-links a:not(.btn) {
  text-decoration: underline !important; text-underline-offset: 3px;
  outline: 1px dashed rgba(56,189,248,0.6); outline-offset: 2px;
}

/* Reduce / pause motion */
html.a11y-motion *, html.a11y-motion *::before, html.a11y-motion *::after {
  animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important; scroll-behavior: auto !important;
}
html.a11y-motion .aurora, html.a11y-motion .mentor-fab-pulse, html.a11y-motion #bgCanvas { display: none !important; }

/* Big cursor */
html.a11y-cursor, html.a11y-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 3 L6 38 L15 29 L21 42 L27 39 L21 27 L33 27 Z' fill='%23000' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") 6 3, auto !important;
}

/* Strong visible focus for keyboard users everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--defend); outline-offset: 2px; border-radius: 4px;
}

@media (max-width: 640px) {
  .a11y-fab { bottom: 96px; }
}

/* Reader button in a11y panel */
.a11y-reader-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: start;
  padding: 12px 14px; border-radius: 12px; cursor: pointer; margin-bottom: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
}
.a11y-reader-btn:hover { border-color: rgba(56,189,248,0.4); }
.a11y-reader-btn:focus-visible { outline: 2px solid var(--defend); outline-offset: 1px; }
.a11y-reader-ico { font-size: 1.3rem; }
.a11y-reader-txt { display: flex; flex-direction: column; gap: 2px; }
.a11y-reader-txt b { font-size: 0.9rem; }
.a11y-reader-txt small { font-size: 0.75rem; color: var(--muted); line-height: 1.4; }
.a11y-reader-btn.on { border-color: var(--defend); background: var(--defend-soft); }
.a11y-reader-btn.on .a11y-reader-ico::after { content: " ●"; color: var(--ok); }

/* When reader is active, hint that text is clickable */
html.a11y-reader main p, html.a11y-reader main h1, html.a11y-reader main h2,
html.a11y-reader main h3, html.a11y-reader main li, html.a11y-reader main .card {
  cursor: help;
}

/* Scroll-to-top button — sits under the a11y FAB */
.scrolltop-btn {
  position: fixed; bottom: 22px; left: 25px; right: auto; z-index: 81;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  background: var(--raised); color: var(--defend); border: 1px solid var(--defend);
  font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35); transition: transform .15s, opacity .2s;
}
.scrolltop-btn:hover { transform: translateY(-3px); }
.scrolltop-btn:focus-visible { outline: 3px solid var(--defend); outline-offset: 2px; }

/* stack: a11y fab bottom-left, scroll-top just above it; on mobile lift both above bottom bar */
@media (max-width: 640px) {
  .scrolltop-btn { bottom: 42px; }
}

/* ICS standalone-track back link */
.ics-back { margin-top: 28px; display: flex; justify-content: center; }

/* ============ Purdue Model interactive diagram ============ */
.purdue-head { text-align: center; margin: 8px 0 22px; }
.purdue-head h3 { font-size: 1.35rem; margin-bottom: 8px; }
.purdue-head p { max-width: 720px; margin: 0 auto; font-size: 0.9rem; }
.purdue-stack { display: flex; flex-direction: column; gap: 8px; max-width: 760px; margin: 0 auto; }
.purdue-level {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: start;
  padding: 16px 18px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  transition: transform .15s, border-color .15s, box-shadow .15s;
  position: relative; overflow: hidden;
}
.purdue-level::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 5px;
}
.purdue-level:hover { transform: translateX(4px); box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
[dir="rtl"] .purdue-level:hover { transform: translateX(-4px); }
.purdue-level:focus-visible { outline: 2px solid var(--defend); outline-offset: 2px; }
.purdue-lnum {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 800; background: rgba(255,255,255,0.06);
}
.purdue-lmain { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.purdue-lname { font-weight: 700; font-size: 0.98rem; }
.purdue-ldesc {
  font-size: 0.82rem; color: var(--muted); line-height: 1.5;
  max-height: 0; opacity: 0; overflow: hidden; transition: max-height .3s, opacity .3s, margin .3s;
}
.purdue-level.open .purdue-ldesc { max-height: 80px; opacity: 1; margin-top: 2px; }
.purdue-zone { flex-shrink: 0; font-size: 0.66rem; letter-spacing: 0.06em; opacity: 0.75; }
/* zone colors */
.pl-it::before { background: #38BDF8; }
.pl-it .purdue-lnum { color: #38BDF8; }
.pl-dmz::before { background: #F59E0B; }
.pl-dmz { border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.06); }
.pl-dmz .purdue-lnum { color: #F59E0B; background: rgba(245,158,11,0.12); }
.pl-dmz .purdue-zone { color: #F59E0B; opacity: 1; }
.pl-ot::before { background: #34D399; }
.pl-ot .purdue-lnum { color: #34D399; }
.pl-phys::before { background: #A78BFA; }
.pl-phys .purdue-lnum { color: #A78BFA; }
.pl-phys { border-color: rgba(167,139,250,0.35); }
.purdue-note {
  max-width: 720px; margin: 22px auto 0; text-align: center; font-size: 0.85rem;
  padding: 14px 18px; border-radius: 12px; background: rgba(56,189,248,0.05);
  border: 1px solid rgba(56,189,248,0.2);
}
#purdueDiagram { margin: 8px 0 40px; }

/* ============ Computing 101 visual elements ============ */
.compute-flow { display: flex; align-items: stretch; gap: 10px; margin: 20px 0; flex-wrap: wrap; }
.cf-node {
  flex: 1; min-width: 180px; background: rgba(255,255,255,0.02);
  border: 1px solid var(--line); border-radius: 14px; padding: 18px;
  display: flex; flex-direction: column; gap: 6px; text-align: center; align-items: center;
}
.cf-ico { font-size: 2rem; }
.cf-node b { color: var(--defend); font-size: 1rem; }
.cf-node small { color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
.cf-arrow { display: flex; align-items: center; color: var(--defend); font-size: 1.5rem; font-weight: 700; }
@media (max-width: 640px) { .cf-arrow { transform: rotate(90deg); align-self: center; } }
.compute-analogy {
  margin-top: 16px; padding: 14px 18px; border-radius: 12px; font-size: 0.9rem;
  background: rgba(56,189,248,0.06); border: 1px solid rgba(56,189,248,0.2); line-height: 1.6;
}
.compute-bits { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.cbit-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 10px; background: rgba(255,255,255,0.02); border: 1px solid var(--line);
  font-size: 0.88rem;
}
.cbit-label { color: var(--muted); }
.cbit-val { color: var(--ok); font-size: 1.05rem; letter-spacing: 2px; }
.compute-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 16px; }
.compute-item { background: rgba(255,255,255,0.02); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.compute-item b { color: var(--defend); font-size: 0.92rem; }
.compute-item span { color: var(--muted); font-size: 0.82rem; line-height: 1.5; }

/* Pro course labs + tools */
.course-labs-label { margin-top: 16px !important; color: var(--ok) !important; }
.pill.lab-pill { background: rgba(52,211,153,0.08); border-color: rgba(52,211,153,0.3); color: #6ee7b7; }
.pill.tool-pill { background: rgba(56,189,248,0.08); border-color: rgba(56,189,248,0.3); color: var(--defend); font-family: var(--font-mono); font-size: 0.8rem; }
.course-outcomes, .course-tools { margin-top: 26px; }
.course-outcomes h3, .course-tools h3 { font-size: 1.2rem; margin-bottom: 8px; }

/* Hide the accessibility fab + scroll arrow while the AI mentor panel is open (they were covering it) */
body.mentor-open .a11y-fab,
body.mentor-open .scrolltop-btn { display: none !important; }
/* Raise the mentor panel above page content incl. PayPal buttons */
.mentor-panel { z-index: 9500 !important; }
.mentor-fab { z-index: 9400 !important; }
/* Keep PayPal buttons in normal flow so they never float over panels */
.pp-slot, #pp-foundation, #pp-pro { position: relative; z-index: 1; }

/* ============ Interactive Firewall Demo ============ */
.fw-demo { margin: 32px 0; background: #060A14; border: 1px solid var(--line); border-radius: 18px; padding: 24px; overflow: hidden; }
.fw-head { text-align: center; margin-bottom: 18px; }
.fw-head h3 { font-size: 1.25rem; margin-bottom: 6px; }
.fw-head p { max-width: 620px; margin: 0 auto; font-size: 0.88rem; }
.fw-stage {
  position: relative; height: 380px; border-radius: 14px;
  background: radial-gradient(circle at 50% 0%, rgba(56,189,248,0.06), transparent 60%), #05080F;
  border: 1px solid rgba(56,189,248,0.12); overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; padding: 18px 0;
}
.fw-server, .fw-internet { text-align: center; font-family: var(--font-mono); font-size: 0.9rem; color: var(--defend); z-index: 2; }
.fw-server span, .fw-internet span { display: block; font-size: 0.7rem; letter-spacing: 0.1em; opacity: 0.7; margin-top: 2px; }
.fw-internet { color: #A78BFA; }
.fw-wall { position: relative; z-index: 3; margin: 0 16px; }
.fw-wall-label { display: block; text-align: center; font-size: 0.72rem; color: #F59E0B; letter-spacing: 0.12em; margin-bottom: 6px; opacity: 0.5; transition: opacity .3s; }
.fw-wall.fw-active .fw-wall-label { opacity: 1; }
.fw-ports { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 10px; border-radius: 10px; border: 1px dashed rgba(245,158,11,0.2); transition: border-color .3s, background .3s; }
.fw-wall.fw-active .fw-ports { border-color: rgba(245,158,11,0.6); background: rgba(245,158,11,0.04); }
.fw-port {
  width: 44px; height: 34px; border-radius: 7px; display: flex; align-items: center; justify-content: center;
  font-size: 0.62rem; border: 1px solid var(--line); background: rgba(255,255,255,0.03); transition: all .3s;
}
.fw-wall.fw-active .fw-port.port-open { border-color: #34D399; background: rgba(52,211,153,0.12); color: #6ee7b7; }
.fw-wall.fw-active .fw-port.port-closed { border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.08); color: #fca5a5; opacity: 0.6; }
.fw-packets { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.fw-packet {
  position: absolute; bottom: 60px; font-family: var(--font-mono); font-size: 0.65rem;
  padding: 3px 7px; border-radius: 5px; animation: fwRise 2.6s linear forwards;
}
.pk-allow { color: #6ee7b7; background: rgba(52,211,153,0.12); border: 1px solid rgba(52,211,153,0.4); }
.pk-block { color: #fca5a5; background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.4); }
.pk-stopped { animation: fwRiseStopped 2.6s cubic-bezier(.4,0,.6,1) forwards; }
@keyframes fwRise { 0% { bottom: 55px; opacity: 0; } 10% { opacity: 1; } 85% { opacity: 1; } 100% { bottom: 310px; opacity: 0; } }
@keyframes fwRiseStopped { 0% { bottom: 55px; opacity: 0; } 15% { opacity: 1; } 55% { bottom: 175px; opacity: 1; } 70% { bottom: 165px; } 100% { bottom: 168px; opacity: 0; transform: scale(0.6); } }
.fw-controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.fw-status { font-size: 0.85rem; color: #fca5a5; }
.fw-status.ok { color: #6ee7b7; }
.fw-note { text-align: center; margin-top: 14px; font-size: 0.85rem; padding: 12px 18px; border-radius: 12px; background: rgba(255,255,255,0.02); border: 1px solid var(--line); line-height: 1.6; }
@media (max-width: 640px) { .fw-stage { height: 340px; } .fw-port { width: 38px; } }

/* ============ ICS Interactive Games ============ */
.ics-game { margin: 32px 0; background: #060A14; border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.ics-game-tip { text-align: center; margin-top: 14px; font-size: 0.85rem; min-height: 20px; }

/* Sort game */
.sort-pool { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 18px; min-height: 44px; }
.sort-card { padding: 10px 16px; border-radius: 10px; cursor: pointer; font-size: 0.9rem; background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: all .15s; }
.sort-card:hover { border-color: var(--defend); transform: translateY(-2px); }
.sort-card.sel { border-color: var(--defend); background: var(--defend-soft); box-shadow: 0 0 0 3px rgba(56,189,248,0.2); }
.sort-zones { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sort-zone { min-height: 130px; border-radius: 14px; padding: 14px; cursor: pointer; border: 2px dashed var(--line); background: rgba(255,255,255,0.02); color: var(--text); text-align: center; transition: border-color .15s; display: flex; flex-direction: column; gap: 10px; }
.sort-zone:hover { border-color: var(--defend); }
.zone-it { border-color: rgba(56,189,248,0.3); }
.zone-ot { border-color: rgba(52,211,153,0.3); }
.sz-label { font-weight: 700; font-size: 0.9rem; }
.sz-items { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.sz-chip { font-size: 0.75rem; padding: 5px 10px; border-radius: 8px; }
.sz-chip.ok { background: rgba(52,211,153,0.15); border: 1px solid rgba(52,211,153,0.5); color: #6ee7b7; }
.sz-chip.bad { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.5); color: #fca5a5; }

/* Factory defense game */
.factory-game .factory-layers { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.fac-layer { padding: 14px 18px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,0.02); display: flex; align-items: center; justify-content: space-between; transition: all .3s; font-size: 0.92rem; }
.fac-layer.fac-dmz { border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.05); font-weight: 700; }
.fac-layer.fac-attacked { border-color: #ef4444; background: rgba(239,68,68,0.15); animation: facPulse 0.7s infinite; }
.fac-layer.fac-breached { opacity: 0.4; border-color: #ef4444; }
.fac-alert { font-size: 0.72rem; color: #fca5a5; font-family: var(--font-mono); }
@keyframes facPulse { 50% { box-shadow: 0 0 0 4px rgba(239,68,68,0.25); } }
.fac-win { border-color: rgba(52,211,153,0.5) !important; background: rgba(52,211,153,0.08) !important; color: #6ee7b7; }
.fac-lose { border-color: rgba(239,68,68,0.5) !important; background: rgba(239,68,68,0.08) !important; color: #fca5a5; }
@media (max-width: 640px) { .sort-zones { grid-template-columns: 1fr; } }

/* ============ Phishing "Spot the Red Flags" demo ============ */
.phish-demo { margin: 32px 0; background: #060A14; border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.phish-email { background: #0d1424; border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 16px; text-align: start; }
.phish-row { display: flex; gap: 8px; align-items: baseline; margin-bottom: 8px; flex-wrap: wrap; }
.phish-lbl { font-size: 0.72rem; color: var(--muted); flex-shrink: 0; }
.phish-hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.phish-body { font-size: 0.9rem; line-height: 1.7; color: var(--text); }
.phish-flag { cursor: pointer; border-radius: 5px; padding: 1px 4px; transition: all .15s; border-bottom: 1px dashed transparent; }
.phish-flag:hover { background: rgba(245,158,11,0.1); border-bottom-color: rgba(245,158,11,0.5); }
.phish-flag.caught { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.5); cursor: default; }
.phish-status { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 12px; }
.phish-dots { display: flex; gap: 6px; }
.phish-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: background .2s; }
.phish-dot.on { background: #ef4444; }
.phish-reveal { font-size: 0.82rem; color: #6ee7b7; background: rgba(52,211,153,0.06); border: 1px solid rgba(52,211,153,0.2); border-radius: 10px; padding: 10px 14px; margin-top: 8px; line-height: 1.5; text-align: start; }

/* ============ Password strength demo ============ */
.pw-demo { margin: 32px 0; background: #060A14; border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.pw-input { width: 100%; padding: 14px 16px; border-radius: 12px; background: #0d1424; border: 1px solid var(--line); color: var(--text); font-size: 1rem; margin-bottom: 14px; }
.pw-input:focus { outline: 2px solid var(--defend); border-color: var(--defend); }
.pw-meter { height: 10px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden; margin-bottom: 12px; }
.pw-bar { height: 100%; width: 0; border-radius: 999px; background: #64748b; transition: width .25s, background .25s; }
.pw-readout { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.pw-label { font-size: 1rem; font-weight: 700; }
.pw-crack { font-size: 0.82rem; color: var(--muted); }
.pw-tips { border-top: 1px solid var(--line); padding-top: 16px; }

/* ============ Plans page games showcase ============ */
.plans-games { margin-bottom: 34px; background: linear-gradient(160deg, rgba(56,189,248,0.06), rgba(167,139,250,0.04)); border: 1px solid rgba(56,189,248,0.2); border-radius: 18px; padding: 24px; }
.pg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 16px; }
.pg-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 14px; background: rgba(255,255,255,0.02); border: 1px solid var(--line); text-align: center; align-items: center; transition: transform .15s, border-color .15s; }
.pg-card:hover { transform: translateY(-4px); border-color: var(--defend); }
.pg-ico { font-size: 2rem; }
.pg-name { font-weight: 700; font-size: 0.98rem; color: var(--text); }
.pg-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.5; flex: 1; }
.pg-cta { font-size: 0.78rem; color: var(--defend); margin-top: 4px; }

/* ============ Cybersecurity daily feed ============ */
.feed-section { margin-bottom: 44px; }
.feed-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.feed-card { background: rgba(255,255,255,0.02); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 8px; position: relative; }
.feed-card h4 { font-size: 1rem; color: var(--text); }
.feed-card p { font-size: 0.86rem; color: var(--muted); line-height: 1.6; }
.feed-top { display: flex; align-items: center; justify-content: space-between; }
.feed-cat { font-size: 0.72rem; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,0.05); }
.feed-date { font-size: 0.7rem; color: var(--muted); opacity: 0.7; }
.feed-src { font-size: 0.75rem; color: var(--defend); margin-top: 2px; }
.feed-threat { border-inline-start: 3px solid #ef4444; }
.feed-tech { border-inline-start: 3px solid #38BDF8; }
.feed-tip { border-inline-start: 3px solid #34D399; }
.feed-info { border-inline-start: 3px solid #A78BFA; }
.feed-pinned { box-shadow: 0 0 0 1px rgba(245,158,11,0.3); }
.feed-pinned::after { content: "📌"; position: absolute; top: 12px; inset-inline-end: 12px; font-size: 0.8rem; }

/* ============ Zero Trust interactive ============ */
.zt-demo { margin: 32px 0; background: #060A14; border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.zt-modehead { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.zt-modename { font-size: 0.9rem; color: var(--muted); font-weight: 600; transition: color .2s; }
.zt-modename.active-old { color: #ef4444; }
.zt-modename.active-zt { color: #34D399; }
.zt-switch { width: 56px; height: 30px; border-radius: 999px; background: rgba(239,68,68,0.3); border: 1px solid var(--line); cursor: pointer; position: relative; transition: background .2s; flex-shrink: 0; }
.zt-switch.on { background: rgba(52,211,153,0.3); }
.zt-knob { position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.zt-switch.on .zt-knob { transform: translateX(26px); }
[dir="rtl"] .zt-switch.on .zt-knob { transform: translateX(-26px); }
.zt-modedesc { text-align: center; font-size: 0.88rem; color: var(--muted); margin-bottom: 18px; line-height: 1.6; max-width: 620px; margin-inline: auto; }
.zt-reqs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.zt-req { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--line); font-size: 0.9rem; transition: all .2s; }
.zt-pass { border-color: rgba(52,211,153,0.4); background: rgba(52,211,153,0.06); }
.zt-block { border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.06); opacity: 0.85; }
.zt-verdict { font-size: 0.78rem; }
.zt-pass .zt-verdict { color: #6ee7b7; }
.zt-block .zt-verdict { color: #fca5a5; }

/* ============ Mini animated factory ============ */
.mini-factory { position: relative; border-radius: 14px; background: linear-gradient(180deg, #0a1120, #05080f); border: 1px solid var(--line); padding: 18px; margin-bottom: 16px; overflow: hidden; transition: all .3s; }
.mini-factory.factory-alarm { border-color: rgba(239,68,68,0.4); }
.mini-factory.factory-down { border-color: rgba(239,68,68,0.6); background: linear-gradient(180deg, #1a0a0a, #0f0505); }
.mf-sky { height: 24px; text-align: center; }
.mf-siren { font-size: 1.2rem; animation: mfBlink .6s infinite; }
.mf-safe { font-size: 1.2rem; }
@keyframes mfBlink { 50% { opacity: 0.3; } }
.mf-building { text-align: center; }
.mf-chimney { height: 26px; }
.mf-smoke { display: inline-block; font-size: 1.1rem; animation: mfSmoke 2s infinite; opacity: 0.7; }
.mf-smoke.stopped { animation: none; opacity: 0.15; }
@keyframes mfSmoke { 0% { transform: translateY(0); opacity: 0.7; } 100% { transform: translateY(-10px); opacity: 0; } }
.mf-machines { display: flex; align-items: center; justify-content: center; gap: 18px; font-size: 1.8rem; margin: 6px 0; }
.mf-gear { display: inline-block; animation: mfSpin 3s linear infinite; }
.mf-gear2 { animation-direction: reverse; animation-duration: 2s; }
.mf-gear.stopped { animation: none; opacity: 0.4; }
@keyframes mfSpin { 100% { transform: rotate(360deg); } }
.mf-robot { animation: mfWave 1.5s ease-in-out infinite; display: inline-block; }
@keyframes mfWave { 50% { transform: translateY(-4px) rotate(-8deg); } }
.factory-down .mf-robot, .factory-down .mf-tank { opacity: 0.4; filter: grayscale(1); }
.mf-floor { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.1em; margin-top: 4px; }

/* admin feed manager */
.adm-feed-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.adm-input { padding: 9px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: 0.85rem; font-family: inherit; }
.adm-check { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--muted); }
.adm-feed-list { display: flex; flex-direction: column; gap: 6px; }
.adm-feed-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 8px; background: rgba(255,255,255,0.02); border: 1px solid var(--line); font-size: 0.85rem; }

/* ============ CIA Triangle interactive ============ */
.cia-demo { margin: 32px 0; background: #060A14; border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.cia-stage { position: relative; width: 300px; max-width: 100%; height: 260px; margin: 0 auto 8px; }
.cia-svg { width: 100%; height: 100%; }
.cia-tri { fill: rgba(56,189,248,0.06); stroke: rgba(56,189,248,0.5); stroke-width: 2; transition: fill .3s, stroke .3s; }
.cia-tri.dim { fill: rgba(56,189,248,0.03); stroke: rgba(56,189,248,0.25); }
.cia-corner { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; cursor: pointer; transition: all .2s; min-width: 96px; }
.cia-corner span { font-size: 1.4rem; }
.cia-corner b { font-size: 0.8rem; color: var(--text); }
.cia-corner:hover { border-color: var(--defend); transform: scale(1.05); }
.cia-corner.sel { border-color: var(--defend); background: var(--defend-soft); box-shadow: 0 0 0 3px rgba(56,189,248,0.2); }
.cc-top { top: -8px; left: 50%; transform: translateX(-50%); }
.cc-top.sel { transform: translateX(-50%) scale(1.05); }
.cc-left { bottom: 0; left: -6px; }
.cc-right { bottom: 0; right: -6px; }
.cia-detail { background: rgba(255,255,255,0.02); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 18px; text-align: start; }
.cia-detail h4 { font-size: 1rem; margin-bottom: 6px; }
.cia-detail p { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }
.cia-example { color: #6ee7b7 !important; margin-top: 6px; }
.cia-quiz { border-top: 1px solid var(--line); padding-top: 8px; }
.cia-scenario { background: #0d1424; border: 1px solid var(--line); border-radius: 12px; padding: 16px; font-size: 0.95rem; text-align: center; margin-bottom: 14px; }
.cia-choices { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.cia-choice { padding: 10px 16px; border-radius: 10px; cursor: pointer; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: 0.88rem; transition: all .15s; }
.cia-choice:hover:not(:disabled) { border-color: var(--defend); }
.cia-choice.ok { border-color: #34d399; background: rgba(52,211,153,0.12); color: #6ee7b7; }
.cia-choice:disabled { cursor: default; }
.cia-feedback { text-align: center; font-size: 0.9rem; margin-bottom: 12px; }
@media (max-width: 380px) { .cia-corner { min-width: 78px; padding: 6px 8px; } .cia-corner b { font-size: 0.7rem; } }
