/* Thmanyah typeface — self-hosted, embedded for on-site rendering only
   (not offered as a downloadable asset), per font.thmanyah.com/licenses. */
@font-face {
  font-family: 'thmanyahSans';
  src: url('/fonts/thmanyah/sans/thmanyahsans-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'thmanyahSans';
  src: url('/fonts/thmanyah/sans/thmanyahsans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'thmanyahSans';
  src: url('/fonts/thmanyah/sans/thmanyahsans-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'thmanyahSans';
  src: url('/fonts/thmanyah/sans/thmanyahsans-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'thmanyahSerifDisplay';
  src: url('/fonts/thmanyah/serif-display/thmanyahserifdisplay-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'thmanyahSerifDisplay';
  src: url('/fonts/thmanyah/serif-display/thmanyahserifdisplay-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'thmanyahSerifDisplay';
  src: url('/fonts/thmanyah/serif-display/thmanyahserifdisplay-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'thmanyahSerifText';
  src: url('/fonts/thmanyah/serif-text/thmanyahseriftext-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'thmanyahSerifText';
  src: url('/fonts/thmanyah/serif-text/thmanyahseriftext-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Brand color is green, full stop — --primary used to be a blue/indigo
   that competed with --accent's green for "the site's color" (real user
   complaint: the wordmark was blue while everything else had drifted
   green). --primary now points at the exact same values as --accent —
   not just "the same family," genuinely identical — so any two
   components sitting side by side (e.g. the dashboard's header badges)
   never show two visibly different greens depending on which token they
   happened to use. Dark-mode surfaces also move from a navy-tinted
   near-black (chosen to complement the old blue primary) to a true,
   neutral near-black to suit the green-only identity. Light mode is
   unaffected (only asked for dark mode). */
:root {
  --bg: #050505;
  --surface: #111212;
  --surface-2: #181a19;
  --surface-3: #232625;
  --border: #262a28;
  --border-hover: #3a403d;
  --text: #f2f4f2;
  --text-dim: #a3aca8;
  --text-faint: #75807c;
  --accent: #34d1a5;
  --accent-strong: #1fb98d;
  --accent-soft: #34d1a522;
  --primary: var(--accent);
  --primary-strong: var(--accent-strong);
  --primary-soft: var(--accent-soft);
  --btn-green-text: #06231b;
  --warn: #f5b942;
  --warn-soft: #f5b94222;
  --danger: #f16d6d;
  --danger-soft: #f16d6d22;
  --info: #38bdf8;
  --info-soft: #38bdf822;
  /* Kept as a deliberate, scoped exception on #/updates only — "جامعة
     جديدة" entries need a color distinct from "ميزة جديدة"/"إطلاق" (both
     accent green) now that --primary is green too; violet is what used
     to differentiate them before the site-wide green rebrand. Not used
     anywhere else — never reintroduce it as a competing brand color. */
  --violet: #a78bfa;
  --violet-soft: #a78bfa22;
  --hero-glow: #12503c;
  --topbar-bg: #050505cc;
  --overlay-bg: rgba(4, 6, 5, 0.75);
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 2px 6px -2px rgba(0, 0, 0, 0.5), 0 24px 48px -20px rgba(0, 0, 0, 0.7);
  --dot: rgba(255, 255, 255, 0.05);
  --font-sans: 'thmanyahSans', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif;
  --font-display: 'thmanyahSerifDisplay', 'thmanyahSans', system-ui, serif;
  --font-serif: 'thmanyahSerifText', 'thmanyahSans', system-ui, serif;
  --font: var(--font-sans);
  color-scheme: dark;
}

:root[data-theme='light'] {
  --bg: #f8f7f3;
  --surface: #ffffff;
  --surface-2: #f2f1ea;
  --surface-3: #e9e7dc;
  --border: #e3e1d5;
  --border-hover: #cbc8b8;
  --text: #191c28;
  --text-dim: #565c74;
  --text-faint: #82869c;
  --accent: #0b8f6c;
  --accent-strong: #087a5c;
  --accent-soft: #0b8f6c1c;
  --primary: var(--accent);
  --primary-strong: var(--accent-strong);
  --primary-soft: var(--accent-soft);
  --btn-green-text: #eeeeee;
  --warn: #966109;
  --warn-soft: #9661091c;
  --danger: #c73b3b;
  --danger-soft: #c73b3b1c;
  --info: #0284c7;
  --info-soft: #0284c71c;
  --violet: #7c3aed;
  --violet-soft: #7c3aed1c;
  --hero-glow: #d7f0e6;
  --topbar-bg: #f8f7f3cc;
  --overlay-bg: rgba(20, 20, 16, 0.55);
  --shadow: 0 2px 6px -2px rgba(30, 30, 20, 0.08), 0 24px 48px -20px rgba(30, 30, 20, 0.16);
  --dot: rgba(10, 12, 20, 0.035);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 620px at 82% -12%, var(--hero-glow) 0%, transparent 62%),
    radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: auto, 26px 26px;
  background-repeat: no-repeat, repeat;
  background-position: 0 0, 0 0;
  color: var(--text);
  font-family: var(--font-sans);
  direction: rtl;
  min-height: 100vh;
  transition: background-color .2s ease, color .2s ease;
}

body.locale-en {
  direction: ltr;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: calc(100% - 40px);
  max-width: 1240px;
  margin: 14px auto 0;
  padding: 14px 26px;
  border: 1px solid var(--border);
  border-radius: 20px;
  position: sticky;
  top: 14px;
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.55);
  z-index: 20;
  transition: box-shadow .2s ease, border-color .2s ease;
}

/* Plain solid color, not a gradient text-clip: combining
   -webkit-background-clip:text with the topbar's backdrop-filter blur
   drops glyphs (notably Arabic "ي") on some Windows/Chromium GPU paths —
   a real rendering bug, not a design choice, so keep this simple. */
.brand {
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 20px;
  font-family: var(--font-display);
  letter-spacing: .2px;
  white-space: nowrap;
  color: var(--accent);
  /* Thmanyah's "connected letters" stylistic set — reserved for the site's
     own wordmark and big display headings (Hero, section titles), never
     regular body/UI text — see the same rule on .hero h1 / .section-head h2. */
  font-feature-settings: "ss01";
}

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav-links a,
.nav-links button {
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--text-dim);
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
}

.nav-links a:hover,
.nav-links button:hover {
  background: var(--surface-3);
  color: var(--text);
}

.nav-links a.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 16px;
  margin-inline-start: 6px;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.theme-toggle:hover {
  background: var(--surface-3);
  border-color: var(--border-hover);
  transform: rotate(-12deg);
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 90px;
  width: 100%;
  flex: 1;
}

.container-wide {
  max-width: 1280px;
}

.card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.pricing-card {
  border: 1px solid var(--accent);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: 0 24px 60px -24px var(--accent-soft), var(--shadow);
  position: relative;
  overflow: hidden;
  padding: 36px;
}

.pricing-card::before {
  content: '';
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 240px;
  background: radial-gradient(closest-side, var(--accent-soft), transparent);
  pointer-events: none;
}

/* Split "what you get" / "what it costs" — a feature case on one side, a
   distinct elevated buy box on the other, instead of one long centered
   stack (price, then a badge, then a checklist, then a button). */
.pricing-layout {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
  align-items: center;
}

.pricing-info {
  text-align: start;
  padding-inline-end: 32px;
}

.pricing-info h2 {
  font-size: 26px;
  margin: 10px 0 6px;
  font-feature-settings: "ss01";
}

.pricing-features {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.pricing-check {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.pricing-buy {
  text-align: center;
  padding: 28px 24px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.pricing-list-price {
  text-decoration: line-through;
  color: var(--text-faint);
  font-size: 18px;
}

.pricing-amount {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 700;
  line-height: 1.1;
  margin: 4px 0 14px;
}

/* When the admin sets the price to 0 SAR, "مجاني" (free) shouldn't read
   as just another price — a slow color/glow pulse marks it as a genuine
   moment, not a static number. */
.pricing-amount.is-free {
  color: var(--accent);
  animation: pricing-free-pulse 2.2s ease-in-out infinite;
}

@keyframes pricing-free-pulse {

  0%,
  100% {
    text-shadow: 0 0 0 transparent;
  }

  50% {
    text-shadow: 0 0 22px var(--accent-soft), 0 0 4px var(--accent-soft);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pricing-amount.is-free {
    animation: none;
    text-shadow: 0 0 18px var(--accent-soft);
  }
}

.pricing-buy .btn {
  width: 100%;
  margin-top: 20px;
}

.pricing-fine-print {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-faint);
}

.grid {
  display: grid;
  gap: 16px;
}

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

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.dashboard-layout {
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

/* ── Sidebar host: sticky + scrollable ───────────────────────────── */
#sidebar-host {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scroll-behavior: smooth;
}

/* ── Scrollbar: glassmorphism — shape & motion, no color ─────────── */
#sidebar-host::-webkit-scrollbar {
  width: 3px;
  transition: width 0.3s ease;
}

#sidebar-host:hover::-webkit-scrollbar {
  width: 6px;
}

#sidebar-host::-webkit-scrollbar-track {
  background: transparent;
  margin: 6px 0;
}

#sidebar-host::-webkit-scrollbar-thumb {
  background: rgba(128, 128, 128, 0.18);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
  transition: background 0.25s ease, border-color 0.25s ease;
}

#sidebar-host::-webkit-scrollbar-thumb:hover {
  background: rgba(128, 128, 128, 0.38);
  border-color: rgba(255, 255, 255, 0.18);
}

#sidebar-host::-webkit-scrollbar-thumb:active {
  background: rgba(128, 128, 128, 0.55);
}

/* Firefox */
#sidebar-host {
  scrollbar-width: thin;
  scrollbar-color: rgba(128, 128, 128, 0.25) transparent;
}

/* ──────────────────────────────────────────────────────────────────── */

/* Candidate schedules (auto-builder results) — each mini-timetable needs
   real width to stay readable, so they scroll horizontally side by side
   instead of being squeezed into equal-width grid columns. */
.candidates-scroll {
  overflow-x: auto;
  padding-bottom: 10px;
  margin: 0 -4px;
}

.candidates-row {
  display: flex;
  gap: 16px;
  padding: 0 4px;
}

.candidates-row>.card {
  flex: 0 0 min(560px, 92vw);
}

.candidates-scroll::-webkit-scrollbar {
  height: 8px;
}

.candidates-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.candidates-scroll::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 999px;
}

/* Section rhythm */
.section {
  margin-top: 72px;
}

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 34px;
}

.section-head h2 {
  font-size: 32px;
  margin: 12px 0 10px;
  letter-spacing: -.01em;
  font-feature-settings: "ss01";
}

/* A "kicker" label, not a pill badge — a colored dash marker plus small
   letter-spaced text, the way Linear/Vercel-style product sites label a
   section instead of the emoji-in-a-rounded-badge pattern this used to
   be. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .04em;
}

.eyebrow::before {
  content: '';
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  flex: 0 0 auto;
}

.demo-video-frame {
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: #000;
}

.demo-video-frame video {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #000;
}

.capture-card {
  padding: 40px;
}

.capture-intro {
  text-align: center;
  max-width: 580px;
  margin: 0 auto 32px;
}

.capture-intro h2 {
  margin: 14px 0 8px;
  font-size: 32px;
  letter-spacing: -.01em;
}

.capture-intro p {
  max-width: 480px;
  margin-inline: auto;
  font-family: var(--font-serif);
  font-size: 15.5px;
}

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

.step-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 14px;
  text-align: center;
  transition: border-color .2s cubic-bezier(.2, .8, .2, 1), transform .2s cubic-bezier(.2, .8, .2, 1),
    background .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s cubic-bezier(.2, .8, .2, 1);
}

.step-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  background: var(--surface-3);
  box-shadow: 0 14px 28px -18px rgba(0, 0, 0, .5);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 10px;
}

.step-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-dim);
}

.capture-note {
  max-width: 560px;
  margin: 26px auto 0;
  text-align: center;
}

.capture-alt {
  text-align: center;
  margin-top: 22px;
}

.capture-alt a {
  font-size: 12.5px;
  color: var(--text-faint);
  text-decoration: underline;
}

.capture-alt a:hover {
  color: var(--text-dim);
}

.capture-video-block {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.capture-video-block .capture-intro {
  margin-bottom: 20px;
}

h1,
h2,
h3 {
  line-height: 1.28;
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 700;
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 16px;
  font-family: var(--font-sans);
  font-weight: 700;
}

p {
  color: var(--text-dim);
  line-height: 1.85;
  margin: 0 0 12px;
}

.muted {
  color: var(--text-faint);
  font-size: 13px;
}

.text-serif {
  font-family: var(--font-serif);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  transition: background .2s cubic-bezier(.2, .8, .2, 1), border-color .2s cubic-bezier(.2, .8, .2, 1),
    transform .18s cubic-bezier(.2, .8, .2, 1), filter .2s ease, box-shadow .2s cubic-bezier(.2, .8, .2, 1);
}

.btn:hover {
  background: var(--surface-3);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.btn:active {
  transform: scale(.98) translateY(0);
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-strong), var(--primary));
  border: none;
  /* --primary is the same green family as --accent now (see the --primary
     comment above), so its button needs the same theme-aware text — a
     fixed white read wrong next to .btn-accent buttons using dark text in
     dark mode (real bug report: this button's white text looked "off"
     compared to the ones beside it). */
  color: var(--btn-green-text);
  box-shadow: 0 10px 24px -12px var(--primary-soft);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-strong), var(--primary));
  filter: brightness(1.12);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -14px var(--primary-soft);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  border: none;
  /* Dark near-black text read fine in dark mode (the accent gradient is a
     bright mint there), but light mode's accent is a much deeper green —
     that same dark text lost almost all contrast against it and the
     button read as "black" instead of green (real bug report). Theme-
     aware via --btn-green-text instead of one fixed color. */
  color: var(--btn-green-text);
  box-shadow: 0 10px 24px -12px var(--accent-soft);
}

