/*
  Shared styles for the scripted product demos in this folder (mcp.html, build.html, ...).
  Everything a demo has in common lives here: the page, the scaled stage, the Mac desktop
  (wallpaper, menu bar, dock, pointer, windows), the Telflo app's shell and controls in the
  light theme, and the pause button. A demo page adds only its own scene on top.
  The runtime that goes with it is kit.js.
*/

/* ============================== page ============================== */
*,*::before,*::after{box-sizing:border-box}
html,body{height:100%;margin:0}
body{background:#faf9f6;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
@media (prefers-color-scheme:dark){body{background:#10151e}}
html[data-theme="light"] body{background:#faf9f6}
html[data-theme="dark"] body{background:#10151e}
.page{min-height:100%;display:grid;place-items:center;padding:24px}
.td{position:relative;width:min(1240px,100%);aspect-ratio:16/10;border-radius:14px;overflow:hidden;background:#5f95f3;isolation:isolate}
@media (max-width:1067px){.td{aspect-ratio:4/3}}
@media (max-width:747px){.td{width:min(430px,100%);aspect-ratio:43/64}}
@media (max-width:568px){.page{padding:12px}}
html.embedded body{background:transparent}
html.embedded .page{display:block;height:100%;padding:0}
html.embedded .td{width:100%;height:100%;aspect-ratio:auto;border-radius:0}
/* Until kit.js has run (it adds the pause button) the page draws nothing, so the box that embeds it keeps its own
   colour while the script loads, instead of this page's padding and the wallpaper blue. */
body:not(:has(.td-toggle)){background:transparent}
.td:not(:has(.td-toggle)){visibility:hidden}

/* ============================== stage ============================== */
.stage{
  --sys:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",system-ui,sans-serif;
  --serif:ui-serif,"New York","Iowan Old Style",Cambria,Georgia,"Times New Roman",serif;
  --plex:"IBM Plex Sans",-apple-system,"Segoe UI",system-ui,sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  /* Telflo app, light theme (app/app.css, .tf-app) */
  --tf-bg:#f5f6f8;--tf-card:#fff;--tf-line:#e2e5ea;--tf-input:#d5dae0;--tf-ink:#14181d;--tf-ink-2:#525c68;--tf-mute:#6e7883;--tf-accent:#eef0f3;--tf-muted:#f0f2f5;
  --tf-brand:#2364d2;--tf-brand-soft:#e9f0fc;--tf-ok:#1e7f4f;--tf-ok-soft:#e3f2ea;--tf-warn:#96660a;--tf-warn-soft:#faf0da;--tf-fail:#c53a30;--tf-fail-soft:#fbeae8;
  --tf-receiver:#2364d2;--tf-processor:#7a4fd2;--tf-exporter:#1e7f4f;--tf-extension:#96660a;--tf-connector:#b95d20;
  position:absolute;left:0;top:0;width:1280px;height:800px;transform-origin:0 0;overflow:hidden;
  font-family:var(--sys);font-size:13px;line-height:1.35;color:#1f1e1d;user-select:none;-webkit-user-select:none;cursor:default}
.stage svg.i{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.stage p,.stage h1,.stage h2,.stage h3,.stage h4,.stage ul{margin:0}
.defs{position:absolute;width:0;height:0}

/* wallpaper: soft fields of colour, like a stock Mac desktop, in the logo's cyan-to-indigo range */
.wall{position:absolute;inset:0;background:
  radial-gradient(58% 72% at 10% 4%,#d2f3ff 0%,rgba(210,243,255,0) 64%),
  radial-gradient(52% 64% at 92% 10%,#8187f6 0%,rgba(129,135,246,0) 62%),
  radial-gradient(66% 70% at 84% 96%,#3f6df0 0%,rgba(63,109,240,0) 64%),
  radial-gradient(58% 62% at 4% 100%,#3fc1f5 0%,rgba(63,193,245,0) 62%),
  radial-gradient(46% 48% at 44% 50%,#a9dbff 0%,rgba(169,219,255,0) 72%),
  linear-gradient(135deg,#74c6fb 0%,#5f95f3 52%,#5c73ea 100%)}

/* menu bar */
.mb{position:absolute;left:0;right:0;top:0;height:26px;z-index:40;display:flex;align-items:center;gap:17px;padding:0 15px;background:rgba(255,255,255,.3);color:#0c0e13;font-size:12.5px;white-space:nowrap}
.mb b{font-weight:650}
.mb .apple{width:13px;height:15px;margin-top:-2px;fill:currentColor;flex:none}
.mb .sp{flex:1}
.mb svg.i{width:15px;height:15px;opacity:.92}
.mb svg.i.bat{width:25px;height:12px}
.mb .cc{display:grid;gap:2.5px}
.mb .cc i{display:block;width:13px;height:4.5px;border-radius:3px;border:1.3px solid currentColor;opacity:.92}

/* dock */
.dock{position:absolute;left:50%;bottom:7px;z-index:30;transform:translateX(-50%);display:flex;gap:9px;padding:5px 9px 9px;border-radius:22px;background:rgba(255,255,255,.3);border:1px solid rgba(255,255,255,.42);box-shadow:0 12px 30px -14px rgba(14,32,84,.5)}
.dk{position:relative;width:47px;height:47px;display:grid;place-items:center}
.dk img{display:block;width:100%;height:100%;filter:drop-shadow(0 1.5px 2px rgba(12,24,60,.3))}
.dk.telflo::before{content:"";position:absolute;inset:0;border-radius:23%;background:#fff;box-shadow:inset 0 0 0 .5px rgba(0,0,0,.1);filter:drop-shadow(0 1.5px 2px rgba(12,24,60,.3))}
.dk.telflo svg{position:relative;width:33px;height:26px}
.dk::after{content:"";position:absolute;left:50%;bottom:-6.5px;width:3.5px;height:3.5px;margin-left:-1.75px;border-radius:50%;background:rgba(18,22,32,.72);opacity:0;transition:opacity .25s}
.dk.running::after,.dk.always::after{opacity:1}
/* the icon bounces; its running dot stays on the shelf */
.dk.bounce>img,.dk.bounce>svg,.dk.bounce::before{animation:dk-bounce .62s cubic-bezier(.3,.6,.4,1)}
@keyframes dk-bounce{0%{transform:translateY(0)}34%{transform:translateY(-15px)}60%{transform:translateY(0)}79%{transform:translateY(-5px)}100%{transform:translateY(0)}}

/* pointer */
.cursor{position:absolute;left:0;top:0;width:22px;height:22px;z-index:60;pointer-events:none;will-change:transform}
.cursor svg{display:block;width:100%;height:100%;overflow:visible;filter:drop-shadow(0 1px 1.5px rgba(0,0,0,.4));transform-origin:3px 2px;transition:transform .09s}
.cursor.down svg{transform:scale(.86)}
.ripple{position:absolute;z-index:59;width:26px;height:26px;margin:-13px 0 0 -13px;border-radius:50%;border:1.5px solid rgba(255,255,255,.95);box-shadow:0 0 0 1px rgba(12,18,32,.28);pointer-events:none;opacity:0;animation:ripple .5s ease-out}
@keyframes ripple{0%{opacity:.95;transform:scale(.3)}100%{opacity:0;transform:scale(1.25)}}

/* ============================== windows ============================== */
.win{position:absolute;border-radius:11px;background:#fff;overflow:hidden;
  box-shadow:0 0 0 .5px rgba(8,16,44,.34),0 30px 70px -18px rgba(8,20,64,.55),0 12px 26px -12px rgba(8,20,64,.36);
  opacity:0;visibility:hidden;transform:scale(.14);
  transition:transform .44s cubic-bezier(.16,.84,.24,1),opacity .2s ease-out,visibility 0s linear .44s}
.win.open{opacity:1;visibility:visible;transform:none;transition:transform .44s cubic-bezier(.16,.84,.24,1),opacity .2s ease-out,visibility 0s}
.win.bye{opacity:0;visibility:hidden;transform:scale(.975);transition:transform .26s ease-in,opacity .26s ease-in,visibility 0s linear .26s}
.win.idle{box-shadow:0 0 0 .5px rgba(8,16,44,.3),0 16px 38px -16px rgba(8,20,64,.42)}
.lights{position:absolute;left:14px;top:14px;z-index:6;display:flex;gap:8px}
.lights i{width:12px;height:12px;border-radius:50%;background:#ff5f57;box-shadow:inset 0 0 0 .5px rgba(0,0,0,.16);transition:background .2s}
.lights i:nth-child(2){background:#febc2e}
.lights i:nth-child(3){background:#28c840}
.win.idle .lights i{background:#d6d4cf}
.is-pressed{filter:brightness(.93)}
.typing::after{content:"";display:inline-block;width:1.5px;height:1.1em;margin-left:1px;vertical-align:-.17em;background:currentColor;animation:caret 1s steps(1) infinite}
@keyframes caret{50%{opacity:0}}
@keyframes rise{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
@keyframes spin{to{transform:rotate(360deg)}}

/* where the Telflo window sits. .tfw: beside another app's window. .tfw.solo: on its own. */
.win.tfw{left:118px;right:44px;top:54px;bottom:78px;z-index:20}
.win.tfw.solo{left:44px;right:44px;top:44px;bottom:80px}

/* ============================== Telflo app: window and shell ============================== */
.tf{display:grid;grid-template-rows:38px minmax(0,1fr);height:100%;background:var(--tf-bg);font-family:var(--plex);color:var(--tf-ink)}
.tf-bar{position:relative;display:flex;align-items:center;justify-content:center;gap:6px;background:#eceae6;border-bottom:1px solid rgba(0,0,0,.1);font-family:var(--sys);font-size:12px;color:#57554f}
.tf-bar svg.i{width:11px;height:11px;stroke-width:2}
.tf-bar .navs{position:absolute;left:80px;top:11px;display:flex;gap:9px;color:#a3a19a}
.tf-bar .navs svg.i{width:16px;height:16px;stroke-width:1.9}
.tf-bar .lights{top:13px}
.tf-app{position:relative;display:grid;grid-template-columns:208px minmax(0,1fr);min-height:0;zoom:.92}
.tf-side{display:flex;flex-direction:column;min-height:0;background:#fff;border-right:1px solid var(--tf-line)}
.tf-logo{display:flex;align-items:center;gap:5px;height:48px;padding:0 6px 0 15px;font-family:var(--sys);font-size:15px;font-weight:600;letter-spacing:-.4px;color:#0f172a}
.tf-logo>svg{width:23px;height:18px}
.tf-fold{margin-left:auto;width:26px;height:26px;display:grid;place-items:center;border-radius:5px;color:var(--tf-mute)}
.tf-fold svg.i{width:14px;height:14px;stroke-width:2}
.tf-fold svg.i:last-child{display:none}
.tf-lbl{font-family:var(--mono);font-size:11px;font-weight:500;letter-spacing:.08em;text-transform:uppercase;color:var(--tf-mute)}
.tf-side>.tf-lbl{padding:8px 18px 6px}
.tf-nav{position:relative;display:flex;align-items:center;gap:10px;height:32px;margin:1px 8px;padding:0 10px;border-radius:5px;font-weight:500;color:var(--tf-mute);transition:background .12s,color .12s}
.tf-nav.on{background:var(--tf-accent);color:var(--tf-ink)}
.tf-nav.on::before{content:"";position:absolute;left:0;top:8px;width:2px;height:16px;border-radius:1px;background:var(--tf-brand)}
.tf-foot{margin-top:auto;padding-top:7px;border-top:1px solid var(--tf-line)}
.tf-org{display:flex;align-items:center;gap:10px;margin-top:7px;padding:10px 14px;border-top:1px solid var(--tf-line);font-weight:500}
.tf-org svg.i{margin-left:auto;width:14px;height:14px;color:var(--tf-mute)}
.tf-org i{flex:none;width:24px;height:24px;border-radius:5px;border:1px solid var(--tf-line);background:var(--tf-muted);display:grid;place-items:center;font-family:var(--mono);font-size:11px;font-style:normal;font-weight:500;color:var(--tf-mute)}
.tf-org span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tf-main{position:relative;min-width:0;min-height:0;overflow:hidden;padding:16px 20px 0}
/* the sidebar collapsed to its icon rail (a real state of the app: the chevron in its header) */
.tf-app.rail{grid-template-columns:48px minmax(0,1fr)}
.tf-app.rail .tf-logo{justify-content:center;padding:0}
.tf-app.rail .tf-logo>svg,.tf-app.rail .tf-logo b,.tf-app.rail .tf-side>.tf-lbl,.tf-app.rail .tf-nav span,.tf-app.rail .tf-org span,.tf-app.rail .tf-org svg{display:none}
.tf-app.rail .tf-fold{margin:0}
.tf-app.rail .tf-fold svg.i:first-child{display:none}
.tf-app.rail .tf-fold svg.i:last-child{display:block}
.tf-app.rail .tf-nav{justify-content:center;margin:1px 6px;padding:0}
.tf-app.rail .tf-nav.on::before{display:none}
.tf-app.rail .tf-org{justify-content:center;padding:10px 0}

/* ============================== Telflo app: controls ============================== */
.tf-back{display:inline-flex;align-items:center;gap:6px;color:var(--tf-mute)}
.tf-back svg.i{width:14px;height:14px}
.tf-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-top:12px}
.tf-head h1{display:flex;align-items:center;gap:12px;font-size:18px;font-weight:600;letter-spacing:-.01em}
.tf-badge{padding:1px 6px;border-radius:4px;border:1px solid rgba(30,127,79,.25);background:var(--tf-ok-soft);font-family:var(--mono);font-size:11px;font-weight:500;letter-spacing:.07em;text-transform:uppercase;color:var(--tf-ok)}
.tf-made{margin-top:4px;font-size:12px;color:rgba(110,120,131,.85)}
.tf-made span{font-family:var(--mono)}
.tf-acts{display:flex;gap:8px;flex:none}
.tf-btn{display:flex;align-items:center;gap:8px;height:32px;padding:0 12px;border-radius:5px;font-weight:500;white-space:nowrap;transition:filter .1s}
.tf-btn.out{border:1px solid var(--tf-input);background:#fff}
.tf-btn.ink{background:#171b21;color:#f6f7f9}
.tf-btn.blue{background:var(--tf-brand);color:#fff}
.tf-btn.sm{height:28px;padding:0 10px;font-size:12px}
.tf-btn.off{opacity:.5}
.tf-btn.out.hov{background:var(--tf-accent)}
.tf-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:16px}
.tf-stat{padding:11px 16px;border-radius:6px;border:1px solid var(--tf-line);background:#fff}
.tf-stat .v{margin-top:6px;font-family:var(--mono);font-size:18px;font-weight:600;line-height:1.3;font-variant-numeric:tabular-nums}
.tf-stat .h{margin-top:1px;font-size:12px;color:var(--tf-mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tf-stat.warn .v{color:var(--tf-warn)}
.tf-tabs{display:inline-flex;height:32px;margin-top:16px;padding:3px;border-radius:5px;background:var(--tf-muted)}
.tf-tabs span{display:grid;place-items:center;padding:0 10px;border-radius:4px;font-weight:500;color:var(--tf-mute)}
.tf-tabs .on{background:#fff;color:var(--tf-ink)}
.tf-find{display:flex;align-items:center;gap:8px;margin-top:14px;color:var(--tf-mute)}
.tf-input{flex:1;min-width:0;display:flex;align-items:center;gap:9px;height:32px;padding:0 10px;border-radius:5px;border:1px solid var(--tf-input);background:#fff;white-space:nowrap;overflow:hidden}
.tf-find>svg.i{margin:0 6px}
.tf-table{margin-top:12px;border-radius:6px;border:1px solid var(--tf-line);background:#fff;overflow:hidden}
.tf-table table{width:100%;border-collapse:collapse;table-layout:fixed}
.tf-table th{height:36px;padding:0 12px;border-bottom:1px solid var(--tf-line);text-align:left;font-family:var(--mono);font-size:11px;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:var(--tf-mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tf-table td{height:38px;padding:0 12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tf-table tr+tr td{border-top:1px solid var(--tf-line)}
.tf-table th svg.i{width:12px;height:12px;margin-left:5px;vertical-align:-2px}
.tf-table .nm{font-weight:500;color:var(--tf-brand)}
.tf-table .mn{font-family:var(--mono);font-size:12px}
.tf-table .mu{color:var(--tf-mute)}
.dot{display:inline-block;width:7px;height:7px;margin-right:8px;border-radius:50%;vertical-align:1px;background:#98a1ac}
.dot.ok{background:var(--tf-ok)}
.dot.warn{background:var(--tf-warn)}
.dot.fail{background:var(--tf-fail)}

/* toasts (sonner, as the app sets it up: system font, black tick) */
.tf-toasts{position:absolute;right:24px;bottom:24px;z-index:30;display:grid;gap:10px;justify-items:end;pointer-events:none}
.tf-toast{display:flex;align-items:center;gap:8px;width:356px;padding:16px;border-radius:8px;border:1px solid #ededed;background:#fff;box-shadow:0 4px 12px rgba(0,0,0,.1);font-family:var(--sys);font-size:13px;font-weight:500;color:#171717;animation:toast-in .32s cubic-bezier(.2,.8,.2,1);transition:opacity .22s,transform .22s}
.tf-toast i{flex:none;width:20px;height:20px;border-radius:50%;background:#171717;color:#fff;display:grid;place-items:center}
.tf-toast i svg.i{width:12px;height:12px;stroke-width:3}
.tf-toast.bye{opacity:0;transform:translateY(8px)}
@keyframes toast-in{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:none}}

/* dialogs: a veil over the whole app and a card in the middle. Add .on to both to show them. */
.tf-veil{position:absolute;inset:0;z-index:20;background:rgba(0,0,0,.55);-webkit-backdrop-filter:blur(1.5px);backdrop-filter:blur(1.5px);opacity:0;visibility:hidden;transition:opacity .18s,visibility 0s linear .18s}
.tf-veil.on{opacity:1;visibility:visible;transition:opacity .18s,visibility 0s}
.tf-dialog{position:absolute;left:50%;top:50%;z-index:21;width:512px;max-width:calc(100% - 32px);padding:20px;border-radius:8px;border:1px solid #e4e4e7;background:#fff;box-shadow:0 25px 50px -12px rgba(0,0,0,.25);opacity:0;visibility:hidden;transform:translate(-50%,-50%) scale(.96);transition:opacity .16s,transform .18s cubic-bezier(.2,.8,.2,1),visibility 0s linear .18s}
.tf-dialog.on{opacity:1;visibility:visible;transform:translate(-50%,-50%);transition:opacity .16s,transform .18s cubic-bezier(.2,.8,.2,1),visibility 0s}
.tf-dialog>.x{position:absolute;right:16px;top:16px;width:16px;height:16px;opacity:.7}
.tf-dialog h2{font-size:15px;font-weight:600;letter-spacing:-.01em}
.tf-dialog .sub{margin-top:6px;font-size:13px;line-height:1.5;color:var(--tf-mute)}
.tf-dialog .fld{margin-top:16px}
.tf-dialog .fld>b{display:block;margin-bottom:8px;font-size:13px;font-weight:500}
.tf-dialog .fld>small{display:block;margin-top:6px;font-size:12px;color:var(--tf-mute)}
.tf-dialog .foot{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}
/* a select trigger and its list */
.tf-sel{position:relative;display:flex;align-items:center;gap:8px;height:32px;padding:0 10px;border-radius:5px;border:1px solid var(--tf-input);background:#fff;white-space:nowrap}
.tf-sel>svg.i:last-child{margin-left:auto;opacity:.5}
.tf-sel.off{opacity:.5}
.tf-sel.focus{border-color:#3b78e3;box-shadow:0 0 0 2px rgba(59,120,227,.25)}
.tf-menu{position:absolute;z-index:25;padding:4px;border-radius:5px;border:1px solid #e4e4e7;background:#fff;box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);opacity:0;visibility:hidden;transform:translateY(-4px);transition:opacity .12s,transform .12s,visibility 0s linear .12s}
.tf-menu.on{opacity:1;visibility:visible;transform:none;transition:opacity .12s,transform .12s,visibility 0s}
.tf-opt{position:relative;display:flex;align-items:center;gap:8px;height:31.5px;padding:0 32px 0 8px;border-radius:4px;white-space:nowrap}
.tf-opt.hi{background:var(--tf-accent)}
.tf-opt>svg.i.tick{position:absolute;right:8px}
/* the amber chip: Unsaved, Read-only version */
.tf-chip{display:inline-flex;align-items:center;gap:5px;padding:1px 6px;border-radius:4px;border:1px solid rgba(150,102,10,.25);background:var(--tf-warn-soft);font-family:var(--mono);font-size:10px;font-weight:500;letter-spacing:.07em;text-transform:uppercase;color:var(--tf-warn);white-space:nowrap}
.tf-chip svg.i{width:12px;height:12px}
.tf-spin{animation:spin .8s linear infinite}

/* what the pointer carries while it drags something */
.drag-ghost{position:absolute;left:0;top:0;z-index:58;pointer-events:none;opacity:.78;font-family:var(--plex);font-size:13px;color:var(--tf-ink);filter:drop-shadow(0 6px 10px rgba(8,20,64,.22))}

/* the Collectors table of a fleet (used by the MCP and Fleet demos). A refresh replaces the cards and the
   table in one step, as in the app, so nothing here fades from one state to the next. */
.tf-table .ev{text-align:center;font-family:var(--mono);font-size:12px;color:var(--tf-brand)}
.c-name{width:13.8%}.c-ip{width:10.3%}.c-grp{width:11.8%}.c-var{width:13.4%}.c-st{width:13.9%}.c-ev{width:15.6%}

/* ============================== medium (box 700 to 1019px) ============================== */
.stage[data-size="m"] .win.tfw{left:58px;right:18px;top:50px;bottom:76px}
.stage[data-size="m"] .win.tfw.solo{left:22px;right:22px;top:42px;bottom:78px}
/* the rail, the tighter page and the shorter table are the desktop frame's; a browser window keeps the full shell */
.stage[data-size="m"]:not([data-frame]) .tf-app{grid-template-columns:48px minmax(0,1fr)}
.stage[data-size="m"]:not([data-frame]) .tf-logo{justify-content:center;padding:0}
.stage[data-size="m"]:not([data-frame]) .tf-logo>svg,.stage[data-size="m"]:not([data-frame]) .tf-logo b,.stage[data-size="m"]:not([data-frame]) .tf-side>.tf-lbl,.stage[data-size="m"]:not([data-frame]) .tf-nav span,.stage[data-size="m"]:not([data-frame]) .tf-org span,.stage[data-size="m"]:not([data-frame]) .tf-org svg{display:none}
.stage[data-size="m"]:not([data-frame]) .tf-fold{margin:0}
.stage[data-size="m"]:not([data-frame]) .tf-fold svg.i:first-child{display:none}
.stage[data-size="m"]:not([data-frame]) .tf-fold svg.i:last-child{display:block}
.stage[data-size="m"]:not([data-frame]) .tf-nav{justify-content:center;margin:1px 6px;padding:0}
.stage[data-size="m"]:not([data-frame]) .tf-nav.on::before{display:none}
.stage[data-size="m"]:not([data-frame]) .tf-org{justify-content:center;padding:10px 0}
.stage[data-size="m"]:not([data-frame]) .tf-main{padding:14px 16px 0}
.stage[data-size="m"]:not([data-frame]) .c-ip,.stage[data-size="m"]:not([data-frame]) .c-var{display:none}
.stage[data-size="m"]:not([data-frame]) .c-name{width:18%}.stage[data-size="m"]:not([data-frame]) .c-grp{width:15%}.stage[data-size="m"]:not([data-frame]) .c-st{width:18%}.stage[data-size="m"]:not([data-frame]) .c-ev{width:20%}
.stage[data-size="m"]:not([data-frame]) .tf-acts .gh{display:none}

/* ============================== small (box under 700px: phones) ============================== */
.stage[data-size="s"]{font-size:12.5px}
.stage[data-size="s"] .mb{gap:12px;padding:0 10px}
.stage[data-size="s"] .mb .x{display:none}
.stage[data-size="s"] .dock{gap:8px;padding:5px 8px 8px;border-radius:19px}
.stage[data-size="s"] .dk{width:40px;height:40px}
.stage[data-size="s"] .dk.x{display:none}
.stage[data-size="s"] .dk.telflo svg{width:28px;height:22px}
.stage[data-size="s"] .win.tfw{left:16px;right:6px;top:44px;bottom:70px}
.stage[data-size="s"] .win.tfw.solo{left:8px;right:8px;top:36px;bottom:70px}
.stage[data-size="s"] .tf-app{grid-template-columns:minmax(0,1fr);zoom:1}
.stage[data-size="s"] .tf-side,.stage[data-size="s"] .tf-acts,.stage[data-size="s"] .tf-find,.stage[data-size="s"] .tf-stat.x,.stage[data-size="s"] .tf-bar .navs{display:none}
.stage[data-size="s"] .tf-main{padding:12px 12px 0}
.stage[data-size="s"] .tf-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:14px}
.stage[data-size="s"] .tf-stat{padding:9px 11px}
.stage[data-size="s"] .tf-tabs{margin-top:14px}
.stage[data-size="s"] .c-ip,.stage[data-size="s"] .c-var,.stage[data-size="s"] .c-grp,.stage[data-size="s"] .c-seen{display:none}
.stage[data-size="s"] .c-name{width:34%}.stage[data-size="s"] .c-st{width:33%}.stage[data-size="s"] .c-ev{width:33%}
.stage[data-size="s"] .dot{margin-right:6px}
.stage[data-size="s"] .tf-table th{padding:0 9px;font-size:10px;letter-spacing:0}
.stage[data-size="s"] .tf-table td{height:36px;padding:0 9px}

.stage[data-crop] .mb .x{display:none}
/* ============================== the window frame ==============================
   One browser window on a soft backdrop, no desktop: create({ frame: 'window' }). */
.td.bw-root{background:
  radial-gradient(75% 85% at 0% 0%,var(--bw-a) 0%,transparent 70%),
  radial-gradient(65% 75% at 100% 100%,var(--bw-b) 0%,transparent 72%),
  radial-gradient(55% 60% at 100% 0%,var(--bw-c) 0%,transparent 70%),
  linear-gradient(150deg,var(--bw-d),var(--bw-e))}
.td.bw-root::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.5;
  background-image:radial-gradient(var(--bw-dot) 1px,transparent 1.3px);background-size:22px 22px;background-repeat:space;
  -webkit-mask-image:radial-gradient(75% 70% at 50% 50%,transparent 45%,#000 100%);mask-image:radial-gradient(75% 70% at 50% 50%,transparent 45%,#000 100%)}
/* a phone-size box has no margin to show the dots in */
.td.bw-root:has(.stage[data-size="s"])::before{display:none}
/* a wide box has a deeper margin: one ring of dots there too, so that no second ring lands on the window's edge */
.td.bw-root:has(.stage[data-size="l"])::before{background-size:28px 28px}
/* on its own page the box is a screen's shape at both wide sizes (the desktop frame's mid size is 4:3) */
@media (min-width:748px){.td.bw-root{aspect-ratio:16/10}}
.stage[data-frame="window"]{--inset:40px}
.stage[data-frame="window"][data-size="m"]{--inset:28px}
.stage[data-frame="window"][data-size="s"]{--inset:16px}
.win.bw-win{inset:var(--inset);display:flex;flex-direction:column;border-radius:14px;border:1px solid #e2ded6;background:var(--tf-bg);
  box-shadow:0 1px 0 rgba(255,255,255,.8) inset,0 30px 70px -20px rgba(40,30,20,.28),0 10px 24px -12px rgba(40,30,20,.18);
  opacity:1;visibility:visible;transform:none;transition:none}
html.embedded .win.bw-win{box-shadow:0 1px 0 rgba(255,255,255,.8) inset,0 12px 28px -14px rgba(40,30,20,.22),0 4px 10px -6px rgba(40,30,20,.12)}
.bw-chrome{position:relative;flex:none;display:flex;align-items:center;height:40px;padding:0 14px;background:#fbfaf8;border-bottom:1px solid #ebe8e2}
.bw-dots{display:flex;gap:7px}
.bw-dots i{width:11px;height:11px;border-radius:50%;background:#dcd8d0}
.bw-url{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;gap:6px;width:380px;height:26px;border-radius:7px;background:#f1efea;border:1px solid #e7e4dd;font-family:var(--sys);font-size:12.5px;letter-spacing:.1px;color:#6f6c66}
.bw-url svg.i{width:12px;height:12px;stroke-width:1.9;color:#a19d95}
.bw-url .bw-rl{position:absolute;right:9px;display:grid}
.bw-body{position:relative;flex:1;min-height:0;overflow:hidden}
.bw-body.out{opacity:0}
/* paused by the visitor while the page fades between two passes: it comes back whole, not half faded or empty */
.td.held .bw-body{opacity:1!important}
/* the page: its own size is its layout size; the camera scales and moves it inside the window */
.bw-view{position:absolute;left:0;top:0;width:100%;height:100%;transform-origin:0 0}
.bw-view .tf{grid-template-rows:minmax(0,1fr)}
.bw-view .tf-app{zoom:1}
.td.bw-root .td-toggle{border-color:rgba(20,24,29,.14);background:rgba(255,255,255,.7);box-shadow:0 2px 8px -2px rgba(40,30,20,.25)}
.td.bw-root .td-toggle:focus-visible{outline-color:#2364d2}

/* ============================== player ============================== */
.td-toggle{position:absolute;right:10px;bottom:10px;z-index:5;width:30px;height:30px;padding:0;border-radius:50%;border:1px solid rgba(255,255,255,.5);background:rgba(255,255,255,.34);color:#0c0e13;-webkit-backdrop-filter:blur(12px) saturate(1.4);backdrop-filter:blur(12px) saturate(1.4);box-shadow:0 2px 8px -2px rgba(14,32,84,.35);display:grid;place-items:center;cursor:pointer;opacity:0;transition:opacity .2s}
.td-toggle svg{width:13px;height:13px;fill:currentColor;stroke:none}
.td-toggle .pl,.td.paused .td-toggle .pa{display:none}
.td.paused .td-toggle .pl{display:block}
/* the button stays up for a visitor's own pause and for a still, not for a host that paused a demo it is swapping out */
.td:hover .td-toggle,.td.held .td-toggle,.td.still .td-toggle,.td-toggle:focus-visible{opacity:1}
.td-toggle:focus-visible{outline:2px solid #fff;outline-offset:2px}
@media (hover:none){.td-toggle{opacity:.9}}
.td.paused *,.td.paused *::before,.td.paused *::after,.td.idle *,.td.idle *::before,.td.idle *::after{animation-play-state:paused!important}
/* still frames (seek, reduced motion): no transitions, no running animations */
.td.instant *,.td.instant *::before,.td.instant *::after{transition:none!important;animation-duration:0s!important;animation-delay:0s!important}
.td.still .typing::after,.td.still .cursor{display:none}
