/* The Inhabited Open Museum · site styles. Black ground, paper type, coral accent, district colours; IBM Plex Sans Arabic (OFL). */
@font-face { font-family: 'Plex'; font-weight: 400; font-display: swap; src: url(../fonts/IBMPlexSansArabic-Regular.woff2) format('woff2'); }
@font-face { font-family: 'Plex'; font-weight: 600; font-display: swap; src: url(../fonts/IBMPlexSansArabic-SemiBold.woff2) format('woff2'); }
@font-face { font-family: 'Plex'; font-weight: 700; font-display: swap; src: url(../fonts/IBMPlexSansArabic-Bold.woff2) format('woff2'); }
:root {
  --bg: #000; --ink: #FBF6EE; --paper: #E2D1C1; --s2: #CFC3B8; --mu: #968B80; --ac: #EE5E5D; --ln: rgba(251, 246, 238, .16);
  --gut: clamp(16px, 4.5vw, 72px); --card: min(600px, calc(100vw - 2 * var(--gut)));
  --ease: cubic-bezier(.2, .7, .1, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); color: var(--ink); font-family: 'Plex', system-ui, sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-synthesis: none; scroll-behavior: auto; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: var(--bg); }
body.mode-explore, body.mode-project { overflow: hidden; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 3px; border-radius: 4px; }
.skip { position: fixed; top: 8px; right: 8px; z-index: 100; padding: 10px 16px; background: var(--ac); color: #000; border-radius: 99px; transform: translateY(-200%); text-decoration: none; font-weight: 700; }
.skip:focus { transform: none; }

/* type: Arabic display with an English line beneath */
.ar { direction: rtl; text-align: right; margin: 0; }
.en { direction: ltr; text-align: right; margin: 0; }
.d0 { font-weight: 700; font-size: clamp(54px, 9vw, 150px); line-height: 1.12; letter-spacing: -.01em; }
.d1 { font-weight: 700; font-size: clamp(40px, 5.4vw, 84px); line-height: 1.2; letter-spacing: -.01em; }
.d2 { font-weight: 700; font-size: clamp(34px, 4.2vw, 64px); line-height: 1.22; }
.d3 { font-weight: 700; font-size: clamp(30px, 3.2vw, 48px); line-height: 1.25; }
.d4 { font-weight: 700; font-size: clamp(22px, 2.1vw, 32px); line-height: 1.3; }
.d5 { font-weight: 600; font-size: clamp(18px, 1.5vw, 23px); line-height: 1.4; }
.e1 { font-weight: 700; font-size: clamp(22px, 2.6vw, 40px); line-height: 1.12; letter-spacing: -.02em; margin-top: .3em; }
.e-sub { font-weight: 700; font-size: clamp(18px, 1.9vw, 28px); line-height: 1.2; letter-spacing: -.015em; margin-top: .45em; color: var(--ink); }
.e2 { font-weight: 600; font-size: clamp(17px, 1.5vw, 22px); line-height: 1.25; color: var(--ink); margin-top: 4px; }
.e3 { font-weight: 600; font-size: 15px; color: var(--ink); }
.body { font-size: clamp(16px, 1.15vw, 18px); line-height: 1.85; color: var(--ink); margin-top: 18px; }
.body.lg { font-size: clamp(18px, 1.4vw, 21px); }
.body-en { font-size: 14px; line-height: 1.6; color: var(--mu); margin-top: 6px; }
.sm { font-size: 15px; line-height: 1.7; } .xs { font-size: 12px; line-height: 1.45; color: var(--mu); } .b { font-weight: 700; } .mu { color: var(--s2); }
.kc { font-size: 15px; line-height: 1.6; color: var(--ac); }
.lbl { font-weight: 700; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--mu); direction: ltr; }
.ac { color: var(--ac); }
.num { font-weight: 700; color: var(--ac); font-variant-numeric: tabular-nums; }
.num.big { font-size: clamp(36px, 3.5vw, 56px); line-height: 1; }
hr { border: 0; height: 1px; background: var(--ln); margin: 22px 0 6px; }
.kick { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.kick > span { display: flex; flex-direction: column; gap: 2px; }
.kick .kc { font-size: 16px; } .kick .lbl { font-size: 10.5px; }

/* fixed layers */
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; touch-action: none; }
.mode-story #gl { touch-action: pan-y; pointer-events: none; }
.scrim { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(270deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.78) 34%, rgba(0,0,0,.35) 58%, rgba(0,0,0,0) 76%), linear-gradient(0deg, rgba(0,0,0,.6), rgba(0,0,0,0) 22%); transition: opacity .8s var(--ease); }
.mode-explore .scrim { opacity: .0; } .mode-project .scrim { opacity: 1; background: linear-gradient(270deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,0) 40%); }
.grain { position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: .06; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* header */
.top { position: fixed; top: 0; inset-inline: 0; z-index: 30; display: flex; align-items: center; gap: 24px; padding: 18px var(--gut); background: linear-gradient(180deg, rgba(0,0,0,.7), rgba(0,0,0,0)); pointer-events: none; }
.top > * { pointer-events: auto; }
.top::before { content: ''; position: absolute; inset: 0 0 -26px; z-index: -1; background: linear-gradient(180deg, #000 0, rgba(0,0,0,.94) 62%, rgba(0,0,0,0) 100%); opacity: 0; transition: opacity .35s; pointer-events: none; }
body.scrolled.mode-story .top::before { opacity: 1; }
.brand img { width: 118px; height: auto; filter: invert(1); opacity: .95; }
.chapters { display: flex; gap: clamp(10px, 1.6vw, 26px); margin-inline-start: auto; }
.chapters a { text-decoration: none; text-align: center; color: var(--mu); padding-bottom: 7px; border-bottom: 2px solid transparent; transition: color .3s, border-color .3s; display: flex; flex-direction: column; line-height: 1.2; }
.chapters a span { font-size: 13px; font-weight: 600; } .chapters a small { font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; }
.chapters a:hover, .chapters a.on { color: var(--ink); } .chapters a.on { border-color: var(--ac); }
.mode-explore .chapters, .mode-project .chapters { display: none; }
.top-actions { display: flex; gap: 10px; margin-inline-start: auto; }
.mode-story .top-actions { margin-inline-start: 0; }
.btn-ghost { display: inline-flex; flex-direction: column; align-items: center; padding: 8px 16px; border: 1px solid rgba(251,246,238,.3); border-radius: 99px; background: rgba(0,0,0,.45); backdrop-filter: blur(10px); line-height: 1.1; transition: border-color .3s, background .3s; }
.btn-ghost span { font-size: 14px; font-weight: 600; } .btn-ghost small { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--mu); }
.btn-ghost:hover { border-color: var(--ac); }
.btn-try { text-decoration: none; color: var(--ink); border-color: var(--ac); background: rgba(238,94,93,.16); }   /* link to /reimagine/ */
.btn-try:hover { background: rgba(238,94,93,.3); }
.cta.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ac); margin-inline-start: 10px; text-decoration: none; }
@media (max-width: 760px) { .btn-try small { display: none; } .btn-try { padding: 8px 12px; } .cta.ghost { margin-inline-start: 0; } }

