/* ——— كل أقسام الموقع بنفس المسافات (زي سكاشن الرئيسية) ——— */
.section,
.sq-block,
.oz-like,
.oz-tools-strip,
.oz-faq {
  padding-block: 2.3rem 0.75rem;
}

/* ——— «ملفات مشابهة»: تاخد نفس عرض المحتوى بالظبط (زي المرجع) ——— */
.x-section > .x-wrap {
  width: 100%;
}

/* ——— كارت بيانات الملف: مضغوط + أيقونة لكل صف + أنيميشن ——— */
.oz-spec-card {
  position: relative;
  border: 1px solid #e7e3f8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgb(24 20 60 / 0.07);
  overflow: hidden;
  animation: ozSpecIn 0.45s ease both;
}

@keyframes ozSpecIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.oz-spec-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border-bottom: 1px solid #e7e3f8;
  background: linear-gradient(180deg, #f8f5ff, #efeaff);
}

.oz-spec-head-ico {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 9px;
  background: #fff;
  color: #5b4bcc;
  box-shadow: 0 4px 12px rgb(91 75 204 / 0.18);
}

.oz-spec-head-ico .i {
  width: 16px;
  height: 16px;
}

.oz-spec-head b {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 900;
  color: var(--ink);
}

.oz-spec-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-inline-start: auto;
  padding: 3px 10px;
  border: 1px solid #d7efe3;
  border-radius: 999px;
  background: #fff;
  color: #0f9f6e;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.oz-spec-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: ozSpecPulse 1.8s ease-in-out infinite;
}

@keyframes ozSpecPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

.oz-spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.oz-spec-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-bottom: 1px solid #f1eefb;
  border-inline-end: 1px solid #f1eefb;
  animation: ozSpecRowIn 0.4s ease both;
  animation-delay: calc(var(--i, 0) * 40ms);
  transition: background-color 0.18s ease;
}

.oz-spec-row:nth-of-type(2n) {
  border-inline-end: 0;
}

.oz-spec-row.is-full {
  grid-column: 1 / -1;
  border-inline-end: 0;
}

.oz-spec-row:last-child {
  border-bottom: 0;
}

.oz-spec-row:hover {
  background: #faf8ff;
}

