/* Wasl website: the app's Live Current world (DESIGN.md) as a 3D story. HTML chapters sit over one fixed canvas;
   logical properties only, so Arabic and Sorani (RTL) and English (LTR) share one sheet. */

@font-face {
  font-family: "Geologica";
  src: url("/assets/fonts/geologica.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212;
}
@font-face {
  font-family: "Noto Kufi Arabic";
  src: url("/assets/fonts/noto-kufi-arabic.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

:root {
  --ground: #f3f3f0;
  --surface: #ffffff;
  --surface-2: #eaeae5;
  --ink: #17171a;
  --ink-2: #5c5b56;
  --graphite: #121214;
  --night-surface: #1c1c1f;
  --night-surface-2: #28282c;
  --night-ink: #f3f3ef;
  --night-ink-2: #a8a7a1;
  --amber: #f5a524;
  --amber-night: #ffb224;
  --amber-text: #935600;
  --on-amber: #17171a;
  --money-in: #0c743b;
  --ring: var(--amber);

  --font: "Geologica", "Noto Kufi Arabic", system-ui, sans-serif;
  --t1: 14px;
  --t2: 18px;
  --t3: clamp(20px, 1.6vw, 24px);
  --t4: clamp(24px, 2.6vw, 36px);
  --t5: clamp(44px, 6.6vw, 96px);

  --m: clamp(20px, 2.4vw, 36px);
  --gap: clamp(120px, 14vw, 200px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --settle: cubic-bezier(0.34, 1.32, 0.64, 1);

  --fg: var(--night-ink);
  --fg-2: var(--night-ink-2);
  --bg: var(--graphite);
}

*,
*::before,
*::after { box-sizing: border-box; }
/* On the story the browser's scrollbar is hidden: the page still scrolls natively, and the Dial shows where you are.
   The legal pages keep a thin themed one. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-width: thin; scrollbar-color: var(--ink-2) transparent; }
html:has(body.home) { scrollbar-width: none; }
html:has(body.home)::-webkit-scrollbar { display: none; }
body {
  margin: 0;
  background: var(--graphite);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--t2);
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
body:lang(en) { line-height: 1.55; }
body[data-theme="day"] { --fg: var(--ink); --fg-2: var(--ink-2); --bg: var(--ground); --ring: var(--amber); }
body[data-theme="night"] { --ring: var(--amber-night); }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 700; line-height: 1.3; text-wrap: balance; }
:lang(en) :is(h1, h2, h3) { letter-spacing: -0.02em; line-height: 1.1; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.28em; transition: color 200ms ease, text-decoration-color 200ms ease; }
a:hover { text-decoration-color: var(--amber); }
button { font: inherit; color: inherit; }
::selection { background: var(--amber); color: var(--on-amber); }
:focus-visible { outline: 2px solid var(--amber-night); outline-offset: 3px; border-radius: 6px; }
body[data-theme="day"] :focus-visible, .doc-page :focus-visible, .index :focus-visible, .price :focus-visible, .faq :focus-visible { outline-color: var(--amber-text); }

[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; inset-inline-start: var(--m); inset-block-start: 12px; z-index: 60; padding: 10px 18px; border-radius: 999px; background: var(--amber-night); color: var(--on-amber); transform: translateY(-180%); transition: transform 200ms var(--ease-out); }
.skip:focus { transform: none; }

/* --- buttons --------------------------------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  font: 600 16px/1.2 var(--font);
  text-decoration: none;
  white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
  touch-action: manipulation;
}
.btn--amber { background: var(--amber-night); color: var(--on-amber); }
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: #2b2b30; }
  .btn--amber:hover { background: #ffc04d; }
}
.link { border: 0; background: none; padding: 8px 0; color: var(--amber-night); font-weight: 600; text-decoration: underline; text-underline-offset: 0.3em; cursor: pointer; }
.round {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--night-surface-2);
  color: var(--night-ink);
  cursor: pointer;
  transition: transform 110ms var(--ease-out), opacity 160ms ease;
  touch-action: manipulation;
}
.round:active { transform: scale(0.94); }
.round[aria-disabled="true"] { opacity: 0.35; cursor: default; }
.round svg, .tool svg, .slide__knob svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* --- the canvas and the still pictures ---------------------------------------------------------------------------- */
#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; opacity: 0; transition: opacity 1200ms ease; touch-action: pan-y pinch-zoom; }
/* the cut between far-apart places (the morning street, then the map of Iraq): a breath of graphite */
/* the governorates' names over the 3D map (scene/index.js places them) */
.map-labels { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0; overflow: hidden; }
.map-label {
  position: absolute;
  inset-block-start: 0;
  left: 0;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgb(18 18 20 / 0.72);
  color: #f3f3ef;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  transform: translate(calc(var(--x, -999px) - 50%), var(--y, -999px));
  transition: opacity 200ms ease, background-color 200ms ease, color 200ms ease;
}
.map-label.is-on { opacity: 1; }
.map-label.is-picked { background: var(--amber-night); color: var(--on-amber); font-size: 13px; }
html[data-tier="still"] .map-labels { display: none; }
.veil { position: fixed; inset: 0; z-index: 0; background: var(--graphite); opacity: 0; pointer-events: none; }
html.is-cutting .veil { opacity: 1 !important; transition: opacity 220ms var(--ease-in-out); }
.has-scene #scene { opacity: 1; }
html[data-tier="still"] #scene { display: none; }
html.is-locked #scene { touch-action: none; z-index: 2; }
.stills { position: fixed; inset: 0; z-index: 0; display: none; background: var(--graphite); }
html[data-tier="still"] .stills { display: block; }
.stills img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 700ms ease; }
.stills img.is-on { opacity: 1; }

/* --- top bar ----------------------------------------------------------------------------------------------------- */
.bar {
  position: fixed;
  inset-inline: 0;
  inset-block-start: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px var(--m);
  color: var(--fg);
  font-size: var(--t1);
  transition: color 400ms ease, opacity 240ms ease, visibility 240ms;
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.doc-page .bar { position: relative; color: var(--ink); }
.bar__home { display: block; color: inherit; }
.bar__mark { width: 40px; height: 40px; }
.bar__nav { margin-inline-start: auto; }
.bar__links { display: flex; gap: 26px; }
.bar__links a, .langs a { text-decoration: none; }
.bar__links a:hover, .langs a:hover, .bar__links a[aria-current] { text-decoration: underline; text-decoration-color: var(--amber); }
.langs { display: flex; gap: 4px; }
.langs a, .langs span { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 8px; }
.langs span[aria-current] { font-weight: 700; }
.tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fg) 10%, transparent);
  color: var(--fg);
  cursor: pointer;
  transition: background-color 200ms ease, transform 110ms var(--ease-out);
}
.tool:active { transform: scale(0.95); }
.tool[aria-pressed="true"] { background: var(--amber-night); color: var(--on-amber); }
.tool .off { display: none; }
.tool[aria-pressed="false"] .on { display: none; }
.tool[aria-pressed="false"] .off { display: inline; }
.tool--lock { display: none; }
@media (pointer: coarse) { html:not([data-tier="still"]) .tool--lock { display: inline-flex; } }

/* --- the Dial: progress and chapters -------------------------------------------------------------------------------- */
.dialnav { position: fixed; inset-inline-end: var(--m); inset-block-end: max(20px, env(safe-area-inset-bottom)); z-index: 30; color: var(--fg); }
.dialnav__toggle { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; flex-direction: row-reverse; }
.dialnav__ticks { width: 60px; height: 60px; }
[dir="rtl"] .dialnav__ticks { transform: scaleX(-1); }
.dialnav__ticks line { stroke: color-mix(in srgb, var(--fg) 26%, transparent); stroke-width: 2.4; stroke-linecap: round; transition: stroke 300ms ease; }
.dialnav__ticks line.is-lit { stroke: var(--amber-night); }
body[data-theme="day"] .dialnav__ticks line.is-lit { stroke: var(--amber); }
.dialnav__name { font-size: var(--t1); font-weight: 600; }
.dialnav__list {
  position: absolute;
  inset-block-end: 72px;
  inset-inline-end: 0;
  min-width: 200px;
  padding: 10px;
  border-radius: 20px;
  background: var(--night-surface);
  color: var(--night-ink);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transform-origin: bottom right;
  visibility: hidden;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 0s linear 180ms;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.4); /* taste-skill-ignore: a floating menu */
}
[dir="rtl"] .dialnav__list { transform-origin: bottom left; }
.dialnav.is-open .dialnav__list { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
@media (hover: hover) and (pointer: fine) {
  .dialnav:hover .dialnav__list { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
}
.dialnav__name { transition: opacity 160ms ease; }
.dialnav__name.is-swapping { opacity: 0; }
.dialnav__list a { display: block; padding: 8px 14px; border-radius: 12px; text-decoration: none; font-size: 15px; }
.dialnav__list a:hover { background: var(--night-surface-2); }
.dialnav__list a[aria-current] { color: var(--amber-night); font-weight: 700; }

/* --- the prologue ----------------------------------------------------------------------------------------------------- */
.prologue {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 20px;
  padding: var(--m);
  background: #050506;
  color: var(--night-ink);
  text-align: center;
  transition: opacity 900ms ease, visibility 0s linear 900ms;
}
.prologue__ring { width: 88px; height: 88px; transform: rotate(-90deg); }
.prologue__ring circle { fill: none; stroke-width: 7; }
.prologue__ring .track { stroke: #1e1e22; }
.prologue__ring .fill { stroke: var(--amber-night); stroke-linecap: round; stroke-dasharray: 226.2; stroke-dashoffset: 226.2; transition: stroke-dashoffset 300ms linear; }
.prologue__line { font-size: var(--t3); max-width: 26ch; }
.prologue__line .w { display: inline-block; opacity: 0; transform: translateY(6px); transition: opacity 420ms var(--ease-out), transform 520ms var(--ease-expo); transition-delay: calc(var(--w, 0) * 110ms); }
.prologue__line.is-shown .w { opacity: 1; transform: none; }
.prologue[data-state="on"] .prologue__ring { animation: flash 900ms ease-out both; }
.prologue__skip { position: absolute; inset-block-end: 28px; inset-inline-end: var(--m); padding: 10px 16px; border: 0; border-radius: 999px; background: #1e1e22; color: var(--night-ink-2); cursor: pointer; font-size: var(--t1); }
.prologue[data-state="done"] { opacity: 0; visibility: hidden; pointer-events: none; }
.prologue[data-fast] { transition-duration: 300ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes flash { 0% { opacity: 1; } 15% { opacity: 0.35; } 30% { opacity: 1; } 45% { opacity: 0.55; } 60%, 100% { opacity: 1; } }
html:not(.js) .prologue { display: none; }

/* --- chapters --------------------------------------------------------------------------------------------------------- */
main { position: relative; z-index: 1; }
/* the story's chapters lie over the 3D scene: clicks and drags pass through them to it (spin the mark, turn the Dial,
   pick a phone or a governorate) except on the cards; the opaque sections take their own */
main { pointer-events: none; }
main > :not(.ch) { pointer-events: auto; }
.ch { position: relative; pointer-events: none; }
/* holds: the camera settles while a chapter's card is held; the hand-overs carry the motion. Collecting is the peak
   (web/BRIEF.md) and gets the most room. */
.ch--lug { height: 170svh; }
#town { height: 220svh; }
#dial { height: 210svh; }
#collect { height: 250svh; }
#scan { height: 180svh; }
#month { height: 200svh; }
#iraq { height: 220svh; }
#close { height: 200svh; }
.ch__panel { position: sticky; inset-block-start: 0; min-height: 100svh; display: flex; align-items: center; padding: 96px var(--m) 110px; }
.ch__card { pointer-events: auto; width: min(100%, 32rem); display: grid; gap: 20px; color: var(--fg); transition: opacity 260ms var(--ease-out), transform 360ms var(--ease-out); }
/* a chapter's card steps aside when its chapter ends, instead of wiping across the next scene */
.ch[data-state="after"] .ch__card { opacity: 0; transform: translateY(-14px); pointer-events: none; }
/* desktop: a scrim on the text's side keeps it readable over the 3D (the one gradient the house allows) */
@media (min-width: 901px) {
  .ch__panel { isolation: isolate; }
  .ch:not(#month, .ch--lug) .ch__panel::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: min(62vw, 52rem);
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(to right, rgb(18 18 20 / 0.85) 30%, rgb(18 18 20 / 0)); /* taste-skill-ignore: neutral scrim under text */
  }
  [dir="rtl"] .ch:not(#month, .ch--lug) .ch__panel::before { background: linear-gradient(to left, rgb(18 18 20 / 0.85) 30%, rgb(18 18 20 / 0)); /* taste-skill-ignore */ }
}
.ch__card h2 { font-size: var(--t4); }
/* by day the 3D is busy and bright: the text sits on the app's porcelain sheet */
#month .ch__card { padding: 28px; border-radius: 28px; background: rgb(243 243 240 / 0.94); }
.ch__card > p { max-width: 38ch; }
.lede { font-size: var(--t3); line-height: 1.6; max-width: 26ch; }
:lang(en) .lede { line-height: 1.45; }
.hero__name { margin: 0; line-height: 0; }
.hero__logo { height: clamp(120px, 24svh, 250px); width: auto; color: var(--night-ink); }
:lang(en) .hero__logo { height: clamp(90px, 16svh, 170px); }
.ch__card .btn { justify-self: start; }
.figure { display: grid; gap: 2px; }
.figure__n { font-size: var(--t5); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; font-family: "Geologica", var(--font); }
.figure__n--quiet { font-size: var(--t4); color: var(--fg-2); }
.figure__n--money { color: var(--money-in); }
.figure__u, .pair__l { font-size: var(--t1); color: var(--fg-2); }
.unit { font-size: 0.45em; color: var(--fg-2); font-weight: 500; }
.figure .unit, .pair .unit { font-size: var(--t2); }
.sample { font-size: var(--t1); color: var(--fg-2); }
.pair { display: grid; gap: 10px; }
.pair p { display: grid; gap: 0; }
.pair__l { display: block; }
.big { font-size: var(--t5); font-weight: 800; line-height: 1.1; color: var(--amber-night); }
/* a screen of the app, as a button that opens it full size (the gallery) */
.shot {
  position: relative;
  display: block;
  width: 168px;
  padding: 0;
  border: 0;
  border-radius: 24px;
  overflow: hidden;
  background: var(--night-surface);
  cursor: zoom-in;
  transition: transform 200ms var(--ease-out);
}
.shot img { display: block; width: 100%; height: auto; }
.shot__label {
  position: absolute;
  inset-inline: 8px;
  inset-block-end: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgb(18 18 20 / 0.82);
  color: #f3f3ef;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}
.shot__label svg, .see-app svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.shot:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .shot:hover { transform: translateY(-3px); } }
.see-app { display: inline-flex; align-items: center; gap: 8px; justify-self: start; min-height: 44px; }
/* short desktop windows: the thumbnail stays inside the card */
@media (min-width: 901px) and (max-height: 860px) { .shot { width: 112px; } .shot__label { font-size: 0; gap: 0; padding: 7px; } }

/* --- the app's screens, full size ------------------------------------------------------------------------------------ */
html { scrollbar-gutter: stable; }
html.is-modal { overflow: hidden; }
.gallery {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #0c0c0e;
  color: #f3f3ef;
}
.gallery[open] { display: grid; grid-template-rows: auto 1fr auto; }
.gallery::backdrop { background: rgb(0 0 0 / 0.5); }
.gallery__bar { display: flex; align-items: center; gap: 16px; padding: 16px 20px; }
.gallery__title { margin: 0; font-size: 18px; }
.gallery__count { margin: 0; margin-inline-start: auto; opacity: 0.72; font-variant-numeric: tabular-nums; font-family: "Geologica", var(--font); }
.gallery__strip {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0 max(20px, calc(50vw - 230px));
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.gallery__strip::-webkit-scrollbar { display: none; }
.gallery__item { flex: none; scroll-snap-align: center; }
.gallery__item figure { display: grid; justify-items: center; gap: 12px; margin: 0; }
.gallery__item img {
  display: block;
  height: min(calc(100dvh - 200px), 920px);
  width: auto;
  max-width: calc(100vw - 40px);
  object-fit: contain;
  border-radius: 28px;
  background: #fff;
}
.gallery__item figcaption { font-size: 15px; opacity: 0.82; text-align: center; }
.gallery__nav { display: flex; justify-content: center; gap: 16px; padding: 12px 0 20px; }
[dir="rtl"] .gallery__nav svg { transform: scaleX(-1); }
.close__h { font-size: var(--t5) !important; line-height: 1.12; max-width: 11ch; }
:lang(en) .close__h { line-height: 0.98; letter-spacing: -0.035em; }

/* the range for the Dial */
.range { display: grid; gap: 8px; }
.range label { font-size: var(--t1); color: var(--fg-2); }
.range input { width: min(100%, 320px); accent-color: var(--amber-night); height: 32px; }

/* --- collecting: line, amps, slide ------------------------------------------------------------------------------------- */
.calc { display: grid; gap: 16px; }
.calc__controls { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 480ms var(--ease-out), opacity 360ms ease; }
.calc__inner { display: grid; gap: 16px; min-height: 0; }
/* until the camera reaches the phone and printer (shell.js): folded away, and inert */
.js .calc:not(.is-open) .calc__controls { grid-template-rows: 0fr; opacity: 0; }
.js .calc:not(.is-open) .calc__inner { overflow: hidden; }
/* the line: a segmented control, as in the app; a thumb slides under the chosen segment */
.tiers {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  border-radius: 999px;
  background: var(--night-surface-2);
  --i: 0;
}
.tiers__thumb {
  position: absolute;
  inset-block: 4px;
  inset-inline-start: 4px;
  width: calc((100% - 8px) / 3);
  border-radius: 999px;
  background: var(--night-ink);
  transform: translateX(calc(var(--i) * 100%));
  transition: transform 260ms var(--ease-out);
}
[dir="rtl"] .tiers__thumb { transform: translateX(calc(var(--i) * -100%)); }
.tiers button {
  position: relative; /* above the thumb */
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  min-height: 56px;
  padding: 6px 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--night-ink);
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  transition: color 200ms ease, transform 110ms var(--ease-out);
}
.tiers button:active { transform: scale(0.97); }
.tiers button[aria-checked="true"] { color: var(--ink); }
.tiers button:focus-visible { outline: 2px solid var(--amber-night); outline-offset: -2px; }
.tiers__n { font-weight: 600; font-size: 15px; }
.tiers__p { font-size: 12.5px; opacity: 0.72; font-family: "Geologica", var(--font); font-variant-numeric: tabular-nums; }
.amps { display: flex; align-items: center; gap: 18px; }
.amps p { min-width: 6ch; text-align: center; }
.amps .figure__n { font-size: var(--t4); }
.slide { position: relative; height: 64px; border-radius: 999px; background: var(--night-surface-2); overflow: hidden; --k: 0; }
.slide__fill {
  position: absolute;
  inset: 0;
  background: var(--amber-night);
  opacity: clamp(0, calc(var(--k) * 4), 1);
  clip-path: inset(0 calc(100% - var(--fill, 0px)) 0 0 round 999px);
}
[dir="rtl"] .slide__fill { clip-path: inset(0 0 0 calc(100% - var(--fill, 0px)) round 999px); }
.slide__label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; padding-inline-start: 56px; font-weight: 600; font-size: 15px; opacity: calc(1 - var(--k) * 1.6); pointer-events: none; }
.slide__knob {
  position: absolute;
  inset-block-start: 5px;
  inset-inline-start: 5px;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: var(--amber-night);
  color: var(--on-amber);
  cursor: grab;
  touch-action: none;
  box-shadow: 0 3px 10px rgb(0 0 0 / 0.18); /* taste-skill-ignore: the app's knob lift */
}
.slide__knob:active { cursor: grabbing; }
.slide__knob:focus-visible { outline: 3px solid var(--on-amber); outline-offset: -6px; }
[dir="rtl"] .slide__knob svg { transform: scaleX(-1); }
.calc__status { min-height: 1.4em; font-weight: 700; color: var(--amber-night); }
.calc [data-again] { display: none; justify-self: start; }
.calc.is-done [data-again] { display: inline; }
.paper { max-width: 220px; }
.paper canvas { width: 100%; height: auto; border-radius: 4px; }

/* --- the governorates ------------------------------------------------------------------------------------------------- */
.ch--iraq .ch__panel { padding-block-end: 32px; }
.ch--iraq .ch__card { gap: 14px; }
.iraq-pick { display: grid; gap: 12px; max-width: 32rem; }
.govs__group { display: grid; gap: 6px; }
.govs__region { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--fg-2); }
.govs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.govs button {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--night-surface-2);
  color: var(--night-ink);
  font-size: 15px;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}
.govs button[aria-pressed="true"] { background: var(--amber-night); color: var(--on-amber); }
.gov-card { display: flex; align-items: center; gap: 14px; padding-block-start: 4px; }
.gov-card[hidden] { display: none; }
.gov-card__text { display: grid; gap: 2px; min-width: 0; }
.gov-card__name { margin: 0; font-size: 20px; font-weight: 700; }
.gov-card__capital { margin: 0; color: var(--fg-2); }

/* --- new in Wasl (opaque, day): three real screens, what each does, then the rest a line each ---------------------- */
.new { position: relative; z-index: 1; color: var(--ink); background: var(--surface); padding: var(--gap) var(--m) calc(var(--gap) * 0.7); display: grid; gap: clamp(56px, 7vw, 104px); }
.new__head { display: grid; gap: 20px; max-width: 52ch; }
.new__head h2 { font-size: clamp(36px, 4.6vw, 68px); font-weight: 800; line-height: 1.15; }
:lang(en) .new__head h2 { line-height: 1.02; letter-spacing: -0.02em; }
.new__lede { color: var(--ink-2); font-size: var(--t3); line-height: 1.6; }
.new__spots { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 340px)); justify-content: space-between; gap: clamp(28px, 4vw, 64px); align-items: start; }
/* the middle screen sits lower: a row of phones read as a sequence, not a grid of cards */
.spot:nth-child(2) { margin-block-start: clamp(40px, 6vw, 96px); }
.spot { display: grid; gap: 28px; }
.spot__phone { justify-self: start; width: min(100%, 300px); padding: 8px; border-radius: 36px; background: var(--graphite); box-shadow: 0 1px 0 rgb(255 255 255 / 0.06) inset, 0 24px 48px -24px rgb(18 18 20 / 0.45); }
.new .shot { width: 100%; border-radius: 28px; }
/* the top of the screen is what it is about; the label sits on the cut */
.new .shot img { aspect-ratio: 9 / 15; object-fit: cover; object-position: top; }
.spot__text { display: grid; gap: 10px; max-width: 38ch; }
.spot__text h3 { font-size: var(--t3); font-weight: 700; line-height: 1.35; }
.spot__text p { color: var(--ink-2); }
.new__also { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px clamp(16px, 2vw, 28px); padding-block-start: 32px; border-block-start: 1px solid var(--surface-2); }
.new__also h3 { grid-column: 1 / span 3; font-size: var(--t2); line-height: 1.4; }
.new__also ul { grid-column: 4 / span 9; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px clamp(16px, 2vw, 28px); }
.new__also li { position: relative; padding-inline-start: 20px; line-height: 1.5; }
.new__also li::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: 0.62em; width: 8px; height: 8px; border-radius: 2px; background: var(--amber); }
@media (max-width: 1100px) {
  .new__spots { grid-template-columns: 1fr; gap: 72px; }
  .spot:nth-child(2) { margin-block-start: 0; }
  .spot { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); align-items: center; gap: clamp(24px, 4vw, 48px); }
  .new__also h3, .new__also ul { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .spot { grid-template-columns: 1fr; gap: 20px; }
  .spot__phone { width: min(72vw, 260px); }
  .new__also ul { grid-template-columns: 1fr; }
}

