/* telefony (v12, from v11): iPhones at an angle with the real phone interface on their screens.
   Device and camera are the v9 "iphone-dwa" component, unchanged except the prefix (ip2 -> ip3), so it never collides
   with the iphone-dwa.css that v10 still loads. Screens:
     front, left:  the start page, three agents, ONE question with Allow / Deny (as in v11);
     back, right:  v12: one session of one agent, no owl. Its summary in three lines, the transcript in short (grey rows,
                   the agent's last sentence readable), a card "Suggested next" with Send / Edit.
   Variants (root classes): two phones (default); .ip3-solo = only the session phone, upright and centred;
   .ip3-narrow-one / .ip3-narrow-sess = in a narrow slot only the front / only the session phone.
   Screen type is larger than in v9 (rows 18, question 23, buttons 18 device px) so the phones read at a glance.
   Tokens: v10 site.css (--shell --screen --line --tx --tx2 --dim --cu --amber --green --red --sans --mono), each with
   a fallback equal to v10. Prefix: ip3. Nothing here styles an element outside .ip3. */

.ip3{
  --ip3-shell:var(--shell,#000);
  --ip3-screen:var(--screen,#141312);
  --ip3-tx:var(--tx,#f2ece5);
  --ip3-tx2:var(--tx2,#b9b1a8);
  --ip3-dim:var(--dim,#948e86);
  --ip3-work:var(--cu,#eb670f);
  --ip3-wait:var(--amber,#f3bb52);
  --ip3-done:var(--green,#78c985);
  --ip3-err:var(--red,#f26b5e);
  --ip3-sans:var(--sans,"Inter Tight","Inter",system-ui,-apple-system,"Segoe UI",sans-serif);
  --ip3-mono:var(--mono,ui-monospace,"SF Mono",Menlo,Consolas,monospace);
  /* phone page tokens (remote-page/app.css) */
  --ip3-raise:#1d1c1a; --ip3-raise2:#262421; --ip3-cmd:#080808; --ip3-line:var(--line,#2a2825);
  --ip3-hair:rgba(242,236,229,.10); --ip3-hair2:rgba(242,236,229,.18); --ip3-fill:rgba(242,236,229,.06);
  --ip3-ask:rgba(243,187,82,.42);
  /* device, in device px */
  --ip3-w:396px; --ip3-h:832px; --ip3-r:69px;
  --ip3-metal:linear-gradient(180deg,#d9d4c9 0,#aaa59b 2.5%,#75716a 9%,#8f8a81 21%,#5d5a54 38%,#494742 62%,#36342f 86%,#2a2926 100%);
  --ip3-shade:23 18 10;

  position:relative;
  container:ip3 / inline-size;
  overflow-x:clip;
}
.ip3 *,.ip3 *::before,.ip3 *::after{box-sizing:border-box}

/* ───────── stage: both slots share one camera ───────── */
.ip3-stage{
  --ip3-k:.8;
  position:relative;
  height:calc(var(--ip3-h)*var(--ip3-k)*1.14);
  -webkit-user-select:none;user-select:none;
}
.ip3-slot{
  position:absolute;inset:0;
  perspective:3600px;
  perspective-origin:calc(50% + var(--ip3-px,0)*3.5%) calc(0% + var(--ip3-py,0)*4%);
  pointer-events:none;
}
.ip3-slot.ip3-front{z-index:2}
.ip3-slot.ip3-back{z-index:1}

.ip3-phone{
  --ry:0deg; --x:0px; --z:0px;
  position:absolute;left:50%;bottom:9%;
  width:var(--ip3-w);height:var(--ip3-h);margin:0 0 0 calc(var(--ip3-w)/-2);
  transform-origin:50% 100%;
  transform-style:preserve-3d;
  transform:
    translate3d(var(--x),0,var(--z))
    rotateY(calc(var(--ry) + var(--ip3-s,0)*3deg + var(--ip3-px,0)*1.5deg + var(--ip3-e,0)*var(--ge,8deg)))
    scale(var(--ip3-k));
}
.ip3-front .ip3-phone{--ry:20deg;--x:calc(-190px*var(--ip3-k));--z:70px;--ge:9deg}
.ip3-back .ip3-phone{--ry:-25deg;--x:calc(200px*var(--ip3-k));--z:-250px;--ge:-11deg}

/* ───────── floor ───────── */
.ip3-ground{
  position:absolute;left:50%;top:100%;width:1000px;height:700px;margin-left:-500px;
  transform-origin:50% 0;transform:translateZ(-322px) rotateX(90deg);
  background:
    radial-gradient(ellipse 150px 20px at 50% 46.4%,rgb(var(--ip3-shade)/.78),rgb(var(--ip3-shade)/.4) 60%,transparent 100%),
    radial-gradient(ellipse 230px 78px at 50% 49%,rgb(var(--ip3-shade)/.34),transparent 100%),
    radial-gradient(ellipse var(--ip3-soft,430px) 270px at var(--ip3-cast,54%) 52%,rgb(var(--ip3-shade)/.17),transparent 100%);
}
.ip3-refl{
  position:absolute;left:0;top:100%;width:100%;height:100px;border-radius:var(--ip3-r) var(--ip3-r) 0 0;
  transform:translateZ(-20px);
  background:linear-gradient(180deg,rgb(var(--ip3-shade)/.17) 0,rgb(var(--ip3-shade)/.06) 38%,rgb(var(--ip3-shade)/0) 86%);
}
.ip3-front .ip3-ground{--ip3-cast:57%}
.ip3-back .ip3-ground{--ip3-cast:45%}

/* ───────── body: 16 slices from the front chamfer to the back glass ───────── */
.ip3-edge{position:absolute;inset:0;transform-style:preserve-3d}
.ip3-edge i{
  --c:0 0 0; --a:0;
  position:absolute;inset:0;border-radius:var(--ip3-r);
  background:linear-gradient(rgb(var(--c)/var(--a)),rgb(var(--c)/var(--a))),var(--ip3-metal);
  transform:translateZ(calc(-1.4px - var(--i)*2.82px));
}
.ip3-edge i:nth-child(1){--i:0;--c:255 255 255;--a:.34}
.ip3-edge i:nth-child(2){--i:1;--c:255 255 255;--a:.12}
.ip3-edge i:nth-child(3){--i:2;--a:.02}
.ip3-edge i:nth-child(4){--i:3;--a:.07}
.ip3-edge i:nth-child(5){--i:4;--a:.11}
.ip3-edge i:nth-child(6){--i:5;--a:.15}
.ip3-edge i:nth-child(7){--i:6;--a:.18}
.ip3-edge i:nth-child(8){--i:7;--a:.21}
.ip3-edge i:nth-child(9){--i:8;--a:.24}
.ip3-edge i:nth-child(10){--i:9;--a:.27}
.ip3-edge i:nth-child(11){--i:10;--a:.3}
.ip3-edge i:nth-child(12){--i:11;--a:.34}
.ip3-edge i:nth-child(13){--i:12;--a:.4}
.ip3-edge i:nth-child(14){--i:13;--a:.5}
.ip3-edge i:nth-child(15){--i:14;--c:255 255 255;--a:.16}
.ip3-edge i:nth-child(16){--i:15;background:#171615}
.ip3-back .ip3-edge i:nth-child(n+3):nth-child(-n+14){--c:8 7 6;--a:calc(.34 + var(--i)*.022)}

/* ───────── side buttons and antenna lines ───────── */
.ip3-keys{position:absolute;inset:0;transform-style:preserve-3d}
.ip3-keys i{
  position:absolute;width:19px;border-radius:5px;
  background:linear-gradient(90deg,rgba(255,255,255,.34),rgba(255,255,255,0) 22%,rgba(0,0,0,.18) 100%),var(--ip3-metal);
  background-size:100% 100%,100% 832px;
  box-shadow:0 0 0 .6px rgba(0,0,0,.5);
}
.ip3-keys .kl{left:-2.6px;transform-origin:0 50%;transform:translateZ(-12.5px) rotateY(90deg)}
.ip3-keys .kr{right:-2.6px;transform-origin:100% 50%;transform:translateZ(-12.5px) rotateY(-90deg)}
.ip3-keys .k-act{top:168px;height:30px;background-position:0 0,0 -168px}
.ip3-keys .k-up{top:246px;height:58px;background-position:0 0,0 -246px}
.ip3-keys .k-dn{top:322px;height:58px;background-position:0 0,0 -322px}
.ip3-keys .k-pw{top:268px;height:96px;background-position:0 0,0 -268px}
.ip3-keys .k-cc{top:520px;height:62px;right:-.4px;background:linear-gradient(90deg,#3a3835,#161514 40%,#0d0d0c);box-shadow:0 0 0 .6px rgba(255,255,255,.14)}
.ip3-keys .k-an{width:44px;height:1.6px;border-radius:0;background:rgba(0,0,0,.38);box-shadow:none}
.ip3-keys .kl.k-an{left:-.3px;transform:translateZ(-.6px) rotateY(90deg)}
.ip3-keys .kr.k-an{right:-.3px;transform:translateZ(-.6px) rotateY(-90deg)}
.ip3-keys .k-an.t{top:96px}.ip3-keys .k-an.b{top:734px}

/* ───────── face: frame chamfer, glass, display ───────── */
.ip3-face{
  position:absolute;inset:0;border-radius:var(--ip3-r);
  background:linear-gradient(128deg,#d6d1c6 0,#958f86 12%,#55524d 34%,#3d3b37 58%,#5d5a54 80%,#9a958c 100%);
}
.ip3-face::before{
  content:"";position:absolute;inset:3.4px;border-radius:calc(var(--ip3-r) - 3.4px);background:#060606;
  box-shadow:0 0 0 .8px #000,inset 0 0 0 1px rgba(255,255,255,.05);
}
.ip3-screen{
  position:absolute;inset:12px;border-radius:calc(var(--ip3-r) - 12px);overflow:hidden;isolation:isolate;
  display:flex;flex-direction:column;
  background:var(--ip3-shell);color:var(--ip3-tx);
  font:400 18px/25px var(--ip3-sans);font-synthesis:none;-webkit-font-smoothing:antialiased;text-align:left;
  overflow-wrap:break-word;
}
.ip3-island{
  position:absolute;left:50%;top:23px;width:116px;height:34px;margin-left:-58px;border-radius:17px;background:#000;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.03);
}
.ip3-island::after{
  content:"";position:absolute;right:11px;top:11px;width:12px;height:12px;border-radius:50%;
  background:radial-gradient(circle at 36% 34%,#3b4a70 0,#141a2a 28%,#07080c 60%,#000 100%);
  box-shadow:0 0 0 1px rgba(255,255,255,.04);
}
.ip3-glare{
  position:absolute;inset:3.4px;border-radius:calc(var(--ip3-r) - 3.4px);overflow:hidden;
  transform:translateZ(.6px);pointer-events:none;
  box-shadow:inset 0 1.2px 1px rgba(255,255,255,.16),inset 1.2px 0 1px rgba(255,255,255,.07),inset 0 -1px 1px rgba(255,255,255,.05);
}
.ip3-glare::before{
  content:"";position:absolute;inset:-10% -40%;
  background:linear-gradient(var(--ip3-ga,112deg),rgba(255,255,255,.16) 0,rgba(255,255,255,.085) 24%,rgba(255,255,255,.03) 37%,rgba(255,255,255,0) 37.3%);
  transform:translateX(calc(var(--ip3-s,0)*-26px + var(--ip3-px,0)*-18px));
}
.ip3-back .ip3-glare::before{--ip3-ga:248deg;opacity:.8}

/* ═════════ the phone page (remote-page/app.css), prefixed, type one step larger ═════════ */
.ip3-screen :where(p){margin:0;padding:0}
.ip3-screen :where(b){font-weight:600}
.ip3-screen :where(i,em){font-style:normal}
.ip3-m{font:400 14px/19px var(--ip3-mono);color:var(--ip3-dim);white-space:nowrap}
.ip3-grow{flex:1 1 auto;min-width:0}
.ip3-d{display:inline-block;flex:none;width:10px;height:10px;border-radius:50%;background:var(--ip3-dim)}
.ip3-d.needs{background:var(--ip3-wait)}.ip3-d.working{background:var(--ip3-work)}.ip3-d.done,.ip3-d.online{background:var(--ip3-done)}
.ip3-screen svg{display:block;flex:none;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round}

/* iOS status bar and home indicator */
.ip3-status{position:absolute;left:0;right:0;top:0;z-index:5;height:51px;display:flex;align-items:center;justify-content:space-between;padding:8px 31px 0 44px;font:600 16px/1 var(--ip3-sans);letter-spacing:-.01em;color:#fff}
.ip3-status span{display:flex;align-items:center;gap:6px}
.ip3-status svg{fill:currentColor;stroke:none}
.ip3-home{position:absolute;left:50%;bottom:8px;z-index:5;width:128px;height:5px;margin-left:-64px;border-radius:3px;background:#fff}

/* top bar: the dots of the agents, the Mac */
.ip3-tb{flex:none;position:relative;z-index:2;display:flex;align-items:center;gap:10px;padding:55px 14px 4px}
.ip3-dots{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:44px;min-width:44px;padding:0 15px;border-radius:22px;background:var(--ip3-screen);box-shadow:inset 0 0 0 1px var(--ip3-hair)}
.ip3-dots .ip3-d{width:8px;height:8px}
.ip3-macb{position:relative;display:inline-grid;place-items:center;width:44px;height:44px;border-radius:50%;background:var(--ip3-screen);box-shadow:inset 0 0 0 1px var(--ip3-hair);color:var(--ip3-tx2)}
.ip3-macb svg{width:18px;height:18px;stroke-width:1.5}
.ip3-macb .ip3-d{position:absolute;right:2px;top:2px;width:9px;height:9px;box-shadow:0 0 0 2px var(--ip3-shell)}

/* start: Glauka and the sentence */
.ip3-hero{flex:none;position:relative;display:flex;flex-direction:column;align-items:center;gap:12px;padding:8px 20px 18px;text-align:center}
.ip3-glow{position:absolute;left:50%;top:35px;width:240px;height:240px;margin-left:-120px;z-index:0;
  background:radial-gradient(circle closest-side,rgba(243,187,82,.30) 0,rgba(243,187,82,.09) 55%,rgba(243,187,82,0) 100%)}
.ip3-scroll{flex:1 1 auto;min-height:0;position:relative;z-index:1;display:flex;flex-direction:column;overflow:hidden}
.ip3-owl{display:block;width:auto;height:112px;max-width:none}
.ip3-screen .ip3-h1{font:500 30px/36px var(--ip3-sans);letter-spacing:-.018em;color:var(--ip3-tx);white-space:nowrap}
.ip3-hero .ip3-m{margin-top:-6px}

/* agents: at most three rows */
.ip3-ov{flex:none;display:flex;flex-direction:column;padding:0 8px}
.ip3-r{display:grid;grid-template-columns:10px auto minmax(0,1fr) auto;align-items:center;column-gap:12px;height:52px;padding:0 12px;border-radius:14px;background:var(--ip3-shell)}
.ip3-r b{font:600 18px/24px var(--ip3-sans);white-space:nowrap}
.ip3-r span{font-size:17px;line-height:24px;color:var(--ip3-tx2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ip3-r.hot span{color:var(--ip3-tx)}
.ip3-r em{font:400 14px/19px var(--ip3-mono);color:var(--ip3-dim);white-space:nowrap}

/* cards */
.ip3-th{flex:none;display:flex;flex-direction:column;gap:10px;padding:14px 14px 16px}
.ip3-card{flex:none;border-radius:22px;background:var(--ip3-screen);padding:16px 16px 16px}
.ip3-card.ask{box-shadow:inset 0 0 0 1px var(--ip3-ask)}
.ip3-card>.hd{display:flex;align-items:center;gap:9px;margin-bottom:10px}
.ip3-card>.hd b{font:600 17px/23px var(--ip3-sans)}
.ip3-card>.hd .ip3-m{margin-left:auto}
.ip3-q{font:500 23px/30px var(--ip3-sans);letter-spacing:-.008em;margin-bottom:16px}
.ip3-q code{font:400 19px/26px var(--ip3-mono);padding:2px 8px;border-radius:8px;background:var(--ip3-cmd);box-shadow:inset 0 0 0 1px var(--ip3-line);color:var(--ip3-tx);white-space:nowrap}
.ip3-acts{display:flex;gap:9px}
.ip3-btn{display:inline-flex;align-items:center;justify-content:center;flex:1 1 0;min-height:54px;padding:0 18px;border-radius:27px;font:600 18px/24px var(--ip3-sans);box-shadow:inset 0 0 0 1px var(--ip3-hair2);white-space:nowrap}
.ip3-btn.pri{flex:1.5 1 0;background:var(--ip3-tx);color:var(--ip3-screen);box-shadow:none}

/* v12, one session of one agent (no owl): name and state, summary, transcript in short, the suggested next prompt.
   One level of surface only: the summary and the transcript stand on the screen, the card is the one outlined thing,
   and the prompt inside it is plain text (no box in the box). The space sits above the card, like over an input. */
.ip3-nav{flex:none;display:flex;align-items:center;gap:10px;padding:55px 22px 6px 6px}
.ip3-back-b{display:inline-grid;place-items:center;flex:none;width:44px;height:44px;margin-right:-4px;color:var(--ip3-tx2)}
.ip3-back-b svg{width:20px;height:20px;stroke-width:1.6}
.ip3-nav .ip3-d{width:9px;height:9px}
.ip3-screen .ip3-nh{font:600 21px/26px var(--ip3-sans);letter-spacing:-.01em}
.ip3-nav .ip3-m{margin-left:auto}
.ip3-scroll.ip3-one{padding:0 0 34px}
.ip3-lb{font:400 14px/19px var(--ip3-mono);color:var(--ip3-dim);white-space:nowrap}
/* summary: three short lines, the largest type on the screen */
.ip3-sum{flex:none;padding:30px 24px 0}
.ip3-sl{list-style:none;margin:10px 0 0;padding:0}
.ip3-sl li{margin:0;padding:0;font:500 26px/35px var(--ip3-sans);letter-spacing:-.016em;color:var(--ip3-tx)}
/* transcript in short: grey rows of different length (yours on the right), the agent's last sentence readable.
   The rows are drawn, not text: the reader (and the screen reader, through the figure's label) gets the last sentence. */
.ip3-tr{flex:none;display:flex;flex-direction:column;gap:15px;margin:32px 24px 0;padding-top:26px;box-shadow:inset 0 1px 0 var(--ip3-hair)}
.ip3-tr .ip3-lb{margin-bottom:5px}
.ip3-ln{display:block;flex:none;height:11px;border-radius:6px;background:rgba(242,236,229,.13)}
.ip3-ln.you{align-self:flex-end;width:46%;background:rgba(242,236,229,.22)}
.ip3-ln.w1{width:92%}.ip3-ln.w2{width:70%}
/* v12 round 2 (control 1, look): the transcript in two short real lines instead of grey bars (they read as a loading skeleton):
   your prompt in a quiet bubble on the right, one line of what the agent did */
.ip3-tl{margin:0;font:400 17px/23px var(--ip3-sans);color:var(--ip3-tx2)}
.ip3-tl.you{align-self:flex-end;max-width:84%;padding:7px 14px;border-radius:16px;background:rgba(242,236,229,.1);color:var(--ip3-tx)}
.ip3-last{font-size:19px;line-height:26px;color:var(--ip3-tx2)}
/* the card: one sentence of prompt, Send / Edit, the promise */
.ip3-card.next{margin:auto 14px 0;box-shadow:inset 0 0 0 1px var(--ip3-hair2)}
.ip3-card.next>.hd{margin-bottom:8px}
.ip3-np{margin-bottom:18px;font:500 21px/29px var(--ip3-sans);letter-spacing:-.008em;color:var(--ip3-tx)}
.ip3-note{margin-top:12px;text-align:center}

/* input pill */
.ip3-pillw{flex:none;position:relative;z-index:2;margin-top:auto;padding:8px 12px 36px;background:var(--ip3-shell)}
.ip3-pill{display:flex;align-items:center;gap:8px;min-height:58px;padding:7px 8px;border-radius:29px;background:var(--ip3-screen);box-shadow:inset 0 0 0 1px var(--ip3-hair)}
.ip3-plus,.ip3-send{display:inline-grid;place-items:center;flex:none;width:44px;height:44px;border-radius:50%;background:var(--ip3-raise2);color:var(--ip3-tx)}
.ip3-send{color:var(--ip3-dim)}
.ip3-plus svg{width:18px;height:18px;stroke-width:1.5}.ip3-send svg{width:17px;height:17px;stroke-width:1.7}
.ip3-chip{display:inline-flex;align-items:center;gap:7px;flex:none;height:44px;padding:0 12px 0 11px;border-radius:22px;box-shadow:inset 0 0 0 1px var(--ip3-hair2);font:500 16px/21px var(--ip3-sans);white-space:nowrap}
.ip3-chip b{font-weight:500}
.ip3-chip .ip3-d{width:8px;height:8px}
.ip3-chip svg{width:9px;height:9px;stroke-width:1.8;color:var(--ip3-dim)}
.ip3-pht{flex:1 1 0;min-width:0;font-size:18px;line-height:25px;color:var(--ip3-dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ───────── sizes: the device scale follows the width of the slot, not the window ───────── */
@container ip3 (max-width:819px){
  .ip3-stage{--ip3-k:.7;--ip3-soft:310px}
}
@container ip3 (max-width:679px){
  .ip3-stage{--ip3-k:.6;--ip3-soft:280px}
}
/* narrow: one phone under the other, both upright enough to read */
@container ip3 (max-width:559px){
  .ip3-stage{--ip3-k:.78;--ip3-soft:205px;height:auto}
  .ip3-slot{position:relative;inset:auto;height:calc(var(--ip3-h)*var(--ip3-k) + 72px);perspective-origin:50% 0%}
  .ip3-slot+.ip3-slot{margin-top:-8px}
  .ip3-phone{bottom:52px}
  .ip3-front .ip3-ground,.ip3-back .ip3-ground{--ip3-cast:50%}
  .ip3-front .ip3-phone{--ry:12deg;--x:-8px;--z:0px}
  .ip3-back .ip3-phone{--ry:-12deg;--x:8px;--z:0px}
}
@container ip3 (max-width:379px){
  .ip3-stage{--ip3-k:.72}
  .ip3-front .ip3-phone{--x:-4px}
  .ip3-back .ip3-phone{--x:4px}
}
@container ip3 (max-width:319px){
  .ip3-stage{--ip3-k:.66}
}

/* option: on a narrow slot show only one of the two phones. Saves about 660 px of height at 390.
   .ip3-narrow-one: the front (the list with the question, as in v11); .ip3-narrow-sess: the session (v12, no owl). */
@container ip3 (max-width:559px){
  .ip3-narrow-one .ip3-back{display:none}
  .ip3-narrow-sess .ip3-front{display:none}
  .ip3-narrow-sess .ip3-back{margin-top:0}
}

/* ───────── v12 variant: one phone, the session only (root .ip3-solo, one slot .ip3-back) ───────── */
.ip3-solo .ip3-back .ip3-phone{--ry:-16deg;--x:0px;--z:0px;--ge:-10deg}
.ip3-solo .ip3-back .ip3-ground{--ip3-cast:47%}
@container ip3 (max-width:559px){
  .ip3-solo .ip3-back .ip3-phone{--ry:-12deg;--x:0px}
}
