/* === DESIGN-X p5: whitespace + modernity (plan.md [build]). Structure/CSS only, IBM Plex inherited. === */
:root{--dx-s1:24px;--dx-s2:40px;--dx-s3:64px;--dx-s4:96px;--dx-gold:#b08d57}
/* W: section rhythm 24/40/64/96, gap capped 56 mobile / 96 desktop */
main>section,main>.sec{margin-block:0!important;padding-block:var(--dx-s2)!important}
main>section.dx-band,main>section.trust{padding-block:56px!important}
@media (min-width:960px){main>section,main>.sec{padding-block:var(--dx-s3)!important}main>section.dx-band,main>section.trust{padding-block:var(--dx-s4)!important}}
main>section.now-cooking:not(:has(li,img,a,h2,h3,p)){display:none!important}
main .sec-h{margin-block:0 var(--dx-s1)!important}
/* W: card captions 16px padding, title lh 1.35, text panel sized to content */
.card .meta,.card .txt,.card>a>div:not(.ph){padding:16px!important;min-height:0!important;height:auto!important}
.card h3{line-height:1.35!important}
.lead-split{align-items:start!important}
.lead-split .card,.lead-split .card>*{min-height:0!important}
@media (min-width:960px){
 .lead-split .card.lead{display:grid!important;grid-template-columns:minmax(0,3fr) minmax(0,2fr);align-items:center;height:auto!important}
 .lead-split .card.lead>img,.lead-split .card.lead>.ph,.lead-split .card.lead>picture{grid-column:1;grid-row:1 / span 2}
 .lead-split .card.lead .meta{grid-column:2;grid-row:1;align-self:end}
 .lead-split .card.lead h3{grid-column:2;grid-row:2;align-self:start;margin-block:0}}
/* W: post opening centred at 1280+ (760px column, hero same width) */
@media (min-width:1280px){
 article.wrap>header.r-head,article.wrap>figure.r-hero,article.wrap>.r-intro,article.wrap>.dx-p4-jump{max-width:760px!important;width:100%;margin-inline:auto!important;box-sizing:border-box}
 article.wrap>figure.r-hero img{width:100%;height:auto}}
/* M: category controls = single-line text tabs, gold underline, mobile scroll + edge fade */
.chips,ul.chips{display:flex!important;flex-wrap:nowrap!important;gap:24px!important;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;min-width:0;max-width:100%;list-style:none;margin-inline:0;padding:0 0 2px!important;border-bottom:1px solid rgba(176,141,87,.35);background:none!important}
.chips::-webkit-scrollbar{display:none}
ul.chips>li{flex:0 0 auto;margin:0;padding:0}
.chips a.chip,a.chip{flex:0 0 auto;display:inline-block;background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:8px 0 10px!important;margin-bottom:-1px;border-bottom:2px solid transparent!important;white-space:nowrap;color:var(--ink);font-weight:500;text-decoration:none}
a.chip:hover,a.chip:focus-visible,a.chip[aria-current],a.chip.on,a.chip.active{border-bottom-color:var(--dx-gold)!important;color:var(--ink)}
@media (max-width:959px){.chips,ul.chips{-webkit-mask-image:linear-gradient(to left,#000 0,#000 calc(100% - 32px),transparent 100%);mask-image:linear-gradient(to left,#000 0,#000 calc(100% - 32px),transparent 100%)}}
/* M: hubs = editorial lead 2/3 + stacked pair, then 3-up; every 7th card wide */
@media (min-width:960px){
 .hub-body .grid.pg{grid-template-columns:repeat(6,minmax(0,1fr))!important;grid-auto-flow:row dense;align-items:stretch}
 .hub-body .grid.pg>.card{grid-column:span 2!important}
 .hub-body .grid.pg>.card:first-child{grid-column:span 4!important;grid-row:span 2}
 .hub-body .grid.pg>.card:nth-child(2),.hub-body .grid.pg>.card:nth-child(3){grid-column:span 2!important}
 /* P6-SLOT: every 7th wide left a 2-col hole when that card was last (e.g. 7-card hubs). Fill the last 3-up row instead; N=2 lead drops rowspan. */
 .hub-body .grid.pg>.card:nth-child(3n+4):last-child{grid-column:span 6!important}
 .hub-body .grid.pg>.card:nth-child(3n+4):nth-last-child(2){grid-column:span 4!important}
 .hub-body .grid.pg:not(:has(>.card:nth-child(3)))>.card:first-child{grid-row:auto!important}
 .hub-body .grid.pg:not(:has(>.card:nth-child(2)))>.card:first-child{grid-column:span 6!important;grid-row:auto!important}
 .hub-body .grid.pg>.card:first-child>a{display:flex!important;flex-direction:column;height:100%;gap:0!important}
 .hub-body .grid.pg>.card:first-child img{flex:1 1 0;height:0;min-height:280px;width:100%;aspect-ratio:auto!important;object-fit:cover}
 .hub-body .grid.pg>.card:first-child h3{font-size:28px;padding-inline:0!important}
 .hub-body .grid.pg>.card:nth-child(3n+4):nth-last-child(2)>a{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center}
 .hub-body .grid.pg>.card:nth-child(3n+4):nth-last-child(2) img{aspect-ratio:4/5}}
/* M: home about = full-bleed split (portrait | text) on the p3 dark band */
@media (min-width:960px){
 main>section.trust.dx-band{padding-block:0!important}
 section.trust.dx-band>.wrap.in{max-width:none!important;width:100%;margin:0!important;padding:0!important;display:grid!important;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:0!important;align-items:stretch}
 section.trust.dx-band>.wrap.in>figure.ph.port{margin:0!important;height:100%;min-height:480px;max-height:none;border-radius:0!important;overflow:hidden}
 section.trust.dx-band>.wrap.in>figure.ph.port img{width:100%;height:100%;object-fit:cover;border-radius:0!important}
 section.trust.dx-band>.wrap.in>.t{padding:var(--dx-s4) clamp(32px,6vw,96px)!important;align-self:center;max-width:720px}
 section.trust.dx-band>.wrap.in>:not(figure):not(.t){grid-column:1/-1;padding-inline:clamp(32px,6vw,96px)}}
/* P5-RUN: home hero 600-899 stacked (no overlay; <600 and >=900 untouched) */
@media (min-width:600px) and (max-width:899px){
 section.hero{min-height:0!important}
 section.hero>.wrap{display:flex!important;flex-direction:column;align-items:stretch}
 section.hero>.wrap>*:not(.ov){grid-column:auto!important;grid-row:auto!important}
 section.hero>.wrap>.box{order:1;position:static!important;width:100%;min-height:0!important;height:auto!important;margin:0!important;transform:none!important}
 section.hero>.wrap>.box>.ph{position:static!important;width:100%;aspect-ratio:16/9;height:auto!important;overflow:hidden;margin:0!important;transform:none!important}
 section.hero>.wrap>.box>.ph picture,section.hero>.wrap>.box>.ph img{position:static!important;display:block;width:100%!important;height:100%!important;object-fit:cover;transform:none!important}
 section.hero>.wrap>.txt{order:2;position:static!important;display:block!important;margin:24px 0 0!important;inset:auto!important;transform:none!important}
 section.hero>.wrap>.txt *{position:static!important;transform:none!important}
 section.hero>.wrap>.txt>div{margin:0!important}
 section.hero h1.home-h1,section.hero .home-intro{position:static!important;transform:none!important;margin-inline:0!important}
 section.hero>.wrap>.dx-hero-auth{order:3;position:static!important;display:flex!important;align-items:flex-start;gap:24px;margin:24px 0 0!important;transform:none!important}
 section.hero>.wrap>.dx-hero-auth .dx-hero-auth__ph{flex:0 0 160px;width:160px;position:relative}
 section.hero>.wrap>.dx-hero-auth [class^="dx-hero-auth__"]:not(.dx-hero-auth__ph){position:static!important;transform:none!important}
 section.hero>.wrap>.dx-hero-auth .dx-hero-auth__copy{margin-top:0!important;flex:1 1 auto;min-width:0}
 section.hero>.wrap>.chips{order:4;margin-top:24px}
 section.hero>.wrap>.search{order:0}
 section.hero .ov,section.hero>.wrap>.ov,html[data-theme="b"] main .hero .ov{display:none}
}

/* P6-FIX2: occupancy — lead-split feature row + now-grid count-aware columns. Hub P6-SLOT kept. CSS only. */
/* «מה מכינים עכשיו»: static markup has 4 evening-slot cards in [data-now-dynamic]; js/now-cooking.js replaces that slot with the current Asia/Jerusalem time-slot from /js/now-cooking-data.json (e.g. 3 items). Selectors count rendered >li, which after JS is the visible set. */
@media (min-width:960px){
 section.latest .lead-split{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:auto auto!important;column-gap:40px;row-gap:44px;align-items:start!important}
 section.latest .lead-split .side-list{display:contents!important}
 section.latest .lead-split .card.lead{grid-column:1 / -1!important;grid-row:1!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;align-items:center!important;height:auto!important;padding:0}
 section.latest .lead-split .card.lead>img,section.latest .lead-split .card.lead>.ph,section.latest .lead-split .card.lead>picture{grid-column:1;grid-row:1 / span 2;width:100%;margin:0!important;aspect-ratio:4/5}
 section.latest .lead-split .card.lead .meta{grid-column:2;grid-row:1;align-self:end}
 section.latest .lead-split .card.lead h3{grid-column:2;grid-row:2;align-self:start;margin-block:0}
 section.latest .side-list li:nth-child(1),section.latest .side-list li:nth-child(2),section.latest .side-list li:nth-child(3){grid-column:auto!important;grid-row:auto!important}
 section.latest .side-list li:nth-child(3) .card .ph{aspect-ratio:4/5!important}
}
@media (min-width:600px) and (max-width:959px){
 section.latest .lead-split{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:auto!important;gap:28px;align-items:start!important}
 section.latest .lead-split .side-list{display:contents!important}
 section.latest .lead-split .card.lead{grid-column:1 / -1!important;grid-row:1!important;display:block!important;height:auto!important}
 section.latest .lead-split li,section.latest .lead-split li>a{grid-template-columns:none!important;display:block}
 section.latest .side-list li{grid-column:auto;grid-row:auto;border:0;margin:0;padding:0;min-width:0}
 section.latest .side-list .card{display:block;padding:0}
 section.latest .side-list .card .ph,section.latest .side-list .ph{flex:none;width:100%!important;max-width:none;aspect-ratio:4/5;margin:0 0 14px}
 section.latest .side-list li:nth-child(3) .card .ph{aspect-ratio:4/5!important}
 section.latest .lead-split:has(> .side-list > li:nth-child(1)):not(:has(> .side-list > li:nth-child(2))) > .side-list > li:last-child,
 section.latest .lead-split:has(> .side-list > li:nth-child(3)):not(:has(> .side-list > li:nth-child(4))) > .side-list > li:last-child,
 section.latest .lead-split:has(> .side-list > li:nth-child(5)):not(:has(> .side-list > li:nth-child(6))) > .side-list > li:last-child{grid-column:1 / -1}
}
@media (min-width:801px){
 .now-cooking ul.now-grid:has(>li:nth-child(1)):not(:has(>li:nth-child(2))){grid-template-columns:repeat(1,minmax(0,1fr))!important}
 .now-cooking ul.now-grid:has(>li:nth-child(2)):not(:has(>li:nth-child(3))){grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .now-cooking ul.now-grid:has(>li:nth-child(3)):not(:has(>li:nth-child(4))){grid-template-columns:repeat(3,minmax(0,1fr))!important}
 .now-cooking ul.now-grid:has(>li:nth-child(5)):not(:has(>li:nth-child(6))){grid-template-columns:repeat(6,minmax(0,1fr))!important}
 .now-cooking ul.now-grid:has(>li:nth-child(5)):not(:has(>li:nth-child(6)))>li:nth-child(-n+3){grid-column:span 2}
 .now-cooking ul.now-grid:has(>li:nth-child(5)):not(:has(>li:nth-child(6)))>li:nth-child(n+4){grid-column:span 3}
 .now-cooking ul.now-grid:has(>li:nth-child(6)):not(:has(>li:nth-child(7))){grid-template-columns:repeat(3,minmax(0,1fr))!important}
 .now-cooking ul.now-grid:has(>li:nth-child(7)):not(:has(>li:nth-child(8))){grid-template-columns:repeat(4,minmax(0,1fr))!important}
 .now-cooking ul.now-grid:has(>li:nth-child(7)):not(:has(>li:nth-child(8)))>li:first-child{grid-column:span 2}
 .now-cooking ul.now-grid:has(>li:nth-child(7)):not(:has(>li:nth-child(8)))>li:first-child>a{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:12px}
 .now-cooking ul.now-grid:has(>li:nth-child(7)):not(:has(>li:nth-child(8)))>li:first-child img{aspect-ratio:4/5;width:100%;height:auto;object-fit:cover}
 .now-cooking ul.now-grid:has(>li:nth-child(9)):not(:has(>li:nth-child(10))){grid-template-columns:repeat(3,minmax(0,1fr))!important}
 .now-cooking ul.now-grid:has(>li:nth-child(10)):not(:has(>li:nth-child(11)))>li:nth-last-child(-n+2){grid-column:span 2}
 .now-cooking ul.now-grid:has(>li:nth-child(11)):not(:has(>li:nth-child(12)))>li:first-child{grid-column:span 2}
}
@media (max-width:800px){
 .now-cooking ul.now-grid:has(>li:nth-child(1)):not(:has(>li:nth-child(2)))>li:last-child,
 .now-cooking ul.now-grid:has(>li:nth-child(3)):not(:has(>li:nth-child(4)))>li:last-child,
 .now-cooking ul.now-grid:has(>li:nth-child(5)):not(:has(>li:nth-child(6)))>li:last-child,
 .now-cooking ul.now-grid:has(>li:nth-child(7)):not(:has(>li:nth-child(8)))>li:last-child,
 .now-cooking ul.now-grid:has(>li:nth-child(9)):not(:has(>li:nth-child(10)))>li:last-child,
 .now-cooking ul.now-grid:has(>li:nth-child(11)):not(:has(>li:nth-child(12)))>li:last-child{grid-column:1 / -1}
}

/* P6-FIX3: lead titles larger on feature panels. CSS only. */
@media (min-width:960px){
 .lead-split .card.lead h3{font-size:clamp(1.5rem,2.2vw,2rem)!important;line-height:1.25!important;font-weight:700}
 .lead-split .card.lead .meta,.lead-split .card.lead .txt,.lead-split .card.lead h3{padding-inline:clamp(24px,4vw,56px)!important}
 .now-cooking ul.now-grid:has(>li:nth-child(7)):not(:has(>li:nth-child(8)))>li:first-child h3{font-size:1.375rem;font-weight:700}
}

/* P6-ORDER */
header.r-head{
  display:flex;
  flex-direction:column;
}
header.r-head>*{order:9}
header.r-head>.kicker{order:1}
header.r-head>.bc{order:2}
header.r-head>h1{order:3}
header.r-head>.dx-p4-byline{order:4}
header.r-head>.dx-p4-facts{order:5}
header.r-head>figure.r-hero{order:6}
header.r-head>.dx-p4-jump{order:7;align-self:flex-start}
header.r-head>.r-intro{order:8}

header.r-head>.dx-p4-facts{margin-bottom:0}
header.r-head>.r-intro>:first-child{margin-top:0}
header.r-head>.r-intro>:last-child{margin-bottom:0}

/* P6-ORDER-TAG */ header.r-head>.r-tag{order:8}header.r-head>.r-intro{order:9}header.r-head>*:not(.kicker):not(.bc):not(h1):not(.dx-p4-byline):not(.dx-p4-facts):not(.r-hero):not(.dx-p4-jump):not(.r-intro):not(.r-tag){order:10}