.btn-accent:hover {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  filter: brightness(1.08);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -14px var(--accent-soft);
}

/* A secondary action that's still clearly accent-branded, not a second
   brand color — used next to .btn-accent (e.g. the hero's two CTAs) so
   one reads as primary (solid) and the other as secondary (outlined)
   without reaching for --primary just to tell them apart. */
.btn-outline-accent {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
}

.btn-outline-accent:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 17px 42px;
  font-size: 16.5px;
  margin-top: 8px;
  border-radius: 999px;
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--surface-2);
  border-color: transparent;
}

.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
  border-radius: 9px;
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: .5;
  pointer-events: none;
}

.input,
textarea.input,
select.input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}

.input:focus,
textarea.input:focus,
select.input:focus {
  outline: none;
  border-color: var(--primary);
}

label {
  font-size: 13px;
  color: var(--text-dim);
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.field {
  margin-bottom: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--primary-soft);
  color: var(--primary);
}

.badge-accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge-info {
  background: var(--info-soft);
  color: var(--info);
}

/* Scoped to #/updates' "جامعة جديدة" entries only — see --violet's own
   comment for why. */
.badge-violet {
  background: var(--violet-soft);
  color: var(--violet);
}

/* Instructor-avoid picker (plan.js's settings modal) — a selected chip, and
   the autocomplete dropdown it's picked from. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 12px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
}

.chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-faint);
  font-size: 14px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.chip-remove:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Positioned via JS (getBoundingClientRect, see plan.js's
   showInstructorSuggestions) rather than CSS-anchored to the search input,
   so it's never clipped by the settings modal's own scrollable content —
   same reasoning as timetableGrid.js's break tooltip. */