/* --- what's in Wasl (opaque, day) ------------------------------------------------------------------------------------- */
.index, .price, .faq { position: relative; z-index: 1; color: var(--ink); }
.index { padding: var(--gap) var(--m) calc(var(--gap) * 0.6); background: var(--ground); }
.index h2 { font-size: var(--t4); margin-block-end: 72px; }
.index__cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 clamp(16px, 2vw, 28px); }
.index__group { grid-column: span 3; display: grid; gap: 16px; align-content: start; }
.index__group h3 { font-size: var(--t2); line-height: 1.4; }
.index__group ul { display: grid; gap: 4px; }
.index__group li { line-height: 1.5; cursor: default; transition: color 160ms ease; border-radius: 6px; }
.index__group li:hover, .index__group li:focus-visible, .index__group li.is-active { color: var(--amber-text); }
.index__sum { display: none; }
.index__panel { grid-column: 10 / span 3; grid-row: 1; align-self: start; position: sticky; inset-block-start: 96px; color: var(--ink-2); transition: opacity 180ms ease; }
.index__panel.is-swapping { opacity: 0; }

.price { min-height: 72svh; display: grid; align-content: center; gap: 64px; padding: 96px var(--m); background: var(--surface); }
.price__say { font-size: clamp(24px, 2.5vw, 36px); font-weight: 700; line-height: 1.45; max-width: 30ch; }
:lang(en) .price__say { line-height: 1.25; }
.price__amount { display: inline-block; padding: 0 0.2em; background: var(--amber); color: var(--on-amber); border-radius: 0.18em; }
.price__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.price__row p { max-width: 46ch; }

