/* 8 · Invoices and receipts (round 8). Prefix pp-.
   Two moments, one in focus at a time.
   1 An online order: on Noor's phone (a plain chat drawing) Huda asks for her
     invoice; Noor shares the Sales Invoice from the live Konto phone and it goes
     out in the chat as a PDF; Huda thanks her.
   2 At Noor's counter (her clothes shop): Ali brings three pieces, Noor scans each
     tag with her phone, the sale is done, the receipt printer prints the Sales
     Receipt and she hands it to him. No chat. */
.ks.pp { --sky1: #F7E3BC; --sky2: #F1CF96; }
.ks .pp-wall { position: absolute; inset: 0; pointer-events: none; }
.ks .pp-light { position: absolute; left: 50%; top: -500px; width: 1400px; height: 900px; margin-left: -400px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,244,220,.7), rgba(255,244,220,0)); }

/* ---------- copy ---------- */
.ks .pp-copy { position: absolute; inset-inline-start: 84px; top: 92px; width: 460px; z-index: 6; }
.ks .pp-copy .eyebrow { margin-bottom: 14px; }
.ks .pp-h { font-size: 44px; line-height: 1.06; letter-spacing: 0; }
.ks[dir="rtl"] .pp-h { font-size: 42px; line-height: 1.3; }
.ks .pp-lead { margin-top: 14px; font-size: 16.5px; line-height: 1.55; }
.ks .pp-fact { margin: 12px 0 0; display: flex; align-items: baseline; gap: 10px; font-size: 15px; font-weight: 700; color: var(--ink); }
.ks .pp-fact::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--c500); transform: translateY(-2px); }
.ks .pp-beats { margin-top: 16px; gap: 4px 18px; }
.ks .pp-beats li { font-size: 14px; padding-bottom: 7px; }

/* the two scenes are numbered so the eye knows which moment it is in */
.ks .pp-tag { margin: 0 0 10px; display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px 5px 5px; padding-inline: 5px 13px; border-radius: 999px;
  background: rgba(255,255,255,.82); color: #5A3A12; font-size: 14px; font-weight: 800; box-shadow: 0 2px 8px rgba(90,50,10,.12); }
.ks .pp-tag b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #5A3A12; color: #fff; font-size: 12px; }

/* ---------- the live phone ---------- */
.ks .pp-live, .ks .pp-chat, .ks .pp-counter { transition: opacity .5s var(--ease), filter .5s var(--ease); }
.ks .pp-live { position: absolute; inset-inline-start: 584px; top: 104px; z-index: 5; }
.ks .pp-live::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: -10px; height: 24px; border-radius: 50%; background: rgba(70,35,5,.28); filter: blur(10px); z-index: -1; }

