/*! Design & Development © 2026 OMAR ALI ALDULAIMI. All rights reserved. */
:root {
  --bg: #050914;
  --bg2: #0a1226;
  --bg3: #0f1a36;
  --card: rgba(255, 255, 255, .045);
  --card2: rgba(255, 255, 255, .08);
  --line: rgba(255, 255, 255, .1);
  --text: #eaf0ff;
  --muted: #9fb1d6;
  --dim: #6f82ab;
  --gold: #f2c879;
  --cyan: #5ad1ff;
  --violet: #9a8bff;
  --mint: #4ee1b0;
  --rose: #ff7d9d;
  --amber: #ffb454;
  --accent: var(--cyan);
  --ok: #4ee1b0;
  --bad: #ff6b88;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .7);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --fs: 1;
  --r: 20px;
  color-scheme: dark;
}

:root[data-theme=light] {
  --bg: #f4f6fc;
  --bg2: #ffffff;
  --bg3: #e9edf8;
  --card: rgba(10, 20, 60, .04);
  --card2: rgba(10, 20, 60, .07);
  --line: rgba(10, 20, 60, .12);
  --text: #0c1634;
  --muted: #475a86;
  --dim: #7080a8;
  --gold: #a8730d;
  --cyan: #0a82c2;
  --violet: #5b49d6;
  --mint: #0a9a72;
  --rose: #d1325b;
  --amber: #b86d00;
  --ok: #0a9a72;
  --bad: #d1325b;
  --shadow: 0 20px 50px -24px rgba(20, 40, 100, .35);
  color-scheme: light;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent
}

html {
  scroll-behavior: smooth;
  font-size: calc(100% * var(--fs));
  background: var(--bg)
}

body {
  font-family: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
  line-height: 1.9;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-text-size-adjust: 100%
}

body.sel {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default
}

input,
textarea {
  -webkit-user-select: text;
  user-select: text
}

img,
svg,
canvas {
  display: block;
  max-width: 100%
}

img {
  -webkit-user-drag: none
}

a {
  color: inherit;
  text-decoration: none
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 10px
}

::selection {
  background: var(--accent);
  color: #000
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0)
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg)
}

.ambient i {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
  will-change: transform
}

.ambient i:nth-child(1) {
  width: 55vmax;
  height: 55vmax;
  background: radial-gradient(circle, #1c4fff 0%, transparent 65%);
  top: -18vmax;
  inset-inline-start: -14vmax;
  animation: drift1 26s ease-in-out infinite alternate
}

.ambient i:nth-child(2) {
  width: 48vmax;
  height: 48vmax;
  background: radial-gradient(circle, #7a3cff 0%, transparent 65%);
  bottom: -16vmax;
  inset-inline-end: -12vmax;
  animation: drift2 32s ease-in-out infinite alternate
}

.ambient i:nth-child(3) {
  width: 34vmax;
  height: 34vmax;
  background: radial-gradient(circle, #0fb5c9 0%, transparent 65%);
  top: 38%;
  inset-inline-end: 28%;
  opacity: .28;
  animation: drift3 38s ease-in-out infinite alternate
}

:root[data-theme=light] .ambient i {
  opacity: .22
}

.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .22;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 72%)
}

@keyframes drift1 {
  to {
    transform: translate(8vmax, 10vmax) scale(1.15)
  }
}

@keyframes drift2 {
  to {
    transform: translate(-9vmax, -8vmax) scale(1.1)
  }
}

@keyframes drift3 {
  to {
    transform: translate(-12vmax, 6vmax) scale(1.3)
  }
}

.topbar {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 88%, transparent), color-mix(in srgb, var(--bg) 40%, transparent));
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--line);
  transition: transform .4s var(--ease)
}

.topbar.hide {
  transform: translateY(-110%)
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: .2px;
  white-space: nowrap
}

.brand svg {
  width: 30px;
  height: 30px;
  flex: none
}

.brand small {
  display: block;
  font-weight: 500;
  font-size: .68rem;
  color: var(--muted);
  line-height: 1.2
}

.spacer {
  flex: 1
}

.iconbtn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  transition: .25s var(--ease);
  flex: none
}

.iconbtn:hover {
  background: var(--card2);
  transform: translateY(-2px)
}

.iconbtn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round
}

.xpchip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: .8rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap
}

.xpchip b {
  font-weight: 800
}

.plinebar {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: 3px;
  z-index: 60;
  background: transparent;
  pointer-events: none
}

.plinebar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--cyan), var(--violet));
  box-shadow: 0 0 12px var(--cyan);
  transition: width .1s linear;
  transform-origin: right;
  margin-inline-start: auto
}

#view {
  position: relative;
  min-height: 100vh;
  padding-top: 68px
}

.wrap {
  width: min(1120px, 100% - 32px);
  margin-inline: auto
}

.pagein {
  animation: pagein .6s var(--ease) both
}

.pageout {
  animation: pageout .22s ease both
}

@keyframes pagein {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.99)
  }

  to {
    opacity: 1;
    transform: none
  }
}

@keyframes pageout {
  to {
    opacity: 0;
    transform: translateY(-8px)
  }
}

.rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease)
}

.rv.in {
  opacity: 1;
  transform: none
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .3px
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  border-radius: 2px
}

.sectitle {
  font-size: clamp(1.5rem, 4.2vw, 2.3rem);
  font-weight: 800;
  line-height: 1.35;
  margin: 8px 0 6px
}

.seclead {
  color: var(--muted);
  max-width: 60ch
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 1rem;
  transition: .3s var(--ease);
  position: relative;
  overflow: hidden
}

.btn.primary {
  background: linear-gradient(135deg, var(--gold), #ffb454);
  color: #1a1200;
  box-shadow: 0 12px 34px -10px rgba(242, 200, 121, .55)
}

.btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -10px rgba(242, 200, 121, .7)
}

.btn.ghost {
  background: var(--card);
  border: 1px solid var(--line)
}

.btn.ghost:hover {
  background: var(--card2);
  transform: translateY(-3px)
}

.btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round
}

.btn.sm {
  padding: 9px 16px;
  font-size: .88rem;
  border-radius: 12px
}

.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  min-height: calc(100svh - 68px);
  display: grid;
  align-items: center;
  overflow: hidden
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 20px;
  align-items: center;
  padding-block: 30px
}

.hero-copy h1 {
  font-size: clamp(2.3rem, 7.2vw, 4.6rem);
  line-height: 1.15;
  font-weight: 800;
  margin: 14px 0 10px;
  background: linear-gradient(120deg, var(--text) 10%, var(--cyan) 55%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  animation: shine 9s linear infinite
}

@keyframes shine {
  to {
    background-position: -200% 0
  }
}

.hero-copy p {
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  max-width: 46ch
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: .8rem;
  color: var(--muted);
  font-weight: 700
}

.globewrap {
  position: relative;
  aspect-ratio: 1;
  width: min(100%, 560px);
  margin-inline: auto
}

.globewrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%
}

.scrollhint {
  position: absolute;
  bottom: 14px;
  inset-inline: 0;
  display: flex;
  justify-content: center;
  color: var(--dim);
  font-size: .75rem;
  gap: 6px;
  flex-direction: column;
  align-items: center;
  animation: bob 2.4s ease-in-out infinite
}

.scrollhint svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2
}

@keyframes bob {
  50% {
    transform: translateY(7px)
  }
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 10px
}

.stat {
  padding: 20px;
  border-radius: var(--r);
  background: var(--card);
  border: 1px solid var(--line);
  text-align: center;
  transition: .4s var(--ease)
}

.stat:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line))
}

.stat b {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--gold), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent
}

.stat span {
  color: var(--muted);
  font-size: .85rem
}

.journey {
  position: relative;
  margin-top: 30px;
  padding-inline-start: 0
}

