/* Layout: imamsadiq.ac home structure, reduced to essentials on a deep night-green ground. One light colour (mint moonlight) carries every glow; the ivory logo is the only ornament. */
:root {
  --bg: #0a1411;
  --bg-2: #0e1b17;
  --surface: #12211c;
  --surface-2: #182a24;
  --line: #22362f;
  --ink: #e9f0ec;
  --muted: #8fa39a;
  --emerald: #1fae7a;
  --emerald-2: #178a61;
  --light: #8fe6cf;          /* moonlight: replaces the gold glows */
  --light-rgb: 143, 230, 207;
  --font-body: 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif;
  --font-kufi: 'Reem Kufi', 'Vazirmatn', Tahoma, sans-serif;
  --font-naskh: 'Amiri', 'Noto Naskh Arabic', serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.85; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--light); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p, figure { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 16px; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 999px; padding: 10px 22px; font: 600 14px/1.4 var(--font-body); cursor: pointer; transition: background .2s, color .2s, border-color .2s; white-space: nowrap; }
.btn-tile, .btn-gold { background: var(--emerald); color: #04110c; }
.btn-tile:hover, .btn-gold:hover { background: #2cc78e; }
.btn-line { background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 8px 16px; }
.btn-line:hover { border-color: var(--light); color: var(--light); }

/* Header */
.proto-note { background: var(--surface-2); color: var(--muted); font-size: 13px; text-align: center; padding: 5px 16px; }
.topbar { border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 7px; flex-wrap: wrap; }
.topbar-links, .auth { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.topbar a:hover { color: var(--light); }
.auth .sep { opacity: .4; }
.navbar { background: rgba(10,20,17,.88); backdrop-filter: blur(8px); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; border-bottom: 1px solid var(--line); }
.navbar .container { display: flex; align-items: center; gap: 22px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand-logo { height: 54px; width: auto; display: block; }
.brand strong { display: block; font-family: var(--font-kufi); font-size: 18px; font-weight: 700; line-height: 1.3; }
.brand small { display: block; font-size: 11.5px; color: var(--muted); }
.nav-main { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav-main > a, .cats > summary { padding: 8px 12px; border-radius: 10px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: color .2s, background .2s; }
.nav-main > a:hover, .cats > summary:hover { color: var(--ink); background: var(--surface); }
.cats { position: relative; }
.cats > summary { list-style: none; }
.cats > summary::-webkit-details-marker { display: none; }
.cats-menu { position: absolute; inset-inline-start: 0; top: calc(100% + 10px); width: 270px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px; display: grid; box-shadow: 0 20px 40px -20px #000; }
.cats-menu a { padding: 8px 12px; border-radius: 8px; display: flex; justify-content: space-between; font-size: 14px; }
.cats-menu a span { color: var(--muted); font-size: 12px; }
.cats-menu a:hover { background: var(--surface-2); color: var(--light); }
.burger { display: none; }

/* Hero: one glow, one logo, quiet motion */
.hero { position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(560px 460px at 27% 48%, rgba(var(--light-rgb), .16), transparent 70%), linear-gradient(180deg, #0c1915, var(--bg)); }
#dust { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-block: 72px 150px; }
.ayah { font-family: var(--font-naskh); font-size: 22px; color: var(--light); }
.hero h1 { font-family: var(--font-kufi); font-weight: 700; font-size: clamp(30px, 4.6vw, 52px); line-height: 1.45; margin-top: 10px; }
.hero h1 em { font-style: normal; color: var(--light); }
.hero-lead { margin-top: 16px; max-width: 52ch; color: var(--muted); font-size: 16px; line-height: 2.05; }
.search { display: flex; align-items: center; gap: 8px; max-width: 560px; margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 40px; padding: 6px; transition: border-color .2s; }
.search:focus-within { border-color: var(--light); }
.search .icon { color: var(--muted); margin-inline-start: 12px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; font: 15px var(--font-body); color: var(--ink); background: transparent; padding: 8px 4px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--muted); align-items: center; }
.hero-tags a { border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; transition: border-color .2s, color .2s; }
.hero-tags a:hover { border-color: var(--light); color: var(--light); }
.hero-logo { position: relative; justify-self: center; width: min(320px, 100%); aspect-ratio: 440 / 720; max-width: 100%; }
.hero-logo .halo { position: absolute; left: 50%; top: 45%; width: 140%; aspect-ratio: 1; max-width: 140vw; transform: translate(-50%, -50%); border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(var(--light-rgb), .28), rgba(var(--light-rgb), .08) 45%, transparent 68%); animation: breathe 8s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .7; } }
.logo-float { position: absolute; inset: 0; animation: float 10s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.logo-float img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 0 24px rgba(var(--light-rgb), .25)); animation: reveal 1.8s cubic-bezier(.2,.7,.2,1) both .1s; }
@keyframes reveal { from { opacity: 0; filter: blur(10px); transform: scale(.94); } }
.glint { position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url(logo-light.webp) center / contain no-repeat; mask: url(logo-light.webp) center / contain no-repeat;
  background: linear-gradient(115deg, transparent 42%, rgba(var(--light-rgb), .9) 50%, transparent 58%); background-size: 300% 100%; background-position: 120% 0;
  animation: glint 7s ease-in-out infinite 2s; }
@keyframes glint { 0% { background-position: 120% 0; } 40%, 100% { background-position: -20% 0; } }
.hero-rise { animation: rise 1s cubic-bezier(.2,.7,.2,1) both; }
.hero-rise.d0 { animation-delay: .25s; } .hero-rise.d1 { animation-delay: .35s; } .hero-rise.d2 { animation-delay: .45s; } .hero-rise.d3 { animation-delay: .55s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* Stats */
.stats { position: relative; margin-top: -80px; z-index: 2; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 18px; display: flex; flex-direction: column; align-items: flex-start; }
.shamseh { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(var(--light-rgb), .1); color: var(--light); }
.shamseh svg.bg { display: none; }
.shamseh .icon { width: 22px; height: 22px; }
.stat strong { font-family: var(--font-kufi); font-size: 30px; margin-top: 12px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat h3 { font-size: 14px; font-weight: 500; color: var(--muted); }
.stat p { display: none; }

/* Sections */
.folio { background: none; }
.section { margin-top: 88px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.section-title { font-family: var(--font-kufi); font-size: 24px; font-weight: 700; }
.section-hint { color: var(--muted); font-size: 14px; margin-top: 2px; }
.row-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 18px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.row-scroll > * { scroll-snap-align: start; }
.tazhib { display: none; }

/* Course card */
.course { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .25s, transform .25s; }
.course:hover { border-color: rgba(var(--light-rgb), .45); transform: translateY(-3px); }
.cover { position: relative; aspect-ratio: 16 / 10; max-width: 100%; display: grid; place-items: center; overflow: hidden; }
.cover .arch { display: none; }
.cover b { font-family: var(--font-naskh); font-weight: 700; font-size: 38px; color: var(--ink); opacity: .92; }
.badge { position: absolute; top: 12px; inset-inline-start: 12px; background: rgba(10,20,17,.7); color: var(--ink); font-size: 12px; padding: 2px 10px; border-radius: 999px; display: inline-flex; gap: 5px; align-items: center; backdrop-filter: blur(4px); }
.badge .icon { width: 13px; height: 13px; color: var(--light); }
.badge.ended { inset-inline-start: auto; inset-inline-end: 12px; }
.course-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.teacher { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: var(--ink); flex: none; }
.course h3 { font-size: 16px; font-weight: 700; line-height: 1.75; margin-top: 10px; }
.course h3 a:hover { color: var(--light); }
.course .cat { font-size: 13px; color: var(--muted); }
.course .cat a { color: var(--light); }
.stars { display: flex; gap: 2px; color: var(--light); margin-top: 6px; font-size: 12px; align-items: center; }
.stars span { color: var(--muted); margin-inline-start: 6px; }
.meta { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.meta div { display: flex; align-items: center; gap: 5px; }
.meta .icon { width: 15px; height: 15px; }
.meta i { width: 1px; height: 14px; background: var(--line); }
.price { padding-top: 12px; margin-top: 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.price b { color: var(--emerald); }
.price a { color: var(--muted); font-size: 13px; }
.price a:hover { color: var(--light); }

/* Teachers */
.teachers { grid-auto-columns: minmax(180px, 1fr); }
.teacher-card { text-align: center; display: flex; flex-direction: column; align-items: center; padding: 22px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; transition: border-color .25s; }
.teacher-card:hover { border-color: rgba(var(--light-rgb), .45); }
.portrait { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; }
.portrait b { font-family: var(--font-naskh); font-size: 38px; color: var(--ink); }
.teacher-card h3 { font-size: 15px; font-weight: 700; margin-top: 14px; }
.teacher-card p { font-size: 13px; color: var(--muted); }
.teacher-card .count { margin-top: 8px; font-size: 12px; color: var(--light); }

/* Banner */
.cine { border-radius: 20px; padding: 36px 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: radial-gradient(500px 260px at 90% 50%, rgba(var(--light-rgb), .14), transparent 70%), var(--surface); border: 1px solid var(--line); }
.cine .eyebrow { color: var(--light); font-size: 13px; }
.cine h2 { font-family: var(--font-kufi); font-size: 26px; margin-top: 4px; }
.cine p { color: var(--muted); margin-top: 4px; }
.countdown { display: flex; gap: 10px; margin-top: 16px; }
.countdown span { min-width: 60px; text-align: center; border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px; font-size: 12px; color: var(--muted); }
.countdown b { display: block; font-family: var(--font-kufi); font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Departments */
.dept { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 18px; display: flex; flex-direction: column; align-items: flex-start; transition: border-color .25s; }
.dept:hover { border-color: rgba(var(--light-rgb), .45); }
.seal { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(var(--light-rgb), .1); color: var(--light); }
.seal .icon { width: 22px; height: 22px; }
.dept h3 { font-size: 15px; font-weight: 700; margin-top: 14px; }
.dept p { font-size: 13px; color: var(--muted); }
.dept span { margin-top: 10px; font-size: 12px; color: var(--light); }

/* Testimonials */
.quote { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.quote blockquote { margin: 0; font-size: 14px; line-height: 2.05; color: var(--ink); }
.quote footer { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.quote footer strong { display: block; }
.quote footer small { color: var(--muted); }

/* Become a teacher */
.become { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 40px; }
.become h2 { font-family: var(--font-kufi); font-size: 32px; }
.become p { color: var(--muted); margin-top: 8px; max-width: 52ch; }
.become .actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.become-art { min-height: 200px; border-radius: 16px; display: grid; place-items: center; background: radial-gradient(circle, rgba(var(--light-rgb), .16), transparent 70%); }
.become-art b { font-family: var(--font-naskh); font-size: 54px; color: var(--light); }
.become-card { display: none; }

/* Newsletter */
.newsletter { border-radius: 20px; padding: 32px 40px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); }
.newsletter h2 { font-family: var(--font-kufi); font-size: 22px; }
.newsletter p { color: var(--muted); margin-top: 2px; font-size: 14px; }
.newsletter form { display: flex; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 5px; flex: 1; max-width: 420px; min-width: 0; }
.newsletter input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 6px 14px; font: 14px var(--font-body); color: var(--ink); background: transparent; }

/* Footer */
footer.site { margin-top: 90px; border-top: 1px solid var(--line); background: var(--bg-2); color: var(--muted); }
footer.site .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-block: 44px 34px; }
footer.site h4 { color: var(--ink); font-size: 15px; margin: 0 0 12px; }
footer.site ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14px; }
footer.site a:hover { color: var(--light); }
.f-brand { display: flex; gap: 14px; align-items: center; }
.f-brand img { height: 76px; width: auto; }
.f-brand strong { font-family: var(--font-kufi); color: var(--ink); font-size: 17px; line-height: 1.5; }
footer.site .about { font-size: 14px; line-height: 2; margin-top: 14px; }
.social { display: flex; gap: 8px; margin-top: 16px; }
.social a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: border-color .2s, color .2s; }
.social a:hover { border-color: var(--light); color: var(--light); }
.copy { border-top: 1px solid var(--line); padding-block: 16px; font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 980px) {
  .nav-main, .nav-cta { display: none; }
  .burger { display: inline-flex; margin-inline-start: auto; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding-block: 40px 130px; gap: 28px; }
  .hero-inner > div:first-child { order: 2; }
  .search, .hero-lead { margin-inline: auto; }
  .hero-tags { justify-content: center; }
  .hero-logo { width: min(200px, 56%); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .become { grid-template-columns: 1fr; padding: 28px; }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .topbar-links, .brand small { display: none; }
  .brand-logo { height: 46px; }
  .stats-grid { gap: 10px; }
  .cine, .newsletter { padding: 26px 22px; }
  footer.site .cols { grid-template-columns: 1fr; }
  .section { margin-top: 64px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ===== Palette: indigo, lavender and dusty rose =====
   Lavender-white pages, deep indigo ink, lavender and dusty-rose accents — calm, dignified and light.
   Miniature is kept to a few quiet touches: a tiled iwan niche behind the logo, a double-ruled page frame, and girih tiles on course covers. */
:root {
  --bg: #f7f5fb; --bg-2: #eeeaf7; --surface: #ffffff; --surface-2: #f3f0fa; --line: #e3ddf1;
  --ink: #241f3a; --muted: #6f6a86;
  --emerald: #4b3f8f; --emerald-2: #3a307a;      /* indigo — buttons and links */
  --light: #4b3f8f; --light-rgb: 75, 63, 143;
  --turq: #9b8ad1; --brick: #c0718a;
  color-scheme: light;
}
.btn-tile, .btn-gold { color: #ffffff; }
.btn-tile:hover, .btn-gold:hover { background: var(--emerald-2); }
.proto-note { background: var(--bg-2); }
.topbar { background: var(--surface); }
.navbar { background: rgba(255,255,255,.94); }
.navbar::after { content: ""; position: absolute; inset-inline: 0; bottom: -4px; height: 3px; background: repeating-linear-gradient(90deg, var(--brick) 0 14px, var(--turq) 14px 28px); opacity: .55; }
.cats-menu { box-shadow: 0 20px 40px -24px rgba(36,31,58,.45); }
.badge { background: rgba(255,255,255,.92); color: var(--ink); }
.cover b, .portrait b { color: #ffffff; }
.avatar { color: #ffffff; }
.section-title { color: var(--ink); }
.section-title::before { content: ""; display: inline-block; width: 18px; height: 18px; margin-inline-end: 10px; vertical-align: -2px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1l3 8 8 3-8 3-3 8-3-8-8-3 8-3z' fill='%239b8ad1'/%3E%3Ccircle cx='12' cy='12' r='3' fill='%23c0718a'/%3E%3C/svg%3E") center/contain no-repeat; }
.stars { color: var(--brick); }
.price b { color: var(--emerald); }
.hero-tags a { background: var(--surface); }

/* Hero: a parchment page with a double-ruled frame */
.hero { background: radial-gradient(520px 420px at 27% 50%, rgba(155,138,209,.12), transparent 70%), var(--bg); }
.hero::before { content: ""; position: absolute; inset: 16px; z-index: 0; pointer-events: none; border: 1px solid rgba(192,113,138,.45); outline: 1px solid rgba(75,63,143,.3); outline-offset: -7px; }
.hero h1 { color: var(--ink); }
.hero h1 em { color: var(--emerald); }
.ayah { color: var(--brick); }
.hero-lead { color: var(--muted); }
#dust { display: none; }

/* Tiled iwan niche behind the logo */
.hero-logo { width: min(300px, 100%); }
.hero-logo .halo { display: none; }
.hero-logo .niche { position: absolute; left: 50%; top: 50%; width: 150%; height: 118%; transform: translate(-50%, -50%); z-index: -1; overflow: visible; }
.niche .tiles { animation: tiles 9s ease-in-out infinite; }
@keyframes tiles { 50% { opacity: .55; } }
.logo-float img { filter: drop-shadow(0 14px 22px rgba(75,63,143,.25)); }
.glint { -webkit-mask-image: url(logo-indigo.webp); mask-image: url(logo-indigo.webp); background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.85) 50%, transparent 58%); background-size: 300% 100%; }

/* Course covers: girih tilework */
.cover::before { content: ""; position: absolute; inset: 0; opacity: .3; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1'%3E%3Cpath d='M24 3l6 15 15 6-15 6-6 15-6-15L3 24l15-6z'/%3E%3Cpath d='M24 13l11 11-11 11-11-11z'/%3E%3C/g%3E%3C/svg%3E"); }
.cover::after { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(255,255,255,.45); pointer-events: none; }
.cover b { position: relative; }

/* Teachers and departments: arch frames */
.portrait { width: 96px; height: 120px; border-radius: 48px 48px 10px 10px; box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px rgba(192,113,138,.5); }
.seal { background: rgba(155,138,209,.14); color: var(--emerald); }
.shamseh { background: rgba(155,138,209,.14); color: var(--emerald); }
.become-art b, .cine .eyebrow, .teacher-card .count, .dept span, .course .cat a { color: var(--brick); }
.cine { background: radial-gradient(500px 260px at 90% 50%, rgba(155,138,209,.14), transparent 70%), var(--surface); }
.become-art { background: radial-gradient(circle, rgba(155,138,209,.16), transparent 70%); }
footer.site { background: var(--bg-2); border-top: 3px solid transparent; border-image: repeating-linear-gradient(90deg, var(--brick) 0 14px, var(--turq) 14px 28px) 3; }

/* Behind the logo: a quiet arch echoing the logo's own frame — two hairlines that draw themselves in, a soft inner light and girih tiles that fade toward the edges, crossed now and then by a slow band of light */
.hero-logo .arch-bg { width: 135%; height: auto; aspect-ratio: 400 / 520; max-width: 135vw; top: 47%; }
.arch-bg .ab-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.6s cubic-bezier(.6,.1,.2,1) .2s forwards; }
.arch-bg .ab-line.l2 { animation-delay: .5s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.arch-bg .ab-tip { opacity: 0; animation: fadein 1s ease 2.4s forwards; }
.arch-bg .ab-pattern { opacity: 0; animation: fadein 2.4s ease .8s forwards; }
@keyframes fadein { to { opacity: .28; } }
.arch-bg .ab-tip { animation-name: tipin; } @keyframes tipin { to { opacity: 1; } }
.arch-bg .ab-light { animation: glow 8s ease-in-out infinite; }
@keyframes glow { 50% { opacity: .7; } }
.arch-bg .ab-sweep { animation: sweep 9s ease-in-out 3s infinite; }
@keyframes sweep { 0% { transform: translateX(0); } 55%, 100% { transform: translateX(720px); } }
.logo-float img { filter: drop-shadow(0 16px 24px rgba(75,63,143,.22)); }
@media (prefers-reduced-motion: reduce) { .arch-bg .ab-line { stroke-dashoffset: 0; } .arch-bg .ab-pattern { opacity: .28; } .arch-bg .ab-tip { opacity: 1; } }

/* ======================================================================
   Inner pages: instructors, instructor profile, courses, course, student panel
   ====================================================================== */
.nav-main > a.is-active { color: var(--emerald); background: var(--surface-2); font-weight: 600; }
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-head::after { content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none; background: 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='M24 3l6 15 15 6-15 6-6 15-6-15L3 24l15-6z' fill='none' stroke='%239b8ad1' stroke-opacity='.25'/%3E%3C/svg%3E"); -webkit-mask-image: linear-gradient(90deg, #000, transparent 60%); mask-image: linear-gradient(90deg, #000, transparent 60%); }
.page-head .container { position: relative; z-index: 1; padding-block: 28px 30px; }
.crumbs { display: flex; gap: 6px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.crumbs a:hover { color: var(--emerald); }
.page-head h1 { font-family: var(--font-kufi); font-size: clamp(26px, 3.4vw, 36px); margin-top: 8px; }
.page-head .lead { color: var(--muted); margin-top: 4px; }
.count-pill { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: 10px; font: 600 13px var(--font-body); color: var(--emerald); background: rgba(var(--light-rgb), .08); border-radius: 999px; padding: 2px 12px; vertical-align: middle; }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-top: 24px; }
.toolbar .group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.field { display: flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; min-width: 0; }
.field input, .field select { border: 0; outline: 0; background: transparent; font: 14px var(--font-body); color: var(--ink); min-width: 0; }
.field input { width: 200px; max-width: 100%; }
.field:focus-within { border-color: var(--emerald); }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 5px 14px; font: 500 13px var(--font-body); cursor: pointer; transition: all .2s; }
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--emerald); border-color: var(--emerald); color: #fff; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.switch input { appearance: none; width: 34px; height: 20px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: inset-inline-start .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked { background: var(--emerald); }
.switch input:checked::after { inset-inline-start: 17px; }
.label-sm { font-size: 13px; color: var(--muted); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.more { display: flex; justify-content: center; margin-top: 28px; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; border: 1px dashed var(--line); border-radius: 14px; background: var(--surface); }
.stars { display: inline-flex; gap: 1px; color: var(--brick); font-size: 13px; align-items: center; }
.stars > span { color: var(--muted); margin-inline-start: 6px; font-size: 12px; }

/* Instructor card */
.ins-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px 18px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; transition: transform .25s, box-shadow .25s; }
.ins-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -24px rgba(var(--light-rgb), .6); }
.arch-photo { width: 104px; height: 128px; border-radius: 52px 52px 12px 12px; display: grid; place-items: center; font-family: var(--font-naskh); font-size: 42px; color: #fff; box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px rgba(192,113,138,.5); }
.ins-card h3 { font-size: 15.5px; margin-top: 16px; }
.ins-card .role { font-size: 13px; color: var(--muted); }
.ins-card .stars { margin-top: 6px; }
.ins-stats { display: flex; gap: 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.ins-stats span { display: inline-flex; align-items: center; gap: 4px; }
.ins-stats .icon { width: 14px; height: 14px; color: var(--emerald); }
.skills { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.skills span { font-size: 12px; background: rgba(var(--light-rgb), .07); color: var(--emerald); padding: 2px 10px; border-radius: 999px; }
.ins-card .btn { margin-top: 16px; width: 100%; }
.online-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #2f9e6f; margin-top: 8px; }
.online-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #2f9e6f; box-shadow: 0 0 0 3px rgba(47,158,111,.18); }

/* Instructor profile */
.profile-cover { height: 180px; background: linear-gradient(120deg, #4b3f8f, #7c6cc4 55%, #c0718a); position: relative; overflow: hidden; }
.profile-cover::after { content: ""; position: absolute; inset: 0; opacity: .25; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 3l7 20 20 7-20 7-7 20-7-20L3 30l20-7z' fill='none' stroke='%23fff'/%3E%3C/svg%3E"); }
.profile-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; margin-top: -70px; position: relative; z-index: 1; padding: 0 28px 24px; display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: end; }
.profile-card .arch-photo { width: 140px; height: 172px; border-radius: 70px 70px 16px 16px; font-size: 60px; margin-top: -40px; box-shadow: 0 0 0 5px var(--surface), 0 0 0 6px rgba(192,113,138,.5), 0 20px 40px -20px rgba(var(--light-rgb), .6); }
.profile-card h1 { font-family: var(--font-kufi); font-size: 28px; }
.profile-card .role { color: var(--muted); }
.p-stats { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 12px; }
.p-stats div { display: flex; flex-direction: column; }
.p-stats b { font-family: var(--font-kufi); font-size: 22px; color: var(--emerald); line-height: 1.2; font-variant-numeric: tabular-nums; }
.p-stats small { color: var(--muted); font-size: 12.5px; }
.p-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 6px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 32px; overflow-x: auto; }
.tabs button { border: 0; background: none; font: 600 14.5px var(--font-body); color: var(--muted); padding: 12px 16px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--emerald); border-bottom-color: var(--emerald); }
.tab-body { padding-top: 24px; }
.prose { max-width: 70ch; line-height: 2.1; }
.prose h3 { font-size: 16px; margin: 20px 0 8px; }
.prose ul { padding-inline-start: 20px; margin: 0; }
.badges { display: flex; flex-wrap: wrap; gap: 14px; }
.badge-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.badge-card .seal { width: 44px; height: 44px; border-radius: 12px; }
.badge-card strong { display: block; font-size: 14px; }
.badge-card small { color: var(--muted); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; max-width: 760px; }
.slot { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 10px; text-align: center; font-size: 13px; cursor: pointer; transition: all .2s; }
.slot b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.slot:hover, .slot[aria-pressed="true"] { border-color: var(--emerald); color: var(--emerald); background: rgba(var(--light-rgb), .05); }
.slot.full { opacity: .45; cursor: not-allowed; }
dialog.sheet { border: 0; border-radius: 18px; padding: 0; width: min(480px, calc(100% - 32px)); box-shadow: 0 30px 60px -20px rgba(36,31,58,.5); color: var(--ink); background: var(--surface); }
dialog.sheet::backdrop { background: rgba(36,31,58,.45); }
.sheet form { padding: 24px; display: grid; gap: 12px; }
.sheet h2 { font-family: var(--font-kufi); font-size: 20px; }
.sheet label { font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.sheet input, .sheet textarea { font: 14px var(--font-body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.sheet .row { display: flex; gap: 8px; justify-content: flex-end; }

/* Courses listing */
.with-side { display: grid; grid-template-columns: 270px 1fr; gap: 24px; align-items: start; margin-top: 24px; }
.side { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; position: sticky; top: 100px; display: grid; gap: 18px; }
.side h3 { font-size: 14px; margin-bottom: 8px; }
.side fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.side legend { font-weight: 700; font-size: 14px; margin-bottom: 8px; padding: 0; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { accent-color: var(--emerald); width: 16px; height: 16px; }
.check small { margin-inline-start: auto; color: var(--muted); font-size: 12px; }
.side hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.view-toggle button { border: 0; background: var(--surface); color: var(--muted); padding: 6px 10px; cursor: pointer; display: grid; place-items: center; }
.view-toggle button[aria-pressed="true"] { background: var(--emerald); color: #fff; }
.results.is-list { grid-template-columns: 1fr; }
.results.is-list .course { flex-direction: row; }
.results.is-list .cover { width: 240px; flex: none; aspect-ratio: auto; min-height: 170px; }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 30px; }
.pager a, .pager span { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-variant-numeric: tabular-nums; }
.pager a[aria-current] { background: var(--emerald); color: #fff; border-color: var(--emerald); }
.pager span { border: 0; background: none; }
.result-count { font-size: 13.5px; color: var(--muted); }

/* Course page */
.course-hero { background: linear-gradient(120deg, #3a307a, #5a4ea3 55%, #8f4a61); color: #fff; position: relative; overflow: hidden; }
.course-hero::after { content: ""; position: absolute; inset: 0; opacity: .14; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 3l7 20 20 7-20 7-7 20-7-20L3 30l20-7z' fill='none' stroke='%23fff'/%3E%3C/svg%3E"); pointer-events: none; }
.course-hero .container { position: relative; z-index: 1; padding-block: 30px 90px; }
.course-hero .crumbs { color: rgba(255,255,255,.75); }
.course-hero .crumbs a:hover { color: #fff; }
.course-hero h1 { font-family: var(--font-kufi); font-size: clamp(26px, 3.6vw, 40px); margin-top: 10px; max-width: 24ch; }
.course-hero .sub { color: rgba(255,255,255,.85); margin-top: 8px; max-width: 60ch; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; align-items: center; font-size: 14px; }
.hero-meta .stars, .hero-meta .stars > span { color: #ffd6e2; }
.hero-meta a { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.6); }
.tag-light { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 2px 12px; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.tag-light .icon { width: 14px; height: 14px; }
.course-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; margin-top: -64px; position: relative; z-index: 2; }
.player { aspect-ratio: 16 / 9; max-width: 100%; border-radius: 18px; overflow: hidden; position: relative; display: grid; place-items: center; background: linear-gradient(160deg, #5a4ea3, #3a307a); box-shadow: 0 30px 60px -30px rgba(36,31,58,.6); }
.player::before { content: ""; position: absolute; inset: 0; opacity: .2; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%23fff'%3E%3Cpath d='M24 3l6 15 15 6-15 6-6 15-6-15L3 24l15-6z'/%3E%3Cpath d='M24 13l11 11-11 11-11-11z'/%3E%3C/g%3E%3C/svg%3E"); }
.player b { position: absolute; top: 18%; font-family: var(--font-naskh); font-size: clamp(40px, 7vw, 72px); color: #fff; opacity: .9; }
.play-btn { position: relative; width: 76px; height: 76px; border-radius: 50%; border: 0; background: #fff; color: var(--emerald); display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 0 10px rgba(255,255,255,.18); transition: transform .2s; margin-top: 18%; }
.play-btn:hover { transform: scale(1.06); }
.play-btn .icon { width: 30px; height: 30px; fill: currentColor; margin-inline-start: -4px; }
.player .now { position: absolute; bottom: 14px; inset-inline: 16px; display: flex; justify-content: space-between; color: #fff; font-size: 13px; }
.learn-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; list-style: none; padding: 0; margin: 0; }
.learn-list li { display: flex; gap: 8px; }
.learn-list li::before { content: "✓"; color: var(--emerald); font-weight: 700; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; }
.box + .box { margin-top: 18px; }
.box h2 { font-family: var(--font-kufi); font-size: 19px; margin-bottom: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags a { font-size: 12.5px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; color: var(--muted); }
.tags a:hover { border-color: var(--emerald); color: var(--emerald); }
.chapter { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.chapter + .chapter { margin-top: 10px; }
.chapter summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; font-weight: 700; }
.chapter summary::-webkit-details-marker { display: none; }
.chapter summary .num { width: 30px; height: 30px; border-radius: 9px; background: rgba(var(--light-rgb), .08); color: var(--emerald); display: grid; place-items: center; font-size: 13px; flex: none; }
.chapter summary small { margin-inline-start: auto; color: var(--muted); font-weight: 400; font-size: 12.5px; }
.chapter summary::after { content: "▾"; color: var(--muted); transition: transform .2s; }
.chapter[open] summary::after { transform: rotate(180deg); }
.lesson { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.lesson .ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--emerald); flex: none; }
.lesson .ico .icon { width: 16px; height: 16px; }
.lesson .ttl { flex: 1; min-width: 0; }
.lesson .ttl small { display: block; color: var(--muted); font-size: 12px; }
.lesson .free { font-size: 11.5px; color: #2f9e6f; background: rgba(47,158,111,.1); padding: 1px 8px; border-radius: 999px; }
.lesson .act { font-size: 13px; color: var(--emerald); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.lesson .act .icon { width: 15px; height: 15px; }
.lesson.locked .act { color: var(--muted); }
.lesson.done .ico { background: var(--emerald); color: #fff; }
.rating-sum { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.rating-big { text-align: center; }
.rating-big b { font-family: var(--font-kufi); font-size: 44px; color: var(--emerald); display: block; line-height: 1.1; }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 48px 1fr 36px; gap: 10px; align-items: center; font-size: 12.5px; color: var(--muted); }
.bar i { display: block; height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.bar i::before { content: ""; display: block; height: 100%; width: var(--w); background: var(--brick); border-radius: 99px; }
.review { display: flex; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.review:first-of-type { border-top: 0; }
.review strong { font-size: 14px; }
.review small { color: var(--muted); font-size: 12px; margin-inline-start: 8px; }
.review p { font-size: 14px; margin-top: 4px; }
.buy { position: sticky; top: 100px; display: grid; gap: 16px; }
.buy-box { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: 0 24px 48px -32px rgba(var(--light-rgb), .7); }
.buy-box .price-big { font-family: var(--font-kufi); font-size: 30px; color: #2f9e6f; }
.buy-box .btn { width: 100%; margin-top: 12px; padding-block: 12px; font-size: 15px; }
.specs { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 0; }
.specs li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px dashed var(--line); font-size: 13.5px; }
.specs li .icon { width: 17px; height: 17px; color: var(--emerald); }
.specs li span { color: var(--muted); }
.specs li b { margin-inline-start: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.mini-ins { display: flex; gap: 14px; align-items: center; }
.mini-ins .arch-photo { width: 64px; height: 78px; font-size: 28px; border-radius: 32px 32px 8px 8px; flex: none; }
.mini-ins strong { display: block; }
.mini-ins small { color: var(--muted); }
.share { display: flex; gap: 8px; }
.share a { flex: 1; text-align: center; border: 1px solid var(--line); border-radius: 10px; padding: 6px; font-size: 13px; color: var(--muted); }
.share a:hover { border-color: var(--emerald); color: var(--emerald); }

/* Student panel */
.panel-wrap { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; margin-top: 28px; }
.panel-nav { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 12px; position: sticky; top: 100px; }
.me { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 6px 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.me .arch-photo { width: 76px; height: 92px; font-size: 32px; border-radius: 38px 38px 10px 10px; }
.me strong { margin-top: 10px; }
.me small { color: var(--muted); }
.panel-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 14px; color: var(--muted); }
.panel-nav a:hover { background: var(--surface-2); color: var(--ink); }
.panel-nav a.is-active { background: rgba(var(--light-rgb), .08); color: var(--emerald); font-weight: 600; }
.panel-nav a .icon { width: 17px; height: 17px; }
.panel-nav a .n { margin-inline-start: auto; font-size: 11px; background: var(--brick); color: #fff; border-radius: 999px; padding: 0 7px; }
.welcome { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: linear-gradient(120deg, #4b3f8f, #7c6cc4 60%, #c0718a); color: #fff; border-radius: 18px; padding: 24px 26px; position: relative; overflow: hidden; }
.welcome::after { content: ""; position: absolute; inset: 0; opacity: .18; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 3l7 20 20 7-20 7-7 20-7-20L3 30l20-7z' fill='none' stroke='%23fff'/%3E%3C/svg%3E"); pointer-events: none; }
.welcome h1 { font-family: var(--font-kufi); font-size: 24px; }
.welcome p { opacity: .9; font-size: 14px; }
.welcome .btn { background: #fff; color: var(--emerald); position: relative; z-index: 1; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; gap: 12px; align-items: center; }
.kpi .seal { width: 44px; height: 44px; border-radius: 12px; flex: none; }
.kpi b { font-family: var(--font-kufi); font-size: 24px; display: block; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: 12.5px; }
.panel-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-top: 18px; }
.panel-grid .box h2 { display: flex; justify-content: space-between; align-items: center; }
.panel-grid .box h2 a { font: 500 13px var(--font-body); color: var(--emerald); }
.progress-row { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.progress-row:first-of-type { border-top: 0; padding-top: 0; }
.thumb { width: 64px; height: 48px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-naskh); color: #fff; font-size: 15px; flex: none; }
.progress-row .info { flex: 1; min-width: 0; }
.progress-row .info strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-row .info small { color: var(--muted); font-size: 12px; }
.prog { height: 7px; background: var(--bg-2); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.prog i { display: block; height: 100%; width: var(--p); background: linear-gradient(90deg, var(--emerald), #9b8ad1); border-radius: 99px; }
.pct { font-size: 12.5px; font-weight: 700; color: var(--emerald); font-variant-numeric: tabular-nums; min-width: 38px; text-align: end; }
.event { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: center; }
.event:first-of-type { border-top: 0; padding-top: 0; }
.date-tile { width: 52px; text-align: center; border-radius: 12px; background: rgba(var(--light-rgb), .08); color: var(--emerald); padding: 6px 0; flex: none; line-height: 1.3; }
.date-tile b { display: block; font-family: var(--font-kufi); font-size: 20px; }
.date-tile small { font-size: 11px; }
.event .info { flex: 1; min-width: 0; font-size: 14px; }
.event .info small { display: block; color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 520px; }
table.data th { text-align: start; color: var(--muted); font-weight: 500; font-size: 12.5px; padding: 0 10px 10px; }
table.data td { padding: 11px 10px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.status { font-size: 12px; border-radius: 999px; padding: 2px 10px; font-weight: 600; }
.status.ok { background: rgba(47,158,111,.12); color: #23865b; }
.status.no { background: rgba(192,113,138,.14); color: #a24a66; }
.status.wait { background: rgba(var(--light-rgb), .08); color: var(--emerald); }
.certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.cert { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: linear-gradient(160deg, var(--surface), var(--surface-2)); position: relative; }
.cert::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(192,113,138,.35); border-radius: 10px; pointer-events: none; }
.cert .icon { width: 26px; height: 26px; color: var(--brick); }
.cert strong { display: block; font-size: 14px; margin-top: 6px; }
.cert small { color: var(--muted); font-size: 12px; }
.note { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.note:first-of-type { border-top: 0; padding-top: 0; }
.note .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brick); margin-top: 8px; flex: none; }
.note small { display: block; color: var(--muted); font-size: 12px; }

@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .course-layout { grid-template-columns: 1fr; margin-top: -48px; }
  .buy { position: static; }
  .panel-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .with-side, .panel-wrap { grid-template-columns: 1fr; }
  .side, .panel-nav { position: static; }
  .panel-nav { display: flex; overflow-x: auto; gap: 4px; padding: 8px; }
  .panel-nav .me { display: none; }
  .panel-nav a { white-space: nowrap; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .profile-card { grid-template-columns: 1fr; justify-items: center; text-align: center; align-items: center; }
  .p-stats, .p-actions { justify-content: center; }
  .results.is-list .course { flex-direction: column; }
  .results.is-list .cover { width: 100%; min-height: 0; aspect-ratio: 16 / 10; }
  .learn-list { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .field input { width: 140px; }
  .rating-sum { grid-template-columns: 1fr; }
}

/* Hide a dashboard until the server confirms the visitor may see it */
.checking main, .checking .panel-wrap { visibility: hidden; }

/* ===== Laravel app additions ===== */
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.linkish:hover { color: var(--emerald); }
.flash { margin: 16px 0 0; padding: 10px 14px; border-radius: 12px; font-size: 14px; border: 1px solid var(--line); background: var(--surface); }
.flash-ok { border-color: rgba(47,158,111,.4); color: #23865b; background: rgba(47,158,111,.07); }
.flash-bad { border-color: rgba(192,113,138,.45); color: #a24a66; background: rgba(192,113,138,.08); }
.mobile-menu { display: none; position: relative; margin-inline-start: auto; }
.mobile-menu > summary { list-style: none; }
.mobile-menu > summary::-webkit-details-marker { display: none; }
.mobile-panel { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px; display: grid; min-width: 200px; z-index: 40; box-shadow: 0 20px 40px -24px rgba(36,31,58,.45); }
.mobile-panel a { padding: 9px 12px; border-radius: 8px; }
.mobile-panel a:hover { background: var(--surface-2); }
@media (max-width: 980px) { .mobile-menu { display: block; } .navbar .burger { display: inline-flex; } }

/* public pages */
.glint { -webkit-mask-image: url(../images/logo-indigo.webp); mask-image: url(../images/logo-indigo.webp); }
.stars > .glyphs { font-style: normal; color: inherit; letter-spacing: 1px; }
.empty p { margin: 0; }
a.chip { display: inline-block; text-decoration: none; }
a.chip[aria-current="true"] { background: var(--emerald); border-color: var(--emerald); color: #fff; }
.arch-photo, .portrait { overflow: hidden; }
.arch-photo img, .portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover.has-photo::before { display: none; }
.cover.has-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover .badge { z-index: 1; }
.player.has-media { background: #000; }
.player.has-media::before { display: none; }
.player.has-media iframe, .player.has-media video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-caption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.player-audio { display: block; width: 100%; margin-top: 12px; }
a.play-btn { text-decoration: none; }
.preview-note { background: #fff4d6; color: #6b4f00; text-align: center; padding: 8px 16px; font-size: 14px; font-weight: 600; border-bottom: 1px solid #f0d68a; }
.buy-title { font-family: var(--font-kufi); font-size: 17px; margin: 0 0 12px; }
.buy-note { font-size: 13px; color: var(--muted); margin-top: 12px; line-height: 1.9; }
.buy-note a { color: var(--emerald); font-weight: 600; }
.buy-box form { margin: 0; }
.review-reply { margin-top: 8px !important; background: var(--surface-2); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; }
.review-form { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.review-form select, .review-form textarea { font: 14px var(--font-body); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; background: var(--bg); color: var(--ink); max-width: 100%; }
.review-form select { justify-self: start; }
.profile-card .crumbs { padding-top: 14px; }
.profile-card .role .stars { vertical-align: middle; margin-inline-start: 6px; }
@media (max-width: 560px) {
  .lesson { flex-wrap: wrap; }
  .lesson .ttl { flex-basis: calc(100% - 44px); }
  .lesson .free, .lesson .act { margin-inline-start: 44px; }
  .results.is-list .course { flex-direction: column; }
  .become h2 { font-size: 26px; }
  .profile-card { padding: 0 18px 20px; }
}

/* Certificate: a manuscript page with a double-ruled frame */
.cert-page { margin-top: 28px; }
.cert-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.cert-verified { display: inline-flex; gap: 8px; align-items: center; color: #23865b; font-size: 14px; }
.manuscript { position: relative; max-width: 860px; margin: 0 auto; text-align: center; padding: 56px 48px 40px; background: radial-gradient(ellipse at 50% 30%, #fffdf7, #f8f2e4); color: var(--ink); border: 1px solid rgba(192,113,138,.55); outline: 1px solid rgba(75,63,143,.35); outline-offset: -12px; box-shadow: 0 30px 60px -36px rgba(36,31,58,.5); }
.manuscript::before { content: ""; position: absolute; inset: 22px; border: 1px solid rgba(155,138,209,.35); pointer-events: none; }
.manuscript-logo { height: 110px; width: auto; }
.manuscript-basmala { font-family: var(--font-naskh); font-size: 20px; color: var(--brick); margin-top: 10px; }
.manuscript h1 { font-family: var(--font-kufi); font-size: clamp(32px, 5vw, 48px); color: var(--emerald); margin-top: 6px; }
.manuscript-sub { color: var(--muted); font-size: 14px; }
.manuscript-text { font-size: 17px; line-height: 2.2; margin-top: 22px; max-width: 60ch; margin-inline: auto; }
.manuscript-name { font-family: var(--font-naskh); font-weight: 700; font-size: clamp(30px, 5vw, 44px); color: var(--ink); margin-top: 8px; border-bottom: 1px dashed rgba(192,113,138,.6); display: inline-block; padding: 0 24px 4px; }
.manuscript-meta { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; margin: 34px 0 0; }
.manuscript-meta div { display: grid; gap: 2px; }
.manuscript-meta dt { font-size: 12.5px; color: var(--muted); }
.manuscript-meta dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.manuscript-verify { margin-top: 26px; font-size: 12px; color: var(--muted); word-break: break-all; }
@media (max-width: 560px) { .manuscript { padding: 40px 22px 30px; } .manuscript::before { inset: 14px; } }
@media print {
  .topbar, .navbar, footer.site, .no-print, .flash, .sr { display: none !important; }
  body { background: #fff !important; }
  .cert-page { margin: 0; padding: 0; }
  .manuscript { box-shadow: none; max-width: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