@keyframes ozSpecRowIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.oz-spec-ico {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--ic, #5b4bcc) 12%, #fff);
  color: var(--ic, #5b4bcc);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.oz-spec-ico .i {
  width: 14px;
  height: 14px;
}

.oz-spec-row:hover .oz-spec-ico {
  transform: translateY(-2px) scale(1.08) rotate(-5deg);
  box-shadow: 0 6px 14px color-mix(in srgb, var(--ic, #5b4bcc) 28%, transparent);
}

.oz-spec-txt {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.oz-spec-txt small {
  color: #8b88a6;
  font-size: 0.68rem;
  font-weight: 800;
}

.oz-spec-txt b {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

/* العنوان الطويل بيتقصّر لسطرين — والنص كامل في tooltip */
.oz-spec-row.is-full .oz-spec-txt b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ——— أزرار الملف: حركة عند الهوفر + لمعة على زر التحميل ——— */
.oz-taq-meta .oz-file-act {
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.oz-taq-meta .oz-file-act:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgb(24 20 60 / 0.1);
}

.oz-taq-meta .oz-file-act .i {
  transition: transform 0.2s ease;
}

.oz-taq-meta .oz-file-act:hover .i {
  transform: scale(1.1) rotate(-4deg);
}

.oz-taq-meta .oz-file-act.is-main {
  position: relative;
  overflow: hidden;
}

.oz-taq-meta .oz-file-act.is-main::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 32%, rgb(255 255 255 / 0.24) 46%, transparent 60%);
  transform: translateX(-130%);
  animation: ozSpecSheen 3.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ozSpecSheen {
  0%, 62% { transform: translateX(-130%); }
  82%, 100% { transform: translateX(130%); }
}

@media (prefers-reduced-motion: reduce) {
  .oz-spec-card,
  .oz-spec-row,
  .oz-spec-chip::before,
  .oz-taq-meta .oz-file-act.is-main::after {
    animation: none;
  }
}

/* ——— أزرار الملف: كروت مضغوطة أفقية، كلها نفس المقاس، والتحميل بلون البراند ——— */
.oz-taq-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* صفحة الملف: عرض كامل + ارتفاع معقول للـ PDF (لا يتضغط لما السايدبار يكبر بعد الإعلان) */
.sq-page.oz-file-page .oz-taq-board {
  width: 100%;
  min-width: 0;
}

.sq-page.oz-file-page .oz-taq-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

@media (min-width: 960px) {
  .sq-page.oz-file-page .oz-taq-doc {
    min-height: min(72vh, 680px);
  }

  .sq-page.oz-file-page .oz-taq-doc .sq-frame {
    min-height: calc(min(72vh, 680px) - 4.5rem);
  }
}

@media (max-width: 959px) {
  .sq-page.oz-file-page .oz-taq-meta {
    display: flex !important;
    width: 100%;
    min-width: 0;
  }

  .sq-page.oz-file-page .oz-spec-grid {
    grid-template-columns: 1fr;
  }

  .sq-page.oz-file-page .oz-spec-row {
    border-inline-end: 0;
  }
}

.oz-taq-meta .oz-file-acts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
}

.oz-taq-meta .oz-file-act {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 9px 12px;
  border: 1px solid #e7e3f8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 18px rgb(24 20 60 / 0.05);
  text-align: start;
}

.oz-taq-meta .oz-file-act b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.oz-taq-meta .oz-file-act .i {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 8px;
  box-sizing: content-box;
  border-radius: 10px;
  background: #f3f0ff;
  color: #5b4bcc;
}

.oz-taq-meta .oz-file-act b {
  grid-column: 2;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.25;
}

.oz-taq-meta .oz-file-act small {
  grid-column: 2;
  color: #6b6788;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.3;
}

.oz-taq-meta .oz-file-act:hover {
  border-color: #d9d2f6;
  background: #faf8ff;
}

.oz-taq-meta .oz-file-act.is-main {
  border-color: transparent;
  background: linear-gradient(140deg, #6a55d8, #43308f);
  color: #fff;
  box-shadow: 0 12px 24px rgb(91 75 204 / 0.3);
}

.oz-taq-meta .oz-file-act.is-main .i {
  background: rgb(255 255 255 / 0.18);
  color: #fff;
}

.oz-taq-meta .oz-file-act.is-main b,
.oz-taq-meta .oz-file-act.is-main small {
  color: #fff;
}

.oz-taq-meta .oz-file-act.is-main:hover {
  background: linear-gradient(140deg, #7460e2, #4a3699);
}

.oz-taq-meta > .oz-file-act {
  margin-top: 0;
}

@media (max-width: 959px) {
  .sq-page.oz-file-page .oz-taq-meta .oz-taq-tools,
  .oz-taq-meta .oz-taq-tools {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .oz-taq-meta .oz-file-act {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 9px 12px;
  }
}

/* ——— مشاركة الهيرو: أيقونات دائرية بألوان المنصات ——— */
.hx-cover .phx .oz-share--hero {
  margin-top: 1.1rem;
  display: grid;
  gap: 0.55rem;
  max-width: 26rem;
}

.hx-cover .phx .oz-share-hero__lead {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--muted, #6b6884);
}

.hx-cover .phx .oz-share-hero__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.55rem;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--x-accent, #5b4bcc) 14%, #e7e3f8);
  background: color-mix(in srgb, #fff 88%, var(--x-soft, #ecebfa));
  box-shadow: 0 10px 28px rgb(20 16 50 / 0.06);
}

.hx-cover .phx .oz-share-ico {
  display: inline-grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  box-shadow: 0 6px 14px rgb(20 16 50 / 0.12);
}

.hx-cover .phx .oz-share-ico .i {
  width: 1.15rem;
  height: 1.15rem;
  stroke-width: 2;
}

.hx-cover .phx .oz-share-ico.is-fb {
  background: linear-gradient(145deg, #3b82f6, #1877f2);
}

.hx-cover .phx .oz-share-ico.is-x {
  background: linear-gradient(145deg, #2a2f38, #0f1419);
}

.hx-cover .phx .oz-share-ico.is-wa {
  background: linear-gradient(145deg, #34d46a, #25d366);
  color: #fff;
}

.hx-cover .phx .oz-share-ico.is-tg {
  background: linear-gradient(145deg, #3dbcf0, #229ed9);
}

.hx-cover .phx .oz-share-ico.is-more,
.hx-cover .phx .oz-share-ico.is-copy {
  background: #fff;
  color: var(--ink, #1c1633);
  border: 1.5px solid var(--line, #e2e0ef);
  box-shadow: none;
}

.hx-cover .phx .oz-share-ico:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 10px 20px rgb(20 16 50 / 0.16);
}

.hx-cover .phx .oz-share-ico.is-more:hover,
.hx-cover .phx .oz-share-ico.is-copy:hover {
  border-color: var(--x-accent, #5b4bcc);
  color: var(--x-accent, #5b4bcc);
  background: #fff;
}

.hx-cover .phx .oz-share-ico.is-copy.is-done {
  background: var(--ok-bg, #ecfdf3);
  border-color: var(--ok, #15803d);
  color: var(--ok, #15803d);
}

.hx-cover .phx .oz-share-hero__sep {
  width: 1px;
  height: 1.6rem;
  background: color-mix(in srgb, var(--line, #e2e0ef) 80%, transparent);
  margin-inline: 0.1rem;
}

@media (max-width: 520px) {
  .hx-cover .phx .oz-share--hero {
    max-width: 100%;
  }

  .hx-cover .phx .oz-share-hero__bar {
    border-radius: 1.1rem;
    justify-content: center;
  }

  .hx-cover .phx .oz-share-ico {
    width: 2.4rem;
    height: 2.4rem;
  }
}

/* ——— هيرو مادة واحدة: كارت واحد كبير بدل ٣ كروت ——— */
.hx-cover .phx__visual--stack.is-single {
  width: 20rem;
  max-width: 100%;
  transform: rotate(-2deg);
}

.hx-cover .phx__stack.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.hx-cover .phx__stack.is-single .phx__cover {
  aspect-ratio: 4 / 3;
  border-radius: 1rem;
  transform: none;
  box-shadow: 0 24px 46px rgb(20 16 50 / 0.22);
}

.hx-cover a.phx__cover {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.hx-cover a.phx__cover:focus-visible {
  outline: 2px solid var(--x-accent, var(--brand, #5b4bcc));
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .hx-cover .phx__visual--stack.is-single {
    width: min(16rem, 82%);
    transform: none;
  }
}

/* ——— ترويسة «ملفات مشابهة» (.shx) بنفس مقاس باقي الترويسات ——— */
.shx h2 {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
}

/* ——— ترويسات الأقسام: نفس شكل الماركر في كل الموقع ——— */
.section__head h2 {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
}

.section__head {
  margin-bottom: 1.1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line-soft);
}

/* الماركر: شريط ذهبي رأسي + نص بلون القسم */
.section__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--sec-accent, var(--brand));
}

.section__kicker::before {
  content: "";
  width: 5px;
  height: 1.05em;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8dc86, #e8c56a);
  box-shadow: 0 0 0 3px rgb(232 197 106 / 0.22);
}

/* ——— ألوان الماركر (الهايلايت): كل قسم/صفحة بلونها ——— */
[data-tone="brand"] { --hl: #ddd6ff; --hl-edge: #cec4ff; }
[data-tone="blue"]  { --hl: #cfe0ff; --hl-edge: #b7d0ff; }
[data-tone="green"] { --hl: #c4f2df; --hl-edge: #a4ecce; }
[data-tone="gold"]  { --hl: #f8dc86; --hl-edge: #f3d67a; }
[data-tone="teal"]  { --hl: #c3ebf3; --hl-edge: #a4e1ef; }
[data-tone="deep"]  { --hl: #e2d7fa; --hl-edge: #d2c3f6; }
[data-tone="mint"]  { --hl: #c9f5df; --hl-edge: #aaefd1; }
[data-tone="rose"]  { --hl: #ffd9e6; --hl-edge: #ffc2d6; }

/* ماركر التحديد (هايلايت) تحت الكلمات المهمة في كل الترويسات */
em.hl,
.section__head h2 em,
.shx h2 em,
.x-section h2 em,
.phx h1 em,
.oz-mast-title h1 em,
.sq-files-h em,
.oz-seo-head h2 em,
.oz-talk h2 em,
.oz-file-quiz-head h2 em,
.oz-file-quiz h2 em,
.sec-hl {
  font-style: normal;
  padding-inline: 0.08em;
  border-radius: 0.12em;
  background-image: linear-gradient(180deg, transparent 54%, var(--hl, #f8dc86) 54%, var(--hl-edge, #f3d67a) 94%, transparent 94%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* الهايلايت في هيرو الصفحة أسمك شوية لأنه أكبر */
.phx h1 em {
  background-image: linear-gradient(180deg, transparent 50%, var(--hl, #f8dc86) 50%, var(--hl-edge, #f3d67a) 92%, transparent 92%);
}
/* شريط ماركر رأسي جنب عنوان «ملفات مشابهة» (زي المرجع) */
.shx h2 {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.shx h2::before {
  content: "";
  flex: none;
  width: 6px;
  height: 1.3em;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--hl, #f8dc86), var(--hl-edge, #e8c56a));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hl, #f8dc86) 35%, transparent);
}

.section__link {
  flex: none;
  font-weight: 800;
  color: var(--sec-accent, var(--brand));
  white-space: nowrap;
}

/* غلاف تجميعة مدرستنا: تلات كلمات كاملة جوه الصورة الصغيرة */
.zc.zc--pack {
  container-type: inline-size;
  justify-content: center;
  gap: 0.35em;
  padding: 7% 5%;
  text-align: center;
}
.zc--pack .zc__top {
  justify-content: center;
}
.zc--pack .zc__stage {
  font-size: 15cqi;
  line-height: 1.2;
  padding: 0.15em 0.4em;
  max-width: 100%;
}
.zc--pack .zc__mid {
  align-items: center;
  text-align: center;
  gap: 0.12em;
}
.zc--pack.zc--idad .zc__subject,
.zc--pack .zc__subject {
  align-self: center;
  background: none;
  text-shadow: none;
  padding: 0;
  font-size: 22cqi;
  line-height: 1.05;
}
.zc--pack .zc__grade {
  font-size: 16cqi;
  line-height: 1.15;
  font-weight: 900;
  opacity: 1;
  color: var(--zc-accent);
}
/* مصغّرة الكارت كانت بتخبي سطر المادة؛ التلات كلمات لازم تفضل ظاهرة */
.oz-card-cover .zc--pack {
  align-items: center;
  gap: 0.2em;
  padding: 8% 6%;
}
.oz-card-cover .zc--pack .zc__top {
  width: auto;
  justify-content: center;
}
.oz-card-cover .zc--pack .zc__stage {
  font-size: 14cqi;
  padding: 0.1em 0.35em;
}
.oz-card-cover .zc--pack .zc__subject {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  font-size: 20cqi;
  line-height: 1.05;
  text-align: center;
}
.oz-card-cover .zc--pack .zc__grade {
  display: block;
  font-size: 15cqi;
  line-height: 1.1;
  text-align: center;
}

/* كروت الصفوف: متتأثرش بستايل جولة التلميحات */
a.gt {
  position: relative;
  left: auto;
  top: auto;
  width: auto;
  z-index: auto;
  pointer-events: auto;
}

@media (max-width: 720px) {
  .section__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
  .section__head > div {
    width: 100%;
    min-width: 0;
  }
  .section__head h2 {
    font-size: 1.28rem;
    line-height: 1.5;
    text-wrap: balance;
  }
  .section__sub {
    font-size: 0.95rem;
    line-height: 1.7;
  }
  .section__link {
    min-height: 2.4rem;
  }
  .gt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .zc--grade .zc__subject {
    font-size: clamp(0.95rem, 4.6vw, 1.25rem);
    line-height: 1.25;
  }
  .zc--grade .zc__grade,
  .zc--grade .zc__title {
    font-size: 0.72rem;
    line-height: 1.35;
  }
  .resource__copy h3,
  .shelf__title {
    font-size: 0.92rem;
    line-height: 1.45;
  }
  .resource__visual,
  .gt__cover,
  .shelf__cover,
  .oz-card-cover,
  .resource img,
  .shelf__cover img,
  .oz-card-cover img {
    max-width: 100%;
  }
}

/* ——— عرض المحتوى: نفس عرض هيرو الصفحات (65rem) زي بوابة نتيجة نت ——— */
.sq-wrap,
.sq-page {
  --max: 65rem;
}

/* ——— كروت المراحل: ٤ كروت جنب بعض (ابتدائي · إعدادي · ثانوي · بكالوريا) ——— */
@media (min-width: 1101px) {
  .stx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1100px) and (min-width: 641px) {
  .stx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .stx-grid { grid-template-columns: minmax(0, 1fr); }
}

/* كارت البكالوريا المصرية — نفس فكرة كروت المراحل بالظبط، بلونه هو */
.stx--bak {
  background: linear-gradient(140deg, #0b3b2e, #125b45);
  color: #fff;
}

.stx--bak::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, rgb(255 255 255 / 0.05) 0 1px, transparent 1px 16px);
  pointer-events: none;
}

.stx--bak .stx__chip {
  background: #8ef0c4;
  color: #08301f;
}

.stx--bak .stx__name,
.stx--bak .stx__go {
  color: #8ef0c4;
}

.stx--bak .stx__meta {
  color: rgb(255 255 255 / 0.8);
}

.stx--bak .stx__grades {
  justify-content: flex-start;
  gap: 0.35rem;
}

.stx--bak .stx__grades > * {
  background: rgb(255 255 255 / 0.1);
  border-color: rgb(142 240 196 / 0.5);
  color: #8ef0c4;
}

.stx--bak .stx__grades > .stx__track {
  width: auto;
  height: auto;
  min-height: 1.95rem;
  padding-inline: 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  white-space: nowrap;
}

/* ——— «سؤال من ثقف نفسك»: نسخة مضغوطة (كانت واخدة مساحة كبيرة) ——— */
.oz-file-quiz {
  margin: 1.4rem 0 0.4rem;
}

.oz-file-quiz-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  margin-bottom: 0.65rem;
}

.oz-file-quiz-head h2 {
  margin: 0;
  font-size: 1.02rem;
  order: 2;
}

.oz-file-quiz-head p {
  order: 3;
  flex: 1 1 11rem;
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--muted);
}

.oz-file-quiz .oz-quiz-list {
  display: grid;
  gap: 0.55rem;
}

.oz-file-quiz .oz-quiz-card {
  padding: 0.65rem 0.8rem;
  border-radius: 14px;
}

.oz-file-quiz .oz-quiz-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.92rem;
  line-height: 1.45;
}

.oz-file-quiz .oz-daily-opts {
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.35rem;
}

.oz-file-quiz .oz-daily-opt {
  min-height: 36px;
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
  line-height: 1.3;
}

.oz-file-quiz .oz-daily-opt .l {
  width: 1.15rem;
  height: 1.15rem;
  font-size: 0.68rem;
}

.oz-file-quiz-more {
  margin: 0.6rem 0 0;
  font-size: 0.84rem;
}

@media (max-width: 640px) {
  .oz-file-quiz .oz-daily-opts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .oz-file-quiz .oz-daily-opt {
    min-height: 34px;
    font-size: 0.76rem;
  }

  .oz-file-quiz-head h2 {
    font-size: 0.98rem;
  }
}


/* ——— «فكرة الطالب»: كارت مشاركة النموذج ——— */
.oz-share {
  margin: 1.5rem 0 0.5rem;
  border: 1px solid #e7e3f8;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 38px rgb(24 20 60 / 0.08);
  overflow: hidden;
}

.oz-share__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  background: linear-gradient(120deg, #2b2350, #4a3a8f);
  color: #fff;
}

.oz-share__kicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 900;
  color: #f2cf75;
}

.oz-share__head h2 {
  margin: 0.1rem 0 0.2rem;
  font-size: 1.06rem;
  color: #fff;
}

.oz-share__sub {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgb(255 255 255 / 0.78);
}

.oz-share__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: flex-end;
}

.oz-share__badge {
  padding: 0.22rem 0.55rem;
  border: 1px solid rgb(255 255 255 / 0.25);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.14);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.oz-share__badge.is-model {
  border-color: #f2cf75;
  background: #f2cf75;
  color: #2b2350;
}

.oz-share__grid {
  display: grid;
  grid-template-columns: minmax(0, 290px) minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
}

.oz-share__fig {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 30px rgb(24 20 60 / 0.18);
}

.oz-share__fig img {
  display: block;
  width: 100%;
  height: auto;
}

.oz-share__fig figcaption {
  padding: 0.35rem;
  background: #f6f4ff;
  color: #8b86a8;
  font-size: 0.66rem;
  font-weight: 800;
  text-align: center;
}

.oz-share__field {
  margin-bottom: 0.55rem;
}

.oz-share__label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: #8b86a8;
}

.oz-share__title {
  margin: 0;
  font-weight: 900;
  font-size: 0.9rem;
  line-height: 1.5;
}

.oz-share__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.oz-share__tag {
  border: 1px solid #e2ddf7;
  background: #f7f5ff;
  color: #4b3f9e;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.oz-share__tag:hover {
  background: #eae5ff;
}

.oz-share__url {
  margin: 0.15rem 0 0.7rem;
}

.oz-share__url code {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.3rem 0.5rem;
  border-radius: 8px;
  background: #f5f3ff;
  color: #6b6788;
  font-size: 0.7rem;
  direction: ltr;
  text-align: left;
  unicode-bidi: embed;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oz-share__acts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.oz-share__label small {
  font-weight: 700;
  color: #a6a1c0;
}

.oz-share__tag.is-model {
  border-color: #f2cf75;
  background: #fff8e0;
  color: #7a5a12;
}

.oz-share__btn.is-wa {
  border-color: #c9efdd;
  background: #f2fdf8;
  color: #0f7b4f;
}

.oz-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.68rem;
  border: 1px solid #e2ddf7;
  border-radius: 12px;
  background: #fff;
  color: #3f348f;
  font-weight: 800;
  font-size: 0.76rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.oz-share__btn.is-main {
  grid-column: 1 / -1;
  border-color: transparent;
  background: linear-gradient(140deg, #6a55d8, #43308f);
  color: #fff;
  box-shadow: 0 10px 22px rgb(91 75 204 / 0.28);
}

.oz-share__btn .i {
  width: 15px;
  height: 15px;
}

.oz-share__btn:hover {
  background: #f6f4ff;
}

.oz-share__btn.is-main:hover {
  background: linear-gradient(140deg, #7460e2, #4a3699);
}

.oz-share__note {
  margin: 0.5rem 0 0;
  font-size: 0.74rem;
  font-weight: 800;
  color: #0f9f6e;
}

@media (max-width: 780px) {
  .oz-share__head {
    flex-direction: column-reverse;
  }

  .oz-share__badges {
    justify-content: flex-start;
  }

  .oz-share__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .oz-share__fig {
    max-width: 280px;
    margin-inline: auto;
  }

  .oz-share__acts {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ——— أرقام التقييم تحت كل أيقونة ——— */
.oz-talk-vote-n {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.66rem;
  font-weight: 800;
  color: #8b86a8;
}

.oz-talk-vote.is-on .oz-talk-vote-n {
  color: var(--brand);
}

/* ——— الهيدر فوق كل حاجة: قائمة «المزيد» ميتغطاش بالسكاشن ——— */
.sq-bar {
  z-index: 120;
}

.sq-drop-panel {
  z-index: 130;
  max-height: min(72vh, 460px);
  overflow-y: auto;
}

/* درج الموبايل لازم يكون فوق الهيدر */
.sq-drawer:not([hidden]) {
  z-index: 200;
}



/* ——— «نماذج قناة مدرستنا»: براند القناة + شيبس الإجابات ——— */
.mds-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.9rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d9e9ef;
  border-radius: 16px;
  background: linear-gradient(120deg, #f2fbfa, #ffffff);
}

.mds-brand img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  flex: none;
  box-shadow: 0 8px 18px rgb(13 111 116 / 0.22);
}

.mds-brand b {
  display: block;
  font-size: 1rem;
  font-weight: 900;
  color: #0d6f74;
}

.mds-brand small {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: #6b6788;
}

.mds-hal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.7rem;
}

.mds-hal__t {
  font-size: 0.78rem;
  font-weight: 900;
  color: #0d6f74;
}

.mds-hal__chip {
  padding: 0.25rem 0.6rem;
  border: 1px solid #cfe6ea;
  border-radius: 999px;
  background: #f2fbfa;
  color: #0d6f74;
  font-size: 0.74rem;
  font-weight: 800;
  text-decoration: none;
}

.mds-hal__chip:hover {
  background: #e3f6f4;
}

/* ——— صفحة «نماذج قناة مدرستنا»: كارت لكل مادة فيه النماذج قصاد الإجابات ——— */
.mds-brand.is-lg {
  margin-bottom: 1.1rem;
  padding: 0.8rem 1rem;
}

.mds-brand.is-lg img {
  width: 64px;
  height: 64px;
}

.mds-brand.is-lg b {
  font-size: 1.1rem;
}

.mds-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.mds-card {
  padding: 0.9rem;
  border: 1px solid #e2ecf1;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgb(13 111 116 / 0.07);
}

.mds-card__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.mds-card__ico {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #eaf7f6;
  color: #0d6f74;
  flex: none;
}

.mds-card__ico .i {
  width: 20px;
  height: 20px;
}

.mds-card__head h2 {
  margin: 0;
  font-size: 1.02rem;
}

.mds-card__head p {
  margin: 0.15rem 0 0;
  font-size: 0.74rem;
  font-weight: 700;
  color: #6b6788;
}

.mds-card__acts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.mds-btn {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0.7rem;
  border-radius: 13px;
  border: 1px solid #d6e9ee;
  background: #f4fbfa;
  text-decoration: none;
  transition: transform 0.12s ease, background-color 0.12s ease;
}

.mds-btn:hover {
  transform: translateY(-1px);
  background: #e8f7f6;
}

.mds-btn b {
  font-size: 0.84rem;
  font-weight: 900;
  color: #0d6f74;
}

.mds-btn small {
  font-size: 0.7rem;
  font-weight: 700;
  color: #6b6788;
}

.mds-btn.is-hal {
  border-color: #f0dcc0;
  background: #fdf8f0;
}

.mds-btn.is-hal b {
  color: #a16207;
}

.mds-btn.is-hal:hover {
  background: #fbf1e2;
}

/* تجميعة لسه ما نزلتش — نفس شكل الزرار بس مش لينك */
.mds-btn.is-wait {
  opacity: 0.62;
  cursor: default;
}

.mds-btn.is-wait:hover {
  transform: none;
  background: #f4fbfa;
}

.mds-btn.is-hal.is-wait:hover {
  background: #fdf8f0;
}

.mds-note {
  margin: 1rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: #f7f7fb;
  color: #5f5b7a;
  font-size: 0.8rem;
  line-height: 1.7;
}

@media (max-width: 780px) {
  .mds-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ——— إشعار «تابع أيضاً» — ألوان أيقونات الهيدر (يتجاوز شبكة sq.css القديمة) ——— */
.oz-ping {
  position: fixed;
  z-index: 84;
  inset-inline-start: max(0.85rem, env(safe-area-inset-left));
  bottom: max(1rem, env(safe-area-inset-bottom));
  inset-inline-end: auto;
  width: min(17.5rem, calc(100vw - 1.5rem));
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0.45rem 0.45rem 0.5rem;
  border-radius: 1.1rem;
  border: 1.5px solid #e2dcfa;
  background: #fff;
  box-shadow: 0 16px 40px rgb(20 16 58 / 0.14);
  animation: oz-ping-in 0.4s ease;
  grid-template-columns: unset !important;
}

body.has-sticky-cta .oz-ping {
  bottom: calc(4.25rem + env(safe-area-inset-bottom));
}

.oz-ping[hidden] {
  display: none !important;
}

.oz-ping .oz-ping-hit {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.45rem 0.5rem 0.5rem;
  border-radius: 0.75rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.oz-ping .oz-ping-hit:hover {
  background: #f7f6fc;
}

.oz-ping .oz-ping-hit:focus-visible {
  outline: 2px solid #5b4bcc;
  outline-offset: 2px;
}

.oz-ping .oz-ping-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding-inline-end: 1.35rem;
}

.oz-ping .oz-ping-kicker-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1;
}

.oz-ping .oz-ping-kicker-row .sq-nav-ico {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 0.45rem;
}

.oz-ping .oz-ping-kicker-row .sq-nav-ico .i {
  width: 0.78rem;
  height: 0.78rem;
}

.oz-ping .oz-ping-kicker-text {
  font-size: 0.72rem;
  font-weight: 900;
  color: #5b4bcc;
  white-space: nowrap;
}

.oz-ping .oz-ping-tag {
  flex: none;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 900;
  white-space: nowrap;
  line-height: 1.3;
}

.oz-ping .oz-ping-tag.is-tone-brand {
  background: #eeebfb;
  color: #5b4bcc;
}

.oz-ping .oz-ping-tag.is-tone-blue {
  background: #e8efff;
  color: #1d4ed8;
}

.oz-ping .oz-ping-tag.is-tone-deep {
  background: #ecebfa;
  color: #3f348f;
}

.oz-ping .oz-ping-tag.is-tone-mint {
  background: #e6f7f0;
  color: #0f9f6e;
}

.oz-ping .oz-ping-title {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  font-weight: 900;
  color: var(--ink, #1c1633);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.oz-ping .oz-ping-why {
  margin: 0;
  color: var(--muted, #6b6884);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.5;
}

.oz-ping .oz-ping-go {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.05rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(145deg, #6d5ce6, #5b4bcc);
  border: none;
  box-shadow: 0 8px 18px rgb(91 75 204 / 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.oz-ping .oz-ping-go:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgb(91 75 204 / 0.42);
}

.oz-ping .oz-ping-go .i {
  width: 0.9rem;
  height: 0.9rem;
}

.oz-ping .oz-ping-x {
  position: absolute;
  top: 0.35rem;
  inset-inline-end: 0.35rem;
  appearance: none;
  cursor: pointer;
  width: 1.45rem;
  height: 1.45rem;
  display: grid;
  place-items: center;
  border: 1.5px solid #e2dcfa;
  border-radius: 50%;
  background: #f7f6fc;
  color: #5b4bcc;
  padding: 0;
  z-index: 2;
}

.oz-ping .oz-ping-x .i {
  width: 0.85rem;
  height: 0.85rem;
}

@media (max-width: 520px) {
  .oz-ping {
    width: min(16rem, calc(100vw - 1.1rem));
  }
}

/* ——— هيدر + منيو: أيقونات الأقسام ——— */
.sq-nav a.sq-nav-link,
.sq-drop > summary.sq-nav-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.sq-nav-ico {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.5rem;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.45);
}

.sq-nav-ico .i {
  width: 0.9rem;
  height: 0.9rem;
  stroke-width: 2.2;
}

.sq-nav-ico.is-tone-brand {
  background: #eeebfb;
  color: #5b4bcc;
}

.sq-nav-ico.is-tone-deep {
  background: #ecebfa;
  color: #3f348f;
}

.sq-nav-ico.is-tone-gold {
  background: #fdf6e3;
  color: #a16207;
}

.sq-nav-ico.is-tone-mint {
  background: #e6f7f0;
  color: #0f9f6e;
}

.sq-nav-ico.is-tone-blue {
  background: #e8efff;
  color: #1d4ed8;
}

.sq-nav-ico.is-tone-teal {
  background: #e3fafa;
  color: #0e8a8f;
}

.sq-drop > summary.sq-nav-more {
  list-style: none;
}

.sq-drop.is-active > summary.sq-nav-more {
  background: var(--lime);
  color: var(--on-gold);
}

.sq-drop-panel a.sq-nav-drop {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.sq-drop-panel a.sq-nav-drop[aria-current="page"] {
  background: var(--lime);
  color: var(--on-gold);
}

.sq-drawer-sheet {
  width: min(288px, 86vw);
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sq-drawer-close {
  align-self: flex-start;
  margin-bottom: 6px;
  padding: 5px 11px;
  font-size: 0.8rem;
  font-weight: 800;
}

.sq-drawer-nav {
  display: grid;
  gap: 1px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-inline-end: 2px;
}

.sq-drawer-label {
  margin: 0.5rem 0.3rem 0.12rem;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.sq-drawer-nav > .sq-drawer-label:first-child {
  margin-top: 0;
}

.sq-drawer-sheet a.sq-drawer-link,
.sq-drawer-sheet summary.sq-drawer-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.5rem;
  border-radius: 0.6rem;
  min-height: 0;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.84rem;
  line-height: 1.3;
  color: var(--ink);
}

.sq-drawer-link span {
  flex: 1;
  min-width: 0;
}

.sq-drawer-sheet a.sq-drawer-link:hover,
.sq-drawer-sheet summary.sq-drawer-link:hover {
  background: var(--soft);
}

.sq-drawer-sheet a.sq-drawer-link[aria-current="page"] {
  background: color-mix(in srgb, var(--lime, #e8c56a) 88%, #fff);
  color: var(--on-gold, #1e1b3a);
  font-weight: 800;
}

.sq-drawer-sheet .sq-nav-ico {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.48rem;
}

.sq-drawer-sheet .sq-nav-ico .i {
  width: 0.82rem;
  height: 0.82rem;
}

.sq-drawer-sub {
  margin: 0.1rem 0;
}

.sq-drawer-sub > summary.sq-drawer-link {
  cursor: pointer;
  list-style: none;
}

.sq-drawer-sub > summary.sq-drawer-link::-webkit-details-marker {
  display: none;
}

.sq-drawer-sub-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  margin: 0.1rem 0 0.25rem;
  padding-inline-start: 0.25rem;
  border-inline-start: 2px solid var(--line-soft, #ebe8f5);
}

.sq-drawer-sheet a.sq-drawer-link.is-compact {
  padding: 0.35rem 0.4rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
}

.sq-drawer-theme {
  flex-shrink: 0;
  margin-top: 8px;
  padding: 7px 10px;
  min-height: 0;
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: 0.65rem;
}

html[data-theme="dark"] .sq-drawer-sheet a.sq-drawer-link[aria-current="page"] {
  background: color-mix(in srgb, var(--brand) 28%, var(--soft));
  color: var(--ink);
}

html[data-theme="dark"] .sq-drawer-sheet a.sq-drawer-link:hover,
html[data-theme="dark"] .sq-drawer-sheet summary.sq-drawer-link:hover {
  background: var(--lilac-2);
}

@media (min-width: 960px) and (max-width: 1280px) {
  .sq-nav a.sq-nav-link span,
  .sq-drop > summary.sq-nav-more span {
    font-size: 12.5px;
  }

  .sq-nav-ico {
    width: 1.4rem;
    height: 1.4rem;
  }
}

/* ——— الوضع الداكن: توكنات ref-site (آخر ملف CSS) + كروت ref-v8 ——— */
html[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #12101c;
  --surface: #1c1930;
  --lilac: #2a2550;
  --lilac-2: #241f42;
  --lilac-deep: #352f5c;
  --ink: #f3efff;
  --ink-soft: #e2dcf7;
  --muted: #c9c4de;
  --line: #3a3459;
  --line-soft: #2c2748;
  --brand-soft: #2a2550;
  --gold-soft: #3a2f16;
  --gold-ink: #e8c56a;
  --shadow-card: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 24px rgb(0 0 0 / 0.35);
}

html[data-theme="dark"] .section__head h2,
html[data-theme="dark"] .section__sub,
html[data-theme="dark"] .sq-files-h,
html[data-theme="dark"] .oz-sec-sub,
html[data-theme="dark"] .phx h1,
html[data-theme="dark"] .phx__lead,
html[data-theme="dark"] .phx__crumb {
  color: var(--ink);
}

html[data-theme="dark"] .resource,
html[data-theme="dark"] .file-card,
html[data-theme="dark"] .gt:not(.hx-stage),
html[data-theme="dark"] .certcard,
html[data-theme="dark"] .tcard,
html[data-theme="dark"] .tstrip,
html[data-theme="dark"] .fx,
html[data-theme="dark"] .phx__kicker,
html[data-theme="dark"] .phx__fact,
html[data-theme="dark"] .phx__search,
html[data-theme="dark"] .hx__search,
html[data-theme="dark"] .hx-badge,
html[data-theme="dark"] .shelf__head,
html[data-theme="dark"] .sharebar > a,
html[data-theme="dark"] .sharebar > button,
html[data-theme="dark"] .x-panel,
html[data-theme="dark"] .dlbox,
html[data-theme="dark"] .thero__card,
html[data-theme="dark"] .tstat,
html[data-theme="dark"] .dlp__card,
html[data-theme="dark"] .dlp__block,
html[data-theme="dark"] .dlp__acts > *,
html[data-theme="dark"] .x-chip,
html[data-theme="dark"] .dlx__fact,
html[data-theme="dark"] .x-btn--line,
html[data-theme="dark"] .oz-tools-strip,
html[data-theme="dark"] .oz-tools-strip__in {
  background-color: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] .resource__type {
  background-color: var(--soft);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  box-shadow: none;
}

html[data-theme="dark"] .resource__visual,
html[data-theme="dark"] .resource--popular .resource__visual,
html[data-theme="dark"] .resource--book .resource__visual {
  background: linear-gradient(125deg, var(--lilac), var(--lilac-2));
}

html[data-theme="dark"] .resource__art {
  color: var(--brand-text, var(--brand));
}

html[data-theme="dark"] .phx {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 14%, var(--canvas)), var(--canvas) 94%);
  border-bottom-color: var(--line);
}

html[data-theme="dark"] .stx--ibt .stx__grades > *,
html[data-theme="dark"] .stx--idad .stx__grades > * {
  background-color: var(--surface);
  border-color: var(--line);
}

html[data-theme="dark"] .resource__copy h3,
html[data-theme="dark"] .resource__meta,
html[data-theme="dark"] .resource__footer {
  color: var(--ink-soft);
}

html[data-theme="dark"] .sq-tool,
html[data-theme="dark"] .sq-drawer-theme {
  color: var(--ink);
}

/* هيرو الرئيسية (.hx) والأقسام تحته */
html[data-theme="dark"] body.hx-cover {
  background-color: var(--canvas);
  background-image: radial-gradient(var(--dots) 1px, transparent 1px);
  background-size: 18px 18px;
}

html[data-theme="dark"] .hx {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 14%, var(--canvas)), var(--canvas) 100%);
}

html[data-theme="dark"] .hx::before {
  background: radial-gradient(circle, rgb(154 144 240 / 0.22) 1.4px, transparent 1.8px) 0 0 / 18px 18px;
}

html[data-theme="dark"] .hx h1 {
  color: var(--ink);
}

html[data-theme="dark"] .hx h1 em {
  color: var(--brand-mid, var(--brand));
  background: linear-gradient(transparent 66%, rgb(232 197 106 / 0.28) 66%);
}

html[data-theme="dark"] .hx__lead {
  color: var(--ink-soft);
}

html[data-theme="dark"] .hx__search input {
  color: var(--ink);
}

html[data-theme="dark"] .hx__search input::placeholder {
  color: var(--muted);
  opacity: 1;
}

html[data-theme="dark"] .hx__search > svg {
  color: var(--muted);
}

html[data-theme="dark"] .hx .phx__kicker {
  background-color: var(--surface);
  border-color: var(--line);
  color: var(--brand);
}

html[data-theme="dark"] .hx__popular {
  color: var(--muted);
}

html[data-theme="dark"] .hx__popular a {
  color: var(--ink-soft);
  border-bottom-color: var(--line);
}

html[data-theme="dark"] .hx__popular a:hover {
  color: var(--brand-mid, var(--brand));
  border-color: var(--brand);
}

html[data-theme="dark"] .section__link {
  color: var(--brand-mid, var(--brand));
}

html[data-theme="dark"] .hx-stage--ibt,
html[data-theme="dark"] .hx-stage--idad,
html[data-theme="dark"] .hx-stage--than {
  background-image: none;
}

html[data-theme="dark"] .hx-stage--ibt {
  background-color: color-mix(in srgb, #ffd23f 12%, var(--surface));
  border-color: #4a3a18;
  color: #ffc46b;
}

html[data-theme="dark"] .hx-stage--idad {
  background-color: color-mix(in srgb, #1d4ed8 16%, var(--surface));
  border-color: #24365c;
  color: #8ab4ff;
}

html[data-theme="dark"] .hx-stage--than {
  background: linear-gradient(150deg, #241d52, #3d3183);
  color: #f2cf75;
}

/* ——— مشاركة (فوتر + هيرو): أيقونات ملوّنة واضحة ——— */
.oz-share--compact,
.oz-share--hero {
  display: block;
  max-width: 100%;
}

.oz-share--compact {
  padding: 0;
  border: 0;
}

.oz-share--compact::before {
  display: none;
}

.oz-share-hero__bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.32rem 0.4rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
  background: color-mix(in srgb, var(--surface) 94%, var(--soft));
  box-shadow: 0 4px 14px rgb(30 27 58 / 0.08);
  color: inherit;
}

html[data-theme="dark"] .oz-share-hero__bar {
  border-color: rgb(255 255 255 / 0.16);
  background: rgb(18 16 28 / 0.72);
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.35);
}

/* إلغاء ستايل الحبوب الافتراضي من sq.css */
.oz-share--compact .oz-share-hero__bar > a,
.oz-share--compact .oz-share-hero__bar > button,
.oz-share--hero .oz-share-hero__bar > a,
.oz-share--hero .oz-share-hero__bar > button,
.hx-cover .phx .oz-share-hero__bar > a,
.hx-cover .phx .oz-share-hero__bar > button {
  min-height: 0;
  gap: 0;
  padding: 0;
  border-radius: 50%;
  font-size: inherit;
  font-weight: inherit;
  box-shadow: none;
  transform: none;
}

.oz-share-hero__bar .oz-share-ico {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
  box-shadow: 0 5px 12px rgb(20 16 50 / 0.2);
}

.oz-share-hero__bar .oz-share-ico .i {
  width: 1.1rem;
  height: 1.1rem;
  stroke-width: 2;
}

.oz-share-hero__bar .oz-share-ico .i-fill {
  stroke: none;
  fill: currentColor;
}

.oz-share-hero__bar .oz-share-ico.is-fb {
  background: linear-gradient(145deg, #4f8ff7, #1877f2);
  color: #fff;
}

.oz-share-hero__bar .oz-share-ico.is-x {
  background: linear-gradient(145deg, #3d4452, #0f1419);
  color: #fff;
}

.oz-share-hero__bar .oz-share-ico.is-wa {
  background: linear-gradient(145deg, #3dde73, #128c7e);
  color: #fff;
}

.oz-share-hero__bar .oz-share-ico.is-tg {
  background: linear-gradient(145deg, #45c8f5, #229ed9);
  color: #fff;
}

.oz-share-hero__bar .oz-share-ico.is-more,
.oz-share-hero__bar .oz-share-ico.is-copy {
  background: color-mix(in srgb, var(--surface) 96%, #fff);
  color: var(--brand-deep, var(--brand));
  border: 1.5px solid color-mix(in srgb, var(--brand) 35%, var(--line));
  box-shadow: none;
}

html[data-theme="dark"] .oz-share-hero__bar .oz-share-ico.is-more,
html[data-theme="dark"] .oz-share-hero__bar .oz-share-ico.is-copy {
  background: rgb(255 255 255 / 0.12);
  color: #f3efff;
  border-color: rgb(255 255 255 / 0.22);
}

.oz-share-hero__bar .oz-share-ico:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 8px 16px rgb(20 16 50 / 0.22);
}

.oz-share-hero__bar .oz-share-ico.is-copy.is-done {
  background: var(--ok-bg);
  border-color: var(--ok);
  color: var(--ok);
}

.oz-share-hero__sep {
  width: 1px;
  height: 1.45rem;
  background: color-mix(in srgb, var(--line) 80%, transparent);
  margin-inline: 0.08rem;
  flex-shrink: 0;
}

html[data-theme="dark"] .oz-share-hero__sep {
  background: rgb(255 255 255 / 0.18);
}

.hx-cover .phx .oz-share-hero__bar {
  border: 1.5px solid color-mix(in srgb, var(--x-accent, var(--brand)) 18%, var(--line));
  background: color-mix(in srgb, var(--surface) 92%, var(--soft));
}

.sq-foot {
  margin-top: 0;
  padding: 1.75rem 0 1.5rem;
  color: #eeebfb;
  background-color: #0a0814;
  background-image:
    radial-gradient(rgb(255 255 255 / 0.08) 1px, transparent 1px),
    linear-gradient(165deg, #2a2158 0%, #0a0814 50%, #12101f 100%);
  background-size: 18px 18px, auto;
  border-top: none;
}

.sq-foot .sq-brand-name {
  color: #fff;
}

.sq-foot-links a,
.sq-foot-sec a {
  min-height: 34px;
  padding: 4px 11px;
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.08);
  color: #f3efff;
  font-size: 0.82rem;
  font-weight: 800;
}

.sq-foot-links a:hover,
.sq-foot-sec a:hover {
  background: var(--gold, #e8c56a);
  border-color: var(--on-gold, #1e1b3a);
  color: var(--on-gold, #1e1b3a);
}

.sq-foot-copy {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #c8c3e0;
}

.sq-foot-in {
  display: grid;
  gap: 1rem;
}

.sq-foot-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.1);
}

.sq-foot-head .sq-brand {
  min-width: 0;
}

.sq-foot-share {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  min-width: min(100%, 18rem);
}

.sq-foot-share .oz-share-hero__bar {
  width: 100%;
  justify-content: center;
}

.sq-foot-label {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.55);
}

.sq-foot-block {
  display: grid;
  gap: 0.35rem;
}

.sq-foot-links,
.sq-foot-sec {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.sq-foot-sec {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.sq-foot-sec a {
  justify-content: center;
  text-align: center;
}

.sq-foot-links {
  justify-content: flex-start;
}

.sq-foot-copy {
  width: 100%;
  text-align: center;
  padding-top: 0.65rem;
  margin-top: 0.15rem;
  border-top: 1px solid rgb(255 255 255 / 0.1);
}

@media (min-width: 768px) {
  .sq-foot-in {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "head head"
      "sec legal"
      "copy copy";
    gap: 1rem 1.25rem;
  }

  .sq-foot-head {
    grid-area: head;
  }

  .sq-foot-block--sec {
    grid-area: sec;
  }

  .sq-foot-block--legal {
    grid-area: legal;
  }

  .sq-foot-copy {
    grid-area: copy;
  }

  .sq-foot-sec {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .sq-foot-sec a {
    text-align: start;
    justify-content: flex-start;
  }

  .sq-foot-share .oz-share-hero__bar {
    width: auto;
    justify-content: flex-end;
  }
}

@media (max-width: 767px) {
  .sq-foot {
    padding: 1.25rem 0 1.15rem;
  }

  .sq-foot-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .sq-foot-share {
    width: 100%;
    justify-content: center;
  }

  .sq-foot-block {
    text-align: center;
  }

  .sq-foot-links {
    justify-content: center;
  }

  .sq-foot-links a,
  .sq-foot-sec a {
    min-height: 30px;
    padding: 3px 9px;
    font-size: 0.74rem;
  }

  .oz-foot-zag {
    display: none;
  }

  .oz-share-hero__bar .oz-share-ico {
    width: 2.2rem;
    height: 2.2rem;
  }
}