.journey::before {
  content: "";
  position: absolute;
  inset-block: 20px;
  inset-inline-start: 27px;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--violet), var(--gold), transparent);
  opacity: .5
}

.jc {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  margin-bottom: 22px
}

.jnode {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.25rem;
  background: var(--bg2);
  border: 2px solid var(--tone);
  color: var(--tone);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--tone) 14%, transparent), 0 0 30px -4px var(--tone);
  z-index: 1;
  position: relative
}

.jnode svg {
  position: absolute;
  inset: -6px;
  width: 68px;
  height: 68px;
  transform: rotate(-90deg)
}

.jnode svg circle {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round
}

.jnode svg .tr {
  stroke: transparent
}

.jnode svg .pr {
  stroke: var(--tone);
  stroke-dasharray: 201;
  stroke-dashoffset: 201;
  transition: stroke-dashoffset 1s var(--ease)
}

.jcard {
  display: block;
  text-align: start;
  padding: 22px 24px;
  border-radius: var(--r);
  background: linear-gradient(160deg, var(--card2), var(--card));
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  transition: .4s var(--ease);
  cursor: pointer;
  width: 100%
}

.jcard::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(500px circle at var(--mx, 80%) var(--my, 0%), color-mix(in srgb, var(--tone) 22%, transparent), transparent 60%);
  opacity: 0;
  transition: .4s
}

.jcard:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--tone) 60%, var(--line));
  box-shadow: var(--shadow)
}

.jcard:hover::after {
  opacity: 1
}

.jcard>* {
  position: relative;
  z-index: 1
}

.jcard .k {
  font-size: .78rem;
  font-weight: 800;
  color: var(--tone);
  letter-spacing: .3px
}

.jcard h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 2px 0 6px;
  line-height: 1.5
}

.jcard p {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.8
}

.jmeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  align-items: center
}

.jmeta .pill {
  font-size: .74rem;
  padding: 4px 11px
}

.jgo {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--tone);
  font-weight: 800;
  font-size: .85rem
}

.jgo svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.4;
  transition: transform .3s
}

.jcard:hover .jgo svg {
  transform: translateX(-5px)
}

.tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 22px
}

.tool {
  padding: 22px;
  border-radius: var(--r);
  background: var(--card);
  border: 1px solid var(--line);
  text-align: start;
  transition: .4s var(--ease);
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%
}

.tool:hover {
  transform: translateY(-6px) rotate(-.4deg);
  border-color: color-mix(in srgb, var(--tone, var(--cyan)) 60%, var(--line));
  box-shadow: var(--shadow)
}

.tool .ic {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--tone, var(--cyan)) 16%, transparent);
  color: var(--tone, var(--cyan));
  margin-bottom: 12px
}

.tool .ic svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round
}

.tool h4 {
  font-size: 1.08rem;
  font-weight: 800
}

.tool p {
  font-size: .86rem;
  color: var(--muted);
  line-height: 1.7
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: .82rem;
  color: var(--muted);
  padding-top: 22px
}

.crumbs a {
  color: var(--muted);
  transition: .2s
}

.crumbs a:hover {
  color: var(--text)
}

.crumbs span.sep {
  opacity: .4
}

.chead {
  padding: 34px 0 24px;
  position: relative
}

.chead .bignum {
  position: absolute;
  inset-inline-end: -6px;
  top: -8px;
  font-size: clamp(7rem, 26vw, 15rem);
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px color-mix(in srgb, var(--tone) 35%, transparent);
  opacity: .55;
  pointer-events: none;
  font-family: 'Amiri', 'Tajawal', serif
}

.chead h1 {
  font-size: clamp(1.9rem, 6vw, 3.2rem);
  font-weight: 800;
  line-height: 1.3;
  max-width: 20ch;
  position: relative
}

.chead .lead {
  color: var(--muted);
  max-width: 62ch;
  margin-top: 10px;
  font-size: 1.06rem;
  position: relative
}

.lessonlist {
  display: grid;
  gap: 14px;
  margin: 10px 0 40px
}

.lrow {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-radius: var(--r);
  background: var(--card);
  border: 1px solid var(--line);
  transition: .35s var(--ease);
  width: 100%;
  text-align: start
}

.lrow:hover {
  transform: translateX(-6px);
  border-color: color-mix(in srgb, var(--tone) 55%, var(--line));
  background: var(--card2)
}

.lnum {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: color-mix(in srgb, var(--tone) 16%, transparent);
  color: var(--tone);
  font-size: 1.05rem
}

.lrow h3 {
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.5
}

.lrow small {
  color: var(--muted);
  font-size: .8rem
}

.lrow .chk {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  transition: .3s
}

.lrow .chk svg {
  width: 16px;
  height: 16px;
  stroke: #001;
  fill: none;
  stroke-width: 3;
  opacity: 0;
  transform: scale(.4);
  transition: .3s var(--ease)
}

.lrow.done .chk {
  background: var(--ok);
  border-color: var(--ok)
}

.lrow.done .chk svg {
  opacity: 1;
  transform: none
}

.chmini {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 30px
}

.lhead {
  padding: 28px 0 8px
}

.lhead h1 {
  font-size: clamp(1.7rem, 5.4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.35
}

.lref {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  font-size: .8rem;
  color: var(--muted);
  padding: 5px 12px;
  border: 1px dashed var(--line);
  border-radius: 999px
}

.essence {
  margin: 22px 0 10px;
  padding: 22px 24px;
  border-radius: var(--r);
  background: linear-gradient(135deg, color-mix(in srgb, var(--tone) 22%, transparent), color-mix(in srgb, var(--tone) 6%, transparent));
  border: 1px solid color-mix(in srgb, var(--tone) 40%, var(--line));
  position: relative;
  overflow: hidden
}

.essence::before {
  content: "";
  position: absolute;
  inset-inline-end: -40px;
  top: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--tone), transparent 70%);
  opacity: .3
}

.essence small {
  display: block;
  color: var(--tone);
  font-weight: 800;
  font-size: .78rem;
  margin-bottom: 4px;
  letter-spacing: .3px
}

.essence p {
  font-size: clamp(1.08rem, 2.6vw, 1.3rem);
  font-weight: 700;
  line-height: 1.8;
  position: relative
}

.reading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px
}

.article {
  max-width: 820px;
  width: 100%;
  margin-inline: auto;
  padding-bottom: 30px
}

.article>* {
  margin-block: 18px
}

.article p,
.article li {
  font-size: 1.06rem;
  line-height: 2.05
}

.article p {
  color: color-mix(in srgb, var(--text) 92%, transparent)
}

.article b,
.article strong {
  color: var(--text);
  font-weight: 800
}

.article mark {
  background: linear-gradient(transparent 55%, color-mix(in srgb, var(--gold) 45%, transparent) 55%);
  color: inherit;
  padding: 0 3px;
  border-radius: 3px
}

.term {
  color: var(--cyan);
  font-weight: 800;
  border-bottom: 1px dotted color-mix(in srgb, var(--cyan) 70%, transparent)
}

.lat {
  direction: ltr;
  unicode-bidi: isolate;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-size: .9em;
  color: var(--muted);
  font-weight: 500
}

.article h2 {
  font-size: 1.45rem;
  font-weight: 800;
  margin-top: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.5
}

.article h2::before {
  content: "";
  width: 8px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--tone), transparent);
  flex: none
}

.article ul.ls,
.article ol.ls {
  padding-inline-start: 0;
  list-style: none;
  display: grid;
  gap: 10px
}

.article ul.ls li {
  position: relative;
  padding: 12px 18px;
  padding-inline-start: 46px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px
}

.article ul.ls li::before {
  content: "";
  position: absolute;
  inset-inline-start: 18px;
  top: 1.05rem;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--tone);
  transform: rotate(45deg);
  opacity: .9
}

.article ol.ls {
  counter-reset: n
}