.autocomplete-dropdown {
  position: fixed;
  z-index: 5500;
  max-height: 220px;
  overflow-y: auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 4px;
}

.autocomplete-item {
  display: block;
  width: 100%;
  text-align: start;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: var(--text);
  font-size: 13.5px;
  cursor: pointer;
}

.autocomplete-item:hover {
  background: var(--surface-3);
}

.autocomplete-empty {
  padding: 8px 10px;
  color: var(--text-faint);
  font-size: 13px;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab {
  padding: 10px 16px;
  border-radius: 10px 10px 0 0;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 14px;
  border: none;
  background: transparent;
}

.tab.active {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-color: var(--surface);
  margin-bottom: -1px;
}

.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
  line-height: 1.7;
}

.alert-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.alert-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.alert-info {
  background: var(--primary-soft);
  color: var(--primary);
}

.alert-accent {
  background: var(--accent-soft);
  color: var(--accent);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.data-table th,
table.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: right;
}

body.locale-en table.data-table th,
body.locale-en table.data-table td {
  text-align: left;
}

table.data-table th {
  color: var(--text-faint);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Weekly timetable grid */
.timetable {
  display: grid;
  grid-template-columns: 64px repeat(6, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.tt-head {
  padding: 10px 6px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  border-inline-start: 1px solid var(--border);
}

.tt-head:first-child {
  border-inline-start: none;
}

.tt-hour-col {
  display: flex;
  flex-direction: column;
}

.tt-hour {
  height: 56px;
  font-size: 11px;
  color: var(--text-faint);
  text-align: center;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.tt-day-col {
  position: relative;
  border-inline-start: 1px solid var(--border);
  background-image: repeating-linear-gradient(to bottom, transparent, transparent 55px, var(--border) 55px, var(--border) 56px);
}

.tt-block {
  position: absolute;
  inset-inline: 4px;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 11.5px;
  overflow: hidden;
  color: #fff;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .5);
  cursor: default;
}

/* Toggled on by plan.js's "أوقات الراحة" button — the actual times are on
   the block's title tooltip (hover), same detail this used to show in a
   separate list, just overlaid on the grid itself now. Dashed/striped
   rather than a solid fill so it never reads as a real class. */
/* Border/stripe color is var(--text) (near-white on dark, near-black on
   light) rather than a hardcoded white — a literal white border/stripe on
   the light theme's near-white day-column background was invisible, which
   is exactly the "not clear" bug reported. var(--text) always contrasts
   against its own theme's background by construction. */
.tt-break-block {
  position: absolute;
  inset-inline: 4px;
  border-radius: 8px;
  border: 1.5px dashed var(--text);
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--text) 4%, transparent) 0 6px, color-mix(in srgb, var(--text) 9%, transparent) 6px 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: default;
}

/* Hovering the block itself, or its matching row in the breaks info panel
   (see plan.js's shared data-section-id hover-sync — .section-hover-active
   is the class that sync toggles), both read as the same "this one" state.
   outline:none overrides the generic .section-hover-active ring (meant for
   real section tiles/rows/grid-blocks) so a break only ever shows the one
   border, never both at once. */
.tt-break-block:hover,
.tt-break-block.section-hover-active {
  border: 2px solid var(--text);
  outline: none;
  box-shadow: 0 0 14px 2px color-mix(in srgb, var(--text) 55%, transparent);
}

.tt-break-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-faint);
  white-space: nowrap;
}

