:root {
  --ink: #151719;
  --muted: #5f6773;
  --paper: #f7f5ef;
  --white: #ffffff;
  --line: #ded8cc;
  --gold: #f0bd2d;
  --red: #b8322a;
  --teal: #0a7168;
  --blue: #1d5d8f;
  --shadow: 0 20px 60px rgba(21, 23, 25, .12);
  --display: "Readex Pro", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --body: "IBM Plex Sans Arabic", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html {
  max-width: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
.wrap {
  width: min(1120px, calc(100% - 40px));
  max-width: 100%;
  margin-inline: auto;
}
.wrap > * { min-width: 0; }

.site-header {
  position: fixed;
  inset: 18px 0 auto;
  z-index: 20;
  pointer-events: none;
}
.nav {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 10px 12px 10px 18px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .12);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}
.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
}
.brand-text {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}
.brand-name {
  color: var(--ink);
  font: 700 21px var(--display);
}
.brand-tag {
  color: var(--muted);
  font: 500 11.5px var(--body);
  white-space: nowrap;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  color: #29313a;
}
.nav-links a { text-decoration: none; }
.nav-links a:hover,
.nav-links a[aria-current] { color: var(--red); }
.nav-links .nav-cta {
  padding: 8px 16px;
  background: var(--ink);
  color: var(--white);
  font: 700 14px var(--display);
  transition: background .18s ease;
}
.nav-links .nav-cta:hover { background: #2c3238; color: var(--white); }
.nav-toggle { display: none; }

.hero {
  min-height: 94vh;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: #131517;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 13, 14, .94) 0%, rgba(12, 13, 14, .82) 36%, rgba(12, 13, 14, .18) 72%),
    linear-gradient(180deg, rgba(12, 13, 14, .20), rgba(12, 13, 14, .72));
  z-index: -1;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 6px;
  background: linear-gradient(90deg, #111 0 33.33%, #d3322a 33.33% 66.66%, #f0bd2d 66.66% 100%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -2;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 650px) 1fr;
  align-items: end;
  gap: 40px;
  padding: 132px 0 58px;
  direction: ltr;
}
.hero-copy {
  width: 100%;
  max-width: 650px;
  min-width: 0;
  color: var(--white);
  direction: rtl;
  text-align: right;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--gold);
  font: 700 13px var(--display);
}
.eyebrow::before {
  content: "";
  width: 42px;
  height: 2px;
  background: currentColor;
}
h1, h2, h3, p { margin: 0; }
h1 {
  font-family: var(--display);
  font-size: clamp(42px, 6.2vw, 76px);
  line-height: 1.15;
  font-weight: 700;
  margin-bottom: 22px;
}
h1 span { color: var(--gold); }
.lede {
  max-width: 58ch;
  color: #edf0f2;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.9;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border: 1px solid transparent;
  text-decoration: none;
  font: 700 15px var(--display);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: #151719; }
.btn-primary:hover { background: #ffd563; }
.btn-secondary {
  background: rgba(255, 255, 255, .08);
  color: var(--white);
  border-color: rgba(255, 255, 255, .34);
}
.btn-secondary:hover { background: rgba(255, 255, 255, .16); }
.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 46px;
  max-width: 700px;
}
.proof-item {
  padding: 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, .38);
  color: #cfd4d9;
  background: rgba(255, 255, 255, .07);
  backdrop-filter: blur(10px);
}
.proof-item b {
  display: block;
  color: var(--white);
  font: 700 25px var(--display);
  line-height: 1.1;
  margin-bottom: 5px;
}
.proof-item span { font-size: 13px; }
.hero-note {
  align-self: end;
  justify-self: end;
  width: min(320px, 100%);
  padding: 22px;
  color: #f5f0df;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(14px);
  direction: rtl;
}
.hero-note-tag {
  display: block;
  color: var(--gold);
  font: 700 12px var(--display);
  margin-bottom: 10px;
}
.hero-note p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.8;
}

section { padding: clamp(58px, 8vw, 96px) 0; }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 36px;
  align-items: end;
  margin-bottom: 34px;
}
.kicker {
  color: var(--red);
  font: 700 13px var(--display);
  margin-bottom: 12px;
}
h2 {
  font-family: var(--display);
  font-size: clamp(29px, 4vw, 45px);
  line-height: 1.28;
  font-weight: 700;
}
.section-head p,
.text-muted {
  color: var(--muted);
  font-size: 16px;
}

.path {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.path-line {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line);
  background: var(--white);
}
.path-step {
  position: relative;
  padding: 28px 22px;
  border-inline-start: 1px solid var(--line);
  min-height: 178px;
}
.path-step:last-child { border-inline-start: 0; }
.path-step::before {
  content: attr(data-step);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  font: 700 14px var(--display);
}
.path-step.current::before { background: var(--gold); border-color: var(--gold); }
.path-step.finish::before { background: var(--ink); color: var(--white); border-color: var(--ink); }
.path-step h3 {
  font: 700 18px var(--display);
  margin-bottom: 8px;
}
.path-step p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.feature {
  min-height: 230px;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 24px;
  box-shadow: 0 12px 30px rgba(21, 23, 25, .04);
}
.feature .num {
  color: var(--blue);
  font: 700 13px var(--display);
  margin-bottom: 26px;
}
.feature h3 {
  font: 700 19px var(--display);
  margin-bottom: 10px;
}
.feature p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.details {
  background: #f0ece2;
  border-block: 1px solid var(--line);
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 52px;
  align-items: start;
}
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  background: var(--white);
}
.fact {
  min-height: 112px;
  padding: 20px;
  border-inline-start: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.fact:nth-child(2n) { border-inline-start: 0; }
.fact:nth-last-child(-n+2) { border-bottom: 0; }
.fact span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}
.fact b {
  font: 700 20px var(--display);
  line-height: 1.45;
}
.price-band {
  margin-top: 22px;
  padding: 22px;
  background: var(--ink);
  color: var(--white);
}
.price-band b {
  display: block;
  font: 700 42px var(--display);
  line-height: 1;
  margin-bottom: 8px;
}
.price-band span { color: #d0d4d8; font-size: 14px; }

.outcomes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.outcome {
  background: var(--paper);
  padding: 26px;
  min-height: 180px;
}
.outcome strong {
  display: block;
  color: var(--teal);
  font: 700 13px var(--display);
  margin-bottom: 12px;
}
.outcome h3 {
  font: 700 18px var(--display);
  margin-bottom: 8px;
}
.outcome p { color: var(--muted); font-size: 15px; }

.nb { white-space: nowrap; }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-outline:hover { border-color: var(--ink); }

.course-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.course-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  box-shadow: 0 12px 30px rgba(21, 23, 25, .04);
}
.course-card.alt { border-top-color: var(--teal); }
.course-body { padding: 26px 26px 0; }
.course-date {
  display: inline-block;
  margin-bottom: 16px;
  padding: 5px 12px;
  background: var(--ink);
  color: var(--white);
  font: 700 13px var(--display);
}
.course-tag {
  color: var(--red);
  font: 700 13px var(--display);
  margin-bottom: 6px;
}
.course-card.alt .course-tag { color: var(--teal); }
.course-card h3 {
  font: 700 24px var(--display);
  margin-bottom: 10px;
}
.course-body p { color: var(--muted); font-size: 15px; }
.course-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 18px;
  margin: 22px 26px 0;
  border-top: 1px solid var(--line);
}
.course-meta div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.course-meta span {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
}
.course-meta b { font: 700 16px var(--display); }
.course-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding: 22px 26px 26px;
}
.course-actions .btn { flex: 1 1 160px; }

.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.focus-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px;
  background: var(--white);
  font: 700 17px var(--display);
}
.focus-item::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--teal);
  flex: none;
}
.check-list {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.check-list li {
  position: relative;
  padding-inline-start: 26px;
  color: var(--muted);
}
.check-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 11px;
  width: 10px;
  height: 10px;
  background: var(--gold);
}
.honest-note {
  margin-top: 22px;
  padding: 16px 18px;
  background: var(--white);
  border-inline-start: 4px solid var(--red);
  font-size: 15px;
}

.bg-white {
  background: var(--white);
  border-block: 1px solid var(--line);
}
.bg-sand {
  background: #f0ece2;
  border-block: 1px solid var(--line);
}
.features-grid.three { grid-template-columns: repeat(3, 1fr); }