.article ol.ls li {
  counter-increment: n;
  position: relative;
  padding: 12px 18px;
  padding-inline-start: 60px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px
}

.article ol.ls li::before {
  content: counter(n, arabic-indic);
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--tone) 20%, transparent);
  color: var(--tone);
  font-weight: 800
}

.note {
  position: relative;
  padding: 18px 20px;
  padding-inline-start: 70px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
  overflow: hidden;
  --nc: var(--cyan)
}

.note::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 5px;
  background: var(--nc)
}

.note .ni {
  position: absolute;
  inset-inline-start: 16px;
  top: 16px;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--nc) 18%, transparent);
  color: var(--nc)
}

.note .ni svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round
}

.note .nt {
  font-weight: 800;
  color: var(--nc);
  font-size: .9rem;
  margin-bottom: 2px
}

.note p {
  font-size: 1rem !important;
  line-height: 1.95 !important
}

.note.why {
  --nc: var(--gold)
}

.note.exam {
  --nc: var(--rose)
}

.note.analogy {
  --nc: var(--mint)
}

.note.ex {
  --nc: var(--violet)
}

.note.crit {
  --nc: var(--amber)
}

.note.ref {
  --nc: var(--cyan)
}

.quote {
  position: relative;
  padding: 22px 26px;
  border-radius: 18px;
  background: linear-gradient(160deg, var(--card2), var(--card));
  border: 1px solid var(--line);
  font-family: 'Amiri', 'Tajawal', serif;
  font-size: 1.25rem;
  line-height: 2.1
}

.quote::before {
  content: "”";
  position: absolute;
  inset-inline-end: 16px;
  top: -18px;
  font-size: 6rem;
  color: var(--tone);
  opacity: .35;
  font-family: 'Amiri', serif;
  line-height: 1
}

.quote cite {
  display: block;
  margin-top: 8px;
  font-family: 'Tajawal', sans-serif;
  font-size: .82rem;
  color: var(--muted);
  font-style: normal
}

.cmp {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px
}

.cmp .col {
  padding: 20px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--ct, var(--tone));
  transition: .35s var(--ease);
  position: relative
}

.cmp .col:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow)
}

.cmp .col h4 {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.5;
  color: var(--ct, var(--tone))
}

.cmp .col small {
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
  font-size: .8rem
}

.cmp .col ul {
  list-style: none;
  display: grid;
  gap: 8px;
  margin-top: 10px
}

.cmp .col li {
  font-size: .95rem !important;
  line-height: 1.85 !important;
  padding-inline-start: 18px;
  position: relative
}

.cmp .col li::before {
  content: "•";
  position: absolute;
  inset-inline-start: 2px;
  color: var(--ct, var(--tone));
  font-weight: 800
}

.cmp .col li.bad::before {
  content: "✕";
  color: var(--bad);
  font-size: .8em
}

.cmp .col li.good::before {
  content: "✓";
  color: var(--ok);
  font-size: .85em
}

.tone-cyan {
  --ct: var(--cyan)
}

.tone-gold {
  --ct: var(--gold)
}

.tone-rose {
  --ct: var(--rose)
}

.tone-mint {
  --ct: var(--mint)
}

.tone-violet {
  --ct: var(--violet)
}

.tone-amber {
  --ct: var(--amber)
}

.tl {
  position: relative;
  padding-inline-start: 34px;
  display: grid;
  gap: 18px
}

.tl::before {
  content: "";
  position: absolute;
  inset-block: 8px;
  inset-inline-start: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--tone), transparent);
  opacity: .55
}

.tli {
  position: relative;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  transition: .35s var(--ease)
}

.tli::before {
  content: "";
  position: absolute;
  inset-inline-start: -31px;
  top: 20px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--tone);
  box-shadow: 0 0 14px var(--tone)
}

.tli:hover {
  transform: translateX(-5px);
  border-color: color-mix(in srgb, var(--tone) 50%, var(--line))
}

.tli .y {
  font-weight: 800;
  color: var(--tone);
  font-size: .9rem
}

.tli .d {
  font-size: .98rem !important;
  line-height: 1.9 !important
}

.acc {
  display: grid;
  gap: 10px
}

.accitem {
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: .3s
}

.accitem.open {
  border-color: color-mix(in srgb, var(--tone) 50%, var(--line));
  background: var(--card2)
}

.acch {
  width: 100%;
  text-align: start;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  font-size: 1.02rem;
  line-height: 1.7
}

.acch .pm {
  margin-inline-start: auto;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--tone) 18%, transparent);
  color: var(--tone);
  display: grid;
  place-items: center;
  transition: transform .35s var(--ease);
  flex: none
}

.acch .pm svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.6
}

.accitem.open .pm {
  transform: rotate(45deg)
}

.accb {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease)
}

.accitem.open .accb {
  grid-template-rows: 1fr
}

.accb>div {
  overflow: hidden
}

.accb .in {
  padding: 0 20px 18px;
  font-size: 1rem !important;
  line-height: 2 !important;
  color: var(--muted)
}

.accb .in b {
  color: var(--text)
}

.tabs {
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  overflow: hidden
}

.tabbar {
  display: flex;
  gap: 6px;
  padding: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--card);
  border-bottom: 1px solid var(--line)
}

.tabbar::-webkit-scrollbar {
  display: none
}

.tab {
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 800;
  font-size: .92rem;
  white-space: nowrap;
  color: var(--muted);
  transition: .25s
}

.tab.on {
  background: color-mix(in srgb, var(--tone) 22%, transparent);
  color: var(--text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 50%, transparent)
}

.tabpanel {
  padding: 18px 22px;
  animation: pagein .45s var(--ease)
}

.tabpanel p,
.tabpanel li {
  font-size: 1rem !important
}

.tblw {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card)
}

table.tbl {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px
}

.tbl th {
  background: color-mix(in srgb, var(--tone) 16%, transparent);
  color: var(--text);
  font-weight: 800;
  text-align: start;
  padding: 13px 16px;
  font-size: .92rem;
  white-space: nowrap
}

.tbl td {
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  font-size: .96rem;
  line-height: 1.85;
  vertical-align: top
}

.tbl tr:hover td {
  background: var(--card)
}

.tbl td:first-child {
  font-weight: 800;
  color: var(--tone)
}

.flips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px
}

.flip {
  perspective: 1000px;
  height: 230px;
  cursor: pointer
}

.flip .fi {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform .8s var(--ease);
  transform-style: preserve-3d
}

.flip.on .fi {
  transform: rotateY(180deg)
}

.flip .f {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 20px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  overflow: auto
}

.flip .f1 {
  background: linear-gradient(160deg, var(--card2), var(--card));
  text-align: center;
  align-items: center
}

.flip .f1 h4 {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.6
}

.flip .f1 small {
  color: var(--muted);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem
}

.flip .f2 {
  background: linear-gradient(160deg, color-mix(in srgb, var(--ct, var(--tone)) 24%, var(--bg2)), var(--bg2));
  transform: rotateY(180deg);
  border-color: color-mix(in srgb, var(--ct, var(--tone)) 50%, var(--line))
}

.flip .f2 p {
  font-size: .95rem !important;
  line-height: 1.9 !important
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px
}

.chip {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: .92rem;
  font-weight: 700;
  transition: .3s var(--ease)
}

.chip:hover {
  transform: translateY(-3px);
  border-color: var(--tone)
}

.viz {
  border-radius: 24px;
  background: linear-gradient(170deg, var(--card2), var(--card));
  border: 1px solid var(--line);
  padding: 20px;
  position: relative;
  overflow: hidden
}

.viz .vt {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  margin-bottom: 12px;
  font-size: 1rem;
  flex-wrap: wrap
}

.viz .vt small {
  color: var(--muted);
  font-weight: 500;
  font-size: .78rem
}

.viz .vt .tag {
  padding: 3px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tone) 18%, transparent);
  color: var(--tone);
  font-size: .72rem;
  font-weight: 800
}

