/* alsumait-word v1.1.1 — «His Words» (page 36, /his-words/)
   Direction C: one saying per screen on desktop, one horizontal rail on mobile.
   No libraries. Colour grounds come from the block tokens; this sheet only
   sets rhythm, scale and the source rail. */

/* ── section rhythm: kill the theme's blockGap between full-width sections
      (trap 61) ─────────────────────────────────────────────────────────── */
.dsc-word {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}

.dsw-wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 3rem);
}

.dsc-word .dsw-lab {
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0;
}

/* single-source marker — the same gold used in chapter 07 and /testimonials/ */
.dsw-flag {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(199, 154, 58);
  vertical-align: .08em;
  margin-inline-end: .45em;
}

/* ══ 0 · COVER ════════════════════════════════════════════════════════ */
.dsw-hero { position: relative; overflow: hidden; }

/* a scrim under the text: the portrait is a pale, high-key image and the
   cover's own dim alone does not carry white type over it */
.dsw-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
              rgba(11, 22, 20, .58) 0%,
              rgba(11, 22, 20, .22) 34%,
              rgba(11, 22, 20, .86) 100%);
}

/* the inner container arrives position:relative from core, which would make
   it the containing block for the watermark (traps 58 and 60) */
.dsw-hero > .wp-block-cover__inner-container {
  position: static !important;
  width: 100%;
}

.dsw-hero .dsw-mark {
  position: absolute;
  inset-inline-end: 3%;
  top: 7%;
  z-index: 1;
  margin: 0;
  font-family: "Amiri", serif;
  font-size: clamp(46px, 7vw, 104px);
  line-height: 1.15;
  opacity: .11;
  pointer-events: none;
  user-select: none;
}

.dsw-herotxt {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 3rem);
  padding-block: clamp(4rem, 12vh, 9rem) clamp(2rem, 6vh, 4rem);
}

.dsw-hero .dsw-title {
  font-size: clamp(2.3rem, 6.2vw, 4.9rem);
  line-height: 1.04;
  max-width: 17ch;
  margin: .55rem 0 0;
  font-weight: 400;
}
.dsw-hero .dsw-sub {
  max-width: 54ch;
  margin: 1.2rem 0 0;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.75;
}
.dsw-hero .dsw-stand {
  max-width: 60ch;
  margin: 1rem 0 0;
  font-size: .95rem;
  line-height: 1.8;
  opacity: .88;
}

.dsw-metaset {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.4rem, 4vw, 3.2rem);
  margin-top: clamp(1.8rem, 5vh, 3rem);
  padding-top: 1.3rem;
  border-top: 1px solid rgba(255, 255, 255, .22);
}
.dsw-metaset > .wp-block-group { min-width: 0; }
.dsw-metaset .dsw-v {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1;
  margin: .3rem 0 0;
}
.dsw-metaset .dsw-lab { opacity: .72; }

/* ══ 1 · THE STANDARD ════════════════════════════════════════════════ */
.dsw-rule { padding-block: clamp(2.6rem, 7vw, 4.6rem); }
.dsw-rule .dsw-grid2 {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: clamp(1.4rem, 5vw, 4rem);
  align-items: start;
}
.dsw-rule h2 {
  font-size: clamp(1.55rem, 3.2vw, 2.5rem);
  line-height: 1.16;
  margin: .5rem 0 0;
  font-weight: 400;
}
.dsw-rule p { line-height: 1.8; }
.dsw-tier {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: .9rem;
  align-items: baseline;
  border-top: 1px solid rgba(255, 255, 255, .18);
  padding-top: .75rem;
  margin: .7rem 0 0;
  font-size: .92rem;
  line-height: 1.65;
}
.dsw-tier b { font-size: 1.15rem; letter-spacing: .06em; }

/* ══ 2 · THE STAGE — one saying per screen ═════════════════════════ */
.dsw-stage { display: block; }

.dsw-slide {
  min-height: 84vh;
  display: flex;
  align-items: center;
  padding-block: clamp(3rem, 9vh, 6rem);
  margin-block: 0 !important;
  position: relative;
  overflow: hidden;
}
.dsw-slide > * + * { margin-block-start: 0; }

.dsw-slide .dsw-n {
  margin: 0 0 1.3rem;
  font-size: .78rem;
  letter-spacing: .2em;
  opacity: .55;
}
.dsw-slide .dsw-mv {
  margin: 0 0 .5rem;
  opacity: .8;
}
.dsw-q {
  font-weight: 400;
  font-size: clamp(1.7rem, 4.4vw, 3.4rem);
  line-height: 1.22;
  max-width: 23ch;
  margin: 0;
}
.dsw-q.dsw-long {
  font-size: clamp(1.2rem, 2.5vw, 1.95rem);
  line-height: 1.42;
  max-width: 42ch;
}
.dsw-tail {
  max-width: 46ch;
  margin: 1.1rem 0 0;
  font-size: 1rem;
  line-height: 1.7;
  opacity: .9;
}
.dsw-src {
  max-width: 48ch;
  margin: 2rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid;
  border-color: currentColor;
  font-size: .8rem;
  line-height: 1.7;
  opacity: .74;
}
.dsw-src b {
  display: block;
  font-size: .69rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: .3rem;
}