/* صفحة بلا صورة خلفية: نفس الهيرو بخلفية داكنة صافية */
.hero-plain::before {
  background:
    radial-gradient(circle at 12% 18%, rgba(240, 189, 45, .16), transparent 42%),
    radial-gradient(circle at 88% 90%, rgba(13, 143, 131, .14), transparent 40%);
}
.hero-mark {
  display: block;
  color: var(--gold);
  font: 700 clamp(30px, 4.4vw, 48px) var(--display);
  line-height: 1.1;
  margin-bottom: 14px;
  text-align: right;
}

.choose-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.choose-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
}
.choose-card h3 {
  font: 700 21px var(--display);
}
.choose-card .check-list { margin-bottom: 24px; }
.choose-card .btn { margin-top: auto; }
.choose-help {
  margin-top: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

.band {
  background: var(--ink);
  color: var(--white);
}
.band-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
}
.band p { color: #c8ced5; margin-top: 10px; max-width: 60ch; }
.band .hero-actions { margin-top: 0; }

.info-panel h3 {
  font: 700 22px var(--display);
  margin-bottom: 6px;
}
.info-panel .steps { margin-top: 18px; }

.field select {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 12px 14px;
  font: 15px/1.6 var(--body);
  color: var(--ink);
  width: 100%;
}
.field select:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}
.form-done {
  display: none;
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 22px;
  text-align: center;
}
.form-done b {
  display: block;
  font: 700 22px var(--display);
  margin-bottom: 8px;
}
.form-done p { color: var(--muted); }
.regform.done .reg-form,
.regform.done .regform-success { display: none; }
.regform.done .form-done { display: block; }

.foot-links a { white-space: nowrap; }

.teacher {
  background: var(--ink);
  color: var(--white);
}
.teacher .section-head p,
.teacher .text-muted { color: #c8ced5; }
.teacher-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 34px;
}
.credentials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .18);
}
.credential {
  background: #1f2327;
  padding: 22px;
  color: #e5e8eb;
  min-height: 108px;
  font-size: 15px;
}
.timeline {
  border-right: 2px solid var(--gold);
  padding-right: 24px;
  display: grid;
  gap: 24px;
}
.timeline-item { position: relative; }
.timeline-item::before {
  content: "";
  position: absolute;
  right: -31px;
  top: 8px;
  width: 12px;
  height: 12px;
  background: var(--gold);
  border: 4px solid var(--ink);
}
.timeline-item b {
  display: block;
  color: var(--gold);
  font: 700 14px var(--display);
  margin-bottom: 4px;
}
.timeline-item p {
  color: #c8ced5;
  font-size: 15px;
}

.register {
  background: var(--white);
}
.register-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 48px;
  align-items: start;
}
.steps {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
}
.steps li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  align-items: start;
  color: var(--muted);
}
.steps b {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: var(--ink);
  font: 700 14px var(--display);
}
.pay-panel {
  border: 1px solid var(--line);
  padding: 26px;
  background: #f9f8f4;
  box-shadow: var(--shadow);
}
.pay-panel .amount {
  font: 700 clamp(42px, 6vw, 58px) var(--display);
  line-height: 1;
  margin-bottom: 8px;
}
.pay-panel .amount small {
  font-size: 18px;
  color: var(--muted);
}
.pay-panel p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}
.pay-panel .btn {
  width: 100%;
  margin-top: 10px;
}
.pay-locked {
  padding: 14px 16px;
  margin: 18px 0 8px;
  background: rgba(21, 23, 25, .06);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
  text-align: center;
}
.pay-panel.ready .pay-locked { display: none; }
.pay-note {
  padding: 14px 16px;
  margin: 14px 0 0;
  background: rgba(21, 23, 25, .06);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}
.btn.is-disabled {
  opacity: .48;
  cursor: not-allowed;
  transform: none;
  pointer-events: auto;
}
.pay-panel.ready .btn.is-disabled {
  opacity: 1;
  cursor: pointer;
}
.btn-light {
  background: var(--ink);
  color: var(--white);
}

.regform {
  margin-top: 38px;
  border: 1px solid var(--line);
  background: #f9f8f4;
}
.regform-body {
  display: none;
  padding: 20px;
}
.regform.open .regform-body { display: block; }
.regform-success {
  background: rgba(13, 143, 131, .12);
  border: 1px solid rgba(13, 143, 131, .35);
  color: #075b53;
  padding: 14px 16px;
  margin-bottom: 16px;
  text-align: center;
  font-weight: 700;
}
.reg-form {
  display: grid;
  gap: 16px;
  max-width: 560px;
  margin-inline: auto;
}
.field {
  display: grid;
  gap: 6px;
  text-align: right;
}
.field label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.field input,
.field textarea {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 12px 14px;
  font: 15px/1.6 var(--body);
  color: var(--ink);
  width: 100%;
}
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}
.field textarea {
  min-height: 90px;
  resize: vertical;
}
.form-note {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  margin: 4px 0 0;
}
.reg-form .btn {
  width: 100%;
  margin-top: 6px;
}

.faq {
  background: #f0ece2;
  border-top: 1px solid var(--line);
}
.faq-list {
  max-width: 850px;
  margin-inline: auto;
  border-top: 1px solid var(--line);
}
details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font: 700 18px var(--display);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--red);
  flex: none;
}
details[open] summary::after { content: "-"; }
details p {
  margin-top: 10px;
  color: var(--muted);
  max-width: 72ch;
  font-size: 15px;
}