.vsvg {
  width: 100%;
  height: auto;
  overflow: visible
}

.vsvg text {
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  fill: var(--text)
}

.vcap {
  margin-top: 10px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  min-height: 76px;
  font-size: .98rem !important;
  line-height: 1.9 !important;
  animation: pagein .4s var(--ease)
}

.vcap b {
  color: var(--gold)
}

.seg {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  flex-wrap: wrap;
  margin-bottom: 14px
}

.seg button {
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 800;
  font-size: .86rem;
  color: var(--muted);
  transition: .25s
}

.seg button.on {
  background: linear-gradient(135deg, var(--tone), color-mix(in srgb, var(--tone) 60%, #fff));
  color: #06101f
}

.layer {
  cursor: pointer;
  transition: filter .3s, transform .4s var(--ease);
  transform-origin: center;
  transform-box: fill-box
}

.layer:hover {
  filter: brightness(1.25)
}

.layer.on {
  filter: brightness(1.35) drop-shadow(0 0 12px var(--tone))
}

.dash {
  stroke-dasharray: 7 7;
  animation: dash 1.4s linear infinite
}

@keyframes dash {
  to {
    stroke-dashoffset: -28
  }
}

.pulse {
  animation: pulse 2.4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center
}

@keyframes pulse {
  50% {
    transform: scale(1.07);
    opacity: .82
  }
}

.stree {
  display: grid;
  gap: 14px
}

.sroot {
  padding: 14px 20px;
  border-radius: 16px;
  text-align: center;
  font-weight: 800;
  background: linear-gradient(135deg, var(--tone), color-mix(in srgb, var(--tone) 55%, var(--violet)));
  color: #07101f
}

.sbranches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px
}

.sbr {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 14px
}

.sbr>h4 {
  font-weight: 800;
  padding: 4px 6px 10px;
  color: var(--bc);
  display: flex;
  align-items: center;
  gap: 8px
}

.sbr>h4::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bc);
  box-shadow: 0 0 12px var(--bc)
}

.snode {
  width: 100%;
  text-align: start;
  padding: 11px 14px;
  border-radius: 12px;
  margin-bottom: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: .93rem;
  transition: .3s var(--ease);
  display: flex;
  align-items: center;
  gap: 10px
}

.snode:hover {
  border-color: var(--bc);
  transform: translateX(-4px)
}

.snode.on {
  background: color-mix(in srgb, var(--bc) 20%, transparent);
  border-color: var(--bc)
}

.snode .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bc);
  flex: none
}

.counter {
  font-weight: 800;
  font-size: 3rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--gold), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent
}

.rail {
  position: relative;
  height: 8px;
  border-radius: 8px;
  background: var(--card2);
  margin: 22px 4px 10px
}

.rail i {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  width: 0;
  transition: width .8s var(--ease)
}

.railpts {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  flex-wrap: nowrap
}

.railpt {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: .7rem;
  color: var(--muted);
  font-weight: 700;
  padding: 6px 2px;
  border-radius: 10px;
  transition: .3s;
  line-height: 1.4
}

.railpt b {
  display: block;
  font-size: .8rem;
  color: var(--text)
}

.railpt.on {
  background: color-mix(in srgb, var(--tone) 22%, transparent);
  color: var(--text)
}

.bdg {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px
}

.bd {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  transition: .3s var(--ease);
  font-size: .92rem !important;
  line-height: 1.75 !important
}

.bd:hover {
  transform: translateY(-3px);
  border-color: var(--tone)
}

.bd b {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--tone) 22%, transparent);
  color: var(--tone);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .9rem
}

.quiz {
  margin-top: 44px;
  border-radius: 26px;
  padding: 24px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tone) 16%, var(--bg2)), var(--bg2));
  border: 1px solid color-mix(in srgb, var(--tone) 38%, var(--line));
  position: relative;
  overflow: hidden
}

.quiz::before {
  content: "";
  position: absolute;
  inset-inline-end: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--tone), transparent 70%);
  opacity: .22
}

.qhead {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
  position: relative
}

.qhead h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 !important
}

.qhead h2::before {
  display: none !important
}

.qprog {
  display: flex;
  gap: 6px;
  margin: 14px 0 18px;
  position: relative
}

.qprog i {
  flex: 1;
  height: 6px;
  border-radius: 6px;
  background: var(--card2);
  transition: .4s
}

.qprog i.cur {
  background: var(--tone)
}

.qprog i.ok {
  background: var(--ok)
}

.qprog i.no {
  background: var(--bad)
}

.qtext {
  font-size: 1.15rem !important;
  font-weight: 800;
  line-height: 1.9 !important;
  position: relative;
  margin-bottom: 14px
}

.qtype {
  display: inline-block;
  font-size: .72rem;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--card2);
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 800
}

.opts {
  display: grid;
  gap: 10px;
  position: relative
}

.opt {
  width: 100%;
  text-align: start;
  padding: 14px 18px;
  padding-inline-start: 56px;
  border-radius: 14px;
  background: var(--card);
  border: 1.5px solid var(--line);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.8;
  position: relative;
  transition: .25s var(--ease)
}

.opt::before {
  content: attr(data-l);
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--card2);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .85rem;
  color: var(--muted);
  transition: .25s
}

.opt:hover:not(:disabled) {
  border-color: var(--tone);
  transform: translateX(-4px)
}

.opt:disabled {
  cursor: default
}

.opt.ok {
  border-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 16%, transparent);
  animation: okp .5s var(--ease)
}

.opt.ok::before {
  background: var(--ok);
  color: #001
}

.opt.no {
  border-color: var(--bad);
  background: color-mix(in srgb, var(--bad) 14%, transparent);
  animation: shake .45s
}

.opt.no::before {
  background: var(--bad);
  color: #fff
}

.opt.dim {
  opacity: .55
}

@keyframes okp {
  40% {
    transform: scale(1.025)
  }
}

@keyframes shake {

  20%,
  60% {
    transform: translateX(-7px)
  }

  40%,
  80% {
    transform: translateX(7px)
  }
}

.fb {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: .98rem !important;
  line-height: 1.95 !important;
  animation: pagein .4s var(--ease);
  position: relative
}

.fb b.v {
  display: block;
  margin-bottom: 2px;
  font-size: 1.02rem
}

.fb.ok b.v {
  color: var(--ok)
}

.fb.no b.v {
  color: var(--bad)
}

.qnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  gap: 10px;
  flex-wrap: wrap;
  position: relative
}

.score {
  text-align: center;
  padding: 10px 0;
  position: relative
}

.ring {
  width: 150px;
  height: 150px;
  margin: 0 auto 10px;
  position: relative
}

.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg)
}

.ring circle {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round
}

.ring .tr {
  stroke: var(--card2)
}

.ring .pr {
  stroke: var(--tone);
  transition: stroke-dashoffset 1.4s var(--ease)
}

.ring b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800
}

.score h3 {
  font-size: 1.4rem;
  font-weight: 800
}

.score p {
  color: var(--muted)
}

.donebar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-top: 34px;
  padding: 22px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line)
}

.lnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px
}

.lnav a {
  display: block;
  padding: 16px 20px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  transition: .35s var(--ease)
}

.lnav a:hover {
  transform: translateY(-4px);
  border-color: var(--tone)
}

.lnav small {
  color: var(--muted);
  display: block;
  font-size: .75rem
}

.lnav b {
  font-weight: 800;
  line-height: 1.5;
  display: block
}

.lnav a.nx {
  text-align: end
}

.toc {
  display: none
}

