/* NAME, D2: the WhatsApp operator conversation. Brand V2 "Operating Architecture" tokens. Scripted, no network. */
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/InstrumentSans-latin-400-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/InstrumentSans-latin-ext-400-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fragment Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/FragmentMono-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Noto Sans Arabic'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/NotoSansArabic-arabic-400-600-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }

:root {
  --ink: #141412; --ink-2: #1f1f1c; --ink-3: #2c2b27;
  --bone: #ebe8e0; --bone-hi: #f6f4ef; --stone: #cdc7ba;
  --t1: #141412; --t2: #45433e; --t3: #6a675f; --rule: #cdc7ba;
  --d1: #ebe8e0; --d2: #c2bdb2; --d3: #9c978c; --drule: #2c2b27;
  --signal: #d3bb35; --signal-ink: #7a680f;
  --fill: #5a5851; --fill-2: #8e8a80;
  --sans: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Fragment Mono', ui-monospace, Menlo, monospace;
  --arabic: 'Noto Sans Arabic', 'Instrument Sans', sans-serif;
  --e-out: cubic-bezier(.16, 1, .3, 1);
  --e-io: cubic-bezier(.65, 0, .35, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--stone); color: var(--t1); font: 400 16px/1.5 var(--sans); font-feature-settings: "tnum" 1, "lnum" 1; -webkit-font-smoothing: antialiased; min-height: 100vh; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p, h1, ol { margin: 0; }
[hidden] { display: none !important; }

/* ---------- page chrome ---------- */
.top { position: fixed; inset: 0 0 auto 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: 22px clamp(20px, 3.4vw, 48px); }
.wm { font: 600 16px/1 var(--sans); letter-spacing: .16em; }
.ctl { display: flex; align-items: center; gap: 18px; }
.lang { display: flex; border: 1px solid rgba(20,20,18,.28); border-radius: 999px; padding: 3px; }
.lang button { padding: 7px 14px; border-radius: 999px; font-size: 14px; line-height: 1; color: var(--t2); transition: background .3s var(--e-out), color .3s; }
.lang button[lang="ar"] { font-family: var(--arabic); font-size: 14px; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bone); }
.replay { font-size: 14px; color: var(--t2); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(20,20,18,.3); }
.replay:hover, .lang button:hover { color: var(--t1); }
.lang button[aria-pressed="true"]:hover { color: var(--bone); }
button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.stage { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: clamp(32px, 4vw, 72px); align-items: center; max-width: 1440px; margin: 0 auto; padding: 84px clamp(20px, 3.4vw, 48px) 48px; min-height: 100vh; }
.intro { max-width: 420px; justify-self: end; }
.eyebrow { font-size: 14px; color: var(--t3); margin-bottom: 22px; }
.intro h1 { font-size: clamp(40px, 3.6vw, 56px); line-height: 1.0; letter-spacing: -0.035em; font-weight: 500; }
.lede { margin-top: 26px; font-size: 17px; line-height: 1.5; color: var(--t2); max-width: 380px; }
.site { margin-top: 28px; font-size: 13px; color: var(--t3); padding-top: 14px; border-top: 1px solid rgba(20,20,18,.18); max-width: 380px; }

/* evidence column */
.behind { max-width: 340px; align-self: center; }
.behind-h { font-size: 14px; color: var(--t3); }
.behind-q { font-size: 24px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 500; margin: 6px 0 0; padding-bottom: 14px; border-bottom: 1px solid rgba(20,20,18,.28); }
.behind ol { list-style: none; padding: 0; min-height: 220px; }
.behind li { padding: 13px 0 12px; border-bottom: 1px solid rgba(20,20,18,.14); animation: rowin .6s var(--e-out) both; }
.behind li b { display: block; font: 400 11.5px/1.3 var(--mono); color: var(--t2); letter-spacing: .01em; margin-bottom: 4px; }
.behind li span { display: block; font-size: 15px; line-height: 1.35; }
.behind-f { margin-top: 16px; font-size: 13px; color: var(--t3); }
@keyframes rowin { from { opacity: 0; transform: translateY(8px); } }