/* ---------- 1 · Noor's phone: an ordinary chat with Huda (390 x 844) ---------- */
.ks .pp-chat { position: absolute; inset-inline-start: 1032px; top: 74px; z-index: 3; }
.ks .pp-cph { --pz: .7; }
.ks .pp-who { margin: 10px 0 0; text-align: center; font-size: 14px; font-weight: 800; color: #6A4A20; }
.ks .pp-cs { background: #EFE7DA; font-family: 'Lama Sans', system-ui, sans-serif; color: #111B21; display: flex; flex-direction: column; }
.ks .pp-c-sb { flex: none; height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 4px 30px 0 34px; background: #F7F7F5; direction: ltr; }
.ks .pp-c-sb b { font-size: 15px; font-weight: 600; }
.ks .pp-c-sb > span { display: flex; gap: 6px; align-items: center; }
.ks .pp-c-sb .sig { width: 17px; height: 11px; background: linear-gradient(currentColor,currentColor) 0 8px/3px 3px no-repeat, linear-gradient(currentColor,currentColor) 4.6px 5.5px/3px 5.5px no-repeat, linear-gradient(currentColor,currentColor) 9.2px 3px/3px 8px no-repeat, linear-gradient(currentColor,currentColor) 13.8px 0/3px 11px no-repeat; }
.ks .pp-c-sb .bat { width: 25px; height: 12px; border-radius: 4px; box-shadow: inset 0 0 0 1px currentColor; background: linear-gradient(currentColor,currentColor) 2px 2px / 16px 8px no-repeat; }
.ks .pp-c-hd { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px 12px; background: #F7F7F5; border-bottom: 1px solid #E3DED4; }
.ks .pp-c-back { width: 26px; height: 26px; color: #3A6E8F; }
.ks[dir="rtl"] .pp-c-back { transform: scaleX(-1); }
.ks .pp-c-av { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #1C1C1C; color: #fff; font-size: 14px; font-weight: 700; }
.ks .pp-c-nm { display: grid; }
.ks .pp-c-nm b { font-size: 17px; font-weight: 700; }
.ks .pp-c-nm small { font-size: 13px; color: #5E7A6A; }
.ks .pp-c-body { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 14px 14px 12px; overflow: hidden;
  background-image: radial-gradient(rgba(150,120,80,.12) 1.4px, transparent 1.6px); background-size: 22px 22px; }
.ks .pp-day { align-self: center; margin: 2px 0 auto; padding: 4px 12px; border-radius: 8px; background: rgba(255,255,255,.85); font-size: 12px; font-weight: 600; color: #54656F; }
.ks .pp-m { position: relative; max-width: 80%; padding: 8px 10px 6px; border-radius: 14px; box-shadow: 0 1px 1px rgba(0,0,0,.08); font-size: 16px; line-height: 1.35; }
.ks .pp-m p { margin: 0; padding-inline-end: 54px; }
.ks .pp-m.me { align-self: flex-end; background: #D8EFE8; border-end-end-radius: 4px; }
.ks .pp-m.them { align-self: flex-start; background: #fff; border-end-start-radius: 4px; }
.ks .pp-tm { position: absolute; inset-inline-end: 9px; bottom: 5px; display: flex; align-items: center; gap: 3px; font-size: 11px; color: #667781; }
.ks .pp-ticks { width: 16px; height: 9px; background:
  linear-gradient(45deg, transparent 45%, #3A9BD6 45% 58%, transparent 58%) 0 2px / 6px 6px no-repeat,
  linear-gradient(-45deg, transparent 42%, #3A9BD6 42% 56%, transparent 56%) 3px 0 / 8px 9px no-repeat,
  linear-gradient(-45deg, transparent 42%, #3A9BD6 42% 56%, transparent 56%) 8px 0 / 8px 9px no-repeat; }
/* the PDF document bubble: first-page preview, file row, caption */
.ks .pp-m.file { width: 262px; max-width: none; padding: 5px 5px 6px; }
.ks .pp-m.them p { padding-inline-end: 40px; }
.ks .pp-file-pv { height: 104px; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px #E6E2DA; }
.ks .pp-sheet-top { aspect-ratio: 1241 / 288; overflow: hidden; }
.ks .pp-sheet-top img { display: block; width: 100%; height: auto; }
.ks .pp-doc-to { margin: 0 7%; padding: 4px 0 3px; display: grid; gap: 1px; border-top: 1px solid #EEF0F0; }
.ks .pp-doc-to small { font-size: 5px; font-weight: 700; letter-spacing: .06em; color: #6B7075; }
.ks[dir="rtl"] .pp-doc-to small { letter-spacing: 0; }
.ks .pp-doc-to b { font-size: 7px; font-weight: 500; color: #151718; }
.ks .pp-sheet-rest { display: grid; gap: 5px; padding: 3px 7% 0; }
.ks .pp-sheet-rest i { height: 4px; border-radius: 2px; background: #E7ECEF; }
.ks .pp-sheet-rest i.box { height: 16px; border-radius: 3px; background: #F2F4F4; }
.ks .pp-file-r { display: flex; align-items: center; gap: 10px; margin-top: 5px; padding: 8px; border-radius: 10px; background: #F5F6F6; }
.ks .pp-pdf { display: grid; place-items: center; width: 34px; height: 40px; border-radius: 4px; background: #E5533D; color: #fff; font-size: 10px; font-weight: 800; flex: none; }
.ks .pp-file-t { display: grid; }
.ks .pp-file-t b { font-size: 14px; font-weight: 600; }
.ks[dir="rtl"] .pp-file-t b { text-align: right; }
.ks .pp-file-t small { font-size: 12px; color: #667781; justify-self: start; }
.ks .pp-m.file .pp-fcap { padding: 6px 6px 2px; padding-inline-end: 50px; }
.ks .pp-typing { align-self: flex-start; display: none; gap: 4px; padding: 10px 14px; border-radius: 14px; background: #fff; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.ks .pp-typing i { width: 7px; height: 7px; border-radius: 50%; background: #6F8F86; animation: pp-dot 1s ease-in-out infinite; }
.ks .pp-typing i:nth-child(2) { animation-delay: .15s; } .ks .pp-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes pp-dot { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-3px); opacity: 1; } }
.ks .pp-c-in { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px 28px; background: #F7F7F5; }
.ks .pp-c-field { flex: 1; height: 42px; display: flex; align-items: center; padding: 0 16px; border-radius: 21px; background: #fff; font-size: 15px; color: #8696A0; }
.ks .pp-c-send { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #2F7D6D; color: #fff; }
.ks .pp-c-send svg { width: 20px; height: 20px; }
.ks[dir="rtl"] .pp-c-send svg { transform: scaleX(-1); }
/* messages that have not happened yet take no room */
.ks .pp-m { display: none; }
.ks.pp.r-ask .pp-m.m-ask { display: block; }
.ks.pp.r-pdf .pp-m.file, .ks.pp.r-pdf .pp-m.reply { display: block; }
.ks.pp.b-ask .pp-typing.ask { display: flex; animation: pp-gone .3s 1s forwards; }
.ks.pp.b-ask .pp-m.m-ask { animation: pp-in .45s 1.2s var(--spring) both; }
.ks.pp.b-pdf .pp-m.file { animation: pp-in .5s .3s var(--spring) both; }
.ks.pp.b-pdf .pp-m.reply { animation: pp-in .45s 1.7s var(--spring) both; }
@keyframes pp-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pp-gone { to { opacity: 0; height: 0; padding-block: 0; margin-top: -8px; } }

/* ---------- 2 · at Noor's counter: Noor, Ali, the counter and the receipt printer ---------- */
.ks .pp-counter { position: absolute; inset-inline-start: 24px; top: 470px; width: 560px; height: 430px; z-index: 4; }
.ks .pp-counter > .pp-tag { position: absolute; inset-inline-start: 214px; top: 372px; z-index: 6; }
.ks .pp-cnt-in { position: absolute; inset: 0; }
.ks .pp-ctop { position: absolute; inset-inline: -400px -900px; top: 330px; height: 16px; border-radius: 4px; z-index: 3; background: linear-gradient(180deg, #E8BE8E, #D19A63); box-shadow: 0 2px 0 rgba(90,50,20,.18); }
.ks .pp-cfront { position: absolute; inset-inline: -400px -900px; top: 346px; height: 120px; z-index: 3;
  background: repeating-linear-gradient(90deg, rgba(120,70,30,0) 0 92px, rgba(120,70,30,.12) 92px 95px), linear-gradient(180deg, #C48F56, #A8723F); }
.ks .pp-person { position: absolute; top: 121px; width: 280px; height: 319px; z-index: 2; }
.ks .pp-person > svg { display: block; }
.ks .pp-person.p-noor { inset-inline-start: 150px; }
.ks .pp-person.p-ali { inset-inline-start: 316px; }
.ks[dir="rtl"] .pp-person > svg { transform: scaleX(-1); }
.ks .pp-printer-w { position: absolute; inset-inline-start: 0; top: 176px; width: 187px; height: 156px; z-index: 4; }
.ks .pp-printer { position: absolute; left: 0; top: 0; width: 240px; height: 200px; zoom: .78; overflow: visible; filter: drop-shadow(0 12px 10px rgba(70,35,5,.34)) drop-shadow(0 3px 3px rgba(70,35,5,.3)); }
.ks .pp-printer > path:first-child, .ks .pp-printer > path:nth-child(2) { display: none; }
.ks[dir="rtl"] .pp-printer { transform: scaleX(-1); }
.ks .pp-slip-win { position: absolute; inset-inline-start: 39px; top: 18px; width: 112px; height: 168px; overflow: hidden; z-index: 3; }
.ks .pp-slip { position: absolute; inset-inline: 0; bottom: 0; transform: translateY(102%); }
.ks .pp-rc { display: grid; justify-items: center; gap: 3px; width: 180px; zoom: .58; padding: 14px 14px 12px; background: #FFFEFB; color: #1B1F22; box-shadow: 0 6px 14px rgba(60,30,5,.18); font-size: 12px; line-height: 1.3; }
.ks .pp-rc-logo { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #1B1F22; color: #fff; font-size: 11px; font-weight: 800; }
.ks .pp-rc-biz { font-size: 15px; font-weight: 800; }
.ks .pp-rc-t { font-size: 12px; font-weight: 700; color: #4A5157; }
.ks .pp-rc-meta { display: flex; justify-content: space-between; width: 100%; margin-top: 4px; font-size: 10.5px; color: #4A5157; }
.ks .pp-rc-cut { width: 100%; height: 0; margin: 5px 0; border-top: 1.5px dashed #B9BEC2; }
.ks .pp-rc-to { justify-self: start; font-size: 12px; font-weight: 700; }
.ks .pp-rc-ln { display: flex; justify-content: space-between; gap: 8px; width: 100%; font-size: 11.5px; }
.ks .pp-rc-ln.tot { font-size: 13px; font-weight: 800; }
.ks .pp-rc-thx { margin-top: 2px; font-size: 12px; font-weight: 700; }
.ks .pp-rc-bar { width: 100%; height: 26px; margin-top: 6px; background: repeating-linear-gradient(90deg, #1B1F22 0 2px, transparent 2px 4px, #1B1F22 4px 5px, transparent 5px 8px, #1B1F22 8px 11px, transparent 11px 13px); }
/* the pieces Ali brings: on the counter between them, each with a hang tag. Noor holds
   her phone over each tag in turn (p-scan below); the tag flashes and a check pops. */
.ks .pp-items { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.ks .pp-it { position: absolute; top: 292px; width: 52px; height: 40px; opacity: 0; transition: opacity .3s var(--ease); }
.ks .pp-it > svg { display: block; width: 52px; height: 40px; filter: drop-shadow(0 2px 2px rgba(70,35,5,.25)); }
.ks .pp-it.i1 { inset-inline-start: 314px; }
.ks .pp-it.i2 { inset-inline-start: 347px; }
.ks .pp-it.i3 { inset-inline-start: 380px; }
.ks .pp-tg { position: absolute; left: 19px; top: -8px; width: 13px; height: 16px; border-radius: 2px; background: #FFFDF6; transform: rotate(-9deg);
  box-shadow: 0 1px 2px rgba(70,35,5,.3); background-image: repeating-linear-gradient(90deg, #2A2F33 0 1px, transparent 1px 2px, #2A2F33 2px 3.4px, transparent 3.4px 4.6px);
  background-size: 8px 5px; background-position: 2px 8px; background-repeat: no-repeat; }
.ks .pp-fl { position: absolute; left: 9px; top: -3px; width: 34px; height: 4px; border-radius: 2px; background: #FF5A4E; box-shadow: 0 0 8px 3px rgba(255,90,78,.55); opacity: 0; }
.ks .pp-bp { position: absolute; left: 32px; top: -20px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #0BBAD8; color: #fff;
  box-shadow: 0 0 0 2px #fff, 0 3px 8px rgba(9,154,179,.4); transform: scale(0); }
.ks .pp-bp svg { width: 13px; height: 13px; }
.ks.pp.r-counter .pp-it { opacity: 1; }
.ks.pp.r-handed .pp-it { opacity: 0; }
.ks.pp.b-counter .pp-it { animation: pp-bring .55s var(--spring) both; }
.ks.pp.b-counter .pp-it.i2 { animation-delay: .12s; } .ks.pp.b-counter .pp-it.i3 { animation-delay: .24s; }
@keyframes pp-bring { from { opacity: 0; transform: translate(calc(var(--sx, 1) * 46px), -14px); } to { opacity: 1; transform: none; } }
.ks.pp.r-sold .pp-bp { transform: scale(1); }
/* wide page: paced with the recording (a tag read about every 3.2 s from the scan beat); phones' story: brisk */
.ks.pp.b-scan .pp-it.i1 { --t: .45s; } .ks.pp.b-scan .pp-it.i2 { --t: 3.45s; } .ks.pp.b-scan .pp-it.i3 { --t: 6.7s; }
html.kp-narrow .pp[data-kst].b-scan .pp-it.i1 { --t: .75s; } html.kp-narrow .pp[data-kst].b-scan .pp-it.i2 { --t: 1.45s; } html.kp-narrow .pp[data-kst].b-scan .pp-it.i3 { --t: 2.15s; }
.ks.pp.b-scan .pp-fl { animation: pp-flash .45s var(--t) ease-out both; }
.ks.pp.b-scan .pp-bp { animation: pp-pop .4s calc(var(--t) + .2s) cubic-bezier(.34,1.56,.64,1) both; }
@keyframes pp-flash { 0% { opacity: 0; transform: scaleX(.3); } 30% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes pp-pop { from { transform: scale(0); } to { transform: scale(1); } }
/* handed: the pieces are in a Dar Al Noor bag on the counter, by Ali */
.ks .pp-bagd { position: absolute; inset-inline-start: 372px; top: 278px; width: 48px; height: 53px; opacity: 0; transform: translateY(10px) scale(.8); transform-origin: 50% 100%;
  transition: opacity .3s var(--ease), transform .45s var(--spring); filter: drop-shadow(0 3px 3px rgba(70,35,5,.25)); }
.ks .pp-bagd > svg { display: block; width: 100%; height: 100%; }
.ks.pp.r-handed .pp-bagd { opacity: 1; transform: none; }
.ks.pp.b-handed .pp-bagd { transition-delay: .2s; }
/* scanning: Noor's phone hand goes from tag to tag (elbow-down angles from tools/fix_elbows.js's solver) */
.pp .p-scan .kc { --sh-r: -62.5deg; --el-r: -1.4deg; --sh-l: 8deg; --el-l: -6deg; }
.ks.pp.b-scan .p-noor .arm-r { animation: pp-scan-shd 7.4s ease-in-out both; }
.ks.pp.b-scan .p-noor .fore-r { animation: pp-scan-eld 7.4s ease-in-out both; }
html.kp-narrow .pp[data-kst].b-scan .p-noor .arm-r { animation: pp-scan-sh 2.5s .05s ease-in-out both; }
html.kp-narrow .pp[data-kst].b-scan .p-noor .fore-r { animation: pp-scan-el 2.5s .05s ease-in-out both; }
@keyframes pp-scan-shd { 0% { transform: rotate(-7deg); } 5%, 38% { transform: rotate(21.3deg); } 46%, 82% { transform: rotate(-15.1deg); } 90%, 100% { transform: rotate(-62.5deg); } }
@keyframes pp-scan-eld { 0% { transform: rotate(5deg); } 5%, 38% { transform: rotate(-113.6deg); } 46%, 82% { transform: rotate(-79.2deg); } 90%, 100% { transform: rotate(-1.4deg); } }
@keyframes pp-scan-sh { 0% { transform: rotate(-7deg); } 24%, 34% { transform: rotate(21.3deg); } 52%, 62% { transform: rotate(-15.1deg); } 80%, 100% { transform: rotate(-62.5deg); } }
@keyframes pp-scan-el { 0% { transform: rotate(5deg); } 24%, 34% { transform: rotate(-113.6deg); } 52%, 62% { transform: rotate(-79.2deg); } 80%, 100% { transform: rotate(-1.4deg); } }

/* what Ali says as he puts them down */
.ks .pp-say { position: absolute; inset-inline-start: 352px; top: 70px; z-index: 6; margin: 0; width: max-content; max-width: 220px; padding: 9px 14px 10px; border-radius: 16px;
  background: #fff; color: var(--ink); font-size: 16px; font-weight: 700; line-height: 1.35; box-shadow: 0 2px 6px rgba(10,25,41,.08), 0 12px 26px rgba(90,50,10,.2);
  opacity: 0; transform: translateY(8px) scale(.9); transform-origin: 50% 100%; transition: opacity .25s var(--ease), transform .4s var(--spring); }
.ks .pp-say::after { content: ""; position: absolute; inset-inline-start: 88px; bottom: -9px; width: 18px; height: 10px; background: #fff; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.ks[lang="ar"] .pp-say { font-size: 17px; line-height: 1.45; }
.ks.pp.b-counter .pp-say { opacity: 1; transform: none; transition-delay: .7s; }
/* sold: what Konto saved, over the counter, while Ali pays and the receipt prints */
.ks .pp-sold { position: absolute; inset-inline-start: 300px; top: 66px; z-index: 6; display: flex; align-items: center; gap: 10px; padding-block: 8px; padding-inline: 8px 16px; border-radius: 999px;
  background: #fff; box-shadow: 0 2px 6px rgba(10,25,41,.08), 0 12px 26px rgba(90,50,10,.2); opacity: 0; transform: translateY(8px) scale(.92); transition: opacity .3s var(--ease), transform .45s var(--spring); }
.ks .pp-sold-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ok-surface, #E3F6EC); color: var(--ok-content, #138A52); }
.ks .pp-sold-ic svg { width: 20px; height: 20px; }
.ks .pp-sold-t { display: grid; line-height: 1.2; }
.ks .pp-sold-t b { font-size: 16px; font-weight: 800; color: var(--ink); }
.ks .pp-sold-t small { font-size: 13px; font-weight: 700; color: #6A4A20; white-space: nowrap; }
.ks.pp.b-sold .pp-sold, .ks.pp.b-print .pp-sold { opacity: 1; transform: none; }
.ks.pp.b-sold .pp-sold { transition-delay: .3s; }

/* the slip in the hand: a small paper that travels from the printer to Ali */
.ks .pp-hslip { position: absolute; inset-inline-start: 78px; top: 110px; width: 34px; height: 48px; padding: 7px 5px; display: grid; align-content: start; gap: 4px; border-radius: 2px; z-index: 5;
  background: #FFFEFB; box-shadow: 0 4px 10px rgba(60,30,5,.25); opacity: 0; }
.ks .pp-hslip > i { height: 3px; border-radius: 2px; background: #B9BEC2; }
.ks .pp-hslip > i.b { height: 8px; margin-top: 2px; background: repeating-linear-gradient(90deg, #1B1F22 0 2px, transparent 2px 4px); }
/* printing: during its beat the slip feeds, then it stays until it is handed over */
.ks.pp.r-print .pp-slip { transform: none; }
.ks.pp.b-print .pp-slip { animation: pp-feed 2.2s .3s cubic-bezier(.4,0,.4,1) both; }
.ks.pp.b-print .pp-led, .ks.pp.b-print .pp-glow { animation: pp-led .5s steps(2) 5; }
@keyframes pp-feed { 0% { transform: translateY(102%); } 15%, 30% { transform: translateY(84%); } 100% { transform: none; } }
@keyframes pp-led { 50% { fill: #F39C12; } }
.ks.pp.r-handed .pp-slip { transform: translateY(102%); transition: transform .35s; }
.ks.pp.r-handed .pp-hslip { opacity: 1; transform: translate(calc(var(--sx, 1) * 316px), 146px) rotate(-8deg); }
.ks[dir="rtl"].pp { --sx: -1; }
.ks.pp.b-handed .pp-hslip { animation: pp-hand 1.6s .2s cubic-bezier(.4,0,.3,1) both; }
@keyframes pp-hand { 0% { opacity: 0; transform: none; } 12% { opacity: 1; transform: none; } 100% { opacity: 1; transform: translate(calc(var(--sx, 1) * 316px), 146px) rotate(-8deg); } }

/* ---------- one scene in focus at a time ---------- */
.ks.pp.is-leading.b-ask .pp-counter, .ks.pp.is-leading.b-invoice .pp-counter, .ks.pp.is-leading.b-pdf .pp-counter { opacity: .4; filter: saturate(.5); }
.ks.pp.is-leading.b-counter .pp-chat, .ks.pp.is-leading.b-scan .pp-chat, .ks.pp.is-leading.b-sold .pp-chat, .ks.pp.is-leading.b-print .pp-chat, .ks.pp.is-leading.b-handed .pp-chat { opacity: .4; filter: saturate(.5); }
.ks.pp.is-leading.b-ask .pp-live, .ks.pp.is-leading.b-pdf .pp-live, .ks.pp.is-leading.b-counter .pp-live, .ks.pp.is-leading.b-handed .pp-live { opacity: .55; filter: saturate(.6); }
.ks.pp.is-leading.b-ask .pp-m.m-ask, .ks.pp.is-leading.b-pdf .pp-m.file { box-shadow: 0 0 0 2px rgba(11,186,216,.6), 0 8px 20px rgba(11,186,216,.25); }

/* ---------- narrow screens: copy, 1 the chat, the live phone, 2 the counter ---------- */
html.kp-narrow .ks.pp .kframe { padding: 88px 20px 40px; display: flex; flex-direction: column; align-items: center; }
html.kp-narrow .ks .pp-copy { position: relative; inset: auto; width: auto; align-self: stretch; }
html.kp-narrow .ks .pp-h { font-size: 34px; }
html.kp-narrow .ks .pp-chat, html.kp-narrow .ks .pp-live, html.kp-narrow .ks .pp-counter { position: relative; inset: auto; margin-top: 30px; opacity: 1 !important; filter: none !important; }
html.kp-narrow .ks .pp-chat { order: 1; display: flex; flex-direction: column; align-items: center; }
html.kp-narrow .ks .pp-live { order: 2; }
html.kp-narrow .ks .pp-counter { order: 3; zoom: .62; margin-top: 40px; }
html.kp-narrow .ks .pp-counter > .pp-tag { zoom: 1.4; inset-inline-end: auto; inset-inline-start: 0; top: 40px; }
html.kp-narrow .ks .pp-cph { --pz: .72; }
html.kp-narrow .ks .pp-live .phone { --pz: .8 !important; }
/* ---------- phones (round 5, the phone pass; updated round 7): Noor's phone opens from
   the Try it button (ktry.css hides .pp-live); Huda's chat is shorter: the same
   messages, less empty wallpaper ---------- */
html.kp-narrow .ks .pp-cph { height: 640px; }
html.kp-narrow .ks .pp-cph > .pp-cs { height: 616px; }

/* phones, shared reading order (kphone.css): a smaller chat phone, so the counter follows soon */
html.kp-narrow .ks.pp[data-kp] .pp-cph { --pz: .6; height: 540px; }
html.kp-narrow .ks.pp[data-kp] .pp-cph > .pp-cs { height: 516px; }
html.kp-narrow .ks.pp[data-kp] .pp-chat, html.kp-narrow .ks.pp[data-kp] .pp-counter { align-self: center; }
html.kp-narrow .ks.pp[data-kp] .pp-chat { margin-top: 6px; }

/* ---------- phones, told full screen (kphone-story.js, story/papers.js) ----------
   The wide page's two moments as one drawing (.pp-art, 1440 x 900; it takes no box
   anywhere else): Huda's chat and Noor's counter at their wide-page places, the
   camera going from one to the other. The phone layout's stacking and shrinking is
   undone, the focus dimming too, and the counter front runs down to the floor. */
.ks .pp-art { display: contents; }
html.kp-narrow .pp[data-kst] .pp-art { display: block !important; }
html.kp-narrow .pp[data-kst] .pp-live { display: none !important; }
html.kp-narrow .pp[data-kst] .pp-chat { position: absolute; inset: auto; inset-inline-start: 1032px; top: 74px; margin: 0; display: block; opacity: 1 !important; filter: none !important; }
/* a shorter chat phone (the chat sits at its bottom), so all of it fits under the headline at a readable size */
html.kp-narrow .pp[data-kst] .pp-cph { --pz: .7 !important; height: 720px !important; }
html.kp-narrow .pp[data-kst] .pp-cph > .pp-cs { height: 696px !important; }
html.kp-narrow .pp[data-kst] .pp-who { font-size: 17px; }
html.kp-narrow .pp[data-kst] .pp-counter { position: absolute; inset: auto; inset-inline-start: 24px; top: 470px; width: 560px; height: 430px; zoom: 1; margin: 0; opacity: 1 !important; filter: none !important; }
html.kp-narrow .pp[data-kst] .pp-counter > .pp-tag { zoom: 1.2; inset-inline-start: 186px; top: 300px; }
html.kp-narrow .pp[data-kst] .pp-chat > .pp-tag { zoom: 1.2; }
html.kp-narrow .pp[data-kst] .pp-cfront { height: 520px; }
html.kp-narrow .pp[data-kst] .pp-m.m-ask, html.kp-narrow .pp[data-kst] .pp-m.file { box-shadow: 0 1px 1px rgba(0,0,0,.08); }
html.kp-narrow .pp[data-kst] .pp-say { font-size: 19px; max-width: 290px; inset-inline-start: 330px; top: 58px; }
html.kp-narrow .pp[data-kst][lang="ar"] .pp-say { font-size: 20px; }
html.kp-narrow .pp[data-kst] .pp-sold { top: 56px; inset-inline-start: 286px; }
html.kp-narrow .pp[data-kst] .pp-sold-t b { font-size: 19px; }
html.kp-narrow .pp[data-kst] .pp-sold-t small { font-size: 15px; }