@media(min-width:1180px) {
  .reading {
    grid-template-columns: minmax(0, 1fr) 230px
  }

  .toc {
    display: block;
    position: sticky;
    top: 92px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow: auto;
    padding-inline-start: 16px;
    border-inline-start: 2px solid var(--line);
    order: 2;
    scrollbar-width: none
  }

  .toc a {
    display: block;
    padding: 7px 0;
    font-size: .86rem;
    color: var(--muted);
    line-height: 1.6;
    transition: .25s;
    position: relative
  }

  .toc a.on {
    color: var(--text);
    font-weight: 800
  }

  .toc a.on::before {
    content: "";
    position: absolute;
    inset-inline-start: -18px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tone);
    transform: translateY(-50%);
    box-shadow: 0 0 10px var(--tone)
  }

  .toc small {
    display: block;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 6px;
    font-size: .75rem
  }
}

.fcstage {
  perspective: 1400px;
  max-width: 640px;
  margin: 24px auto
}

.fc {
  height: min(56vh, 380px);
  position: relative;
  cursor: pointer
}

.fc .fi {
  position: absolute;
  inset: 0;
  transition: transform .8s var(--ease);
  transform-style: preserve-3d
}

.fc.on .fi {
  transform: rotateY(180deg)
}

.fc .f {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: auto
}

.fc .f1 {
  background: linear-gradient(160deg, var(--card2), var(--bg2))
}

.fc .f1 h3 {
  font-size: clamp(1.3rem, 4vw, 1.9rem);
  font-weight: 800;
  line-height: 1.6
}

.fc .f1 small {
  margin-top: 14px;
  color: var(--muted);
  font-size: .8rem
}

.fc .f2 {
  background: linear-gradient(160deg, color-mix(in srgb, var(--tone) 22%, var(--bg2)), var(--bg2));
  transform: rotateY(180deg);
  border-color: color-mix(in srgb, var(--tone) 55%, var(--line))
}

.fc .f2 p {
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  line-height: 2
}

.fc .tagc {
  position: absolute;
  top: 16px;
  inset-inline-start: 18px;
  font-size: .72rem;
  font-weight: 800;
  color: var(--tone);
  padding: 3px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tone) 16%, transparent)
}

.fcbar {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px
}

.fcmeta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 640px;
  margin: 0 auto;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700
}

.filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 16px 0
}

.mg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px
}

.mcol {
  display: grid;
  gap: 10px;
  align-content: start
}

.mi {
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--card);
  border: 1.5px solid var(--line);
  font-weight: 700;
  font-size: .93rem;
  line-height: 1.7;
  text-align: start;
  transition: .3s var(--ease);
  width: 100%
}

.mi:hover:not(.lock) {
  border-color: var(--cyan);
  transform: translateY(-2px)
}

.mi.sel {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  transform: scale(1.02)
}

.mi.lock {
  border-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 14%, transparent);
  opacity: .75;
  cursor: default
}

.mi.wrong {
  animation: shake .45s;
  border-color: var(--bad)
}

.mstat {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  margin-top: 14px
}

.exambox {
  max-width: 760px;
  margin: 20px auto
}

.examtop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 700;
  font-size: .9rem
}

.sheet {
  display: grid;
  gap: 22px;
  margin-top: 20px
}

.sheetch {
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 22px;
  border-top: 4px solid var(--tone)
}

.sheetch h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--tone);
  margin-bottom: 12px
}

.sheetch ul {
  list-style: none;
  display: grid;
  gap: 9px
}

.sheetch li {
  padding-inline-start: 20px;
  position: relative;
  font-size: .96rem;
  line-height: 1.85
}

.sheetch li::before {
  content: "◆";
  position: absolute;
  inset-inline-start: 0;
  color: var(--tone);
  font-size: .6rem;
  top: .55rem
}

.sheetch li b {
  color: var(--gold)
}

.searchbox {
  position: relative;
  margin: 18px 0
}

.searchbox input {
  width: 100%;
  padding: 16px 56px 16px 20px;
  border-radius: 18px;
  background: var(--card);
  border: 1.5px solid var(--line);
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700
}

.searchbox svg {
  position: absolute;
  inset-inline-start: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2
}

.searchbox input {
  padding-inline-start: 52px;
  padding-inline-end: 20px
}

.sres {
  display: grid;
  gap: 10px
}

.sr1 {
  display: block;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  transition: .3s var(--ease);
  text-align: start;
  width: 100%
}

.sr1:hover {
  transform: translateX(-5px);
  border-color: var(--cyan)
}

.sr1 b {
  display: block;
  font-weight: 800;
  margin-bottom: 2px
}

.sr1 small {
  color: var(--gold);
  font-weight: 700;
  font-size: .74rem
}

.sr1 p {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.8
}

.sr1 mark {
  background: color-mix(in srgb, var(--gold) 40%, transparent);
  color: var(--text);
  border-radius: 3px;
  padding: 0 2px
}

.flash {
  animation: flash 2.2s ease
}

@keyframes flash {

  0%,
  60% {
    box-shadow: 0 0 0 3px var(--gold), 0 0 40px var(--gold)
  }

  100% {
    box-shadow: none
  }
}

.dim {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(2, 5, 15, .6);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: .4s
}

.dim.on {
  opacity: 1;
  pointer-events: auto
}

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  width: min(400px, 92vw);
  z-index: 80;
  background: var(--bg2);
  border-inline-end: 1px solid var(--line);
  transform: translateX(105%);
  transition: transform .55s var(--ease);
  overflow: auto;
  padding: 20px;
  padding-top: calc(20px + env(safe-area-inset-top, 0px));
  box-shadow: var(--shadow)
}

[dir=rtl] .drawer {
  transform: translateX(105%)
}

.drawer.on {
  transform: none
}

.drawer h3 {
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between
}

.dch {
  margin-bottom: 14px;
  --tone: var(--cyan)
}

.dch>a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 800;
  color: var(--tone);
  background: color-mix(in srgb, var(--tone) 10%, transparent)
}

.dch>a span.n {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--tone);
  color: #06101f;
  font-size: .85rem
}

.dch ul {
  list-style: none;
  margin: 6px 0 0;
  padding-inline-start: 18px;
  border-inline-start: 2px solid var(--line);
  margin-inline-start: 18px
}

.dch li a {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  font-size: .9rem;
  color: var(--muted);
  border-radius: 10px;
  align-items: center;
  line-height: 1.6
}

.dch li a:hover {
  color: var(--text);
  background: var(--card)
}

.dch li a.on {
  color: var(--text);
  background: var(--card2)
}

.dch li a svg {
  width: 14px;
  height: 14px;
  stroke: var(--ok);
  fill: none;
  stroke-width: 3;
  flex: none;
  opacity: 0
}

.dch li a.done svg {
  opacity: 1
}

.dtools {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line)
}

.dtools a {
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: .95rem
}

.dtools a:hover {
  background: var(--card)
}

.fsrow {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700
}

.toast {
  position: fixed;
  bottom: 22px;
  inset-inline: 0;
  margin-inline: auto;
  width: max-content;
  max-width: calc(100% - 28px);
  z-index: 120;
  padding: 14px 22px;
  border-radius: 18px;
  background: var(--bg3);
  border: 1px solid color-mix(in srgb, var(--gold) 50%, var(--line));
  box-shadow: var(--shadow);
  font-weight: 800;
  display: flex;
  gap: 12px;
  align-items: center;
  transform: translateY(160%);
  transition: transform .6s var(--ease)
}

.toast.on {
  transform: none
}

.toast .xp {
  color: var(--gold)
}

#confetti {
  position: fixed;
  inset: 0;
  z-index: 110;
  pointer-events: none
}

.foot {
  margin-top: 70px;
  padding: 34px 0 50px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .86rem;
  text-align: center;
  line-height: 2
}

.foot b {
  color: var(--text)
}

.foot a {
  color: var(--cyan);
  font-weight: 700
}

.foot .soon {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px dashed color-mix(in srgb, var(--gold) 50%, var(--line));
  color: var(--gold);
  font-weight: 700
}