/* Hovering a not-yet-selected section tile in the sidebar overlays this on
   the grid (see timetableGrid.js's previewSectionOnGrid) — a hypothetical,
   not a real commitment yet, so it's styled clearly differently from both
   a real class block (solid fill) and a break (dashed, neutral var(--text)):
   dashed in the accent green, softly pulsing so it reads as "temporary."
   pointer-events:none so it never blocks clicking whatever real block it
   might be sitting on top of. */
.tt-preview-block {
  position: absolute;
  inset-inline: 4px;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 11px;
  overflow: hidden;
  border: 2px dashed var(--accent);
  background: var(--accent-soft);
  pointer-events: none;
  z-index: 3;
  animation: tt-preview-pulse 1.4s ease-in-out infinite;
}

@keyframes tt-preview-pulse {

  0%,
  100% {
    opacity: .75;
  }

  50% {
    opacity: 1;
  }
}

.tt-preview-label {
  font-weight: 800;
  color: var(--accent);
  display: block;
  margin-bottom: 2px;
}

.tt-preview-section {
  font-weight: 800;
  color: var(--accent);
  display: block;
  opacity: .95;
}

/* Custom hover tooltip for a break block — positioned in JS via
   getBoundingClientRect (see timetableGrid.js#showBreakTooltip), not CSS,
   so it's never clipped by .timetable's own overflow:hidden. Styled like
   the app's own cards/badges instead of the browser's generic native
   tooltip, and appears on a plain opacity transition (no native delay). */