.faq { padding: var(--gap) var(--m); display: grid; gap: clamp(56px, 6vw, 88px); background: var(--ground); }
.faq__row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px clamp(16px, 2vw, 28px); align-items: baseline; }
.faq__row h2, .faq__row h3 { grid-column: 1 / span 6; font-size: var(--t4); font-weight: 600; line-height: 1.35; }
:lang(en) .faq__row :is(h2, h3) { line-height: 1.12; }
.faq__row h2 { color: var(--ink-2); }
.faq__row p { grid-column: 8 / span 5; max-width: 42ch; }
.faq a, .price a:not(.btn) { color: var(--ink); }

/* --- footer ------------------------------------------------------------------------------------------------------------ */
.foot {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 40px;
  padding: 40px var(--m) 24px;
  background: var(--night-surface);
  color: var(--night-ink);
  font-size: var(--t1);
  line-height: 1.6;
  --ring: var(--amber-night);
}
.foot--full { min-height: 100svh; }
/* the footer has its own logo, languages and motion switch: the bar steps aside once the footer reaches the top */
html.at-foot .bar { opacity: 0; visibility: hidden; }
.foot a { text-decoration-color: rgb(243 243 239 / 0.35); }
.foot a:hover { text-decoration-color: var(--amber-night); }
.foot__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px clamp(16px, 2vw, 28px); }
.foot__cols p, .foot__cols li { color: var(--night-ink-2); }
.foot__cols .foot__title { color: var(--night-ink); font-weight: 700; margin-block-end: 6px; }
.foot__cols ul { display: grid; gap: 2px; }
.langs--foot { margin-block-start: 16px; }
.langs--foot span[aria-current] { color: var(--night-ink); }
.calm { margin-block-start: 16px; padding: 8px 14px; border: 0; border-radius: 999px; background: var(--night-surface-2); color: var(--night-ink); cursor: pointer; }
.foot__name { align-self: end; }
.foot__logo { width: 100%; height: auto; color: var(--night-ink); }
.foot:not(.foot--full) .foot__logo { width: min(100%, 520px); }
.foot__legal { display: grid; gap: 4px; color: var(--night-ink-2); }
.foot__legal a { color: var(--night-ink-2); }

