.main{padding-bottom:var(--s-2)}
.block{padding-block:var(--s-6)}
.ticker{background:var(--bg-2);border-bottom:1px solid var(--line)}
.ticker .wrap{display:flex;align-items:center;gap:var(--s-3);min-height:46px}
.ticker__tag{display:inline-flex;align-items:center;gap:var(--s-1);flex:none;background:var(--brand);color:#fff;font-size:var(--f-1);font-weight:700;padding:var(--s-1) var(--s-3);border-radius:100px}
.ticker__view{flex:1;min-width:0;overflow:hidden;mask-image:linear-gradient(to left,transparent,#000 30px,#000 calc(100% - 30px),transparent)}
.ticker__track{display:flex;width:max-content;will-change:transform;animation:tick-ltr 46s linear infinite}
.ticker__view:hover .ticker__track,.ticker__track:focus-within{animation-play-state:paused}
.ticker__set{display:flex;align-items:center;gap:var(--s-6);padding-inline-start:var(--s-6)}
/* Tall enough to tap. The row is 46px, so a 44px anchor fills it without
   changing where the text sits — the audit measures the box, not the glyphs. */
.ticker__set a{position:relative;display:inline-flex;align-items:center;min-height:44px;font-size:var(--f-2);font-weight:600;color:var(--ink-2);white-space:nowrap;transition:color .15s}
.ticker__set a::before{content:"";position:absolute;inset-inline-start:-19px;top:50%;translate:0 -50%;width:4px;height:4px;background:var(--brand);border-radius:50%;opacity:.5}
.ticker__set a:hover{color:var(--brand)}
@keyframes tick-ltr{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@keyframes tick-rtl{from{transform:translateX(0)}to{transform:translateX(50%)}}
html[dir=rtl] .ticker__track{animation-name:tick-rtl}
/* 32px is the right size to LOOK at and the wrong size to hit. The circle
   stays 32px; an invisible ::after grows the hit area to 48px, which is the
   documented way to satisfy the target-size rule without redrawing the
   control. Growing the button itself would have pushed the ticker taller. */
.ticker__toggle{position:relative;flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;color:var(--ink-3);transition:color .15s,background .15s}
.ticker__toggle::after{content:"";position:absolute;inset:-8px;border-radius:50%}
.ticker__toggle:hover{color:var(--brand);background:var(--bg-3)}
.ticker__toggle .ico:last-child{display:none}
.ticker.is-paused .ticker__toggle .ico:first-child{display:none}
.ticker.is-paused .ticker__toggle .ico:last-child{display:block}
.ticker.is-paused .ticker__track{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){
.ticker__track{animation-duration:46s!important}
}
/* ---- page heading ----
   The H1, rendered as the label for the feed below it rather than as a banner.
   Newsrooms hide this heading; a strip under the masthead reads as a landing
   page. Borrowing .shead keeps it looking like every other section label on the
   site while still being a real, visible H1. */
.homehead{padding-top:var(--s-5)}
.homehead .shead{margin-bottom:0}
.homehead .shead__title{font-size:var(--f-6)}
.homehead+.hero{padding-top:var(--s-4)}
.hero{display:grid;grid-template-columns:minmax(0,1fr) 336px;gap:var(--s-6);padding-block:var(--s-5) var(--s-2);align-items:stretch}
.hero__main{display:flex;flex-direction:column}
.hero .lead{display:grid;grid-template-columns:1.12fr 1fr;gap:var(--s-5);align-items:center}
.hero .lead__body{padding-top:0}
.hero__sub{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--gap);margin-top:var(--s-5);padding-top:var(--s-5);border-top:1px solid var(--line)}
.hero__side{display:flex;flex-direction:column;gap:var(--s-4)}
.split{display:grid;grid-template-columns:minmax(0,1fr) 336px;gap:var(--s-6);align-items:stretch}
.split__main,.split__side{display:flex;flex-direction:column}
.band{background:var(--band);padding-block:var(--s-7);margin-top:var(--s-6)}
.band__grid{display:grid;grid-template-columns:1fr 1fr;gap:var(--s-7)}
.cols3{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--s-6)}

/* ---- hero rail ----
   Latest and most-read behind two tabs. Two short stacked panels left this
   column shorter than the lead story beside it; one tall panel holding both
   lists fills it and matches the «Latest | Most read» control readers already
   know. Only the selected panel is in the tab order — the rest is ARIA. */
.rail{flex:1;min-height:0;padding:0;overflow:hidden}
.rail__tabs{display:flex;flex:none;border-bottom:1px solid var(--line)}
.rail__tab{flex:1;padding:var(--s-3) var(--s-2);font-size:var(--f-3);font-weight:700;color:var(--ink-3);border-bottom:3px solid transparent;transition:color .15s,border-color .15s,background .15s}
.rail__tab:hover{color:var(--ink)}
.rail__tab.is-on{color:var(--brand);border-bottom-color:var(--brand);background:var(--bg)}
.rail__panel{display:none;padding:var(--s-4)}
/* The rail is the only child of a stretched column, so flex:1 sizes it to the
   lead story beside it exactly — which is what closes the gap that two short
   stacked panels used to leave. Overflow is the release valve when the list is
   longer than the story is tall. */
.rail__panel.is-on{display:flex;flex-direction:column;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.rail__panel:focus-visible{outline-offset:-3px}
.rail .stream__link{font-size:var(--f-3)}

/* ---- latest stream ----
   The ticker carries the same freshness but a marquee cannot be scanned or
   weighed. Headlines only: the tab above the list already says these are the
   newest, so a timestamp on every row repeated the label eight times and took
   the width from the thing being scanned. */
.stream{display:flex;flex-direction:column}
.stream__row{display:flex;align-items:baseline;gap:var(--s-4);padding-block:var(--s-3)}
.stream__row:first-child{padding-top:0}
.stream__row+.stream__row{border-top:1px solid var(--line)}
.stream__link{flex:1;min-width:0;font-size:var(--f-4);font-weight:600;line-height:1.7;transition:color .15s;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.stream__link:hover{color:var(--brand)}

/* ---- rail list rhythm ----
   Both tabs read as one control, so both lists share a row height, a leading
   column width and one link style. Every rule is scoped to .rail on purpose:
   .ranked is a shared component that also renders outside the home page, and
   its definition in base.css is left exactly as it was.

   flex:1 on the rows is what removes the dead space at the foot of the panel —
   the rows divide whatever height the rail was stretched to, instead of
   stacking at their natural size and leaving the remainder blank. */
.rail .stream,.rail .ranked{flex:1;gap:0}
.rail .stream__row,.rail .ranked li{flex:1;display:flex;align-items:center;gap:var(--s-3);padding-block:var(--s-2);min-height:0}
.rail .stream__row+.stream__row,.rail .ranked li+li{border-top:1px solid var(--line)}
.rail .stream__link,.rail .ranked li a{flex:1;min-width:0;font-size:var(--f-3);font-weight:600;line-height:1.7;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;transition:color .15s}
.rail .stream__link:hover,.rail .ranked li a:hover{color:var(--brand)}
/* Both tabs open with the same marker in the same leading column, so switching
   between them does not shift the headlines sideways — the reason the badges
   were matched in width before, kept now that they are gone.

   The marker is a rule, not an icon: three pixels of colour is the same accent
   the active tab draws under itself and the AI desk draws across its top, so
   the rail reads as part of the theme rather than as a list with decoration.
   Drawn with ::before, it costs nothing in markup — the counter override on
   .ranked is scoped to .rail, so the numbered list keeps its numbers
   everywhere else it renders. */
.rail .stream__row::before,.rail .ranked li::before{content:"";flex:none;width:3px;height:16px;min-height:0;border-radius:2px;background:var(--line-2);transition:background .15s}
.rail .stream__row:first-child::before,.rail .ranked li:first-child::before{background:var(--brand)}
.rail .stream__row:hover::before,.rail .ranked li:hover::before{background:var(--brand)}

/* Analytics wrapper around each front-page row. Deliberately styles nothing:
   <main> is plain flow, so a bare block wrapper is invisible to the layout, and
   any rule added here would make the tracking visible in the design — which is
   exactly what a measurement wrapper must never be. */
.hslot{display:block}

/* ---- AI desk ----
   A vertical, so it is framed rather than simply headed: the panel is what
   separates «a beat we cover» from «a section of today's paper». The accent is
   a cool blue on purpose — every other accent on this site is the brand red,
   and a desk that looks like a section would read as one. Layout mirrors the
   افغانستان/جهان split above it so the page keeps one rhythm. */
.ai{position:relative;margin-top:var(--s-4);padding:var(--s-6);border:1px solid var(--line);border-radius:var(--r);background:
  linear-gradient(180deg,color-mix(in srgb,var(--ai) 7%,transparent),transparent 220px),var(--bg-2);overflow:hidden}
.ai::before{content:"";position:absolute;inset-block-start:0;inset-inline:0;height:3px;background:linear-gradient(to left,var(--ai),color-mix(in srgb,var(--ai) 25%,transparent))}
.ai__head{display:flex;align-items:center;flex-wrap:wrap;gap:var(--s-3);padding-bottom:var(--s-3);border-bottom:1px solid var(--line)}
.ai__badge{display:inline-flex;align-items:center;gap:var(--s-1);flex:none;background:var(--ai);color:#fff;font-size:var(--f-1);font-weight:700;padding:var(--s-1) var(--s-3);border-radius:100px}
.ai__title{font-size:var(--f-6);font-weight:800}
.ai__more{display:inline-flex;align-items:center;gap:var(--s-1);margin-inline-start:auto;font-size:var(--f-2);font-weight:600;color:var(--ink-3);transition:color .15s}
.ai__more:hover{color:var(--ai)}
.ai__deck{max-width:76ch;margin-top:var(--s-3);font-size:var(--f-3);line-height:2;color:var(--ink-2)}
/* Column count comes from .grid--4, which already knows how to fold to two and
   then one — so the desk breaks exactly the way «برگزیده سردبیر» does. */
.ai__grid{margin-top:var(--s-5)}
.ai .card__title a:hover{color:var(--ai)}

@media(max-width:1024px){
.hero,.split{grid-template-columns:1fr;gap:var(--s-5)}
.hero__main{display:block}
.band__grid{gap:var(--s-5)}
.cols3{grid-template-columns:1fr;gap:var(--s-5)}
.split__main,.split__side{display:block}
.stack--fill{justify-content:flex-start}
/* Stacked layout: nothing to match in height, so the rail sizes to its list. */
.rail{flex:none}
.rail__panel.is-on{flex:none;overflow:visible}
}
@media(max-width:900px){
.band__grid{grid-template-columns:1fr;gap:var(--s-6)}
}
@media(max-width:768px){
.block{padding-block:var(--s-5)}
.hero{padding-top:var(--s-4)}
.homehead{padding-top:var(--s-4)}
.homehead .shead__title{font-size:var(--f-5)}
.ai{padding:var(--s-5) var(--s-4)}
.ai__title{font-size:var(--f-5)}
.hero .lead{grid-template-columns:1fr;gap:0}
.hero .lead__body{padding-top:var(--s-3)}
.hero__sub{grid-template-columns:1fr 1fr;margin-top:var(--s-4);padding-top:var(--s-4)}
.band{padding-block:var(--s-5)}
.pairs{gap:var(--s-3) var(--s-4)}
.promo--brand,.promo--neutral{padding:var(--s-4)}
}
@media(max-width:520px){
.hero__sub{grid-template-columns:1fr;gap:0}
.hero__sub .card{flex-direction:row;gap:var(--s-3);align-items:flex-start;padding-top:var(--s-4);border-top:1px solid var(--line)}
.hero__sub .card__media{flex:none;width:118px;margin-bottom:0}
.hero__sub .card__media img,.hero__sub .card__media .ph{width:118px;aspect-ratio:4/3}
.hero__sub .card__sum{display:none}
.hero__sub .card__title{font-size:var(--f-3);font-weight:600;margin-block:0 var(--s-1);-webkit-line-clamp:3}
.hero__sub .card .overline,.hero__sub .card .metabar{display:none}
.pairs{grid-template-columns:1fr;gap:0}
.stream__row{gap:var(--s-3)}
.stream__link{font-size:var(--f-3)}
.mgrid{grid-template-columns:1fr}
.mcard__title{-webkit-line-clamp:3}
.promo__cta{width:100%;justify-content:center}
}