.tt-break-tooltip {
  position: fixed;
  z-index: 9999;
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .1s ease;
}

.tt-break-tooltip.visible {
  opacity: 1;
}

.tt-info-btn {
  position: absolute;
  top: 3px;
  /* The block's text (course code, section, time) is right-aligned under
     RTL — anchoring this to inline-end puts it at the visually quieter
     left edge instead of overlapping the text's starting corner. */
  inset-inline-end: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  z-index: 1;
}

.tt-info-btn:hover {
  background: rgba(0, 0, 0, .6);
}

.tt-block .b-code {
  font-weight: 800;
  font-size: 12.5px;
  margin-bottom: 1px;
  display: block;
  letter-spacing: .2px;
}

.tt-block .b-section {
  font-weight: 800;
  margin-bottom: 3px;
  display: block;
  opacity: .95;
}

.tt-block .b-lock {
  display: inline-block;
  margin-inline-end: 3px;
  font-size: 10.5px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4));
}

.tt-block .b-time {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  margin-bottom: 2px;
  opacity: .95;
  font-variant-numeric: tabular-nums;
  letter-spacing: .2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

.tt-block .b-meta {
  opacity: .8;
  font-size: 10.5px;
  display: block;
}

.tt-block.conflict {
  border: 2px dashed var(--danger);
  background-image: repeating-linear-gradient(45deg, rgba(0, 0, 0, .25) 0 6px, transparent 6px 12px) !important;
}

.tt-block.closed-selected {
  border: 2px dashed var(--warn);
  background-image: repeating-linear-gradient(45deg, rgba(0, 0, 0, .25) 0 6px, transparent 6px 12px) !important;
}

.tt-block.kind-lab {
  filter: brightness(0.92);
}

.tt-block.guessed-time {
  border: 2px dashed rgba(255, 255, 255, .55);
}

.tt-block .b-guess {
  display: inline-block;
  margin-inline-start: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .28);
  font-size: 9px;
  font-weight: 700;
  vertical-align: 1px;
}

/* Fallback list for meetings a portal only exposes as a raw period number
   (no real clock time) — see timetableGrid.js#periodOnlyListHtml. */
.tt-period-days {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tt-period-day h5 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-faint);
}