/* STORY */
.story { position: relative; z-index: 3; outline: none; }
.mode-explore .story, .mode-project .story { visibility: hidden; opacity: 0; pointer-events: none; position: fixed; inset: 0; overflow: hidden; }
.step { min-height: 100vh; display: flex; align-items: center; padding: 120px var(--gut) 80px; position: relative; }
.card { width: var(--card); opacity: .18; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.card.wide { width: min(980px, calc(100vw - 2 * var(--gut))); }
.card.narrow { width: min(520px, calc(100vw - 2 * var(--gut))); }
.step.active .card, .step.active .tools { opacity: 1; transform: none; }
.fig { margin: 26px 0 0; border-radius: 8px; overflow: hidden; position: relative; border: 1px solid rgba(255,255,255,.14); }
.fig img { width: 100%; height: auto; }
.fig.plain { aspect-ratio: auto; border: 0; background: transparent; } .fig.plain img { object-fit: contain; height: auto; }
.fig figcaption { position: absolute; bottom: 10px; left: 12px; font-size: 9.5px; color: #fff; text-shadow: 0 1px 6px #000; }

/* hero */
.hero { min-height: 100vh; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 0 var(--gut); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; will-change: opacity, transform; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.15) 40%, rgba(0,0,0,.85)); }
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; }
.hero-in { margin-top: 6vh; display: flex; flex-direction: column; align-items: center; }
.hero-in .ar, .hero-in .en { text-align: center; }
.hero .d0 { font-size: clamp(56px, 10.5vw, 168px); white-space: nowrap; text-shadow: 0 4px 60px rgba(0,0,0,.5); }
.hero .e1 { font-size: clamp(26px, 3.6vw, 60px); }
.hero-mark { width: clamp(80px, 11vw, 150px); height: auto; filter: invert(1) drop-shadow(0 0 40px rgba(238,94,93,.6)); margin-bottom: 2vh; animation: spinIn 2.4s var(--ease) both; }
.hero-sub { margin-top: 26px; font-size: clamp(17px, 1.4vw, 24px); color: #fff; } .hero-sube { font-size: 15px; color: var(--mu); margin-top: 2px; }
.hero-foot { position: absolute; bottom: 30px; inset-inline: var(--gut); display: flex; justify-content: space-between; gap: 20px; align-items: center; flex-direction: row-reverse; }
.scroll-cue { position: absolute; bottom: 74px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: var(--mu); letter-spacing: .14em; text-transform: uppercase; }
.scroll-cue i { width: 1px; height: 46px; background: linear-gradient(180deg, var(--ac), transparent); animation: cue 2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@keyframes spinIn { from { transform: rotate(-120deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

.triad { display: flex; align-items: center; gap: 22px; margin-top: 30px; flex-wrap: wrap; }
.triad > div { text-align: center; } .triad .ar, .triad .en { text-align: center; } .triad .en { font-size: 14px; color: var(--s2); }
.triad .plus { width: 30px; height: 30px; color: var(--ac); align-self: center; margin-top: -34px; } .triad .plus svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; display: block; }
.triad > div { display: flex; flex-direction: column; align-items: center; } .triad .disc { width: 64px; height: 64px; margin-bottom: 10px; border-color: rgba(226,209,193,.5); } .triad .disc .ic { width: 34px; height: 34px; color: var(--paper); }
.rows { list-style: none; margin: 28px 0 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 70px 1fr 1.25fr; gap: 22px; align-items: center; padding: 16px 0; border-top: 1px solid var(--ln); }
.rows .num { font-size: 40px; } .rows .r-meas { border-inline-start: 1px solid var(--ln); padding-inline-start: 20px; }
.rows.compact li { grid-template-columns: 40px 1fr; padding: 12px 0; }
.rows .en { color: var(--s2); font-size: 14.5px; } .rows .en.sm { font-size: 12.5px; color: var(--mu); }
.dot { display: inline-flex; width: 32px; height: 32px; border-radius: 50%; background: var(--ac); color: #000; font-weight: 700; align-items: center; justify-content: center; }

/* tools: three full-height cards */
.step[data-step=tools] { padding: 0; flex-direction: column; align-items: stretch; }
.tools { display: grid; grid-template-columns: repeat(3, 1fr); min-height: 100vh; width: 100%; opacity: .2; transition: opacity 1s var(--ease); }
.tool { position: relative; overflow: hidden; border-inline-start: 1px solid rgba(255,255,255,.18); }
.tool img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--fp, 50% 50%); transition: transform 6s var(--ease); }
.step.active .tool img { transform: scale(1.06); }
.tool::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, #000 0%, rgba(0,0,0,.88) 36%, rgba(0,0,0,.08) 66%, rgba(0,0,0,.45) 100%); }
.tool-t { position: absolute; inset-inline: clamp(18px, 2.6vw, 48px); bottom: 8vh; z-index: 1; }
.tool-t .num { font-size: clamp(44px, 5vw, 78px); display: block; line-height: 1; margin-bottom: 12px; }
.tools-head { position: absolute; top: 110px; inset-inline-start: var(--gut); display: flex; flex-direction: column; align-items: flex-start; gap: 2px; z-index: 2; }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 28px; }
.stats > div { border-top: 3px solid var(--ac); padding-top: 8px; }
.stats .big { font-size: clamp(26px, 2.6vw, 40px); color: var(--ink); text-align: right; }
.dlist, .ladder { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 18px; }
.dlist li, .ladder li { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--ln); padding-top: 10px; }
.badge { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; background: var(--dc, var(--ac)); color: #000; font-weight: 700; align-items: center; justify-content: center; margin-bottom: 6px; }
.badge.lg { width: 64px; height: 64px; font-size: 26px; margin: 0; }
.ladder .num { font-size: 28px; }

/* district card */
.district .dbar { display: flex; gap: 6px; margin-bottom: 22px; } .district .dbar i { flex: 1; height: 3px; display: block; }
.kash { white-space: nowrap; font-size: clamp(52px, 6.2vw, 100px); line-height: 1.15; }
.district .fig { aspect-ratio: 21 / 9; }
.district .e1 { margin-top: 10px; } .district .d4 { margin-top: 16px; }
.realm { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 22px; }
.realm li { display: flex; flex-direction: column; padding: 10px 0; border-top: 1px solid color-mix(in srgb, var(--dc) 45%, transparent); }
.realm .kc { font-size: 13px; } .realm .kc .lbl { font-size: 9px; margin-inline-start: 6px; } .realm .ar { font-size: 15px; font-weight: 600; }
.palette { display: flex; gap: 4px; margin-top: 18px; } .palette i { width: 48px; height: 24px; border-radius: 3px; display: block; }

/* rung + before/after */
.rung .kick .ar, .rung .kick .en { display: block; }
.compare { position: relative; aspect-ratio: 16 / 10; margin-top: 10px; border-radius: 8px; overflow: hidden; background: #0b0908; border: 1px solid rgba(255,255,255,.14); }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cmp-a { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.cmp-a::before { content: ''; position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: var(--ac); z-index: 2; }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; direction: ltr; }
.compare:focus-within { outline: 2px solid var(--ac); outline-offset: 3px; }
.chip { position: absolute; z-index: 3; font-size: 12px; line-height: 1; padding: 7px 12px; border-radius: 99px; background: rgba(0,0,0,.66); border: 1px solid rgba(255,255,255,.28); color: #fff; display: flex; gap: 8px; align-items: center; backdrop-filter: blur(8px); pointer-events: none; }
.chip b { font-weight: 700; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--s2); }
.chip.on { background: var(--ac); border-color: var(--ac); color: #000; } .chip.on b { color: #000; }
.cmp-l1 { top: 12px; left: 12px; } .cmp-l2 { top: 12px; right: 12px; }

.rules { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; }
.rules li { display: grid; grid-template-columns: 58px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--ln); align-items: start; }
.rules .num { font-size: 34px; line-height: 1; }
.phases { list-style: none; padding: 0; margin: 30px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.phases li { border-top: 3px solid rgba(238,94,93,.35); padding-top: 14px; transition: border-color .6s, opacity .6s; opacity: .55; }
.phases li.on { border-color: var(--ac); opacity: 1; }
.ph-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }

/* projects grid + CTA */
.pgrid { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-items: start; }
.pcard { display: flex; flex-direction: column; width: 100%; text-align: right; position: relative; gap: 2px; padding-bottom: 6px; border-radius: 8px; transition: transform .4s var(--ease); }
.pcard img { width: 100%; height: auto; aspect-ratio: auto; border-radius: 6px; margin-bottom: 8px; filter: saturate(.9); transition: filter .4s; }
.pcard:hover { transform: translateY(-3px); } .pcard:hover img { filter: saturate(1.1) brightness(1.08); }
.pcard .pnum { position: absolute; top: 8px; right: 8px; }
.pnum { display: inline-flex; min-width: 30px; height: 30px; padding: 0 7px; border-radius: 99px; background: var(--ac); color: #000; font-weight: 700; font-size: 14px; align-items: center; justify-content: center; flex: 0 0 auto; }
.pnum.lg { min-width: 46px; height: 46px; font-size: 19px; }
.cta { display: inline-flex; align-items: center; gap: 18px; margin-top: 36px; padding: 18px 30px; border-radius: 99px; background: var(--ac); color: #000; transition: transform .35s var(--ease), box-shadow .35s; box-shadow: 0 0 0 0 rgba(238,94,93,.5); }
.cta .ar { font-weight: 700; font-size: 22px; } .cta .en { font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.cta .arrow { font-size: 24px; transition: transform .35s var(--ease); }
.cta:hover { transform: translateY(-2px); box-shadow: 0 10px 50px -8px rgba(238,94,93,.7); } .cta:hover .arrow { transform: translateX(-6px); }
.closing { min-height: 100vh; position: relative; display: flex; align-items: flex-end; padding: 0 var(--gut) 10vh; overflow: hidden; }
.closing-bg { position: absolute; inset: 0; z-index: -1; } .closing-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.closing-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, #000 8%, rgba(0,0,0,.35) 55%, rgba(0,0,0,.6)); }
.closing .d0 { white-space: nowrap; font-size: clamp(48px, 9vw, 150px); }
.credit { font-size: 11px; color: var(--mu); margin-top: 40px; letter-spacing: .06em; }
.follow a, .cdw, .p-cdw { text-decoration: none; }
.follow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px; margin-top: 34px; }
.follow a { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); border-bottom: 1px solid var(--ln); padding-bottom: 2px; transition: color .25s, border-color .25s; }
.follow a:hover, .follow a:focus-visible { color: var(--ac); border-color: var(--ac); }

/* Cairo Design Week banner (date-gated by site-config.json) */
.cdw { position: absolute; top: 88px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 2px; width: max-content; max-width: calc(100vw - 2 * var(--gut)); padding: 10px 22px; border-radius: 18px; border: 1px solid rgba(238,94,93,.7); background: rgba(0,0,0,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); text-align: center; animation: cdwIn 1s .6s var(--ease) both; transition: background .25s, border-color .25s; }
.cdw .ar { font-weight: 600; font-size: 15px; color: var(--ink); } .cdw .en { font-size: 12px; color: var(--s2); letter-spacing: .03em; }
.cdw:hover, .cdw:focus-visible { background: rgba(238,94,93,.22); border-color: var(--ac); }
@keyframes cdwIn { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translateX(-50%); } }
.p-cdw { display: flex; flex-direction: column; gap: 2px; margin: 22px 0 6px; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(238,94,93,.6); background: rgba(238,94,93,.08); }
.p-cdw .ar { font-weight: 600; } .p-cdw .en { font-size: 12px; color: var(--s2); }
.p-cdw:hover, .p-cdw:focus-visible { background: rgba(238,94,93,.18); }

/* LABELS over the 3D */
.labels { position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.plabel { position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; transform-origin: 0 0; margin: -15px 0 0 -15px; border-radius: 99px; background: rgba(0,0,0,.62); border: 1px solid rgba(251,246,238,.22); backdrop-filter: blur(8px); white-space: nowrap; opacity: 0; transition: opacity .5s, background .25s, border-color .25s; direction: rtl; }
.labels.show .plabel { opacity: 1; }
.plabel .t { display: flex; flex-direction: column; line-height: 1.15; max-width: 0; overflow: hidden; transition: max-width .45s var(--ease); }
.plabel .ar { font-size: 14px; font-weight: 700; } .plabel .en { font-size: 10.5px; color: var(--s2); text-align: right; }
.plabel.hot, .plabel:hover, .plabel:focus-visible { background: rgba(0,0,0,.85); border-color: var(--ac); z-index: 2; }
.plabel.hot .t, .plabel:hover .t, .plabel:focus-visible .t, .labels.wide .plabel .t { max-width: 260px; }
.labels .hs { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .6s .6s; direction: rtl; margin: -6px 0 0 -6px; }
.labels.hots .hs { opacity: 1; }
.labels .hs i { width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(0,0,0,.55), 0 0 0 5px rgba(238,94,93,.8); }
.labels .hs .ar { font-weight: 700; background: rgba(0,0,0,.7); padding: 3px 8px; border-radius: 4px; } .labels .hs .en { color: var(--s2); font-size: 10px; text-shadow: 0 1px 4px #000; }
.tip { position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; display: flex; flex-direction: column; padding: 7px 12px; border-radius: 6px; background: rgba(0,0,0,.82); border-inline-start: 3px solid var(--ac); opacity: 0; transition: opacity .2s; }
.tip.show { opacity: 1; } .tip .ar { font-weight: 700; font-size: 14px; } .tip .en { font-size: 10.5px; color: var(--s2); }

/* HUD */
.hud { position: fixed; inset: 0; z-index: 6; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-title { position: absolute; top: 90px; inset-inline-end: var(--gut); max-width: 420px; pointer-events: none; text-shadow: 0 2px 20px rgba(0,0,0,.8); }
.hud-h { font-size: clamp(26px, 2.6vw, 40px); font-weight: 700; line-height: 1.2; }
.hud-title .en { color: var(--s2); font-size: 13px; margin-top: 6px; text-align: left; }
.mode-project .hud-title, .mode-project .index, .mode-project .layers { opacity: 0; pointer-events: none; }
.index { position: absolute; top: 90px; inset-inline-start: var(--gut); width: 300px; max-height: calc(100vh - 200px); overflow: auto; padding: 16px; border-radius: 12px; background: rgba(8,6,5,.66); border: 1px solid var(--ln); backdrop-filter: blur(14px); transition: opacity .4s; scrollbar-width: thin; }
.index-head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.index-list { list-style: none; margin: 0; padding: 0; }
.index-list button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-top: 1px solid var(--ln); text-align: right; border-radius: 6px; transition: background .25s; }
.index-list li:first-child button { border-top: 0; }
.index-list button:hover, .index-list button.hot { background: rgba(238,94,93,.14); }
.index-list .t { display: flex; flex-direction: column; flex: 1; line-height: 1.25; } .index-list .ar { font-size: 15px; } .index-list .en { text-align: right; }
.index-list .dk { width: 8px; height: 8px; border-radius: 50%; background: var(--dc); flex: 0 0 auto; }
.compass { position: absolute; bottom: 20px; inset-inline-end: var(--gut); opacity: .8; }

/* PROJECT panel */
.panel { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 20; width: min(500px, 40vw); padding: 86px 34px 40px; overflow-y: auto; background: linear-gradient(270deg, rgba(0,0,0,.94), rgba(0,0,0,.86)); border-inline-end: 1px solid var(--ln); backdrop-filter: blur(18px); transform: translateX(105%); transition: transform .6s var(--ease); outline: none; scrollbar-width: thin; }
.panel.open { transform: none; }
.panel-back { display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 99px; border: 1px solid rgba(251,246,238,.3); margin-bottom: 26px; font-size: 14px; font-weight: 600; transition: border-color .25s; }
.panel-back small { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--mu); } .panel-back:hover { border-color: var(--ac); }
.p-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.dtag { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--dc, var(--paper)); }
.dtag i { width: 12px; height: 12px; border-radius: 50%; background: var(--dc); } .dtag span { color: var(--mu); font-size: 11px; }
.panel .d2 { font-size: clamp(34px, 3vw, 50px); }
.panel .tag { margin-top: 12px; }
.p-hero { display: block; width: 100%; margin-top: 20px; border-radius: 8px; overflow: hidden; }
.p-hero img { width: 100%; height: auto; transition: transform .8s var(--ease); } .p-hero:hover img { transform: scale(1.04); }
.p-sec { display: flex; justify-content: space-between; border-top: 1px solid var(--ln); margin-top: 26px; padding-top: 12px; }
.gal { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gal button { display: block; width: 100%; aspect-ratio: 1; border-radius: 5px; overflow: hidden; }
.gal img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), filter .3s; filter: brightness(.85); } .gal button:hover img { transform: scale(1.07); filter: none; }
.p-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 30px; border-top: 1px solid var(--ln); padding-top: 16px; }
.p-nav button { font-size: 14px; color: var(--s2); padding: 6px 0; } .p-nav button:hover { color: var(--ac); }
.model-status { position: fixed; z-index: 21; bottom: 30px; left: 50%; transform: translateX(calc(-50% - min(250px, 20vw))); display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-radius: 99px; background: rgba(0,0,0,.75); border: 1px solid var(--ln); font-size: 14px; }
.model-status .en { font-size: 11px; color: var(--mu); }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(238,94,93,.25); border-top-color: var(--ac); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.95); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .3s; }
.lightbox.open { opacity: 1; }
.lightbox figure { margin: 0; max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox img { max-width: 92vw; max-height: 80vh; object-fit: contain; opacity: 0; transition: opacity .35s; border-radius: 4px; }
.lightbox img.in { opacity: 1; }
.lightbox figcaption { font-size: 14px; display: flex; gap: 12px; align-items: baseline; } .lightbox figcaption .en { font-size: 11px; color: var(--mu); }
.lb-close, .lb-prev, .lb-next { position: absolute; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(251,246,238,.3); font-size: 26px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.5); transition: border-color .25s; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { border-color: var(--ac); }
.lb-close { top: 22px; left: 22px; } .lb-prev { right: 22px; top: 50%; transform: translateY(-50%); } .lb-next { left: 22px; top: 50%; transform: translateY(-50%); }

/* loader */
.loader { position: fixed; inset: 0; z-index: 90; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; transition: opacity .9s var(--ease); }
body:not(.is-loading) .loader { opacity: 0; pointer-events: none; }
.loader-mark { filter: invert(1); animation: spin 3s linear infinite; margin-bottom: 14px; opacity: .9; }
.loader-t { font-size: 22px; font-weight: 700; text-align: center; } .loader-e { font-size: 12px; color: var(--mu); letter-spacing: .1em; text-transform: uppercase; text-align: center; }
.loader-bar { width: 200px; height: 2px; background: rgba(255,255,255,.12); margin-top: 14px; } .loader-bar i { display: block; height: 100%; width: 0; background: var(--ac); transition: width .3s; }
.noscript { padding: 20vh var(--gut); text-align: center; }
.no-gl .scrim { background: rgba(0,0,0,.6); }

/* responsive */
@media (max-width: 1100px) {
  .chapters a small { display: none; }
  .rows li { grid-template-columns: 50px 1fr; } .rows .r-meas { grid-column: 2; border: 0; padding: 0; }
  .rules { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .chapters { display: none; }
  .top { padding: 12px 16px; } .brand img { width: 96px; }
  .scrim { background: linear-gradient(0deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.7) 45%, rgba(0,0,0,.2) 75%, rgba(0,0,0,.35) 100%); }
  .step { align-items: flex-end; padding: 90px 16px 48px; }
  .card, .card.wide, .card.narrow { width: 100%; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); padding: 20px 18px; border-radius: 14px; }
  .tools { grid-template-columns: 1fr; } .tool { min-height: 80vh; border: 0; border-top: 1px solid rgba(255,255,255,.18); }
  .stats { grid-template-columns: repeat(3, 1fr); row-gap: 16px; }
  .dlist, .ladder { grid-template-columns: repeat(2, 1fr); }
  .realm { grid-template-columns: 1fr; }
  .phases { grid-template-columns: 1fr; }
  .hero .d0 { white-space: normal; } .kash { font-size: clamp(44px, 13vw, 80px); }
  .hero-foot { flex-direction: column; align-items: center; bottom: 18px; } .scroll-cue { display: none; }
  .cdw { top: 64px; width: calc(100vw - 32px); border-radius: 14px; padding: 9px 14px; } .cdw .ar { font-size: 13.5px; } .cdw .en { font-size: 11px; }
  .hud-title { top: 70px; inset-inline: 16px; max-width: none; } .hud-title .en { text-align: right; }
  .index { top: auto; bottom: 74px; inset-inline: 16px; width: auto; max-height: 46vh; transform: translateY(130%); opacity: 0; transition: transform .45s var(--ease), opacity .3s; }
  .index.open { transform: none; opacity: 1; }
  .compass { display: none; }
  .panel { inset-inline: 0; top: auto; width: 100%; max-height: 62vh; padding: 20px 18px 30px; border-radius: 16px 16px 0 0; border: 0; border-top: 1px solid var(--ln); transform: translateY(105%); }
  .panel-back { margin-bottom: 14px; }
  .model-status { transform: translateX(-50%); bottom: auto; top: 80px; }
  .plabel { padding: 4px; } .plabel .ar { font-size: 12.5px; }
  .closing .d0 { white-space: normal; }
}