/* reveal — start states only exist once JS has said so */
body.dsc-word-anim .dsw-slide .dsw-wrap {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
}
body.dsc-word-anim .dsw-slide .dsw-wrap.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  body.dsc-word-anim .dsw-slide .dsw-wrap { opacity: 1; transform: none; transition: none; }
}

/* ══ 3 · THE INDEX ══════════════════════════════════════════════════ */
.dsw-index { padding-block: clamp(2.6rem, 7vw, 4.6rem); }
.dsw-index h2 { font-size: clamp(1.5rem, 3vw, 2.3rem); margin: .4rem 0 1.4rem; font-weight: 400; }
.dsw-index table { border-collapse: collapse; width: 100%; font-size: .93rem; }
.dsw-index td {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .16);
  padding: .78rem .6rem .78rem 0;
  vertical-align: baseline;
}
.dsw-index tr td:first-child { width: 3.2rem; opacity: .72; }
.dsw-index tr td:last-child { text-align: end; font-size: .75rem; opacity: .62; white-space: nowrap; }
.dsw-index a { text-decoration: none; }
.dsw-index a:hover { text-decoration: underline; }

/* ══ 4 · THE TWIN ══════════════════════════════════════════════════ */
.dsw-twin { padding-block: clamp(2.6rem, 7vw, 4.6rem); }
.dsw-twin h2 { font-size: clamp(1.5rem, 3vw, 2.3rem); line-height: 1.18; margin: .5rem 0 0; font-weight: 400; }
.dsw-twin p { line-height: 1.8; }
.dsw-line { font-size: 1.1rem; }

/* ══ 5 · SOURCES ══════════════════════════════════════════════════ */
.dsw-foot { padding-block: clamp(2.2rem, 6vw, 3.8rem); }
.dsw-foot p { font-size: .85rem; line-height: 1.85; margin: 0; }

/* ══ MOBILE — the stage becomes one scroll-driven horizontal rail ══
   Same device as chapter 07 and /testimonials/: no ScrollTrigger pin
   (trap 33) — a sticky panel plus pure scroll arithmetic. */