.tt-period-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 12.5px;
  margin-bottom: 6px;
}

.tt-period-item .b-code {
  font-weight: 800;
}

.tt-period-item .b-meta {
  color: var(--text-faint);
}

.tt-period-item.conflict {
  border: 2px dashed var(--danger);
}

.tt-period-item.closed-selected {
  border: 2px dashed var(--warn);
}

.course-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.course-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.course-row .swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  margin-inline-end: 8px;
}

.course-toggle-row:hover {
  background: var(--surface-2);
}

/* Selected-sections summary rows double as a shortcut back to the matching
   card in the sidebar (see plan.js's data-jump-course wiring) — this hover
   state is the only hint that clicking one does something. */
.course-row[data-jump-course]:hover {
  border-color: var(--accent);
  cursor: pointer;
}

/* Brief highlight on the exact sidebar tile a summary row jumped to, so
   the student's eye lands on the right one among several of the same
   course instead of just "the sidebar scrolled somewhere." */
@keyframes section-tile-jump-flash {
  0%, 100% { box-shadow: none; }
  25%, 75% { box-shadow: 0 0 0 2px var(--accent); }
}

.section-tile-jump-highlight {
  animation: section-tile-jump-flash 1.4s ease-in-out;
}

/* Sections that are only registerable together (University of Jeddah —
   see lib/linkedSections.js) shown as one connected box in the selected-
   sections summary instead of unrelated rows, so the "these go together"
   relationship is visually obvious, not just stated in a warning banner. */
.linked-group-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--warn);
  border-radius: 12px;
  background: var(--warn-soft);
}

.linked-group-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--warn);
  padding: 0 4px;
}

.linked-group-box .course-row {
  background: var(--surface);
}

/* Section tiles — compact cards (section #, type, instructor, time) instead
   of a run-on text row, so a course with a separate lecture section and a
   separate tutorial section reads unambiguously at a glance. */
.section-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.section-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  padding: 14px 8px 10px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  min-width: 0;
  transition: background .2s cubic-bezier(.2, .8, .2, 1), border-color .2s cubic-bezier(.2, .8, .2, 1),
    transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s cubic-bezier(.2, .8, .2, 1);
}

.section-tile:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  background: var(--surface-3);
  box-shadow: 0 10px 22px -16px rgba(0, 0, 0, .45);
}

.section-tile .tile-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.tile-dot {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.tile-dot-open {
  background: var(--accent);
}

.tile-dot-closed {
  background: var(--danger);
}

.tile-dot-unknown {
  background: var(--text-faint);
}

.tile-num {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-display);
  line-height: 1.1;
  margin-top: 2px;
}

.tile-kind {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-dim);
}

.tile-kind-lecture {
  color: var(--primary);
}

.tile-kind-lab {
  color: var(--warn);
}

.tile-kind-tutorial {
  color: var(--accent);
}

.tile-linked-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--warn-soft);
  color: var(--warn);
  white-space: nowrap;
}

.tile-campus {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.tile-instructor {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  width: 100%;
}

.tile-time {
  font-size: 10.5px;
  color: var(--text-faint);
  max-width: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tile-time-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  width: 100%;
  display: block;
}

.tile-time-row {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  width: 100%;
}

.tile-time-row .tile-time-line {
  flex: 1;
  min-width: 0;
}

.tile-time-guess {
  flex-shrink: 0;
  font-size: 9.5px;
  font-weight: 700;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--warn-soft);
  color: var(--warn);
  white-space: nowrap;
}

.tile-time-edit {
  flex-shrink: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  padding: 2px 3px;
  color: var(--text-faint);
  border-radius: 6px;
}

.tile-time-edit:hover {
  background: var(--surface-2);
  color: var(--text);
}

.section-tile-selected {
  background: linear-gradient(135deg, var(--primary-strong), var(--primary));
  border-color: transparent;
}

.section-tile-selected:hover {
  background: linear-gradient(135deg, var(--primary-strong), var(--primary));
  filter: brightness(1.1);
  border-color: transparent;
}

.section-tile-selected .tile-num,
.section-tile-selected .tile-instructor,
.section-tile-selected .tile-time {
  color: #fff;
}

.section-tile-selected .tile-kind,
.section-tile-selected .tile-campus {
  background: rgba(255, 255, 255, .22);
  color: #fff;
}

.section-tile-selected .tile-time-edit {
  color: rgba(255, 255, 255, .85);
}

.section-tile-selected .tile-time-edit:hover {
  background: rgba(255, 255, 255, .22);
  color: #fff;
}