/* --- legal pages -------------------------------------------------------------------------------------------------------- */
.doc-page { background: var(--ground); color: var(--ink); }
.doc { padding: clamp(48px, 10svh, 120px) var(--m) var(--gap); }
.doc article, .doc--404 { width: min(100%, 68ch); margin-inline-start: clamp(0px, 18vw, 300px); display: grid; gap: 28px; }
.doc h1 { font-size: clamp(40px, 5vw, 72px); line-height: 1.2; }
:lang(en) .doc h1 { line-height: 1.05; }
.doc__lede { font-size: var(--t3); line-height: 1.6; }
.doc section { display: grid; gap: 12px; padding-block-start: 16px; }
.doc h2 { font-size: var(--t3); }
.doc ul { display: grid; gap: 10px; }
.doc ul li { position: relative; padding-inline-start: 22px; }
.doc ul li::before { content: ""; position: absolute; inset-inline-start: 2px; inset-block-start: 0.72em; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.doc ol { display: grid; gap: 10px; counter-reset: step; }
.doc ol li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; align-items: baseline; }
.doc ol li::before { content: counter(step); display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--surface); font-size: 14px; font-weight: 700; line-height: 1; }
.doc__meta { color: var(--ink-2); font-size: var(--t1); }

/* --- motion ------------------------------------------------------------------------------------------------------------- */
.js [data-reveal] [data-r], .js [data-reveal][data-r] { opacity: 0; transform: translateY(14px); }
.js [data-reveal].is-in [data-r] {
  opacity: 1;
  transform: none;
  transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-expo);
  transition-delay: calc(var(--i, 0) * 75ms);
}
.js .ch--lug [data-r] { opacity: 1; transform: none; }
.js .is-on .ch--lug [data-r] { animation: rise 900ms var(--ease-expo) both; animation-delay: calc(var(--i, 0) * 90ms + 100ms); }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] [data-r] { transform: none !important; }
  .js [data-reveal].is-in [data-r] { transition: opacity 200ms ease; }
  .js .is-on .ch--lug [data-r] { animation: none; }
  .prologue__line .w { transform: none; }
  .ch[data-state="after"] .ch__card { transform: none; }
  #scene { transition: none; }
  .calc__controls { transition: opacity 200ms ease; }
  .tiers__thumb { transition: none; }
}

