/* Dynamic museum-experience layer — intentionally loaded after base styles. */
:root{
  --ink-deep:#100d0a;
  --museum-gold:#d6a85f;
  --museum-copper:#a65534;
  --museum-blue:#6c8f99;
  --museum-paper:#f4ecdf;
  --museum-shadow:0 24px 70px rgba(37,25,14,.14);
}

html{scroll-padding-top:128px}
html,body{max-width:100%;overflow-x:clip}
body{position:relative}

/* Reading progress */
.page-progress{position:fixed;z-index:120;top:0;inset-inline:0;height:3px;pointer-events:none;background:rgba(255,255,255,.07)}
.page-progress>span{display:block;width:0;height:100%;background:linear-gradient(90deg,var(--gold),#f2d7a1,var(--rust));box-shadow:0 0 18px rgba(219,177,103,.45);transform-origin:0 50%}
html[dir="rtl"] .page-progress>span{transform-origin:100% 50%}

/* Hero: cinematic motion and depth */
.hero{min-height:min(900px,94svh);isolation:isolate}
.hero-media{transform:scale(1.07) translate3d(0,var(--hero-shift,0px),0);filter:saturate(.83) contrast(1.05);will-change:transform;transition:filter .6s ease}
.hero::before{content:"";position:absolute;z-index:1;inset:-20%;pointer-events:none;background:
  radial-gradient(circle at 72% 24%,rgba(217,177,109,.22),transparent 18%),
  radial-gradient(circle at 10% 85%,rgba(41,85,91,.26),transparent 25%);mix-blend-mode:screen;animation:heroGlow 12s ease-in-out infinite alternate}
.hero-overlay{z-index:2;background:linear-gradient(180deg,rgba(12,10,8,.08) 0%,rgba(13,10,8,.2) 35%,rgba(13,10,8,.82) 88%,#15100c 100%)}
.hero-content{z-index:3}
.hero h1{letter-spacing:-.055em;text-shadow:0 18px 55px rgba(0,0,0,.38)}
.hero-deck{max-width:780px}
.hero-stats>div{position:relative;overflow:hidden;backdrop-filter:blur(10px);background:linear-gradient(135deg,rgba(255,255,255,.09),rgba(255,255,255,.035));border:1px solid rgba(255,255,255,.13);padding:1rem 1.1rem;border-radius:14px}
.hero-stats>div::after{content:"";position:absolute;width:72px;height:72px;border-radius:50%;inset-inline-end:-28px;bottom:-36px;background:rgba(218,185,130,.13)}
.hero-scroll-cue{display:flex;align-items:center;gap:.75rem;position:absolute;z-index:4;inset-inline-end:max(20px,calc((100vw - 1200px)/2));bottom:1.35rem;color:#e7ded2;text-decoration:none;font-size:.72rem;text-transform:uppercase;letter-spacing:.15em}
.hero-scroll-cue i{display:grid;place-items:center;width:34px;height:34px;border:1px solid rgba(255,255,255,.36);border-radius:50%;font-style:normal;animation:cueBob 1.8s ease-in-out infinite}
@keyframes heroGlow{to{transform:translate3d(2%,1%,0) scale(1.04);opacity:.72}}
@keyframes cueBob{50%{transform:translateY(5px)}}

/* Chapter chooser */
.explore-deck{padding:4.4rem 0 4.8rem;background:#15100c;color:#f6efe6;overflow:hidden;position:relative}
.explore-deck::before{content:"";position:absolute;inset:0;opacity:.18;background-image:linear-gradient(rgba(255,255,255,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.045) 1px,transparent 1px);background-size:36px 36px;mask-image:linear-gradient(to bottom,transparent,#000 25%,#000 85%,transparent)}
.explore-deck .container{position:relative}
.explore-deck-head{display:flex;justify-content:space-between;align-items:end;gap:2rem;margin-bottom:1.8rem}
.explore-deck h2{font:500 clamp(2.5rem,5vw,4.7rem)/.98 Georgia,serif;margin:.35rem 0 0;max-width:780px}
html[dir="rtl"] .explore-deck h2{font-family:Tahoma,Arial,sans-serif;line-height:1.15}
.explore-deck-head>p{max-width:430px;color:#bdb3a7;margin:0}
.chapter-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.8rem}
.chapter-card{position:relative;min-height:190px;padding:1.2rem;display:flex;flex-direction:column;justify-content:space-between;overflow:hidden;text-decoration:none;color:#f7f1e9;border:1px solid rgba(255,255,255,.12);border-radius:18px;background:linear-gradient(145deg,rgba(255,255,255,.08),rgba(255,255,255,.025));transition:transform .35s cubic-bezier(.2,.8,.2,1),background .35s,border-color .35s;isolation:isolate}
.chapter-card::before{content:"";position:absolute;z-index:-1;width:160px;height:160px;inset-inline-end:-54px;bottom:-70px;border:1px solid rgba(228,194,135,.24);border-radius:50%;box-shadow:0 0 0 22px rgba(228,194,135,.04),0 0 0 44px rgba(228,194,135,.025);transition:transform .45s ease}
.chapter-card:nth-child(3n+2)::before{border-radius:0;transform:rotate(28deg)}
.chapter-card:nth-child(3n)::before{border-radius:50% 50% 8px 8px}
.chapter-card:hover,.chapter-card:focus-visible{transform:translateY(-7px);background:linear-gradient(145deg,rgba(214,168,95,.18),rgba(255,255,255,.04));border-color:rgba(230,191,123,.36)}
.chapter-card:hover::before{transform:scale(1.12) rotate(7deg)}
.chapter-card:nth-child(3n+2):hover::before{transform:scale(1.12) rotate(36deg)}
.chapter-no{font-size:.66rem;letter-spacing:.18em;color:#d7ba86;font-weight:800}
.chapter-card strong{font:500 1.4rem/1.15 Georgia,serif;max-width:95%}
html[dir="rtl"] .chapter-card strong{font-family:Tahoma,Arial,sans-serif;line-height:1.35}
.chapter-card em{font-style:normal;color:#bcb2a5;font-size:.72rem}
.chapter-arrow{align-self:flex-end;display:grid;place-items:center;width:35px;height:35px;border-radius:50%;background:rgba(255,255,255,.08);font-size:1rem;transition:transform .3s}
.chapter-card:hover .chapter-arrow{transform:translateX(4px)}
html[dir="rtl"] .chapter-card:hover .chapter-arrow{transform:translateX(-4px)}

/* Floating chapter dots */
.chapter-dots{position:fixed;z-index:65;top:50%;inset-inline-end:18px;transform:translateY(-50%);display:flex;flex-direction:column;gap:.45rem;padding:.65rem .5rem;border-radius:999px;background:rgba(19,15,12,.66);border:1px solid rgba(255,255,255,.12);backdrop-filter:blur(12px);box-shadow:0 12px 40px rgba(0,0,0,.18)}
.chapter-dot{position:relative;width:10px;height:10px;border-radius:50%;background:#82786c;border:0;padding:0;cursor:pointer;transition:.2s}
.chapter-dot::after{content:attr(data-label);position:absolute;white-space:nowrap;top:50%;inset-inline-end:18px;transform:translateY(-50%) translateX(4px);background:#18130f;color:#f1e8dc;padding:.38rem .55rem;border-radius:7px;font-size:.68rem;opacity:0;pointer-events:none;transition:.18s}
.chapter-dot:hover::after,.chapter-dot:focus-visible::after{opacity:1;transform:translateY(-50%) translateX(0)}
.chapter-dot.active{height:24px;border-radius:999px;background:var(--gold)}

/* Museum rails: reduce page length and encourage exploration */
.rail-shell{position:relative}
.rail-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:.45rem;margin:.7rem 0 .8rem}
.rail-toolbar .rail-hint{margin-inline-end:auto;font-size:.7rem;text-transform:uppercase;letter-spacing:.12em;color:#807568;font-weight:800}
.rail-button{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;border:1px solid rgba(30,23,18,.16);background:rgba(255,255,255,.66);color:#201913;cursor:pointer;font-size:1.15rem;transition:.2s;box-shadow:0 5px 18px rgba(30,21,12,.06)}
.rail-button:hover:not(:disabled){transform:translateY(-2px);background:#fff;border-color:rgba(30,23,18,.3)}
.rail-button:disabled{opacity:.3;cursor:default}
.midnight .rail-button,.sources-section .rail-button{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.16);color:#fff;box-shadow:none}
.midnight .rail-button:hover:not(:disabled),.sources-section .rail-button:hover:not(:disabled){background:rgba(255,255,255,.14)}
.midnight .rail-hint,.sources-section .rail-hint{color:#aaa196}

.timeline,.feature-grid.three,.ruler-grid,.topic-grid,.legacy-grid,.az-grid,.source-grid{
  display:grid!important;
  grid-auto-flow:column;
  grid-template-columns:none!important;
  grid-auto-columns:minmax(285px,31%);
  gap:1rem!important;
  overflow-x:auto;
  max-width:100%;
  contain:inline-size;
  overscroll-behavior-inline:contain;
  scroll-snap-type:inline mandatory;
  scroll-padding-inline:2px;
  padding:.25rem .15rem 1.1rem;
  scrollbar-width:none;
  border-top:0;
}
.timeline::-webkit-scrollbar,.feature-grid.three::-webkit-scrollbar,.ruler-grid::-webkit-scrollbar,.topic-grid::-webkit-scrollbar,.legacy-grid::-webkit-scrollbar,.az-grid::-webkit-scrollbar,.source-grid::-webkit-scrollbar{display:none}
.timeline>* ,.feature-grid.three>* ,.ruler-grid>* ,.topic-grid>* ,.legacy-grid>* ,.az-grid>* ,.source-grid>*{scroll-snap-align:start}

.timeline-item{display:block!important;min-height:270px;padding:1.45rem!important;border:1px solid var(--line)!important;border-radius:16px;background:#fff;box-shadow:0 8px 28px rgba(42,31,19,.055);transition:opacity .25s,transform .25s,box-shadow .25s!important}
.timeline-item:hover{transform:translateY(-4px);box-shadow:var(--museum-shadow)}
.timeline-item time{display:inline-flex;margin-bottom:1.4rem;padding:.35rem .55rem;border-radius:999px;background:#efe3d0;color:#78503a;font-weight:800;font-size:.72rem}
.timeline-item h3{font-size:1.55rem!important;margin:.1rem 0 .7rem!important}
.timeline-item p{grid-column:auto!important;color:#665d53}
.timeline-item.hidden{display:none!important}

.feature-grid.three>.feature-card{min-height:245px;border-radius:18px;box-shadow:0 12px 35px rgba(40,29,17,.07);transform:translateZ(0)}
.feature-grid.three>.feature-card:hover{transform:translateY(-5px)}
.ruler-grid>article{min-height:240px;border-radius:18px;transition:transform .25s,box-shadow .25s}
.ruler-grid>article:hover{transform:translateY(-5px);box-shadow:var(--museum-shadow)}
.topic-grid>article{min-height:245px;border-radius:18px;transition:transform .25s,box-shadow .25s}
.topic-grid>article:hover{transform:translateY(-5px);box-shadow:var(--museum-shadow)}
.legacy-grid>article{min-height:260px;border:1px solid var(--line)!important;border-radius:18px;box-shadow:0 12px 35px rgba(42,31,18,.06)}
.az-grid{grid-auto-columns:minmax(230px,23%)}
.az-grid>article{min-height:220px;border-radius:18px;transition:transform .25s,background .25s,box-shadow .25s}
.az-grid>article:hover{transform:translateY(-5px);background:#fff7ea;box-shadow:0 18px 45px rgba(55,38,18,.1)}
.source-grid{grid-auto-columns:minmax(340px,42%)}
.source-grid>a{min-height:175px}

/* A-Z scrubber */
.az-scrubber{display:flex;gap:.28rem;overflow-x:auto;max-width:100%;overscroll-behavior-inline:contain;padding:.15rem 0 .65rem;margin-top:-.55rem;margin-bottom:.25rem;scrollbar-width:none}
.az-scrubber::-webkit-scrollbar{display:none}
.az-scrubber button{flex:0 0 auto;width:32px;height:32px;border-radius:9px;border:1px solid rgba(30,24,18,.12);background:rgba(255,255,255,.55);font-weight:800;font-size:.72rem;color:#695b4b;cursor:pointer;transition:.18s}
.az-scrubber button:hover,.az-scrubber button.active{background:#19130f;color:#f5e8d4;border-color:#19130f;transform:translateY(-2px)}

/* More sculptural major chapter blocks */
.section{position:relative}
.section:not(.sand):not(.midnight):not(.sources-section)::after{content:"";position:absolute;z-index:-1;width:34vw;height:34vw;max-width:520px;max-height:520px;border:1px solid rgba(116,83,52,.055);border-radius:50%;inset-inline-end:-17vw;top:10%;box-shadow:0 0 0 55px rgba(116,83,52,.018),0 0 0 110px rgba(116,83,52,.012)}
.monument-grid,.artifact-layout,.route-card,.split-panel{border-radius:24px}
.monument-photo,.artifact-image{overflow:hidden;border-radius:20px;box-shadow:0 25px 80px rgba(28,20,13,.18)}
.monument-photo img,.artifact-image img{display:block;transition:transform .7s cubic-bezier(.2,.7,.1,1),filter .7s;cursor:zoom-in}
.monument-photo:hover img,.artifact-image:hover img{transform:scale(1.035);filter:contrast(1.04) saturate(1.05)}
.abraham-section{overflow:hidden}
.abraham-section::before{content:"";position:absolute;width:520px;height:520px;inset-inline-end:-170px;top:80px;border:1px solid rgba(219,181,114,.14);border-radius:50%;box-shadow:0 0 0 80px rgba(219,181,114,.025),0 0 0 160px rgba(219,181,114,.018);pointer-events:none}
.route-card{box-shadow:0 25px 70px rgba(45,29,15,.09)}

/* Reveal effects applied progressively by JS */
.reveal-ready{opacity:0;transform:translateY(22px);transition:opacity .65s ease,transform .65s cubic-bezier(.2,.75,.2,1)}
.reveal-ready.revealed{opacity:1;transform:none}

/* Lightbox */
.lightbox{position:fixed;z-index:200;inset:0;display:grid;place-items:center;padding:3rem;background:rgba(7,6,5,.91);backdrop-filter:blur(14px);opacity:0;visibility:hidden;transition:.25s}
.lightbox.open{opacity:1;visibility:visible}
.lightbox img{max-width:min(1200px,92vw);max-height:82vh;object-fit:contain;border-radius:10px;box-shadow:0 35px 100px rgba(0,0,0,.45);transform:scale(.96);transition:.3s}
.lightbox.open img{transform:scale(1)}
.lightbox-close{position:absolute;top:22px;inset-inline-end:24px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.08);color:#fff;border-radius:999px;padding:.62rem .9rem;cursor:pointer}
.lightbox-caption{position:absolute;bottom:1.3rem;left:50%;transform:translateX(-50%);width:min(860px,85vw);text-align:center;color:#cfc5b9;font-size:.78rem}

/* Cursor/interaction affordances */
@media (hover:hover) and (pointer:fine){
  .feature-card,.ruler-grid article,.topic-grid article,.legacy-grid article,.az-grid article{will-change:transform}
}

@media(max-width:1100px){
  .chapter-cards{grid-template-columns:repeat(2,1fr)}
  .timeline,.feature-grid.three,.ruler-grid,.topic-grid,.legacy-grid,.az-grid,.source-grid{grid-auto-columns:minmax(290px,46%)}
  .source-grid{grid-auto-columns:minmax(330px,62%)}
  .chapter-dots{display:none}
}

@media(max-width:720px){
  html{scroll-padding-top:110px}
  .hero{min-height:88svh}
  .hero h1{font-size:clamp(5.8rem,31vw,9rem)}
  .hero-stats{display:grid;grid-template-columns:1fr 1fr;gap:.55rem}
  .hero-stats>div{padding:.75rem}
  .hero-scroll-cue{display:none}
  .explore-deck{padding:3.5rem 0}
  .explore-deck-head{display:block}
  .explore-deck-head>p{margin-top:1rem}
  .chapter-cards{display:grid;grid-auto-flow:column;grid-template-columns:none;grid-auto-columns:78vw;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:.9rem;scrollbar-width:none}
  .chapter-cards::-webkit-scrollbar{display:none}
  .chapter-card{scroll-snap-align:center;min-height:170px}
  .timeline,.feature-grid.three,.ruler-grid,.topic-grid,.legacy-grid,.az-grid,.source-grid{grid-auto-columns:84vw;gap:.75rem!important;margin-inline:calc((100vw - min(100% - 40px,1200px))/ -2);padding-inline:20px 20vw}
  .rail-toolbar{margin-top:.4rem}
  .rail-hint{font-size:.62rem!important}
  .timeline-item{min-height:250px}
  .source-grid>a{min-height:180px}
  .lightbox{padding:1rem}
  .lightbox-caption{bottom:1rem}
}

@media(prefers-reduced-motion:reduce){
  .hero::before,.hero-scroll-cue i{animation:none!important}
  .hero-media{transform:scale(1.03)!important}
  .reveal-ready{opacity:1!important;transform:none!important}
}

/* Abraham chapter tabs: keep the deepest chapter compact and explorable. */
.abraham-tabs{display:flex;gap:.5rem;margin:2rem 0 1.2rem;padding:.38rem;width:max-content;max-width:100%;overflow-x:auto;border-radius:999px;background:#efe2cf;border:1px solid rgba(47,33,20,.1);scrollbar-width:none}
.abraham-tabs::-webkit-scrollbar{display:none}
.abraham-tab{flex:0 0 auto;border:0;border-radius:999px;background:transparent;padding:.72rem 1rem;color:#6f6254;font:800 .74rem/1.1 inherit;cursor:pointer;transition:.22s}
.abraham-tab:hover{background:rgba(255,255,255,.65);color:#241b14}
.abraham-tab[aria-selected="true"]{background:#1a1410;color:#f4e7d4;box-shadow:0 6px 20px rgba(35,24,15,.15)}
.abraham-tab-panel{display:none;animation:panelIn .45s ease both}
.abraham-tab-panel.active{display:block}
.abraham-tab-panel .route-card{margin-top:.5rem;margin-bottom:0}
.abraham-tab-panel .faiths-grid{margin-top:.5rem}
@keyframes panelIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.abraham-tab-panel.active .route{animation:routePulse 2.6s ease-out both}
@keyframes routePulse{from{stroke-dashoffset:90;opacity:.15}to{stroke-dashoffset:0;opacity:1}}
@media(max-width:720px){
  .abraham-tabs{width:100%;border-radius:14px;padding:.3rem}
  .abraham-tab{padding:.7rem .85rem}
  .abraham-tab-panel .evidence-summary,.abraham-tab-panel .faiths-grid{display:grid;grid-auto-flow:column;grid-template-columns:none;grid-auto-columns:82vw;overflow-x:auto;scroll-snap-type:x mandatory;gap:.7rem;scrollbar-width:none;margin-inline:calc((100vw - min(100% - 40px,1200px))/ -2);padding-inline:20px 18vw}
  .abraham-tab-panel .evidence-summary>* ,.abraham-tab-panel .faiths-grid>*{scroll-snap-align:start}
}

/* -----------------------------------------------------------
   Illustrated reconstructions — visual storytelling layer
   ----------------------------------------------------------- */
.illustration-chip{display:inline-flex;align-items:center;gap:.42rem;width:max-content;max-width:100%;padding:.42rem .7rem;border:1px solid rgba(255,255,255,.28);border-radius:999px;background:rgba(18,13,10,.68);backdrop-filter:blur(10px);color:#f7e9d4;font-size:.62rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;box-shadow:0 8px 30px rgba(0,0,0,.13)}
.illustration-chip::before{content:"✦";color:#e5bd75;font-size:.78rem}.illustration-chip.dark{background:#17120f;border-color:#17120f;color:#f5e7d2}
html[dir="rtl"] .illustration-chip{letter-spacing:.025em}

/* Hero: real site photograph in the back, interpretive cut-out in the foreground. */
.hero-illustration{position:absolute;z-index:1;inset-inline-end:-4vw;bottom:7vh;width:min(49vw,720px);pointer-events:none;filter:drop-shadow(0 30px 45px rgba(0,0,0,.35));transform:translate3d(0,calc(var(--hero-shift,0px) * -.22),0);animation:urFloat 7s ease-in-out infinite}
.hero-illustration img{display:block;width:100%;height:auto}.hero-illustration .illustration-chip{position:absolute;inset-inline-end:12%;bottom:6%;opacity:.92}
@keyframes urFloat{0%,100%{translate:0 0}50%{translate:0 -8px}}

/* Reusable illustrated exhibit cards. */
.story-illustration{position:relative;margin:0;border:1px solid rgba(54,38,23,.12);border-radius:24px;overflow:hidden;background:radial-gradient(circle at 70% 20%,#fff4df 0,#ead9bc 52%,#d7c09a 100%);box-shadow:0 22px 65px rgba(56,37,18,.12);isolation:isolate}
.story-illustration::before{content:"";position:absolute;z-index:-1;width:280px;height:280px;border-radius:50%;inset-inline-end:-80px;top:-100px;border:1px solid rgba(90,57,25,.1);box-shadow:0 0 0 38px rgba(90,57,25,.035),0 0 0 76px rgba(90,57,25,.02)}
.story-illustration img{display:block;width:100%;height:100%;max-height:500px;object-fit:contain;object-position:center;padding:1rem 1rem 0;cursor:zoom-in;transition:transform .55s cubic-bezier(.2,.75,.15,1),filter .55s;filter:drop-shadow(0 17px 24px rgba(57,36,15,.13))}
.story-illustration:hover img{transform:scale(1.025) translateY(-3px);filter:drop-shadow(0 22px 30px rgba(57,36,15,.19))}
.story-illustration figcaption{position:absolute;z-index:2;inset-inline:1rem;bottom:1rem;display:grid;gap:.28rem;padding:1rem 1.1rem;border:1px solid rgba(255,255,255,.25);border-radius:14px;background:linear-gradient(135deg,rgba(20,15,11,.91),rgba(34,25,18,.77));backdrop-filter:blur(12px);color:#f8efe3;box-shadow:0 12px 32px rgba(0,0,0,.18)}
.story-illustration figcaption span{font-size:.58rem;font-weight:900;text-transform:uppercase;letter-spacing:.12em;color:#deb977}.story-illustration figcaption strong{font:500 1.35rem/1.1 Georgia,serif}.story-illustration figcaption small{font-size:.72rem;line-height:1.45;color:#d6cdc1}
html[dir="rtl"] .story-illustration figcaption strong{font-family:Tahoma,Arial,"Noto Sans Arabic","Noto Sans Hebrew",sans-serif}
html[dir="rtl"] .story-illustration figcaption span{letter-spacing:.025em}
.market-visual{min-height:420px;height:100%;background:radial-gradient(circle at 65% 20%,#f4dfb9,#cda576 70%,#a97a50)}
.market-visual img{padding:.6rem .2rem 0;max-height:540px}

/* River-trade chapter break. */
.illustrated-interlude{position:relative;overflow:hidden;background:linear-gradient(115deg,#10191d 0%,#17272c 58%,#243e43 100%);color:#f6eee2;border-block:1px solid rgba(255,255,255,.08)}
.illustrated-interlude::after{content:"";position:absolute;inset:0;background:repeating-radial-gradient(ellipse at 10% 120%,transparent 0 24px,rgba(116,186,196,.045) 25px 26px);pointer-events:none}
.interlude-grid{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1.35fr) minmax(260px,.65fr);align-items:center;gap:3rem;min-height:450px;padding-block:2.5rem}
.interlude-art{margin:0;align-self:end}.interlude-art img{display:block;width:100%;max-height:430px;object-fit:contain;filter:drop-shadow(0 22px 26px rgba(0,0,0,.27));cursor:zoom-in;transition:transform .45s}.interlude-art:hover img{transform:translateY(-5px) scale(1.015)}
.interlude-copy{position:relative}.interlude-copy::before{content:"";display:block;width:54px;height:2px;margin-bottom:1.25rem;background:#deb877}.interlude-copy h3{font:500 clamp(2.2rem,4vw,4rem)/.98 Georgia,serif;margin:1rem 0}.interlude-copy p{max-width:34rem;color:#cbd1ce;font-size:1rem;line-height:1.7}
html[dir="rtl"] .interlude-copy h3{font-family:Tahoma,Arial,"Noto Sans Arabic","Noto Sans Hebrew",sans-serif}

/* Archaeology and scribal vignettes: image + museum label, not text overlays. */
.royal-visual,.scribe-visual{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(260px,.85fr);align-items:center;margin:2.6rem 0 2rem;min-height:430px}
.royal-visual img,.scribe-visual img{grid-column:1;grid-row:1;max-height:470px;padding:1rem 0 0 1rem}
.royal-visual figcaption,.scribe-visual figcaption{position:relative;inset:auto;grid-column:2;grid-row:1;margin:1.5rem;padding:1.6rem;background:rgba(255,250,241,.78);border-color:rgba(58,40,23,.12);color:#261d16;box-shadow:0 15px 45px rgba(50,31,15,.08)}
.royal-visual figcaption span,.scribe-visual figcaption span{color:#946340}.royal-visual figcaption strong,.scribe-visual figcaption strong{font-size:1.85rem}.royal-visual figcaption small,.scribe-visual figcaption small{font-size:.82rem;color:#695e53}
.royal-visual{background:radial-gradient(circle at 32% 25%,#2c3946 0,#171c21 55%,#0e1114 100%);border-color:rgba(255,255,255,.1)}
.royal-visual figcaption{background:rgba(18,18,18,.74);border-color:rgba(255,255,255,.12);color:#fff}.royal-visual figcaption span{color:#d9b36e}.royal-visual figcaption small{color:#c8c0b5}
.scribe-visual{margin-top:1.3rem;background:radial-gradient(circle at 30% 15%,#fff7e9,#e1caa4 65%,#c9a875)}

/* The Abraham route stays evidence-led; art is explicitly framed as interpretive. */
.route-illustration{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1.3fr) minmax(250px,.7fr);align-items:center;margin:1.2rem 0 0;background:linear-gradient(135deg,#f8edda,#dfc298);box-shadow:none}
.route-illustration img{grid-column:1;grid-row:1;max-height:430px;padding:.5rem 0 0}
.route-illustration figcaption{position:relative;inset:auto;grid-column:2;grid-row:1;margin:1.2rem;background:rgba(34,24,16,.88)}

/* Let the site's existing lightbox affordance apply consistently. */
.story-illustration img,.interlude-art img{outline-offset:4px}.story-illustration img:focus-visible,.interlude-art img:focus-visible{outline:3px solid #d0a45f}

@media(max-width:1050px){
  .hero-illustration{width:min(56vw,620px);inset-inline-end:-9vw;bottom:9vh;opacity:.82}
  .interlude-grid{grid-template-columns:1fr 1fr;gap:1.5rem}
  .royal-visual,.scribe-visual,.route-illustration{grid-template-columns:1fr 1fr}
}
@media(max-width:720px){
  .hero-illustration{width:98vw;inset-inline-end:-36vw;bottom:27%;opacity:.34;filter:drop-shadow(0 18px 28px rgba(0,0,0,.22));animation:none}.hero-illustration .illustration-chip{display:none}
  .market-visual{min-height:380px}.story-illustration img{max-height:390px;padding:.35rem .25rem 0}.story-illustration figcaption{inset-inline:.65rem;bottom:.65rem;padding:.8rem}.story-illustration figcaption strong{font-size:1.18rem}.story-illustration figcaption small{font-size:.68rem}
  .interlude-grid{grid-template-columns:1fr;gap:.4rem;min-height:auto;padding-block:2rem 3.2rem}.interlude-art{order:2}.interlude-art img{max-height:330px}.interlude-copy{order:1}.interlude-copy h3{font-size:2.4rem}.interlude-copy p{font-size:.9rem}
  .royal-visual,.scribe-visual,.route-illustration{grid-template-columns:1fr;min-height:auto}.royal-visual img,.scribe-visual img,.route-illustration img{grid-column:1;grid-row:1;max-height:360px;padding:.4rem .1rem 0}.royal-visual figcaption,.scribe-visual figcaption,.route-illustration figcaption{grid-column:1;grid-row:2;margin:.65rem;position:relative}.royal-visual figcaption strong,.scribe-visual figcaption strong{font-size:1.4rem}
}
@media(prefers-reduced-motion:reduce){.hero-illustration{animation:none!important}.story-illustration img,.interlude-art img{transition:none!important}}

/* -----------------------------------------------------------
   Multilingual typography hardening
   Prevent tight line boxes, script collisions and narrow-header overflow.
   ----------------------------------------------------------- */
:where(h1,h2,h3,h4){text-wrap:balance}
:where(p,li,dd,dt,small,figcaption,.chapter-card em,.source-grid strong,.source-grid small){overflow-wrap:break-word}

/* Large display faces need a little more leading once they wrap. */
.intro-grid h2,.section h2,.explore-deck h2{line-height:1.12}
.interlude-copy h3{line-height:1.12}
.split-copy h3,.timeline-item h3,.feature-card h3,.artifact-copy h3,.ruler-grid h3,.quote-panel h3,.topic h3,.route-copy h3,.faiths-grid h3,.legacy-grid h3,.method-note h3{line-height:1.2}
.story-illustration figcaption strong{line-height:1.24}

/* Arabic: use Arabic-aware metrics and avoid tracking that can disturb joining. */
html[lang="ar"] body{font-family:"Noto Sans Arabic",Tahoma,Arial,sans-serif;line-height:1.78}
html[lang="ar"] .intro-grid h2,
html[lang="ar"] .section h2,
html[lang="ar"] .explore-deck h2{line-height:1.28}
html[lang="ar"] .interlude-copy h3,
html[lang="ar"] .split-copy h3,
html[lang="ar"] .timeline-item h3,
html[lang="ar"] .feature-card h3,
html[lang="ar"] .artifact-copy h3,
html[lang="ar"] .ruler-grid h3,
html[lang="ar"] .quote-panel h3,
html[lang="ar"] .topic h3,
html[lang="ar"] .route-copy h3,
html[lang="ar"] .faiths-grid h3,
html[lang="ar"] .legacy-grid h3,
html[lang="ar"] .method-note h3{line-height:1.34}
html[lang="ar"] .story-illustration figcaption strong{line-height:1.38}
html[lang="ar"] .abraham-tab{line-height:1.42}

/* Hebrew: protect niqqud and wrapped display lines without making them loose. */
html[lang="he"] body{font-family:"Noto Sans Hebrew",Arial,sans-serif;line-height:1.7}
html[lang="he"] .intro-grid h2,
html[lang="he"] .section h2,
html[lang="he"] .explore-deck h2{line-height:1.22}
html[lang="he"] .interlude-copy h3,
html[lang="he"] .split-copy h3,
html[lang="he"] .timeline-item h3,
html[lang="he"] .feature-card h3,
html[lang="he"] .artifact-copy h3,
html[lang="he"] .ruler-grid h3,
html[lang="he"] .quote-panel h3,
html[lang="he"] .topic h3,
html[lang="he"] .route-copy h3,
html[lang="he"] .faiths-grid h3,
html[lang="he"] .legacy-grid h3,
html[lang="he"] .method-note h3{line-height:1.28}
html[lang="he"] .story-illustration figcaption strong{line-height:1.3}
html[lang="he"] .abraham-tab{line-height:1.34}

/* Never apply Latin display tracking to connected or RTL scripts. */
html[dir="rtl"] .hero h1{letter-spacing:0;line-height:.9}
html[dir="rtl"] .brand strong,
html[dir="rtl"] .brand small,
html[dir="rtl"] .eyebrow,
html[dir="rtl"] .hero-stats dt,
html[dir="rtl"] .chapter-no,
html[dir="rtl"] .card-number,
html[dir="rtl"] .rail-hint,
html[dir="rtl"] .hero-scroll-cue,
html[dir="rtl"] .legacy-kicker,
html[dir="rtl"] .source-grid span,
html[dir="rtl"] .footer-grid h3,
html[dir="rtl"] .illustration-chip{letter-spacing:0}
html[dir="rtl"] .chapter-no,
html[dir="rtl"] .source-grid span,
html[dir="rtl"] .legacy-kicker,
html[dir="rtl"] .footer-grid h3,
html[dir="rtl"] .eyebrow{text-transform:none}

/* Isolate embedded Latin abbreviations when explicitly marked in RTL copy. */
bdi[dir="ltr"]{direction:ltr;unicode-bidi:isolate;display:inline}

/* The smallest phones need a compact header; keep every control on-screen. */
@media(max-width:360px){
  .nav-wrap{width:calc(100% - 24px);gap:.25rem}
  .nav-wrap>.brand{min-width:0;gap:.25rem}
  .nav-wrap>.brand .brand-mark{display:none}
  .nav-wrap>.brand strong{font-size:1rem}
  .language-switcher{margin-inline:0;padding:.12rem;gap:0;flex:0 0 auto}
  .language-switcher a{min-height:28px;padding:.14rem .31rem;font-size:.6rem}
  .menu-button{width:36px;height:36px;min-width:36px;padding:0;display:grid;place-items:center;font-size:0;line-height:1;flex:0 0 36px}
  .menu-button::before{content:"☰";font-size:1rem;line-height:1}
}

@media(max-width:720px){
  .section-heading h2{line-height:1.14}
  html[lang="ar"] .section-heading h2{line-height:1.3}
  html[lang="he"] .section-heading h2{line-height:1.24}
}

/* Keep the hero reconstruction badge fully inside the viewport at tablet widths.
   The artwork intentionally bleeds outside the hero, but its text label must not. */
@media (min-width:721px) and (max-width:1050px){
  .hero-illustration .illustration-chip{inset-inline-end:18%}
}