.section-tile-closed {
  border: 2px dashed var(--warn);
  background: var(--warn-soft);
}

.section-tile-closed:hover {
  background: var(--warn-soft);
  border-color: var(--warn);
  filter: brightness(1.15);
}

/* Hovering a section anywhere — the grid block, the selected-sections
   summary row, or the sidebar tile — highlights it in all three at once
   (see plan.js's data-section-id hover wiring), so finding "where is this
   section elsewhere on the page" doesn't take a manual scan. Layered as an
   outline/ring rather than overriding background or border-color, so it
   never hides whatever state (selected, closed, conflict) an element
   already shows. */
/* White glow in dark mode, black in light mode (var(--text) already
   flips between the two) — was --accent green before, which read as
   "yet another green" rather than a clearly distinct hover state; a
   glow that always reads as "the highlight," regardless of theme, is
   the whole point here. Unified with .tt-break-block's own hover ring
   below, which used to be a plain non-glowing border. */
.section-hover-active {
  outline: 2px solid var(--text);
  outline-offset: 1px;
  box-shadow: 0 0 14px 2px color-mix(in srgb, var(--text) 55%, transparent);
}

.tt-block.section-hover-active {
  outline-offset: -2px;
  z-index: 2;
}

/* #/updates — a narrower centered column instead of stretching to the
   page's full width (a paragraph-length update description reads badly at
   that measure), laid out as a timeline (a line + one dot per entry)
   rather than a plain card stack, since a chronological log reads more
   naturally that way. */
.updates-page {
  max-width: 640px;
  margin: 0 auto;
}

.updates-timeline {
  position: relative;
}

.updates-timeline::before {
  content: '';
  position: absolute;
  inset-inline-start: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--border), transparent 97%);
}

.update-entry {
  position: relative;
  padding-inline-start: 30px;
  margin-bottom: 22px;
}

.update-entry:last-child {
  margin-bottom: 0;
}

.update-dot {
  position: absolute;
  inset-inline-start: 0;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2.5px solid var(--text-faint);
}

.update-dot-accent {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.update-dot-warn {
  border-color: var(--warn);
  box-shadow: 0 0 0 3px var(--warn-soft);
}

.update-dot-primary {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.update-dot-info {
  border-color: var(--info);
  box-shadow: 0 0 0 3px var(--info-soft);
}

.update-dot-violet {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-soft);
}

/* Fallback for a future type with no explicit color mapping — never used
   by the current five types, each of which gets its own distinct color. */
.update-dot-neutral {
  border-color: var(--text-faint);
}

.update-when {
  font-size: 12.5px;
  color: var(--text-faint);
  margin: 0 0 6px;
  font-variant-numeric: tabular-nums;
}

.update-image {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-top: 14px;
  border: 1px solid var(--border);
}

.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-faint);
}

.empty-state h3 {
  color: var(--text);
  font-size: 20px;
}

.hero {
  padding: 68px 0 34px;
  text-align: center;
}

.hero .eyebrow {
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 58px;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.12;
  margin-bottom: 22px;
  font-feature-settings: "ss01";
}

.accent-text {
  color: var(--accent);
}

.hero p {
  max-width: 580px;
  margin: 0 auto 28px;
  font-size: 16.5px;
  font-family: var(--font-serif);
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Left-aligned icon+title row, description below — not the centered
   icon-then-stacked-text pattern every AI-template feature grid defaults
   to. Reads more like a real product's capability list (Linear/Vercel
   style) than a row of identical decorative tiles. */
.feature-card {
  display: flex;
  flex-direction: column;
  text-align: start;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), border-color .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s cubic-bezier(.2, .8, .2, 1);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .4), var(--shadow);
}

.feature-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.feature-card h3 {
  font-size: 15.5px;
  margin: 0;
}

.feature-card p {
  margin: 0;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* ── Supported-universities grid (home.js's universitiesGridHtml) ──────
   Every card is visually identical — same size, same color, same layout.
   The list's *order* carries meaning (see registry.js), the display does
   not: no group headers, no per-university coloring, since this is a
   public-facing list and every supported university sits at the same
   level. */
.universities-count strong {
  color: var(--text);
}

.university-grid {
  grid-template-columns: repeat(4, 1fr);
}

.university-card {
  text-align: center;
  padding: 22px 14px;
}

.university-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  margin-inline: auto;
  margin-bottom: 14px;
  overflow: hidden;
}

.university-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

/* Per explicit request: every logo washes out toward white in DARK mode
   only — grayscale(1) strips its original colors, brightness(1.5) then
   lifts it the rest of the way toward white. Light mode keeps each logo's
   real colors as-is. User-tested against the real logo set and confirmed
   this reads correctly for all of them. */
:root[data-theme='dark'] .university-logo img {
  filter: grayscale(1) brightness(1.5);
}

.university-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--accent);
  background: var(--accent-soft);
}

