/* Reading tools (inc/read-tools.php, assets/js/read-tools.js) — 2026-12-01 */

/* ---------- the choices ---------- */
html.rt-on .article-body{font-size:calc(1.08rem * var(--rt-fs, 1))}
html[data-rt-lh="tight"] .article-body{line-height:1.8}
html[data-rt-lh="loose"] .article-body{line-height:2.6}
html[data-rt-w="narrow"] .article{max-width:640px}
html[data-rt-w="wide"] .article{max-width:1040px}
html[data-rt-font="plain"] .article-body,html[data-rt-font="plain"] .article-body :is(p,li,td,th,span,b,strong,em,blockquote){font-family:Tahoma,"Segoe UI",Arial,sans-serif !important}
html[data-rt-al="start"] .article-body p{text-align:start}
html[data-rt-al="justify"] .article-body p{text-align:justify}

/* page colours — round 2 (owner: paper should be better; switching colours shifted and "zoomed out" the page).
   The sheet now grows OUTWARD: content-box padding with the same negative margins, so the text column keeps exactly its
   width and place in every colour. Dark (the site's own look) has no sheet at all. */
html[data-rt-th="paper"],html[data-rt-th="light"],html[data-rt-th="black"]{--rt-pad:40px; --rt-padt:34px}
html[data-rt-th="paper"] .article,html[data-rt-th="light"] .article,html[data-rt-th="black"] .article{box-sizing:content-box; padding:var(--rt-padt) var(--rt-pad) 0; margin-top:calc(-1 * var(--rt-padt)); border-radius:24px; position:relative; isolation:isolate; transition:background-color .35s, color .35s, box-shadow .35s}
@media (max-width:960px){
  html[data-rt-th="paper"],html[data-rt-th="light"],html[data-rt-th="black"]{--rt-pad:16px; --rt-padt:22px}
  html[data-rt-th="paper"] .article,html[data-rt-th="light"] .article,html[data-rt-th="black"] .article{margin-inline:calc(-1 * var(--rt-pad)); border-radius:18px}
  html:is([data-rt-th="paper"],[data-rt-th="light"],[data-rt-th="black"]) .article .article-foot{border-radius:0 0 18px 18px}
}

