/* === shangarf.css === */
/* ============================================================================
   شنگرف — Shangarf Design System
   dars-goftarha.ir · academic reading system · Claude Design lane · 2026-07-19

   PALETTE — taken from the live /references page, not invented
   That page is warm cream paper, NAVY-SLATE ink (#2B3148, never brown), a deep
   navy accent (#15294E / #1D3460) and a family of golds (#B08434 / #CAA052 /
   #D8BE8A). Those anchors are extended here into two full ramps — nine navy
   steps and seven gold — so structure is built from many related shades rather
   than one light blue and one dark blue.

   THE FIVE COLLECTIONS = FIVE POINTS ON THAT COOL ARC
     لاجورد   lapis            #1D3460  → تفسیر قرآن   (the page's own accent)
     زنگارِ آبی blue-verdigris  #155A63  → ادیان و موضوعاتِ دینی
     نیلی     indigo           #3B2A6B  → روانکاوی و فرهنگ
     فولادی   steel blue       #1F4C7A  → موضوعاتِ قرآنی
     برنز     bronze           #8A6420  → سخنرانی‌های موضوعی (the page's gold)
     زر       gold             #B08434  → RESERVED: scripture only.

   Every page declares its collection once (class on <body>) and the whole
   chrome — header band, headings, TOC rail, links, playlist, chips — keys off
   it. Colour is wayfinding, not garnish.
   ========================================================================= */

/* ---------- faces ------------------------------------------------------- */
@font-face{font-family:'Estedad';font-weight:400;font-display:swap;src:url('fonts/Estedad-Regular.woff2') format('woff2')}
@font-face{font-family:'Estedad';font-weight:500;font-display:swap;src:url('fonts/Estedad-Medium.woff2') format('woff2')}
@font-face{font-family:'Estedad';font-weight:600;font-display:swap;src:url('fonts/Estedad-SemiBold.woff2') format('woff2')}
@font-face{font-family:'Estedad';font-weight:700;font-display:swap;src:url('fonts/Estedad-Bold.woff2') format('woff2')}
@font-face{font-family:'Estedad';font-weight:800;font-display:swap;src:url('fonts/Estedad-ExtraBold.woff2') format('woff2')}
@font-face{font-family:'Inter';font-weight:400;font-display:swap;src:url('fonts/Inter-400.woff2') format('woff2')}
@font-face{font-family:'Inter';font-weight:500;font-display:swap;src:url('fonts/Inter-500.woff2') format('woff2')}
@font-face{font-family:'Inter';font-weight:700;font-display:swap;src:url('fonts/Inter-700.woff2') format('woff2')}

/* ---------- tokens ------------------------------------------------------ */
:root{
  color-scheme:light;
  /* ── paper & ink ────────────────────────────────────────────────────────
     Taken from the live /references page, not invented. Its character is a
     warm cream ground with a NAVY-SLATE ink — the text is never brown-black,
     it is a dark blue-grey, and that is what makes the gold read as gold. */
  --paper:      #FBF6EC;   /* surface  — the reading ground                 */
  --paper-deep: #F3EAD8;   /* paper    — recessed: rails, zebra rows        */
  --paper-mid:  #F7EFE0;   /* surface-2 — between the two                   */
  --paper-high: #FFFCF4;   /* raised: cards standing off the page           */
  --ink:        #2B3148;   /* مرکب — navy-slate body text, 11.9:1           */
  --ink-soft:   #5A6079;   /* secondary — 5.8:1                             */
  --ink-faint:  #727483;   /* metadata — 3.0:1, large/secondary only        */
  --line:       rgba(176,132,52,.30);  /* gold hairline, as on the page     */
  --line-strong:rgba(176,132,52,.52);
  --line-cool:  rgba(21,41,78,.12);    /* the quieter navy rule             */

  /* ── the navy ramp — THE ARC COLOURS, taken literally ───────────────────
     The references page draws its category arc from a single accent tinted
     toward white:
         shade(i) = color-mix(in srgb, #15294E  (88 − i/(n−1)·62)%,  #FFFFFF)
     So the "spectrum" of that page is ONE navy at six lightnesses, not a set of
     different hues. --n-300…--n-800 below are those exact six values; --n-100
     and --n-200 extend the same hue darker for text and bands. */
  --n-100:#15294E;   /* the accent at full strength           */
  --n-200:#233659;   /* 94 %                                  */
  --n-300:#314363;   /* 88 % — arc segment 1                  */
  --n-400:#4D5C78;   /* 76 % — arc segment 2                  */
  --n-500:#6C788F;   /* 63 % — arc segment 3                  */
  --n-600:#8892A5;   /* 51 % — arc segment 4                  */
  --n-700:#A6AEBC;   /* 38 % — arc segment 5                  */
  --n-800:#C2C7D1;   /* 26 % — arc segment 6                  */
  --n-900:#DDE0E6;   /* 14 % — the same ramp, one step softer */

  /* ── the gold ramp — seven steps from the page's three anchors ───────── */
  --g-100:#6B4E18; --g-200:#946D22; --g-300:#B08434; --g-400:#CAA052;
  --g-500:#D8BE8A; --g-600:#E5CF9D; --g-700:#EFE3C6;

  /* ── the five collections = five stops on that one ramp ─────────────────
     Not five hues. The references page distinguishes six categories using a
     single navy at six lightnesses, and that is the whole idea: the archive
     reads as one body of work, and depth of tint — not a change of colour —
     says which part of it you are in. Each collection takes its arc value as
     `base`, a deep step of the same hue as `deep` for text, and the same hue
     washed almost to paper as `wash`. All five sit on the one ramp — the gold
     that briefly stood in for the topical lectures is gone. Gold is scripture. */
  /* Five SUBJECTS, so five hues — not five steps of one navy. The ramp that used to
     live here was the references page's single-accent arc taken literally; measured
     at the row wash, all ten pairs of it fell under ΔE 5. These are the site's own
     per-topic colours, which the reader already meets on the archive cards. */
  --lajvard-deep:#214981; --lajvard:#4A689F; --lajvard-tint:#B3BED0; --lajvard-wash:#DEE1E5;
  --zangar-deep:#7C2E41;  --zangar:#9D5060;  --zangar-tint:#D6B4B6;  --zangar-wash:#EDDDD9;
  --nili-deep:#00556C;    --nili:#00758B;    --nili-tint:#94C3C8;    --nili-wash:#D1E4E1;
  --fooladi-deep:#235323; --fooladi:#467342; --fooladi-tint:#B1C2A9; --fooladi-wash:#DEE3D4;
  --boronz-deep:#63420F;  --boronz:#856131;  --boronz-tint:#CCBBA2;  --boronz-wash:#E9E0D1;

  /* زر — scripture only. The page's own gold, at full strength. */
  --zar:       #B08434;
  --zar-deep:  #6B4E18;
  --zar-line:  #CAA052;
  --zar-wash:  #FAF3E4;

  /* the active pigment — every page sets these via a collection class */
  --c-deep: var(--lajvard-deep);
  --c:      var(--lajvard);
  --c-tint: var(--lajvard-tint);
  --c-wash: var(--lajvard-wash);

  /* type scale — Persian-tuned (Estedad), generous leading for long reading */
  --fs-display: clamp(30px, 5.2vw, 42px);
  --fs-h1:      clamp(23px, 3.4vw, 29px);
  --fs-h2:      21px;
  --fs-h3:      17.5px;
  --fs-body:    17px;   --lh-body: 1.95;
  --fs-side:    14.5px;
  --fs-meta:    13px;
  --fs-micro:   11.5px;
  --fs-ayah:    24px;   --lh-ayah: 2.3;
  --fs-tr:      15.5px;

  --measure: 42rem;       /* ~68 Persian chars at 17px */
  --rail: 19rem;

  /* rhythm */
  --s1:4px; --s2:8px; --s3:14px; --s4:22px; --s5:34px; --s6:54px;

  --radius:10px; --radius-lg:16px;
  --shadow: 0 1px 2px rgba(38,33,25,.05), 0 8px 28px -12px rgba(38,33,25,.14);

  --ff: 'Estedad','Inter',system-ui,sans-serif;
  --ff-latin:'Inter','Estedad',sans-serif;
  /* Quranic Arabic: propose Amiri/Scheherazade as the canonical face; Estedad
     carries it faithfully until the face is adopted. Never re-type the text. */
  --ff-ayah:'Amiri','Scheherazade New','Estedad',serif;
}

/* collection switches — one class on <body> recolours the whole page */
.c-tafsir  {--c-deep:var(--lajvard-deep); --c:var(--lajvard); --c-tint:var(--lajvard-tint); --c-wash:var(--lajvard-wash)}
.c-adyan   {--c-deep:var(--zangar-deep);--c:var(--zangar);--c-tint:var(--zangar-tint);--c-wash:var(--zangar-wash)}
.c-ravan   {--c-deep:var(--nili-deep);--c:var(--nili);--c-tint:var(--nili-tint);--c-wash:var(--nili-wash)}
.c-mawzuat {--c-deep:var(--fooladi-deep);--c:var(--fooladi);--c-tint:var(--fooladi-tint);--c-wash:var(--fooladi-wash)}
.c-sokhan  {--c-deep:var(--boronz-deep); --c:var(--boronz); --c-tint:var(--boronz-tint); --c-wash:var(--boronz-wash)}
:is(.c-tafsir,.c-adyan,.c-ravan,.c-mawzuat,.c-sokhan){
  --accent:var(--c-deep);
  --accent-soft:color-mix(in srgb,var(--c-deep) 12%,var(--paper-high));
}

/* ---------- نخودی — the middle ground -----------------------------------
   The default page is already a warm cream; this is the same page one step
   further into the paper, for the long session in a bright room where the white
   end of the cream starts to glare. It is not a second palette: only the ground,
   the rule and the two ink softenings move, so every collection colour, the gold
   and the ayah block are inherited from the light theme untouched. Ink stays the
   navy-slate — a brown-black ink on a deeper cream is what makes this kind of
   theme look like aged newsprint instead of paper. */
:root[data-theme="sepia"]{
  color-scheme:light;
  --paper:      #F4E9D2;
  --paper-deep: #E9DBBE;
  --paper-mid:  #EFE3C9;
  --paper-high: #FAF2E1;
  --ink:        #2A3044;   /* 10.4:1 on --paper */
  --ink-soft:   #565C74;   /* 5.4:1  */
  --ink-faint:  #6E7082;   /* 3.1:1 — large/secondary only, as in light */
  --line:       rgba(150,110,40,.34);
  --line-strong:rgba(150,110,40,.56);
  --line-cool:  rgba(21,41,78,.14);
  /* bridge private family tokens (ravankavi --surface etc.) to the theme */
  --surface:var(--paper-high); --surface-2:var(--paper-mid);
  --ink-2:var(--ink-soft); --muted:var(--ink-soft); --faint:var(--ink-faint);
  --line-2:var(--line-strong);
}

/* ---------- night reading ---------------------------------------------- */
:root[data-theme="dark"]{
  color-scheme:dark;
  /* the same palette after dark: the navy becomes the ground and the ink
     becomes a warm off-white, so the gold still reads as the page's gold */
  --paper:#131722; --paper-deep:#0F131C; --paper-mid:#161B27; --paper-high:#1A1F2C;
  --ink:#E6E4DC; --ink-soft:#AFB3C2; --ink-faint:#7C8296;
  --line:rgba(202,160,82,.26); --line-strong:rgba(202,160,82,.44);
  --line-cool:rgba(190,200,225,.13);
  --n-100:#C9D2E8; --n-200:#B3BEDA; --n-300:#9AA7C9; --n-400:#8391B8;
  --n-500:#6E7CA6; --n-600:#5B6892; --n-700:#4A557B; --n-800:#3A4365; --n-900:#2C344F;
  --g-100:#F0E4C8; --g-200:#E2CFA2; --g-300:#CFB477; --g-400:#B99553;
  --g-500:#96773B; --g-600:#71592A; --g-700:#4E3D1D;
  --lajvard-deep:#214981; --lajvard:#4A689F; --lajvard-tint:#B3BED0; --lajvard-wash:#DEE1E5;
  --zangar-deep:#7C2E41;  --zangar:#9D5060;  --zangar-tint:#D6B4B6; --zangar-wash:#EDDDD9;
  --nili-deep:#00556C;    --nili:#00758B;    --nili-tint:#94C3C8;   --nili-wash:#D1E4E1;
  --fooladi-deep:#235323; --fooladi:#467342; --fooladi-tint:#B1C2A9; --fooladi-wash:#DEE3D4;
  --boronz-deep:#63420F;  --boronz:#856131;  --boronz-tint:#CCBBA2; --boronz-wash:#E9E0D1;
  --zar:#CAA052; --zar-deep:#E2C070; --zar-line:#8A6B2A; --zar-wash:#221C10;
  /* bridge private family tokens (ravankavi --surface etc.) to the theme */
  --surface:var(--paper-high); --surface-2:var(--paper-mid);
  --ink-2:var(--ink-soft); --muted:var(--ink-soft); --faint:var(--ink-faint);
  --line-2:var(--line-strong);
}
:root[data-theme="dark"] .sarlouh,
:root[data-theme="dark"] .plate,
:root[data-theme="dark"] .matn h2 .no,
:root[data-theme="dark"] .ayah-head .cite,
:root[data-theme="dark"] .btn,
:root[data-theme="dark"] .pl-btn.main,
:root[data-theme="dark"] .pl-row.playing .pl-no{color:#171410}
:root[data-theme="dark"] .sarlouh .kicker{background:rgba(23,20,16,.10);border-color:rgba(23,20,16,.28)}

/* ---------- base -------------------------------------------------------- */
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);
  font:400 var(--fs-body)/var(--lh-body) var(--ff);
  direction:rtl;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
h1,h2,h3,h4{margin:0;font-family:var(--ff)}
p{margin:0 0 1.05em}
a{color:var(--c);text-decoration:none}
a:hover{text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1px}
:focus-visible{outline:2.5px solid var(--c);outline-offset:2px;border-radius:3px}
::selection{background:var(--c-tint);color:var(--ink)}
.num,[dir="ltr"].num{font-variant-numeric:normal;}
.latin{font-family:var(--ff-latin);direction:ltr;unicode-bidi:isolate}

/* ============================================================================
   COMPONENTS
   ========================================================================= */