.university-name {
  display: block;
  font-size: 14px;
  line-height: 1.4;
}

/* One bordered panel holds the whole grid + "جامعتك مو بالقائمة؟" note, so
   "الجامعات المدعومة" reads as a single distinct block on the page rather
   than a grid floating loosely under its heading. */
.universities-panel {
  margin-top: 8px;
}

/* A single plain line, not its own card/heading/button — per explicit
   feedback that the earlier spotlight-card version read as its own
   separate section instead of a quiet footnote to the grid it sits in. */
.university-request-note {
  text-align: center;
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 13.5px;
}

.university-request-note button {
  border: none;
  background: none;
  padding: 0;
  color: var(--accent);
  font-size: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* "عن المنصة" — body paragraphs read right-to-left within the card at a
   natural reading width instead of centered (centering a paragraph this
   long hurt readability); the eyebrow/h2 above it stay centered via the
   shared .section-head. */
.about-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 36px;
}

.about-card p {
  text-align: start;
}

.about-card p:last-of-type {
  margin-bottom: 0;
}

/* Short (2-3 word) tags, not full sentences — an equal-width 3-column
   grid keeps each icon+label pair centered in its own column, so they
   stay aligned with each other regardless of a theme/font making one
   label a few pixels wider than another. */
.about-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.about-highlight {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.about-highlight-icon {
  display: inline-flex;
  color: var(--accent);
}

.about-highlight-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat .num {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--font-display);
}

.footer-note {
  text-align: center;
  padding: 34px 20px;
  color: var(--text-faint);
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  font-family: var(--font-serif);
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  color: var(--text-dim);
  transition: border-color .15s ease, background .15s ease;
}

.dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

code.bookmarklet-code {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-size: 11px;
  color: var(--accent);
  word-break: break-all;
  max-height: 120px;
  overflow: auto;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  animation: spin .7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Toasts */
#toast-host {
  position: fixed;
  bottom: 20px;
  inset-inline-end: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--primary);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: var(--shadow);
  max-width: 320px;
  animation: toast-in .18s ease;
}

.toast-success {
  border-inline-start-color: var(--accent);
}

.toast-error {
  border-inline-start-color: var(--danger);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .container {
    padding: 24px 16px 70px;
  }

  .timetable {
    grid-template-columns: 44px repeat(6, 1fr);
    font-size: 11px;
  }

  .topbar {
    width: calc(100% - 24px);
    border-radius: 18px;
    padding: 12px 18px;
  }

  .hero {
    padding: 40px 0 24px;
  }

  .hero h1 {
    font-size: 34px;
    letter-spacing: -.015em;
    margin-bottom: 16px;
  }

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

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .section {
    margin-top: 48px;
  }

  .section-head h2 {
    font-size: 26px;
    font-feature-settings: "ss01";
  }

  .capture-card {
    padding: 24px 18px;
  }

  .capture-intro h2 {
    font-size: 26px;
  }

  .btn-lg {
    padding: 15px 28px;
    font-size: 15px;
    width: 100%;
  }

  .pricing-card {
    padding: 24px 18px;
  }

  .pricing-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .pricing-info {
    text-align: center;
    padding-inline-end: 0;
  }

  .pricing-features {
    align-items: center;
  }

  .pricing-features li {
    max-width: 320px;
    margin-inline: auto;
  }

  .card {
    padding: 16px;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .about-card {
    padding: 24px 20px;
  }

  .about-highlights {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .section-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .topbar {
    width: calc(100% - 16px);
    margin: 10px auto 0;
    top: 10px;
    border-radius: 16px;
    padding: 10px 14px;
    gap: 8px;
  }

  .topbar>div {
    min-width: 0;
  }

  .brand {
    font-size: 16px;
    gap: 6px;
    flex-shrink: 0;
  }

  .nav-links {
    gap: 0;
    min-width: 0;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a,
  .nav-links button {
    padding: 7px 10px;
    font-size: 12.5px;
    white-space: nowrap;
  }

  .theme-toggle {
    width: 32px;
    height: 32px;
    font-size: 14px;
    margin-inline-start: 2px;
    flex-shrink: 0;
  }

  .hero h1 {
    font-size: 28px;
    letter-spacing: -.01em;
    margin-bottom: 14px;
  }

  .eyebrow {
    font-size: 11px;
    padding: 4px 11px;
  }

  .candidates-row>.card {
    flex: 0 0 88vw;
  }
}