/* ==========================================================================
   العاصمة — Digital Design System  ·  v1.1 (refined)
   One world, three borrowed forms — all taken from the logo, none of them the logo:
     القبة   the segmented dome: markers, timeline nodes, the lead photo's frame
     الشريط  the paper ribbon that wraps the dome and folds into «ع»: the sash, the fold
     المد   the kashida stretch from the brand's posts: figures live inside words
   «حبر وأحمر»: a white page, neutral ink, and the red of the network's own «عاجل» cards for what is urgent.
   Gold is only the dome: the logo, dome marks, figures set on photographs, the Haram on the map.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Color — «حبر وأحمر»: a white page, neutral ink, the network's red; gold for the dome alone.
     Cool greys only — no warm paper tint, so photographs and the red carry all the colour. */
  --bg: #FAFAFB;            /* the page */
  --bg-2: #F0F2F4;          /* alternate sections: a cool grey band */
  --sheet: #FFFFFF;         /* raised surfaces */
  --sunk: #E5E8EB;
  --ink: #121417;
  --ink-2: #383D43;
  --ink-3: #5C626A;
  --rule: rgba(18, 20, 23, .14);
  --rule-strong: rgba(18, 20, 23, .86);
  --accent: #A1383B;        /* the red of Al-Asima's own «عاجل» cards */
  --accent-deep: #7C2A2C;
  --accent-hover: #8A2F32;   /* a red control under the pointer: darker in light, so white text stays clear */
  --accent-ink: #A1383B;    /* red as text on the page (AA) */
  --on-accent: #FFFFFF;
  --dome: #F0A808;          /* the dome: logo, dome marks, figures on photographs */
  --dome-deep: #E8930F;
  --dome-ink: #8A5B00;      /* the dome's gold as figures on the page (large text, AA) */
  --on-dome: #121417;
  --gold: var(--dome); --gold-deep: var(--dome-deep); --gold-ink: var(--dome-ink); --on-gold: var(--on-dome);   /* v1 names */
  --silver: #8E97A3;        /* the ribbon — machine work */
  --silver-soft: rgba(142, 151, 163, .18);
  --paper: #FFFFFF;         /* the sash surface */
  --paper-ink: #121417;
  --fold: #7C2A2C;          /* the sash's underside where it folds */
  --map-bg: #EDEFF1;        /* the printed map */
  --alert: #A1383B;
  --on-alert: #FFFFFF;
  --ok: #2D7A57;
  --scrim: rgba(18, 20, 23, .6);
  --shade: linear-gradient(180deg, rgba(18,20,23,0) 32%, rgba(18,20,23,.86) 100%);
  --night: #121417;         /* only behind photographs and video */
  --night-fg: #FAFAFB;
  --img-edge: rgba(0, 0, 0, .1);   /* hairline edge on photographs */

  /* Type families */
  --f-display: "Noto Kufi Arabic", "Segoe UI", Tahoma, sans-serif;     /* interface: navigation, labels, data */
  --f-head: "Markazi Text", "Noto Naskh Arabic", "Amiri", serif;        /* headlines: a news Naskh */
  --f-read: "Markazi Text", "Noto Naskh Arabic", serif;                  /* reading */
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace; /* coordinates & data only */

  /* Type roles — size / line-height. Arabic needs air: no role below 1.38 */
  /* display 30→53 · h1 27→38 · h2 22→30 · h3 19→24 · h4 17→20 · lead 17→19 · ui 16 · meta 13 (floor) */
  --fs-display: clamp(2.15rem, 1.25rem + 2.6vw, 3.75rem);     --lh-display: 1.32;
  --fs-h1:      clamp(1.95rem, 1.35rem + 1.6vw, 2.75rem);    --lh-h1: 1.34;
  --fs-h2:      clamp(1.6rem, 1.3rem + .9vw, 2.15rem);       --lh-h2: 1.4;
  --fs-h3:      clamp(1.36rem, 1.2rem + .45vw, 1.7rem);      --lh-h3: 1.45;
  --fs-h4:      clamp(1.22rem, 1.14rem + .25vw, 1.42rem);    --lh-h4: 1.5;
  --fs-h5:      1.18rem;                                     --lh-h5: 1.55;
  --fs-lead:    clamp(1.2rem, 1.12rem + .3vw, 1.36rem);      --lh-lead: 1.7;
  --fs-body:    clamp(1.28rem, 1.18rem + .32vw, 1.42rem);    --lh-body: 1.85;   /* Markazi reading */
  --fs-body-sm: 1.3rem;                                      --lh-body-sm: 1.8;
  --fs-ui:      1rem;                                        --lh-ui: 1.75;
  --fs-small:   .9375rem;                                    --lh-small: 1.75;
  --fs-caption: .875rem;                                     --lh-caption: 1.8;
  --fs-meta:    .8125rem;                                    --lh-meta: 1.6;
  --fs-micro:   .78rem;                                      /* Latin digits only (coordinates) */
  /* legacy aliases (pages written against v1.0) */
  --t-mega: var(--fs-display); --t-1: var(--fs-h1); --t-2: var(--fs-h2); --t-3: var(--fs-h3); --t-4: var(--fs-h4);
  --t-read: var(--fs-body); --t-ui: var(--fs-ui); --t-sm: var(--fs-small); --t-meta: var(--fs-meta);

  /* Space — 4px base, two section rhythms */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --sec: clamp(56px, 6.2vw, 96px);
  --sec-tight: clamp(36px, 4.2vw, 60px);

  /* Grid */
  --max: 1360px;
  --gutter: clamp(16px, 2.2vw, 28px);
  --col-gap: clamp(16px, 1.8vw, 24px);
  --split-gap: clamp(28px, 4vw, 64px);

  /* Shape — square by law; the only curves are the dome's */
  --radius: 0;
  --fold-cut: 14px;

  /* Motion */
  --ease: cubic-bezier(0.23, 1, 0.32, 1);          /* strong ease-out: entrances, feedback */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);  /* things travelling on screen */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --d-1: 120ms; --d-2: 220ms; --d-3: 360ms; --d-4: 640ms; --d-5: 1100ms;

  --ribbon-h: 64px;
  --dome-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 22'%3E%3Cdefs%3E%3Cmask id='m'%3E%3Cpath d='M1 22 A19 20.5 0 0 1 39 22 Z' fill='white'/%3E%3Cg fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round'%3E%3Cpath d='M21 1.5 C15 6 12.5 13 12 22'/%3E%3Cpath d='M21 1.5 C24 7 25.5 14 26 22'/%3E%3Cpath d='M4.5 12.5 C14 15.5 27 15.5 36.5 11.5'/%3E%3C/g%3E%3C/mask%3E%3C/defs%3E%3Crect width='40' height='22' fill='black' mask='url%28%23m%29'/%3E%3C/svg%3E");
  --arc-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 22'%3E%3Cpath d='M2.5 21 A17.5 19 0 0 1 37.5 21' fill='none' stroke='black' stroke-width='3'/%3E%3C/svg%3E");
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111315; --bg-2: #0B0C0E; --sheet: #1A1D21; --sunk: #08090A; --night: #08090A; --map-bg: #191C1F;
    --ink: #ECEEF0; --ink-2: #C3C8CE; --ink-3: #969DA6;
    --rule: rgba(236, 238, 240, .14); --rule-strong: rgba(236, 238, 240, .8);
    --accent: #D9585B; --accent-ink: #E88A8C; --accent-deep: #A1383B; --on-accent: #111315; --accent-hover: #E36D70;
    --dome-ink: #F0A808; --silver: #9AA3AF; --silver-soft: rgba(154, 163, 175, .16);
    --paper: #1A1D21; --paper-ink: #ECEEF0; --fold: #A1383B;
    --alert: #E0676A; --on-alert: #111315; --ok: #5CC497; --scrim: rgba(0,0,0,.7);
    --img-edge: rgba(255, 255, 255, .1);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111315; --bg-2: #0B0C0E; --sheet: #1A1D21; --sunk: #08090A; --night: #08090A; --map-bg: #191C1F;
  --ink: #ECEEF0; --ink-2: #C3C8CE; --ink-3: #969DA6;
  --rule: rgba(236, 238, 240, .14); --rule-strong: rgba(236, 238, 240, .8);
  --accent: #D9585B; --accent-ink: #E88A8C; --accent-deep: #A1383B; --on-accent: #111315; --accent-hover: #E36D70;
  --dome-ink: #F0A808; --silver: #9AA3AF; --silver-soft: rgba(154, 163, 175, .16);
  --paper: #1A1D21; --paper-ink: #ECEEF0; --fold: #A1383B;
  --alert: #E0676A; --on-alert: #111315; --ok: #5CC497; --scrim: rgba(0,0,0,.7);
  --img-edge: rgba(255, 255, 255, .1);
  color-scheme: dark;
}