@media(max-width:860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    text-align: center
  }

  .hero-copy p {
    margin-inline: auto
  }

  .hero-cta,
  .hero-meta {
    justify-content: center
  }

  .globewrap {
    order: -1;
    width: min(78vw, 380px)
  }

  .hero {
    min-height: auto
  }

  .stats {
    grid-template-columns: repeat(2, 1fr)
  }

  .mg {
    grid-template-columns: 1fr
  }

  .brand small {
    display: none
  }
}

@media(max-width:520px) {
  .jc {
    grid-template-columns: 44px 1fr;
    gap: 12px
  }

  .jnode {
    width: 44px;
    height: 44px;
    font-size: 1.05rem
  }

  .jnode svg {
    width: 56px;
    height: 56px;
    inset: -6px
  }

  .journey::before {
    inset-inline-start: 21px
  }

  .lrow {
    grid-template-columns: auto 1fr;
    padding: 16px
  }

  .lrow .chk {
    display: none
  }

  .lnav {
    grid-template-columns: 1fr
  }

  .note {
    padding-inline-start: 20px;
    padding-top: 66px
  }

  .quiz {
    padding: 18px
  }

  .xpchip span.lbl {
    display: none
  }

  .flip {
    height: 260px
  }
}

@media(prefers-reduced-motion:reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important
  }

  .rv {
    opacity: 1;
    transform: none
  }
}

@media print {

  .topbar,
  .plinebar,
  .ambient,
  .drawer,
  .dim,
  .toast,
  #confetti,
  .quiz,
  .donebar,
  .lnav,
  .btn,
  .toc,
  .hero .globewrap,
  .scrollhint {
    display: none !important
  }

  body {
    background: #fff;
    color: #000;
    -webkit-user-select: text;
    user-select: text
  }

  :root {
    --text: #000;
    --muted: #333;
    --card: #fff;
    --line: #bbb;
    --bg: #fff;
    --bg2: #fff
  }

  #view {
    padding-top: 0
  }

  .rv {
    opacity: 1 !important;
    transform: none !important
  }
}

.note .nb,
.note .nb p {
  font-size: 1rem;
  line-height: 1.95
}

.note .nb>ol,
.note .nb>ul {
  margin-top: 8px
}

.article h2 {
  scroll-margin-top: 90px
}

.quiz {
  scroll-margin-top: 84px
}

.sheetch h4 {
  font-size: 1.02rem;
  font-weight: 800;
  margin: 16px 0 8px
}

.sheetch h4 a:hover {
  color: var(--gold)
}

.railpt .yy {
  display: block;
  font-size: .66rem;
  font-weight: 600;
  color: var(--muted)
}

@media(max-width:620px) {
  .railpt .yy {
    display: none
  }
}

.snode.lad {
  justify-content: flex-start
}

.viz .seg {
  max-width: 100%
}

.tabpanel ul.ls {
  margin-top: 10px;
  padding-inline-start: 0;
  list-style: none;
  display: grid;
  gap: 8px
}

.tabpanel ul.ls li,
.tabpanel ol.ls li {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line)
}

.tabpanel ol.ls {
  margin-top: 10px;
  padding-inline-start: 0;
  list-style: none;
  display: grid;
  gap: 8px
}

.tabpanel p {
  margin-bottom: 8px
}

.fb ol.ls,
.fb ul.ls {
  margin-top: 6px
}

noscript {
  display: block;
  padding: 40px 20px;
  text-align: center
}

.xpchip svg {
  flex: none
}

.seg {
  display: flex;
  width: 100%
}

.seg button {
  flex: 1;
  padding: 8px 6px;
  font-size: .84rem;
  line-height: 1.4;
  text-align: center
}

.pyr {
  display: grid;
  gap: 5px;
  justify-items: center
}

.pyl {
  min-height: 54px;
  padding: 8px 14px;
  font-weight: 800;
  font-size: .92rem;
  line-height: 1.5;
  text-align: center;
  color: var(--text);
  background: color-mix(in srgb, var(--lc) 26%, transparent);
  border: 0;
  clip-path: polygon(5% 0, 95% 0, 100% 100%, 0 100%);
  transition: filter .3s, background .3s
}

.pyl.on {
  background: color-mix(in srgb, var(--lc) 52%, transparent)
}

@media(max-width:860px) {
  .scrollhint {
    display: none
  }
}

.toast {
  opacity: 0;
  visibility: hidden;
  transition: transform .6s var(--ease), opacity .4s, visibility .4s
}

.toast.on {
  opacity: 1;
  visibility: visible
}

/* Focus is moved to the page heading after navigation (screen readers); don't draw a ring on it. */
#view:focus,
#view h1:focus {
  outline: none
}