/* --- سرلوح · the page frontispiece band --------------------------------- */
.sarlouh{background:linear-gradient(165deg,
    color-mix(in oklab, var(--c) 88%, var(--n-100)) 0%,
    var(--c-deep) 58%,
    color-mix(in oklab, var(--c-deep) 82%, var(--n-100)) 100%);
  color:#FBF6EC;position:relative;overflow:hidden}
.sarlouh::after{ /* woven double rule at the base — the جدول of the page */
  content:"";position:absolute;inset-inline:0;bottom:0;height:7px;
  background:
    linear-gradient(0deg, var(--zar) 0 2px, transparent 2px 4px,
                    color-mix(in oklab, var(--zar-line) 70%, transparent) 4px 5px, transparent 5px);
}
.sarlouh-in{max-width:72rem;margin-inline:auto;padding:26px clamp(18px,4vw,44px) 30px}
.crumbs{display:flex;gap:8px;align-items:center;font-size:var(--fs-meta);opacity:.85;margin-bottom:14px;flex-wrap:wrap}
.crumbs a{color:inherit;font-weight:500}
.crumbs .sep{opacity:.5}
.sarlouh h1{font-size:var(--fs-h1);font-weight:700;line-height:1.65;max-width:56rem;letter-spacing:-.01em}
.sarlouh .kicker{display:inline-flex;align-items:center;gap:10px;font-size:var(--fs-meta);
  font-weight:600;background:rgba(251,247,238,.14);border:1px solid rgba(251,247,238,.25);
  padding:4px 13px;border-radius:999px;margin-bottom:13px}
.sarlouh .meta{margin-top:12px;font-size:var(--fs-meta);opacity:.82;display:flex;gap:18px;flex-wrap:wrap}
.sarlouh .meta b{font-weight:600;opacity:1}

/* collection identity chip (used everywhere) */
.qalam{display:inline-flex;align-items:center;gap:7px;font-size:var(--fs-micro);font-weight:600;
  color:var(--c-deep);background:var(--c-wash);border:1px solid var(--c-tint);
  padding:3px 11px;border-radius:999px;white-space:nowrap}
.qalam::before{content:"";width:8px;height:8px;border-radius:2px;background:var(--c);flex:none}
.qalam.q-tafsir  {color:var(--lajvard-deep);background:var(--lajvard-wash);border-color:var(--lajvard-tint)} .qalam.q-tafsir::before{background:var(--lajvard)}
.qalam.q-adyan   {color:var(--zangar-deep);background:var(--zangar-wash);border-color:var(--zangar-tint)} .qalam.q-adyan::before{background:var(--zangar)}
.qalam.q-ravan   {color:var(--nili-deep);background:var(--nili-wash);border-color:var(--nili-tint)} .qalam.q-ravan::before{background:var(--nili)}
.qalam.q-mawzuat {color:var(--fooladi-deep);background:var(--fooladi-wash);border-color:var(--fooladi-tint)} .qalam.q-mawzuat::before{background:var(--fooladi)}
.qalam.q-sokhan  {color:var(--boronz-deep);background:var(--boronz-wash);border-color:var(--boronz-tint)} .qalam.q-sokhan::before{background:var(--boronz)}

/* --- layout: reading page = body column + scholarly rail ---------------- */
.page{max-width:72rem;margin-inline:auto;padding:0 clamp(18px,4vw,44px) var(--s6)}
/* the rail (TOC + apparatus) sits at the START side — the RIGHT in RTL (owner request:
   vertical menus/lists on the right). Rail takes grid column 1 via order. */
.reading{display:grid;grid-template-columns:var(--rail) minmax(0,1fr);gap:clamp(24px,4vw,56px);
  align-items:start;padding-top:var(--s5)}
@media (max-width:64rem){.reading{grid-template-columns:1fr}.rail{position:static}}
.rail{order:-1;position:sticky;top:18px;max-height:calc(100vh - 36px);overflow:auto;
  display:flex;flex-direction:column;gap:var(--s4);scrollbar-width:thin}

/* --- فهرست · TOC panel --------------------------------------------------- */
.tocx{background:var(--paper-high);border:1px solid var(--line);border-radius:var(--radius-lg);
  box-shadow:var(--shadow);overflow:hidden}
.tocx > h2{font-size:var(--fs-meta);font-weight:700;color:var(--c-deep);
  background:linear-gradient(180deg,var(--c-wash),color-mix(in oklab,var(--c-wash) 55%,var(--paper-mid)));border-bottom:1px solid var(--line);
  padding:10px 16px;display:flex;gap:8px;align-items:center}
.tocx ol{list-style:none;margin:0;padding:8px 0;counter-reset:toc}
.tocx li{counter-increment:toc}
.tocx a{display:flex;gap:11px;align-items:baseline;padding:6.5px 16px;
  font-size:var(--fs-side);line-height:1.6;color:var(--ink-soft)}
.tocx a::before{content:counter(toc, persian);font-size:var(--fs-micro);font-weight:600;
  color:var(--c);min-width:1.35em;text-align:center;background:var(--c-wash);
  border-radius:6px;padding:1px 0;transform:translateY(-1px)}
.tocx a:hover{background:var(--paper-deep);color:var(--ink);text-decoration:none}
.tocx a.now{color:var(--c-deep);font-weight:600;background:var(--c-wash)}

/* --- دستگاهِ ارجاع · reference apparatus -------------------------------- */
.appx{background:var(--paper-high);border:1px solid var(--line);border-radius:var(--radius-lg);
  box-shadow:var(--shadow);overflow:hidden}
.appx > h2{font-size:var(--fs-meta);font-weight:700;color:var(--ink-soft);
  border-bottom:1px solid var(--line);padding:10px 16px;background:var(--paper-deep)}
.appx ol{list-style:none;margin:0;padding:6px 0}
.appx a{display:block;padding:8px 16px}
.appx a:hover{background:var(--paper-deep);text-decoration:none}
.appx .t{display:block;font-size:var(--fs-side);font-weight:600;color:var(--ink)}
.appx .m{display:block;font-size:var(--fs-micro);color:var(--ink-faint);margin-top:2px;line-height:1.7}

/* --- the transcript body ------------------------------------------------- */
.matn{max-width:var(--measure)}
.matn > p{text-align:justify;hyphens:auto}
.matn .lede{font-size:15px;color:var(--ink-faint);border-inline-start:3px solid var(--c-tint);
  padding:2px 14px 2px 0;margin-bottom:var(--s5)}

/* rubricated section heading — the shangarf move */
.matn h2{font-size:var(--fs-h2);font-weight:700;color:var(--c-deep);
  margin:var(--s6) 0 var(--s3);line-height:1.6;display:flex;gap:13px;align-items:baseline;
  scroll-margin-top:24px}
.matn h2 .no{flex:none;font-size:13px;font-weight:700;color:var(--paper);
  background:var(--c);border-radius:7px;padding:2px 9px;transform:translateY(-3px)}
.matn h2::after{content:"";flex:1;height:1px;background:var(--line-strong);opacity:.6;transform:translateY(-6px)}

/* --- بیتِ قرآن · the scripture block ------------------------------------ */
/* Gold frame, ink text. The only gold on the site. */
.ayah{background:var(--zar-wash);border:1px solid var(--zar-line);border-radius:4px;
  margin:var(--s5) 0;position:relative;box-shadow:inset 0 0 0 4px var(--paper),
  inset 0 0 0 5px var(--zar-line);page-break-inside:avoid;break-inside:avoid}
.ayah-in{padding:22px 28px 18px}
.ayah-head{display:flex;justify-content:space-between;align-items:center;gap:12px;
  margin-bottom:14px;padding-bottom:11px;border-bottom:1px solid var(--zar-line)}
.ayah-head .tag{display:flex;align-items:center;gap:9px;font-size:var(--fs-micro);
  font-weight:700;color:var(--zar-deep)}
.ayah-head .tag::before{content:"۞";font-size:19px;line-height:1;color:var(--zar)}
.ayah-head .cite{font-size:var(--fs-meta);font-weight:700;color:var(--paper);
  background:var(--zar);padding:2.5px 13px;border-radius:999px}
.ayah-ar{font-family:var(--ff-ayah);font-size:var(--fs-ayah);line-height:var(--lh-ayah);
  color:var(--ink);text-align:justify;margin:0}
.ayah-sep{display:flex;align-items:center;gap:10px;margin:15px 0 12px;color:var(--zar)}
.ayah-sep::before,.ayah-sep::after{content:"";flex:1;height:1px;background:var(--zar-line)}
.ayah-sep span{font-size:var(--fs-micro);font-weight:600;color:var(--zar-deep)}
.ayah-fa{font-size:var(--fs-tr);line-height:2;color:var(--ink-soft);text-align:justify;margin:0}

/* --- گیومهٔ گفتار · inline speech / aside -------------------------------- */
.matn .hazerin{background:var(--paper-deep);border-inline-start:3px solid var(--line-strong);
  border-radius:8px;padding:10px 16px;font-size:15.5px;color:var(--ink-soft)}

/* --- audio playlist (series page) ---------------------------------------- */
.playlist{background:var(--paper-high);border:1px solid var(--line);border-radius:var(--radius-lg);
  overflow:hidden;box-shadow:var(--shadow)}
.pl-row{display:grid;grid-template-columns:auto 1fr auto;gap:16px;align-items:center;
  padding:13px 18px;border-bottom:1px solid var(--line)}
.pl-row:last-child{border-bottom:0}
.pl-row:nth-child(even){background:var(--paper)}
.pl-row:hover{background:var(--c-wash)}
.pl-row.playing{background:var(--c-wash);box-shadow:inset 3px 0 0 var(--c)}
.pl-no{width:34px;height:34px;border-radius:9px;background:var(--c-wash);color:var(--c-deep);
  font-weight:700;font-size:14px;display:grid;place-items:center;border:1px solid var(--c-tint)}
.pl-row.playing .pl-no{background:var(--c);color:var(--paper);border-color:var(--c)}
.pl-t{min-width:0}
.pl-t .t{font-size:15.5px;font-weight:600;color:var(--ink);line-height:1.6}
.pl-t .m{font-size:var(--fs-micro);color:var(--ink-faint);margin-top:2px;display:flex;gap:12px}
.pl-act{display:flex;gap:7px;align-items:center}
.pl-btn{width:36px;height:36px;border-radius:50%;border:1px solid var(--c-tint);
  background:var(--paper-high);color:var(--c-deep);display:grid;place-items:center;cursor:pointer}
.pl-btn.main{background:var(--c);border-color:var(--c);color:var(--paper)}
.pl-btn:hover{background:var(--c-deep);border-color:var(--c-deep);color:var(--paper)}
.pl-btn svg{width:15px;height:15px;fill:currentColor}

/* tab bar as archive folder tabs */
/* No row-reverse. The document is already RTL, so a plain flex row starts at the
   RIGHT — DOM order IS visual order. Reversing it put پخش صوتی, which the owner
   wants first, at the far LEFT of the four tabs. */
.tabsx{display:flex;gap:6px;padding:0 6px;margin-bottom:-1px;position:relative;z-index:2;
  justify-content:flex-start;overflow-x:auto}
.tabx{font:600 14.5px/1 var(--ff);color:var(--ink-faint);background:var(--paper-deep);
  border:1px solid var(--line);border-bottom:0;border-radius:10px 10px 0 0;
  padding:11px 20px 12px;cursor:pointer;white-space:nowrap}
.tabx:hover{color:var(--ink)}
.tabx.on{background:var(--paper-high);color:var(--c-deep);font-weight:700;
  box-shadow:inset 0 3px 0 var(--c)}
.panex{background:var(--paper-high);border:1px solid var(--line);
  border-radius:0 var(--radius-lg) var(--radius-lg) var(--radius-lg);padding:clamp(16px,3vw,30px)}

/* --- reference page pieces ----------------------------------------------- */
.idcard{display:grid;grid-template-columns:auto 1fr;gap:26px;align-items:center}
.idcard .face{width:108px;height:108px;border-radius:14px;object-fit:cover;
  border:3px solid var(--paper-high);box-shadow:var(--shadow)}
.statrow{display:flex;gap:10px;flex-wrap:wrap;margin-top:var(--s4)}
.stat{background:var(--paper-high);border:1px solid var(--line);border-radius:12px;
  padding:10px 18px;text-align:center;min-width:96px}
.stat b{display:block;font-size:21px;font-weight:800;color:var(--c-deep)}
.stat span{font-size:var(--fs-micro);color:var(--ink-faint)}

/* حضور · presence ribbon: distribution across the five collections */
.ribbon{display:flex;height:16px;border-radius:999px;overflow:hidden;border:1px solid var(--line-strong)}
.ribbon i{display:block;height:100%}
.rb-tafsir{background:var(--lajvard)} .rb-adyan{background:var(--zangar)}
.rb-ravan{background:var(--nili)} .rb-mawzuat{background:var(--fooladi)}
.rb-sokhan{background:var(--boronz)}
.ribbon-leg{display:flex;gap:16px;flex-wrap:wrap;margin-top:9px;font-size:var(--fs-micro);color:var(--ink-soft)}
.ribbon-leg i{display:inline-block;width:9px;height:9px;border-radius:2.5px;margin-inline-start:5px;transform:translateY(1px)}

/* aspect table */
.aspects{width:100%;border-collapse:collapse;font-size:var(--fs-side)}
.aspects th{font-size:var(--fs-micro);font-weight:700;color:var(--ink-faint);text-align:right;
  padding:8px 12px;border-bottom:2px solid var(--line-strong)}
.aspects td{padding:9px 12px;border-bottom:1px solid var(--line);vertical-align:middle}
.aspects .bar{height:7px;border-radius:999px;background:var(--paper-deep);overflow:hidden;min-width:120px}
.aspects .bar i{display:block;height:100%;border-radius:999px;background:var(--c)}

/* session hit rows (deep links into transcripts) */
.hits{list-style:none;margin:0;padding:0}
.hits li{border-bottom:1px solid var(--line)}
.hits a{display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:baseline;padding:10px 6px}
.hits a:hover{background:var(--c-wash);text-decoration:none}
.hits .no{font-size:var(--fs-micro);font-weight:700;color:var(--c-deep);background:var(--c-wash);
  border:1px solid var(--c-tint);border-radius:6px;padding:2px 9px}
.hits .t{font-size:var(--fs-side);color:var(--ink)}
.hits .go{font-size:var(--fs-micro);color:var(--ink-faint)}

/* --- hub: collection bookplates ------------------------------------------ */
.plates{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.plate{border-radius:var(--radius-lg);padding:24px 24px 20px;color:#FBF6EC;position:relative;
  overflow:hidden;display:flex;flex-direction:column;gap:6px;min-height:168px;
  box-shadow:var(--shadow);transition:transform .16s ease}
.plate:hover{transform:translateY(-3px);text-decoration:none}
.plate h2{font-size:19px;font-weight:800;line-height:1.5}
.plate .desc{font-size:var(--fs-meta);opacity:.8;line-height:1.8}
.plate .count{margin-top:auto;display:flex;align-items:baseline;gap:8px}
.plate .count b{font-size:36px;font-weight:800;line-height:1}
.plate .count span{font-size:var(--fs-micro);opacity:.75}
.plate::after{content:"";position:absolute;inset-inline-end:-34px;top:-34px;width:120px;height:120px;
  border-radius:50%;background:rgba(251,247,238,.09)}
.p-tafsir{background:linear-gradient(160deg,var(--lajvard) 0%,var(--lajvard-deep) 90%)}
.p-adyan{background:linear-gradient(160deg,var(--zangar) 0%,var(--zangar-deep) 90%)}
.p-ravan{background:linear-gradient(160deg,var(--nili) 0%,var(--nili-deep) 90%)}
.p-mawzuat{background:linear-gradient(160deg,var(--fooladi) 0%,var(--fooladi-deep) 90%)}
.p-sokhan{background:linear-gradient(160deg,var(--boronz) 0%,var(--boronz-deep) 90%)}
/* --- گاه‌شمار · 23-year timeline ----------------------------------------- */
.gahshomar{border-inline-start:2.5px solid var(--line-strong);padding-inline-start:26px;position:relative}
.g-year{position:relative;margin:26px 0 10px;display:flex;align-items:center;gap:12px}
.g-year b{font-size:16px;font-weight:800;color:var(--ink)}
.g-year::before{content:"";position:absolute;inset-inline-start:-33.5px;width:13px;height:13px;
  border-radius:50%;background:var(--paper);border:3px solid var(--ink-soft)}
.g-year .place{font-size:var(--fs-micro);color:var(--ink-faint)}
.g-item{display:grid;grid-template-columns:4px 1fr auto;gap:13px;align-items:center;
  padding:7px 12px;margin:3px 0;border-radius:9px;
  background:color-mix(in srgb, var(--gc, var(--c)) 16%, var(--paper-high));
  border:1px solid color-mix(in srgb, var(--gc, var(--c)) 22%, var(--paper-high))}
.g-item:hover{background:color-mix(in srgb, var(--gc, var(--c)) 15%, var(--paper-high));
  text-decoration:none;
  border-color:color-mix(in srgb, var(--gc, var(--c)) 44%, var(--paper-high))}
.g-item i{display:block;width:4px;height:22px;border-radius:2px}
.g-item .t{font-size:var(--fs-side);font-weight:600;color:var(--ink)}
.g-item .m{font-size:var(--fs-micro);color:var(--ink-faint);white-space:nowrap}
.gi-tafsir{--gc:var(--lajvard)} .gi-adyan{--gc:var(--zangar)}
.gi-ravan{--gc:var(--nili)} .gi-mawzuat{--gc:var(--fooladi)}
.gi-sokhan{--gc:var(--boronz)}
.g-item i{background:var(--gc, var(--c))}

/* --- misc ---------------------------------------------------------------- */
.btn{display:inline-flex;align-items:center;gap:8px;font:600 14px/1 var(--ff);
  color:var(--paper);background:var(--c);border:1px solid var(--c);border-radius:10px;
  padding:10px 20px;cursor:pointer}
.btn:hover{background:var(--c-deep);text-decoration:none}
.btn.ghost{background:transparent;color:var(--c-deep)}
.footerx{border-top:1px solid var(--line);margin-top:var(--s6);padding:22px 0 30px;
  font-size:var(--fs-micro);color:var(--ink-faint);display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap}

/* --- print --------------------------------------------------------------- */
@media print{
  :root{--paper:#fff;--paper-high:#fff;--paper-deep:#f6f2ea}
  body{font-size:11pt;line-height:1.8}
  .rail,.tabsx,.pl-act,.btn,.crumbs{display:none!important}
  .sarlouh{background:#fff;color:#000;border-bottom:2.5pt solid #000}
  .sarlouh::after{display:none}
  .matn h2{color:#000}
  .ayah{box-shadow:none;border:1.5pt solid #8a6d1e}
  .ayah,.playlist,.stat,table{page-break-inside:avoid;break-inside:avoid}
  .matn{max-width:none}
  a{color:inherit}
}


/* ════════ palette swap — owner 2026-07-23 ════════════════════════════════
   تفسیرِ سوره‌ها  ⇄  روانکاوی و فرهنگ.
   تفسیر takes روانکاوی's current teal; روانکاوی becomes a light violet in the
   tone of the other collections. Done at the palette level (both themes) so
   every sub-page — series, متن, timeline box, index — follows automatically. */
:root,:root[data-theme="dark"]{
  --lajvard-deep:#00556C; --lajvard:#00758B; --lajvard-tint:#94C3C8; --lajvard-wash:#D1E4E1;
  --nili-deep:#4A3A80;    --nili:#6E57AC;    --nili-tint:#C7BDE0;    --nili-wash:#E8E3F3;
}
/* the series/متن pages also carry surah/styles.css's own theme var --navy
   (progress bar, some accents), hardcoded per t-* class. Remap the two swapped
   collections there too so nothing stays the old navy/rust. */
.t-lajvard{--navy:#00556C;--navy-2:#00758B;--navy-deep:#003D4E;--navy-rgb:0,85,108}
.t-rust{--navy:#4A3A80;--navy-2:#6E57AC;--navy-deep:#38295F;--navy-rgb:74,58,128}
/* player chrome takes the page's own collection colour (a dark shade of it),
   not the fixed navy it shipped with — «رنگِ پلیر همرنگِ صفحات». Derived from
   --c-deep so it follows the tafsir⇄ravankavi swap and every other collection.
   !important beats surah/styles.css's per-theme --pl-* blocks. */
body:is(.c-tafsir,.c-adyan,.c-ravan,.c-mawzuat,.c-sokhan){
  /* a HINT of the collection on near-black — the saturated mix read as loud */
  --pl-card:color-mix(in srgb,var(--c-deep) 26%,#0A0F16)!important;
  --pl-frame:color-mix(in srgb,var(--c-deep) 16%,#070B10)!important;
  --pl-badge:var(--c-deep)!important;
}
/* the fixed now-playing bar hardcodes #16263e navy — tie it to the collection too */
.npbar{background:color-mix(in srgb,var(--c-deep) 26%,#0A0F16)!important}
.np-pp{color:var(--c-deep)!important}
/* آیهٔ قرآن: lighter weight — it shipped at 700 (bold) near-black, which reads
   heavy; a regular weight is airier and closer to a Naskh setting. Text itself
   is never touched (R7), only the weight. */
.quran-ar,.ayah-ar,.matn-body .quran-ar{font-weight:400!important}

/* ══ روانکاوی hub → shangarf template + the new purple (content unchanged) ══
   ravankavi/assets/styles.css keeps its own private vars; shangarf already
   overrides the shared ones (paper/ink/line). Bridge the rest to shangarf
   tokens (per-thinker identity colours stay), then dress the masthead as a
   سرلوح band and tidy the section heads. Scoped to c-ravan. */
body.c-ravan{
  --surface:var(--paper-high);--surface-2:var(--paper-mid);
  --ink-2:var(--ink-soft);--muted:var(--ink-soft);--faint:var(--ink-faint);
  --line-2:var(--line-strong);
  --accent:var(--c);--accent-soft:var(--c-wash);
  --shadow-sm:var(--shadow);
}
/* light purple box + dark-purple text (owner: بنفشِ کم‌رنگ متناسبِ فهرست‌ها،
   فونت بنفشِ تیره) — matches the section-index row washes. */
body.c-ravan .mast{
  background:var(--c-wash);
  color:var(--c-deep);border:1px solid var(--c-tint);border-radius:16px;overflow:hidden;
  padding:24px clamp(18px,4vw,30px) 22px;margin:16px 0 10px;box-shadow:var(--shadow-sm)}
body.c-ravan .mast h1{color:var(--c-deep)}
body.c-ravan .mast .kick{color:var(--c)}
body.c-ravan .mast .sub{color:var(--c-deep)}
body.c-ravan .mast .byl{color:var(--c-deep);border-top-color:var(--c-tint)}
body.c-ravan .mast .pill{background:var(--paper-high);border-color:var(--c-tint);color:var(--c-deep)}
body.c-ravan .mast .pill .n{color:var(--c-deep)}
body.c-ravan h2.sec{color:var(--c-deep)}
body.c-ravan h2.sec .n{color:var(--c)}
/* the relocated نقشهٔ جلسات bar wears the collection colour on its strip */
body.c-ravan a[href="/ravankavi/sessions.html"].tcard .top{background:var(--c)}

/* ══ FULL-WIDTH prose — owner hard rule (repeated): descriptive text must fill
   its box, never stop mid-width. The reading transcript (.matn measure) is the
   one deliberate exception. ══ */
.prose,.byl,.lead,.gloss,.mast .byl,.mast .sub,.site-speaker-sub,
.page-head .lead,.catalog-head p,.tl-sub,.detail-note,.ses-note,
.iz-note,.mast .meta-row{max-width:none!important}

/* ══ متفکرها cards → a purple ramp, harmonised with the new روانکاوی colour
   (was a rainbow of per-thinker hues). Inline hex on the strips, so !important. ══ */
body.c-ravan a[href*="/thinkers/freud"] .top{background:#3A2C63!important}
body.c-ravan a[href*="/thinkers/jung"]  .top{background:#4A3A80!important}
body.c-ravan a[href*="/thinkers/adler"] .top{background:#6E57AC!important}
body.c-ravan a[href*="/thinkers/niet"]  .top{background:#5A4795!important}
body.c-ravan a[href*="/thinkers/lacan"] .top{background:#8574B8!important}
body.c-ravan .tgrid .tcard .go{color:var(--c-deep)!important}

/* the green «متنِ کامل» tag is now a real link to the transcript page */
.tag.t-ok.ses-textlink{cursor:pointer;text-decoration:none;transition:filter .14s}
.tag.t-ok.ses-textlink:hover{filter:brightness(.92);text-decoration:none}

/* ══ نقشهٔ جلسات — inline collapsible session list (owner: کشویی باز شود،
   جلسات زیرش، سطرها بنفشِ کم‌رنگ) ══ */
.sesmap-wrap{margin:0 0 22px}
.sesmap-toggle{width:100%;display:block;font:inherit;color:inherit;text-align:inherit;
  cursor:pointer;-webkit-appearance:none;appearance:none;padding:0}
.sesmap-toggle .rg{color:var(--c-deep)}
.sm-chev{display:inline-block;transition:transform .2s;color:var(--c-deep);font-size:.85em}
.sesmap-toggle.open .sm-chev{transform:rotate(180deg)}
.sesmap-panel{margin-top:8px;display:grid;gap:5px;border:1px solid var(--c-tint);
  border-radius:12px;padding:10px;background:var(--paper-high);
  max-height:62vh;overflow:auto;scrollbar-width:thin}
/* the class display:grid outranks the UA [hidden] rule, so the attribute must
   be re-hidden explicitly — otherwise the panel is always open and can't close. */
.sesmap-panel[hidden]{display:none}
.smrow{display:grid;grid-template-columns:2.6rem 1fr auto;gap:11px;align-items:center;
  padding:9px 12px;border-radius:9px;text-decoration:none;
  background:var(--c-wash);
  border:1px solid color-mix(in srgb,var(--c) 20%,var(--paper-high));
  transition:background .13s,border-color .13s}
a.smrow:hover{background:color-mix(in srgb,var(--c) 26%,var(--paper-high));
  border-color:color-mix(in srgb,var(--c) 42%,var(--paper-high));text-decoration:none}
.smrow-nolink{opacity:.55}
.smn{font-family:var(--ff-latin);font-weight:800;font-size:.82rem;text-align:center;
  color:var(--c-deep);font-variant-numeric:tabular-nums}
.smt{font-size:.9rem;font-weight:600;color:var(--ink);min-width:0;line-height:1.5}
.smgo{font-size:.82rem;color:var(--c-deep)}
.smfull{display:block;text-align:center;margin-top:7px;padding:9px;font-size:.82rem;
  font-weight:700;color:var(--c-deep);text-decoration:none}
.smfull:hover{text-decoration:underline;text-underline-offset:3px}

/* ══ پلی‌لیست = the archive-row look, per collection — light wash + dark ink,
   NOT a dark card (owner, repeated: «رنگِ موضوع مثلِ فهرست درس‌گفتارها»).
   Overrides the dark --pl-card design directly on every series' playlist. ══ */
.pl-item{background:color-mix(in srgb,var(--c) 15%,var(--paper-high))!important;
  border:1px solid color-mix(in srgb,var(--c) 24%,var(--paper-high))!important;border-radius:12px}
.pl-item.open{box-shadow:var(--shadow)!important}
.pl-item.playing{background:color-mix(in srgb,var(--c) 24%,var(--paper-high))!important;
  border-color:color-mix(in srgb,var(--c) 42%,var(--paper-high))!important}
.pl-num{background:color-mix(in srgb,var(--c) 30%,var(--paper-high))!important;color:var(--c-deep)!important}
.pl-name{color:var(--ink)!important}
/* owner QA 2026-07-24: the reading-desk toolbars were hidden here while the
   controls were half-built. RESTORED 2026-07-27 by owner instruction, after the
   T-03 rebuild gave them a real size / leading / theme axis. The blanket
   `.readbar,.readbar2{display:none!important}` used to live on this line; it beat
   reading-desk.css's `display:flex` regardless of load order, so the whole control
   set was unreachable on every page at every width. Visibility now belongs to
   reading-desk.css alone — do not re-add a hide here, or the two files will fight
   and this one always wins. */
.pl-play{background:transparent!important;color:var(--c-deep)!important;
  border-inline-start:1px solid color-mix(in srgb,var(--c) 24%,var(--paper-high))!important}
.pl-play:hover,.pl-item.open .pl-play{background:color-mix(in srgb,var(--c) 16%,var(--paper-high))!important}
/* the expanded audio widget, relit for the light card */
.pl-item.open .pl-body{border-top:1px solid color-mix(in srgb,var(--c) 22%,var(--paper-high))!important;
  background:color-mix(in srgb,var(--c) 7%,var(--paper-high))}
.aud{color:var(--ink)!important}
.aud-cur,.aud-rem{color:var(--ink-soft)!important}
.aud-seek{background:color-mix(in srgb,var(--c) 28%,var(--paper-high))!important}
.aud-seek::-webkit-slider-thumb{background:var(--c-deep)!important}
.aud-seek::-moz-range-thumb{background:var(--c-deep)!important}
.aud-dl{color:var(--ink-soft)!important}.aud-dl:hover{color:var(--c-deep)!important}
.aud-rate{color:var(--ink-soft)!important;border-color:color-mix(in srgb,var(--c) 28%,var(--paper-high))!important}
.aud-rate:hover{border-color:var(--c-tint)!important}

/* header player: the play/pause button now sits at the far-left of the bar
   (owner), moved out of the transport cluster — give it breathing room. */
.np-r2 .np-pp.np-pp-main{margin-inline-start:6px}

/* ±30 skip = plain text «-30» / «+30» (owner: no circles), sign on the left,
   Latin, LTR. */
.np-skip .sk-lbl{font:800 13.5px/1 var(--ff-latin);direction:ltr;letter-spacing:-.02em}
.np-skip{min-width:38px}


/* ══ متنِ جلسه — single column (SOLE layout owner as of 2026-07-25 phase 1) ══
   The transcript's toc-panel + the 2-col grid pushed the body far down and drew
   the TOC as a bare numbered rail. Hide that sidebar TOC and flow one column;
   the section headings live in the text. A per-topic refs/TOC page comes later.
   Width/margin previously forced by mvp2-compat's grid rule; now owned here. */
body.mvp2-live main.matn-wrap,
body.mvp2-live .matn-wrap.mvp2-reading{
  display:block;grid-template-columns:none;grid-template-rows:none;
  width:min(1180px,calc(100% - 34px));max-width:none;margin:30px auto 60px;padding:0}
body.mvp2-live main.matn-wrap .toc-panel,
body.mvp2-live .matn-wrap.mvp2-reading .toc-panel{display:none}
body.mvp2-live main.matn-wrap > *{max-width:var(--read-max,74rem);margin-inline:auto}
body.mvp2-live main.matn-wrap .readbar2{max-width:var(--read-max,74rem);margin-inline:auto}
body.mvp2-live main.matn-wrap .matn-lead{margin:0 auto 8px}
body.mvp2-live main.matn-wrap .matn-body{margin-top:6px;min-width:0;width:auto;padding:0 0 30px}

/* narrower list pages across the whole site (owner: «عرضِ فهرست‌ها کلاً کمتر، تمام صفحات») */
.page{max-width:46rem!important}
/* matn heading aligned to the RIGHT with the body text — the flex rubric rule
   was offsetting the title text ~18px left, so it read as centred (owner).
   !important retained: mvp2-compat still sets colour/font-size on h2 and legacy
   surah/styles.css may reintroduce the flex-after rule. */
body.mvp2-live main.matn-wrap .matn-body h2{display:block!important;text-align:right!important;padding-inline:0!important}
body.mvp2-live main.matn-wrap .matn-body h2::before,
body.mvp2-live main.matn-wrap .matn-body h2::after{display:none!important}

/* ════════════════════════════════════════════════════════════════════════
   چکیدهٔ جلسه — the per-session abstract box
   Mounted under a playing session in the playlist and under a clicked row in
   the متنِ جلسات list. It borrows the page's collection colour for its frame,
   its key words and its terms, so it reads as part of the section rather than
   a generic callout. Prominent transcript shortcuts sit above AND below.
   ════════════════════════════════════════════════════════════════════════ */
.ck-box{margin:0;padding:16px 18px 14px;
  background:color-mix(in srgb,var(--c) 6%,var(--paper-high));
  border:1px solid color-mix(in srgb,var(--c) 22%,var(--paper-high));
  border-radius:12px}
.pl-item .ck-box{margin:2px 12px 12px;
  background:color-mix(in srgb,var(--c) 4%,var(--paper-high))}
/* ravankavi's rows own an accordion body already — the box rides inside it */
.ses-body .ck-box{margin:10px 0 4px;
  background:color-mix(in srgb,var(--c) 4%,var(--paper-high))}
.ck-wrap{margin:0 0 7px;animation:ck-in .16s ease}
@keyframes ck-in{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:none}}

/* every rule below is scoped under .ck-box on purpose: the series pages still
   load their legacy styles.css, whose `.pane h4`/`.pane p` (0,1,1) outrank a bare
   `.ck-h` (0,1,0) — the gold heading that leaked through on first build. */
.ck-box .ck-lede{margin:0;font-size:14.5px;line-height:2;color:var(--ink);
  text-align:justify}
.ck-box .ck-key{font-weight:700;color:var(--c-deep)}

.ck-box .ck-h{display:flex;align-items:center;gap:9px;margin:15px 0 7px;
  font-size:12.5px;font-weight:800;color:var(--c-deep);letter-spacing:-.01em}
.ck-box .ck-h::after{content:"";flex:1;height:1px;
  background:color-mix(in srgb,var(--c) 26%,transparent)}

.ck-box .ck-secs,.ck-box .ck-cons{margin:0;padding:0;list-style:none}
.ck-box .ck-secs li,.ck-box .ck-cons li{position:relative;padding-inline-start:16px;
  margin:0 0 4px;font-size:13.5px;line-height:1.85;color:var(--ink-soft)}
.ck-box .ck-secs li::before,.ck-box .ck-cons li::before{content:"";position:absolute;
  inset-inline-start:2px;top:.82em;width:5px;height:5px;border-radius:50%;
  background:color-mix(in srgb,var(--c) 55%,transparent)}
.ck-box .ck-cons li{margin-bottom:6px}
.ck-box .ck-term{color:var(--c-deep);font-weight:700}
.ck-box .ck-note{color:var(--ink-soft)}
.ck-box .ck-note::before{content:" — ";color:var(--ink-faint)}

/* the way through to the transcript — the same button above and below */
.ck-box .ck-bar{display:flex;justify-content:center}
.ck-box .ck-bar-t{margin:0 0 13px}
.ck-box .ck-bar-b{margin:15px 0 2px}
.ck-box .ck-go{display:inline-flex;align-items:center;gap:7px;
  padding:9px 20px;border-radius:999px;font-size:13px;font-weight:700;
  color:#FBF6EC;background:var(--c-deep);text-decoration:none;
  border:1px solid transparent;transition:background .14s,transform .16s ease}
.ck-box .ck-go:hover{background:var(--c);text-decoration:none;transform:translateY(-1px)}

/* a row that has an abstract shows it is openable */
.ses-row.ck-has{cursor:pointer}
.ses-row.ck-on{background:color-mix(in srgb,var(--c) 13%,var(--paper-high));
  border-color:color-mix(in srgb,var(--c) 38%,var(--paper-high))}

@media (max-width:34rem){
  .ck-box{padding:13px 14px 12px}
  .ck-lede{font-size:14px;line-height:1.95}
  .pl-item .ck-box{margin-inline:8px}
}

/* ════════════════════════════════════════════════════════════════════════
   بازخوردِ مالک ۲۰۲۶-۰۷-۲۴ — عرضِ متن و اندازهٔ تیترها
   1) The transcript column was 672px (--measure 42rem) under a 1105px title:
      the text read as half a page. The owner's rule now covers the transcript
      too — «عرض متنها همه جا هم‌ارز تیترها باشه» — so the reading measure is
      dropped and the body fills its wrapper, level with the heading above it.
   2) Headings were oversized (the matn h1 hit 38px at 1280px). The whole type
      scale steps down; the two clamps that bypass the tokens are re-set here.
   ════════════════════════════════════════════════════════════════════════ */

/* ── 1 · متن هم‌عرضِ تیتر + سقفِ مشترک ─────────────────────────────────
   Phase-1 (2026-07-25): mvp2-compat no longer pins max-width/grid with
   !important, so the `html` specificity bump is no longer required against
   that sheet. Values unchanged (--read-max:74rem). A single rule replaces
   the old two-step (none → --read-max) cascade. */
:root{
  --fs-display: clamp(25px, 3.9vw, 33px);
  --fs-h1:      clamp(19px, 2.6vw, 24px);
  --fs-h2:      18px;
  --fs-h3:      16px;
  --read-max:   74rem;
}
body.mvp2-live main.matn-wrap > *,
body.mvp2-live .matn-wrap .matn-body,
body.mvp2-live main.matn-wrap .readbar2,
.matn,
.desk[data-rail="mini"] .matn,
.desk[data-rail="off"] .matn{
  max-width:var(--read-max);margin-inline:auto}
/* h1 size: was forced via html+!important against mvp2-compat's larger clamp;
   compat no longer sets font-size, so a normal rule is enough. Keep !important
   only to beat any leftover surah/styles.css heading sizes. */
body.mvp2-live .s-head h1,
body.mvp2-live .hero h1{font-size:clamp(1.2rem,2.1vw,1.55rem)!important}
.idx-head h1,.hero h1{font-size:clamp(1.2rem,2.6vw,1.5rem)}
.page-head h1,main:has(.catalog) h1{font-size:clamp(1.35rem,3vw,1.9rem)}
.catalog-head h2{font-size:1.2rem}
.mast h1{font-size:clamp(1.25rem,2.7vw,1.7rem)}
/* the banner's own text takes the SAME ceiling, so title and body stay equal */
body.mvp2-live .s-head h1,
body.mvp2-live .s-head .s-meta,
body.mvp2-live .s-head .back{max-width:var(--read-max);margin-inline:auto}
/* mobile: a comfortable gutter, never text on the glass edge */
@media (max-width:34rem){
  body.mvp2-live .matn-wrap .matn-body{padding-inline:4px}
  body.mvp2-live main.matn-wrap{padding-inline:14px;width:min(100% - 24px,1180px)}
}
/* (سطرهای فشرده در shangarf-site.css است — آن فایل بعد از این بار می‌شود) */

/* ── تیترهای سرلوح وسط‌چین ───────────────────────────────────────────────
   `.sarlouh h1` carries a 56rem measure but had no `margin-inline:auto`, so on
   any viewport wider than that measure the BOX sat flush to the RTL start and
   the centred text inside it read as pushed to the right — «منابعِ تکمیلی» on
   /resources/ was the visible case. Centring the box fixes every banner at once.
   (Only boxes narrower than their parent are affected; nothing else moves.) */
.sarlouh h1,.sarlouh .sub,.sarlouh .kicker,.sarlouh .lead,
.mast h1,.mast .sub,.mast .kick,
.page-head h1,.page-head .lead,
.s-head h1,.s-head .s-meta{margin-inline:auto!important}

/* === reading-desk.css === */
/* ============================================================================
   دفترِ خواندن — Reading Desk
   Shangarf extension for long-form pages · Claude Design lane · 2026-07-19

   The brief: a collapsible side index so the text can be read full-width, plus a
   font-size control. The reference (shahname.web.app) keeps one long list open
   beside the text — good, but it is binary: the list is either there, eating a
   third of the screen, or you lose your place entirely.

   This does three things it doesn't:

   1. THREE RAIL STATES, not two.  باز (full TOC + apparatus) → تیغه (a slim
      numbered spine that still shows where you are, and expands on hover) →
      بسته (gone; the text takes the full measure). The middle state is the
      point: you can reclaim ~85% of the rail's width and still never lose your
      position in an 11,000-word transcript.

   2. THE INDEX KNOWS WHERE YOU ARE. An IntersectionObserver marks the section
      being read; the spine shows it as a filled pip, the open rail highlights
      the row, and a hairline progress bar under the header reports how far
      through the session you are. The reference list is inert by comparison.

   3. TEXT SIZE IS A READING SETTING, not a zoom.  Four steps scale the body,
      the ayah and the translation together on their own ratios — scripture
      keeps its dominance over prose at every step — while the chrome stays put.

   Every setting persists per-reader in localStorage.
   ========================================================================= */

/* ---------- reading settings: four text steps --------------------------- */
/* Prose only: 16→20.
   قلعهٔ آیه — the ayah block and its فولادوند translation are deliberately NOT on
   this ladder. They used to be (22→28 / 15→18), which meant the typography control
   resized scripture; the owner's ruling (2026-07-27) is that the reading controls
   must never touch the ayah. --fs-ayah / --lh-ayah / --fs-tr therefore keep the
   fixed values set in shangarf.css and are not restated here — restating them at
   this specificity is exactly how the ladder captured them the first time. */
:root[data-fs="1"]{--fs-body:16px}
:root[data-fs="2"]{--fs-body:17px}
:root[data-fs="3"]{--fs-body:18.5px}
:root[data-fs="4"]{--fs-body:20px}

/* ---------- reading settings: three leading steps ----------------------- */
/* Leading is its own axis, not a side effect of size. It used to ride along with
   the size ladder (1.9→2.05, a range too narrow to be worth having); a reader who
   wants air between the lines usually does not want larger glyphs as well.
   Step 2 is the previous default exactly, so an untouched reader sees no change.
   The ayah keeps --lh-ayah and is untouched here for the same reason as above. */
:root[data-lh="1"]{--lh-body:1.75}
:root[data-lh="2"]{--lh-body:1.95}
:root[data-lh="3"]{--lh-body:2.25}

/* ---------- قلعهٔ آیه, part two: the المیزان boxes ----------------------
   117 pages (almizan/*, nazm-fehrest) carry their own inline <style> sizing the
   ayah as `calc(1.15em * var(--dtfs,1))`. Retiring --dtfs makes that multiplier
   inert, but the `em` does not: it resolves against a body that the size ladder
   scales, so the ayah still travelled 18.4 → 23 px with a preference set on some
   other page — measured, 2026-07-27. These pages ship no reading control of their
   own, so nothing on the page revealed it.
   Pinned to what the default reader already sees (1.15 × 17px, .92 × 17px), so
   the freeze changes nothing for anyone at the default step. `:root` prefix only
   to outrank the page's inline rule, which is otherwise an exact specificity tie
   decided by document order. */
:root .ay-ar{font-size:calc(1.15 * 17px)}
:root .ay-fa{font-size:calc(.92 * 17px)}

/* ---------- al-Mizan touch targets (2026-07-29) ---------------------------
   Measured on /almizan/al-imran at 320/360/375: `.mz-toc a` hit boxes were
   20.0 px (single-line) and 38.8 px (two-line) — both under the 40 px floor that
   lecture text pages already meet. Chips and `.back` were already ≥40 px.
   Floor the TOC/nav links without changing page HTML. Padding moves onto the
   anchor so the whole row is the hit target; list-item padding is zeroed so the
   total does not double. */
.mz-toc a,
.mz-navlist a,
.mz-foot a{
  display:flex;align-items:center;min-height:44px;
  padding-block:10px;box-sizing:border-box
}
.mz-toc li{padding-block:0}
.mz-navlist li{padding-block:0}
/* Reading bar injected by reading-desk.js on al-Mizan text pages.
   Sits as first child of `main.mz-wrap` so mobile sees it above the rail. */
main.mz-wrap > .readbar2.mz-readbar,
.mz-main > .readbar2.mz-readbar{margin-top:0;margin-bottom:14px}

/* ---------- chrome offset tokens (BS 2026-07-30) --------------------------
   `#dtbar` is position:fixed; z-index 9000; ~39 px on desktop when `.show` is on
   (scrollY > 170). It is out of flow, so nothing used to clear it: the sticky
   reading bar at top:0 slid underneath (z-index 40 vs 9000) and h2 scroll-margin
   of 60 px undershot chrome+bar (~91 px). Heights are published at runtime by
   reading-desk.js — never hardcode 39; the bar is shorter on a phone. */
:root{
  --chrome-h:0px;
  --readbar-h:52px;
  --read-scroll-pad:calc(var(--chrome-h) + var(--readbar-h))
}
html{scroll-padding-top:var(--read-scroll-pad)}
/* Beat mvp2-compat's fixed 60 px so TOC jumps clear chrome + expanded bar.
   Targets include section.mz-passage[id] (al-Mizan rail links), not only h2. */
body.mvp2-live .matn-body h2,
.matn-body h2[id],
.prose h2[id],
.matn h2[id],
[data-reader-column] h2[id],
[data-reader-column] [id],
.mz-main h2[id],
.mz-body h2[id],
.mz-unit h2[id],
.mz-passage[id],
.mz-unit[id],
.g-year[id]{
  scroll-margin-top:var(--read-scroll-pad)
}

/* ---------- the reading bar (built by desk.js) --------------------------
   Moved here from surah/styles.css. It is not a تفسیر component: desk.js builds
   it on every transcript family, including روانکاوی, which never loads that file.
   Re-tokenised on the way — it was written against a hardcoded cream and a
   hardcoded brown, so it stayed light while the page went dark, and it now
   carries the theme control itself.

   BS 2026-07-30 — mechanism: sticky (not a free-floating fixed toolbar).
   Sticks BELOW the fixed chrome via top:var(--chrome-h). After the reader
   scrolls past, reading-desk.js collapses the bar and shows `.rb-peek` (a 44×44
   FAB in the thumb zone). Traded away: a permanently expanded sticky strip
   (would cost ~7 % of an 812 px phone screen for a control used once). */
.readbar2{position:sticky;top:var(--chrome-h,0px);z-index:50;display:flex;align-items:center;gap:5px;
  margin:0 0 16px;padding:7px 10px;background:var(--paper-mid);
  border:1px solid var(--line);border-radius:12px;
  transition:opacity .18s ease,box-shadow .18s ease}
.readbar2.stuck{box-shadow:var(--shadow)}
/* Collapsed: leave the in-flow slot (avoids layout shift of the text that was
   under the original bar position) but paint nothing — the peek FAB takes over. */
.readbar2.is-collapsed{
  opacity:0;pointer-events:none;box-shadow:none;
  /* Keep layout height so the document does not jump when the class toggles
     while the original box is still near the viewport. Visual hide only. */
  visibility:hidden
}
@media (prefers-reduced-motion:reduce){
  .readbar2{transition:none}
}
.readbar2 .rb-t{font-size:.78rem;font-weight:600;color:var(--ink-faint);
  margin-inline-end:auto;padding-inline-start:6px;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
/* Base (mouse) target 36 px; phone media below raises to 44 px. Never leave
   the desktop size as the only size — 31 px was why four of seven controls
   measured under 40 px when the phone block did not apply or was not shipped. */
.rb2{width:36px;height:36px;flex:none;border:1px solid transparent;border-radius:8px;
  background:transparent;color:var(--ink-faint);display:grid;place-items:center;
  cursor:pointer;transition:background .14s,color .14s}
.rb2:hover{background:var(--paper-deep);color:var(--ink)}
.rb2.on{background:var(--paper-deep);color:var(--ink);border-color:var(--line-strong)}
.rb2:disabled{opacity:.35;cursor:default}
.rb2 svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round}
.readbar2 .sep2{width:1px;height:18px;background:var(--line);margin:0 3px}
.fsn2{font-size:.76rem;font-weight:700;color:var(--ink);min-width:1.1em;text-align:center}

/* ---------- the picker's faces, declared HERE on purpose ------------------
   `assets/fonts/fonts.css` is the site font manifest, but the TRANSCRIPT pages
   do not link it — measured: their <link> set is surah/styles.css, shangarf.css,
   reading-desk.css, mvp2-compat.css, final-light-center.css, sitewide-fixes.css,
   and their @font-face rules come from the first two. Declaring the picker's
   faces only in fonts.css left them undefined on every page that can pick them:
   they rendered correctly on this machine ONLY because Vazirmatn, Samim and
   Sahel happen to be installed as system fonts here, which a reader will not have.
   So they are declared in the file that owns the picker and is loaded wherever
   the bar appears. URLs are root-absolute: this file lives at /assets/, so a
   relative `fonts/…` would break on any page depth, and `cleanUrls:true` already
   makes relative urls resolve one level too high on index pages. */
@font-face{font-family:'Vazirmatn';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/Vazirmatn-Regular.woff2') format('woff2')}
@font-face{font-family:'Vazirmatn';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/Vazirmatn-Medium.woff2') format('woff2')}
@font-face{font-family:'Vazirmatn';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/fonts/Vazirmatn-Bold.woff2') format('woff2')}
@font-face{font-family:'Samim';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/Samim-Regular.woff2') format('woff2')}
@font-face{font-family:'Samim';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/Samim-Medium.woff2') format('woff2')}
@font-face{font-family:'Samim';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/fonts/Samim-Bold.woff2') format('woff2')}
@font-face{font-family:'Sahel';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/Sahel-Regular.woff2') format('woff2')}
@font-face{font-family:'Sahel';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/fonts/Sahel-Bold.woff2') format('woff2')}
/* the naskh option — one weight only; the face has no bold cut here, so headings
   inside a naskh reading column synthesise weight rather than swap family */
@font-face{font-family:'Noto Naskh Arabic';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/NotoNaskhArabic-Regular.woff2') format('woff2')}

/* ---------- reader-selectable reading font (2026-07-27; BQ 2026-07-29) --
   Estedad remains the site face and the default; these are offered, never
   imposed. Latin stays Inter in every option so digits and Latin words do not
   jump between faces — only the Persian half of the stack changes.

   Binding is two-layer so a fifth family does not need another class listed:
   1. `[data-reader-column]` — stamped by desk.js / reading-desk.js after
      discovery (or authored in markup). Direct font-family for columns that
      inherit (transcripts).
   2. `--mz-ff` on `:root` — al-Mizan prose sets `font-family: var(--mz-ff)` on
      `.mz-body p` (measured), so inheritance from the stamped column never
      reaches the glyphs. Rebinding the variable is the one fix that lands.
   Historical class selectors stay as a no-stamp fallback. Never touch
   `--mz-ff-ayah`. */
:root[data-font="vazirmatn"]{
  --mz-ff:'Inter','Vazirmatn',system-ui,sans-serif}
:root[data-font="vazirmatn"] [data-reader-column],
:root[data-font="vazirmatn"] .matn-body,
:root[data-font="vazirmatn"] .prose,
:root[data-font="vazirmatn"] .matn{font-family:'Inter','Vazirmatn',system-ui,sans-serif}
:root[data-font="samim"]{
  --mz-ff:'Inter','Samim',system-ui,sans-serif}
:root[data-font="samim"] [data-reader-column],
:root[data-font="samim"] .matn-body,
:root[data-font="samim"] .prose,
:root[data-font="samim"] .matn{font-family:'Inter','Samim',system-ui,sans-serif}
:root[data-font="sahel"]{
  --mz-ff:'Inter','Sahel',system-ui,sans-serif}
:root[data-font="sahel"] [data-reader-column],
:root[data-font="sahel"] .matn-body,
:root[data-font="sahel"] .prose,
:root[data-font="sahel"] .matn{font-family:'Inter','Sahel',system-ui,sans-serif}
/* Naskh sets smaller than the sans faces at the same px: measured on a Persian
   sample, 304.3 px against Estedad's 343.6 px — 11.4 % narrower — so it carries
   a size compensation.
   The multiplier is 1.06, NOT the 1.129 the raw ratio suggests. `em` resolves
   against the PARENT, and `.matn-body` already sits below its parent, so a
   1.129em overshot to 19.04 px and made naskh 5.4 % WIDER than Estedad. 1.06
   lands on parity — verify by width, never by the nominal px.
   The reader's size steps survive this: they scale the parent, so the multiplier
   rides on top (measured 19.04 → 20.72 → 22.4 across the steps). The ayah pin
   below is unaffected — it re-declares family and never inherits this size. */
:root[data-font="naskh"]{
  --mz-ff:'Inter','Noto Naskh Arabic',serif}
:root[data-font="naskh"] [data-reader-column],
:root[data-font="naskh"] .matn-body,
:root[data-font="naskh"] .prose,
:root[data-font="naskh"] .matn{font-family:'Inter','Noto Naskh Arabic',serif;
  font-size:1.06em}
/* naskh size compensation on al-Mizan units that size from 1em */
:root[data-font="naskh"] .mz-body p{font-size:calc(1.06em * var(--dtfs,1))}

/* THE AYAH NEVER FOLLOWS THE PICKER — this pin is load-bearing, not defensive.
   `.quran-ar` does NOT in fact read `--ff-ayah` on these pages: measured, it
   computes to the body stack, so the Amiri variable is declared and unused.
   Without this rule a font change would re-set Quran text, which the project
   forbids outright. Specificity here (0,3,1) deliberately outranks the
   `:root[data-font=…] .matn-body` / `[data-reader-column]` rules above (0,2,1).
   al-Mizan ayah boxes use `.ay-ar` / `.ay-fa` — pin them too, or stamping
   `.mz-main` as the reader column would re-face scripture through inheritance. */
:root[data-font] .quran-ar,:root[data-font] .quran-fa,
:root[data-font] .ayah-ar,:root[data-font] .ayah-fa,
:root[data-font] .ay-ar,:root[data-font] .ay-fa,
:root[data-font] .matn-body .quran-ar,:root[data-font] .matn-body .quran-fa,
:root[data-font] .prose .quran-ar,:root[data-font] .prose .quran-fa,
:root[data-font] [data-reader-column] .quran-ar,:root[data-font] [data-reader-column] .quran-fa,
:root[data-font] [data-reader-column] .ay-ar,:root[data-font] [data-reader-column] .ay-fa{
  font-family:'Inter','Estedad',system-ui,sans-serif}

/* ---------- session contents: a disclosure, not a wall (2026-07-28) --------
   Collapsed by default. The list is closed by `.toc-list` being hidden unless
   the panel carries `.toc-open`; desk.js adds that class and the button. With
   JS off neither exists, `.toc-open` is never applied — so the rule below would
   hide the list permanently. That is why the hide is scoped to `:has(.toc-toggle)`:
   the list only collapses once the control that reopens it is actually present.
   Only the CLOSED state is styled. An earlier version also set `display:block`
   for the open state, which quietly flattened the list — its natural layout is
   `display:grid`, so opening it changed the column arrangement. Say nothing
   about the open state and the list keeps whatever the page gave it. */
.toc-panel:has(.toc-toggle):not(.toc-open) .toc-list{display:none}

.toc-panel h2:has(.toc-toggle){margin:0;padding:0;border:0;background:none}
.toc-toggle{display:flex;align-items:center;gap:10px;width:100%;
  min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;
  background:var(--paper-mid);color:inherit;font:inherit;text-align:start;cursor:pointer}
.toc-toggle:hover{background:var(--paper-deep)}
.toc-toggle .toc-tt{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap}
/* the count is a Persian numeral in Persian reader-facing chrome */
.toc-toggle .toc-n{flex:none;font-size:.82em;opacity:.7}
.toc-toggle .toc-chev{flex:none;width:18px;height:18px;fill:none;stroke:currentColor;
  stroke-width:2;stroke-linecap:round;stroke-linejoin:round;
  transition:transform .18s ease}
.toc-panel.toc-open .toc-chev{transform:rotate(180deg)}
@media (prefers-reduced-motion:reduce){.toc-toggle .toc-chev{transition:none}}

/* the picker menu */
.rb-fw{position:relative;display:flex;flex:none}
.rb-menu{position:absolute;top:calc(100% + 7px);inset-inline-end:0;z-index:70;
  min-width:11.5rem;padding:5px;background:var(--paper-high);
  border:1px solid var(--line-strong);border-radius:12px;box-shadow:var(--shadow);
  display:none}
.rb-menu.open{display:block}
.rb-menu button{display:flex;align-items:center;justify-content:space-between;gap:10px;
  width:100%;min-height:40px;padding:8px 11px;border:0;border-radius:8px;
  background:transparent;color:var(--ink);font-size:1rem;line-height:1.5;
  cursor:pointer;text-align:start}
.rb-menu button:hover{background:var(--paper-deep)}
.rb-menu button[aria-checked="true"]{background:var(--paper-deep)}
.rb-menu .tk{flex:none;opacity:0;color:var(--c-deep);font:700 13px/1 var(--ff-latin)}
.rb-menu button[aria-checked="true"] .tk{opacity:1}

/* reading progress — same chrome clearance as the reading bar */
.mprog{position:sticky;top:var(--chrome-h,0px);z-index:55;height:2.5px;background:var(--line-cool);
  margin-bottom:-2.5px}
.mprog i{display:block;height:100%;width:0;background:var(--zar);transition:width .12s linear}

/* ---------- collapsed reading-control peek (BS 2026-07-30) ----------------
   Placement: bottom-START (inset-inline-start). On this RTL site that is the
   bottom-right corner — the natural rest zone for a right-hand thumb on a
   375 px phone. Top-start (and especially top-end / top-left) is the hardest
   one-handed reach. `.resume` already occupies bottom-start; when the peek is
   on, resume is lifted so the two never stack on the same 44 px. al-Mizan's
   `.mz-toc` at 375 is a block above the column, not a bottom rail, so it does
   not collide with this corner. */
.rb-peek{
  position:fixed;z-index:60;
  inset-block-end:calc(18px + env(safe-area-inset-bottom,0px));
  inset-inline-start:18px;
  width:44px;height:44px;min-width:44px;min-height:44px;
  display:none;place-items:center;
  padding:0;border:1px solid var(--line-strong);border-radius:999px;
  background:var(--paper-high);color:var(--ink);
  font:700 15px/1 'Inter','Estedad',system-ui,sans-serif;
  box-shadow:var(--shadow);cursor:pointer;
  opacity:0;transform:translateY(8px);pointer-events:none;
  transition:opacity .18s ease,transform .18s ease
}
.rb-peek.is-on{display:grid;opacity:1;transform:none;pointer-events:auto}
.rb-peek:hover{background:var(--paper-deep)}
.rb-peek:focus-visible{outline:2px solid var(--c-deep,var(--zar));outline-offset:2px}
html:has(.rb-peek.is-on) .resume-pill{
  inset-block-end:calc(18px + 44px + 10px + env(safe-area-inset-bottom,0px))
}
@media (prefers-reduced-motion:reduce){
  .rb-peek{transition:none;transform:none}
}
@media print{
  .rb-peek{display:none!important}
}

/* ---------- the bar on a phone (2026-07-27) ------------------------------
   It used to be hidden outright below 62rem, which left a phone reader with no
   size, leading or theme control at all. It is now laid out for the phone rather
   than removed. Four changes, each buying width for a 40 px tap target:
     · the title goes — the page already carries it as <h1>, and being the only
       flexible child it was eating the row;
     · the "mini" rail button goes — below 64rem `.spine` is display:none!important,
       so mini and open render identically; two buttons for one state is a trap;
     · the decorative separators go;
     · `overflow-x:auto` is a safety valve, not the layout: at 375 px the row
       measures ~356 px and does not scroll. Below ~360 px it scrolls INSIDE the
       bar, so the PAGE never gains a sideways scroll.
   `off` is kept because it still does real work here: below 64rem the rail is a
   static block above the text and `off` collapses it. */
@media(max-width:62rem){
  /* gap 2px reads tighter than it looks: the icon is 18 px inside a 40 px target,
     so the visual space between two icons is 2+11+11 = 24 px. The tap target is
     what must not shrink, and it does not. */
  .readbar2{gap:2px;padding:6px;overflow-x:auto;scrollbar-width:none;
    -webkit-overflow-scrolling:touch}
  .readbar2::-webkit-scrollbar{display:none}
  .readbar2 .rb-t{display:none}
  .readbar2 .sep2{display:none}
  /* All three rail buttons go on a phone, and the font button takes their place.
     Below 64rem the rail is not a rail at all — it is a plain block of contents
     sitting above the text — so "open / mini / off" were three controls for a
     thing the reader can already see and scroll past. The last line forces that
     block visible even for a reader whose saved state is `off` from a desktop
     session, so nothing becomes unreachable by removing the buttons.
     This is also what buys the row its width: 6 controls fit at 320 px, where
     the 8 of the previous layout overflowed 375 px by 24 px. */
  .readbar2 [data-r]{display:none}
  .desk[data-rail="off"] .deskrail{display:block}
  /* 44 px floor (accepted mobile target). Was 40 — between 40 and 44 is not
     the floor the owner asked for on this pass. */
  .rb2{width:44px;height:44px}
  .rb2 svg{width:18px;height:18px}
  /* `.fsn2` inherits flex-shrink:1, and with the row at its limit the flex
     algorithm crushed both numerals to 4.3 px — the size and leading VALUES,
     clipped to a sliver. They must not shrink; the 1.1em desktop alignment
     padding is what goes instead (the value is always one digit, 1-4). */
  .readbar2 .fsn2{flex:none;min-width:0}

  /* The font menu must LEAVE the bar on a phone. `overflow-x:auto` above also
     makes overflow-y `auto`, so an absolutely-positioned menu becomes a 172 px
     panel trapped inside a 52 px scrolling strip — measured, fully clipped.
     `position:fixed` escapes that clip (no ancestor sets a transform, which is
     the one thing that would trap it) and a bottom sheet is the honest phone
     shape anyway: always fully on screen wherever the bar has scrolled to. */
  .readbar2 .rb-menu{position:fixed;inset-inline:14px;inset-block-end:14px;
    top:auto;min-width:0;padding:6px;border-radius:14px}
  .readbar2 .rb-menu button{min-height:46px;font-size:1.05rem;padding:10px 13px}
}

/* ---------- بازگشت به موقعیتِ خواندن -----------------------------------
   An offer, not a jump — see the note in reading-desk.js. Sits opposite the
   toTop button so the two never stack. */
.resume-pill{position:fixed;inset-block-end:18px;inset-inline-start:18px;z-index:60;
  padding:9px 15px;border:1px solid var(--line-strong);border-radius:999px;
  background:var(--paper-high);color:var(--ink);font:600 .82rem/1 var(--ff);
  box-shadow:var(--shadow);cursor:pointer;
  opacity:0;transform:translateY(8px);pointer-events:none;
  transition:opacity .22s ease,transform .22s ease}
.resume.in,.resume-pill.in{opacity:1;transform:none;pointer-events:auto}
.resume-pill:hover{background:var(--paper-deep)}
@media(prefers-reduced-motion:reduce){.resume-pill{transition:none}}

/* ---------- the desk shell ---------------------------------------------- */
/* NOTE: no transition on grid-template-columns. Chrome freezes a var()-based track
   list mid-transition and stops re-resolving it, so switching to تیغه left the rail
   at its open width (measured: --rail-w read 3.25rem while the track stayed 304px).
   The rail animates its own width/opacity instead — same feel, no stuck track. */
.desk{--rail-w:19rem;
  display:grid;grid-template-columns:var(--rail-w) minmax(0,1fr);
  gap:clamp(20px,3.4vw,48px);align-items:start;padding-top:var(--s5)}
.desk > .deskrail{order:-1}

/* تیغه — the slim spine */
.desk[data-rail="mini"]{--rail-w:3.25rem}
/* بسته — full width */
.desk[data-rail="off"]{--rail-w:0px;gap:0}
.desk[data-rail="off"] .deskrail{opacity:0;pointer-events:none;overflow:hidden}

.deskrail{position:sticky;top:14px;max-height:calc(100vh - 28px);
  display:flex;flex-direction:column;gap:var(--s3);min-width:0;width:100%;
  transition:opacity .2s ease}
/* the head must be allowed to shrink with the track, or its flex content pins the
   rail open in تیغه */
.railhead,.spine{width:100%;min-width:0;box-sizing:border-box}

/* ---------- rail head ---------------------------------------------------- */
.railhead{display:flex;align-items:center;gap:6px;background:var(--paper-high);
  border:1px solid var(--line);border-radius:12px;padding:5px;box-shadow:var(--shadow)}
.desk[data-rail="mini"] .railhead{display:none}
.rbtn{flex:none;width:34px;height:34px;border-radius:9px;border:1px solid transparent;
  background:transparent;color:var(--ink-faint);display:grid;place-items:center;cursor:pointer;
  transition:background .14s,color .14s}
.rbtn:hover{background:var(--c-wash);color:var(--c-deep)}
.rbtn.on{background:var(--c-wash);color:var(--c-deep);border-color:var(--c-tint)}
.rbtn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round}
.railhead .lbl{font-size:var(--fs-micro);font-weight:600;color:var(--ink-faint);
  margin-inline-end:auto;padding-inline-start:8px;white-space:nowrap}
.desk[data-rail="mini"] .railhead .lbl{display:none}

/* text-size stepper */
.fsx{display:flex;align-items:center;gap:2px;border-inline-start:1px solid var(--line);
  padding-inline-start:5px;margin-inline-start:3px}
.desk[data-rail="mini"] .fsx{border:0;border-top:1px solid var(--line);
  padding:5px 0 0;margin:3px 0 0;flex-direction:column}
.fsx b{font-size:var(--fs-micro);font-weight:700;color:var(--c-deep);
  min-width:1.5em;text-align:center;font-variant-numeric:tabular-nums}
.desk[data-rail="mini"] .fsx b{display:none}

/* ---------- open rail: TOC with position ------------------------------- */
.deskpanels{display:flex;flex-direction:column;gap:var(--s3);overflow:auto;
  min-height:0;scrollbar-width:thin;padding-bottom:4px}
.desk[data-rail="mini"] .deskpanels{display:none}

.dtoc{background:var(--paper-high);border:1px solid var(--line);
  border-radius:var(--radius-lg);box-shadow:var(--shadow);overflow:hidden;flex:none}
.dtoc > h2{font-size:var(--fs-micro);font-weight:700;color:var(--c-deep);
  background:var(--c-wash);border-bottom:1px solid var(--line);padding:9px 15px;
  display:flex;justify-content:space-between;align-items:center}
.dtoc > h2 .of{font-weight:600;opacity:.75}
.dtoc ol{list-style:none;margin:0;padding:6px 0;counter-reset:dt}
.dtoc li{counter-increment:dt}
/* Two columns by default; a third opens only for the entries that carry a session
   range, so the plain tables of contents on other pages are untouched. */
.dtoc a{display:grid;grid-template-columns:1.6em 1fr;gap:9px;align-items:baseline;
  padding:6px 15px;font-size:var(--fs-side);line-height:1.62;color:var(--ink-soft)}
.dtoc a:has(.rng){grid-template-columns:1.6em 1fr auto}
.dtoc a .t{min-width:0;overflow:hidden;text-overflow:ellipsis}
.dtoc a .rng{font-size:var(--fs-micro);color:var(--ink-faint);white-space:nowrap;
  font-variant-numeric:tabular-nums;letter-spacing:0.02em}
.dtoc a:hover .rng,.dtoc a.now .rng{color:var(--c-deep)}
.dtoc a::before{content:counter(dt, persian);font-size:var(--fs-micro);font-weight:600;
  color:var(--c);background:var(--c-wash);border-radius:5px;padding:1px 0;text-align:center}
.dtoc a:hover{background:var(--paper-deep);color:var(--ink);text-decoration:none}
.dtoc a.now{background:var(--c-wash);color:var(--c-deep);font-weight:600;
  box-shadow:inset 2.5px 0 0 var(--c)}
.dtoc a.now::before{background:var(--c);color:var(--paper)}

/* ---------- mini rail: the numbered spine ------------------------------- */
.spine{display:none;flex-direction:column;gap:3px;align-items:center;overflow:auto;
  padding:8px 0;background:var(--paper-high);border:1px solid var(--line);
  border-radius:12px;box-shadow:var(--shadow);scrollbar-width:none}
.spine::-webkit-scrollbar{display:none}
.desk[data-rail="mini"] .spine{display:flex}
.spine a{position:relative;width:30px;height:26px;border-radius:7px;display:grid;
  place-items:center;font-size:var(--fs-micro);font-weight:600;color:var(--ink-faint);
  font-variant-numeric:tabular-nums}
.spine a:hover{background:var(--c-wash);color:var(--c-deep);text-decoration:none}
.spine a.now{background:var(--c);color:var(--paper)}
/* hover reveals the section title without leaving the spine */
.spine a::after{content:attr(data-t);position:absolute;inset-inline-end:calc(100% + 9px);
  top:50%;transform:translateY(-50%) translateX(6px);white-space:nowrap;
  background:var(--ink);color:var(--paper);font-size:var(--fs-micro);font-weight:500;
  padding:5px 11px;border-radius:8px;opacity:0;pointer-events:none;
  transition:opacity .15s,transform .15s;max-width:15rem;overflow:hidden;
  text-overflow:ellipsis;z-index:20;box-shadow:var(--shadow)}
.spine a:hover::after{opacity:1;transform:translateY(-50%) translateX(0)}

/* ---------- reading progress -------------------------------------------- */
.progress{position:sticky;top:var(--chrome-h,0px);z-index:55;height:2.5px;background:var(--line);
  margin-bottom:-2.5px}
.progress i{display:block;height:100%;width:0;background:var(--c);
  transition:width .12s linear}

/* ---------- the reading bar: sticky, between header and text --------------
   Three placements were tried and rejected. A dock pinned to the screen edge read
   as a browser extension bolted onto the page. Inside the سرلوح it scrolled away
   exactly when a long read starts needing it. Floating and centred needed a
   show/hide rule, which meant it was sometimes absent when reached for.

   This is the plain answer: a bar that sits where the reader's eye already goes —
   between the title block and the first line — and then sticks to the top of the
   viewport for the rest of the session. Always there, never in the way, and it
   costs one strip of height instead of hovering over the words. */
.readbar{position:sticky;top:var(--chrome-h,0px);z-index:50;
  display:flex;align-items:center;gap:8px;
  margin:0 0 var(--s4);padding:8px 14px;
  background:color-mix(in oklab, var(--paper) 92%, transparent);
  border:1px solid var(--line);border-radius:12px;
  backdrop-filter:blur(12px) saturate(1.4);-webkit-backdrop-filter:blur(12px) saturate(1.4);
  transition:box-shadow .18s ease, border-color .18s ease}
/* once it has parted from the header it lifts off the page slightly */
.readbar.stuck{border-color:var(--line-strong);
  box-shadow:0 1px 3px rgba(38,33,25,.10), 0 12px 28px -14px rgba(38,33,25,.40)}

.readbar .rb-label{font-size:var(--fs-micro);font-weight:600;color:var(--ink-faint);
  margin-inline-end:auto;white-space:nowrap}
/* the label yields first when space is tight — the controls never wrap */
@media (max-width:34rem){.readbar .rb-label{display:none}}

.rbtn2{width:36px;height:36px;border-radius:9px;border:1px solid transparent;
  background:transparent;color:var(--ink-faint);display:grid;place-items:center;
  cursor:pointer;transition:background .14s,color .14s;flex:none}
.rbtn2:hover{background:var(--c-wash);color:var(--c-deep)}
.rbtn2.on{background:var(--c-wash);color:var(--c-deep);border-color:var(--c-tint)}
.rbtn2:disabled{opacity:.3;cursor:default}
.rbtn2 svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round}
/* the A-A size mark is type, so it is filled rather than stroked */
.rmark{width:30px;display:grid;place-items:center;color:var(--ink-faint);flex:none}
.rmark svg{fill:currentColor;stroke:none;width:20px;height:20px}
.readbar .sep{width:1px;height:19px;background:var(--line);margin:0 2px;flex:none}
/* Latin digit: a setting value beside a Latin size mark, not Persian prose */
.readbar .fsn{min-width:1.6em;text-align:center;font:700 12px/1 var(--ff-latin);
  color:var(--c-deep);font-variant-numeric:tabular-nums;direction:ltr}

/* ---------- index / hub pages keep only the theme switch (2026-07-27) ------
   All 58 pages that ship a static `.readbar` are index or hub pages — measured:
   not one of them has a reading column (`.matn-body` / `.prose` / `.matn`). A
   type-size and line-height control on a page with no running text is a control
   over nothing, so those pages keep the page name and the light/dark switch and
   drop the rest. The AA mark and the separators are decoration for controls that
   are no longer there.
   Scoped with `:has()` rather than a flat `.readbar` rule so it corrects itself:
   the moment such a page does gain a reading column the controls come back, and
   on any engine without `:has()` the rule simply does not apply — the failure
   mode is "controls still shown", never "controls wrongly hidden". */
body:not(:has(.matn-body, .prose, .matn)) .readbar :is(
  .rmark, .sep, [data-fs-step], [data-fs-val], [data-lh-step], [data-lh-val]
){display:none}

/* On a phone this bar gets the same 40 px tap target as `.readbar2`, so the two
   toolbars do not disagree about how big a touch control is. The width comes out
   of the decoration, never the controls: `.rmark` is an aria-hidden "AA" glyph,
   the separators are ornamental, and `.fsn`'s 1.6em is desktop alignment padding
   for a value that is always one digit.
   NOTE: this block must stay BELOW the `.rbtn2` / `.rmark` / `.fsn` base rules.
   A media query adds no specificity, so when it sat above them the base
   `width:32px` simply won on document order and the whole block did nothing. */
@media (max-width:34rem){
  .readbar{gap:4px;padding:6px 8px}
  .readbar .rmark{display:none}
  .readbar .sep{display:none}
  .readbar .fsn{min-width:0}
  .rbtn2{width:44px;height:44px}
  .rbtn2 svg{width:18px;height:18px}
}

/* the theme switch joins the other reading settings — it was a lone floating pill
   in the corner, which split one set of controls across two places */
.rbtn2.theme-on .ic-sun{display:none}
.rbtn2 .ic-moon{display:none}
.rbtn2.theme-on .ic-moon{display:block}

@media print{.readbar{display:none!important}}
@media (prefers-reduced-motion:reduce){.readbar{transition:none}}

/* ---------- body measure follows the rail ------------------------------- */
/* The measure grows in step with the reclaimed space, but never past the point
   where a Persian line becomes tiring to track (~52rem ≈ 85 characters). */
.desk .matn{max-width:var(--measure);margin-inline:0}
.desk[data-rail="mini"] .matn{max-width:47rem}
.desk[data-rail="off"] .matn{max-width:52rem;margin-inline:auto}

/* ---------- mobile: the rail becomes a sheet ---------------------------- */
@media (max-width:64rem){
  .desk,.desk[data-rail="mini"],.desk[data-rail="off"]{grid-template-columns:1fr;gap:var(--s4)}
  .deskrail{position:static;max-height:none;opacity:1;pointer-events:auto}
  .desk[data-rail="off"] .deskrail{display:none}
  .desk[data-rail="mini"] .deskpanels{display:flex}
  .desk[data-rail="mini"] .spine{display:none}
  .spine{display:none!important}
  .railpop{inset-inline-start:14px;bottom:16px;top:auto;transform:none}
  .desk .matn,.desk[data-rail="off"] .matn{max-width:none}
  .dtoc{max-height:19rem;display:flex;flex-direction:column}
  .dtoc ol{overflow:auto}
}

@media print{
  .deskrail,.railpop,.progress,.railhead{display:none!important}
  .desk{display:block}
  .desk .matn{max-width:none}
}
@media (prefers-reduced-motion:reduce){
  .desk,.progress i,.spine a::after{transition:none}
}

/* ---------- references index: the entry grid ----------------------------- */
/* layout is [data-view]'s job; these are the reference card's own details */
.refgrid{margin:0 0 var(--s5)}
.rc-n{font-size:var(--fs-side);font-weight:600;color:var(--ink);line-height:1.55}
.rc-m{font-size:var(--fs-micro);color:var(--ink-faint);font-variant-numeric:tabular-nums}
.refcard:hover .rc-n{color:var(--c-deep)}
.h2-count{margin-inline-start:auto;font-size:var(--fs-micro);font-weight:600;
  color:var(--c-deep);background:var(--c-wash);border:1px solid var(--c-tint);
  border-radius:999px;padding:2px 11px;transform:translateY(-3px)}
.matn h2 .h2-count + *{margin:0}
/* the apparatus list reuses .dtoc chrome but keeps its two-line rows */
.appx-in{list-style:none;margin:0;padding:6px 0}
.appx-in a{display:block;padding:7px 15px}
.appx-in a:hover{background:var(--paper-deep);text-decoration:none}
.appx-in .t{display:block;font-size:var(--fs-side);font-weight:600;color:var(--ink)}
.appx-in .m{display:block;font-size:var(--fs-micro);color:var(--ink-faint);
  margin-top:1px;line-height:1.65}


/* ---------- reference sub-groups: no more orphaned labels ----------------
   The archive nests category → sub-group → sub-sub-group («اشخاص» →
   «متفکرین اسلامی و ایرانی» → «حکمت، عرفان و تفسیر»). Rendered as bare headings
   they float between card grids with nothing binding them to what they label.
   Here each sub-group is a bounded band: a tinted strip with a rule that runs to
   the margin and a count chip, and its cards indent under it, so the label
   visibly owns the block beneath it. */
.subgroup{margin:0 0 var(--s4);border-inline-start:2px solid var(--c-tint);
  padding-inline-start:16px}
.subgroup + .subgroup{margin-top:var(--s5)}
.sg-head{display:flex;align-items:center;gap:11px;margin:0 0 11px}
.sg-head .t{font-size:15.5px;font-weight:700;color:var(--c-deep);white-space:nowrap}
.sg-head .rule{flex:1;height:1px;background:var(--line-strong);opacity:.55}
.sg-head .n{flex:none;font-size:var(--fs-micro);font-weight:600;color:var(--c-deep);
  background:var(--c-wash);border:1px solid var(--c-tint);border-radius:999px;padding:2px 10px}
/* third level: quieter, no border, just a small caps-ish label */
.subsub{margin:0 0 var(--s3)}
.subsub + .subsub{margin-top:var(--s4)}
.ss-head{display:flex;align-items:baseline;gap:9px;margin:0 0 8px}
.ss-head .t{font-size:13px;font-weight:600;color:var(--ink-faint);letter-spacing:.01em}
.ss-head .n{font-size:var(--fs-micro);color:var(--ink-faint);opacity:.8}
.ss-head .rule{flex:1;height:1px;background:var(--line);opacity:.7}

/* ---------- فهرست‌های سطری — quieter, more formal than the plate cards -----
   The gate/plate cards were large gradient blocks with the title reversed out of
   a dark field; at 19px on a saturated gradient the Persian title lost contrast
   and the page read as a marketing splash rather than an archive index. These
   rows carry the same information in a fraction of the height: ink on paper for
   the title, the collection colour as a spine and a small chip, the count set as
   a number rather than a display figure. */
.rows{display:flex;flex-direction:column;gap:8px}
/* The box itself wears the collection colour: a wash of it as the fill, a
   stronger cut of the same colour as the border. Flat paper boxes with a 3px
   spine read as lifeless; the wash keeps rows apart at a glance without ever
   competing with the ink. */
.row-item{display:grid;grid-template-columns:3px 4.5rem 1fr auto;gap:16px;align-items:center;
  padding:13px 18px 13px 15px;
  background:color-mix(in srgb, var(--c) 16%, var(--paper-high));
  border:1px solid color-mix(in srgb, var(--c) 24%, var(--paper-high));
  border-radius:12px;transition:background .14s,border-color .14s}
a.row-item:hover{background:color-mix(in srgb, var(--c) 15%, var(--paper-high));
  border-color:color-mix(in srgb, var(--c) 44%, var(--paper-high));text-decoration:none}
.row-item > .spine-i{display:block;width:3px;height:34px;border-radius:2px;background:var(--c)}
.row-item .rt{min-width:0}
.row-item .rt b{display:block;font-size:16px;font-weight:700;color:var(--ink);line-height:1.5}
.row-item .rt span{display:block;font-size:var(--fs-micro);color:var(--ink-faint);
  line-height:1.7;margin-top:1px}
.row-item .rn{text-align:center;white-space:nowrap}
/* A standalone display numeral, not a column of figures: proportional digits with
   a touch of negative tracking sit tight, where tabular spacing splays them apart.
   The small downward nudge seats the numeral toward its «جلسه» label. */
.row-item .rn b{display:block;font-size:20px;font-weight:800;color:var(--c-deep);
  line-height:1;letter-spacing:-.05em;transform:translateY(4px)}
.row-item .rn span{font-size:10.5px;color:var(--ink-faint)}
.row-item .go{font-size:var(--fs-micro);color:var(--c-deep);font-weight:600}
/* ---------- ارقامِ شاخص — stat tiles ----------
   Figures used to sit bare on the paper and read as leftovers. Each one now
   holds a tile: a wash of its colour for the field, a solid bar of it on top,
   the numeral at full depth. Colour here is the spectrum of the archive, one
   collection colour per tile. */
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:9px;margin:26px 0 0}
/* One neutral surface for all four. These are totals about the archive — sessions,
   collections, years, references — not subjects, so colour-coding them said something
   untrue: four different hues implied four different topics. Plain paper, navy figures,
   and the colour system is left to mean what it means everywhere else. */
.stat{padding:13px 16px 12px;border-radius:11px;
  background:var(--paper-mid);border:1px solid var(--line)}
.stat b{display:block;font-size:24px;font-weight:800;color:var(--lajvard-deep);
  line-height:1;letter-spacing:0.02em}
.stat span{display:block;font-size:11.5px;color:var(--ink-soft);margin-top:6px}
/* the per-tile classes stay in the markup and are deliberately inert */
.st-lajvard,.st-zangar,.st-nili,.st-fooladi,.st-boronz{--tc:initial;--tcd:initial}

/* each row carries its own collection colour */
.r-tafsir{--c:var(--lajvard);--c-deep:var(--lajvard-deep);--c-tint:var(--lajvard-tint);--c-wash:var(--lajvard-wash)}
.r-adyan{--c:var(--zangar);--c-deep:var(--zangar-deep);--c-tint:var(--zangar-tint);--c-wash:var(--zangar-wash)}
.r-ravan{--c:var(--nili);--c-deep:var(--nili-deep);--c-tint:var(--nili-tint);--c-wash:var(--nili-wash)}
.r-mawzuat{--c:var(--fooladi);--c-deep:var(--fooladi-deep);--c-tint:var(--fooladi-tint);--c-wash:var(--fooladi-wash)}
.r-sokhan{--c:var(--boronz);--c-deep:var(--boronz-deep);--c-tint:var(--boronz-tint);--c-wash:var(--boronz-wash)}
@media (max-width:34rem){
  .row-item{grid-template-columns:3px 3.2rem 1fr;gap:12px;padding:11px 14px}
  .row-item .go{display:none}
}

/* ---------- سیرِ زمانی in the rail --------------------------------------
   It was a collapsible box in the body first, with its own toggle chevron — a
   second collapse idiom on a site that already has one. Moving it into the rail
   means the hub navigates like every other page: the same باز/تیغه/بسته control
   in the reading bar, the same sticky column, the same spine of numbers when
   narrowed. One pattern, learned once. */
.tl-panel .tl-filter{padding:9px 13px;border-bottom:1px solid var(--line);
  background:var(--paper-mid)}
.tl-panel select{appearance:none;width:100%;font:600 12.5px/1 var(--ff);color:var(--ink);
  background:var(--paper-high);border:1px solid var(--line-strong);border-radius:8px;
  padding:8px 12px 8px 28px;cursor:pointer;
  background-image:linear-gradient(45deg,transparent 50%,var(--ink-faint) 50%),
                   linear-gradient(135deg,var(--ink-faint) 50%,transparent 50%);
  background-position:calc(11px) calc(50% - 1px), calc(16px) calc(50% - 1px);
  background-size:5px 5px,5px 5px;background-repeat:no-repeat}
.tl-panel select:hover{border-color:var(--c-tint)}
.tl-years{list-style:none;margin:0;padding:6px 0;max-height:22rem;overflow:auto;
  scrollbar-width:thin}
.tl-years a{display:block;padding:6px 15px;font-size:var(--fs-side);color:var(--ink-soft);
  font-variant-numeric:tabular-nums}
.tl-years a:hover{background:var(--paper-deep);color:var(--ink);text-decoration:none}
.tl-years a.now{background:var(--c-wash);color:var(--c-deep);font-weight:600;
  box-shadow:inset 2.5px 0 0 var(--c)}
.tl-empty{font-size:var(--fs-side);color:var(--ink-faint);text-align:center;padding:26px 0}
.h2-count.tl-count{font-variant-numeric:tabular-nums}

/* ---------- references index: the entry grid ----------------------------- */
/* layout is [data-view]'s job; these are the reference card's own details */
.refgrid{margin:0 0 var(--s5)}
.rc-n{font-size:var(--fs-side);font-weight:600;color:var(--ink);line-height:1.55}
.rc-m{font-size:var(--fs-micro);color:var(--ink-faint);font-variant-numeric:tabular-nums}
.refcard:hover .rc-n{color:var(--c-deep)}
.h2-count{margin-inline-start:auto;font-size:var(--fs-micro);font-weight:600;
  color:var(--c-deep);background:var(--c-wash);border:1px solid var(--c-tint);
  border-radius:999px;padding:2px 11px;transform:translateY(-3px)}
.matn h2 .h2-count + *{margin:0}
/* the apparatus list reuses .dtoc chrome but keeps its two-line rows */
.appx-in{list-style:none;margin:0;padding:6px 0}
.appx-in a{display:block;padding:7px 15px}
.appx-in a:hover{background:var(--paper-deep);text-decoration:none}
.appx-in .t{display:block;font-size:var(--fs-side);font-weight:600;color:var(--ink)}
.appx-in .m{display:block;font-size:var(--fs-micro);color:var(--ink-faint);
  margin-top:1px;line-height:1.65}


/* ---------- reference sub-groups: no more orphaned labels ----------------
   The archive nests category → sub-group → sub-sub-group («اشخاص» →
   «متفکرین اسلامی و ایرانی» → «حکمت، عرفان و تفسیر»). Rendered as bare headings
   they float between card grids with nothing binding them to what they label.
   Here each sub-group is a bounded band: a tinted strip with a rule that runs to
   the margin and a count chip, and its cards indent under it, so the label
   visibly owns the block beneath it. */
.subgroup{margin:0 0 var(--s4);border-inline-start:2px solid var(--c-tint);
  padding-inline-start:16px}
.subgroup + .subgroup{margin-top:var(--s5)}
.sg-head{display:flex;align-items:center;gap:11px;margin:0 0 11px}
.sg-head .t{font-size:15.5px;font-weight:700;color:var(--c-deep);white-space:nowrap}
.sg-head .rule{flex:1;height:1px;background:var(--line-strong);opacity:.55}
.sg-head .n{flex:none;font-size:var(--fs-micro);font-weight:600;color:var(--c-deep);
  background:var(--c-wash);border:1px solid var(--c-tint);border-radius:999px;padding:2px 10px}
/* third level: quieter, no border, just a small caps-ish label */
.subsub{margin:0 0 var(--s3)}
.subsub + .subsub{margin-top:var(--s4)}
.ss-head{display:flex;align-items:baseline;gap:9px;margin:0 0 8px}
.ss-head .t{font-size:13px;font-weight:600;color:var(--ink-faint);letter-spacing:.01em}
.ss-head .n{font-size:var(--fs-micro);color:var(--ink-faint);opacity:.8}
.ss-head .rule{flex:1;height:1px;background:var(--line);opacity:.7}

/* ---------- فهرست‌های سطری — quieter, more formal than the plate cards -----
   The gate/plate cards were large gradient blocks with the title reversed out of
   a dark field; at 19px on a saturated gradient the Persian title lost contrast
   and the page read as a marketing splash rather than an archive index. These
   rows carry the same information in a fraction of the height: ink on paper for
   the title, the collection colour as a spine and a small chip, the count set as
   a number rather than a display figure. */
.rows{display:flex;flex-direction:column;gap:8px}
/* The box itself wears the collection colour: a wash of it as the fill, a
   stronger cut of the same colour as the border. Flat paper boxes with a 3px
   spine read as lifeless; the wash keeps rows apart at a glance without ever
   competing with the ink. */
.row-item{display:grid;grid-template-columns:3px 4.5rem 1fr auto;gap:16px;align-items:center;
  padding:13px 18px 13px 15px;
  background:color-mix(in srgb, var(--c) 16%, var(--paper-high));
  border:1px solid color-mix(in srgb, var(--c) 24%, var(--paper-high));
  border-radius:12px;transition:background .14s,border-color .14s}
a.row-item:hover{background:color-mix(in srgb, var(--c) 15%, var(--paper-high));
  border-color:color-mix(in srgb, var(--c) 44%, var(--paper-high));text-decoration:none}
.row-item > .spine-i{display:block;width:3px;height:34px;border-radius:2px;background:var(--c)}
.row-item .rt{min-width:0}
.row-item .rt b{display:block;font-size:16px;font-weight:700;color:var(--ink);line-height:1.5}
.row-item .rt span{display:block;font-size:var(--fs-micro);color:var(--ink-faint);
  line-height:1.7;margin-top:1px}
.row-item .rn{text-align:center;white-space:nowrap}
/* A standalone display numeral, not a column of figures: proportional digits with
   a touch of negative tracking sit tight, where tabular spacing splays them apart.
   The small downward nudge seats the numeral toward its «جلسه» label. */
.row-item .rn b{display:block;font-size:20px;font-weight:800;color:var(--c-deep);
  line-height:1;letter-spacing:-.05em;transform:translateY(4px)}
.row-item .rn span{font-size:10.5px;color:var(--ink-faint)}
.row-item .go{font-size:var(--fs-micro);color:var(--c-deep);font-weight:600}
/* each row carries its own collection colour */
.r-tafsir{--c:var(--lajvard);--c-deep:var(--lajvard-deep);--c-tint:var(--lajvard-tint);--c-wash:var(--lajvard-wash)}
.r-adyan{--c:var(--zangar);--c-deep:var(--zangar-deep);--c-tint:var(--zangar-tint);--c-wash:var(--zangar-wash)}
.r-ravan{--c:var(--nili);--c-deep:var(--nili-deep);--c-tint:var(--nili-tint);--c-wash:var(--nili-wash)}
.r-mawzuat{--c:var(--fooladi);--c-deep:var(--fooladi-deep);--c-tint:var(--fooladi-tint);--c-wash:var(--fooladi-wash)}
.r-sokhan{--c:var(--boronz);--c-deep:var(--boronz-deep);--c-tint:var(--boronz-tint);--c-wash:var(--boronz-wash)}
@media (max-width:34rem){
  .row-item{grid-template-columns:3px 3.2rem 1fr;gap:12px;padding:11px 14px}
  .row-item .go{display:none}
}

/* ---------- سیرِ زمانی — the collapsible, filterable timeline -------------- */
.timeline-box{border:1px solid var(--line);border-radius:16px;background:var(--paper-high);
  box-shadow:var(--shadow);overflow:hidden;margin-top:var(--s4)}
.tl-bar{display:flex;align-items:center;gap:14px;padding:13px 18px;
  background:var(--paper-mid);border-bottom:1px solid var(--line);flex-wrap:wrap}
.tl-toggle{display:flex;align-items:center;gap:9px;background:none;border:0;padding:0;
  cursor:pointer;font:700 16px/1.5 var(--ff);color:var(--ink)}
.tl-toggle .chev{width:20px;height:20px;display:grid;place-items:center;color:var(--c-deep);
  transition:transform .2s ease}
.tl-toggle .chev svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2.2;
  stroke-linecap:round;stroke-linejoin:round}
.timeline-box[data-open="false"] .tl-toggle .chev{transform:rotate(-90deg)}
.tl-count{font-size:var(--fs-micro);font-weight:600;color:var(--ink-faint);
  font-variant-numeric:tabular-nums}
.tl-pick{margin-inline-start:auto;position:relative}
.tl-pick select{appearance:none;font:600 13px/1 var(--ff);color:var(--ink);
  background:var(--paper-high);border:1px solid var(--line-strong);border-radius:9px;
  padding:9px 34px 9px 14px;cursor:pointer;min-width:13rem}
.tl-pick select:hover{border-color:var(--c-tint)}
.tl-pick::after{content:"";position:absolute;inset-inline-start:13px;top:50%;
  width:7px;height:7px;border-inline-end:1.8px solid var(--ink-faint);
  border-block-end:1.8px solid var(--ink-faint);transform:translateY(-70%) rotate(45deg);
  pointer-events:none}
.tl-body{padding:20px 22px 22px;max-height:none;overflow:hidden}
.timeline-box[data-open="false"] .tl-body{display:none}
.tl-empty{font-size:var(--fs-side);color:var(--ink-faint);text-align:center;padding:26px 0}
@media (max-width:34rem){
  .tl-bar{gap:10px}
  .tl-pick{margin-inline-start:0;width:100%}
  .tl-pick select{width:100%}
}

/* ---------- نما: سطری یا موزاییکی ----------------------------------------
   One switch governs every index on the site. Rows are the default because a
   long index is read by scanning down a single column of names — the eye makes
   one pass, and each row has room for the metadata (session count, year, chapter
   count) that a tile has to drop. The mosaic stays available: for the reference
   index at 127 entries, and for the Bible's 66 books, seeing many names at once
   is genuinely faster once you know what you are looking for.

   Both views are the SAME markup. The container carries data-view and the items
   re-flow; nothing is duplicated, so the two can never drift apart. */

/* ── list view (default) ── */
[data-view="list"]{display:flex;flex-direction:column;gap:5px}
[data-view="list"] > *{display:grid;grid-template-columns:1fr auto;gap:14px;
  align-items:center;padding:9px 15px;
  background:color-mix(in srgb, var(--c) 16%, var(--paper-high));
  border:1px solid color-mix(in srgb, var(--c) 22%, var(--paper-high));
  border-radius:9px;min-height:0}
[data-view="list"] > *:hover{background:color-mix(in srgb, var(--c) 14%, var(--paper-high));
  border-color:color-mix(in srgb, var(--c) 42%, var(--paper-high))}
/* the name stays on one line and truncates rather than wrapping the row open */
[data-view="list"] .rc-n,[data-view="list"] .bk-n,[data-view="list"] .nz-nm{
  font-size:14.5px;font-weight:600;color:var(--ink);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
[data-view="list"] .rc-m,[data-view="list"] .bk-c,[data-view="list"] .nz-v{
  font-size:var(--fs-micro);color:var(--ink-faint);white-space:nowrap;
  font-variant-numeric:tabular-nums}
/* nazm rows keep their numeral in a third column */
[data-view="list"] .nz-s{grid-template-columns:auto 1fr auto}

/* ── mosaic view ── */
[data-view="grid"]{display:grid;gap:7px;
  grid-template-columns:repeat(auto-fill,minmax(var(--tile,186px),1fr))}
[data-view="grid"] > *{display:flex;flex-direction:column;gap:3px;padding:10px 13px;
  background:color-mix(in srgb, var(--c) 16%, var(--paper-high));
  border:1px solid color-mix(in srgb, var(--c) 22%, var(--paper-high));border-radius:10px}
[data-view="grid"] > *:hover{background:color-mix(in srgb, var(--c) 14%, var(--paper-high));
  border-color:color-mix(in srgb, var(--c) 42%, var(--paper-high))}
[data-view="grid"] .nz-s{display:grid;grid-template-columns:auto 1fr auto;
  gap:10px;align-items:center}

[data-view] > *{text-decoration:none;transition:background .14s,border-color .14s}
[data-view] > *:hover{text-decoration:none}

/* ── the switch itself ── */
.viewsw{display:inline-flex;gap:3px;padding:3px;background:var(--paper-high);
  border:1px solid var(--line);border-radius:9px}
.viewsw button{width:30px;height:26px;border-radius:6px;border:1px solid transparent;
  background:transparent;color:var(--ink-faint);display:grid;place-items:center;cursor:pointer;
  transition:background .14s,color .14s}
.viewsw button:hover{color:var(--ink)}
.viewsw button.on{background:var(--c-wash);color:var(--c-deep);border-color:var(--c-tint)}
.viewsw svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round}
@media (max-width:34rem){
  /* below this width the mosaic is a single column anyway, so the switch is noise */
  .viewsw{display:none}
  [data-view="grid"]{display:flex;flex-direction:column;gap:5px}
}

/* ── the chronology's filter, now a bar above it rather than a rail beside it ── */
.tl-bar2{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 var(--s3);
  padding:10px 15px;background:var(--paper-high);border:1px solid var(--line);
  border-radius:12px}
.tl-bar2 .lbl{font-size:var(--fs-micro);font-weight:700;color:var(--c-deep)}
.tl-bar2 .tl-pick{font:600 12.5px/1 var(--ff);color:var(--ink);background:var(--paper);
  border:1px solid var(--line-strong);border-radius:8px;padding:8px 12px;cursor:pointer}
.tl-bar2 .tl-count{margin-inline-start:auto;font-size:var(--fs-micro);color:var(--ink-faint)}

/* ============================================================================
   reader-fix 2026-07-28 — CSS generalisation for three markup families
   desk.js already targets .matn-body / .prose / .matn and writes data-rail on
   .matn-wrap OR the column's parent (.wrap). These rules close the CSS gap only.
   COLOUR and SHOW/HIDE only. font-size / line-height of ayah are LOCKED above.
   ========================================================================= */

/* --- 2-1 · تیغه: default hidden; mini shows it (both containers) --------
   Previously only `.matn-wrap[data-rail="mini"] .toc-spine` existed, and only
   inside surah/styles.css — the 101 `.prose` pages (container `.wrap`, no
   surah/styles) always painted the spine under the open list. */
.toc-spine{display:none;flex-direction:column;gap:3px;align-items:center;
  overflow:auto;padding:8px 0;scrollbar-width:none}
.toc-spine::-webkit-scrollbar{display:none}
.matn-wrap[data-rail="mini"] .toc-spine,
.wrap[data-rail="mini"] .toc-spine{display:flex}
/* mini hides the full list on .wrap the same way .matn-wrap already does */
.wrap[data-rail="mini"] .toc-panel > h2,
.wrap[data-rail="mini"] .toc-list{display:none}
.toc-spine a{position:relative;width:28px;height:25px;border-radius:7px;display:grid;
  place-items:center;font-size:.72rem;font-weight:600;color:var(--ink-faint);
  text-decoration:none;font-variant-numeric:tabular-nums}
.toc-spine a:hover{background:var(--paper-deep);color:var(--ink)}
.toc-spine a.now{background:var(--c,var(--navy,#15294e));color:var(--paper)}
.toc-spine a::after{content:attr(data-t);position:absolute;inset-inline-end:calc(100% + 8px);
  top:50%;transform:translateY(-50%) translateX(6px);white-space:nowrap;
  background:var(--ink);color:var(--paper);font-size:.74rem;font-weight:500;padding:5px 10px;
  border-radius:7px;opacity:0;pointer-events:none;transition:opacity .15s,transform .15s;
  max-width:16rem;overflow:hidden;text-overflow:ellipsis;z-index:30}
.toc-spine a:hover::after{opacity:1;transform:translateY(-50%) translateX(0)}

/* --- 2-2 · text columns take theme tokens, never a fixed white ----------
   .matn-body already looked fine because it sat on a tokenised page ground;
   .prose did not declare ink/paper of its own. Explicit tokens on all three
   families make the contract visible and keep dark/sepia coherent. */
.prose,
.matn-body,
.matn{
  color:var(--ink);
  background-color:var(--paper);
}
/* Inline page styles hardcode light chrome on .toc-panel / .toc-list a /
   details.refblock (white cards on a dark page). Colour-only override; no
   layout change. :root[data-theme] outranks the unthemed inline selectors. */
:root[data-theme="dark"] .toc-panel,
:root[data-theme="sepia"] .toc-panel{
  background:var(--paper-high)!important;
  border-color:var(--line)!important;
  color:var(--ink)!important;
}
:root[data-theme="dark"] .toc-panel h2,
:root[data-theme="sepia"] .toc-panel h2{color:var(--c-deep,var(--ink))!important}
:root[data-theme="dark"] .toc-list a,
:root[data-theme="sepia"] .toc-list a{
  background:var(--paper)!important;
  border-color:var(--line)!important;
  color:var(--ink-soft)!important;
}
:root[data-theme="dark"] .toc-list a:hover,
:root[data-theme="sepia"] .toc-list a:hover,
:root[data-theme="dark"] .toc-list a.now,
:root[data-theme="sepia"] .toc-list a.now{
  background:var(--paper-deep)!important;
  color:var(--ink)!important;
}
:root[data-theme="dark"] details.refblock,
:root[data-theme="sepia"] details.refblock{
  background:var(--paper-high)!important;
  border-color:var(--line)!important;
  color:var(--ink)!important;
}
:root[data-theme="dark"] details.refblock > summary,
:root[data-theme="sepia"] details.refblock > summary{color:var(--ink)!important}

/* --- 2-3 · ayah boxes: theme-aware COLOUR only ---------------------------
   Six classes had zero theme-aware rules. Inline pages pin fixed hex, and on
   almizan the inline gradient is often broken — cream text then sits on cream
   paper in sepia. Restore a navy/gold card and token ink for the quran-block
   family. font-size and line-height are deliberately NOT restated (locked by
   the :root .ay-ar / .ay-fa pins and the page's own 22px/16px rules). */
:root .ayah-box{
  background:
    radial-gradient(120% 80% at 50% -10%, color-mix(in srgb, var(--zar,#B08434) 16%, transparent), transparent 60%),
    var(--navy, var(--c-deep, #15294e)) !important;
  color:var(--paper, #fbf6ec) !important;
}
:root .ay-ar{color:#fdf7ea !important}   /* cream on navy — intentional; size untouched */
:root .ay-fa{color:#dee2ed !important}

:root .quran-block,
:root .matn-body .quran-block,
:root .prose .quran-block{
  background:var(--zar-wash) !important;
  border-color:var(--zar-line) !important;
  color:var(--ink);
}
:root .quran-ar,
:root .matn-body .quran-ar,
:root .prose .quran-ar,
:root .ayah-ar{color:var(--ink) !important}
:root .quran-fa,
:root .matn-body .quran-fa,
:root .prose .quran-fa,
:root .ayah-fa{color:var(--ink-soft) !important}
:root .quran-label,
:root .matn-body .quran-label,
:root .prose .quran-label{color:var(--zar-deep, var(--zar, #6B4E18)) !important}
:root .quran-meta,
:root .matn-body .quran-meta,
:root .prose .quran-meta{
  color:var(--ink-soft) !important;
  border-top-color:var(--zar-line) !important;
}
:root .ayah{
  background:var(--zar-wash);
  border-color:var(--zar-line);
}

/* === mvp2-compat.css === */
/* MVP2 live compatibility layer. The approved Shangarf sheet remains canonical;
   this file maps the existing production DOM onto that design without touching
   transcript, Quran, audio, or reference content.

   2026-07-25 phase-1 consolidation: matn layout (grid / max-width / h1 size /
   timeline paint) emptied here — sole owner is shangarf.css (+ shangarf-site.css
   for the timeline / gahshomar). Remaining rules are chrome + non-layout theming. */
html{scroll-behavior:smooth}
body.mvp2-live{background:var(--paper)!important;color:var(--ink)!important;
  font-family:var(--ff)!important}
body.mvp2-live a{transition:color .15s ease,background-color .15s ease,border-color .15s ease}

body.mvp2-live .s-head,
body.mvp2-live .hero{
  margin:0!important;padding:30px max(20px,calc((100vw - 1120px)/2)) 26px!important;
  background:linear-gradient(160deg,var(--c-deep) 0%,color-mix(in srgb,var(--c-deep) 80%,#111827) 100%)!important;
  color:#fffaf0!important;border:0!important;border-bottom:4px solid var(--c)!important;
  box-shadow:none!important;min-height:0!important}
/* h1 SIZE owned by shangarf.css (--fs-h1 / clamp); only colour/meta stay here */
body.mvp2-live .s-head h1,body.mvp2-live .hero h1{color:#fffaf0!important;
  line-height:1.35!important;margin:8px 0!important}
body.mvp2-live .s-head .back,body.mvp2-live .hero .back,
body.mvp2-live .s-head .s-meta,body.mvp2-live .hero p{color:rgba(255,250,240,.78)!important}
body.mvp2-live .s-head .mark{display:none!important}

/* ── matn layout emptied (phase 1) ─────────────────────────────────────────
   Former grid (toc + body), max-width:var(--measure), and mobile block switch
   lived here with !important and forced shangarf to fight with `html` prefixes.
   Layout is now sole-owned by shangarf.css (single-column, --read-max).
   Decorative / typographic rules for the transcript body remain below. */
body.mvp2-live .matn-wrap .matn-lead{
  padding:15px 18px!important;border-inline-start:3px solid var(--c-tint)!important;
  background:var(--paper-mid)!important;color:var(--ink-soft)!important}
body.mvp2-live .matn-wrap .toc-panel>h2{margin:0!important;padding:11px 15px!important;
  background:var(--c-wash)!important;color:var(--c-deep)!important;border-bottom:1px solid var(--line)!important}
body.mvp2-live .matn-wrap .toc-list{margin:0!important;padding:6px 0!important;list-style:none!important}
body.mvp2-live .matn-wrap .toc-list a{display:block;padding:7px 15px;color:var(--ink-soft)!important}
body.mvp2-live .matn-wrap .toc-list a:hover{background:var(--paper-deep)!important;color:var(--c-deep)!important}
body.mvp2-live .matn-wrap .refblock{
  border:1px solid var(--line)!important;border-radius:12px!important;background:var(--paper-high)!important}
body.mvp2-live .matn-wrap .refblock summary{padding:11px 15px!important;color:var(--c-deep)!important;
  background:var(--c-wash)!important;cursor:pointer!important}
body.mvp2-live .matn-body>p{text-align:justify;hyphens:auto}
body.mvp2-live .matn-body h2{color:var(--c-deep)!important;
  font-size:var(--fs-h2)!important;margin-top:2.4em!important;
  /* BS 2026-07-30: was 60 px — short of chrome (~39) + readbar (~52). Token from reading-desk.css. */
  scroll-margin-top:var(--read-scroll-pad,96px)}
body.mvp2-live .quran-block{background:var(--zar-wash)!important;border:1px solid var(--zar-line)!important;
  border-radius:4px!important;box-shadow:inset 0 0 0 4px var(--paper)!important}

body.mvp2-live .tabs{width:min(1120px,calc(100% - 34px));margin:28px auto 0!important;
  display:flex!important;gap:6px!important;padding:0 6px!important;border:0!important}
body.mvp2-live .tabs .tab{border:1px solid var(--line)!important;border-bottom:0!important;
  border-radius:10px 10px 0 0!important;background:var(--paper-deep)!important;color:var(--ink-faint)!important}
body.mvp2-live .tabs .tab.active{background:var(--paper-high)!important;color:var(--c-deep)!important;
  box-shadow:inset 0 3px 0 var(--c)!important}
body.mvp2-live .panes{width:min(1120px,calc(100% - 34px));margin:0 auto 60px!important;
  background:var(--paper-high)!important;border:1px solid var(--line)!important;
  border-radius:0 14px 14px 14px!important;box-shadow:var(--shadow)!important}
body.mvp2-live .pane{padding:22px!important}
body.mvp2-live .ses-row,body.mvp2-live .plist li{border-color:var(--line)!important}
body.mvp2-live .ses-row:hover,body.mvp2-live .plist li:hover{background:var(--c-wash)!important}

body.mvp2-live .wrap,body.mvp2-live .coll-wrap{width:min(1120px,calc(100% - 34px))!important;
  max-width:none!important;margin:28px auto 60px!important;padding:0!important}
body.mvp2-live .bento{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}
body.mvp2-live .card-feat{border:1px solid var(--line)!important;border-radius:14px!important;
  background:var(--paper-high)!important;box-shadow:var(--shadow)!important;color:var(--ink)!important}
body.mvp2-live .card-feat:hover{background:var(--c-wash)!important;border-color:var(--c-tint)!important}
/* timeline paint emptied — sole owner: shangarf-site.css (.gahshomar / .g-item).
   Keep only the section wrapper spacing so the block still sits under the bento. */
body.mvp2-live .tl-wrap{margin-top:34px!important;padding-top:18px!important;border-top:1px solid var(--line)!important}

body.mvp2-live .coll-hero{padding:28px max(20px,calc((100vw - 1120px)/2))!important;
  background:var(--c-deep)!important;color:#fffaf0!important;border-bottom:4px solid var(--c)!important}
body.mvp2-live .coll-hero h1,body.mvp2-live .coll-hero a{color:#fffaf0!important}

@media(max-width:850px){
  body.mvp2-live .bento{grid-template-columns:1fr!important}
  body.mvp2-live .tabs,body.mvp2-live .panes{width:calc(100% - 24px)!important}
}

@media print{
  .progress,.toc-panel,.refblock,.tabs,.back{display:none!important}
}

/* === final-light-center.css === */
/* Final MVP2 presentation override.
   It changes only page-level chrome: light browser controls and centred page headers.
   Session body headings, Quran blocks, reference prose, and navigation content remain untouched. */
:root{color-scheme:light}
:root[data-theme="dark"]{color-scheme:dark}

/* Every document has one page-title h1; centre it without touching in-text h2/h3. */
h1{text-align:center!important;margin-inline:auto!important}

.sarlouh-in,
body.mvp2-live .s-head,
body.mvp2-live .hero,
body.mvp2-live .hero__inner,
body.mvp2-live .coll-hero,
.page-head{text-align:center!important}

.sarlouh .kicker{margin-inline:auto!important}
.sarlouh .meta,
body.mvp2-live .s-head .s-meta{justify-content:center!important;margin-inline:auto!important}
body.mvp2-live .s-head .back,
body.mvp2-live .hero .back{display:block!important;width:max-content;max-width:100%;margin-inline:auto!important}

/* The two reference trees keep their existing theme; only their page titles are centred. */
header.intro .kicker,
.headtxt>h1,
.wrap>h1,
.page>h1{text-align:center!important}

/* Persian-first UI typography. Generated reader-facing counters use Persian
   codepoints; this layer supplies their Estedad treatment without changing any
   protected Quran/transcript/reference payload. Explicit Arabic/Quran and Latin
   runs keep their own fonts. */
@font-face{font-family:'Estedad';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/Estedad-Regular.woff2') format('woff2')}
@font-face{font-family:'Estedad';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/Estedad-Medium.woff2') format('woff2')}
@font-face{font-family:'Estedad';font-style:normal;font-weight:600;font-display:swap;src:url('/assets/fonts/Estedad-SemiBold.woff2') format('woff2')}
@font-face{font-family:'Estedad';font-style:normal;font-weight:700 900;font-display:swap;src:url('/assets/fonts/Estedad-Bold.woff2') format('woff2')}
html[lang="fa"] body,
html[lang="fa"] button,
html[lang="fa"] input,
html[lang="fa"] select,
html[lang="fa"] textarea{font-family:'Estedad','Inter',system-ui,sans-serif!important;font-feature-settings:'ss01' 1}
html[lang="fa"] :is(.latin,.ltr,[lang="en"],code,pre,kbd,samp){font-family:'Inter','Estedad',system-ui,sans-serif!important;font-feature-settings:normal}
html[lang="fa"] :is(.ayah-ar,[lang="ar"]){font-feature-settings:normal}

/* ── W2 mobile-UX a11y (2026-07-23) — appended, mobile-scoped ───────────────
   Fixes harvested touch/iOS/affordance defects without disturbing desktop density. */
*{-webkit-tap-highlight-color:rgba(74,104,159,.18)}
:focus-visible{outline:2px solid var(--c,#4A689F);outline-offset:2px;border-radius:4px}
@media(max-width:640px){
  input[type="search"],input[type="text"],.toolbar input,.bar input,
  [data-filter],[data-search]{font-size:16px!important}      /* no iOS zoom-on-focus */
  input[type="range"]{touch-action:none!important}           /* seek doesn't scroll page */
  input[type="range"].aud-seek{min-height:22px}
  .aud-dl,.aud-share{min-height:40px;display:inline-flex;align-items:center}
  .dtoc a,.tocx a,.toc-spine a,.spine a{min-height:34px;display:flex;align-items:center}
  .rbtn2{min-height:38px}
}

/* === shangarf-site.css === */
/* ============================================================================
   شنگرفِ سراسری — Shangarf Site Rollout
   dars-goftarha.ir · Claude Design lane (Fable) · 2026-07-23

   The homepage, the series pages and the transcripts already speak Shangarf.
   This layer finishes the sentence: every component that still leaned on the
   mustard-era styles.css, on section-index.css, or on a page's private inline
   palette is re-expressed here IN TOKENS ONLY — no raw hex except where a
   token is being defined. Loading order on a converted page:

       [legacy layout css, if the page needs its machinery]
       shangarf.css → reading-desk.css → mvp2-compat.css →
       final-light-center.css → THIS FILE (the skin always wins)

   Because everything below keys off shangarf custom properties, dark reading
   (data-theme="dark") works on every converted page for free.

   Collection identities are canon and end the old drift:
     تفسیر قرآن   lajvard   ·  ادیان   zangar  ·  روانکاوی  nili (teal — the
     rust #743320 era is over) · موضوعاتِ قرآنی fooladi · سخنرانی‌ها boronz.
   Gold stays scripture-only.
   ========================================================================= */

/* ---------- legacy-var bridge -------------------------------------------
   Pages that keep their old machinery (section indexes, old refs) still read
   --muted/--rule/--gold/--section… Those names are re-pointed at the tokens,
   so the machinery keeps working while every colour it paints is Shangarf. */
:root{
  --muted:var(--ink-soft);
  --faint:var(--ink-faint);
  --rule:var(--line);
  --rule-soft:var(--line-cool);
  --gold:var(--zar);
  --gold-bright:var(--zar-line);
  --paper-2:var(--paper-mid);
  --surface:var(--paper-high);
  --surface-2:var(--paper-mid);
}
.catalog{--section:var(--c-deep);--accent:var(--c-deep)}

/* the old mustard body themes must never tint a converted page again */
body.t-mustard{--navy:var(--c-deep);--navy-2:var(--c);--navy-deep:var(--c-deep)}

/* ---------- جستجو · the archive search field ----------------------------- */
.search{position:relative;margin:0 0 var(--s4)}
.search input{width:100%;box-sizing:border-box;font:500 15px/1.4 var(--ff);
  color:var(--ink);background:var(--paper-high);border:1px solid var(--line);
  border-radius:12px;padding:12px 44px 12px 16px;box-shadow:var(--shadow);
  transition:border-color .14s}
.search input::placeholder{color:var(--ink-faint)}
.search input:hover{border-color:var(--line-strong)}
.search input:focus{outline:none;border-color:var(--c-tint);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--c) 14%,transparent)}
.search svg{position:absolute;inset-inline-end:15px;top:50%;width:17px;height:17px;
  transform:translateY(-50%);stroke:var(--ink-faint);pointer-events:none}
.empty{display:none;font-size:var(--fs-side);color:var(--ink-faint);
  text-align:center;padding:22px 0;margin:0}
.empty.show{display:block}

/* ---------- ادامهٔ پخش · resume strip ------------------------------------
   A deep-collection plate on the paper: the one dark object on an index page,
   so the eye lands on «where you left off» first. Fixed cream type — the
   plate stays deep in both themes. */
.resume{margin:0 0 var(--s4)}
.resume-h{display:flex;align-items:center;gap:8px;font-size:var(--fs-micro);
  font-weight:700;color:var(--c-deep);margin:0 0 8px}
.resume-ic{display:inline-grid;place-items:center;width:20px;height:20px;
  border-radius:6px;background:var(--c);color:#FBF6EC;font-size:9px}
.resume-row{display:grid;gap:8px}
/* quiet second action under the resume card: the card continues the audio, this
   opens the lecture's own page. Deliberately unemphatic — one loud call to action
   per block, and the loud one is Play. */
.resume-page{display:inline-flex;align-items:center;gap:5px;justify-self:start;
  margin-top:-2px;padding:3px 2px;color:var(--ink-soft,#6b675e);
  font-size:var(--fs-micro);line-height:1.7;text-decoration:none;
  border-bottom:1px solid transparent}
.resume-page svg{opacity:.62;flex:none}
.resume-page:hover{color:var(--ink,#232320);text-decoration:none;
  border-bottom-color:currentColor}
.resume-card{display:block;background:linear-gradient(150deg,var(--c) 0%,var(--c-deep) 92%);
  color:#FBF6EC;border-radius:var(--radius-lg);padding:13px 17px;
  box-shadow:var(--shadow);text-decoration:none}
.resume-card:hover{text-decoration:none;filter:brightness(1.06)}
.resume-meta{float:left;font:600 11.5px/1.8 var(--ff-latin);opacity:.75}
.resume-tx{display:block;min-width:0}
.resume-sec{display:block;font-size:var(--fs-micro);opacity:.72;line-height:1.7}
.resume-title{display:block;font-size:15px;font-weight:700;line-height:1.6;
  margin:1px 0 9px}
.resume-bar{display:block;height:4px;border-radius:999px;
  background:rgba(251,246,236,.22);overflow:hidden}
.resume-bar > span{display:block;height:100%;border-radius:999px;
  background:var(--zar-line)}

/* ---------- سیرِ زمانی · chips + frame around the gahshomar --------------
   The timeline rows themselves are shangarf's .g-year/.g-item; each entry
   carries its collection class (gi-*) instead of a hard-coded --tc. */
.tl-wrap{margin:var(--s6) 0 0}
.tl-h{font-size:var(--fs-h2);font-weight:700;color:var(--c-deep);margin:0 0 4px;
  display:flex;gap:12px;align-items:baseline}
.tl-h::after{content:"";flex:1;height:1px;background:var(--line-strong);
  opacity:.6;transform:translateY(-6px)}
.tl-sub{font-size:var(--fs-meta);color:var(--ink-faint);margin:0 0 var(--s3)}
.tl-bar{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:0 0 var(--s4);
  padding:10px 13px;background:var(--paper-high);border:1px solid var(--line);
  border-radius:12px;box-shadow:var(--shadow)}
.tl-chip{display:inline-flex;align-items:center;gap:7px;
  font:600 12.5px/1 var(--ff);color:var(--ink-soft);cursor:pointer;
  background:var(--paper-mid);border:1px solid var(--line);border-radius:999px;
  padding:7px 13px;transition:background .14s,border-color .14s,color .14s;
  --cc:var(--n-500);--cc-deep:var(--n-300)}
.tl-chip::before{content:"";width:8px;height:8px;border-radius:2.5px;
  background:var(--cc);flex:none}
.tl-chip:hover{border-color:var(--cc);color:var(--ink)}
.tl-chip.on{background:var(--cc-deep);border-color:var(--cc-deep);color:#FBF6EC}
.tl-chip.on::before{background:#FBF6EC}
.ch-tafsir {--cc:var(--lajvard);--cc-deep:var(--lajvard-deep)}
.ch-adyan  {--cc:var(--zangar); --cc-deep:var(--zangar-deep)}
.ch-ravan  {--cc:var(--nili);   --cc-deep:var(--nili-deep)}
.ch-mawzuat{--cc:var(--fooladi);--cc-deep:var(--fooladi-deep)}
.ch-sokhan {--cc:var(--boronz); --cc-deep:var(--boronz-deep)}
.tl-count{margin-inline-start:auto;font-size:var(--fs-micro);color:var(--ink-faint);
  font-variant-numeric:tabular-nums}
.tl-noref{opacity:.62}
.tl-noref .t{font-weight:500}
.tl-src{font-size:var(--fs-micro);color:var(--ink-faint);margin-top:var(--s3)}
.tl-src a{color:var(--c-deep)}
.tl-year.gone,.tl-item.gone{display:none}
/* an entry that belongs to no collection keeps the quiet neutral spine */
.gi-none{--gc:var(--n-600)}
/* narrow screens: the venue string wraps under the title instead of pushing
   the row past the viewport (the nowrap column was the old page's overflow) */
@media (max-width:36rem){
  .g-item{grid-template-columns:4px 1fr}
  .g-item i{grid-row:1 / span 2;height:100%;min-height:22px}
  .g-item .m{grid-column:2;white-space:normal;line-height:1.65;margin-top:1px}
}

/* ---------- فهرستِ بخش · the catalog skin --------------------------------
   section-index.css keeps doing the LAYOUT (grids, sticky header, sort,
   master–detail). Everything it painted is repainted here: navy-slate ink on
   shangarf paper, the collection colour as wayfinding, Estedad everywhere —
   the Vazirmatn experiment ends here. */
.page-head,.catalog,.margin-detail,.rows-head,.toolbar,
.catalog :is(.entry,.identity,.datum),
.catalog button,.catalog input,.catalog select{font-family:var(--ff)!important}

.page-head{border-bottom:0;padding-block:0 6px}
.page-head .eyebrow{color:var(--c-deep);font-weight:600;letter-spacing:.02em}
.page-head .lead{color:var(--ink-soft);margin-inline:auto}

.catalog{border-top:0}
.catalog-head{border-bottom:1px solid var(--line)}
.catalog-head h2{color:var(--c-deep);font-size:19px;font-weight:700}
.catalog-head p{color:var(--ink-faint)}
.count{color:var(--c-deep);border-bottom:0;background:var(--c-wash);
  border:1px solid var(--c-tint);border-radius:999px;padding:3px 13px;
  font-size:var(--fs-meta);font-weight:600}

.toolbar{border-bottom:0;padding-block:13px}
.toolbar label{color:var(--ink-faint);font-weight:600}
.toolbar input,.toolbar select{background:var(--paper-high);color:var(--ink);
  border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow)}
.toolbar input:focus,.toolbar select:focus{outline:none;border-color:var(--c-tint);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--c) 14%,transparent)}
.direction{border-radius:10px}

.rows-head{background:var(--c-wash);color:var(--c-deep);
  border-bottom:1px solid var(--c-tint);border-radius:10px 10px 0 0}
.rows-head .col-h:hover{background:color-mix(in srgb,var(--paper-high) 55%,transparent)}
.rows-head .col-h.on{color:var(--c-deep)}
.rows-head .col-seq,.rows-head .col-go{color:color-mix(in srgb,var(--c-deep) 62%,transparent)}

.entry{border-bottom:1px solid var(--line)}
.entry:nth-child(even){background:color-mix(in srgb,var(--c) 4%,transparent)}
.entry:hover{background:color-mix(in srgb,var(--c) 9%,transparent)}
.entry.is-active{border-inline-start:3px solid var(--c);
  background:color-mix(in srgb,var(--c) 11%,transparent)}
.seq{color:var(--ink-faint)}
.identity a{color:var(--ink)}
.identity a:hover,.identity a:focus-visible{color:var(--c-deep);
  text-decoration-color:var(--c-tint)}
.identity small{color:var(--ink-faint)}
.datum strong{color:var(--ink)}
.datum small{color:var(--ink-faint)}
.datum.sessions .wbar{background:color-mix(in srgb,var(--c) 20%,transparent)}
.datum.sessions .wbar::before{background:var(--c)}
.inspect{color:var(--c-deep);border-bottom-color:var(--c-tint)}
.inspect:hover,.inspect:focus-visible{border-color:var(--c-deep)}

.margin-detail{background:var(--paper-high);border:1px solid var(--line);
  border-top:3px solid var(--c);border-radius:var(--radius-lg);
  box-shadow:var(--shadow)}
.detail-kicker{color:var(--c);font-weight:600}
.margin-detail h3{color:var(--c-deep)}
.detail-open{color:var(--c-deep);text-decoration-color:var(--c-tint)}
.facts,.facts div{border-color:var(--line)}
.facts dt{color:var(--ink-faint)}
.facts dd{color:var(--ink)}
.detail-note{color:var(--ink-faint)}
.why{background:var(--paper-mid);border-inline-start:4px solid var(--zar-line);
  border-radius:0 10px 10px 0}
.why p{color:var(--ink-soft)}
.coverage{color:var(--ink-faint);border-bottom:1px solid var(--line)}
.coverage strong{color:var(--c-deep)}
#gal-back{font-family:var(--ff);background:var(--c-deep);color:#FBF6EC;
  border-color:transparent}
#gal-back:hover{background:var(--c)}

/* ---------- ارجاعاتِ v3 · references uplift ------------------------------
   The /references tree gave Shangarf its palette; what it never got back was
   the chrome. Converted pages carry body.refs3: the reading ground lifts from
   the recessed paper-deep to the site's paper, cards stand on paper-high, and
   the private var names of that tree are re-pointed at tokens — which is all
   dark reading needs. */
body.refs3{background:var(--paper);
  /* the page's private :root shadows the tokens, so every one of its var
     names is re-pointed here at body level — which outranks that :root,
     while the dark theme's :root[data-theme] outranks this in turn. */
  --paper:#FBF6EC;              /* dark: token wins over this literal */
  --paper-2:var(--paper-mid);
  --surface:var(--paper-high);--surface-2:var(--paper-mid);
  --ink-2:var(--ink-soft);--muted:var(--ink-soft);--faint:var(--ink-faint);
  --line-2:var(--line-cool);--rule:var(--line);--rule-soft:var(--line-cool);
  --accent:var(--c-deep);--accent-2:var(--c);
  --accent-soft:color-mix(in srgb,var(--c) 12%,var(--paper-high));
  --gold:var(--zar);--gold-bright:var(--zar-line);
  --gold-soft:var(--g-500);--gold-ghost:color-mix(in srgb,var(--zar) 14%,transparent);
  --bar:var(--g-500);
  --shadow-sm:0 1px 2px rgba(38,33,25,.05)}
:root[data-theme="dark"] body.refs3{--paper:#131722}
body.refs3 .wrap{padding-top:26px}
body.refs3 .crumb{display:none}     /* the sarlouh's crumbs replace it */
body.refs3 :is(.wrap > h1,.headtxt > h1){display:none} /* sarlouh owns the title */
body.refs3 .wrap > h1 + .gloss{margin-top:0}

/* ---------- کارت‌های منابع (resources / ai) ------------------------------- */
.res-grid{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(250px,1fr))}
.res-card{background:var(--paper-high);border:1px solid var(--line);
  border-radius:var(--radius-lg);box-shadow:var(--shadow);padding:20px 22px;
  transition:border-color .14s,transform .16s ease}
.res-card:hover{border-color:var(--c-tint);transform:translateY(-2px);
  text-decoration:none}
.res-card h2{font-size:17px;font-weight:700;color:var(--c-deep);line-height:1.6}
.res-card p{font-size:var(--fs-meta);color:var(--ink-soft);margin:6px 0 0;
  line-height:1.8}
.res-card .m{font-size:var(--fs-micro);color:var(--ink-faint)}

/* ---------- شب‌خوانی · system repairs -------------------------------------
   Three defects the homepage ships today, fixed at the layer every converted
   page loads:
   1) the dark theme paints سرلوح text near-black onto a still-navy band;
   2) stat and row numerals keep their light-theme deep navy and sink into the
      dark ground;
   3) Chrome freezes a color-mix(var()) background mid-transition when only
      the theme token changes (the same engine quirk reading-desk documents
      for grid tracks), so rows kept their light wash after switching to dark.
      Colour now jumps; motion stays on transform. */
:root[data-theme="dark"] .sarlouh{color:#E9E6DE}
:root[data-theme="dark"] .sarlouh .kicker{background:rgba(251,246,236,.10);
  border-color:rgba(251,246,236,.22)}
:root[data-theme="dark"] .stat b{color:var(--n-200)}
:root[data-theme="dark"] :is(.row-item .rn b,.row-item .go){color:var(--c-tint)}
.row-item,[data-view] > *,.g-item,.tl-chip,.stat{transition:transform .16s ease}
/* Chromium serves color-mix(var()) fills from the matched-properties cache, so an
   element styled in the light theme keeps its light wash after the switch (a fresh
   element resolves correctly). Dark-scoped twins change the matched set, which
   forces a real re-resolution — and the wash deepens a step so it reads on the
   dark ground. */
:root[data-theme="dark"] :is(.row-item,[data-view="list"] > *,[data-view="grid"] > *){
  background:color-mix(in srgb,var(--c) 22%,var(--paper-high));
  border-color:color-mix(in srgb,var(--c) 32%,var(--paper-high))}
:root[data-theme="dark"] :is(a.row-item:hover,[data-view="list"] > *:hover,
  [data-view="grid"] > *:hover){
  background:color-mix(in srgb,var(--c) 28%,var(--paper-high));
  border-color:color-mix(in srgb,var(--c) 48%,var(--paper-high))}
:root[data-theme="dark"] .g-item{
  background:color-mix(in srgb,var(--gc,var(--c)) 20%,var(--paper-high));
  border-color:color-mix(in srgb,var(--gc,var(--c)) 30%,var(--paper-high))}
:root[data-theme="dark"] a.g-item:hover{
  background:color-mix(in srgb,var(--gc,var(--c)) 26%,var(--paper-high));
  border-color:color-mix(in srgb,var(--gc,var(--c)) 46%,var(--paper-high))}
:root[data-theme="dark"] .g-item .t{color:var(--ink)}
:root[data-theme="dark"] .rows-head{
  background:color-mix(in srgb,var(--c) 26%,var(--paper-high));
  color:var(--c-tint);border-bottom-color:color-mix(in srgb,var(--c) 40%,var(--paper-high))}

/* ════════════════════════════════════════════════════════════════════════
   فهرستِ مجموعه‌ها — REDESIGN (v2)
   The reskin kept section-index.css's spreadsheet: a bordered data table with
   a sortable header strip and a master–detail margin pane. Against the cream
   homepage that read as a database export, not an archive. This rebuilds the
   SAME markup and the SAME engine as the homepage's row idiom — one clean row
   per entry: quiet index numeral · name + meta · session-count figure · arrow.
   The sort <select> (the engine still wires it) comes back, since the sortable
   header strip is gone; the detail pane — pure duplication of the row's meta —
   is retired. Nothing in the data or the engine is touched.
   ════════════════════════════════════════════════════════════════════════ */
/* narrower measure, like the home list, centred (owner: عرضِ فهرست‌ها کمتر) */
.page-head,main:has(.catalog){max-width:46rem}
/* each index wears its OWN collection colour: the body's c-* class already
   drives --c (c-adyan→zangar, c-ravan→nili…), so nothing is forced here.
   (Owner: همه موضوعات همرنگِ موضوعشون — the old forced-lajvard override is gone.) */
/* toolbar → one calm bar: search grows, sort + direction return */
.catalog .toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:end;
  border-bottom:0;padding:0 0 var(--s4)}
.catalog .toolbar label{display:grid;gap:5px;font-size:var(--fs-micro);
  font-weight:600;color:var(--ink-faint)}
.catalog .toolbar label:first-child{flex:1 1 220px}
.catalog .toolbar label:has([data-sort]){display:grid;flex:0 0 auto}
.catalog .toolbar .direction{display:inline-flex;align-items:center;flex:0 0 auto;
  align-self:end;height:42px;padding:0 16px;border:1px solid var(--c-tint);
  color:var(--c-deep);background:var(--paper-high);border-radius:11px;font-weight:700}
.catalog .toolbar .direction:hover{background:var(--c-wash)}
.catalog .toolbar input,.catalog .toolbar select{height:42px;border-radius:11px;
  border:1px solid var(--line);background:var(--paper-high);color:var(--ink)}

/* the list: single column of clean rows */
.catalog .split{display:block}
.catalog .rows-head{display:none!important}
.catalog .margin-detail{display:none!important}
.catalog .rows{display:flex;flex-direction:column;gap:6px}
.catalog .coverage{border:0;padding:0 0 var(--s3)}

.catalog .rows .entry{
  display:grid;grid-template-columns:minmax(0,1fr) auto 1.1rem;
  align-items:center;gap:15px;min-height:0;padding:12px 16px;
  border:1px solid color-mix(in srgb,var(--c) 24%,var(--paper-high));
  border-bottom:1px solid color-mix(in srgb,var(--c) 24%,var(--paper-high));
  border-radius:12px;
  background:color-mix(in srgb,var(--c) 16%,var(--paper-high));
  transition:background .14s,border-color .14s,transform .16s ease}
.catalog .rows .entry:nth-child(even){background:color-mix(in srgb,var(--c) 16%,var(--paper-high))}
.catalog .rows .entry:hover{transform:translateY(-1px);
  background:color-mix(in srgb,var(--c) 15%,var(--paper-high));
  border-color:color-mix(in srgb,var(--c) 44%,var(--paper-high))}
.catalog .rows .entry.is-active{padding-inline-start:16px;
  border-color:color-mix(in srgb,var(--c) 42%,var(--paper-high));
  box-shadow:inset 3px 0 0 var(--c)}

/* the sequence badge is a row-ordinal — it reorders on sort and reads as a
   surah/mushaf number it is not, so it is dropped. */
.catalog .seq{display:none!important}

.catalog .identity{min-width:0}
/* whole-row click: stretch the name's real link over the entire entry, so a
   click anywhere on the box opens it — not only on the سوره/موضوع name.
   (The detail button is hidden, so nothing competes for the surface.) */
.catalog .rows .entry{position:relative;cursor:pointer}
.catalog .identity a::after{content:"";position:absolute;inset:0;z-index:1}
.catalog .identity a{font-size:17px;font-weight:700;color:var(--ink);
  text-decoration:none;letter-spacing:-.005em}
.catalog .rows .entry:hover .identity a{color:var(--c-deep)}
.catalog .identity small{display:block;font-size:var(--fs-micro);color:var(--ink-faint);
  white-space:normal;line-height:1.6;margin-top:3px;text-overflow:clip}

/* the session count as the visual anchor — the homepage .rn figure */
.catalog .datum.sessions{display:flex;flex-direction:column;align-items:center;
  gap:0;line-height:1;text-align:center}
.catalog .datum.sessions strong{font-size:20px;font-weight:800;color:var(--c-deep);
  letter-spacing:0.02em;font-variant-numeric:proportional-nums}
.catalog .datum.sessions strong::after{content:" جلسه";display:block;margin-top:4px;
  font-size:10px;font-weight:500;color:var(--ink-faint);letter-spacing:0}
.catalog .datum.sessions .wbar{display:none}
/* every other data column + the detail trigger fold into the meta line */
.catalog .datum.year,.catalog .datum.ayahs,.catalog .topic-group,
.catalog .inspect{display:none!important}

.catalog .rows .entry::after{content:"←";justify-self:end;color:var(--c-deep);
  font-size:13px;opacity:.5;transition:opacity .14s}
.catalog .rows .entry:hover::after{opacity:1}
/* dark: the deep figure/arrow sit navy-on-navy — lift to the collection tint */
:root[data-theme="dark"] .catalog .datum.sessions strong,
:root[data-theme="dark"] .catalog .rows .entry::after{color:var(--c-tint)}

@media (max-width:34rem){
  .catalog .rows .entry{grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:11px 13px}
  .catalog .rows .entry::after{display:none}
}

/* ════════════════════════════════════════════════════════════════════════
   خطِ زمانیِ جلسات — REDESIGN (v2)
   The reskin recoloured the old gahshomar but kept its shape: a gold rule down
   the side with a dot at every year — the exact look of the pre-theme page.
   The rule and the dots go; each year becomes a quiet pill with a hairline
   running off it, and the entries sit beneath as the site's clean colour-spined
   rows. Same markup, same filter script.
   ════════════════════════════════════════════════════════════════════════ */
/* mvp2-compat.css sets `body.mvp2-live .tl{border-inline-start:2px…!important}`
   — the gold rule that made the timeline read as the old page. It is !important,
   so the override must be too (scoped to these two properties only). */
body.mvp2-live .tl-wrap .gahshomar,.tl-wrap .gahshomar{
  border-inline-start:0!important;padding-inline-start:0!important}
.tl-wrap .g-year{margin:22px 0 9px;gap:11px;display:flex;align-items:center}
.tl-wrap .g-year::before{display:none}
/* the year is a time marker, not a collection — give it a NEUTRAL pill (ink on
   paper) so it never reads as one of the coloured topic boxes. On the hub the
   page colour is lajvard, which made the year look identical to the تفسیر rows. */
.tl-wrap .g-year b{font-size:13.5px;font-weight:800;color:var(--ink-soft);
  background:var(--paper-deep);border:1px solid var(--line-cool);border-radius:999px;
  padding:3px 14px;font-variant-numeric:tabular-nums}
.tl-wrap .g-year::after{content:"";flex:1;height:1px;
  background:var(--line);opacity:.8}
.tl-wrap .g-year:first-child{margin-top:6px}
/* the entry rows: keep the shangarf g-item card, just tighten the spine so the
   collection colour reads as a clean bar rather than a hairline */
.tl-wrap .g-item{padding:9px 14px;border-radius:10px}
.tl-wrap .g-item > i{width:4px;height:26px;border-radius:2px}
/* colour each box by its OWN topic (--gc from the gi-* class), not the page's
   collection. mvp2-compat.css paints every .tl-item with the page colour
   (var(--c)) under !important, which is why they all read the same grey-blue;
   this restores per-topic tint and works in both themes (paper-high is
   theme-aware). Items with no collection keep the neutral --gc from .gi-none. */
body.mvp2-live .tl-wrap .g-item{
  background:color-mix(in srgb,var(--gc,var(--n-600)) 15%,var(--paper-high))!important;
  border:1px solid color-mix(in srgb,var(--gc,var(--n-600)) 28%,var(--paper-high))!important}
body.mvp2-live .tl-wrap a.g-item:hover{
  background:color-mix(in srgb,var(--gc,var(--n-600)) 22%,var(--paper-high))!important;
  border-color:color-mix(in srgb,var(--gc,var(--n-600)) 48%,var(--paper-high))!important}

/* ---------- print --------------------------------------------------------- */
@media print{
  .search,.resume,.resume-pill,.tl-bar,#gal-back{display:none!important}
  .entry,.g-item,.res-card{break-inside:avoid}
}

/* ---------- خانهٔ سری · per-series homepage rows -------------------------
   The scripture row wears زر (gold = Quran only, per the system); the other
   rows wear the page's collection colour. */
.row-item.r-zar{--c:var(--zar);--c-deep:var(--zar-deep);
  --c-tint:var(--zar-line);--c-wash:var(--zar-wash)}
.rows .row-item.r-self{--c:var(--c);--c-deep:var(--c-deep)}
/* series-home: «تکمیلی» in place of a count, at the label's size */
.row-item .rn-supp{display:block;font-size:11px;font-weight:700;color:var(--c-deep);line-height:1.35}

/* ══ راهبار · the page-path bar ═══════════════════════════════════════════
   Replaces the tab strip AND the big title header on series view pages
   (owner: «مسیرِ صفحه بالاش، به‌جای تیترها»). Ancestors are links; the last
   segment is the current view, set in the collection colour. */
.rahbar{display:flex;flex-wrap:wrap;align-items:center;gap:9px;
  max-width:58rem;margin:18px auto 6px;padding:13px 20px;
  font-size:14.5px;font-weight:600;color:var(--ink-faint);
  background:var(--paper-high);border:1px solid var(--line);
  border-radius:12px;box-shadow:var(--shadow)}
.rahbar a{color:var(--ink-soft);text-decoration:none}
.rahbar a:hover{color:var(--c-deep);text-decoration:underline;
  text-underline-offset:4px;text-decoration-thickness:1px}
.rahbar .sep{color:var(--zar-line);font-weight:400;font-size:.85em}
.rahbar b[data-view]{color:var(--c-deep);font-weight:800}
@media (max-width:40rem){.rahbar{margin-inline:14px;padding:11px 14px;font-size:13px}}
/* view pages: the path replaces the banner and the tab strip */
body.rahbar-mode .s-head{display:none!important}
body.rahbar-mode .tabmenu,body.rahbar-mode nav.tabs{display:none!important}
/* the old sticky mini-header duplicated the path (with a stale tab label) and
   overlapped the rahbar — it goes with the tabs. */
body.rahbar-mode .topbar{display:none!important}

/* home list: tighten the count↔label gap (owner: فاصله زیاد، چیدمان خراب) */
.row-item .rn{display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1}
.row-item .rn b{transform:none;line-height:1}
.row-item .rn span{margin-top:2px}
.stat b{line-height:1}
.stat span{margin-top:2px}

/* ════════════════════════════════════════════════════════════════════════
   بازخوردِ QAِ مالک — 2026-07-24
   ════════════════════════════════════════════════════════════════════════ */

/* 1 · نوارِ خواندن — بازگردانده شد  2026-07-27
   The 2026-07-24 rule was «این دکمه‌ها رو فعلاً کامل از همه صفحات حذف کن» and it
   read `.readbar,.readbar2{display:none!important}` right here. RESTORED by owner
   instruction after the T-03 rebuild gave the bar a real size / leading / theme
   axis. There was a twin of this rule in shangarf.css; BOTH had to go, because
   the transcript pages load shangarf.css and the index/series pages load this
   file — removing only one leaves half the site with a dead toolbar, which is
   exactly what the first pass of this restore did.
   Visibility now lives in reading-desk.css alone. Do not re-add a hide here. */

/* 2 · ارقام از هم فاصله داشتند — pull the display numerals tight everywhere
   (Estedad's tabular set set them loose). (Owner: «فاصلهٔ ارقام زیاده، فشرده‌تر».) */
.row-item .rn b,.stat b,.kicker .num,.catalog .datum.sessions strong,
.count,.pl-num{letter-spacing:0.02em;font-feature-settings:'tnum' 0}
.catalog .datum.sessions strong{font-variant-numeric:proportional-nums}

/* 3 · ادامهٔ پخش — a play control on the LEFT of the plate; the triangle points
   RIGHT (site rule: no left-pointing play anywhere). The heading ▶ is now an
   SVG (markup) centred in its chip. (Owner: «سمت چپِ پلیر دکمهٔ play نیست».) */
.resume-card{position:relative;padding-left:64px}
.resume-card::before{content:"";position:absolute;left:15px;top:50%;
  transform:translateY(-50%);width:38px;height:38px;border-radius:50%;
  background:rgba(251,246,236,.14)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='%23FBF6EC'/%3E%3C/svg%3E")
    center/14px no-repeat;border:1px solid rgba(251,246,236,.34)}
.resume-ic svg{width:10px;height:10px;fill:currentColor;display:block}

/* چکیدهٔ جلسه — its CSS lives in shangarf.css: some series pages
   (ravankavi/sessions.html) load shangarf.css but NOT this file. */

/* 4 · فهرستِ کاتالوگ — pin the scriptural religions (یهودیت · مسیحیت) above the
   rest and cut them off with a simple hairline. Only rows carrying [data-pin]
   float up (ادیان only); every other index is untouched.
   (Owner: «یهودیت و مسیحیت رو بیار بالا و با یک خطِ ساده جدا کن».) */
.catalog .rows .pin-div{list-style:none;height:0;margin:5px 4px 9px;padding:0;
  border:0;border-top:1px dashed var(--c-tint);opacity:.85}

/* ════════════════════════════════════════════════════════════════════════
   سطرهای فشردهٔ یک‌خطی — owner 2026-07-25. Lives HERE, not in shangarf.css:
   this file loads after it, and the catalog-row rules above use the same
   specificity, so an override in the earlier sheet would lose the cascade.
   ════════════════════════════════════════════════════════════════════════ */
/* ── 2 · سطرهای فشردهٔ یک‌خطی ────────────────────────────────────────── */
.catalog .rows{gap:5px}
.catalog .rows .entry{padding:7px 14px;gap:12px}
.catalog .identity{display:flex;align-items:baseline;gap:9px;min-width:0}
.catalog .identity a{font-size:15.5px;flex:none;white-space:nowrap}
.catalog .identity small{display:block;margin-top:0;min-width:0;flex:1 1 auto;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px}
.catalog .datum.sessions{flex-direction:row;align-items:baseline;gap:4px;line-height:1.1}
.catalog .datum.sessions strong{font-size:16px;letter-spacing:0.02em}
.catalog .datum.sessions strong::after{display:inline;margin:0 0 0 4px;font-size:9.5px}
.catalog .rows .entry::after{font-size:12px}
@media (max-width:34rem){
  /* on a phone the meta drops below rather than truncating to nothing */
  .catalog .identity{display:block}
  .catalog .identity a{white-space:normal}
  .catalog .identity small{white-space:normal;font-size:10.5px;margin-top:1px}
}
/* probe */