/* «الطبعة» — sections once set at night are now a cool grey band: rhythm comes from rules, not from black */
.night { --bg: var(--bg-2); background: var(--bg); color: var(--ink); }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--ribbon-h) + 16px); scrollbar-color: var(--ink-3) transparent; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-display);
  font-weight: 400;
  font-size: var(--fs-ui);
  line-height: var(--lh-ui);
  letter-spacing: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: var(--accent-deep);
}
[hidden] { display: none !important; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: normal; }
button { cursor: pointer; }
h1, h2, h3, h4, h5, p, figure, blockquote, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3, h4, h5 { font-family: var(--f-head); font-weight: 700; line-height: var(--lh-h3); text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.breaking :focus-visible { outline-color: #FFFFFF; }
.breaking--p2 :focus-visible { outline-color: var(--accent); }   /* the «هام» band is paper, so its ring is red */

::selection { background: var(--accent); color: var(--on-accent); }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
code.mono { direction: ltr; unicode-bidi: isolate; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 10px 16px; font-weight: 700; }
.skip:focus { top: 12px; }
.i-dir { width: 18px; height: 18px; flex: none; } /* arrows point left = forward in RTL */

/* ---------- 3. Signature devices ---------- */

/* 3a. القبة — the segmented dome as a mark (markers, live, key events). Never a decorative bullet. */
.dome-mark { display: inline-block; width: 20px; height: 11px; flex: none; background: var(--dome); -webkit-mask: var(--dome-mask) center / contain no-repeat; mask: var(--dome-mark-mask, var(--dome-mask)) center / contain no-repeat; vertical-align: baseline; }
.dome-mark--line { -webkit-mask-image: var(--arc-mask); mask-image: var(--arc-mask); }
.dome-mark--ink { background: var(--ink); }

/* 3b. The dome frame — the lead photograph takes the dome's profile; the meridians are drawn over its cap */
.dome-frame { position: relative; container-type: inline-size; }
.dome-frame .dome-frame__clip { position: absolute; inset: 0; overflow: hidden; background: var(--sunk); border-radius: 50cqw 50cqw 0 0 / 40cqw 40cqw 0 0; }
.dome-frame__clip img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.86) contrast(1.05); }
/* the figure set on the photograph sits from about half its height down, so the shade is dense from there */
.dome-frame__clip::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(18,20,23,0) 40%, rgba(18,20,23,.66) 56%, rgba(18,20,23,.86) 100%), linear-gradient(270deg, rgba(18,20,23,.35) 0%, rgba(18,20,23,0) 30%); pointer-events: none; }
.dome-meridians { position: absolute; z-index: 2; inset: 0 0 auto 0; width: 100%; height: 40cqw; pointer-events: none; overflow: visible;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%); mask-image: linear-gradient(180deg, #000 30%, transparent 100%); }
.dome-meridians path { fill: none; stroke: var(--dome); stroke-width: 1.25; vector-effect: non-scaling-stroke; opacity: .78; }
.dome-pin { position: absolute; z-index: 3; bottom: 100%; left: 50%; transform: translateX(-50%); display: grid; justify-items: center; gap: 4px; padding-bottom: 2px;
  font: 500 var(--fs-meta)/1.5 var(--f-display); color: var(--ink-2); white-space: nowrap; }
.dome-pin::after { content: ""; width: 1px; height: 16px; background: var(--accent); }

/* 3c. الشريط — the sash that wraps the dome; its inline-end turns under and tapers like the tail of «ع» */
.sash { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: stretch;
  background: var(--paper); color: var(--paper-ink); box-shadow: inset 0 3px 0 var(--accent), 0 1px 0 var(--rule-strong); }
/* the fold: where the sash ends it turns under, and its silver back shows below the band */
.sash::after { content: ""; position: absolute; top: 100%; inset-inline-end: 0; width: 30px; height: 22px; background: linear-gradient(180deg, var(--accent), var(--fold)); clip-path: polygon(100% 0, 0 0, 0 100%); }
.sash__label { display: grid; align-content: center; gap: 2px; padding: 14px 20px; border-inline-end: 1px solid var(--rule); min-width: 150px; }
.sash__label b { font-family: var(--f-head); font-weight: 700; font-size: var(--fs-h4); line-height: 1.4; color: var(--accent-ink); }
.sash__label .live-tag { font-size: var(--fs-meta); }
.sash__list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.sash__list li + li { border-inline-start: 1px solid var(--rule); }
.sash__list a { display: grid; grid-template-columns: auto 1fr; align-content: start; gap: 2px 8px; padding: 14px 18px 16px; height: 100%; transition: background var(--d-2); }
.sash__list a:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.sash__list time { font-weight: 800; font-size: var(--fs-ui); font-variant-numeric: tabular-nums; line-height: 1.5; }
.sash__list small { font-size: var(--fs-meta); color: var(--ink-3); align-self: center; }
.sash__list span { grid-column: 1 / -1; font-family: var(--f-head); font-weight: 600; font-size: 1.22rem; line-height: 1.5; text-wrap: pretty; }
.sash__list .is-key time { display: inline-flex; align-items: center; gap: 6px; }
.sash__list .is-key time::before { content: ""; width: 18px; height: 10px; background: var(--dome); -webkit-mask: var(--dome-mask) center / contain no-repeat; mask: var(--dome-mask) center / contain no-repeat; }
.sash__more { display: flex; align-items: center; gap: 8px; padding-inline: 20px; font-weight: 700; font-size: var(--fs-small); border-inline-start: 1px solid var(--rule); white-space: nowrap; }
.sash__more:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
@media (max-width: 1100px) {
  .sash { grid-template-columns: 1fr; margin-inline-end: 0; }
  .sash::after { display: none; }
  .sash__label { border-inline-end: 0; border-bottom: 1px solid var(--rule); grid-auto-flow: column; justify-content: space-between; align-items: center; padding-block: 12px; }
  .sash__list { grid-auto-columns: minmax(240px, 72%); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    padding-inline-end: 36px; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 36px); mask-image: linear-gradient(to right, transparent 0, #000 36px); }
  .sash__list::-webkit-scrollbar { display: none; }
  .sash__list li { scroll-snap-align: start; }
  .sash__more { justify-content: center; padding-block: 14px; border-inline-start: 0; border-top: 1px solid var(--rule); }
}

/* 3c'. Locator — where a story happened, when no photograph shows it: the wall, the Haram, a gold dome on the place, orbit rings */
.locator { background: var(--map-bg); box-shadow: inset 0 0 0 1px var(--rule); }
.locator svg { width: 100%; height: 100%; display: block; }

/* 3d. The fold on a photograph — report covers. The corner turns under, showing the ribbon's silver back. */
.frame--folded { --c: 44px; clip-path: polygon(0 0, 100% 0, 100% 100%, var(--c) 100%, 0 calc(100% - var(--c))); }
.frame--folded::after { content: ""; position: absolute; left: 0; bottom: 0; z-index: 2; width: var(--c); height: var(--c); background: linear-gradient(225deg, #D9DCE0, var(--fold)); clip-path: polygon(0 0, 100% 100%, 0 100%); transform: none; }

/* 3e. Tapered rule — the tail of «ع» and the kashida stroke: thick where reading starts, a hairline where it ends */
.stroke-rule { height: 4px; background: var(--ink); clip-path: polygon(0 42%, 100% 0, 100% 100%, 0 58%); border: 0; margin: 0; }

/* 3f. Arch — the dome's profile for people: bylines and voices */
.arch-ava { width: 52px; height: 60px; display: grid; place-items: end center; padding-bottom: 9px; background: var(--ink); color: var(--bg); border-radius: 26px 26px 0 0 / 28px 28px 0 0; font-weight: 700; font-size: .92rem; line-height: 1; flex: none; }

/* 3g. Dome horizon — the grid of the dome rising behind night sections */
.dome-horizon { position: absolute; z-index: 0; pointer-events: none; inset-inline-end: -6vw; bottom: 0; width: min(760px, 70vw); aspect-ratio: 2 / 1; color: var(--ink); opacity: .07; }
.dome-horizon svg { width: 100%; height: 100%; overflow: visible; }
.dome-horizon path { vector-effect: non-scaling-stroke; }
.night > .wrap, .coda > .wrap { position: relative; z-index: 1; }

/* 3h. Meridians grid — kept for article heads */
.meridians { position: relative; isolation: isolate; }
.meridians::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; max-width: var(--max); margin-inline: auto;
  background-image: repeating-linear-gradient(to left, transparent 0, transparent calc((100% - var(--gutter) * 2) / 12 - 1px), var(--rule) calc((100% - var(--gutter) * 2) / 12 - 1px), var(--rule) calc((100% - var(--gutter) * 2) / 12));
  background-origin: content-box; padding-inline: var(--gutter); opacity: .45;
  mask-image: linear-gradient(180deg, #000 0, #000 45%, transparent 100%);
}
.fold { clip-path: polygon(0 0, 100% 0, 100% 100%, var(--fold-cut) 100%, 0 calc(100% - var(--fold-cut))); }
.fold-end { clip-path: polygon(0 0, 100% 0, 100% 100%, var(--fold-cut) 100%); }

/* 3i. المد — kashida carries the figure inside the word */
.madd { font-family: var(--f-head); font-weight: 500; line-height: 1.32; font-size: var(--fs-h1); color: var(--ink-2); display: flex; align-items: baseline; flex-wrap: wrap; }
.madd__fig { font-family: var(--f-display); font-weight: 800; color: var(--dome-ink); font-size: 1.85em; line-height: .92; padding-inline: .06em; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.madd__tail { display: block; flex-basis: 100%; font-weight: 500; font-size: max(.46em, .9rem); line-height: 1.7; color: var(--ink); margin-top: .4em; text-wrap: pretty; }

/* 3j. Coordinates — written the Arabic way (ش / ق), digits isolated */
.coord { font-family: var(--f-display); font-size: var(--fs-meta); font-variant-numeric: tabular-nums; color: var(--ink-3); unicode-bidi: isolate; display: inline-block; white-space: nowrap; }
.coord b { color: var(--ink); font-weight: 500; }

/* 3k. Grain — the brand's photo noise */
.grain { position: relative; }
.grain::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: overlay; opacity: .26;
  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' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* 3l. Dome loader — the dome's tiles light in reading order */
.dome-loader { display: inline-flex; gap: 2px; align-items: end; width: 40px; height: 22px; -webkit-mask: var(--dome-mask) center / contain no-repeat; mask: var(--dome-mask) center / contain no-repeat; }
.dome-loader i { flex: 1; height: 100%; background: var(--dome); opacity: .25; animation: tile 1.2s var(--ease) infinite; }
.dome-loader i:nth-child(1) { animation-delay: 0s; } .dome-loader i:nth-child(2) { animation-delay: .15s; } .dome-loader i:nth-child(3) { animation-delay: .3s; } .dome-loader i:nth-child(4) { animation-delay: .45s; }
@keyframes tile { 0%, 100% { opacity: .22; } 40% { opacity: 1; } }

/* ---------- 4. Typography roles ---------- */
.hl-display, .hl-mega { font-family: var(--f-head); font-size: var(--fs-display); font-weight: 700; line-height: var(--lh-display); }
.hl-1 { font-family: var(--f-head); font-size: var(--fs-h1); font-weight: 700; line-height: var(--lh-h1); }
.hl-2 { font-family: var(--f-head); font-size: var(--fs-h2); font-weight: 700; line-height: var(--lh-h2); }
.hl-3 { font-family: var(--f-head); font-size: var(--fs-h3); font-weight: 700; line-height: var(--lh-h3); }
.hl-4 { font-family: var(--f-head); font-size: var(--fs-h4); font-weight: 700; line-height: var(--lh-h4); }
.hl-5 { font-family: var(--f-head); font-size: var(--fs-h5); font-weight: 600; line-height: var(--lh-h5); }
.dek { font-family: var(--f-read); font-weight: 400; font-size: var(--fs-lead); line-height: var(--lh-lead); color: var(--ink-2); max-width: 58ch; text-wrap: pretty; }
:is(h1, h2, h3, h4, h5) > a.hl { padding-block: .2em; } /* a taller hit area without moving the line */
a .hl-u { background: linear-gradient(var(--accent), var(--accent)) no-repeat 100% 100% / 0 2px; transition: background-size var(--d-2) var(--ease); padding-bottom: 2px; }
a:hover .hl-u, a:focus-visible .hl-u { background-size: 100% 2px; }
.read { font-family: var(--f-read); font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink); }
.read p + p { margin-top: 1.1em; }

/* Kicker — kept only where it carries place + time (article heads, live) */
.kicker { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--f-display); font-size: var(--fs-small); font-weight: 600; color: var(--ink); line-height: 1.5; }
.kicker__sq { display: inline-block; width: 18px; height: 10px; flex: none; background: var(--dome); -webkit-mask: var(--dome-mask) center / contain no-repeat; mask: var(--dome-mask) center / contain no-repeat; }
.kicker--place .kicker__sq { -webkit-mask-image: var(--arc-mask); mask-image: var(--arc-mask); }
.kicker .coord { font-weight: 400; }

/* Placeline — place · genre · time, set under the headline so the headline leads */
.placeline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 0; font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--ink-3); }
.placeline > * + *::before { content: ""; display: inline-block; width: 1px; height: .85em; background: currentColor; opacity: .45; margin-inline: 10px; vertical-align: -.1em; }
.placeline b { color: var(--ink); font-weight: 700; }
.placeline time { font-variant-numeric: tabular-nums; }

/* ---------- 5. Metadata ---------- */
.meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 0; font-size: var(--fs-meta); color: var(--ink-3); line-height: var(--lh-meta); }
.meta > * + *::before { content: ""; display: inline-block; width: 1px; height: .85em; background: currentColor; opacity: .45; margin-inline: 10px; vertical-align: -.1em; }
.meta time { font-variant-numeric: tabular-nums; }
.meta .mono { font-size: .78rem; }
.meta strong { color: var(--ink); font-weight: 600; }

.byline { display: flex; align-items: center; gap: 12px; }
.mono-gram { width: 42px; height: 48px; flex: none; display: grid; place-items: end center; padding-bottom: 7px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: .875rem; line-height: 1; border-radius: 21px 21px 0 0 / 22px 22px 0 0; }
.mono-gram--img { background: var(--sunk) center / cover no-repeat; }
.byline__name { font-weight: 600; font-size: var(--fs-ui); line-height: 1.45; }
.byline__role { font-size: var(--fs-meta); color: var(--ink-3); line-height: 1.5; }