/* ===================================================================== v2: pictograms, analysis layers, district tags, dossiers */
/* pictograms: the document's 48-unit line set, one stroke weight */
.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; display: block; }
.ic-row { width: 34px; height: 34px; color: var(--ac); margin-bottom: 6px; }
.r-main { display: flex; flex-direction: column; }
.tool-n { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; } .tool-n .num { margin: 0 !important; } .ic-tool { width: 46px; height: 46px; color: var(--paper); }
.badge.pic { color: #000; } .badge.pic .ic { width: 64%; height: 64%; stroke-width: 2.8; }
.dlist .badge { width: 44px; height: 44px; }
.lad-h, .rl-h { display: flex; align-items: center; gap: 10px; } .ic-lad { width: 26px; height: 26px; color: var(--paper); opacity: .85; }
.rl-h { flex-direction: column; align-items: flex-start; gap: 8px; } .ic-rule { width: 28px; height: 28px; color: var(--paper); opacity: .8; }
.ic-kick { width: 40px; height: 40px; color: var(--paper); }
.realm li { position: relative; padding-inline-start: 0; } .ic-realm { width: 26px; height: 26px; color: var(--dc, var(--ac)); margin-bottom: 4px; }
.realm.sm2 { grid-template-columns: repeat(3, 1fr); gap: 0 14px; } .realm.sm2 li { padding: 8px 0; } .realm.sm2 .kc { font-size: 13px; } .realm.sm2 .lbl { font-size: 8.5px; }

/* district: typical axon (alpha cut-out) beside the 3D vignette */
.axpair { display: grid; grid-template-columns: 1.25fr 1fr; gap: 14px; margin-top: 22px; align-items: end; }
.axpair figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.axpair .ax { background: radial-gradient(ellipse at 50% 60%, color-mix(in srgb, var(--dc) 14%, transparent), transparent 70%); border-radius: 8px; }
.axpair .ax-img { width: 100%; height: auto; max-height: 300px; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(0,0,0,.6)); }
.axpair.one { grid-template-columns: 1fr; } .axpair.one .ax-img { max-height: 440px; margin: 0 auto; }
.axpair .vg img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; border: 1px solid rgba(255,255,255,.14); }
.axpair figcaption { display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--s2); border-top: 1px solid color-mix(in srgb, var(--dc) 50%, transparent); padding-top: 6px; }
.axpair figcaption .en { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mu); }
.district .fig { display: none; }   /* the vignette + axon replace the single photo */