/* --- smaller screens ---------------------------------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .index__group { grid-column: span 4; }
  .index__panel { display: none; }
  .index__sum { display: block; color: var(--ink-2); }
}
@media (max-width: 900px) {
  :root { --gap: 104px; }
  .bar { gap: 12px; padding: 12px var(--m); }
  .bar__nav { display: none; }
  .bar .langs { margin-inline-start: auto; }
  /* the chapter text becomes a sheet along the bottom; the 3D lives above it */
  .ch { display: flex; flex-direction: column; justify-content: flex-end; }
  .ch__panel { inset-block-start: auto; inset-block-end: 0; min-height: 0; padding: 0; align-items: flex-end; }
  .ch__card {
    width: 100%;
    gap: 14px;
    padding: 22px var(--m) calc(92px + env(safe-area-inset-bottom));
    background: rgb(18 18 20 / 0.94);
    border-radius: 28px 28px 0 0;
  }
  body[data-theme="day"] .ch__card { background: rgb(243 243 240 / 0.96); }
  /* the sheet never grows past the screen */
  .ch__card { max-height: calc(100svh - 56px); overflow-y: auto; scrollbar-width: none; }
  .ch[data-state="after"] .ch__card { transform: translateY(24px); }
  .ch--lug .ch__card { background: none; padding-block-end: 120px; }
  /* phones: the governorates in one row that scrolls sideways, so the sheet stays low and the map stays in view */
  .iraq-pick { display: flex; gap: 6px; max-width: none; margin-inline: calc(-1 * var(--m)); padding: 2px var(--m) 6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .iraq-pick::-webkit-scrollbar { display: none; }
  .govs__group { display: flex; align-items: center; gap: 6px; flex: none; }
  .govs__region { padding-inline: 6px 2px; white-space: nowrap; }
  .govs { flex-wrap: nowrap; }
  .govs button { white-space: nowrap; }
  .gov-card__name { font-size: 18px; }
  /* phones: the thumbnail gives way to a link that opens the screens full size */
  .shot { width: auto; min-height: 44px; background: none; border-radius: 0; overflow: visible; }
  .shot img { display: none; }
  .shot__label { position: static; padding: 10px 0; background: none; color: var(--amber-night); font-size: 15px; justify-content: flex-start; text-decoration: underline; text-underline-offset: 0.3em; }
  .figure__n { font-size: 44px; }
  .big { font-size: 48px; }
  .close__h { font-size: clamp(40px, 11vw, 64px) !important; }
  .hero__logo { height: auto; width: min(78vw, 420px); }
  :lang(en) .hero__logo { height: auto; width: min(80vw, 460px); }
  .ch__card h2 { font-size: 22px; }
  .ch__card > p { font-size: 15px; line-height: 1.65; }
  .ch__card .sample { display: none; }
  .tiers button { min-height: 52px; }
  .slide { height: 60px; }
  .slide__knob { width: 50px; height: 50px; }
  .figure__u { font-size: 13px; }
  .dialnav__name { display: none; }
  .index__cols { grid-template-columns: 1fr 1fr; gap: 48px 28px; }
  .index__group { grid-column: auto; }
  .index h2 { margin-block-end: 48px; }
  .faq__row :is(h2, h3), .faq__row p { grid-column: 1 / -1; }
  .price { min-height: 0; padding-block: 80px; }
  .price__say { font-size: 24px; }
  .price__row .btn { width: 100%; }
  .foot__cols { grid-template-columns: 1fr 1fr; }
  .doc article, .doc--404 { margin-inline-start: 0; }
}
@media (max-width: 520px) {
  .foot__cols, .index__cols { grid-template-columns: 1fr; }
}
/* short phones: everything in the sheet tightens */
@media (max-width: 900px) and (max-height: 700px) {
  .ch__card { gap: 10px; padding-block-start: 16px; }
  .figure__n, .amps .figure__n { font-size: 32px; }
  .slide { height: 54px; }
  .slide__knob { width: 44px; height: 44px; }
}
/* without scripts: the chapters are plain sections of text, and the controls that need a script are hidden */
html:not(.js) .ch { height: auto; }
html:not(.js) .ch__panel { position: relative; min-height: 0; padding-block: 96px; }
html:not(.js) :is(.calc, .range, .iraq-pick, .dialnav, .tool, .veil, .map-labels) { display: none; }
/* measures 100svh once for the scroll story (shell.js), stable while a phone's address bar moves */
.svh-probe { position: fixed; inset-block-start: 0; width: 0; height: 100svh; visibility: hidden; pointer-events: none; }
/* "New in Wasl" keeps its screens on phones (elsewhere a phone gets a link instead): they are what the section shows */
@media (max-width: 900px) {
  .new .shot { background: var(--night-surface); border-radius: 28px; overflow: hidden; }
  .new .shot img { display: block; }
  .new .shot__label { position: absolute; padding: 8px 10px; background: rgb(18 18 20 / 0.82); color: #f3f3ef; font-size: 12px; justify-content: center; text-decoration: none; }
}