/* Category & tag — words, not chips */
.cat { display: inline-flex; align-items: center; font-size: var(--fs-small); font-weight: 700; color: var(--ink-2); }
.cat--quiet { font-weight: 600; color: var(--ink-3); }
.tags { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.tag { font-size: var(--fs-small); color: var(--ink-2); padding-block: 4px; border-bottom: 1px solid var(--rule); transition: border-color var(--d-2), color var(--d-2); }
.tag::before { content: "#"; color: var(--ink-3); margin-inline-end: 2px; }
a.tag:hover { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- 6. Ribbon navigation («الشريط») ---------- */
.ribbon { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--bg); color: var(--ink); border-bottom: 3px double var(--ink); }
.ribbon__in { display: flex; align-items: stretch; height: var(--ribbon-h); }
.stamp { display: flex; align-items: center; gap: 12px; padding-inline-end: 20px; flex: none; border-inline-end: 1px solid var(--rule); }
.stamp img { height: 40px; width: auto; }
.logo-light { display: none !important; }
:root[data-theme="dark"] .logo-ink { display: none !important; } :root[data-theme="dark"] .logo-light { display: block !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-ink { display: none !important; } :root:not([data-theme="light"]) .logo-light { display: block !important; } }
.stamp__word { height: 18px !important; }
.rail { display: flex; align-items: stretch; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail a { position: relative; display: flex; align-items: center; gap: 8px; padding-inline: 15px; font-size: var(--fs-small); font-weight: 500; white-space: nowrap; color: var(--ink-2); transition: color var(--d-2); }
.rail a:hover, .rail a[aria-current="page"] { color: var(--ink); }
.rail a::after { content: ""; position: absolute; inset-inline: 15px; bottom: 0; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform var(--d-3) var(--ease); }
.rail a:hover::after, .rail a[aria-current="page"]::after { transform: scaleX(1); }
.rail a.is-core { color: var(--ink); font-weight: 700; }
.rail a.is-core::before { content: ""; width: 16px; height: 9px; background: currentColor; -webkit-mask: var(--arc-mask) center / contain no-repeat; mask: var(--arc-mask) center / contain no-repeat; }
.rail sup { font-size: .66rem; color: var(--ink-3); top: -.5em; font-variant-numeric: tabular-nums; }
.ribbon__tools { display: flex; align-items: stretch; flex: none; border-inline-start: 1px solid var(--rule); }
.ribbon__clock { display: flex; flex-direction: column; justify-content: center; padding-inline: 16px; line-height: 1.3; }
.ribbon__clock .t { font-size: .98rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.ribbon__clock .p { font-size: .8125rem; color: var(--ink-3); }
.tool-btn { display: grid; place-items: center; width: 56px; background: none; border: 0; color: var(--ink); border-inline-start: 1px solid var(--rule); transition: background var(--d-2); }
.tool-btn:hover { background: var(--sunk); }
.tool-btn svg { width: 20px; height: 20px; }
.tool-btn--live { width: auto; padding-inline: 16px; display: flex; gap: 8px; font-size: var(--fs-small); font-weight: 700; background: var(--accent); color: var(--on-accent); }
.tool-btn--live:hover { background: var(--accent-hover); }
/* live coverage has one entry on wide screens, this button (the dock carries it on phones); on the live page it is the current section */
.tool-btn--live[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--on-accent); }
/* theme switch: the moon offers the dark edition, the sun the light one; the two cross-fade in place */
.tool-btn--theme { position: relative; }
.theme-ico { display: grid; place-items: center; transition: opacity 200ms cubic-bezier(0.2, 0, 0, 1), scale 200ms cubic-bezier(0.2, 0, 0, 1), filter 200ms cubic-bezier(0.2, 0, 0, 1); }
.theme-ico--sun { position: absolute; inset: 0; opacity: 0; scale: .25; filter: blur(4px); }
:root[data-theme="dark"] .theme-ico--moon { opacity: 0; scale: .25; filter: blur(4px); }
:root[data-theme="dark"] .theme-ico--sun { opacity: 1; scale: 1; filter: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-ico--moon { opacity: 0; scale: .25; filter: blur(4px); }
  :root:not([data-theme="light"]) .theme-ico--sun { opacity: 1; scale: 1; filter: none; }
}
@media (prefers-reduced-motion: reduce) { .theme-ico { transition: opacity 150ms ease; scale: 1 !important; filter: none !important; } }

.dateline { border-bottom: 1px solid var(--rule); }
.dateline__in { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; font-size: var(--fs-meta); color: var(--ink-3); flex-wrap: wrap; padding-block: 6px; }
.dateline__in strong { color: var(--ink); font-weight: 600; }

.dock { display: none; }
@media (max-width: 860px) {
  :root { --ribbon-h: 56px; }
  .rail, .ribbon__clock { display: none; }
  .stamp { border: 0; flex: 1; }
  .stamp img { height: 34px; }
  .tool-btn { width: 48px; }
  .ribbon__tools [data-search], .ribbon__tools .tool-btn--live { display: none; }
  .dock { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 60; background: var(--bg); color: var(--ink-2); border-top: 3px double var(--ink); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .dock a, .dock button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px 8px; font-size: .8rem; background: none; border: 0; color: inherit; min-height: 56px; }
  .dock svg { width: 22px; height: 22px; }
  .dock [aria-current="page"] { color: var(--ink); box-shadow: inset 0 3px 0 var(--accent); }
  body.has-dock { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- 7. Breaking («عاجل») ---------- */
/* P1 عاجل: the red band of the network's own cards, on every page · P2 هام: a paper band with a red rule · P3 تحديث: inside the stream only */
.breaking { background: var(--accent); color: var(--on-accent); overflow: hidden; }
.breaking__in { display: flex; align-items: center; gap: 16px; min-height: 50px; }
.breaking__in > .breaking__text { padding-block: 9px; }
.breaking__label { display: flex; align-items: center; gap: 8px; flex: none; align-self: stretch; background: var(--on-accent); color: var(--accent); padding-inline: 16px 28px; font-weight: 800; font-size: var(--fs-ui); clip-path: polygon(0 0, 100% 0, 100% 100%, 14px 100%); }
.breaking__text { font-family: var(--f-head); font-weight: 700; font-size: 1.28rem; line-height: 1.45; min-width: 0; flex: 1; padding-block: 8px; }
.breaking__text a:hover { text-decoration: underline; text-underline-offset: 5px; }
.breaking__time { font-size: .85rem; font-weight: 700; flex: none; font-variant-numeric: tabular-nums; }
.breaking__close { background: none; border: 0; width: 44px; height: 44px; display: grid; place-items: center; flex: none; color: inherit; }
.breaking__close:focus-visible { outline-offset: -4px; }   /* the band clips anything outside its 50px, so the ring sits inside the button */
.breaking--p2 { background: var(--sheet); color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent), inset 0 1px 0 var(--rule); }
.breaking--p2 .breaking__label { background: var(--accent); color: var(--on-accent); }
.breaking.is-entering { animation: ribbon-in var(--d-4) var(--ease) both; }
@keyframes ribbon-in { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
.pulse { position: relative; width: 10px; height: 10px; flex: none; }
.pulse::before, .pulse::after { content: ""; position: absolute; inset: 0; background: currentColor; border-radius: 50%; }
.pulse::after { animation: pulse 1.8s var(--ease) infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.8); opacity: 0; } }
.live-tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: var(--fs-small); color: var(--accent-ink); }
.night .live-tag { color: var(--accent); }
.night .sash .live-tag, .sash .live-tag { color: var(--accent-ink); }
@media (max-width: 720px) {
  .breaking__in > .breaking__text { padding-block: 0; margin-block: 9px; font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .breaking__label { padding-inline: 12px 22px; font-size: var(--fs-small); }
  .breaking__in { gap: 10px; }
  .breaking__time { display: none; }
  .dateline__in > :nth-child(2) { display: none; }
}

/* ---------- 8. Media («توثيق») ---------- */
/* Ratios: 4:5 portrait · 4:3 report · 3:2 standard · 1:1 thumb · 16:9 video · 2.35:1 lens */
.frame { position: relative; overflow: hidden; background: var(--sunk); max-width: 100%; display: block; }
.frame img, .frame video { width: 100%; height: 100%; object-fit: cover; filter: saturate(.86) contrast(1.04); transition: transform 300ms var(--ease), filter 300ms ease; }
a:focus-visible .frame img { transform: scale(1.025); filter: saturate(1) contrast(1.04); }
@media (hover: hover) and (pointer: fine) { a:hover .frame img, a.frame:hover img { transform: scale(1.025); filter: saturate(1) contrast(1.04); } }
.r-4x5 { aspect-ratio: 4 / 5; } .r-4x3 { aspect-ratio: 4 / 3; } .r-3x2 { aspect-ratio: 3 / 2; } .r-1x1 { aspect-ratio: 1; } .r-16x9 { aspect-ratio: 16 / 9; } .r-21x9 { aspect-ratio: 21 / 9; }
.frame--shade::before { content: ""; position: absolute; inset: 0; z-index: 1; background: var(--shade); pointer-events: none; }
/* a photograph on a white page needs an edge: a hairline of pure black (white in the dark theme) at 10%, drawn over the frame so a hover zoom never clips it */
.frame:not(.frame--folded):not(.locator)::after { content: ""; position: absolute; inset: 0; z-index: 3; box-shadow: inset 0 0 0 1px var(--img-edge); pointer-events: none; }
.frame__over { position: absolute; inset-inline: 0; bottom: 0; z-index: 2; padding: var(--s-5); color: #F4F5F6; --ink: #F4F5F6; --ink-2: rgba(244,245,246,.85); --ink-3: rgba(244,245,246,.72); }
.frame__badge { position: absolute; z-index: 2; top: 0; inset-inline-start: 0; display: flex; align-items: center; gap: 8px; background: var(--night); color: var(--night-fg); font-size: var(--fs-meta); font-weight: 700; padding: 6px 12px 6px 22px; clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%); }
.frame__badge--gold { background: var(--accent); color: var(--on-accent); }
.cap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 10px; font-size: var(--fs-meta); color: var(--ink-3); line-height: var(--lh-meta); }
.cap__text { color: var(--ink-2); flex-basis: 100%; font-size: var(--fs-caption); line-height: var(--lh-caption); }
.cap__credit::before { content: "تصوير: "; }
.play { position: absolute; z-index: 3; inset-inline-start: var(--s-4); bottom: var(--s-4); display: flex; align-items: center; gap: 10px; color: #fff; font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.play__btn { width: 54px; height: 54px; display: grid; place-items: center; background: var(--dome); color: var(--on-dome); border-radius: 27px 27px 0 0 / 30px 30px 0 0; transition: transform var(--d-2) var(--ease); }
@media (hover: hover) and (pointer: fine) { a:hover .play__btn, .play:hover .play__btn { transform: translateY(-3px); } }

/* Cover — image-led story with the headline set inside the photograph */
/* report covers: the picture or map above, the headline under it on the page — nothing written over an image */
.cover { position: relative; display: grid; gap: var(--s-3); align-content: start; color: var(--ink); }
.cover__text { display: grid; gap: 6px; }
@media (hover: hover) and (pointer: fine) { .cover:hover .cover__h { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; } }
.cover__h { font-family: var(--f-head); font-size: var(--fs-h3); font-weight: 700; line-height: var(--lh-h3); text-wrap: balance; }

/* ---------- 9. Story units — rules and rhythm, not boxes ---------- */
.story { display: grid; gap: 10px; align-content: start; min-width: 0; }
.story--ruled { border-top: 1px solid var(--rule-strong); padding-top: 14px; }
.story--row { grid-template-columns: minmax(0, 1fr) 104px; column-gap: 16px; align-items: start; }
.story--row > .frame { grid-column: 2; grid-row: 1 / span 3; }
.story--row > :not(.frame) { grid-column: 1; }
.story--text { grid-template-columns: 2.4rem minmax(0, 1fr); column-gap: 10px; }
.story--text .idx { font-size: 1rem; font-weight: 800; color: var(--accent-ink); grid-row: span 3; line-height: 1.6; font-variant-numeric: tabular-nums; }
.story h3, .story h2 { min-width: 0; }

/* Section head — the name, then the tapered rule */
.sec-head { position: relative; display: flex; align-items: end; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding-bottom: 16px; margin-bottom: var(--s-5); }
.sec-head::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 4px; background: var(--ink); clip-path: polygon(0 42%, 100% 0, 100% 100%, 0 58%); }
.sec-head__t { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.sec-head h2 { font-size: var(--fs-h2); font-weight: 700; line-height: var(--lh-h2); }
.sec-head .more, .more-link { font-size: var(--fs-small); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; min-height: 44px; color: var(--ink-2); }
.sec-head .more:hover, .more-link:hover { color: var(--accent-ink); }

/* ---------- 10. Pull quote — Arabic guillemet hangs in gold; no side bar ---------- */
.pull { position: relative; margin-block: var(--s-7); padding-inline-start: 1.15em; font-size: var(--fs-h2); }
.pull::before { content: "«"; position: absolute; inset-inline-start: -.05em; top: -.32em; font: 700 2.4em/1 var(--f-head); color: var(--accent); }
.pull p { font-family: var(--f-head); font-weight: 600; font-size: 1em; line-height: 1.62; color: var(--ink); text-wrap: balance; }
.pull footer { margin-top: 14px; font-size: var(--fs-small); color: var(--ink-3); }
.pull footer strong { color: var(--ink); }
.pull--inline { margin-block: 0; font-size: var(--fs-h4); }
.pull--inline p { font-weight: 500; color: var(--ink-2); }

/* ---------- 11. Ledger — a meridian with parallels; the key moment wears the dome ---------- */
.ledger { position: relative; display: grid; }
.ledger__item { display: grid; grid-template-columns: 70px 22px minmax(0, 1fr); gap: 0 12px; padding-bottom: var(--s-5); position: relative; }
.ledger__time { font-size: .86rem; font-weight: 700; color: var(--ink); text-align: end; line-height: 1.7; font-variant-numeric: tabular-nums; }
.ledger__time small { display: block; font-weight: 400; color: var(--ink-3); font-size: var(--fs-meta); line-height: 1.4; }
.ledger__node { position: relative; }
.ledger__node::before { content: ""; position: absolute; inset-inline-start: 50%; top: 0; bottom: calc(-1 * var(--s-5)); width: 1px; background: var(--rule-strong); opacity: .32; }
.ledger__item:first-child .ledger__node::before { top: .9em; }
.ledger__item:last-child .ledger__node::before { bottom: calc(100% - .9em); }
.ledger__node::after { content: ""; position: absolute; top: .9em; inset-inline-start: 4px; width: 14px; height: 1.5px; background: var(--ink); }
.ledger__item.is-key .ledger__node::after { top: .55em; inset-inline-start: 1px; width: 20px; height: 11px; background: var(--dome); -webkit-mask: var(--dome-mask) center / contain no-repeat; mask: var(--dome-mask) center / contain no-repeat; }
.ledger__body h4 { font-size: var(--fs-h5); font-weight: 600; line-height: var(--lh-h5); }
.ledger__body p { font-size: var(--fs-small); color: var(--ink-2); margin-top: 2px; line-height: var(--lh-small); }

/* Ruler — the same meridian laid horizontally (chapters, years) */
.ruler { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: relative; padding-top: 18px; }
.ruler::before { content: ""; position: absolute; inset-inline: 0; top: 6px; height: 1px; background: var(--rule-strong); opacity: .4; }
.ruler li { position: relative; display: grid; gap: 2px; padding-inline-end: 12px; font-size: var(--fs-small); color: var(--ink-2); line-height: 1.6; }
.ruler li::before { content: ""; position: absolute; top: -18px; inset-inline-start: 0; width: 1.5px; height: 13px; background: var(--ink); }
.ruler li.is-key::before { width: 20px; height: 11px; top: -21px; background: var(--dome); -webkit-mask: var(--dome-mask) center / contain no-repeat; mask: var(--dome-mask) center / contain no-repeat; }
.ruler b { font-weight: 800; color: var(--ink); font-size: var(--fs-ui); font-variant-numeric: tabular-nums; }

/* ---------- 12. Live stream ---------- */
.stream { display: grid; }
.stream__item { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding-block: 18px; padding-inline: 0; border-top: 1px solid var(--rule); }
.stream__item.is-new { animation: arrive var(--d-5) var(--ease) both; }
@keyframes arrive { from { background: color-mix(in srgb, var(--accent) 24%, transparent); } to { background: transparent; } }
.stream__t { font-size: .88rem; font-weight: 800; text-align: end; line-height: 1.8; font-variant-numeric: tabular-nums; }
.stream__t small { display: block; color: var(--ink-3); font-weight: 400; font-size: var(--fs-meta); line-height: 1.4; }
.stream__item :is(h3, h4) { font-size: var(--fs-h4); font-weight: 600; line-height: var(--lh-h4); }
.stream__item p { font-size: var(--fs-small); color: var(--ink-2); margin-top: 4px; line-height: var(--lh-small); }
.stream__item--p1 { background: color-mix(in srgb, var(--accent) 9%, transparent); padding-inline: 12px; }
.stream__item--p1 :is(h3, h4) { font-weight: 800; }
.prio { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-meta); font-weight: 800; margin-inline-end: 8px; vertical-align: 1px; white-space: nowrap; }
.prio::after { content: ""; width: 1px; height: .9em; background: currentColor; opacity: .35; margin-inline-start: 4px; }
.prio--1 { color: var(--accent-ink); }
.prio--1::before { content: ""; width: 18px; height: 10px; background: var(--accent); -webkit-mask: var(--dome-mask) center / contain no-repeat; mask: var(--dome-mask) center / contain no-repeat; }
.prio--2 { color: var(--ink); }
.prio--3 { color: var(--ink-3); font-weight: 700; }
.new-pill { position: sticky; top: calc(var(--ribbon-h) + 12px); z-index: 5; justify-self: center; margin-block: 8px; background: var(--night); color: var(--night-fg); border: 0; padding: 8px 18px; font-size: var(--fs-small); font-weight: 700; }

/* ---------- 13. Ranked ---------- */
.ranked { counter-reset: r; display: grid; }
.ranked li { counter-increment: r; display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: 2px 10px; padding-block: 14px; border-top: 1px solid var(--rule); }
.ranked li::before { content: counter(r); grid-row: span 2; font-weight: 800; font-size: 1.6rem; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.ranked li:first-child::before { color: var(--accent-ink); }
.ranked a { display: block; min-height: 44px; font-weight: 600; font-size: var(--fs-ui); line-height: 1.65; }
.ranked a:hover { color: var(--accent-ink); }
.ranked .meta { margin-top: 2px; }
.spark { display: none; }

/* ---------- 14. Controls ---------- */
.btn { --b-bg: var(--ink); --b-fg: var(--bg); display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding-inline: 22px; border: 0; background: var(--b-bg); color: var(--b-fg); font-family: var(--f-display); font-weight: 700; font-size: var(--fs-ui); line-height: 1.2; white-space: nowrap; transition: background var(--d-2) ease, color var(--d-2) ease, transform 160ms var(--ease); }
.btn:hover { --b-bg: color-mix(in srgb, var(--ink) 84%, var(--accent)); }
.btn--gold { --b-bg: var(--accent); --b-fg: var(--on-accent); }
.btn--gold:hover { --b-bg: var(--accent-hover); }
.btn--line { --b-bg: transparent; --b-fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--line:hover { --b-bg: var(--ink); --b-fg: var(--bg); }
.btn--quiet { --b-bg: transparent; --b-fg: var(--ink); padding-inline: 4px; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 7px; text-decoration-thickness: 2px; }
.btn--quiet:hover { --b-bg: transparent; color: var(--accent-ink); }
.btn--danger { --b-bg: var(--alert); --b-fg: var(--on-alert); }
.btn--sm { min-height: 38px; padding-inline: 16px; font-size: var(--fs-small); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.icon-btn { width: 44px; height: 44px; flex: none; display: inline-grid; place-items: center; background: none; border: 0; color: var(--ink); }
.icon-btn:hover { background: var(--sunk); }
.icon-btn svg { width: 20px; height: 20px; }

.field { display: grid; gap: 6px; }
.field label, .field .lbl { font-size: var(--fs-small); font-weight: 600; }
.field .hint { font-size: var(--fs-meta); color: var(--ink-3); }
.field .err-msg { font-size: var(--fs-meta); color: var(--alert); font-weight: 600; }
.input, .select, .textarea { width: 100%; min-height: 46px; padding: 10px 14px; background: var(--sheet); color: var(--ink); border: 0; box-shadow: inset 0 0 0 1px var(--rule), inset 0 -2px 0 var(--ink); transition: box-shadow var(--d-2); font-size: max(16px, var(--fs-ui)); }
.textarea { min-height: 120px; line-height: 1.8; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { box-shadow: inset 0 0 0 1px var(--rule), inset 0 -3px 0 var(--accent); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--alert), inset 0 -3px 0 var(--alert); }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-small); cursor: pointer; }
.check input { appearance: none; width: 20px; height: 20px; margin: 0; box-shadow: inset 0 0 0 1.5px var(--ink); display: grid; place-items: center; }
.check input:checked { background: var(--ink); }
.check input:checked::after { content: ""; width: 10px; height: 5px; border: solid var(--bg); border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); }
.switch { appearance: none; width: 42px; height: 24px; background: var(--sunk); box-shadow: inset 0 0 0 1.5px var(--ink-3); position: relative; cursor: pointer; flex: none; margin: 0; transition: background var(--d-2); }
.switch::after { content: ""; position: absolute; top: 4px; inset-inline-start: 4px; width: 16px; height: 16px; background: var(--ink-3); transition: transform var(--d-2) var(--ease), background var(--d-2) ease; }
.switch:checked { background: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.switch:checked::after { transform: translateX(-18px); background: var(--on-accent); }
.tabs { display: flex; border-bottom: 1px solid var(--rule-strong); overflow-x: auto; scrollbar-width: none; }
.tabs [role="tab"] { background: none; border: 0; padding: 12px 18px; font-weight: 600; font-size: var(--fs-small); color: var(--ink-3); position: relative; white-space: nowrap; min-height: 44px; }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"]::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 3px; background: var(--accent); }
.tabs [role="tab"] .count { font-size: .8rem; color: var(--ink-3); margin-inline-start: 6px; font-variant-numeric: tabular-nums; }
.pager { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 44px; height: 44px; display: grid; place-items: center; font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pager a:hover { background: var(--sunk); }
.pager [aria-current="page"] { background: var(--ink); color: var(--bg); }
.menu { position: absolute; z-index: 40; min-width: 220px; background: var(--sheet); box-shadow: 0 0 0 1px var(--rule), 0 18px 40px -18px rgba(0,0,0,.4); padding-block: 6px; border-top: 3px solid var(--accent); }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 16px; background: none; border: 0; text-align: start; font-size: var(--fs-small); }
.menu a:hover, .menu button:hover, .menu [aria-selected="true"] { background: var(--sunk); }
.menu hr { border: 0; border-top: 1px solid var(--rule); margin-block: 6px; }
.menu kbd { margin-inline-start: auto; }
kbd { font-family: var(--f-mono); font-size: .7rem; padding: 1px 6px; box-shadow: inset 0 0 0 1px var(--rule-strong); color: var(--ink-2); direction: ltr; display: inline-block; }
dialog.modal { border: 0; padding: 0; background: var(--sheet); color: var(--ink); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 64px); border-top: 4px solid var(--accent); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
dialog.modal::backdrop { background: var(--scrim); }
dialog.modal[open] { animation: modal-in 250ms var(--ease); }
dialog.modal[open]::backdrop { animation: backdrop-in 250ms var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: scale(.96); } }
@keyframes backdrop-in { from { opacity: 0; } }
.modal__head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--rule); }
.modal__body { padding: 22px; }
.modal__foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--rule); flex-wrap: wrap; }
dialog.search { border: 0; padding: 0; width: min(760px, calc(100vw - 24px)); margin-top: 8vh; background: var(--sheet); color: var(--ink); border-top: 4px solid var(--accent); box-shadow: 0 30px 80px -20px rgba(0,0,0,.55); }
dialog.search::backdrop { background: var(--scrim); }
.search__bar { display: flex; align-items: center; gap: 12px; padding: 6px 18px; border-bottom: 1px solid var(--rule); }
.search__bar svg { width: 22px; height: 22px; flex: none; }
.search__bar input { flex: 1; border: 0; background: none; font-size: 1.3rem; font-weight: 500; min-height: 60px; outline: none; }
.search__body { padding: 16px 18px 20px; display: grid; gap: 18px; max-height: 60vh; overflow: auto; }
.search__group h5 { font-size: var(--fs-meta); color: var(--ink-3); font-weight: 600; margin-bottom: 6px; }
.search__group a { display: flex; gap: 12px; align-items: baseline; padding: 9px 10px; margin-inline: -10px; line-height: 1.6; }
.search__group a:hover, .search__group a.is-active { background: var(--sunk); }
.search__group a .coord, .search__group a .end { margin-inline-start: auto; }
.toasts { position: fixed; z-index: 90; inset-inline-start: 16px; bottom: 16px; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); }
@media (max-width: 860px) { .toasts { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); } }
.toast { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; align-items: start; background: var(--night); color: var(--night-fg); padding: 14px 16px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.5); opacity: 1; transform: translateY(0); transition: opacity 400ms ease, transform 400ms ease; }
@starting-style { .toast { opacity: 0; transform: translateY(100%); } }
.toast.is-leaving { opacity: 0; transform: translateY(100%); }
.toast__t { font-size: .74rem; font-weight: 700; color: var(--dome); line-height: 2; font-variant-numeric: tabular-nums; }
.toast--err .toast__t { color: #FF8B70; }
.toast b { display: block; font-size: var(--fs-small); line-height: 1.6; }
.toast span { font-size: var(--fs-meta); opacity: .82; line-height: 1.6; }
.toast button { background: none; border: 0; color: inherit; opacity: .7; width: 32px; height: 32px; }
.empty { display: grid; justify-items: start; gap: 12px; padding: var(--s-7) var(--s-6); border: 1px dashed var(--rule-strong); }
.empty__glyph { width: 56px; height: 56px; }
.empty h4 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
.empty p { color: var(--ink-2); font-size: var(--fs-small); max-width: 46ch; }
.state-err { border: 0; background: color-mix(in srgb, var(--alert) 9%, transparent); }
.state-err b:first-child { color: var(--alert); }
.skel { background: linear-gradient(90deg, var(--sunk) 0 40%, color-mix(in srgb, var(--sunk) 55%, var(--bg)) 50%, var(--sunk) 60% 100%) 0 0 / 300% 100%; animation: skel 1.4s linear infinite; min-height: 14px; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: 0 0; } }
.skel-line { height: 14px; margin-top: 10px; }
.skel-line.w60 { width: 60%; } .skel-line.w80 { width: 80%; } .skel-line.w40 { width: 40%; }
.skel-hl { height: 26px; }