/* project cards: dossier size */
.pc-n { font-size: 8.5px; margin-top: 2px; color: var(--mu); }

/* explore HUD: layer panel (left, under the title), legend strip (bottom centre) */
.layers { position: absolute; top: 190px; inset-inline-end: var(--gut); width: 300px; max-height: calc(100vh - 300px); display: flex; flex-direction: column; border-radius: 12px; background: rgba(8,6,5,.72); border: 1px solid var(--ln); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: opacity .4s; overflow: hidden; }
.lay-toggle { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--ln); text-align: right; }
.lay-toggle span { font-weight: 700; font-size: 15px; } .lay-toggle small { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--mu); margin-inline-start: auto; } .lay-toggle .ic { color: var(--ac); width: 22px; height: 22px; }
.lay-body { overflow-y: auto; padding: 6px 10px 12px; scrollbar-width: thin; }
.layers.closed .lay-body { display: none; } .layers.closed .lay-toggle { border-bottom: 0; }
.lay-h { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 6px 6px; color: var(--ac); font-size: 13px; font-weight: 600; }
.lay-h small { font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--mu); font-weight: 700; }
.lay-g + .lay-g { border-top: 1px solid var(--ln); margin-top: 6px; }
.lay-i { width: 100%; display: flex; align-items: center; gap: 11px; padding: 5px 6px; border-radius: 7px; text-align: right; transition: background .2s, color .2s; color: var(--s2); }
.lay-i:hover { background: rgba(238,94,93,.1); color: var(--ink); }
.lay-i .ic { width: 22px; height: 22px; } .lay-i .t { display: flex; flex-direction: column; flex: 1; line-height: 1.2; } .lay-i .ar { font-size: 13.5px; font-weight: 600; } .lay-i .en { font-size: 10px; color: var(--mu); text-align: right; }
.lay-i .ck, .lay-i .rd { width: 15px; height: 15px; border: 1.5px solid var(--mu); border-radius: 4px; flex: 0 0 auto; transition: background .2s, border-color .2s; }
.lay-i .rd { border-radius: 50%; }
.lay-i[aria-pressed=true], .lay-i[aria-checked=true] { color: var(--ink); } .lay-i[aria-pressed=true] .ic, .lay-i[aria-checked=true] .ic { color: var(--ac); }
.lay-i[aria-pressed=true] .ck { background: var(--ac); border-color: var(--ac); box-shadow: inset 0 0 0 2px #000; } .lay-i[aria-checked=true] .rd { background: var(--ac); border-color: var(--ac); box-shadow: inset 0 0 0 3px #000; }
.legend-panel { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 22px; max-width: min(1100px, calc(100vw - 2 * var(--gut) - 120px)); padding: 12px 18px; border-radius: 12px; background: rgba(8,6,5,.72); border: 1px solid var(--ln); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); overflow-x: auto; scrollbar-width: none; pointer-events: auto; }
.legend-panel:empty { display: none; }
.mode-project .legend-panel { opacity: 0; pointer-events: none; }
.lg { flex: 0 0 auto; } .lg + .lg { border-inline-start: 1px solid var(--ln); padding-inline-start: 22px; }
.lg-t { font-size: 12px; font-weight: 700; color: var(--ac); margin-bottom: 6px; white-space: nowrap; } .lg-t span { font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--mu); margin-inline-start: 6px; }
.lg ul { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, auto); gap: 4px 16px; }
.lg li { display: flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12px; } .lg li .en { font-size: 9.5px; color: var(--mu); }
.lg li i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); flex: 0 0 auto; }
.lg li i.ln { height: 4px; width: 18px; border-radius: 2px; } .lg li i.ln.thick { height: 6px; } .lg li i.ln.thin { height: 2px; }
.lg li i.dash { background: repeating-linear-gradient(90deg, var(--c) 0 5px, transparent 5px 8px); }
.lg li i.ring { background: none; border: 2px solid var(--c); border-radius: 50%; } .lg li i.ring.dash { border-style: dashed; }
.lg .ramp { display: grid; grid-template-columns: repeat(3, auto); gap: 2px 18px; font-size: 10px; color: var(--mu); }
.lg .ramp i { grid-column: 1 / -1; height: 8px; width: 180px; border-radius: 4px; background: linear-gradient(90deg, #F2EBDB, #F2B07D, #EE4D4D); }
html[dir=rtl] .lg .ramp i { transform: scaleX(1); }
.mode-project .hud-title, .mode-project .index, .mode-project .layers { opacity: 0; pointer-events: none; }

/* district tags, state-project numbers, places */
.labels .dlabel, .labels .glabel, .labels .place { position: absolute; left: 0; top: 0; opacity: 0; visibility: hidden; transition: opacity .5s; direction: rtl; white-space: nowrap; }
.labels.explore.dl-on .dlabel { opacity: 1; pointer-events: auto; }
.dlabel { display: flex; align-items: center; gap: 9px; padding: 5px 14px 5px 5px; margin: -22px 0 0 -22px; border-radius: 99px; background: rgba(0,0,0,.72); border: 1.5px solid var(--dc); backdrop-filter: blur(8px); cursor: pointer; }
.dlabel .db { width: 34px; height: 34px; border-radius: 50%; background: var(--dc); color: #000; display: flex; align-items: center; justify-content: center; }
.dlabel .db .ic { width: 22px; height: 22px; stroke-width: 2.8; }
.dlabel .t { display: flex; flex-direction: column; line-height: 1.15; } .dlabel .ar { font-size: 15px; font-weight: 700; } .dlabel .en { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--dc); text-align: right; }
.dlabel .ph { display: none; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--pc); }
.labels.ph-on .dlabel { border-color: var(--pc); } .labels.ph-on .dlabel .db { background: var(--pc); } .labels.ph-on .dlabel .ph { display: block; } .labels.ph-on .dlabel .en { display: none; }
.dlabel:hover, .dlabel:focus-visible { background: rgba(0,0,0,.9); z-index: 3; }
.labels.explore.gov-on .glabel { opacity: 1; pointer-events: auto; }
.glabel { display: flex; align-items: center; gap: 8px; margin: -13px 0 0 -13px; }
.glabel .gn { width: 26px; height: 26px; border-radius: 5px; background: #000; border: 2px solid #FBF6EE; color: #FBF6EE; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.glabel .t { display: flex; flex-direction: column; line-height: 1.15; padding: 3px 8px; border-radius: 5px; background: rgba(0,0,0,.78); max-width: 0; overflow: hidden; opacity: 0; transition: max-width .35s var(--ease), opacity .25s; }
.glabel:hover .t, .glabel:focus .t { max-width: 300px; opacity: 1; } .glabel .ar { font-size: 12.5px; font-weight: 600; } .glabel .en { font-size: 9.5px; color: var(--s2); text-align: right; }
.labels.explore .place { opacity: .9; } .place { display: flex; flex-direction: column; align-items: center; transform-origin: 0 0; margin: -14px 0 0 -40px; width: 80px; text-shadow: 0 1px 8px #000; }
.place .ar { font-size: 15px; font-weight: 700; color: #9fe0d6; text-align: center; } .place .en { font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: #7fc9bf; text-align: center; }

/* district card (explore) */
.dcard { position: fixed; z-index: 19; top: 86px; inset-inline-start: var(--gut); width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 120px); overflow-y: auto; padding: 22px 24px 24px; border-radius: 14px; background: rgba(6,5,4,.9); border: 1px solid color-mix(in srgb, var(--dc) 55%, transparent); backdrop-filter: blur(16px); transform: translateY(16px); opacity: 0; transition: transform .45s var(--ease), opacity .35s; scrollbar-width: thin; }
.dcard.open { transform: none; opacity: 1; }
.dcard .dc-x { position: absolute; top: 12px; left: 12px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(251,246,238,.3); font-size: 20px; }
.dcard .dc-x:hover { border-color: var(--ac); } .dcard .badge.lg { width: 54px; height: 54px; } .dcard .sm { margin-top: 14px; }
.mode-project .dcard { display: none; }

/* project panel: hero before/after, facts, chapter list, links */
.p-ba { margin-top: 20px; } .p-ba .compare, .ds-hero .compare, .df.ba .compare { aspect-ratio: auto; margin: 0; }
.p-ba .compare img, .ds-hero .compare img, .df.ba .compare img { object-fit: cover; }
.cap { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin: 8px 0 0; font-size: 13px; color: var(--s2); } .cap .en { font-size: 11px; color: var(--mu); } .cap .lbl { margin-inline-start: auto; font-size: 9px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 16px; margin: 20px 0 0; }
.facts.wide { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: 26px; }
.facts > div { border-top: 2px solid var(--ac); padding-top: 6px; } .facts dt { display: flex; flex-direction: column; } .facts dt .ar { font-size: 11.5px; color: var(--mu); } .facts dt .en { font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mu); text-align: right; }
.facts dd { margin: 4px 0 0; display: flex; flex-direction: column; } .facts dd .ar { font-weight: 700; font-size: 16px; } .facts dd .en { font-size: 11px; color: var(--s2); text-align: right; }
.cta.sm { margin-top: 24px; padding: 13px 22px; gap: 14px; width: 100%; justify-content: space-between; } .cta.sm .ar { font-size: 18px; } .cta.sm .en { font-size: 10.5px; }
.p-ch { list-style: none; padding: 0; margin: 10px 0 0; }
.p-ch button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 7px 4px; border-top: 1px solid var(--ln); text-align: right; border-radius: 6px; transition: background .2s; }
.p-ch li:first-child button { border-top: 0; } .p-ch button:hover { background: rgba(238,94,93,.1); }
.p-ch .th { width: 56px; height: 42px; border-radius: 4px; overflow: hidden; flex: 0 0 auto; background: #15110e; display: flex; align-items: center; justify-content: center; } .p-ch .th img { width: 100%; height: 100%; object-fit: contain; }
.p-ch .th.none .ic { color: var(--mu); }
.p-ch .t { display: flex; flex-direction: column; flex: 1; line-height: 1.25; } .p-ch .ar { font-size: 14.5px; } .p-ch .en { text-align: right; }
.p-ch .cn { display: flex; align-items: center; gap: 6px; color: var(--mu); } .p-ch .cn .num { font-size: 14px; } .p-ch .cn .ic { width: 18px; height: 18px; }
.p-links { display: flex; flex-direction: column; gap: 6px; margin-top: 20px; }
.p-links a { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 9px 12px; border: 1px solid var(--ln); border-radius: 10px; transition: border-color .25s; }
.p-links a:hover { border-color: var(--ac); } .p-links .ic { width: 20px; height: 20px; color: var(--ac); } .p-links .ar { font-size: 14px; font-weight: 600; } .p-links .en { font-size: 10.5px; color: var(--mu); margin-inline-start: auto; }
.p-links.big { flex-direction: row; flex-wrap: wrap; justify-content: center; } .p-links.big a { min-width: 260px; }
.legend.in { display: flex; gap: 14px; font-size: 12px; color: var(--s2); margin-top: 12px; flex-wrap: wrap; }
.legend.in span { display: inline-flex; align-items: center; gap: 6px; } .legend.in i { width: 11px; height: 11px; border-radius: 2px; display: inline-block; } .legend.in em { font-style: normal; color: var(--mu); font-size: 10.5px; }

/* DOSSIER: full-screen editorial story of one project */
.dossier { position: fixed; inset: 0; z-index: 50; background: #000; opacity: 0; transform: translateY(24px); transition: opacity .4s var(--ease), transform .5s var(--ease); display: flex; flex-direction: column; }
.dossier.open { opacity: 1; transform: none; }
body.ds-open #labels, body.ds-open .top { visibility: hidden; }
.ds-bar { flex: 0 0 auto; display: flex; align-items: center; gap: 18px; padding: 12px var(--gut); border-bottom: 1px solid var(--ln); background: rgba(0,0,0,.92); z-index: 2; }
.ds-x { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 99px; border: 1px solid rgba(251,246,238,.3); font-size: 14px; font-weight: 600; flex: 0 0 auto; } .ds-x small { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--mu); } .ds-x:hover { border-color: var(--ac); }
.ds-t { display: flex; align-items: center; gap: 10px; min-width: 0; } .ds-t .ar { font-size: 16px; white-space: nowrap; } .ds-t .en { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-nav { display: flex; gap: 4px; margin-inline-start: auto; overflow-x: auto; scrollbar-width: none; }
.ds-nav a { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 8px; text-decoration: none; color: var(--mu); border-bottom: 2px solid transparent; transition: color .25s, border-color .25s; }
.ds-nav a .ic { width: 18px; height: 18px; } .ds-nav a .num { font-size: 12px; color: inherit; } .ds-nav a:hover, .ds-nav a.on { color: var(--ink); } .ds-nav a.on { border-color: var(--ac); } .ds-nav a.on .ic { color: var(--ac); }
.ds-scroll { flex: 1; overflow-y: auto; outline: none; scroll-behavior: auto; }
.ds-cover { display: grid; grid-template-columns: minmax(320px, 5fr) 7fr; gap: 28px 48px; padding: 56px var(--gut) 40px; align-items: start; }
.ds-ct .d1 { font-size: clamp(40px, 4.6vw, 76px); } .ds-ct .kc { margin-top: 18px; }
.ds-ct .note { margin-top: 18px; border-inline-start: 3px solid var(--ac); padding-inline-start: 12px; }
.ds-hero { position: relative; }
.ds-toc { grid-column: 1 / -1; list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 24px; }
.ds-toc a { display: grid; grid-template-columns: auto auto 1fr; grid-template-rows: auto auto; align-items: center; gap: 0 10px; padding: 12px 0; border-top: 1px solid var(--ln); text-decoration: none; transition: color .2s; }
.ds-toc .num { grid-row: 1 / 3; font-size: 22px; } .ds-toc .ic { grid-row: 1 / 3; width: 26px; height: 26px; color: var(--paper); } .ds-toc .ar { font-weight: 700; font-size: 15px; } .ds-toc .en { font-size: 10.5px; color: var(--mu); text-align: right; }
.ds-toc a:hover .ar { color: var(--ac); }
.ds-ch { padding: 64px var(--gut) 24px; border-top: 1px solid var(--ln); }
.ds-h { display: grid; grid-template-columns: auto minmax(220px, 4fr) 6fr; gap: 18px 36px; align-items: start; margin-bottom: 30px; }
.ds-n { display: flex; flex-direction: column; align-items: center; gap: 10px; } .ds-n .num { font-size: clamp(34px, 3.2vw, 52px); line-height: 1; }
.disc { width: 54px; height: 54px; border-radius: 50%; border: 1.5px solid rgba(251,246,238,.35); display: flex; align-items: center; justify-content: center; } .disc .ic { width: 30px; height: 30px; color: var(--paper); }
.ds-b .body { margin-top: 4px; font-size: clamp(16px, 1.2vw, 19px); } .ds-b .btn-ghost { margin-top: 18px; flex-direction: row; gap: 10px; } .ds-b .btn-ghost .ic { width: 20px; height: 20px; color: var(--ac); }
.ds-m { display: flex; flex-direction: column; gap: 18px; }
.df { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.df > button { display: block; width: 100%; border-radius: 6px; overflow: hidden; background: #0d0b09; border: 1px solid rgba(255,255,255,.1); cursor: zoom-in; }
.df > button img { width: 100%; height: auto; display: block; transition: transform .8s var(--ease); }
.df > button:hover img { transform: scale(1.015); }
.df.dg > button { background: #F3EEE7; padding: 10px; } .df.dg > button img { mix-blend-mode: multiply; }
.df.lead > button { width: auto; max-width: 100%; align-self: center; } .df.lead > button img { width: auto; max-width: 100%; max-height: 86vh; object-fit: contain; }
.df.lead figcaption { align-self: center; max-width: 100%; }
.df figcaption { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13.5px; color: var(--ink); }
.df figcaption .en { font-size: 11.5px; color: var(--mu); } .df .kd { font-size: 8.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ac); padding: 2px 6px; border: 1px solid rgba(238,94,93,.5); border-radius: 99px; }
.df.ba { max-width: 1400px; width: 100%; align-self: center; } .df.ba .compare { border-radius: 6px; }
.ba-row .df.ba .compare { max-height: 78vh; }
.dgrid { display: grid; gap: 18px; align-items: start; } .dgrid.n2 { grid-template-columns: repeat(2, 1fr); } .dgrid.n3 { grid-template-columns: repeat(3, 1fr); }
.dgrid .df > button img { aspect-ratio: auto; max-height: 70vh; object-fit: contain; }
.ds-end { padding: 60px var(--gut) 80px; border-top: 1px solid var(--ln); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.ds-end .credit { text-align: center; }
.lb-c { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; } .lb-c > .ar { font-size: 15px; } .lb-c > .en { font-size: 12px; color: var(--s2); } .lb-p { font-size: 11px; color: var(--mu); }
.lightbox figcaption { max-width: 900px; justify-content: space-between; width: 100%; }

@media (max-width: 1100px) {
  .ds-cover { grid-template-columns: 1fr; } .ds-hero { position: static; }
  .ds-h { grid-template-columns: auto 1fr; } .ds-b { grid-column: 1 / -1; }
  .dgrid.n3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .layers { top: auto; bottom: 12px; inset-inline-start: 16px; inset-inline-end: auto; width: auto; max-width: calc(100vw - 32px); max-height: 60vh; }
  .layers:not(.closed) { inset-inline-end: 16px; }
  .legend-panel { bottom: 12px; left: 16px; right: 150px; transform: none; max-width: none; padding: 8px 12px; }
  .layers:not(.closed) ~ .legend-panel { display: none; }
  .axpair { grid-template-columns: 1fr 1fr; } .realm.sm2 { grid-template-columns: repeat(2, 1fr); }
  .dcard { top: auto; bottom: 0; inset-inline: 0; width: 100%; max-height: 66vh; border-radius: 16px 16px 0 0; }
  .ds-bar { flex-wrap: wrap; gap: 10px; padding: 10px 14px; } .ds-t { display: none; } .ds-nav { width: 100%; margin: 0; }
  .ds-cover { padding: 26px 16px; } .ds-ch { padding: 40px 16px 16px; } .ds-h { gap: 12px 16px; }
  .dgrid.n2, .dgrid.n3 { grid-template-columns: 1fr; }
  .dlabel .t .en { display: none; } .dlabel { padding: 3px 10px 3px 3px; } .dlabel .db { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .card, .tools { opacity: 1 !important; transform: none !important; }
}

/* district tags belong to the masterplan, not to an isolated project */
body.mode-project .dlabel{display:none!important}

/* short desktop screens: the principles list fits under the header band */
@media (min-width: 761px) and (max-height: 980px) {
  .rows li { padding: 11px 0; } .rows .num { font-size: 32px; } .ic-row { width: 28px; height: 28px; margin-bottom: 2px; }
  .step[data-step=principles] .d2 { font-size: clamp(30px, 3.4vw, 52px); }
}

/* project panel sits below the header bar, so the wordmark never lies over its scrolling content */
@media (min-width: 761px) {
  .panel { top: 78px; padding-top: 18px; border-top: 1px solid var(--ln); border-start-end-radius: 14px; }
}
@media (max-width: 760px) {
  .triad { flex-wrap: nowrap; gap: 8px; justify-content: space-between; }
  .triad .disc { width: 52px; height: 52px; } .triad .disc .ic { width: 28px; height: 28px; }
  .triad .plus { width: 20px; height: 20px; margin-top: -40px; flex: 0 0 auto; } .triad .d4 { font-size: 21px; }
}

/* projects: each cover at its own proportions, flowed as a masonry of columns (right to left, as the page reads) */
.pgrid { display: block; columns: 5 150px; column-gap: 12px; }
.pgrid > li { break-inside: avoid; margin-bottom: 14px; }
@media (max-width: 760px) { .pgrid { columns: 2; } }

/* ===================================================================== website only (appended by tools/import-iom.mjs)
   Netlify's free-plan "Powered by Netlify" badge (iframe#nl-badge-frame, bottom-right, about 200x64) is injected at the
   edge. While it is on the page, keep that corner clear. Switching the badge off in Netlify removes the frame, and with it
   every rule below. Source: website/tools/netlify-badge.css */
html:has(#nl-badge-frame) .hero-foot { bottom: 86px; }
html:has(#nl-badge-frame) .scroll-cue { bottom: 136px; }
html:has(#nl-badge-frame) .layers { bottom: 84px; }
html:has(#nl-badge-frame) .panel { padding-bottom: 108px; }
@media (max-width: 760px) {
  html:has(#nl-badge-frame) .hero-foot { bottom: 82px; }
  html:has(#nl-badge-frame) .step { padding-bottom: 96px; }
  html:has(#nl-badge-frame) .layers { bottom: 80px; }
  html:has(#nl-badge-frame) .index { bottom: 138px; }
  html:has(#nl-badge-frame) .panel { padding-bottom: 96px; }
}