/* INTL LAW · Institutional UI refresh */
:root {
  --bg: #0b1220;
  --bg2: #111c2e;
  --bg3: #17243a;
  --card: rgba(255,255,255,.045);
  --card2: rgba(255,255,255,.075);
  --line: rgba(205,220,240,.12);
  --text: #edf2f8;
  --muted: #a8b5c8;
  --dim: #77869d;
  --gold: #c9a96e;
  --cyan: #8fb7c8;
  --violet: #a7a1c7;
  --mint: #8eb8a7;
  --rose: #c98e91;
  --amber: #c9a96e;
  --accent: var(--gold);
  --ok: #8eb8a7;
  --bad: #cf8585;
  --shadow: 0 24px 70px -34px rgba(0,0,0,.72);
  --r: 16px;
}
:root[data-theme=light] {
  --bg: #f5f4f0;
  --bg2: #fffefa;
  --bg3: #ebe8df;
  --card: rgba(24,37,57,.035);
  --card2: rgba(24,37,57,.065);
  --line: rgba(24,37,57,.12);
  --text: #182538;
  --muted: #58677b;
  --dim: #788598;
  --gold: #9c7941;
  --cyan: #477b8f;
  --violet: #706b91;
  --mint: #477c69;
  --rose: #a65d66;
  --amber: #9c7941;
  --ok: #477c69;
  --bad: #a64e58;
  --shadow: 0 20px 55px -32px rgba(27,39,55,.25);
}
html { scroll-padding-top: 86px; }
body { font-family: 'Tajawal','IBM Plex Sans Arabic','Segoe UI',sans-serif; letter-spacing: 0; line-height: 1.85; }
.ambient i { opacity: .12; filter: blur(110px); }
.ambient::after { opacity: .08; background-size: 88px 88px; }
.topbar { padding-inline: max(22px, calc((100vw - 1180px)/2)); min-height: 68px; background: color-mix(in srgb,var(--bg) 92%,transparent); border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(0,0,0,.06); }
.brand { font-size: 1rem; letter-spacing: -.2px; }
.brand svg { width: 28px; height: 28px; }
.iconbtn { border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.iconbtn:hover { background: var(--card2); }
#view { padding-top: 68px; }
.wrap { width: min(1160px,100% - 44px); }
.btn { border-radius: 11px; padding: 12px 20px; font-size: .94rem; font-weight: 700; box-shadow: none!important; }
.btn.primary { background: var(--gold); color: #171b22; }
.btn.primary:hover { background: color-mix(in srgb,var(--gold) 88%,white); transform: translateY(-2px); }
.btn.ghost { border-color: var(--line); background: var(--card); }
.btn.ghost:hover { border-color: color-mix(in srgb,var(--gold) 55%,var(--line)); transform: translateY(-2px); }
.eyebrow { color: var(--gold); font-size: .76rem; letter-spacing: .5px; }
.eyebrow::before { width: 18px; background: var(--gold); }
.sectitle { letter-spacing: -.5px; }

/* Home / editorial hero */
.hero-premium { min-height: auto; padding: clamp(42px,7vw,86px) 0 clamp(46px,7vw,82px); background: linear-gradient(135deg,color-mix(in srgb,var(--bg2) 92%,transparent),color-mix(in srgb,var(--bg) 98%,transparent)); border-bottom: 1px solid var(--line); }
.hero-premium::before { content:""; position:absolute; width:520px; height:520px; border:1px solid color-mix(in srgb,var(--gold) 16%,transparent); border-radius:50%; inset-inline-end:-250px; top:-250px; box-shadow:0 0 0 48px color-mix(in srgb,var(--gold) 3%,transparent),0 0 0 96px color-mix(in srgb,var(--gold) 2%,transparent); pointer-events:none; }
.hero-premium .wrap { grid-template-columns:minmax(0,1.08fr) minmax(300px,.72fr); gap:clamp(34px,7vw,100px); padding-block:0; position:relative; }
.hero-premium .hero-copy { max-width:650px; }
.hero-premium .hero-copy h1 { color:var(--text); background:none; animation:none; font-size:clamp(2.45rem,5.7vw,4.5rem); letter-spacing:-1.5px; line-height:1.2; margin:18px 0 12px; }
.hero-premium .hero-copy p { max-width:56ch; font-size:1.04rem; color:var(--muted); }
.hero-premium .hero-copy .hero-subtitle { color:var(--text); font-size:clamp(1.12rem,2vw,1.35rem); font-weight:700; margin-bottom:8px; }
.hero-premium .hero-cta { margin-top:28px; gap:10px; }
.hero-note { display:flex; align-items:center; gap:9px; margin-top:28px; color:var(--dim); font-size:.82rem; }
.status-dot { width:7px; height:7px; border-radius:50%; background:var(--mint); box-shadow:0 0 0 4px color-mix(in srgb,var(--mint) 12%,transparent); }
.hero-panel { align-self:center; padding:24px; border:1px solid color-mix(in srgb,var(--gold) 24%,var(--line)); border-radius:20px; background:linear-gradient(145deg,var(--bg2),color-mix(in srgb,var(--bg3) 82%,var(--bg))); box-shadow:var(--shadow); position:relative; overflow:hidden; }
.hero-panel::after { content:""; position:absolute; width:230px; height:230px; border:1px solid color-mix(in srgb,var(--gold) 16%,transparent); border-radius:50%; inset-inline-end:-115px; top:70px; box-shadow:0 0 0 22px color-mix(in srgb,var(--gold) 3%,transparent),0 0 0 46px color-mix(in srgb,var(--gold) 2%,transparent); }
.panel-top { display:flex; justify-content:space-between; align-items:center; gap:10px; color:var(--dim); font:600 .67rem 'Inter',sans-serif; letter-spacing:1.5px; direction:ltr; }
.panel-top i { color:var(--gold); font-style:normal; padding:0 4px; }
.panel-live { font:600 .7rem 'Tajawal',sans-serif; letter-spacing:0; direction:rtl; padding:4px 9px; border-radius:6px; color:var(--mint); background:color-mix(in srgb,var(--mint) 10%,transparent); }
.panel-mark { display:flex; align-items:center; gap:18px; margin:42px 0 32px; position:relative; z-index:1; }
.panel-mark>span { display:grid; place-items:center; width:94px; height:94px; border:1px solid color-mix(in srgb,var(--gold) 60%,var(--line)); border-radius:50%; color:var(--gold); font:500 2.25rem 'Inter',sans-serif; letter-spacing:-3px; box-shadow:inset 0 0 0 7px color-mix(in srgb,var(--gold) 5%,transparent); }
.panel-mark small { color:var(--muted); font:500 .65rem/1.8 'Inter',sans-serif; letter-spacing:2px; }
.panel-caption { display:flex; flex-direction:column; gap:3px; position:relative; z-index:1; }
.panel-caption span { color:var(--dim); font-size:.78rem; }
.panel-caption b { font-size:1.15rem; font-weight:800; }
.panel-stats { display:grid; grid-template-columns:repeat(3,1fr); margin-top:24px; padding:17px 0; border-block:1px solid var(--line); position:relative; z-index:1; }
.panel-stats div { display:flex; flex-direction:column; gap:1px; text-align:center; border-inline-start:1px solid var(--line); }
.panel-stats div:first-child { border:0; }
.panel-stats b { font:600 1.55rem 'Inter',sans-serif; color:var(--gold); }
.panel-stats span { color:var(--dim); font-size:.75rem; }
.panel-progress { margin-top:20px; position:relative; z-index:1; }
.panel-progress-label { display:flex; justify-content:space-between; color:var(--muted); font-size:.8rem; margin-bottom:8px; }
.panel-progress-label b { color:var(--gold); }
.panel-track { height:5px; background:var(--line); border-radius:99px; overflow:hidden; }
.panel-track i { display:block; height:100%; background:var(--gold); border-radius:99px; }
.panel-progress small { display:block; margin-top:8px; color:var(--dim); font-size:.72rem; }
.home-content { padding-bottom:60px; }
.stats { margin-top:26px; border:1px solid var(--line); border-radius:16px; background:var(--bg2); padding:10px; box-shadow:none; }
.stat { padding:14px 8px; }
.stat b { font:600 1.65rem 'Inter',sans-serif; color:var(--gold); }
.stat span { font-size:.78rem; color:var(--muted); }
.home-section { display:flex; align-items:end; justify-content:space-between; gap:18px; margin:58px 0 20px; }
.home-section .sectitle { margin-top:5px; }
.text-link { display:inline-flex; align-items:center; gap:7px; color:var(--gold); font-weight:700; font-size:.84rem; white-space:nowrap; }
.text-link svg,.tool-link svg { width:15px; height:15px; stroke:currentColor; fill:none; stroke-width:2; }
.journey { gap:14px; }
.jc { gap:12px; }
.jnode { background:var(--bg2); border:1px solid var(--line); box-shadow:none; }
.jcard { padding:23px 25px; border-radius:15px; background:var(--bg2); border-color:var(--line); box-shadow:none; }
.jcard:hover { transform:translateY(-3px); box-shadow:var(--shadow); }
.jcard .k { color:var(--gold); }
.jcard .k span { color:var(--dim); font-weight:500; }
.jcard h3 { font-size:1.2rem; }
.jcard p { max-width:72ch; }
.jmeta .pill { background:var(--card); }
.jgo { color:var(--gold); }
.tools { grid-template-columns:repeat(auto-fit,minmax(205px,1fr)); gap:12px; }
.tool { background:var(--bg2); border-radius:15px; padding:20px; border-color:var(--line); }
.tool:hover { transform:translateY(-3px); box-shadow:var(--shadow); }
.tool .ic { border-radius:12px; width:44px; height:44px; background:color-mix(in srgb,var(--tone) 10%,transparent); }
.tool .ic svg { width:22px; height:22px; }
.tool h4 { font-size:1rem; }
.tool p { min-height:3.2em; }
.tool-link { display:inline-flex; align-items:center; gap:6px; margin-top:12px; color:var(--gold); font-size:.78rem; font-weight:700; }

/* Lesson and chapter reading */
.chead { padding-top:30px; }
.chead h1 { letter-spacing:-.5px; }
.lrow { border-radius:14px; background:var(--bg2); padding:17px 19px; }
.lrow:hover { transform:translateX(-3px); }
.lnum { border-radius:11px; }
.lesson { max-width:900px; }
.lesson p,.lesson li { line-height:2.05; }
.lesson h2,.lesson h3 { letter-spacing:-.2px; }
.note,.quote,.quiz,.sheet,.vizbox { border-radius:14px; }

/* Exam configuration and timed mock */
.exam-config { max-width:900px; margin:22px 0 60px; padding:clamp(20px,4vw,34px); border:1px solid var(--line); border-radius:18px; background:var(--bg2); box-shadow:var(--shadow); }
.exam-config-head { display:flex; align-items:center; gap:14px; padding-bottom:20px; border-bottom:1px solid var(--line); }
.exam-config-head h2 { font-size:1.25rem; }
.exam-config-head p { color:var(--muted); font-size:.84rem; }
.config-icon { width:48px; height:48px; display:grid; place-items:center; border-radius:13px; background:color-mix(in srgb,var(--gold) 12%,transparent); color:var(--gold); }
.config-icon svg { width:24px; height:24px; stroke:currentColor; fill:none; stroke-width:1.8; }
.config-group { margin-top:22px; }
.config-group>label { display:block; font-size:.88rem; font-weight:800; margin-bottom:10px; }
.config-group>small { display:block; margin-top:9px; color:var(--dim); font-size:.78rem; }
.config-row { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.config-group .seg { flex-wrap:wrap; }
.config-group .seg button { border-radius:9px; }
.config-foot { display:flex; align-items:center; justify-content:space-between; gap:16px; border-top:1px solid var(--line); padding-top:20px; margin-top:26px; }
.config-foot>span { display:flex; align-items:center; gap:7px; color:var(--dim); font-size:.76rem; }
.config-foot svg { width:15px; height:15px; stroke:var(--mint); fill:none; stroke-width:2; }
.mock-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:24px; }
.mock-head h2 { font-size:1.25rem; }
.mock-timer { display:flex; align-items:center; gap:8px; padding:9px 13px; border-radius:10px; background:color-mix(in srgb,var(--gold) 10%,transparent); color:var(--gold); font:700 1rem 'Inter','Tajawal',sans-serif; direction:ltr; }
.mock-timer svg { width:17px; height:17px; stroke:currentColor; fill:none; stroke-width:1.8; }
.mock-timer.urgent { color:var(--bad); background:color-mix(in srgb,var(--bad) 12%,transparent); }
.mock-progress { margin-bottom:22px; }
.mock-progress>div:first-child { display:flex; justify-content:space-between; gap:12px; font-size:.8rem; color:var(--muted); margin-bottom:8px; }
.mock-progress b { color:var(--gold); }
.mock-question { padding:clamp(18px,4vw,30px); border:1px solid var(--line); border-radius:15px; background:var(--card); }
.mock-qmeta { display:flex; gap:12px; color:var(--gold); font-size:.78rem; font-weight:700; }
.mock-question h3 { font-size:1.18rem; line-height:1.9; margin:12px 0 20px; }
.mock-question .opts { display:grid; gap:9px; }
.mock-question .opt { display:flex; align-items:center; gap:12px; text-align:start; border:1px solid var(--line); border-radius:11px; padding:13px 15px; background:var(--bg2); transition:.18s ease; }
.mock-question .opt:hover,.mock-question .opt.selected { border-color:var(--gold); background:color-mix(in srgb,var(--gold) 8%,var(--bg2)); }
.opt-letter { width:27px; height:27px; display:grid; place-items:center; flex:none; border-radius:8px; color:var(--muted); background:var(--card2); font-weight:800; }
.mock-question .opt.selected .opt-letter { color:#171b22; background:var(--gold); }
.mock-nav { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:18px; }
.mock-nav>span { color:var(--dim); font-size:.78rem; }
.mock-result { text-align:center; padding:26px 12px 32px; border-bottom:1px solid var(--line); }
.mock-score { font:600 3.6rem 'Inter',sans-serif; color:var(--gold); margin:12px 0 0; direction:ltr; }
.mock-score small { color:var(--dim); font-size:1.2rem; }
.mock-result p { color:var(--muted); }
.mock-review { margin-top:25px; }
.mock-review h3 { margin-bottom:14px; }
.mock-review-item { padding:16px; margin:10px 0; border:1px solid var(--line); border-inline-start:3px solid var(--mint); border-radius:11px; background:var(--card); }
.mock-review-item.is-wrong { border-inline-start-color:var(--bad); }
.mock-review-item>b { display:block; line-height:1.8; }
.mock-review-item p { margin-top:6px; color:var(--muted); font-size:.87rem; }
.mock-review-item strong { color:var(--mint); }
.mock-review-item small { display:block; margin-top:8px; color:var(--dim); line-height:1.8; }
.mock-review-item a { display:inline-block; margin-top:8px; color:var(--gold); font-size:.8rem; font-weight:700; }

/* Responsive polish */
@media(max-width:800px) {
  .topbar { padding-inline:12px; }
  .hero-premium { padding:38px 0 44px; }
  .hero-premium .wrap { grid-template-columns:1fr; gap:28px; }
  .hero-premium .hero-copy h1 { font-size:clamp(2.25rem,10vw,3.4rem); }
  .hero-panel { max-width:540px; width:100%; margin-inline:auto; }
  .home-section { align-items:start; flex-direction:column; gap:8px; margin-top:42px; }
  .config-row { grid-template-columns:1fr; gap:0; }
}
@media(max-width:520px) {
  .wrap { width:calc(100% - 28px); }
  .brand { font-size:.88rem; gap:7px; }
  .brand small { font-size:.62rem; }
  .brand svg { width:25px; height:25px; }
  .hero-premium .hero-copy p { font-size:.96rem; }
  .hero-premium .hero-cta { display:grid; grid-template-columns:1fr 1fr; }
  .hero-premium .hero-cta .btn { justify-content:center; padding:12px 10px; font-size:.84rem; }
  .hero-panel { padding:19px; }
  .panel-mark { margin:30px 0 25px; }
  .panel-mark>span { width:76px; height:76px; font-size:1.9rem; }
  .stats { grid-template-columns:repeat(2,1fr); }
  .stat:nth-child(2) { border-inline-start:0; }
  .stat:nth-child(-n+2) { border-bottom:1px solid var(--line); }
  .journey { gap:10px; }
  .jc { grid-template-columns:42px 1fr; gap:9px; }
  .jnode { width:38px; height:38px; }
  .jnode svg { width:40px; height:40px; }
  .jcard { padding:17px; }
  .jcard h3 { font-size:1.05rem; }
  .jcard p { font-size:.84rem; }
  .jmeta { gap:6px; }
  .jmeta .pill { font-size:.68rem; padding:3px 8px; }
  .tools { grid-template-columns:1fr 1fr; gap:9px; }
  .tool { padding:15px; }
  .tool p { font-size:.79rem; min-height:4.7em; }
  .tool h4 { font-size:.91rem; }
  .tool .ic { width:38px; height:38px; }
  .config-foot { align-items:stretch; flex-direction:column; }
  .config-foot .btn { justify-content:center; }
  .mock-head { align-items:flex-start; }
  .mock-head h2 { font-size:1rem; }
  .mock-timer { padding:8px 10px; font-size:.86rem; }
  .mock-nav .btn { padding:10px 13px; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important; animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; }
}
.reading { grid-template-columns:minmax(0,1fr) 230px; gap:28px; align-items:start; }
.article { max-width:100%; }
.article p,.article li { font-size:1.02rem; line-height:2.08; }
.article h2 { margin-top:34px; padding-top:10px; font-size:1.35rem; }
.article h3 { font-size:1.12rem; }
.article .note { padding:17px 19px; border-radius:12px; }
.article .quiz { padding:20px; }
.lhead h1 { letter-spacing:-.4px; }
.essence { border-radius:14px; }
.toc { position:sticky; top:88px; border:1px solid var(--line); border-radius:13px; background:var(--bg2); padding:16px; }
.toc a { border-radius:7px; padding:7px 9px; }
.drawer { background:var(--bg2); }
.foot { border-top:1px solid var(--line); background:color-mix(in srgb,var(--bg2) 45%,transparent); }
@media(max-width:800px) { .reading { grid-template-columns:1fr; } .toc { position:static; order:-1; } }
.backup-row { margin-top:18px; padding:15px; border:1px solid var(--line); border-radius:12px; background:var(--card); }
.backup-row>b { font-size:.88rem; }
.backup-row p { color:var(--dim); font-size:.76rem; margin:4px 0 11px; }
.backup-row>div { display:flex; gap:8px; flex-wrap:wrap; }