/* ---------- 15. Provenance («سلسلة الإعداد») — in the newsroom, AI vs human is a lane beside each paragraph ---------- */
/* silver dotted = machine draft · ink solid = edited by a person · gold = verified. Used in the CMS editor only. */
.prov { position: relative; padding-inline-start: 18px; }
.prov::before { content: ""; position: absolute; inset-inline-start: 0; top: .35em; bottom: .35em; width: 3px; }
.prov--ai::before { background: repeating-linear-gradient(180deg, var(--silver) 0 4px, transparent 4px 8px); }
.prov--human::before { background: var(--ink); }
.prov--verified::before { background: var(--dome); }
.prov-key { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: var(--fs-meta); color: var(--ink-2); }
.prov-key span { display: inline-flex; align-items: center; gap: 8px; }
.prov-key i { width: 3px; height: 16px; display: inline-block; }
.prov-key .k-ai { background: repeating-linear-gradient(180deg, var(--silver) 0 4px, transparent 4px 7px); }
.prov-key .k-human { background: var(--ink); }
.prov-key .k-verified { background: var(--dome); }
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
.pipeline li { display: grid; gap: 6px; font-size: var(--fs-meta); color: var(--ink-3); }
.pipeline li::before { content: ""; height: 4px; background: var(--sunk); transition: background-color 400ms ease; }
.pipeline li.done::before { background: var(--ink); }
.pipeline li.now::before { background: var(--accent); }
.pipeline li.now { color: var(--ink); font-weight: 700; }
.pipeline li.done { color: var(--ink-2); }
.pipeline li.ai::before { background: repeating-linear-gradient(90deg, var(--silver) 0 5px, transparent 5px 8px); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-meta); font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 10px; height: 10px; flex: none; }
.status--ai::before { background: repeating-linear-gradient(90deg, var(--silver) 0 3px, transparent 3px 5px); box-shadow: inset 0 0 0 1px var(--silver); }
.status--review::before { box-shadow: inset 0 0 0 2px var(--accent); }
.status--edit::before { background: linear-gradient(135deg, var(--ink) 50%, transparent 50%); box-shadow: inset 0 0 0 1px var(--ink); }
.status--approved::before { background: var(--dome); }
.status--live::before { background: var(--ok); }
.status--scheduled::before { box-shadow: inset 0 0 0 2px var(--ink-3); border-radius: 50%; }
.status--rejected::before { background: var(--alert); }
/* AI mark — a dashed, silver dome outline: unfinished, machine-made, waiting for a person */
.ai-mark { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-meta); color: var(--ink-2); font-weight: 500; }
.ai-mark svg { width: 14px; height: 14px; color: var(--silver); }
.ai-glyph { display: inline-block; width: 16px; height: 9px; flex: none; border: 1.5px dashed var(--silver); border-bottom: 0; border-radius: 8px 8px 0 0 / 9px 9px 0 0; }