.dsw-railpin {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.dsw-railstick {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.dsw-hud {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem clamp(1.1rem, 5vw, 2rem) 1rem;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8fa8a2;
  background: #0F1C1C;
}
.dsw-hud .bar {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, .18);
  display: block;
}
.dsw-hud .bar i { display: block; height: 100%; width: 4%; background: #92D8D8; transition: width .18s linear; }

/* ══ MOBILE — the theatre ═══════════════════════════════════════════
   The stage becomes one dark theatre holding a deck of cards, moved by the
   page's own vertical scroll and animated with GSAP. */
@media (max-width: 900px) {

  /* 2026-09-09 — القرار نُقض بطلب المستخدم: «أريد الهيدر في كل الصفحات
     وفي كل اللغات، على الجوال أو الحاسوب». كان الهيدر يُخفى هنا على الجوال
     (قرار جلسة سابقة، v1.0.3) فحُذفت القاعدة. والسبب الجديد أثقل من السبب
     القديم: الهيدر يحمل مبدّل اللغة، وبإخفائه يفقد القارئ العربي على الجوال
     طريقه إلى بقية اللغات. الفوتر لم يكن مخفيّاً قط. */

  .dsw-rule .dsw-grid2 { grid-template-columns: 1fr; }

  /* ── the cover ─────────────────────────────────────────────────── */
  .dsw-hero .dsw-mark {
    top: 8%;
    inset-inline-end: 5%;
    font-size: clamp(34px, 11vw, 52px);
    opacity: .17;
  }
  .dsw-hero .dsw-title { font-size: clamp(2rem, 9vw, 2.9rem); max-width: 14ch; }
  .dsw-hero .dsw-sub { font-size: 1rem; line-height: 1.65; }
  .dsw-hero .dsw-stand { display: none; }        /* the long paragraph is desktop-only */
  .dsw-herotxt { padding-block: clamp(3rem, 14vh, 6rem) clamp(1.6rem, 5vh, 2.4rem); }
  .dsw-metaset {
    /* core's .is-layout-flex sets display:flex from the block's own
       stylesheet, so the grid has to say so out loud */
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 1.15rem 1rem;
  }
  .dsw-metaset .dsw-v { font-size: 1.9rem; }
  .dsw-metaset .dsw-lab { font-size: .58rem; }

  /* ── the theatre ───────────────────────────────────────────────── */
  .dsw-railpin { background: #0B1614; }
  .dsw-railstick {
    justify-content: center;
    background: radial-gradient(120% 70% at 50% 40%, #14312B 0%, #0B1614 70%);
  }

  .dsw-rail {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    scrollbar-width: none;
    padding-inline: 9vw;
    gap: 4vw;
  }
  .dsw-rail::-webkit-scrollbar { display: none; }

  .dsw-rail .dsw-slide {
    flex: 0 0 82vw;
    min-height: 0;
    height: 68vh;
    max-height: 620px;
    scroll-snap-align: center;
    padding: 0;
    border-radius: 26px;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    box-shadow: 0 26px 60px rgba(0, 0, 0, .45);
    will-change: transform, opacity;
    transform-origin: 50% 60%;
  }

  /* grounds: richer than the flat block colours used on the desktop stack */
  .dsw-rail .dsw-v-dark   { background: linear-gradient(158deg, #16382F 0%, #0C1B18 78%) !important; }
  .dsw-rail .dsw-v-accent { background: linear-gradient(158deg, #0E8074 0%, #075049 82%) !important; }
  .dsw-rail .dsw-v-light  { background: linear-gradient(158deg, #F4FAF7 0%, #DCEDE6 85%) !important; }
  .dsw-rail .dsw-v-dark,
  .dsw-rail .dsw-v-accent { border: 1px solid rgba(255, 255, 255, .10); }
  .dsw-rail .dsw-v-light  { border: 1px solid rgba(16, 50, 43, .10); }

  /* the opening quotation mark, as a watermark */
  .dsw-rail .dsw-slide::before {
    content: "\201C";
    position: absolute;
    inset-inline-start: 4%;
    top: -.34em;
    font-family: "Amiri", Georgia, serif;
    font-size: 190px;
    line-height: 1;
    opacity: .10;
    pointer-events: none;
    z-index: 0;
  }

  /* the card's own number, set large and low behind the text */
  .dsw-big {
    position: absolute;
    inset-inline-end: 5%;
    bottom: 3%;
    margin: 0;
    font-family: "Amiri", Georgia, serif;
    font-size: 96px;
    line-height: 1;
    opacity: .09;
    letter-spacing: -.02em;
    pointer-events: none;
    z-index: 0;
  }

  .dsw-rail .dsw-wrap {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 22px 20px 20px;
    max-width: none;
    overflow-y: auto;
    scrollbar-width: none;
  }
  .dsw-rail .dsw-wrap::-webkit-scrollbar { display: none; }

  /* top row: NN / 24 on one side, the sourcing chip on the other */
  .dsw-top {
    position: absolute;
    inset-inline: 20px;
    top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
  }
  .dsw-top .dsw-n { margin: 0 !important; opacity: .6; font-size: .7rem; }
  .dsw-chip {
    font-size: .58rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 700;
    padding: .34rem .6rem;
    border-radius: 999px;
    border: 1px solid currentColor;
    opacity: .72;
    white-space: nowrap;
  }
  .dsw-chip .dsw-flag { width: 6px; height: 6px; margin-inline-end: .35em; }

  .dsw-rail .dsw-mv { margin: 0 0 .55rem; opacity: .62; font-size: .6rem; }
  .dsw-q { font-size: clamp(1.25rem, 5.9vw, 1.75rem); line-height: 1.3; max-width: none; }
  .dsw-q.dsw-long { font-size: clamp(1rem, 4.3vw, 1.22rem); line-height: 1.48; max-width: none; }
  .dsw-tail { font-size: .86rem; line-height: 1.62; margin-top: .9rem; }
  .dsw-src {
    font-size: .72rem;
    margin: 1.1rem 0 0;
    padding-top: .8rem;
    opacity: .62;
  }
  .dsw-src b { font-size: .6rem; }

  /* ── the transport ─────────────────────────────────────────────── */
  .dsw-hud {
    background: transparent;
    padding: .9rem 6vw 1.4rem;
    gap: .75rem;
    color: #7FA79F;
  }
  .dsw-hud .n { font-family: "Amiri", Georgia, serif; font-size: .95rem; color: #CFE9E2; letter-spacing: .06em; }
  .dsw-hud .bar { height: 1px; background: rgba(255, 255, 255, .16); }
  .dsw-hud .bar i { height: 1px; background: #92D8D8; transition: none; }

  .dsw-beads {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 6vw .6rem;
  }
  .dsw-beads span {
    width: 4px; height: 4px; border-radius: 999px;
    background: rgba(255, 255, 255, .22);
    flex: 0 0 auto;
  }
  .dsw-beads span.on { background: #92D8D8; width: 16px; }

  .dsw-cue {
    text-align: center;
    font-size: .58rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #6C8F88;
    padding: 0 0 .8rem;
    margin: 0;
  }

  .dsw-index tr td:last-child { white-space: normal; text-align: start; }
  .dsw-index tr td:first-child { width: 2.4rem; }
}

/* motion is opt-in: without JS, and with reduced motion, the cards sit still */
@media (prefers-reduced-motion: reduce) {
  .dsw-rail .dsw-slide { transform: none !important; opacity: 1 !important; }
}