/* ---------- the phone ---------- */
.phone { width: 392px; border-radius: 54px; background: #0d0d0c; padding: 11px; box-shadow: 0 1px 0 1px #2a2a27 inset, 0 50px 90px -46px rgba(20,20,18,.75), 0 18px 30px -24px rgba(20,20,18,.5); }
.scr { position: relative; border-radius: 44px; overflow: hidden; height: min(812px, calc(100vh - 120px)); min-height: 640px; display: flex; flex-direction: column; background: #e9e4da; font-family: var(--sans); }
.sb { display: flex; justify-content: space-between; align-items: center; padding: 15px 30px 6px; font-size: 14px; font-weight: 600; background: var(--bone-hi); }
.sb-r { display: flex; gap: 2px; align-items: flex-end; height: 11px; }
.sb-r i { width: 3px; background: var(--ink); border-radius: 1px; }
.sb-r i:nth-child(1) { height: 4px; } .sb-r i:nth-child(2) { height: 6px; } .sb-r i:nth-child(3) { height: 8px; } .sb-r i:nth-child(4) { height: 11px; }
.hd { display: flex; align-items: center; gap: 11px; padding: 8px 16px 11px; background: var(--bone-hi); border-bottom: 1px solid #dcd7cc; }
.av { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); position: relative; overflow: hidden; flex: none; }
/* the avatar is the device at its smallest: a line, a short gap, a hatched remainder */
.av i { position: absolute; left: 8px; right: 8px; top: 16px; height: 6px; }
.av i::before { content: ""; position: absolute; left: 0; width: 42%; top: 0; bottom: 0; background: var(--bone); }
.av i::after { content: ""; position: absolute; left: 54%; right: 0; top: 0; bottom: 0; background: repeating-linear-gradient(-45deg, rgba(235,232,224,.9) 0 1px, transparent 1px 3px); box-shadow: inset 0 0 0 1px rgba(235,232,224,.9); }
.nm b { display: block; font-size: 15.5px; font-weight: 600; letter-spacing: .1em; line-height: 1.2; }
.nm span { display: block; font-size: 12.5px; color: var(--t3); line-height: 1.25; }
.draftbar { text-align: center; font-size: 12px; color: var(--t2); background: #e0d9c6; padding: 6px 10px; border-bottom: 1px solid #d3cbb6; }
.draftbar span { font-family: var(--arabic); margin-inline-start: 6px; }

.chat { position: relative; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 10px 10px 14px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: none; overscroll-behavior: contain;
  background-color: #e9e4da;
  background-image: radial-gradient(rgba(20,20,18,.035) 1px, transparent 1px); background-size: 14px 14px; }
.chat::-webkit-scrollbar { display: none; }
.chat > :first-child { margin-top: auto; }
.day { align-self: center; font-size: 12px; background: var(--bone-hi); color: var(--t2); padding: 4px 11px; border-radius: 8px; margin: 2px 0 6px; box-shadow: 0 1px 0 rgba(20,20,18,.06); }

.msg { position: relative; max-width: 90%; border-radius: 12px; padding: 4px; box-shadow: 0 1px 0 rgba(20,20,18,.09); font-size: 15px; line-height: 1.4; color: #15140f; animation: pop .42s var(--e-out) both; transform-origin: left bottom; }
.msg.op { align-self: flex-start; background: #fbfaf7; border-top-left-radius: 3px; }
.msg.me { align-self: flex-end; background: #dfe5d2; border-top-right-radius: 3px; padding: 7px 10px 5px; max-width: 78%; transform-origin: right bottom; }
.msg .txt { padding: 6px 8px 0; }
.msg.me .txt { padding: 0; }
.msg .txt p + p { margin-top: 9px; }
.msg .txt p.l { padding-inline-start: 0; }
.msg .txt b { font-weight: 600; }
.msg .txt .ln { display: block; animation: linein .5s var(--e-out) both; }
.msg .tm { display: block; text-align: end; font-size: 11px; color: #7b786f; padding: 2px 6px 1px; }
.msg.me .tm { padding: 2px 0 0; }
.msg .tm .ok { color: #5c7f8c; margin-inline-start: 3px; letter-spacing: -2px; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes linein { from { opacity: 0; transform: translateY(5px); } }

.typing { align-self: flex-start; background: #fbfaf7; border-radius: 12px; border-top-left-radius: 3px; padding: 12px 14px; display: flex; gap: 4px; box-shadow: 0 1px 0 rgba(20,20,18,.09); animation: pop .3s var(--e-out) both; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #8e8a80; animation: dot 1.1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }

/* suggested questions */
.dock { background: var(--bone-hi); border-top: 1px solid #dcd7cc; padding: 10px 10px 22px; min-height: 64px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { font-size: 14px; line-height: 1.2; padding: 9px 13px; border-radius: 999px; background: #fff; border: 1px solid #cfc9bc; color: var(--t1); animation: chipin .5s var(--e-out) both; transition: background .2s, border-color .2s, transform .2s var(--e-out); }
.chip:hover { border-color: var(--ink); }
.chip:active { transform: scale(.97); }
.chip.ghost { background: transparent; color: var(--t2); }
.dock-hint { flex: 0 0 100%; font-size: 12px; color: var(--t3); margin: 0 2px 8px; animation: chipin .5s var(--e-out) both; }
@keyframes chipin { from { opacity: 0; transform: translateY(8px); } }

/* ---------- cards: the device inside the chat ---------- */
.card { border-radius: 9px; overflow: hidden; }
.card.dk { background: var(--ink); color: var(--d1); padding: 15px 15px 13px; }
.card.lt { background: var(--bone); color: var(--t1); padding: 13px 13px 12px; }
.c-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12.5px; color: var(--d3); }
.card.lt .c-top { color: var(--t3); }
.c-top b { font-weight: 500; color: var(--d1); }
.card.lt .c-top b { color: var(--t1); }
.c-fig { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 14px 0 14px; }
.c-fig > b { font-size: 54px; line-height: .86; font-weight: 500; letter-spacing: -0.045em; }
.c-fig > span { text-align: end; font-size: 13px; line-height: 1.35; color: var(--d2); }
.c-fig em { font-style: normal; color: var(--signal); font-weight: 500; }
.c-exp { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 10px; margin-top: 12px; font-size: 13px; color: var(--d2); }
.c-exp > * { white-space: nowrap; }
.c-exp b { font-size: 16px; font-weight: 600; color: var(--d1); }
.card.lt .c-exp { color: var(--t2); } .card.lt .c-exp b { color: var(--t1); }
.c-src { margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--drule); font: 400 11px/1.35 var(--mono); color: var(--d3); display: flex; justify-content: space-between; gap: 8px; }
.card.lt .c-src { border-top-color: var(--rule); color: var(--t3); }
.c-src .wmk { font: 600 11px/1.35 var(--sans); letter-spacing: .16em; color: var(--d1); }

/* gap bar */
.gb { --c: var(--d1); --f1: #aaa59a; --f2: #8e8a80; --hatch: rgba(235,232,224,.6); position: relative; }
.card.lt .gb { --c: var(--t1); --f1: #5a5851; --f2: #8e8a80; --hatch: rgba(20,20,18,.55); }
.gb-idx { display: flex; gap: 2px; margin-bottom: 6px; font-size: 12px; color: var(--d2); }
.card.lt .gb-idx { color: var(--t2); }
.gb-idx span { flex: var(--w) 1 0; min-width: 0; white-space: nowrap; }
.gb-bar { position: relative; display: flex; gap: 2px; height: var(--h, 26px); }
.gb-bar::before, .gb-bar::after { content: ""; position: absolute; top: -5px; bottom: -5px; width: 1px; background: var(--c); }
.gb-bar::before { inset-inline-start: -4px; } .gb-bar::after { inset-inline-end: -4px; }
.seg { flex: var(--w) 1 0; min-width: 0; background: var(--f1); transform-origin: left center; }
[dir="rtl"] .seg { transform-origin: right center; }
.seg.k2 { background: var(--f2); }
.seg.act { background: var(--signal); }
.seg.dim { opacity: .28; }
.seg.hatch { background: repeating-linear-gradient(-45deg, var(--hatch) 0 1px, transparent 1px 5px); box-shadow: inset 0 0 0 1px var(--hatch); }
.seg.out { background: transparent; box-shadow: inset 0 0 0 1px var(--f2); }
.anim .seg { animation: grow .7s var(--e-out) both; animation-delay: var(--d, 0s); }
.anim .seg.hatch { animation: hatchin 1.1s var(--e-io) both; animation-delay: var(--d, 0s); }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes hatchin { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
[dir="rtl"] .anim .seg.hatch { animation-name: hatchin-r; }
@keyframes hatchin-r { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
.gb-ends { display: flex; justify-content: space-between; margin-top: 7px; font-size: 12px; color: var(--d3); }
.card.lt .gb-ends { color: var(--t3); }

/* rows inside light cards */
.rows { list-style: none; padding: 0; margin: 12px 0 0; }
.rows li { display: grid; grid-template-columns: 22px 1fr auto; gap: 2px 8px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--rule); font-size: 13.5px; line-height: 1.3; }
.rows li .i { font-size: 12px; color: var(--t3); }
.rows li .v { text-align: end; white-space: nowrap; font-weight: 500; }
.rows li .v small { display: block; font-size: 12px; font-weight: 400; color: var(--t3); }
.rows li .sub { grid-column: 2 / 4; font-size: 12.5px; color: var(--t3); }
.rows li.act .i, .rows li.act .v { color: var(--signal-ink); }
.sw { display: inline-block; width: 12px; height: 10px; vertical-align: -1px; margin-inline-end: 6px; background: var(--fill); }
.sw.act { background: var(--signal); }
.sw.hatch { background: repeating-linear-gradient(-45deg, rgba(20,20,18,.6) 0 1px, transparent 1px 4px); box-shadow: inset 0 0 0 1px rgba(20,20,18,.55); }
.sw.k2 { background: var(--fill-2); }
.rows li .tag { font-size: 11.5px; font-weight: 500; padding: 1px 7px; border-radius: 999px; border: 1px solid currentColor; color: var(--t2); }
.rows li .tag.hi { color: var(--t1); }

/* micro operating line: spec vs plated */
.oline { margin: 14px 0 4px; }
.oline-row { position: relative; height: 54px; }
.oline .base { position: absolute; inset-inline-start: 0; top: 22px; height: 2px; background: var(--t1); width: var(--spec); }
.oline .over { position: absolute; top: 19px; height: 8px; inset-inline-start: var(--spec); width: var(--over); background: var(--signal); }
.oline .tick { position: absolute; top: 16px; width: 1px; height: 16px; background: var(--t1); }
.oline .lab.below { top: 36px; }
.oline .lab { position: absolute; top: 0; font-size: 12px; color: var(--t2); white-space: nowrap; }
.anim .oline .base { animation: grow .8s var(--e-out) both; transform-origin: left center; }
.anim .oline .over { animation: grow .7s var(--e-out) .7s both; transform-origin: left center; }
[dir="rtl"] .anim .oline .base, [dir="rtl"] .anim .oline .over { transform-origin: right center; }

/* thermal ticket: the prep sheet change */
.ticket { background: #faf8f2; color: #26251f; padding: 11px 12px 10px; border-radius: 3px; box-shadow: 0 1px 2px rgba(20,20,18,.12); position: relative; margin-top: 4px; }
.ticket::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px; background: radial-gradient(circle at 3px 0, transparent 2.5px, #faf8f2 3px) 0 0 / 6px 4px repeat-x; }
.ticket .t-h { display: flex; justify-content: space-between; font: 400 11px/1.3 var(--mono); color: #5f5d56; }
.ticket .t-b { font-size: 15px; font-weight: 600; margin: 6px 0 2px; }
.ticket .t-l { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; border-top: 1px dashed #c9c3b5; }
.ticket .t-l:first-of-type { border-top: 0; }
.ticket .t-l b { font-weight: 600; }

/* share bars (delivery) */
.share { margin-top: 12px; }
.share-r { display: grid; grid-template-columns: 92px 1fr 40px; align-items: center; gap: 8px; font-size: 12.5px; color: var(--t2); padding: 4px 0; }
.share-r .tr { height: 10px; background: rgba(20,20,18,.08); position: relative; }
.share-r .fl { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--v); background: var(--fill); }
.share-r .fl.act { background: var(--signal); }
.share-r .v { text-align: end; font-weight: 500; color: var(--t1); }
.anim .share-r .fl { animation: grow .8s var(--e-out) both; animation-delay: var(--d, 0s); transform-origin: left center; }
[dir="rtl"] .anim .share-r .fl { transform-origin: right center; }

/* timeline (Friday) */
.tl { list-style: none; padding: 0; margin: 12px 0 0; position: relative; }
.tl::before { content: ""; position: absolute; inset-inline-start: 5px; top: 8px; bottom: 10px; width: 1px; background: var(--t3); }
.tl li { position: relative; padding: 0 0 11px; padding-inline-start: 22px; font-size: 13.5px; line-height: 1.3; }
.tl li::before { content: ""; position: absolute; inset-inline-start: 1px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--bone); box-shadow: inset 0 0 0 1.5px var(--t1); }
.tl li.now::before { background: var(--signal); box-shadow: inset 0 0 0 1.5px var(--signal-ink); }
.tl li b { display: block; font-size: 12px; font-weight: 500; color: var(--t3); }
.compare { margin-top: 6px; }
.compare-r { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 8px; font-size: 12.5px; color: var(--t2); padding: 5px 0; }
.compare-r .bar { height: 14px; position: relative; }
.compare-r .bar i { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--v); background: var(--signal); }
.compare-r .bar i.out { background: transparent; box-shadow: inset 0 0 0 1px var(--t1); }
.compare-r .bar i.out::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, rgba(20,20,18,.35) 0 1px, transparent 1px 5px); }
.compare-r small { display: block; color: var(--t3); font-size: 11.5px; }

/* ---------- Arabic ---------- */
[dir="rtl"] .msg, [dir="rtl"] .card, [dir="rtl"] .chip, [dir="rtl"] .dock-hint, [dir="rtl"] .day { font-family: var(--arabic); }
[dir="rtl"] .msg { font-size: 15px; line-height: 1.6; }
[dir="rtl"] .msg.op { border-top-left-radius: 12px; border-top-right-radius: 3px; transform-origin: right bottom; }
[dir="rtl"] .msg.me { border-top-right-radius: 12px; border-top-left-radius: 3px; transform-origin: left bottom; }
[dir="rtl"] .typing { border-top-left-radius: 12px; border-top-right-radius: 3px; }
[dir="rtl"] .c-fig > b, [dir="rtl"] .num { font-family: var(--sans); }
.num { unicode-bidi: isolate; direction: ltr; }

/* ---------- small screens: the phone is the page ---------- */
@media (max-width: 1180px) {
  .stage { grid-template-columns: minmax(0, 1fr) auto; }
  .behind { display: none; }
}
@media (max-width: 820px) {
  .top { position: sticky; top: 0; background: var(--stone); padding: 12px 16px; border-bottom: 1px solid rgba(20,20,18,.14); }
  .wm { font-size: 14px; }
  .ctl { gap: 12px; }
  .lang button { padding: 6px 11px; font-size: 13px; }
  .stage { display: flex; flex-direction: column; padding: 0; min-height: 0; gap: 0; }
  .device { order: 1; width: 100%; }
  .intro { order: 2; max-width: none; padding: 28px 20px 40px; justify-self: auto; }
  .eyebrow { margin-bottom: 10px; font-size: 13px; }
  .intro h1 { font-size: 32px; letter-spacing: -0.03em; }
  .lede { margin-top: 12px; font-size: 15px; }
  .site { margin-top: 14px; padding-top: 10px; font-size: 12px; }
  .phone { width: 100%; border-radius: 0; padding: 0; box-shadow: none; background: none; }
  .scr { border-radius: 0; height: calc(100svh - 54px); min-height: 560px; max-height: 900px; }
  .sb { display: none; }
}
@media (max-width: 360px) {
  .c-fig > b { font-size: 44px; }
  .c-top { font-size: 12px; }
  .msg { max-width: 94%; }
  .replay { display: none; }
  .chip { font-size: 13px; padding: 8px 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
}
.sw.hatch.dk { background: repeating-linear-gradient(-45deg, rgba(235,232,224,.7) 0 1px, transparent 1px 4px); box-shadow: inset 0 0 0 1px rgba(235,232,224,.6); }
.c-src span:last-child { text-align: end; }
.chip.press { transform: scale(.96); background: #ece8de; border-color: var(--ink); }
.lang button.press { background: rgba(20,20,18,.12); }