/* paper: warm cream sheet, fine paper grain, deckled inner edge, soft lamp shadow */
html[data-rt-th="paper"] .article{
  --rt-ink:#2f2618; --rt-head:#6a4510; --rt-link:#8b4f0f; --rt-strong:#1d150a; --rt-soft:#6b5a40; --rt-line:rgba(110,80,35,.22); --rt-tint:rgba(150,105,40,.08);
  background-color:#f2e8d2;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .33 0 0 0 0 .15 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(120% 70% at 50% 0%, rgba(255,250,235,.9), rgba(242,232,210,0) 60%),
    linear-gradient(180deg, #f5ecd8, #eee2c6);
  box-shadow:inset 0 0 0 1px rgba(120,90,40,.18), inset 0 0 60px rgba(140,100,40,.12), 0 40px 80px -40px rgba(0,0,0,.95), 0 0 0 1px rgba(0,0,0,.4);
  color-scheme:light}
html[data-rt-th="paper"] body{background-color:#0d0a06}
/* light: clean white page */
html[data-rt-th="light"] .article{--rt-ink:#24211c; --rt-head:#5f420f; --rt-link:#8b4f0f; --rt-strong:#000; --rt-soft:#5c554a; --rt-line:rgba(0,0,0,.12); --rt-tint:rgba(0,0,0,.035);
  background:#fcfbf8; box-shadow:0 40px 80px -40px rgba(0,0,0,.95), 0 0 0 1px rgba(0,0,0,.4); color-scheme:light}
/* black: true black for night reading on OLED phones */
html[data-rt-th="black"] body{background:#000}
html[data-rt-th="black"] .article{--rt-ink:#d6cdb9; --rt-head:#e6c46a; --rt-link:#e6c46a; --rt-strong:#fff; --rt-soft:#a39782; --rt-line:rgba(255,255,255,.12); --rt-tint:rgba(255,255,255,.04); background:#000}

/* text, headings, links, quotes, captions */
html[data-rt-th] .article :is(.article-body,.article-body p,.article-body li,.article-body td,.breadcrumb,.article-meta){color:var(--rt-ink)}
html[data-rt-th] .article :is(.article-title,.article-body h1,.article-body h2,.article-body h3,.article-body h4){color:var(--rt-head); -webkit-text-fill-color:var(--rt-head); background:none; text-shadow:none}
html[data-rt-th] .article :is(.article-body strong,.article-body b){color:var(--rt-strong)}
html[data-rt-th] .article :is(.article-body a,.breadcrumb a){color:var(--rt-link); border-color:var(--rt-line)}
html[data-rt-th] .article :is(.article-body blockquote,.article-meta span,.breadcrumb .sep){color:var(--rt-soft)}
html[data-rt-th] .article .article-body blockquote{border-inline-start-color:var(--rt-head)}
html[data-rt-th] .article .article-body :is(figcaption,.wp-caption-text){color:var(--rt-soft); border-color:var(--rt-line)}
html[data-rt-th] .article .article-body hr{opacity:.55}
html[data-rt-th] .article .article-meta .tag{background:var(--rt-tint); color:var(--rt-head); border-color:var(--rt-line)}
/* photos sit on the page like prints */
html[data-rt-th="paper"] .article :is(.article-body img,.article-hero){border-color:rgba(110,80,35,.3); box-shadow:0 10px 24px -14px rgba(60,40,10,.55)}
html[data-rt-th="light"] .article :is(.article-body img,.article-hero){border-color:rgba(0,0,0,.12); box-shadow:0 10px 24px -14px rgba(0,0,0,.35)}
/* tables */
html[data-rt-th] .article .article-body :is(hr,table,td,th,.tg-table-wrap){border-color:var(--rt-line)}
html[data-rt-th] .article .article-body .tg-table{background:transparent}
html[data-rt-th] .article .article-body .tg-table thead th{background:var(--rt-tint); color:var(--rt-head); border-bottom-color:var(--rt-head)}
html[data-rt-th] .article .article-body .tg-table tbody tr:nth-child(even) > *{background:var(--rt-tint)}
html[data-rt-th] .article .article-body .tg-table tbody tr:hover > *{background:rgba(150,105,40,.12)}
html[data-rt-th] .article .article-body :is(.tg-spec tbody th,.tg-table .num,.tg-table td[data-num]){color:var(--rt-head)}
html[data-rt-th] .article .article-body .tg-table caption{color:var(--rt-soft)}
/* colours writers picked for the dark page (light gold, cream…): darkened so they stay readable on a light page;
   picked backgrounds (dark tones) are lifted to soft highlighter shades */
html:is([data-rt-th="paper"],[data-rt-th="light"]) .article .article-body span.tg-ink{filter:brightness(.5) saturate(1.4)}
html:is([data-rt-th="paper"],[data-rt-th="light"]) .article .article-body span.tg-hl{filter:brightness(2.4) saturate(.8)}
/* the part after the text (share, next article, comments, related) stays in the site's own dark look, as a band that
   closes the sheet */
html:is([data-rt-th="paper"],[data-rt-th="light"],[data-rt-th="black"]) .article .article-foot{margin:44px calc(-1 * var(--rt-pad)) 0; padding:28px var(--rt-pad) 4px; background:var(--ink); border-top:1px solid var(--line); border-radius:0 0 24px 24px}
html[data-rt-th="black"] .article .article-foot{background:#000}
html:is([data-rt-th="paper"],[data-rt-th="light"]) .article > :last-child:not(.article-foot){margin-bottom:0; padding-bottom:36px}

/* focus mode: only the article */
html.rt-focus .nav,html.rt-focus .footer,html.rt-focus .article-foot,html.rt-focus .to-top,html.rt-focus .lux-marquee,html.rt-focus .read-progress ~ .nav{display:none !important}
html.rt-focus .view{padding-top:28px}
html.rt-focus body{background-image:none}

/* ---------- the button and the time left ---------- */
.rt-fab{position:fixed; z-index:130; bottom:24px; inset-inline-end:24px; display:flex; align-items:center; gap:8px}
.rt-btn{display:grid; place-items:center; width:52px; height:52px; border-radius:16px; border:1px solid rgba(216,178,74,.55); cursor:pointer;
  background:linear-gradient(160deg,#2a2013,#15100a); color:#f1d27a; font:700 19px/1 var(--font-body, Vazirmatn), sans-serif; box-shadow:0 12px 28px -12px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.08); transition:transform .2s, border-color .2s}
.rt-btn:hover,.rt-btn[aria-expanded="true"]{transform:translateY(-2px); border-color:#f1d27a}
.rt-btn small{font-size:12px; margin-inline-start:1px}
.rt-left{padding:7px 12px; border-radius:999px; background:rgba(21,16,10,.88); border:1px solid rgba(216,178,74,.3); color:#e9dcc0; font:500 12.5px/1 var(--font-body, Vazirmatn), sans-serif; white-space:nowrap; opacity:0; transform:translateY(4px); transition:opacity .3s, transform .3s; pointer-events:none}
.rt-left.is-on{opacity:1; transform:none}
html.rt-focus .rt-fab{opacity:.55} html.rt-focus .rt-fab:hover{opacity:1}

/* ---------- the panel ---------- */
.rt-scrim{position:fixed; inset:0; z-index:170; background:rgba(0,0,0,.35); opacity:0; pointer-events:none; transition:opacity .25s}
.rt-scrim.is-on{opacity:1; pointer-events:auto}
.rt-panel{position:fixed; z-index:180; top:calc(var(--nav-h, 64px) + 12px); bottom:12px; inset-inline-end:12px; width:360px; max-width:calc(100vw - 24px); display:flex; flex-direction:column;
  border-radius:22px; border:1px solid rgba(216,178,74,.35); background:rgba(19,14,9,.97); color:#e9dcc0; box-shadow:0 30px 70px -20px rgba(0,0,0,.95);
  transform:translateX(calc(-100% - 24px)); opacity:0; visibility:hidden; transition:transform .32s cubic-bezier(.2,.8,.2,1), opacity .25s, visibility 0s .32s; font-family:var(--font-body, Vazirmatn), sans-serif}
[dir="rtl"] .rt-panel{transform:translateX(calc(-100% - 24px))}
.rt-panel.is-on{transform:none; opacity:1; visibility:visible; transition:transform .32s cubic-bezier(.2,.8,.2,1), opacity .25s}
@media (min-width:701px){ html.rt-focus .rt-panel{top:12px} } /* phones keep the sheet at the bottom (2026-12-01: it jumped to the top when focus was turned on) */
.rt-head{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:16px 18px 12px; border-bottom:1px solid rgba(216,178,74,.18)}
.rt-head h2{margin:0; font-size:17px; font-weight:700; color:#f1d27a}
.rt-x{display:grid; place-items:center; width:34px; height:34px; border-radius:10px; border:1px solid rgba(255,255,255,.12); background:none; color:#e9dcc0; cursor:pointer}
.rt-x:hover{border-color:#f1d27a; color:#f1d27a}
.rt-body{flex:1; overflow-y:auto; padding:6px 18px 18px; overscroll-behavior:contain}
.rt-sec{padding:14px 0; border-bottom:1px solid rgba(255,255,255,.06)}
.rt-sec:last-child{border-bottom:0}
.rt-lbl{display:flex; justify-content:space-between; align-items:baseline; margin-bottom:10px; font-size:13.5px; font-weight:600; color:#e9dcc0}
.rt-lbl output,.rt-lbl small{font-weight:500; font-size:12.5px; color:#a99d84}
.rt-seg{display:grid; grid-auto-flow:column; grid-auto-columns:1fr; gap:4px; padding:4px; border-radius:13px; background:rgba(0,0,0,.35); border:1px solid rgba(255,255,255,.06)}
.rt-seg button{min-height:38px; padding:6px 4px; border:1px solid transparent; border-radius:9px; background:none; color:#c9bda3; font:500 13px/1.3 inherit; cursor:pointer; transition:background .15s, color .15s}
.rt-seg button:hover{color:#f1d27a}
.rt-seg button[aria-pressed="true"]{background:rgba(216,178,74,.16); border-color:rgba(216,178,74,.5); color:#f1d27a; font-weight:700}
.rt-size{display:grid; grid-template-columns:40px 1fr 40px; align-items:center; gap:10px}
.rt-size button{height:38px; border-radius:10px; border:1px solid rgba(255,255,255,.12); background:rgba(0,0,0,.3); color:#e9dcc0; cursor:pointer; font-weight:700}
.rt-size button:hover{border-color:#f1d27a; color:#f1d27a}
.rt-size input{width:100%; accent-color:#d8b24a}
.rt-themes{display:grid; grid-template-columns:repeat(4,1fr); gap:8px}
.rt-themes button{display:grid; gap:6px; justify-items:center; padding:8px 4px; border-radius:12px; border:1px solid rgba(255,255,255,.1); background:none; color:#c9bda3; font:500 12px/1 inherit; cursor:pointer}
.rt-themes button i{display:grid; place-items:center; width:100%; height:38px; border-radius:8px; font:700 15px/1 inherit; font-style:normal}
.rt-themes button[aria-pressed="true"]{border-color:#f1d27a; color:#f1d27a; box-shadow:0 0 0 2px rgba(241,210,122,.25)}
.rt-sw{display:flex; align-items:center; justify-content:space-between; gap:12px; cursor:pointer}
.rt-sw span{display:grid; gap:3px; font-size:13.5px; font-weight:600}
.rt-sw small{font-size:12px; font-weight:400; color:#a99d84}
.rt-sw input{appearance:none; flex:none; width:44px; height:26px; border-radius:999px; background:rgba(255,255,255,.14); position:relative; cursor:pointer; transition:background .2s}
.rt-sw input::after{content:""; position:absolute; top:3px; inset-inline-start:3px; width:20px; height:20px; border-radius:50%; background:#e9dcc0; transition:inset-inline-start .2s}
.rt-sw input:checked{background:#c9a24a} .rt-sw input:checked::after{inset-inline-start:21px; background:#fff}
.rt-toc{display:grid; gap:2px; margin:0; padding:0; list-style:none}
.rt-toc a{display:block; padding:8px 10px; border-radius:9px; color:#e9dcc0; text-decoration:none; font-size:13.5px; line-height:1.6; border-inline-start:2px solid transparent}
.rt-toc a.h3{padding-inline-start:24px; font-size:13px; color:#c9bda3}
.rt-toc a:hover,.rt-toc a.is-here{background:rgba(216,178,74,.1); color:#f1d27a; border-color:#d8b24a}
.rt-say{display:flex; gap:8px}
.rt-say button{flex:1; display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:40px; border-radius:11px; border:1px solid rgba(216,178,74,.4); background:rgba(216,178,74,.08); color:#f1d27a; font:600 13.5px/1 inherit; cursor:pointer}
.rt-say button[hidden]{display:none}
.article-body .rt-saying{background:rgba(216,178,74,.14); border-radius:6px; box-shadow:0 0 0 6px rgba(216,178,74,.14)}
.rt-reset{width:100%; min-height:40px; border-radius:11px; border:1px dashed rgba(255,255,255,.2); background:none; color:#c9bda3; font:500 13px/1 inherit; cursor:pointer}
.rt-reset:hover{border-color:#f1d27a; color:#f1d27a}
.rt-resume{position:fixed; z-index:125; bottom:24px; inset-inline-start:50%; transform:translateX(50%); display:inline-flex; align-items:center; gap:10px; padding:8px 8px 8px 16px; border-radius:999px;
  background:rgba(21,16,10,.95); border:1px solid rgba(216,178,74,.45); color:#e9dcc0; font:500 13.5px/1 var(--font-body, Vazirmatn), sans-serif; box-shadow:0 14px 30px -14px rgba(0,0,0,.9)}
.rt-resume button{border:0; border-radius:999px; padding:8px 14px; cursor:pointer; font:600 13px/1 inherit}
.rt-resume .go{background:linear-gradient(180deg,#f1d27a,#c9a24a); color:#2a1e08}
.rt-resume .no{background:none; color:#a99d84; padding:8px}

@media (max-width:700px){
  .rt-fab{bottom:16px; inset-inline-end:16px}
  .rt-btn{width:48px; height:48px}
  .rt-panel{top:auto; bottom:0; inset-inline:0; width:auto; max-width:none; max-height:82vh; border-radius:22px 22px 0 0; transform:translateY(105%)}
  [dir="rtl"] .rt-panel{transform:translateY(105%)}
  .rt-panel.is-on{transform:none}
  .rt-resume{bottom:78px; inset-inline-start:16px; inset-inline-end:16px; transform:none; justify-content:space-between}
}
@media (prefers-reduced-motion:reduce){ .rt-panel,.rt-scrim,.rt-left{transition:none} }
@media print{ .rt-fab,.rt-panel,.rt-scrim,.rt-resume{display:none !important} }

/* ---------- round 2: focus pill, page-colour transition ---------- */
  border-radius:999px; border:1px solid rgba(216,178,74,.45); background:rgba(19,14,9,.92); color:#e9dcc0; font:500 13px/1 var(--font-body, Vazirmatn), sans-serif; cursor:pointer;
  box-shadow:0 12px 28px -14px rgba(0,0,0,.9); backdrop-filter:blur(8px); opacity:0; pointer-events:none; transition:transform .4s cubic-bezier(.2,.8,.2,1), opacity .3s}
/* page colour reveal (View Transition, only while html.rt-vt) */
html.rt-vt::view-transition-old(root),html.rt-vt::view-transition-new(root){animation:none; mix-blend-mode:normal}
html.rt-vt::view-transition-old(root){z-index:1}
html.rt-vt::view-transition-new(root){z-index:2}
/* browsers without View Transitions: a soft fade of the sheet colours */
html.rt-fade .article,html.rt-fade .article *,html.rt-fade body{transition:background-color .6s ease, color .6s ease, border-color .6s ease, box-shadow .6s ease !important}

/* ---------- round 4 ---------- */
/* a colour change is one picture of the whole page: the site's named page-to-page pieces (lead photo, title, menu —
   lux.css) are not lifted out, so the photo keeps its rounded frame during the change */
html.rt-vt .article-hero img,html.rt-vt .article-title,html.rt-vt .nav{view-transition-name:none !important}
/* focus pausing at the end: the page around the text comes in softly (menu slides down, the rest rises and fades in) */
@keyframes rt-in-up{from{opacity:0; transform:translateY(26px)}to{opacity:1; transform:none}}
@keyframes rt-in-down{from{opacity:0; transform:translateY(-100%)}to{opacity:1; transform:none}}
@keyframes rt-in-fade{from{opacity:0}to{opacity:1}}
html.rt-reveal .nav{animation:rt-in-down .7s cubic-bezier(.2,.8,.2,1) both}
html.rt-reveal :is(.article-foot,.footer){animation:rt-in-up 1s cubic-bezier(.2,.8,.2,1) both}
html.rt-reveal .footer{animation-delay:.12s}
html.rt-reveal .to-top{animation:rt-in-fade .8s ease both}
/* focus returning: fade out first (then hidden) */
html.rt-hiding :is(.nav,.article-foot,.footer,.to-top){opacity:0; transition:opacity .4s ease}
html.rt-hiding .nav{transform:translateY(-30%); transition:opacity .4s ease, transform .4s ease}
@media (prefers-reduced-motion:reduce){ html.rt-reveal :is(.nav,.article-foot,.footer,.to-top){animation:none} }

/* ---------- focus mode: the moment it turns on ---------- */
.rt-dim{position:fixed; inset:0; z-index:150; pointer-events:none; opacity:0;
  background:radial-gradient(ellipse 58% 72% at 50% 55%, rgba(0,0,0,0) 38%, rgba(0,0,0,.55) 78%, rgba(0,0,0,.82) 100%)}
.rt-dim i{position:absolute; top:0; inset-inline:0; height:2px; background:linear-gradient(90deg, transparent, #f1d27a 45%, #fff6d8 50%, #f1d27a 55%, transparent); transform:scaleX(0); opacity:0}
.rt-dim.go{animation:rt-dim 1.7s cubic-bezier(.4,0,.2,1) both}
.rt-dim.go i{animation:rt-line 1.2s cubic-bezier(.65,0,.35,1) .15s both}
@keyframes rt-dim{0%{opacity:0}30%{opacity:1}100%{opacity:0}}
@keyframes rt-line{0%{transform:scaleX(0); opacity:0}30%{opacity:1}100%{transform:scaleX(1); opacity:0}}
/* the text itself settles into place */
html.rt-focus .article-body{animation:rt-settle .9s cubic-bezier(.2,.8,.2,1) both}
@keyframes rt-settle{from{filter:brightness(.88)}to{filter:none}}
/* the exit pill drops in with a small bounce */
@media (prefers-reduced-motion:reduce){ .rt-dim{display:none} html.rt-focus .article-body{animation:none} }

/* ---------- round 6: button ring + the phone layout (owner: the tools filled the phone screen) ---------- */
.rt-btn{position:relative}
.rt-aa{position:relative; z-index:1}
.rt-ring{display:none; position:absolute; inset:0; width:100%; height:100%; transform:rotate(-90deg); pointer-events:none}
.rt-ring circle{fill:none; stroke:#f1d27a; stroke-width:2; stroke-linecap:round; stroke-dasharray:var(--rt-p, 0) 100; transition:stroke-dasharray .2s linear}
.rt-more,.rt-grab{display:none}
.rt-fab{transition:transform .35s cubic-bezier(.2,.8,.2,1), opacity .3s}

@media (max-width:700px){
  /* button: small, round, quiet; slips away while reading down and returns on the way up; the ring shows progress */
  .rt-fab{bottom:14px; inset-inline-end:14px}
  .rt-fab.is-away{transform:translateY(90px); opacity:0; pointer-events:none}
  .rt-btn{width:44px; height:44px; border-radius:50%; font-size:16px; background:rgba(21,16,10,.82); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); border-color:rgba(216,178,74,.35)}
  .rt-btn small{font-size:10px}
  .rt-left{display:none}
  .rt-ring{display:block}
  .rt-fab.is-open{opacity:0; pointer-events:none}
  /* the sheet: compact, only the essentials until «تنظیمات بیشتر» */
  .rt-scrim{background:rgba(0,0,0,.18)}
  .rt-panel{max-height:min(78vh, 640px); border-radius:20px 20px 0 0; border-bottom:0; padding-bottom:env(safe-area-inset-bottom)}
  .rt-grab{display:block; width:40px; height:5px; margin:8px auto 0; border-radius:3px; background:rgba(255,255,255,.22)}
  .rt-head{padding:6px 16px 8px; border-bottom:0}
  .rt-head h2{font-size:15px}
  .rt-x{width:32px; height:32px; border-radius:50%}
  .rt-body{padding:0 16px 14px}
  .rt-sec{padding:10px 0}
  .rt-lbl{margin-bottom:8px; font-size:13px}
  .rt-size{grid-template-columns:44px 1fr 44px}
  .rt-size button{height:40px}
  .rt-themes{gap:10px}
  .rt-themes button{padding:0; border:0; gap:5px; font-size:11.5px}
  .rt-themes button i{width:44px; height:44px; border-radius:50%; margin:0 auto; box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}
  .rt-themes button[aria-pressed="true"]{box-shadow:none}
  .rt-themes button[aria-pressed="true"] i{box-shadow:0 0 0 2px #15100a, 0 0 0 4px #f1d27a}
  .rt-sw small{display:none}
  .rt-more{display:grid; grid-template-columns:1fr auto; grid-template-rows:auto auto; align-items:center; gap:2px 10px; width:100%; margin:4px 0 2px; padding:11px 14px; border-radius:13px;
    border:1px solid rgba(216,178,74,.28); background:rgba(216,178,74,.07); color:#f1d27a; font:600 13.5px/1.3 inherit; text-align:start; cursor:pointer}
  .rt-more small{grid-column:1; font-weight:400; font-size:11.5px; color:#a99d84}
  .rt-more b{grid-row:1 / span 2; grid-column:2; transition:transform .25s}
  .rt-more[aria-expanded="true"] b{transform:rotate(180deg)}
  .rt-adv{display:none}
  .rt-panel.is-more .rt-adv{display:block; animation:rt-in-fade .3s ease both}
  .rt-wide-only{display:none}
  .rt-seg button{min-height:36px; font-size:12.5px}
  .rt-toc{max-height:32vh; overflow-y:auto}
  .rt-resume{bottom:72px}
}

/* ---------- focus bar, round 2 (owner: no dot, tidier, a different look on phones) ----------
   desktop: a glass capsule at the top centre — icon, label, a hairline, «خروج»;
   phones: a compact chip at the bottom centre, where the thumb is */
.rt-focus-pill{position:fixed; z-index:140; top:16px; inset-inline-start:50%; transform:translate(50%,-160%); display:inline-flex; align-items:center; gap:0;
  padding:5px; border-radius:999px; border:1px solid rgba(216,178,74,.32); cursor:pointer;
  background:linear-gradient(180deg, rgba(34,26,17,.92), rgba(18,13,8,.94)); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  box-shadow:0 14px 34px -16px rgba(0,0,0,.95), inset 0 1px 0 rgba(255,255,255,.06);
  color:#e9dcc0; font:500 13px/1 var(--font-body, Vazirmatn), sans-serif; opacity:0; pointer-events:none;
  transition:transform .5s cubic-bezier(.34,1.4,.64,1), opacity .3s}
[dir="ltr"] .rt-focus-pill{transform:translate(-50%,-160%)}
.rt-focus-pill.is-on{transform:translate(50%,0); opacity:1; pointer-events:auto; transition-delay:.2s}
[dir="ltr"] .rt-focus-pill.is-on{transform:translate(-50%,0)}
.rt-fp-ico{display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:rgba(216,178,74,.14); color:#f1d27a}
.rt-fp-t{padding:0 12px 0 10px; color:#e9dcc0; letter-spacing:0}
.rt-fp-x{display:inline-flex; align-items:center; gap:6px; height:30px; padding:0 14px; border-radius:999px; border-inline-start:1px solid rgba(216,178,74,.22);
  background:rgba(216,178,74,.12); color:#f1d27a; font-weight:700; transition:background .2s, color .2s}
.rt-fp-x svg{opacity:.9}
.rt-fp-m{display:none}
.rt-focus-pill:hover .rt-fp-x,.rt-focus-pill:focus-visible .rt-fp-x{background:#d8b24a; color:#1b1408}
.rt-focus-pill:focus-visible{outline:2px solid #f1d27a; outline-offset:3px}
body.admin-bar .rt-focus-pill{top:48px}
@media (max-width:700px){
  .rt-focus-pill{top:auto; bottom:calc(16px + env(safe-area-inset-bottom)); transform:translate(50%,180%); padding:4px; border-radius:16px; font-size:12.5px}
  [dir="ltr"] .rt-focus-pill{transform:translate(-50%,180%)}
  .rt-focus-pill.is-on{transform:translate(50%,0)}
  [dir="ltr"] .rt-focus-pill.is-on{transform:translate(-50%,0)}
  body.admin-bar .rt-focus-pill{top:auto}
  .rt-fp-ico{width:34px; height:34px; border-radius:12px}
  .rt-fp-t{display:none}
  .rt-fp-m{display:inline}
  .rt-fp-x{height:34px; padding:0 14px; border-radius:12px; border:0; margin-inline-start:4px; background:#d8b24a; color:#1b1408}
}
@media (prefers-reduced-motion:reduce){ .rt-focus-pill{transition:none} }
@media print{ .rt-focus-pill{display:none !important} }