/* ---------- 16. Newsletter («نشرة الفجر») ---------- */
.brief { display: grid; gap: 14px; }
.brief label { text-wrap: balance; }
.brief__row { display: flex; flex-wrap: wrap; }
.brief__row .input { flex: 1 1 220px; min-width: 0; }
.brief__row .btn { flex: none; }

/* ---------- 17. Coda («الخاتمة») — the dome rises at the end ---------- */
.coda { background: var(--bg-2); color: var(--ink); position: relative; overflow: hidden; border-top: 3px double var(--ink); }
/* one compact band: who we are in a line on one side, the morning brief on the other */
.coda__statement { padding-block: var(--s-6); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 28rem); gap: var(--s-5) var(--s-7); align-items: end; }
.coda__statement h2 { font-family: var(--f-head); font-size: var(--fs-h2); font-weight: 700; line-height: 1.4; }
.coda__statement h2 em { font-style: normal; color: var(--accent-ink); }
.coda__statement p { color: var(--ink-2); margin-top: 4px; font-size: var(--fs-small); line-height: 1.75; text-wrap: pretty; }
.coda__index { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-6); padding-block: var(--s-6) var(--s-7); position: relative; }
.coda__index::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 4px; background: var(--ink); clip-path: polygon(0 42%, 100% 0, 100% 100%, 0 58%); }
.coda__index h4 { font-family: var(--f-display); font-size: var(--fs-small); font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.coda__index li a { display: flex; justify-content: space-between; gap: 10px; padding-block: 10px; font-size: var(--fs-small); color: var(--ink-2); border-bottom: 1px solid var(--rule); line-height: 1.6; }
.coda__index li a:hover { color: var(--accent-ink); }
.coda__index li a .n { color: var(--ink-3); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.coda__base { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; padding-block: 20px; border-top: 1px solid var(--rule); font-size: var(--fs-meta); color: var(--ink-3); }
.coda__social { display: flex; gap: 2px; }
.coda__social a { width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink-2); }
.coda__social a:hover { background: var(--sunk); color: var(--accent-ink); }
.coda__social svg { width: 18px; height: 18px; }
.coda .dome-horizon { width: min(820px, 80vw); opacity: .07; inset-inline-end: -4vw; }
.coda .input { background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule), inset 0 -2px 0 var(--accent); }
@media (max-width: 960px) { .coda__statement { grid-template-columns: 1fr; } .coda__index { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 520px) { .coda__index { gap: var(--s-5) var(--s-4); } }
@media (max-width: 379px) { .coda__index { grid-template-columns: 1fr; } }   /* narrow phones: one column, so every link stays on one line */

/* ---------- 18. Utilities ---------- */
.stack { display: grid; gap: var(--s-4); align-content: start; }
.stack-lg { display: grid; gap: var(--s-6); align-content: start; }
.row { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.between { justify-content: space-between; }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.rule-strong { border: 0; border-top: 3px solid var(--ink); margin: 0; }
.muted { color: var(--ink-3); }
.gold { color: var(--dome-ink); }
.section { padding-block: var(--sec); }
.section--tight { padding-block: var(--sec-tight); }

/* ---------- 19. Motion system ----------
   Gate first: keyboard-opened surfaces (search) never animate; what readers see daily moves fast and once;
   the front page's arrival is the one place motion is allowed to perform.
   Curves: --ease (strong ease-out) for entrances, --ease-in-out for things travelling on screen, linear for constant motion. */

/* 19a. The arrival — the dome rises, its meridians draw, the headline surfaces word by word,
        the sash unrolls from where Arabic starts reading. Runs once, ~1.4s, never blocks input. */
.is-drawing .dome-frame { animation: dome-rise 950ms var(--ease-in-out) both; }
@keyframes dome-rise { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(-90px 0 0 0); } }
.is-drawing .dome-meridians path { animation: draw var(--d-5) var(--ease) both; animation-delay: 520ms; }
.is-drawing .dome-meridians path:nth-child(2), .is-drawing .dome-meridians path:nth-child(3) { animation-delay: 620ms; }
.is-drawing .dome-meridians path:nth-child(4), .is-drawing .dome-meridians path:nth-child(5) { animation-delay: 720ms; }
.is-drawing .dome-meridians path:nth-child(n+6) { animation-delay: 860ms; }
.is-drawing .dome-pin { animation: fade-up 500ms var(--ease) 900ms both; }
.w { display: inline-block; clip-path: inset(-.35em -.12em -.45em -.12em); vertical-align: top; }
.w > span { display: inline-block; }
.is-drawing h1 .w > span { animation: word-rise 760ms var(--ease) both; animation-delay: calc(180ms + var(--i, 0) * 55ms); }
@keyframes word-rise { from { transform: translateY(140%); } to { transform: none; } }
.is-drawing .lead__body > * { animation: fade-up 600ms var(--ease) both; }
.is-drawing .lead__body > :nth-child(1) { animation-delay: 560ms; }
.is-drawing .lead__body > :nth-child(2) { animation-delay: 640ms; }
.is-drawing .lead__body > :nth-child(3) { animation-delay: 720ms; }
.is-drawing .lead__mast { animation: fade-up 500ms var(--ease) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.is-drawing .sash { animation: ribbon-in 800ms var(--ease-in-out) 420ms both; }
.is-drawing .sash__list li, .is-drawing .sash__label, .is-drawing .sash__more { animation: fade-up 500ms var(--ease) both; animation-delay: calc(760ms + var(--i, 0) * 70ms); }
.is-drawing .lead__figure { animation: fade-up 600ms var(--ease) 780ms both; }

/* 19b. Reveal once — only what starts below the fold is held back; nothing in view at load ever hides. */
.rv { transition: opacity 650ms var(--ease), transform 650ms var(--ease); transition-delay: calc(var(--rv-i, 0) * 60ms); }
.rv:not(.rv-in) { opacity: 0; transform: translateY(22px); }
/* frames stay visible (and observable); only the photograph inside wipes up — clipping the observed box itself would hide it from IntersectionObserver */
.rv.frame:not(.rv-in), .rv.lens__stage:not(.rv-in) { opacity: 1; transform: none; }
.rv.frame img, .rv.lens__stage img { transition: clip-path 900ms var(--ease-in-out), transform 1300ms var(--ease); }
.rv.frame:not(.rv-in) img { clip-path: inset(0 0 100% 0); transform: scale(1.12); }
.rv.lens__stage:not(.rv-in) img { clip-path: inset(0 0 100% 0); }
.sec-head.rv:not(.rv-in) { opacity: 1; transform: none; }
.sec-head.rv::after { transform-origin: right; transition: transform 1000ms var(--ease-in-out) 120ms; }
.sec-head.rv:not(.rv-in)::after { transform: scaleX(0); }
.sec-head.rv h2 { transition: transform 700ms var(--ease), opacity 700ms var(--ease); }
.sec-head.rv:not(.rv-in) h2 { opacity: 0; transform: translateY(14px); }
.ruler.rv:not(.rv-in) { opacity: 1; transform: none; }
.ruler.rv::before { transform-origin: right; transition: transform 1100ms var(--ease-in-out); }
.ruler.rv:not(.rv-in)::before { transform: scaleX(0); }
.ruler.rv li { transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.ruler.rv li:nth-child(1) { transition-delay: 250ms; } .ruler.rv li:nth-child(2) { transition-delay: 420ms; } .ruler.rv li:nth-child(3) { transition-delay: 590ms; } .ruler.rv li:nth-child(4) { transition-delay: 760ms; }
.ruler.rv:not(.rv-in) li { opacity: 0; transform: translateY(8px); }

/* the map draws its wall, then the places light up */
.map.rv:not(.rv-in) { opacity: 1; transform: none; }
.map.rv .wall, .map.rv .haram { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1800ms var(--ease-in-out), fill-opacity 900ms var(--ease) 900ms; }
.map.rv:not(.rv-in) .wall, .map.rv:not(.rv-in) .haram { stroke-dashoffset: 1; fill-opacity: 0; }
.map .pin { transform-box: fill-box; transform-origin: center; }
.map.rv .pin { transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.map.rv:not(.rv-in) .pin { opacity: 0; transform: scale(.6); }
.map.rv .pin:nth-of-type(1) { transition-delay: 900ms; } .map.rv .pin:nth-of-type(2) { transition-delay: 980ms; } .map.rv .pin:nth-of-type(3) { transition-delay: 1060ms; }
.map.rv .pin:nth-of-type(4) { transition-delay: 1140ms; } .map.rv .pin:nth-of-type(5) { transition-delay: 1220ms; } .map.rv .pin:nth-of-type(6) { transition-delay: 1300ms; }

/* 19c. Live state — the gold ring breathes only around places where something is happening now */
.map .pin circle.ring { fill: none !important; stroke: var(--accent) !important; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: ring 2.6s var(--ease) infinite; pointer-events: none; }
@keyframes ring { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.3); opacity: 0; } }

/* 19d. The sash takes a new update: it enters where reading starts, the others make room */
.sash__list li.is-arriving { animation: sash-in 650ms var(--ease) both; }
@keyframes sash-in { from { clip-path: inset(0 0 0 100%); background: color-mix(in srgb, var(--accent) 28%, transparent); } 60% { background: color-mix(in srgb, var(--accent) 18%, transparent); } to { clip-path: inset(0 0 0 0); background: transparent; } }

/* 19e. Lens — the stage breathes slowly; the contact sheet opens into a viewer */
.lens__stage img { animation: ken 26s linear infinite alternate; transform-origin: 60% 50%; }
@keyframes ken { from { transform: scale(1); } to { transform: scale(1.07) translateX(-1.5%); } }
dialog.viewer { border: 0; padding: 0; margin: auto; width: 100vw; height: 100%; max-width: none; max-height: none; background: #08090B; color: #EDEEF0; overflow: hidden; }
dialog.viewer::backdrop { background: rgba(8, 9, 11, .97); }
dialog.viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.viewer__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px var(--gutter); font-size: var(--fs-small); color: #C3C7CC; }
.viewer__bar b { color: #EDEEF0; font-weight: 700; }
.viewer__stage { position: relative; display: grid; place-items: center; min-height: 0; padding-inline: clamp(56px, 7vw, 96px); touch-action: pan-y; }
.viewer__stage img { position: absolute; inset: 0; margin: auto; max-width: calc(100% - 2 * clamp(56px, 7vw, 96px)); max-height: calc(100% - 8px); width: auto; height: auto; object-fit: contain; view-transition-name: lens-photo; transition: opacity 200ms ease, filter 200ms ease; }
.viewer__stage img.is-swapping { opacity: .55; filter: blur(3px); }
.viewer__nav { position: absolute; top: 50%; width: 52px; height: 52px; display: grid; place-items: center; transform: translateY(-50%); background: rgba(237,238,240,.08); border: 0; color: #EDEEF0; transition: background var(--d-2) ease, transform 160ms var(--ease); }
.viewer__nav:active { transform: translateY(-50%) scale(.97); }
.viewer__nav svg { width: 22px; height: 22px; }
.viewer__nav--next { inset-inline-end: clamp(8px, 2vw, 24px); }
.viewer__nav--prev { inset-inline-start: clamp(8px, 2vw, 24px); }
.viewer__nav--prev svg { transform: scaleX(-1); }
.viewer__cap { display: grid; gap: 4px; padding: 14px var(--gutter) calc(18px + env(safe-area-inset-bottom, 0px)); max-width: 80ch; }
.viewer__cap time { color: var(--dome); font-weight: 800; font-variant-numeric: tabular-nums; }
.viewer__cap p { font-size: var(--fs-ui); line-height: 1.8; color: #EDEEF0; }
.viewer__cap a { color: #EDEEF0; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; font-weight: 700; font-size: var(--fs-small); justify-self: start; }
.viewer__strip { display: flex; gap: 6px; justify-content: center; padding-bottom: 6px; }
.viewer__strip button { width: 34px; height: 4px; border: 0; padding: 0; background: rgba(237,238,240,.25); transition: background var(--d-2) ease; }
.viewer__strip button[aria-current="true"] { background: var(--dome); }
@media (hover: hover) and (pointer: fine) { .viewer__nav:hover { background: rgba(237,238,240,.16); } }
::view-transition-group(lens-photo) { animation-duration: 420ms; animation-timing-function: var(--ease-in-out); }

/* 19f. Ribbon on scroll — on phones it steps aside while reading down and returns on the way up */
.ribbon { transition: transform 260ms var(--ease), box-shadow 260ms ease; }
.ribbon.is-scrolled { box-shadow: 0 12px 24px -20px rgba(18,20,23,.5); }
@media (max-width: 860px) { .ribbon.is-away { transform: translateY(-100%); } }

/* 19g. Between pages — the ribbon holds still, the page beneath turns like a sheet */
@view-transition { navigation: auto; }
.ribbon { view-transition-name: site-ribbon; }
.dock { view-transition-name: site-dock; }
::view-transition-old(root) { animation: 180ms var(--ease) both vt-out; }
::view-transition-new(root) { animation: 320ms var(--ease) both vt-in; }
@keyframes vt-out { to { opacity: 0; transform: translateX(-12px); } }
@keyframes vt-in { from { opacity: 0; transform: translateX(16px); } }
/* theme switch: the new edition spreads from the button that was pressed (JS drives the circle) */
html.theme-vt::view-transition-old(root), html.theme-vt::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.theme-vt::view-transition-group(site-ribbon), html.theme-vt::view-transition-group(site-dock) { animation: none; }

/* 19h. Feedback — presses, hovers, tabs */
.btn:active, .tool-btn:active, .icon-btn:active, .dock a:active, .dock button:active, .opt:active, .chip:active { transform: scale(.97); }
.tool-btn, .icon-btn, .opt, .chip { transition: background var(--d-2) ease, transform 160ms var(--ease); }
.tabs { position: relative; }
.tabs__ink { position: absolute; bottom: -1px; left: 0; height: 3px; width: 100px; background: var(--accent); transform-origin: left; pointer-events: none; transition: transform 260ms var(--ease-in-out); }
.tabs.has-ink [role="tab"][aria-selected="true"]::after { display: none; }
.is-switching { opacity: .55; filter: blur(2px); transition: opacity 150ms ease, filter 150ms ease; }
.feed, .stream { transition: opacity 220ms ease, filter 220ms ease; }
.flash { animation: flash 900ms var(--ease) both; }
@keyframes flash { from { background: color-mix(in srgb, var(--accent) 26%, transparent); } to { background: transparent; } }
.chart .bar { transform-box: fill-box; transform-origin: bottom; transition: transform 900ms var(--ease); }
.chart.rv:not(.rv-in) { opacity: 1; transform: none; }
.chart.rv:not(.rv-in) .bar { transform: scaleY(0); }
.chart.rv .bar:nth-of-type(2) { transition-delay: 60ms; } .chart.rv .bar:nth-of-type(3) { transition-delay: 120ms; } .chart.rv .bar:nth-of-type(4) { transition-delay: 180ms; }
.chart.rv .bar:nth-of-type(5) { transition-delay: 240ms; } .chart.rv .bar:nth-of-type(6) { transition-delay: 300ms; } .chart.rv .bar:nth-of-type(7) { transition-delay: 360ms; }

/* AI writing — words arrive one at a time while the assistant drafts; a person can stop it */
.typing::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-inline-start: 3px; vertical-align: -.15em; background: var(--silver); animation: caret 900ms steps(2, jump-none) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* ---------- 20. «مدار القدس» — the orbit map, printed ----------
   Real geometry, metres around the Dome, set like a newspaper map: ink lines on paper, the Haram and the Dome in gold,
   today's activity and the incursion route in red. */
.omap, .locator { --m-ink: var(--ink); --m-halo: var(--map-bg); --m-green: #6B7B3E; --m-water: #4E7A93; }
.omap {
  position: relative; aspect-ratio: 5 / 6; max-height: 86vh; width: 100%; background: var(--map-bg); overflow: hidden; isolation: isolate; contain: layout paint; color: var(--m-ink); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.omap__svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.omap__grat line { stroke: color-mix(in srgb, var(--m-ink) 7%, transparent); stroke-width: 1; vector-effect: non-scaling-stroke; }
/* the orbit has to read over the printed base: a firmer dash than anything under it */
.omap__rings circle { fill: none; stroke: color-mix(in srgb, var(--m-ink) 62%, transparent); stroke-width: 1.3; stroke-dasharray: 8 5; vector-effect: non-scaling-stroke; }
.omap__wallfill { fill: color-mix(in srgb, var(--m-ink) 5%, transparent); }
.omap__wall { fill: none; stroke: color-mix(in srgb, var(--m-ink) 82%, transparent); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.omap__haram { fill: rgba(240,168,8,.24); stroke: var(--dome-deep); stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.omap__dome { fill: var(--dome); }
.omap__qibli { fill: color-mix(in srgb, var(--m-ink) 45%, transparent); }
/* the printed base: built-up land as a tint, green and cemeteries, dashed wadis, streets by class with cased main roads */
.omap__base path, .loc__base use { fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
:is(.omap__base, .loc__base) .b-built { fill: color-mix(in srgb, var(--m-ink) 6%, transparent); }
:is(.omap__base, .loc__base) .b-green { fill: color-mix(in srgb, var(--m-green) 24%, transparent); }
:is(.omap__base, .loc__base) .b-cem { fill: color-mix(in srgb, var(--m-green) 13%, transparent); stroke: color-mix(in srgb, var(--m-ink) 30%, transparent); stroke-width: .7; stroke-dasharray: 1 2.5; }
:is(.omap__base, .loc__base) .b-water { stroke: color-mix(in srgb, var(--m-water) 75%, transparent); stroke-width: 1; stroke-dasharray: 6 3; }
:is(.omap__base, .loc__base) .b-street { stroke: color-mix(in srgb, var(--m-ink) 15%, transparent); stroke-width: .6; }
:is(.omap__base, .loc__base) .b-tertiary { stroke: color-mix(in srgb, var(--m-ink) 30%, transparent); stroke-width: .9; }
:is(.omap__base, .loc__base) .b-primary-case { stroke: color-mix(in srgb, var(--m-ink) 45%, transparent); stroke-width: 3.2; }
:is(.omap__base, .loc__base) .b-primary { stroke: var(--map-bg); stroke-width: 1.7; }
:is(.omap__base, .loc__base) .b-major-case { stroke: color-mix(in srgb, var(--m-ink) 60%, transparent); stroke-width: 4.4; }
:is(.omap__base, .loc__base) .b-major { stroke: var(--sheet); stroke-width: 2.5; }
:is(.omap__base, .loc__base) .b-alley { stroke: color-mix(in srgb, var(--m-ink) 32%, transparent); stroke-width: .8; opacity: 0; transition: opacity 500ms ease; }
.omap:is([data-view="old"], [data-view="aqsa"]) .omap__base .b-alley { opacity: 1; }
/* the separation wall: a heavy rule with a comb, the way printed maps draw a barrier */
:is(.omap__base, .loc__base) .b-barrier { stroke: var(--m-ink); stroke-width: 2.2; }
:is(.omap__base, .loc__base) .b-barrier-ticks { stroke: var(--m-ink); stroke-width: 7; stroke-dasharray: 1.5 6; stroke-linecap: butt; }
.omap.js-draw .omap__base { opacity: 0; transition: opacity 900ms ease; }
.omap.js-draw.is-drawn .omap__base { opacity: 1; }
.omap__routeg { opacity: 0; transition: opacity 400ms ease; }
.omap.is-aqsa .omap__routeg { opacity: 1; transition-delay: 700ms; }
.omap__route { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linejoin: round; stroke-dasharray: .018 .012; vector-effect: non-scaling-stroke; animation: march 2.4s linear infinite; }
@keyframes march { to { stroke-dashoffset: -.06; } }
.omap__walker { fill: var(--accent); stroke: var(--map-bg); stroke-width: 2; vector-effect: non-scaling-stroke; }

/* draw-in once: the wall is traced, the Haram fills, the orbits run, then the places arrive */
.omap.js-draw .omap__wall, .omap.js-draw .omap__haram { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1600ms var(--ease-in-out); }
.omap.js-draw .omap__wallfill, .omap.js-draw .omap__dome, .omap.js-draw .omap__qibli { opacity: 0; transition: opacity 700ms ease 1100ms; }
.omap.js-draw .omap__rings { opacity: 0; transition: opacity 900ms ease 500ms; }
.omap.js-draw .omap__layer > *, .omap.js-draw .omap__labels > * { opacity: 0; transition: opacity 500ms var(--ease); }
.omap.js-draw.is-drawn .omap__wall, .omap.js-draw.is-drawn .omap__haram { stroke-dashoffset: 0; }
.omap.js-draw.is-drawn .omap__wallfill, .omap.js-draw.is-drawn .omap__dome, .omap.js-draw.is-drawn .omap__qibli, .omap.js-draw.is-drawn .omap__rings { opacity: 1; }
.omap.js-draw.is-drawn .omap__layer > *, .omap.js-draw.is-drawn .omap__labels > * { opacity: 1; transition-delay: 1200ms; }

.omap__layer, .omap__labels { position: absolute; inset: 0; pointer-events: none; }
.omap__layer > button { pointer-events: auto; }
.omap__lbl, .omap__grat { position: absolute; left: 0; top: 0; white-space: nowrap; pointer-events: none; font-family: var(--f-display); }
.omap__lbl { translate: -50% -50%; }
.omap__lbl.is-quarter { font-size: 13px; font-weight: 600; color: color-mix(in srgb, var(--m-ink) 48%, transparent); }
.omap__lbl.is-monument { font-size: 12.5px; font-weight: 700; color: var(--dome-ink); text-shadow: 0 0 6px var(--m-halo), 0 0 2px var(--m-halo); }
.omap__lbl.is-ring { font-size: 12.5px; font-weight: 600; color: var(--ink-3); background: var(--m-halo); padding: 0 4px; }
.omap__lbl:is(.is-hood, .is-town, .is-peak, .is-region, .is-checkpoint) { text-shadow: 0 0 6px var(--m-halo), 0 0 3px var(--m-halo), 0 0 2px var(--m-halo); }
.omap__lbl.is-hood { font-size: 12.5px; font-weight: 600; color: color-mix(in srgb, var(--m-ink) 62%, var(--map-bg)); }
.omap__lbl.is-town { font-size: 13px; font-weight: 700; color: color-mix(in srgb, var(--m-ink) 66%, var(--map-bg)); }
.omap__lbl.is-region { font-size: 18px; font-weight: 700; color: color-mix(in srgb, var(--m-ink) 50%, var(--map-bg)); }
.omap__lbl.is-peak { font-size: 12.5px; font-weight: 600; color: color-mix(in srgb, var(--m-ink) 66%, var(--map-bg)); }
.omap__lbl.is-peak::before { content: "▲"; font-size: 8px; margin-inline-end: 4px; vertical-align: 1px; }
.omap__lbl.is-checkpoint { font-size: 12.5px; font-weight: 700; color: var(--m-ink); display: inline-flex; align-items: center; gap: 5px; translate: -9px -50%; }
.omap__lbl.is-checkpoint::before { content: ""; width: 9px; height: 9px; background: var(--m-ink); outline: 2px solid var(--m-halo); order: 2; }
.omap__lbl.is-barrier { font-size: 12.5px; font-weight: 800; color: var(--m-ink); background: var(--m-halo); padding: 0 6px; translate: calc(-100% - 10px) -50%; }
.omap__lbl.is-route { font-size: 12.5px; font-weight: 800; color: var(--on-accent); background: var(--accent); padding: 2px 8px; translate: -50% -170%; }
.omap__grat { font-size: 12.5px; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.omap__grat[data-axis="x"] { translate: -50% 0; }
.omap__grat[data-axis="y"] { translate: -100% -50%; }

/* places — a count bubble whose area follows the week's stories; red where there was news today */
.omap__pin, .omap__gate { position: absolute; left: 0; top: 0; width: 0; height: 0; padding: 0; border: 0; background: none; color: inherit; font-family: var(--f-display); cursor: pointer; }
.omap__pin i { position: absolute; left: 0; top: 0; width: var(--s); height: var(--s); translate: -50% -50%; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 12.5px; font-variant-numeric: tabular-nums; background: var(--map-bg); color: var(--m-ink); box-shadow: inset 0 0 0 1.5px var(--m-ink); transition: scale 200ms var(--ease), background 200ms ease; }
.omap__pin i::before { content: ""; position: absolute; inset: -12px; border-radius: 50%; }
.omap__pin.is-hot i { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.omap__pin.is-hot i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--accent); animation: ring 2.6s var(--ease) infinite; }
.omap__pin span { position: absolute; top: 0; left: calc(var(--s, 24px) / 2 + 8px); translate: 0 -50%; white-space: nowrap; font-size: 13.5px; font-weight: 700; color: var(--m-ink); text-shadow: 0 0 8px var(--m-halo), 0 0 3px var(--m-halo), 0 0 2px var(--m-halo); }
.omap__pin.is-edge i { scale: .8; }
.omap__pin.is-edge span::after { content: " · " attr(data-dist); font-weight: 500; color: color-mix(in srgb, var(--m-ink) 62%, transparent); }
/* beyond the frame: one strip along the top, each place with its bearing, count and distance */
.omap__off { position: absolute; z-index: 4; inset-inline: 0; top: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 16px; padding: 6px 12px; background: color-mix(in srgb, var(--sheet) 94%, transparent); box-shadow: 0 1px 0 var(--rule-strong); font-family: var(--f-display); }
.omap__off-lead { font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.omap__off .omap__pin { position: relative; width: auto; height: auto; min-height: 34px; display: inline-flex; align-items: center; gap: 7px; }
.omap__off .omap__pin::before { content: ""; flex: none; width: 0; height: 0; border-inline: 4px solid transparent; border-bottom: 9px solid var(--accent); rotate: var(--bearing, 0deg); }
.omap__off .omap__pin i { position: relative; left: auto; top: auto; translate: none; scale: 1; width: 26px; height: 26px; font-size: 12.5px; }
@media (pointer: coarse) { .omap__off .omap__pin { min-height: 44px; } }
.omap__off .omap__pin span { position: static; translate: none; font-size: 13px; text-shadow: none; }
.omap__off .omap__pin:hover i, .omap__off .omap__pin.is-active i { scale: 1.1; }
.omap.has-off .omap__north { top: calc(var(--off-h, 46px) + 10px); }
/* a phone-width map keeps the strip to one line: the arrows say «beyond», the card gives the distance */
.omap { container: omap / inline-size; }
@container omap (max-width: 520px) {
  .omap__grat { display: none; }
  .omap__off-lead { display: none; }
  .omap__off { gap: 2px 12px; padding-block: 4px; }
  .omap__off .omap__pin span::after { content: none; }
}
.omap__pin:hover i, .omap__pin:focus-visible i, .omap__pin.is-active i { scale: 1.12; }
.omap__pin:focus-visible { outline: none; }
.omap__pin:focus-visible i { outline: 2px solid var(--accent); outline-offset: 3px; }

/* gates — the arch of the dome, inked by today's status */
.omap__gate i { position: absolute; left: 0; top: 0; width: 15px; height: 12px; translate: -50% -70%; border: 2px solid currentColor; border-bottom: 0; border-radius: 8px 8px 0 0 / 11px 11px 0 0; background: var(--map-bg); transition: scale 200ms var(--ease); }
.omap__gate i::before { content: ""; position: absolute; inset: -14px; }
.omap__gate span { position: absolute; top: 0; white-space: nowrap; font-size: 12.5px; font-weight: 700; translate: 0 -60%; text-shadow: 0 0 8px var(--m-halo), 0 0 3px var(--m-halo), 0 0 2px var(--m-halo); }
.omap__gate.is-minor span { display: none; }
.omap__gate.is-w span { right: 14px; } .omap__gate.is-e span { left: 14px; }
.omap__gate.is-n span { left: 50%; translate: -50% -230%; } .omap__gate.is-s span { left: 50%; translate: -50% 70%; }
.omap__gate.is-open { color: color-mix(in srgb, var(--m-ink) 82%, transparent); }
.omap__gate.is-limited, .omap__gate.is-checkpoint, .omap__gate.is-crowd { color: var(--accent); }
.omap__gate.is-checkpoint i, .omap__gate.is-crowd i { border-style: dashed; }
.omap__gate.is-crowd i { background: color-mix(in srgb, var(--accent) 30%, var(--map-bg)); }
.omap__gate.is-closed { color: var(--m-ink); }
.omap__gate.is-closed i { background: var(--m-ink); }
.omap__gate.is-incursion { color: var(--accent); }
.omap__gate.is-incursion i { background: var(--accent); }
.omap__gate.is-sealed { color: var(--ink-3); }
.omap__gate.is-sealed i { border-style: dotted; }
.omap__gate:hover i, .omap__gate:focus-visible i, .omap__gate.is-active i { scale: 1.25; }
.omap__gate:focus-visible { outline: none; }
.omap__gate:focus-visible i { outline: 2px solid var(--accent); outline-offset: 3px; }

/* chrome: north, scale */
.omap__chrome { position: absolute; inset: 0; pointer-events: none; font-family: var(--f-display); }
.omap__north { position: absolute; top: 12px; left: 12px; display: grid; justify-items: center; gap: 2px; font-size: 12.5px; font-weight: 800; color: var(--m-ink); }
.omap__north i { width: 0; height: 0; border-inline: 5px solid transparent; border-bottom: 14px solid var(--accent); order: -1; }
.omap__scale { position: absolute; bottom: 30px; left: 12px; display: grid; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--m-ink); }
.omap__scale i { display: block; height: 6px; border: 1.5px solid var(--m-ink); border-top: 0; }

/* the card — a cutting that grows from the place it belongs to */
.omap__card { position: absolute; left: 0; top: 0; z-index: 5; width: max-content; max-width: min(280px, 80%); display: grid; gap: 4px; padding: 12px 14px; background: var(--sheet); color: var(--ink); border-top: 3px solid var(--accent); box-shadow: 0 0 0 1px var(--rule), 0 16px 34px -14px rgba(18,20,23,.45); pointer-events: auto; }
.omap__card.is-in { animation: card-in 200ms var(--ease); }
@keyframes card-in { from { opacity: 0; scale: .96; } }
.omap__card b { font-family: var(--f-head); font-size: 19px; font-weight: 700; line-height: 1.35; }
.omap__card-meta { font-size: 13px; color: var(--ink-3); line-height: 1.6; }
.omap__card a { font-family: var(--f-head); font-size: 18px; font-weight: 600; line-height: 1.5; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; text-decoration-thickness: 2px; }
.omap__card a time { font-family: var(--f-display); font-size: 13px; font-weight: 800; color: var(--accent-ink); margin-inline-end: 6px; text-decoration: none; display: inline-block; }
.omap__card-status { font-size: 13px; font-weight: 800; }
.omap__card-status.is-limited, .omap__card-status.is-checkpoint, .omap__card-status.is-incursion, .omap__card-status.is-crowd { color: var(--accent-ink); }
.omap__card-status.is-closed { color: var(--ink); }
.omap__card-status.is-open { color: var(--ok); }
.omap__card-status.is-sealed { color: var(--ink-3); }

/* the panel beside the map: same data, readable as a list */
.omap__list { display: grid; }
.omap__list li + li { border-top: 1px solid var(--rule); }
.omap__list button { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; align-items: center; padding: 12px 8px; background: none; border: 0; color: var(--ink); text-align: start; transition: background var(--d-2) ease; }
.omap__list button:hover, .omap__list button:focus-visible { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.omap__list b { font-family: var(--f-head); font-size: var(--fs-h5); font-weight: 700; line-height: 1.4; }
.omap__list small { grid-column: 1 / -1; font-size: var(--fs-small); color: var(--ink-2); line-height: 1.6; }
.omap__count { font-weight: 800; font-size: 1.15rem; color: var(--accent-ink); font-variant-numeric: tabular-nums; grid-row: span 2; }
.omap__list.is-gates button, [data-panel="old"] .omap__list button { grid-template-columns: auto minmax(0, 1fr) auto; }
.omap__list.is-gates small, [data-panel="old"] .omap__list small { grid-column: 2 / -1; }
.omap__glyph { width: 14px; height: 11px; border: 2px solid currentColor; border-bottom: 0; border-radius: 7px 7px 0 0 / 10px 10px 0 0; }
.omap__glyph.is-open, .omap__st.is-open { color: var(--ink-2); }
.omap__glyph.is-limited, .omap__glyph.is-checkpoint, .omap__glyph.is-incursion, .omap__glyph.is-crowd, .omap__st.is-limited, .omap__st.is-checkpoint, .omap__st.is-incursion, .omap__st.is-crowd { color: var(--accent-ink); }
.omap__glyph.is-incursion { background: var(--accent); }
.omap__glyph.is-checkpoint, .omap__glyph.is-crowd { border-style: dashed; }
.omap__glyph.is-crowd { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.omap__glyph.is-closed, .omap__st.is-closed { color: var(--ink); }
.omap__glyph.is-closed { background: var(--ink); }
.omap__glyph.is-sealed, .omap__st.is-sealed { color: var(--ink-3); }
.omap__glyph.is-sealed { border-style: dotted; }
.omap__st { font-size: var(--fs-meta); font-weight: 800; white-space: nowrap; }
.omap__now { display: grid; gap: 2px; padding-bottom: var(--s-4); margin-bottom: var(--s-2); border-bottom: 1px solid var(--rule); }
.omap__now .madd { font-size: 1.9rem; color: var(--ink); }
.omap__now > span:last-child { font-size: var(--fs-small); color: var(--ink-2); }
/* declutter: a label that would collide turns to its other side, or steps back */
.omap__pin.is-flip span { left: auto; right: calc(var(--s, 24px) / 2 + 8px); }
.omap__pin span, .omap__gate span { transition: opacity 180ms var(--ease); }
.omap__pin.is-quiet span, .omap__gate.is-quiet span, .omap__labels > .is-quiet, .omap.js-draw.is-drawn .omap__labels > .is-quiet { opacity: 0; }
.omap.js-draw.is-drawn.is-live .omap__labels > * { transition: opacity 180ms var(--ease); transition-delay: 0s; }
@media (max-width: 900px) { .omap { aspect-ratio: 4 / 5; max-height: none; } .omap__pin span { font-size: 12.5px; } }
@media (prefers-reduced-motion: reduce) { .omap__route { animation: none; } .omap__pin.is-hot i::after { animation: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .pulse::after, .dome-loader i, .map .ring, .lens__stage img, .typing::after { animation: none !important; }
  .dome-loader i { opacity: .6; }
  .rv, .rv img { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  @view-transition { navigation: none; }
}
@media (forced-colors: active) {
  .breaking__label, .frame__badge, .frame--folded { clip-path: none; border: 1px solid; }
  .prov::before, .status::before, .dome-mark, .kicker__sq { forced-color-adjust: none; }
}

/* map key, set under every orbit map */
.omap-key { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--fs-meta); color: var(--ink-3); }
.omap-key span { display: inline-flex; align-items: center; gap: 8px; }
.omap-key i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink); }
.omap-key i.is-hot { background: var(--accent); box-shadow: none; }
.omap-key i.is-ring { box-shadow: none; border: 1.3px dashed color-mix(in srgb, var(--ink) 62%, transparent); }
.omap-key i.is-count { width: 20px; height: 20px; display: grid; place-items: center; font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--ink); background: var(--map-bg); }
.omap-key i.is-wall { width: 18px; height: 10px; border-radius: 0; box-shadow: inset 0 0 0 1.6px var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.omap-key i.is-barrier { width: 22px; height: 8px; border-radius: 0; box-shadow: none; background: linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat, repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px 6px); }
.omap-key i.is-road { width: 22px; height: 6px; border-radius: 0; box-shadow: inset 0 0 0 1.2px color-mix(in srgb, var(--ink) 60%, transparent); background: var(--sheet); }
.omap-key__src { flex-basis: 100%; }


/* ---------- 21. Templates carried over from the brand's own social posts ----------
   «قالب الأسير» → .captive  ·  «أعداد المقتحمين» → .count-card
   Every image here comes from the designer's two PSDs in «ثيم العاصمة» (see index.html#assets). */

/* the cell: a dark panel lit through the bars; the prisoner printed on paper; the archive on film */
.captive { --ink: #EDEEF0; --ink-2: rgba(237,238,240,.82); --ink-3: rgba(237,238,240,.66); --gold-ink: var(--gold); --rule: rgba(237,238,240,.16);
  position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "text print" "film print";
  min-height: clamp(520px, 44vw, 620px); background: #120E0A; color: var(--ink); }
.captive__cell { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; object-position: 56% 30%; filter: sepia(.32) saturate(1.15) brightness(.92); }
.captive::before { content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(270deg, rgba(18,12,8,.94) 0%, rgba(18,12,8,.78) 30%, rgba(18,12,8,.12) 58%, rgba(18,12,8,.5) 100%), linear-gradient(0deg, rgba(18,12,8,.7) 0%, rgba(18,12,8,0) 34%); }
.captive__glow { position: absolute; z-index: -1; top: -14%; left: 40%; width: 36%; aspect-ratio: 1; background: url(../img/glow.webp) center / contain no-repeat; mix-blend-mode: screen; opacity: .62; pointer-events: none; }
.captive__tex { position: absolute; inset: 0; z-index: -1; background: url(../img/halftone.webp) center / cover no-repeat; mix-blend-mode: soft-light; opacity: .7; pointer-events: none; }
.captive__wire { position: absolute; z-index: 0; top: -2%; inset-inline-end: -7%; width: min(46%, 470px); height: auto; rotate: -7deg; filter: drop-shadow(0 8px 10px rgba(0,0,0,.55)); pointer-events: none; }
/* the tab that hangs from the top edge of every Al-Asima post, with the light logo inside */
.captive__tab { position: absolute; z-index: 2; top: 0; inset-inline-start: clamp(20px, 3vw, 40px); width: 66px; padding: 30px 11px 12px; background: #1C150F; box-shadow: 0 12px 24px -10px rgba(0,0,0,.7); }
.captive__tab img { display: block; width: 100%; height: auto; }
.captive__text { grid-area: text; align-self: start; display: grid; gap: var(--s-4); max-width: 36rem; padding: 148px clamp(24px, 4vw, 56px) var(--s-5); }
.captive__count { font-size: clamp(1.7rem, 1.05rem + 2.1vw, 2.75rem); color: var(--ink); }
.captive__count .madd__fig { color: var(--gold); }
.captive h3 { font-size: clamp(1.6rem, 1.15rem + 1.5vw, 2.5rem); font-weight: 800; line-height: 1.45; color: #F4F5F6; }
.captive h3 .hl-u { font-size: .74em; font-weight: 700; }
.captive h3 a { color: inherit; }
.captive h3 b { display: block; color: var(--gold); font-weight: 800; }
.captive__meta { font-size: var(--fs-meta); color: var(--ink-3); }
.captive__more { justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: var(--fs-small); font-weight: 700; color: var(--ink); box-shadow: inset 0 -2px 0 var(--gold); }
.captive__more:hover { color: var(--gold); }
.captive__print { grid-area: print; align-self: center; justify-self: center; z-index: 1; width: min(76%, 340px); margin: clamp(40px, 5vw, 64px) 0; padding: 12px; background: #F3EFE6; rotate: -2.5deg; box-shadow: 0 30px 44px -22px rgba(0,0,0,.9), 0 2px 0 rgba(0,0,0,.3); }
.captive__print img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 26%; }
.captive__film { grid-area: film; align-self: end; display: grid; gap: 8px; justify-items: start; padding: 0 clamp(24px, 4vw, 56px) clamp(28px, 3vw, 40px); rotate: -2deg; }
.film { display: flex; gap: 8px; padding: 20px 10px; background-color: #0B0907; box-shadow: 0 16px 26px -14px rgba(0,0,0,.8);
  background-image: repeating-linear-gradient(90deg, rgba(237,238,240,.78) 0 9px, transparent 9px 19px), repeating-linear-gradient(90deg, rgba(237,238,240,.78) 0 9px, transparent 9px 19px);
  background-size: 100% 6px; background-position: 0 7px, 0 calc(100% - 7px); background-repeat: no-repeat; }
.film img { display: block; width: clamp(78px, 8vw, 108px); height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 22%; filter: grayscale(.45) contrast(1.06); transition: filter 200ms ease; }
@media (hover: hover) and (pointer: fine) { .film img:hover { filter: none; } }
.captive__film figcaption { font-size: var(--fs-meta); color: var(--ink-3); }
/* first sight: the print develops and settles, the film slides in; content on screen at load is never hidden */
.captive.rv:not(.rv-in) { opacity: 1; transform: none; }
.captive.rv .captive__print { transition: rotate 1100ms var(--ease), translate 1100ms var(--ease), filter 1700ms var(--ease); }
.captive.rv:not(.rv-in) .captive__print { rotate: -7deg; translate: 0 28px; filter: sepia(1) brightness(1.3) blur(1.5px); }
.captive.rv .captive__film { transition: translate 1200ms var(--ease) 250ms, opacity 700ms ease 250ms; }
.captive.rv:not(.rv-in) .captive__film { translate: -10% 0; opacity: 0; }
@media (max-width: 900px) {
  .captive { grid-template-columns: minmax(0, 1fr); grid-template-areas: "print" "text" "film"; min-height: 0; }
  .captive__cell { height: 420px; object-position: 58% 18%; }
  .captive::before { background: linear-gradient(180deg, rgba(18,12,8,.25) 0, rgba(18,12,8,.55) 260px, #120E0A 420px); }
  .captive__glow { top: -8%; left: 36%; width: 62%; }
  .captive__wire { width: 64%; top: -1%; }
  .captive__print { width: min(64%, 300px); margin: 116px 0 0; }
  .captive__text { padding: var(--s-6) var(--gutter) var(--s-5); }
  .captive__film { padding: 0 var(--gutter) var(--s-6); max-width: 100%; overflow: hidden; }
  .captive__tab { width: 54px; padding: 24px 9px 10px; }
}

/* the count post on the web: the stretched word, the gold number, the alert signs at the edges */
.count-card { --ink: #EDEEF0; --ink-2: #D2D6DB; --gold-ink: var(--gold);
  position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; margin-block: var(--s-6); padding: clamp(64px, 8vw, 92px) clamp(20px, 4vw, 48px) clamp(150px, 18vw, 210px); background: #0E1013 url(../img/noise.webp) 0 0 / 256px; background-blend-mode: soft-light; color: var(--ink); text-align: center; }
.count-card__photo { position: absolute; inset: auto 0 0; z-index: -3; width: 100%; height: 64%; object-fit: cover; object-position: 50% 64%; filter: saturate(.85) brightness(.9);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 52%); mask-image: linear-gradient(180deg, transparent 0%, #000 52%); }
.count-card::before { content: ""; position: absolute; z-index: -2; top: -10%; inset-inline-end: -6%; width: 46%; aspect-ratio: 1; background: url(../img/grid-tilt.webp) center / contain no-repeat; opacity: .12; }
.count-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: url(../img/bokeh.webp) center / cover no-repeat; mix-blend-mode: screen; opacity: .4; pointer-events: none; }
.count-card__embers { position: absolute; z-index: -1; bottom: 0; inset-inline-end: 0; width: 64%; aspect-ratio: 800 / 522; background: url(../img/embers.webp) left bottom / contain no-repeat; mix-blend-mode: screen; opacity: .32; pointer-events: none; }
.count-card__alert { position: absolute; z-index: 0; width: clamp(96px, 16vw, 150px); height: auto; bottom: -26px; inset-inline-end: -18px; rotate: -14deg; filter: blur(1.6px) drop-shadow(0 10px 14px rgba(0,0,0,.5)); pointer-events: none; }
.count-card__alert.is-edge { bottom: auto; top: 46%; inset-inline-end: auto; inset-inline-start: -46px; rotate: 16deg; width: clamp(80px, 12vw, 120px); filter: blur(2.2px); }
.count-card__logo { position: absolute; top: 16px; inset-inline-start: 18px; width: 40px; height: auto; }
.count-card .madd { justify-content: center; font-size: clamp(1.6rem, 1rem + 2.4vw, 2.7rem); color: var(--ink); }
.count-card .madd__fig { background: linear-gradient(180deg, #F8CB52 0%, var(--gold) 46%, var(--gold-deep) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.count-card .madd__tail { color: var(--ink); font-weight: 600; text-align: center; }

/* the locator tile, printed like the map */
.locator .loc__bg { fill: var(--map-bg); }
.locator .loc__ring { fill: none; stroke: color-mix(in srgb, var(--ink) 58%, transparent); stroke-width: 1.1; stroke-dasharray: 6 4; }
.locator .loc__orbit { fill: none; stroke: color-mix(in srgb, var(--accent) 60%, transparent); stroke-width: 1; stroke-dasharray: 3 5; }
.locator .loc__wall { fill: color-mix(in srgb, var(--ink) 5%, transparent); stroke: color-mix(in srgb, var(--ink) 70%, transparent); stroke-width: 1.2; }
.locator .loc__haram { fill: rgba(240,168,8,.26); stroke: var(--dome-deep); stroke-width: 1; }
.locator .loc__mark { fill: var(--accent); }
.locator .loc__arrow { fill: color-mix(in srgb, var(--ink) 75%, transparent); }
.locator .loc__line { stroke: color-mix(in srgb, var(--ink) 40%, transparent); stroke-width: 1; }
.locator .loc__label { fill: var(--ink); font-family: var(--f-display); font-weight: 700; }
.locator .loc__label--ltr { direction: ltr; }
.locator svg * { vector-effect: non-scaling-stroke; }

/* 22. Slider — a scroll-snap row with its own controls: arrows, a count and a progress rule instead of a scrollbar */
.slider-ctl { display: flex; align-items: center; gap: 12px; margin-top: var(--s-4); }
.slider-ctl__btn { width: 44px; height: 44px; display: grid; place-items: center; flex: none; border: 0; background: none; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-strong); cursor: pointer; transition: background var(--d-2) ease, color var(--d-2) ease, opacity var(--d-2) ease; }
.slider-ctl__btn svg { width: 20px; height: 20px; }
.slider-ctl__btn[data-dir="-1"] svg { transform: scaleX(-1); }
.slider-ctl__btn:disabled { opacity: .3; cursor: default; }
.slider-ctl__btn:active:not(:disabled) { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .slider-ctl__btn:hover:not(:disabled) { background: var(--ink); color: var(--bg); } }
.slider-ctl__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.slider-ctl__track { flex: 1; min-width: 0; height: 2px; background: var(--rule); position: relative; overflow: hidden; }
/* the bar spans the track and is scaled from its reading start, so it animates on the compositor, not through layout */
.slider-ctl__track i { position: absolute; inset-block: 0; inset-inline-start: 0; width: 100%; transform-origin: right; scale: var(--w, .5) 1; translate: var(--x, 0) 0; background: var(--accent); transition: translate 300ms var(--ease), scale 300ms var(--ease); }
.slider-ctl__count { font-size: var(--fs-meta); font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { [data-slider] { scroll-behavior: auto; } .slider-ctl__track i { transition: none; } }

