/* iPhone shell and Telegram-style chat; all controls stay inside the screen. */
.tg-demo{--tg-blue:#2481cc;box-sizing:border-box;position:relative;display:flex;flex-direction:column;width:100%;max-width:390px;height:780px;max-height:900px;margin:0 auto;padding:0!important;border:9px solid #202126;border-radius:52px;background:#dce5d5;color:#121212;overflow:hidden;scroll-margin-top:110px;text-align:left;font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;box-shadow:0 0 0 2px #62636a,0 0 0 4px #1a1a1d,0 28px 65px #0a0f1a30;background-image:radial-gradient(ellipse at 15% 30%,#c3d5c380,transparent 60%),radial-gradient(ellipse at 90% 70%,#d6d6b780,transparent 60%)}
.tg-demo *, .tg-demo *::before,.tg-demo *::after{box-sizing:border-box}
.tg-demo__status{height:53px;flex-shrink:0;background:#f7f7f8;display:flex;align-items:center;justify-content:space-between;padding:9px 22px 0;font-size:14px;font-weight:700;position:relative}.tg-demo__island{position:absolute;width:104px;height:29px;top:10px;left:50%;transform:translateX(-50%);border-radius:20px;background:#050505}.tg-demo__indicators{display:flex;align-items:center;gap:6px}.tg-demo__battery{width:23px;height:11px;border:1px solid #96969a;border-radius:3px;position:relative}.tg-demo__battery::before{content:"";position:absolute;inset:1px;background:#222;border-radius:1px}.tg-demo__battery::after{content:"";position:absolute;right:-3px;top:3px;width:2px;height:4px;background:#96969a;border-radius:1px}
.tg-demo__bar{display:flex;align-items:center;gap:9px;padding:8px 12px 11px;background:#f7f7f8;min-height:64px;border-bottom:1px solid #00000015;flex-shrink:0}.tg-demo__back{font:40px/1 Arial;color:var(--tg-blue);margin-right:2px}.tg-demo__bar strong{font-size:15px;line-height:1.2;font-weight:600}.tg-demo__bar small{display:block;color:#8b8b90;font-size:12px;margin-top:3px}.tg-demo__avatar{display:grid;place-items:center;background:linear-gradient(150deg,#6bc4f0,#2588d0);color:white;width:37px;height:37px;border-radius:50%;flex-shrink:0;font-size:19px;font-weight:600}.tg-demo[data-demo="fleet"] .tg-demo__avatar{background:linear-gradient(150deg,#6ecab5,#279a8e)}.tg-demo[data-demo="uscar"] .tg-demo__avatar{background:linear-gradient(150deg,#ad9cec,#7961c6)}
.tg-demo button{font:inherit;cursor:pointer}.tg-demo__reset{margin-left:auto;border:0;background:transparent;color:var(--tg-blue);padding:10px 0 10px 5px;font-size:12px!important;min-height:44px}.tg-demo__date{align-self:center;background:#7f958177;color:white;font-size:11px;font-weight:500;border-radius:14px;padding:4px 12px;margin:12px 0 0;flex-shrink:0}
.tg-demo__feed{flex:1;min-height:100px;overflow-y:auto;padding:12px 10px;display:flex;flex-direction:column;gap:9px;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#9eaf9e transparent}.tg-demo__message{white-space:pre-line;background:#fff;border-radius:15px 15px 15px 4px;padding:10px 12px 7px;max-width:92%;font-size:13px;line-height:1.5;flex-shrink:0;margin:0;box-shadow:0 1px 1px #00000012}.tg-demo__message::after{content:"9:41 AM";display:block;font-size:9px;color:#92989e;line-height:1.3;text-align:right;margin-top:5px}.tg-demo__message--user{align-self:flex-end;background:#e2ffc7;border-radius:15px 15px 4px 15px}.tg-demo__message--user::after{content:"9:41 AM  ✓✓";color:#63a65c}
.tg-demo__choices{padding:8px 10px 12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;flex-shrink:0}.tg-demo__choices button{border:1px solid #ffffff65;background:#f7fbf4eb;color:#2277ae;border-radius:9px;padding:10px 7px;font-size:12px;font-weight:500;line-height:1.3;min-height:44px;transition:background .2s}.tg-demo__choices button:hover{background:#fff}.tg-demo__choices button:active{background:#d4e9f5}.tg-demo button:focus-visible,.tg-demo__feed:focus-visible{outline:3px solid #2481cc;outline-offset:-3px}
.tg-demo__composer{display:flex;align-items:center;gap:9px;background:#f7f7f8;padding:8px 12px 5px;color:var(--tg-blue);font-size:26px;flex-shrink:0}.tg-demo__input{border:1px solid #d8d9dd;border-radius:20px;background:white;color:#999ba1;font-size:12px;display:flex;align-items:center;justify-content:space-between;flex:1;padding:8px 12px;min-width:0}.tg-demo__input span{font-size:20px;line-height:1;color:#989da5}.tg-demo__note{font-size:9px;line-height:1.4;color:#757a82;padding:5px 15px 4px;margin:0;text-align:center;background:#f7f7f8;flex-shrink:0}.tg-demo__home{height:25px;background:#f7f7f8;position:relative;flex-shrink:0}.tg-demo__home::after{content:"";position:absolute;width:120px;height:5px;border-radius:5px;background:#161616;bottom:8px;left:50%;transform:translateX(-50%)}.ab-hero .btn{margin-top:20px}
@media(max-width:480px){.tg-demo{height:740px;border-width:7px;border-radius:43px}.tg-demo__bar{gap:6px;padding-inline:8px}.tg-demo__bar strong{font-size:14px}.tg-demo__status{padding-inline:18px}.tg-demo__island{width:90px}.tg-demo__message{font-size:12px}}@media(prefers-reduced-motion:reduce){.tg-demo__choices button{transition:none}}

/* Dark message palette and topic accents from the project's Telegram captures. */
.tg-demo{--tg-blue:#69afe4;background:#101820;background-image:none;color:#eef3f8}
.tg-demo__status,.tg-demo__bar,.tg-demo__composer,.tg-demo__note,.tg-demo__home{background:#17212e;color:#edf2f7}
.tg-demo__bar{border-bottom-color:#293544}.tg-demo__bar small,.tg-demo__note{color:#a8b5c5}.tg-demo__battery::before{background:#edf2f7}.tg-demo__home::after{background:#e8edf3}
.tg-demo__date{background:#263443;color:#aebdce}.tg-demo__feed{scrollbar-color:#3d4c60 #101820}
.tg-demo__message{background:#202d3b;color:#eef3f8;border-radius:17px 17px 17px 4px;line-height:1.55;font-size:13px;max-width:96%}.tg-demo__message--user{background:#314b65;border-radius:17px 17px 4px 17px}.tg-demo__message::after{color:#a7b6c7}.tg-demo__message--user::after{color:#83b7df}
.tg-demo__choices button{background:#253244;border-color:#2b394b;color:#f1f5fa}.tg-demo__choices button:hover{background:#34465b}.tg-demo__choices button:active{background:#3b5672}
.tg-demo__composer{color:var(--tg-blue)}.tg-demo__input{background:#23303f;border-color:#2c394b;color:#a8b6c7}
.tg-demo__topics{display:flex;gap:5px;padding:9px 8px;background:#17212e;flex-shrink:0;overflow-x:auto;scrollbar-width:thin}.tg-demo__topics button{flex:1;white-space:nowrap;border:0;border-radius:7px;background:#263548;color:#d8e5f2;padding:9px 5px;font-size:10px;min-height:38px}.tg-demo__topics button:hover{background:#354b65}.tg-demo__topic-quote{display:block;border-left:3px solid #d99c4c;border-radius:3px;background:#d99c4c12;color:#dda24e;padding:6px 8px;margin-bottom:10px;font-size:12px;line-height:1.4}
.tg-demo[data-demo="uscar"] .tg-demo__message:not(.tg-demo__message--user){border-left:3px solid #dfb259}
/* Layout mirrors the supplied bot views, fitted to the phone viewport. */
.tg-demo__workspace{display:flex;flex:1;min-height:0;overflow:hidden}.tg-demo__workspace .tg-demo__feed{min-width:0;min-height:0}.tg-demo__topics{display:none}.tg-demo[data-demo="fleet"] .tg-demo__topics{display:flex;flex-direction:column;width:65px;flex:0 0 65px;margin:8px 0 8px 5px;padding:5px 3px;border:1px solid #324352;border-radius:19px;overflow-y:auto;background:#19232c;gap:5px}.tg-demo__topics button{white-space:normal;min-height:63px;flex:0 0 auto;background:transparent!important;font-size:10px;line-height:1.5;padding:8px 2px;border-radius:8px}.tg-demo__topics button[aria-pressed="true"]{color:#32a9ff;border-left:3px solid #32a9ff}.tg-demo__message{font-size:13px;max-width:100%;padding:10px 12px}.tg-demo__inline{display:flex;gap:3px;margin-top:-5px;margin-bottom:4px}.tg-demo__inline button{flex:1;background:#223243;color:#fff;border:0;border-radius:5px 5px 12px 12px;min-height:36px;font-size:12px;font-weight:600}.tg-demo[data-demo="fleet"] .tg-demo__message{font-size:12px}.tg-demo__composer{background:#151f29;padding:7px 9px}.tg-demo__input{border-radius:24px;background:#17212c;border-color:#344a5d;padding:10px}.tg-demo__choices{gap:2px;padding:4px 5px 7px;background:#17212e;border-radius:16px 16px 0 0;max-height:225px;overflow-y:auto}.tg-demo__choices button{border-radius:0;min-height:35px;font-weight:600;background:#223243;border:0;padding:8px 5px;font-size:11px}.tg-demo__choices--periods{grid-template-columns:repeat(6,minmax(0,1fr))}.tg-demo__choices--periods button{grid-column:span 2}.tg-demo__choices--periods button:nth-child(4),.tg-demo__choices--periods button:nth-child(5){grid-column:span 3}.tg-demo__choices--periods button:nth-child(n+9){grid-column:1/-1}.tg-demo__choices--dealer button:last-child{grid-column:1/-1}.tg-demo[data-demo="uscar"]{background:repeating-linear-gradient(132deg,#ffffff07 0 2px,transparent 2px 7px),linear-gradient(135deg,#f2c16a 12%,#bf91a0 43%,#317a8a 80%,#37717a)}.tg-demo[data-demo="uscar"] .tg-demo__message:not(.tg-demo__message--user){border-left:0}.tg-demo[data-demo="uscar"] .tg-demo__bar,.tg-demo[data-demo="uscar"] .tg-demo__composer{background:#19232cdd}.tg-demo__avatar{object-fit:cover}.tg-demo__reset{font-size:11px!important}

/* Project copy and features share the left column; phone occupies the right. */
.pj__body--demo{align-items:start;gap:clamp(32px,5vw,80px)}
.pj__description{min-width:0}.pj__features{margin-top:36px}.pj__emulator{min-width:0;padding:4px}
@media(min-width:900px){.pj__body.pj__body--demo{grid-template-columns:minmax(0,1fr) minmax(350px,.85fr)}.pj__emulator .tg-demo{margin-left:auto;margin-right:0}}

/* Project demos remain beside the description, bounded by their section. */
@media(min-width:900px) and (min-height:650px){
  .pj__body--demo > .pj__emulator{position:sticky;top:100px;align-self:start}
  .pj__emulator .tg-demo{height:min(780px,calc(100vh - 132px));height:min(780px,calc(100dvh - 132px))}
}

/* Keep long bot titles and touch controls usable on narrow phones. */
@media(max-width:600px){
 .tg-demo__bar>div:not(.tg-demo__avatar){min-width:0}
 .tg-demo__bar strong{overflow-wrap:anywhere}
 .tg-demo__reset{flex-shrink:0}
 .tg-demo__choices button,.tg-demo__inline button{min-height:44px}
 .tg-demo__choices{max-height:260px}
}