footer {
  padding: 28px 0 100px;
  background: var(--ink);
  color: #c8ced5;
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
footer a { color: var(--white); text-decoration: none; }

.sticky {
  display: none;
  position: fixed;
  inset: auto 12px 12px;
  z-index: 30;
  background: var(--ink);
  color: var(--white);
  padding: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .24);
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sticky strong {
  display: block;
  font: 700 18px var(--display);
  line-height: 1.1;
}
.sticky span { color: #c8ced5; font-size: 12px; }
.sticky .btn { min-height: 44px; padding: 10px 16px; white-space: nowrap; }

.rise {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}
.rise.in {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .hero { min-height: auto; }
  .hero::before {
    background:
      linear-gradient(180deg, rgba(12, 13, 14, .62) 0%, rgba(12, 13, 14, .90) 58%, rgba(12, 13, 14, .96) 100%);
  }
  .hero-bg { object-position: 58% center; }
  .hero .wrap {
    grid-template-columns: 1fr;
    padding-top: 118px;
  }
  .hero-note { justify-self: start; }
  .section-head,
  .detail-layout,
  .teacher-grid,
  .register-layout,
  .course-grid,
  .choose-grid,
  .band-inner,
  .features-grid.three {
    grid-template-columns: 1fr;
  }
  .focus-grid { grid-template-columns: 1fr 1fr; }
  .path-line { grid-template-columns: 1fr; }
  .path-step,
  .path-step:last-child {
    border-inline-start: 0;
    border-bottom: 1px solid var(--line);
    min-height: auto;
  }
  .path-step:last-child { border-bottom: 0; }
  .features-grid,
  .outcomes {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .wrap {
    width: calc(100% - 28px);
    max-width: 1120px;
  }
  .site-header { top: 10px; }
  .nav { min-height: 54px; }
  .brand-name { font-size: 19px; }
  .brand-tag { font-size: 10.5px; }
  .brand-mark { width: 36px; height: 36px; }
  h1 {
    font-size: clamp(30px, 9vw, 36px);
    line-height: 1.22;
  }
  .hero .wrap { padding: 102px 0 48px; }
  .hero-proof,
  .features-grid,
  .facts,
  .outcomes,
  .credentials,
  .focus-grid {
    grid-template-columns: 1fr;
  }
  .course-actions .btn { flex-basis: 100%; }
  .fact,
  .fact:nth-child(2n) { border-inline-start: 0; }
  .fact:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .fact:last-child { border-bottom: 0; }
  .hero-actions .btn { width: 100%; }
  .sticky { display: flex; }
  footer { padding-bottom: 28px; }
  footer .wrap { display: grid; }
}

/* ==========================================================
   الأدلة: ألوان الأقسام، رأس الصفحة، المقال، البطاقات
   ========================================================== */
.cat-language { --c: #9a6b00; --c-hi: var(--gold); }
.cat-study    { --c: var(--blue); --c-hi: #74b3ea; }
.cat-career   { --c: var(--teal); --c-hi: #46c6b8; }
.cat-living   { --c: var(--red); --c-hi: #ef8178; }

.cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--c, var(--red));
  font: 700 13px var(--display);
}
.cat-tag::before {
  content: "";
  width: 9px;
  height: 9px;
  background: currentColor;
  flex: none;
}

.page-hero {
  position: relative;
  isolation: isolate;
  padding: 132px 0 56px;
  background: #131517;
  color: var(--white);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 15%, rgba(240, 189, 45, .13), transparent 42%),
    radial-gradient(circle at 92% 95%, rgba(13, 143, 131, .12), transparent 40%);
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 6px;
  background: linear-gradient(90deg, #111 0 33.33%, #d3322a 33.33% 66.66%, #f0bd2d 66.66% 100%);
}
.page-hero .cat-tag { color: var(--c-hi, var(--gold)); margin-bottom: 14px; }
.page-hero h1 {
  max-width: 24ch;
  margin-bottom: 16px;
  font-size: clamp(30px, 4.4vw, 50px);
  line-height: 1.3;
}
.page-hero .lede { max-width: 64ch; color: #d6dbe0; }
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #8f99a3;
  font-size: 13px;
}
.crumbs a { color: #d6dbe0; text-decoration: none; }
.crumbs a:hover { color: var(--gold); }
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 24px;
  color: #aab2bb;
  font-size: 13.5px;
}

/* تخطيط المقال: الفهرس في عمود جانبي ثابت، والمحتوى في عمود القراءة */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  grid-template-areas: "main side";
  gap: 56px;
  align-items: start;
  padding: 56px 0 88px;
}
.toc-col {
  grid-area: side;
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}
.toc {
  padding: 0;
  background: var(--white);
  border: 1px solid var(--line);
}
.toc summary { padding: 14px 18px; font-size: 15px; }
.toc summary::after { width: 26px; height: 26px; }
.toc ol {
  display: grid;
  margin: 0;
  padding: 0 18px 14px;
  list-style: none;
  counter-reset: toc;
}
.toc li a {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-decoration: none;
}
.toc li a::before {
  counter-increment: toc;
  content: counter(toc, decimal-leading-zero);
  padding-top: 2px;
  color: var(--c);
  font: 700 12px var(--display);
}
.toc li a:hover,
.toc li a.active { color: var(--ink); }
.toc li a.active { font-weight: 600; }
.side-cta {
  padding: 22px;
  background: var(--ink);
  color: var(--white);
}
.side-cta b {
  display: block;
  margin-bottom: 6px;
  font: 700 18px var(--display);
}
.side-cta p { margin-bottom: 12px; color: #c8ced5; font-size: 14px; line-height: 1.8; }
.side-cta .btn { width: 100%; min-height: 46px; margin-top: 8px; font-size: 14px; }

.prose {
  grid-area: main;
  counter-reset: sec;
  font-size: 17.5px;
}
.prose > * + * { margin-top: 18px; }
.prose .lead { color: var(--ink); font-size: 19.5px; line-height: 1.9; }
.prose p,
.prose li { color: #2c333b; line-height: 1.95; }
.prose h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: clamp(23px, 2.8vw, 30px);
  line-height: 1.45;
  scroll-margin-top: 96px;
  counter-increment: sec;
}
.prose h2::before {
  content: counter(sec, decimal-leading-zero);
  flex: none;
  color: var(--c);
  font: 700 15px var(--display);
}
.prose h3 { margin-top: 30px; font: 700 19px var(--display); line-height: 1.5; }
.prose a { color: var(--blue); text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose ul:not([class]),
.prose ol:not([class]) {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}
.prose ul:not([class]) > li {
  position: relative;
  padding-inline-start: 22px;
}
.prose ul:not([class]) > li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 13px;
  width: 8px;
  height: 8px;
  background: var(--c);
}
.prose ol:not([class]) { counter-reset: item; }
.prose ol:not([class]) > li {
  position: relative;
  padding-inline-start: 42px;
  counter-increment: item;
}
.prose ol:not([class]) > li::before {
  content: counter(item);
  position: absolute;
  inset-inline-start: 0;
  top: 4px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--white);
  font: 700 13px var(--display);
}

/* مصطلح ألماني داخل نص عربي: يبقى متصلاً وباتجاه صحيح */
.de {
  direction: ltr;
  unicode-bidi: isolate;
  font-family: var(--display);
  font-weight: 600;
}

.callout {
  padding: 18px 20px;
  border-inline-start: 4px solid var(--gold);
  background: #fbf4df;
}
.callout > b:first-child {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-family: var(--display);
}
.callout p { font-size: 16px; }
.callout.warn { border-color: var(--red); background: #fbeceb; }
.callout.ok { border-color: var(--teal); background: #e5f3f1; }
.callout.info { border-color: var(--blue); background: #e8f0f7; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.stat { padding: 18px 20px; background: var(--white); }
.stat b {
  display: block;
  color: var(--ink);
  font: 700 26px var(--display);
  line-height: 1.3;
}
.stat span { color: var(--muted); font-size: 13.5px; line-height: 1.6; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.card {
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--c);
}
.prose .card h3 { margin: 0 0 6px; font-size: 17px; }
.prose .card p { color: var(--muted); font-size: 15px; line-height: 1.8; }
.card .lvl {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--c);
  font: 700 12.5px var(--display);
}

.table-wrap {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--line);
}
.prose table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 15px;
}
.prose th {
  padding: 12px 14px;
  background: #f0ece2;
  font: 700 14px var(--display);
  text-align: right;
}
.prose td {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  line-height: 1.75;
  vertical-align: top;
}
/* الجداول ذات العمودين تتسع للشاشة الصغيرة دون تمرير أفقي */
.table-wrap:has(th:nth-child(2):last-child) table { min-width: 0; }

.terms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.terms span {
  padding: 6px 12px;
  background: var(--white);
  border: 1px solid var(--line);
  direction: ltr;
  unicode-bidi: isolate;
  font: 600 14px var(--display);
}

.prose .timeline {
  display: grid;
  margin-inline-start: 6px;
  padding: 0;
  border-inline-start: 2px solid var(--line);
  list-style: none;
}
.prose .timeline > li {
  position: relative;
  padding-bottom: 22px;
  padding-inline-start: 24px;
}
.prose .timeline > li:last-child { padding-bottom: 0; }
.prose .timeline > li::before {
  content: "";
  position: absolute;
  inset-inline-start: -8px;
  top: 9px;
  width: 14px;
  height: 14px;
  background: var(--c);
  border: 3px solid var(--paper);
}
.prose .timeline .when { display: block; color: var(--c); font: 700 12.5px var(--display); }
.prose .timeline b { display: block; color: var(--ink); font: 700 17px var(--display); }

.prose .check-list { margin-top: 0; }

.cv-sample {
  margin-inline: 0;
  padding: 26px 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--ink);
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.7;
  text-align: left;
}
.cv-sample header { padding-bottom: 14px; border-bottom: 2px solid var(--gold); }
.cv-sample header strong { display: block; color: var(--ink); font: 700 22px var(--display); }
.cv-sample header span { display: block; color: #8a6200; font-weight: 600; }
.cv-sample header small { display: block; margin-top: 4px; color: var(--muted); }
.cv-sample h4 {
  margin: 18px 0 8px;
  color: #8a6200;
  font: 700 12px var(--display);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.cv-sample dl { display: grid; grid-template-columns: 130px 1fr; gap: 6px 16px; margin: 0; }
.cv-sample dt { color: var(--muted); }
.cv-sample dd { margin: 0; color: #2c333b; }
.cv-sample footer {
  margin-top: 18px;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--muted);
  font-size: 13px;
}
.figure-note { color: var(--muted); font-size: 14px; }

.sources {
  margin-top: 52px;
  padding: 20px 22px;
  background: #f0ece2;
  border: 1px solid var(--line);
}
.sources h3 { margin: 0 0 10px; font-size: 15px; }
.sources ul { display: grid; gap: 4px; margin: 0; padding-inline-start: 18px; }
.prose .sources li { color: var(--muted); font-size: 14px; line-height: 1.8; }
.prose .disclaimer { color: var(--muted); font-size: 13.5px; line-height: 1.8; }

/* بطاقات الأدلة وفهرسها */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.guide-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color .18s ease, transform .18s ease;
}
.guide-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.guide-card .cat-tag { margin-bottom: 12px; }
.guide-card h3 { margin-bottom: 8px; font: 700 19px var(--display); line-height: 1.5; }
.guide-card p { color: var(--muted); font-size: 14.5px; line-height: 1.8; }
.guide-card.course { background: #fbf6e6; }

.cat-section { scroll-margin-top: 96px; }
.cat-section + .cat-section { margin-top: 60px; }
.cat-head h2 { font-size: clamp(22px, 2.6vw, 30px); }
.cat-head p { max-width: 54ch; color: var(--muted); font-size: 15px; }

/* الصفحة الرئيسية: مسارات البداية */
.path-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.path-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--c);
}
.path-card .num { color: var(--c); font: 700 13px var(--display); }
.path-card h3 { margin: 10px 0 6px; font: 700 19px var(--display); line-height: 1.5; }
.path-card p { margin-bottom: 14px; color: var(--muted); font-size: 14.5px; line-height: 1.75; }
.path-card ul {
  margin: 0 0 16px;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.path-card li a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.6;
  text-decoration: none;
}
.path-card li a::after { content: "←"; flex: none; color: var(--c); }
.path-card li a:hover { color: var(--c); }
.path-card .more {
  margin-top: auto;
  color: var(--c);
  font: 700 13.5px var(--display);
  text-decoration: none;
}
.section-cta { margin-top: 28px; text-align: center; }

@media (max-width: 980px) {
  .article-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "side" "main";
    gap: 28px;
    padding-top: 32px;
  }
  .toc-col { position: static; }
  .side-cta { display: none; }
  .guide-grid,
  .path-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .page-hero { padding: 108px 0 44px; }
  .page-hero h1 { font-size: clamp(26px, 7.4vw, 32px); }
  .prose { font-size: 16.5px; }
  .prose .lead { font-size: 17.5px; }
  .guide-grid,
  .path-grid { grid-template-columns: 1fr; }
  .cv-sample { padding: 20px 18px; }
  .cv-sample dl { grid-template-columns: 1fr; gap: 0; }
  .cv-sample dd { margin-bottom: 10px; }
}

/* ==========================================================
   مكتبة الأدلة: البحث، بطاقات الأقسام، بطاقات الأدلة
   ========================================================== */
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.lib-hero { padding-bottom: 96px; }
.lib-search {
  position: relative;
  max-width: 640px;
  margin-top: 30px;
}
.lib-search input {
  width: 100%;
  height: 58px;
  padding-inline: 52px 18px;
  background: var(--white);
  border: 2px solid transparent;
  border-radius: 0;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
  color: var(--ink);
  font: 500 16px var(--body);
}
.lib-search input::placeholder { color: #6f7780; }
.lib-search input:focus { outline: none; border-color: var(--gold); }
.lib-search-icon {
  position: absolute;
  inset-inline-start: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.library { padding-top: 0; }
.cat-tiles {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: -48px 0 44px;
}
.cat-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 20px 20px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--c);
  box-shadow: 0 14px 34px rgba(21, 23, 25, .08);
  color: var(--ink);
  font: inherit;
  text-align: right;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: 0 20px 44px rgba(21, 23, 25, .12); }
.cat-tile b { font: 700 19px var(--display); line-height: 1.4; }
.ct-num { color: var(--c); font: 700 13px var(--display); }
.ct-desc { color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.ct-count {
  margin-top: auto;
  padding-top: 10px;
  color: var(--c);
  font: 700 13px var(--display);
}
.cat-tile[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  border-top-color: var(--c-hi);
  color: var(--white);
}
.cat-tile[aria-pressed="true"] .ct-desc { color: #c8ced5; }
.cat-tile[aria-pressed="true"] .ct-num,
.cat-tile[aria-pressed="true"] .ct-count { color: var(--c-hi); }

.lib-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -20px 0 32px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 14.5px;
}
.lib-status .lib-reset {
  padding: 0;
  background: none;
  border: 0;
  color: var(--blue);
  font: 700 14px var(--display);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cat-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--c);
}
.cat-head h2 { margin-bottom: 4px; }
.cat-head p { margin: 0; }
.ch-num {
  color: var(--c);
  font: 700 46px/1 var(--display);
}
.ch-count {
  color: var(--c);
  font: 700 13px var(--display);
  white-space: nowrap;
}

.guide-card {
  position: relative;
  border-top: 3px solid var(--c);
}
.guide-card:hover { box-shadow: 0 16px 36px rgba(21, 23, 25, .08); }
.gc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.guide-card .gc-top .cat-tag { margin: 0; }
.gc-num { color: var(--muted); font: 700 13px var(--display); }
.guide-card p {
  display: -webkit-box;
  margin-bottom: 18px;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.gc-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.gc-go {
  margin-inline-start: auto;
  color: var(--c);
  font: 700 13px var(--display);
}
.gc-go::after { content: " ←"; }
/* أربع بطاقات تُعرض 2×2 بدل صف من ثلاث وبطاقة وحيدة */
.guide-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.guide-card:hover .gc-go { text-decoration: underline; text-underline-offset: 3px; }

.lib-empty {
  padding: 52px 24px;
  background: var(--white);
  border: 1px dashed #c9c1b2;
  text-align: center;
}
.lib-empty b { display: block; margin-bottom: 8px; font: 700 22px var(--display); }
.lib-empty p { margin-bottom: 22px; color: var(--muted); }
.lib-empty .hero-actions { justify-content: center; margin-top: 0; }

@media (max-width: 980px) {
  .cat-tiles { grid-template-columns: 1fr 1fr; }
  .cat-head { grid-template-columns: auto minmax(0, 1fr); }
  .ch-count { grid-column: 2; }
}

@media (max-width: 680px) {
  .lib-hero { padding-bottom: 84px; }
  .lib-search input { height: 54px; font-size: 15px; }
  .cat-tiles { gap: 8px; margin-top: -40px; }
  .cat-tile { padding: 14px 14px 12px; }
  .cat-tile b { font-size: 16px; }
  .ct-desc { display: none; }
  .ch-num { font-size: 34px; }
  .lib-status { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 680px) {
  .guide-grid.cols-2 { grid-template-columns: 1fr; }
}

/* ==========================================================
   المستشارون: ألوان المجالات، الصورة الرمزية، الباحث، البطاقات، الملف
   ========================================================== */
.f-medicine     { --c: var(--red);  --c-hi: #ef8178; }
.f-electrical   { --c: var(--blue); --c-hi: #74b3ea; }
.f-mechatronics { --c: var(--teal); --c-hi: #46c6b8; }
.f-mechanical   { --c: #9a6b00;     --c-hi: var(--gold); }
.f-computing    { --c: #6b4e9c;     --c-hi: #b39ae0; }
.f-architecture { --c: #8c6239;     --c-hi: #d9ab7c; }
.f-civil        { --c: #46607a;     --c-hi: #9db8d2; }

.avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--c, var(--ink));
  color: var(--white);
  font: 700 18px var(--display);
  letter-spacing: .04em;
  object-fit: cover;
}
.avatar.lg {
  width: 96px;
  height: 96px;
  font-size: 30px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .14);
}
img.avatar {
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(21, 23, 25, .08);
}
img.avatar.lg {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .16), 0 12px 30px rgba(0, 0, 0, .35);
}
.cn-lat {
  display: block;
  color: var(--muted);
  font: 500 12.5px var(--body);
}

/* الباحث: ثلاثة أسئلة في شريط واحد يتداخل مع رأس الصفحة */
.cons-hero { padding-bottom: 104px; }
.finder-sec { padding-top: 0; }
.finder {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: -52px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  box-shadow: 0 18px 44px rgba(21, 23, 25, .12);
}
.fd {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
}
.fd + .fd { border-inline-start: 1px solid var(--line); }
.fd label { color: var(--muted); font: 700 13px var(--display); }
.fd select {
  width: 100%;
  height: 48px;
  padding-inline: 14px 40px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23151719' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat left 14px center;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  font: 600 15px var(--body);
  appearance: none;
  cursor: pointer;
}
.fd select:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.fd select.is-set { background-color: #fbf4df; border-color: var(--gold); }

.finder-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 18px;
  color: var(--muted);
  font-size: 14.5px;
}
.fs-count b { color: var(--ink); font-family: var(--display); }
.finder-status .fs-reset {
  padding: 0;
  background: none;
  border: 0;
  color: var(--blue);
  font: 700 14px var(--display);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cons-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.cons-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--c);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.cons-card:hover { box-shadow: 0 16px 36px rgba(21, 23, 25, .08); transform: translateY(-2px); }
.cons-card.is-best { box-shadow: 0 0 0 2px var(--gold), 0 16px 36px rgba(21, 23, 25, .08); }
.cc-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}
.cc-head h3 { font: 700 17px var(--display); line-height: 1.4; }
.cc-head h3 a { color: var(--ink); text-decoration: none; }
.cc-head h3 a:hover { color: var(--c); }
.cc-title { margin-top: 2px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.cc-founder {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 8px;
  background: var(--gold);
  color: var(--ink);
  font: 700 11.5px var(--display);
  white-space: nowrap;
}
.cc-match { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-match span {
  display: none;
  padding: 3px 9px;
  background: #e5f3f1;
  color: #07675e;
  font: 700 12px var(--display);
}
.cc-match span.on { display: inline-flex; }
.cc-match .m-full { background: var(--ink); color: var(--white); }
.cc-summary {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.8;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}
.cc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chip {
  padding: 4px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  font: 600 12.5px var(--display);
}
.chip-soft { color: var(--muted); }
.cc-topics { color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.cc-topics b { color: var(--ink); font-family: var(--display); }
.cc-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.cc-foot .btn { min-height: 44px; padding: 10px 12px; font-size: 14px; }

/* صفحة المستشار */
.prof-head {
  display: flex;
  align-items: center;
  gap: 24px;
}
.prof-head h1 { margin-bottom: 6px; }
.prof-head h1 .cn-lat { margin-top: 6px; color: #aab2bb; font-size: 15px; }
.prof-head .cat-tag { margin-bottom: 10px; }
.prof-hero .hero-actions { margin-top: 28px; }
.prof-facts {
  padding: 6px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--c);
}
.prof-facts dl { margin: 0; }
.prof-facts dl > div { padding: 12px 0; }
.prof-facts dl > div + div { border-top: 1px solid var(--line); }
.prof-facts dt { color: var(--muted); font-size: 12.5px; }
.prof-facts dd { margin: 2px 0 0; color: var(--ink); font: 600 15px var(--display); line-height: 1.6; }

/* الصفحة الرئيسية: المجالات وعدد المستشارين */
.home-fields { margin: 14px 0 18px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.home-fields a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
  text-decoration: none;
}
.home-fields a:hover { color: var(--red); }
.hc-count {
  min-width: 28px;
  padding: 2px 8px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--muted);
  font: 700 12.5px var(--display);
  text-align: center;
}

@media (max-width: 980px) {
  .finder { grid-template-columns: 1fr; }
  .fd + .fd { border-inline-start: 0; border-top: 1px solid var(--line); }
  .cons-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .cons-hero { padding-bottom: 92px; }
  .finder { margin-top: -44px; }
  .fd { padding: 14px 16px; }
  .cons-grid { grid-template-columns: 1fr; }
  .prof-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .avatar.lg { width: 76px; height: 76px; font-size: 24px; }
  .finder-status { flex-direction: column; align-items: flex-start; }
}

/* الصفحة الرئيسية: وجوه المستشارين */
.face-stack {
  display: flex;
  align-items: center;
  margin: 14px 0 6px;
  padding-inline-start: 10px;
}
.face-stack a {
  margin-inline-start: -10px;
  border-radius: 50%;
  transition: transform .18s ease;
}
.face-stack a:hover { position: relative; z-index: 1; transform: translateY(-3px); }
.face-stack .avatar {
  width: 48px;
  height: 48px;
  box-shadow: 0 0 0 3px #f9f8f4;
}
.face-more {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--ink);
  box-shadow: 0 0 0 3px #f9f8f4;
  color: var(--white);
  font: 700 14px var(--display);
  text-decoration: none;
}

/* الصفحة الرئيسية: خيارات البداية الثلاثة */
.start { margin-top: 32px; max-width: 690px; }
.start-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: #cfd4d9;
  font: 700 13px var(--display);
}
.start-label::after {
  content: "";
  width: 42px;
  height: 1px;
  background: rgba(255, 255, 255, .35);
}
.start-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.start-opt {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 78px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .3);
  backdrop-filter: blur(10px);
  color: var(--white);
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.start-opt b {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font: 700 16px var(--display);
  line-height: 1.4;
}
.start-opt b::after { content: "←"; opacity: .7; }
.start-opt span { color: #cfd4d9; font-size: 13px; line-height: 1.5; }
.start-opt:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .16); }
.start-opt.is-primary { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.start-opt.is-primary span { color: #4a3d14; }
.start-opt.is-primary:hover { background: #ffd563; }

@media (max-width: 680px) {
  .start-options { grid-template-columns: 1fr; gap: 8px; }
  .start-opt { min-height: 0; padding: 12px 14px; }
}

/* من نحن: الشعار الكامل بجانب النص */
.about-head {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  margin-bottom: 34px;
}
.about-head p { margin-top: 14px; color: var(--muted); font-size: 16px; max-width: 62ch; }
.about-logo {
  margin: 0;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(21, 23, 25, .06);
}
.about-logo img { width: 100%; height: auto; }

@media (max-width: 980px) {
  .about-head { grid-template-columns: 1fr; gap: 24px; }
  .about-logo { max-width: 260px; }
}

/* ==========================================================
   التنقل على الجوال، التركيز، الحركة، وتفاصيل القراءة
   ========================================================== */
.skip-link {
  position: fixed;
  top: 10px;
  inset-inline-start: 10px;
  z-index: 50;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--white);
  font: 700 14px var(--display);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .18s ease;
}
.skip-link:focus { transform: none; }

/* زر القائمة: يظهر فقط حين تختفي الروابط، ويفتح لوحة تحت الشريط */
@media (max-width: 980px) {
  .nav { position: relative; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 14px;
    background: var(--ink);
    border: 0;
    color: var(--white);
    font: 700 14px var(--display);
    cursor: pointer;
  }
  .nav-toggle-icon,
  .nav-toggle-icon::before,
  .nav-toggle-icon::after {
    display: block;
    width: 16px;
    height: 2px;
    background: currentColor;
    transition: transform .18s ease, background .18s ease;
  }
  .nav-toggle-icon { position: relative; }
  .nav-toggle-icon::before,
  .nav-toggle-icon::after { content: ""; position: absolute; inset-inline-start: 0; }
  .nav-toggle-icon::before { top: -5px; }
  .nav-toggle-icon::after { top: 5px; }
  .nav.open .nav-toggle-icon { background: transparent; }
  .nav.open .nav-toggle-icon::before { transform: translateY(5px) rotate(45deg); }
  .nav.open .nav-toggle-icon::after { transform: translateY(-5px) rotate(-45deg); }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: 0 18px 44px rgba(21, 23, 25, .18);
    font-size: 16px;
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a {
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    font-weight: 600;
  }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links .nav-cta {
    margin-top: 8px;
    padding: 13px 12px;
    text-align: center;
  }
}

/* أقسام داكنة: العنوان الصغير بالذهبي بدل الأحمر */
.band .kicker,
.teacher .kicker { color: var(--gold); }

/* التركيز بلوحة المفاتيح: أزرق على الخلفيات الفاتحة، ذهبي على الداكنة */
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.hero :focus-visible,
.page-hero :focus-visible,
.band :focus-visible,
.teacher :focus-visible,
.side-cta :focus-visible,
.sticky :focus-visible,
footer :focus-visible { outline-color: var(--gold); }

/* طول سطر مريح للقراءة الطويلة */
.prose { max-width: 72ch; }

/* بدون JavaScript يظهر المحتوى كاملاً بلا حركة */
@media (scripting: none) {
  .rise { opacity: 1; transform: none; }
}

/* من يفضّل تقليل الحركة: بلا تمرير ناعم ولا ظهور متحرك ولا قفزات عند المرور */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
  .rise { opacity: 1; transform: none; }
  .btn:hover,
  .guide-card:hover,
  .cons-card:hover,
  .cat-tile:hover,
  .start-opt:hover,
  .face-stack a:hover { transform: none; }
}

/* النموذج: حين يتعذر الإرسال التلقائي */
.form-fallback {
  max-width: 560px;
  margin: 18px auto 0;
  padding: 18px 20px;
  background: #fbeceb;
  border-inline-start: 4px solid var(--red);
  text-align: center;
}
.form-fallback b { display: block; font: 700 17px var(--display); }
.form-fallback p { margin: 4px 0 14px; color: var(--muted); font-size: 14.5px; }
.form-fallback-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 680px) {
  .form-fallback-actions { grid-template-columns: 1fr; }
}

/* الجوال: أرقام الهيرو في صف واحد مضغوط بدل ثلاث كتل فوق بعضها */
@media (max-width: 680px) {
  .hero-proof { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 28px; }
  .proof-item { padding: 12px 10px; }
  .proof-item b { font-size: 21px; }
  .proof-item span { display: block; font-size: 12px; line-height: 1.5; }
}

/* ==========================================================
   خطتك إلى ألمانيا: الأسئلة الثلاثة والخطوات
   ========================================================== */
.plan {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.plan-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 32px;
  align-items: start;
}
.plan-q {
  margin: 0;
  padding: 0 0 22px;
  border: 0;
  min-width: 0;
}
.plan-q + .plan-q { padding-top: 20px; border-top: 1px solid var(--line); }
.plan-q legend {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  font: 700 18px var(--display);
}
.plan-q legend span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
}
.plan-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.plan-chip {
  min-height: 44px;
  padding: 9px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  font: 600 15px var(--display);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.plan-chip:hover { border-color: var(--ink); }
.plan-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.plan-chip[aria-pressed="true"]::before { content: "✓ "; color: var(--gold); }

.plan-result {
  position: sticky;
  top: 96px;
  padding: 22px;
  background: #f9f8f4;
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  scroll-margin-top: 90px;
}
.plan-empty { padding: 26px 8px; text-align: center; }
.plan-empty b { display: block; margin-bottom: 6px; font: 700 21px var(--display); }
.plan-empty p { max-width: 42ch; margin: 0 auto 16px; color: var(--muted); font-size: 15px; }
.plan-progress {
  display: inline-block;
  padding: 4px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--muted);
  font: 700 13px var(--display);
}
.plan-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 14px;
}
.plan-head b { font: 700 20px var(--display); }
.plan-head span { color: var(--muted); font-size: 13.5px; }
.plan-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.plan-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 12px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--c, var(--ink));
  color: var(--ink);
  text-decoration: none;
  counter-increment: step;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.plan-step::before {
  content: counter(step);
  grid-row: 1 / span 3;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  font: 700 13px var(--display);
}
.plan-step:hover { border-color: var(--ink); box-shadow: 0 10px 24px rgba(21, 23, 25, .08); }
.ps-stage { color: var(--c, var(--muted)); font: 700 12px var(--display); }
.plan-step b { font: 700 16px var(--display); line-height: 1.5; }
.plan-step b::after { content: " ←"; color: var(--c, var(--ink)); }
.ps-desc {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.plan-step.is-consult { --c: #8a6200; background: #fbf6e6; border-inline-start-color: var(--gold); }
.plan-step.is-consult::before { background: var(--gold); border-color: var(--gold); }
.plan-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.plan-actions .btn { min-height: 46px; padding: 10px 14px; font-size: 14px; }
.plan-nojs { display: none; color: var(--muted); }

@media (scripting: none) {
  .plan-box { display: none; }
  .plan-nojs { display: block; }
}
@media (max-width: 980px) {
  .plan-box { grid-template-columns: 1fr; gap: 20px; }
  .plan-result { position: static; }
}
@media (max-width: 680px) {
  .plan-chip { flex: 1 1 calc(50% - 8px); padding: 9px 10px; font-size: 14.5px; }
  .plan-result { padding: 16px 14px; }
  .plan-actions { grid-template-columns: 1fr; }
}

/* ==========================================================
   نهاية الدليل: المشاركة والخطوة التالية
   ========================================================== */
.prose .btn { text-decoration: none; }
.prose .btn-primary { color: var(--ink); }
.prose .btn-outline { color: var(--ink); }
.share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid var(--line);
}
.share-row span { flex: 1 1 220px; color: var(--ink); font: 700 16px var(--display); }
.share-row .btn { min-height: 46px; padding: 10px 18px; font-size: 14px; }
.guide-nav { display: grid; gap: 10px; }
.prose .next-step {
  display: grid;
  gap: 4px;
  padding: 22px 24px;
  background: var(--ink);
  border-inline-start: 6px solid var(--c-hi, var(--gold));
  color: var(--white);
  text-decoration: none;
  transition: background .15s ease;
}
.prose .next-step:hover { background: #262b30; }
.ns-label { color: var(--c-hi, var(--gold)); font: 700 13px var(--display); }
.next-step b { color: var(--white); font: 700 21px var(--display); line-height: 1.5; }
.next-step b::after { content: " ←"; color: var(--c-hi, var(--gold)); }
.ns-desc {
  display: -webkit-box;
  overflow: hidden;
  color: #c8ced5;
  font-size: 14.5px;
  line-height: 1.8;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.prose .prev-step {
  justify-self: start;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}
.prose .prev-step::before { content: "→ "; }
.prose .prev-step:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 680px) {
  .share-row .btn { flex: 1 1 100%; }
}

/* ==========================================================
   زر واتساب العائم
   ========================================================== */
.wa-fab {
  position: fixed;
  bottom: 22px;
  inset-inline-start: 22px;
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 54px;
  padding-inline: 16px 20px;
  background: #0f7a43;
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(15, 122, 67, .35);
  color: var(--white);
  font: 700 15px var(--display);
  text-decoration: none;
  transition: transform .18s ease, background .18s ease;
}
.wa-fab:hover { background: #0c6638; transform: translateY(-2px); }
.wa-fab:focus-visible { outline-color: var(--ink); }
body:has(.nav.open) .wa-fab { display: none; }
@media (max-width: 680px) {
  .wa-fab {
    width: 56px;
    height: 56px;
    justify-content: center;
    padding: 0;
    bottom: 16px;
    inset-inline-start: 16px;
  }
  .wa-fab span { display: none; }
  body:has(.sticky) .wa-fab { bottom: 86px; }
  footer { padding-bottom: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-fab:hover { transform: none; }
}

/* تلميح تحت الباحث: الأسئلة اختيارية، واختيار واحد يكفي */
.finder-hint { margin-top: 14px; color: var(--muted); font-size: 14px; }
.finder-hint + .finder-status { margin-top: 10px; }

/* ==========================================================
   مساعد بوصلة: الزر العائم ونافذة المحادثة
   ========================================================== */
.chat-fab {
  position: fixed;
  bottom: 22px;
  inset-inline-start: 22px;
  z-index: 26;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 54px;
  padding-inline: 16px 20px;
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(21, 23, 25, .32);
  color: var(--white);
  font: 700 15px var(--display);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}
.chat-fab svg { color: var(--gold); }
.chat-fab:hover { background: #2c3238; transform: translateY(-2px); }
.chat-fab:focus-visible { outline-color: var(--gold); }
.chat-fab[aria-expanded="true"] { background: #2c3238; }
body:has(.nav.open) .chat-fab { display: none; }

.chat {
  position: fixed;
  bottom: 88px;
  inset-inline-start: 22px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 44px));
  height: min(620px, calc(100vh - 120px));
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  box-shadow: 0 24px 60px rgba(21, 23, 25, .28);
}
.chat[hidden] { display: none; }
.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.chat-logo { width: 36px; height: 36px; flex: none; }
.chat-title { display: grid; flex: 1; min-width: 0; line-height: 1.35; }
.chat-title b { font: 700 16px var(--display); }
.chat-title span { color: var(--muted); font-size: 12.5px; }
.chat-mail {
  padding: 6px 12px;
  background: var(--ink);
  color: var(--white);
  font: 700 12.5px var(--display);
  text-decoration: none;
}
.chat-mail:hover { background: #2c3238; }
.chat-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.chat-close:hover { border-color: var(--ink); }

.chat-log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.chat-msg {
  max-width: 88%;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 1.85;
}
.chat-msg p + p { margin-top: 8px; }
.chat-msg ul { display: grid; gap: 4px; margin: 6px 0; padding-inline-start: 18px; }
.chat-msg.is-user {
  align-self: flex-start;
  background: var(--ink);
  color: var(--white);
}
.chat-msg.is-bot {
  align-self: flex-end;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
}
.chat-msg.is-error { background: #fbeceb; border-color: #efc9c5; }
.chat-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chat-sources a {
  padding: 4px 10px;
  background: #fbf6e6;
  border: 1px solid #ead9a6;
  color: var(--ink);
  font: 600 13px var(--display);
  text-decoration: none;
}
.chat-sources a::after { content: " ←"; color: #8a6200; }
.chat-sources a:hover { border-color: var(--ink); }
.chat-suggest { display: grid; gap: 6px; margin-top: 12px; }
.chat-suggest button {
  padding: 8px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  font: 600 13.5px var(--display);
  text-align: start;
  cursor: pointer;
}
.chat-suggest button:hover { border-color: var(--ink); }
.chat-typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.chat-typing i {
  width: 7px;
  height: 7px;
  background: var(--muted);
  border-radius: 50%;
  animation: chat-dot 1s infinite ease-in-out;
}
.chat-typing i:nth-child(2) { animation-delay: .15s; }
.chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.chat-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  background: var(--white);
  border-top: 1px solid var(--line);
}
.chat-form textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  font: 15px/1.6 var(--body);
  resize: none;
}
.chat-form textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
.chat-send {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--gold);
  border: 0;
  color: var(--ink);
  cursor: pointer;
}
.chat-send:disabled { opacity: .5; cursor: wait; }
.chat-note {
  padding: 8px 14px 10px;
  background: var(--white);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.chat-new {
  padding: 0;
  background: none;
  border: 0;
  color: var(--blue);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 680px) {
  .chat-fab {
    width: 56px;
    height: 56px;
    justify-content: center;
    padding: 0;
    bottom: 16px;
    inset-inline-start: 16px;
  }
  .chat-fab span { display: none; }
  body:has(.sticky) .chat-fab { bottom: 86px; }
  .chat {
    inset: 0;
    width: auto;
    height: auto;
    border: 0;
  }
  body.chat-open { overflow: hidden; }
  body.chat-open .chat-fab { display: none; }
  .chat-msg { max-width: 92%; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-typing i { animation: none; opacity: .6; }
  .chat-fab:hover { transform: none; }
}

/* زر التواصل العائم (بريد حين لا يكون المساعد منشوراً) */
.contact-fab {
  position: fixed;
  bottom: 22px;
  inset-inline-start: 22px;
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 54px;
  padding-inline: 16px 20px;
  background: var(--ink);
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(21, 23, 25, .32);
  color: var(--white);
  font: 700 15px var(--display);
  text-decoration: none;
  transition: transform .18s ease, background .18s ease;
}
.contact-fab svg { color: var(--gold); }
.contact-fab:hover { background: #2c3238; transform: translateY(-2px); }
.contact-fab:focus-visible { outline-color: var(--gold); }
body:has(.nav.open) .contact-fab { display: none; }
@media (max-width: 680px) {
  .contact-fab {
    width: 56px;
    height: 56px;
    justify-content: center;
    padding: 0;
    bottom: 16px;
    inset-inline-start: 16px;
  }
  .contact-fab span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .contact-fab:hover { transform: none; }
}

/* المساعد: المستشار المقترح باسمه ورابط ملفه وزر حجز بالبريد */
.chat-person {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--gold);
}
.cp-name {
  color: var(--ink);
  font: 700 14.5px var(--display);
  text-decoration: none;
}
.cp-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.cp-book {
  padding: 6px 12px;
  background: var(--gold);
  color: var(--ink);
  font: 700 13px var(--display);
  text-decoration: none;
  white-space: nowrap;
}
.cp-book:hover { background: #ffd563; }

/* المساعد: فقرة «التوصية» في نهاية الجواب */
.chat-msg .chat-rec {
  margin-top: 10px;
  padding: 10px 12px;
  background: #fbf6e6;
  border-inline-start: 3px solid var(--gold);
  color: var(--ink);
}

/* ==========================================================
   المساعد بمظهر تطبيق محادثة: رأس داكن بحالة «متصل»، فقاعات مستديرة،
   صورة المساعد بجانب رسائله، ووقت كل رسالة، وترحيب فوق الزر
   ========================================================== */
.chat {
  border-radius: 16px;
  border: 0;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(21, 23, 25, .32);
}
.chat-head { background: var(--ink); border-bottom: 3px solid var(--gold); }
.chat-logo { width: 40px; height: 40px; padding: 4px; background: var(--white); border-radius: 50%; }
.chat-title b { color: var(--white); }
.chat-status { display: inline-flex; align-items: center; gap: 6px; color: #c8ced5; }
.chat-status i,
.chat-dot {
  width: 8px;
  height: 8px;
  flex: none;
  background: #2fbf71;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(47, 191, 113, .6);
  animation: chat-online 2.4s infinite;
}
@keyframes chat-online {
  0% { box-shadow: 0 0 0 0 rgba(47, 191, 113, .55); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(47, 191, 113, 0); }
}
.chat-mail { background: rgba(255, 255, 255, .12); border-radius: 999px; }
.chat-mail:hover { background: rgba(255, 255, 255, .22); }
.chat-close { border-color: rgba(255, 255, 255, .25); border-radius: 50%; color: var(--white); }
.chat-close:hover { border-color: var(--white); }

.chat-log { gap: 12px; background: #f3f1ea; }
.chat-msg {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 10px 14px 6px;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(21, 23, 25, .06);
}
.chat-msg.is-user {
  align-self: flex-end;
  border-end-end-radius: 4px;
}
.chat-msg.is-bot {
  align-self: flex-start;
  margin-inline-start: 38px;
  border: 0;
  border-start-start-radius: 4px;
}
.chat-msg.is-bot::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: -38px;
  width: 30px;
  height: 30px;
  background: var(--white) url("logo-mark.png") center / 22px no-repeat;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.chat-msg.is-error { background: #fbeceb; }
.cm-time {
  align-self: flex-end;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.chat-msg.is-user .cm-time { color: rgba(255, 255, 255, .6); }
.chat-sources a,
.chat-suggest button,
.chat-person { border-radius: 10px; }
.cp-book { border-radius: 999px; }
.chat-msg .chat-rec { border-radius: 10px; }
.chat-form { gap: 10px; }
.chat-form textarea { border-radius: 22px; padding: 10px 16px; }
.chat-send { border-radius: 50%; }

.chat-fab { position: fixed; }
.chat-dot {
  position: absolute;
  top: 6px;
  inset-inline-start: 10px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--ink);
  box-sizing: content-box;
}

.chat-nudge {
  position: fixed;
  bottom: 90px;
  inset-inline-start: 22px;
  z-index: 26;
  display: flex;
  align-items: flex-start;
  max-width: 310px;
  background: var(--white);
  border-radius: 16px;
  border-end-start-radius: 4px;
  box-shadow: 0 18px 44px rgba(21, 23, 25, .22);
  animation: chat-nudge-in .35s ease-out;
}
@keyframes chat-nudge-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.chat-nudge-open {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 4px 14px 14px;
  background: none;
  border: 0;
  color: var(--ink);
  font: 14px/1.7 var(--body);
  text-align: start;
  cursor: pointer;
}
.chat-nudge-open img { flex: none; padding: 3px; background: var(--paper); border-radius: 50%; }
.chat-nudge-open b { display: block; font: 700 14px var(--display); }
.chat-nudge-close {
  flex: none;
  width: 28px;
  height: 28px;
  margin: 6px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.chat-nudge-close:hover { color: var(--ink); }
body:has(.nav.open) .chat-nudge,
body.chat-open .chat-nudge { display: none; }

@media (max-width: 680px) {
  .chat { border-radius: 0; }
  .chat-dot { top: 8px; inset-inline-start: 8px; }
  .chat-nudge { bottom: 82px; inset-inline: 16px; max-width: none; }
  body:has(.sticky) .chat-nudge { bottom: 152px; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-status i, .chat-dot { animation: none; }
  .chat-nudge { animation: none; }
}

/* المساعد: أزرار الإجابة السريعة تحت سؤاله */
.chat-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chat-options button {
  padding: 7px 14px;
  background: var(--white);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font: 700 13.5px var(--display);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.chat-options button:hover { background: var(--ink); color: var(--white); }

/* «ما يميّزه»: أقوى نقطة في تجربة المستشار، بارزة على البطاقة وفي رأس صفحته */
.cc-edge {
  margin: 0;
  padding: 10px 12px;
  background: #fbf6e6;
  border-inline-start: 3px solid var(--gold);
  color: var(--ink);
  font: 600 14px/1.7 var(--display);
}
.cc-edge span,
.prof-edge span {
  display: block;
  margin-bottom: 2px;
  color: #8a6200;
  font: 700 11.5px var(--display);
}
.prof-edge {
  max-width: 60ch;
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(240, 189, 45, .12);
  border-inline-start: 3px solid var(--gold);
  color: var(--white);
  font: 600 16px/1.7 var(--display);
}
.prof-edge span { color: var(--gold); }

/* صفحة المستشار: أبرز الإنجازات في بطاقات، عنوان بالنتيجة ثم التفاصيل */
.prose .achievements {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  background: #f0ece2;
  border: 1px solid var(--line);
}
.ach {
  position: relative;
  padding: 18px 18px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--c, var(--gold));
  box-shadow: 0 8px 20px rgba(21, 23, 25, .04);
}
.ach-num {
  display: block;
  margin-bottom: 8px;
  color: var(--c, #8a6200);
  font: 700 12.5px var(--display);
}
.prose .ach b {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font: 700 17px/1.5 var(--display);
}
.prose .ach p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}
@media (max-width: 680px) {
  .prose .achievements { grid-template-columns: 1fr; padding: 10px; }
}
/* إنجاز أخير منفرد في الصف يأخذ العرض كاملاً */
.prose .ach:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ---------------------------------------------------------------- صفحة حجز الاستشارة */
.booking {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding-block: 40px 72px;
}
.bk-side {
  position: sticky;
  top: 96px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--c, var(--gold));
}
.bk-who { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.bk-who .avatar.lg { width: 72px; height: 72px; font-size: 22px; }
.bk-who b { display: block; font: 700 17px/1.5 var(--display); }
.bk-who span { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.bk-facts { display: grid; gap: 12px; margin: 0 0 16px; padding: 16px 0 0; list-style: none; border-top: 1px solid var(--line); }
.bk-facts span { display: block; color: var(--muted); font-size: 12.5px; }
.bk-facts b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.7; }
.bk-note { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.bk-back { color: var(--ink); font-size: 14px; font-weight: 600; }

.bk-main {
  min-width: 0;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
}
.bk-main h2 { margin-bottom: 18px; font: 700 22px/1.4 var(--display); }
.bk-hint { margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }

.bk-steps { display: flex; gap: 6px; margin: 0 0 26px; padding: 0; list-style: none; counter-reset: bk; }
.bk-steps li {
  flex: 1;
  padding-top: 10px;
  border-top: 3px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.bk-steps li::before { counter-increment: bk; content: counter(bk) ". "; }
.bk-steps li.is-on { border-color: var(--c, var(--gold)); color: var(--ink); }
.bk-steps li.is-done { border-color: var(--ink); color: var(--ink); }

.bk-durs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bk-dur { position: relative; cursor: pointer; }
.bk-dur input { position: absolute; opacity: 0; pointer-events: none; }
.bk-dur-box {
  display: grid;
  gap: 4px;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: border-color .15s, box-shadow .15s;
}
.bk-dur-box b { font: 700 20px var(--display); }
.bk-dur-box span { color: var(--c, var(--teal)); font: 700 26px var(--display); }
.bk-dur:hover .bk-dur-box { border-color: var(--ink); }
.bk-dur input:checked + .bk-dur-box { border-color: var(--c, var(--gold)); box-shadow: inset 0 0 0 2px var(--c, var(--gold)); background: var(--white); }
.bk-dur input:focus-visible + .bk-dur-box { outline: 2px solid var(--gold); outline-offset: 2px; }

.bk-pick { display: grid; grid-template-columns: minmax(0, 360px) minmax(150px, 210px); gap: 32px; align-items: start; }
.bk-cal { min-width: 0; }
.bk-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.bk-cal-head b { font: 700 16px var(--display); }
.bk-prev, .bk-next {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
}
.bk-prev:disabled, .bk-next:disabled { opacity: .35; cursor: default; }
.bk-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.bk-wd { padding-bottom: 4px; color: var(--muted); font-size: 11.5px; text-align: center; white-space: nowrap; }
.bk-day {
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #a9adb3;
  font: 600 15px var(--display);
}
.bk-day:not(:disabled) { background: #eaf3f2; color: var(--teal); cursor: pointer; }
.bk-day:not(:disabled):hover { background: #d3e9e6; }
.bk-day.is-on, .bk-day.is-on:hover { background: var(--ink); color: var(--white); }
.bk-loading, .bk-empty { grid-column: 1 / -1; margin: 0; padding: 22px 0; color: var(--muted); }
.bk-times { display: grid; gap: 10px; align-content: start; }
.bk-times-title { grid-column: 1 / -1; font: 700 15px var(--display); }
.bk-time {
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 10px;
  border: 1px solid var(--c, var(--teal));
  background: var(--white);
  color: var(--c, var(--teal));
  font: 700 16px var(--display);
  cursor: pointer;
}
.bk-time small { color: var(--muted); font: 500 11.5px var(--body); }
.bk-time:hover { background: var(--c, var(--teal)); color: var(--white); }
.bk-time:hover small { color: rgba(255, 255, 255, .85); }
.bk-tz { margin: 14px 0 18px; color: var(--muted); font-size: 13px; }

.bk-form { max-width: none; margin-top: 18px; }
.bk-form .field label small { color: var(--muted); font-weight: 400; }
.bk-agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.7; }
.bk-agree input { margin-top: 5px; flex: none; width: 18px; height: 18px; accent-color: var(--ink); }
.bk-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.reg-form .bk-actions .btn { margin-top: 0; }
.reg-form .bk-actions .btn-outline { width: auto; }
.bk-error { margin: 12px 0 0; padding: 12px 14px; background: #fbeceb; color: var(--red); font-size: 14px; line-height: 1.7; }

.bk-summary { display: grid; gap: 0; margin-bottom: 16px; border: 1px solid var(--line); }
.bk-summary p { display: flex; justify-content: space-between; gap: 16px; margin: 0; padding: 12px 16px; font-size: 14.5px; }
.bk-summary p + p { border-top: 1px solid var(--line); }
.bk-summary span { color: var(--muted); flex: none; }
.bk-summary b { text-align: left; font-weight: 600; }
.bk-hold { margin: 0 0 16px; padding: 12px 14px; background: #fbf6e6; color: #6d5000; font-size: 14px; }
.bk-hold:empty { display: none; }
.bk-paypal { max-width: 420px; min-height: 48px; }
.bk-paynote { margin: 0 0 16px; line-height: 1.9; font-size: 14.5px; }

.bk-done { text-align: center; padding: 18px 0; }
.bk-check {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  font-size: 30px;
}
.bk-done p { max-width: 52ch; margin: 0 auto 12px; line-height: 1.9; }
.bk-done-when { font: 700 17px/1.7 var(--display); }
.bk-meet { margin: 6px 0 10px; }

.bk-offline { margin-top: 20px; padding: 20px; background: var(--paper); border: 1px solid var(--line); }
.bk-offline b { display: block; font: 700 17px var(--display); }
.bk-offline p { margin: 6px 0 14px; color: var(--muted); }

@media (max-width: 980px) {
  .booking { grid-template-columns: 1fr; }
  .bk-pick { grid-template-columns: 1fr; gap: 22px; }
  .bk-times { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .bk-cal { max-width: 420px; }
  .bk-side { position: static; order: 2; }
}
@media (max-width: 680px) {
  .booking { padding-block: 20px 48px; gap: 18px; }
  .bk-cal { max-width: none; }
  .bk-main { padding: 20px 16px; }
  .bk-steps li { font-size: 12px; }
  .bk-durs { grid-template-columns: 1fr; }
  .bk-actions { grid-template-columns: 1fr; }
  .reg-form .bk-actions .btn-outline { width: 100%; order: 2; }
}
.bk-panel { padding: 0; }
