/* Ring Concierge deck: the "Technical drawings" slide (tech-live.html).
 *
 * The app's own markup classes come from Facet Flow 3's compiled stylesheet
 * (assets/ff3/ff3-app.css). This file adds the replay chrome around them, in
 * the look of the earlier deck replays: the icon rail, the report viewer and
 * its stack of sheets, the editor canvas with its markup layer, the name
 * popover, the demo cursor and the press highlights.
 */
:root{
  --ease:cubic-bezier(.28,.11,.32,1);
  --acc:#0e56aa;
  --rail:64px;
  --markup-red:#dc2626;
  --press-ring:rgba(14,86,170,.5);
}
html{height:100%;overflow:hidden;background:#f1f5f9;}
body{height:100%;overflow:hidden !important;margin:0;}
/* fast-forward and back-navigation land on end states without animating */
body.tl-instant *, body.tl-instant *::before, body.tl-instant *::after{transition:none !important;animation:none !important;}
@media (prefers-reduced-motion:reduce){ #ffrail{transition:none;} }

#ffshell{display:flex;height:100%;}

/* ---------- sidebar: drawer <-> rail ---------- */
#ffrail{flex:0 0 auto;width:300px;background:#fff;border-right:1px solid #e8e8ed;position:relative;z-index:20;
  display:flex;flex-direction:column;transition:width .55s var(--ease);overflow:hidden;}
#ffrail.rail{width:var(--rail);}
.ffr-head{display:flex;align-items:center;gap:10px;padding:16px 16px 10px;}
.ffr-head img{height:26px;width:auto;max-width:none;flex:0 0 auto;}
#ffrail.rail .ffr-head{justify-content:center;padding-left:8px;padding-right:8px;}
#ffrail.rail .ffr-head img{height:22px;}
.ffr-head span{font-family:'PPEiko',Georgia,serif;font-size:17px;white-space:nowrap;}
.ffr-nav{display:flex;flex-direction:column;gap:2px;padding:8px 10px;}
.ffr-item{display:flex;align-items:center;gap:12px;padding:9px 11px;border-radius:10px;
  color:#33415c;font-size:14.5px;font-weight:500;white-space:nowrap;font-family:switzer,sans-serif;}
.ffr-item svg{flex:0 0 20px;color:#33415c;}
.ffr-chats{padding:16px 16px 8px;font-size:11px;letter-spacing:.1em;color:#8a90a0;font-weight:700;
  font-family:switzer,sans-serif;white-space:nowrap;}
.ffchatlist{display:flex;flex-direction:column;gap:8px;padding:0 10px;}
.ffchat-item{border:1px solid #e8e8ed;background:#fff;border-radius:12px;padding:10px 13px;
  font-size:13.5px;font-weight:600;color:#1d1d1f;white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis;font-family:switzer,sans-serif;}
.ffchat-item .sub{display:block;font-size:11px;color:#8a90a0;font-weight:500;margin-top:2px;}
.ffr-user{margin-top:auto;display:flex;align-items:center;gap:10px;padding:14px 16px;
  border-top:1px solid #f0f1f4;font-family:switzer,sans-serif;white-space:nowrap;}
.ffr-user .av{width:30px;height:30px;border-radius:50%;background:#0e2c56;color:#fff;
  display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;flex:0 0 auto;}
.ffr-user b{font-size:13.5px;} .ffr-user i{font-style:normal;font-size:11px;color:#8a90a0;display:block;}
#ffrail.rail :is(.ffr-label,.ffr-chats,.ffchatlist,.ffr-user-name,.ffr-head span){display:none;}

/* the main area behind the panels (what shows before the report opens) */
#ffmain{flex:1;position:relative;height:100%;background:linear-gradient(135deg,#f8fafc 0%,#f1f5f9 100%);}

/* ---------- panel layers over the main area ---------- */
.trpanel{position:fixed;top:0;bottom:0;left:var(--rail);right:0;z-index:12;background:#f6f8fb;overflow:hidden;
  opacity:0;visibility:hidden;pointer-events:none;transition:opacity .45s var(--ease),visibility 0s linear .45s;}
.trpanel.on{opacity:1;visibility:visible;pointer-events:auto;transition:opacity .45s var(--ease),visibility 0s;}

/* pressed states: the cursor's clicks */
.tl-press{outline:3px solid var(--press-ring);outline-offset:-1px;border-radius:9px;}
.ffr-item.tl-press{border-radius:10px;}

/* ---------- report viewer ---------- */
#trpdfbar{height:52px;display:flex;align-items:center;justify-content:space-between;padding:0 18px;
  background:#fff;border-bottom:1px solid #e8e8ed;font-family:switzer,sans-serif;}
#trpdfbar .tl{display:flex;align-items:center;gap:10px;min-width:0;}
#trpdfbar .back{color:#8a90a0;}
/* the title cross-fades: the outgoing and incoming titles share one grid cell */
#trpdfbar .t{display:grid;min-width:0;font-family:'PPEiko',Georgia,serif;font-size:15.5px;color:#16233b;}
.tl-title{grid-area:1/1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:opacity .4s var(--ease);}
.tl-title.is-new,.tl-title.is-out{opacity:0;}
#trpdfbar .b{display:flex;gap:10px;flex:0 0 auto;transition:opacity .45s var(--ease),visibility 0s;}
/* the image-stack beats come before any report: no report actions yet */
#trpdf.is-spin #trpdfbar .b{opacity:0;visibility:hidden;transition:opacity .45s var(--ease),visibility 0s linear .45s;}
#trpdfbar .btn{font-size:12.5px;font-weight:600;border:1px solid #dfe3ea;border-radius:9px;padding:7px 12px;color:#3a4457;background:#fff;}
#trpdfbar .btn.pri{background:#1e4fa3;border-color:#1e4fa3;color:#fff;}
#trpdfwrap{position:absolute;top:52px;bottom:0;left:0;right:0;display:flex;align-items:center;justify-content:center;
  gap:16px;background:#eef1f6;}
/* a sheet is a window onto its page: the page keeps its size, the window opens to a sliver or the full sheet */
.trsheet{background:#fff;box-shadow:0 24px 60px -22px rgba(10,25,60,.4);overflow:hidden;border-radius:4px;
  transition:width .65s var(--ease),opacity .45s var(--ease);width:0;opacity:0;flex:0 0 auto;}
.trsheet.stage,.trsheet.side{opacity:1;}
.trsheet-page{position:relative;}
.trsheet-page > img{display:block;width:100%;height:100%;}
/* the report's front-view panel, where the new dimension lands once the PDF is generated */
.trsheet-panel{position:absolute;opacity:0;transition:opacity .25s ease;}
.trsheet-panel.on{opacity:1;}

/* ---------- the image stack before the reports: square cards, stacked like the sheets ---------- */
#trspinwrap{position:absolute;top:52px;bottom:0;left:0;right:0;display:flex;align-items:center;justify-content:center;
  gap:16px;pointer-events:none;opacity:0;visibility:hidden;transition:opacity .45s var(--ease),visibility 0s linear .45s;}
#trpdf.is-spin #trspinwrap{opacity:1;visibility:visible;transition:opacity .45s var(--ease),visibility 0s;}
.tl-card{position:relative;flex:0 0 auto;width:0;opacity:0;transition:width .65s var(--ease),opacity .45s var(--ease);}
.tl-card.stage,.tl-card.side{opacity:1;}
/* the same card face as a report sheet: a window onto the image, anchored left */
.tl-card-face{width:100%;height:100%;overflow:hidden;background:#fff;border-radius:4px;
  box-shadow:0 24px 60px -22px rgba(10,25,60,.4);}
/* the image keeps the card's full size inside the narrowing window (the app's preflight caps img at 100%);
   a card tucked behind slides its image so the sliver shows the piece, not the empty backdrop */
.tl-card-face > img{display:block;max-width:none;transition:transform .65s var(--ease);}
.tl-card.side .tl-card-face > img{transform:translateX(var(--peek,0px));}
/* the front card's caption, in the app's quiet section-label style */
.tl-card-cap{position:absolute;left:0;top:calc(100% + 12px);text-align:center;white-space:nowrap;pointer-events:none;
  font-family:switzer,sans-serif;font-size:11px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:#8a90a0;
  opacity:0;transition:opacity .3s var(--ease);}
.tl-card.stage .tl-card-cap{opacity:1;transition-delay:.3s;}

/* ---------- editor ---------- */
#treditor{background:#f8fafc;}
#treditor > div{height:100%;}
/* the floating selection toolbar sits on the tool strip's slot and swaps with it */
.tl-toolslot{position:relative;}
.tl-tools,.tl-selbar{transition:opacity .3s var(--ease),transform .3s var(--ease);}
.tl-selbar{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) translateY(-6px);opacity:0;pointer-events:none;white-space:nowrap;}
.tl-toolslot.is-selecting .tl-tools{opacity:0;transform:translateY(6px);}
.tl-toolslot.is-selecting .tl-selbar{opacity:1;transform:translate(-50%,-50%);}

/* the canvas: the report's front view, sized square to its stage */
#trCanvasWrap{position:relative;flex:0 0 auto;}
#trCanvas{position:absolute;inset:0;overflow:hidden;background:#fff;}
#trCanvas > img{display:block;width:100%;height:100%;}

/* ---------- the new dimension: one markup layer, drawn in the front view's own pixels ---------- */
.tl-dim{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible;}
.tl-dim line{stroke:var(--markup-red);stroke-width:2.6;}
.tl-dim .dim-head{fill:var(--markup-red);}
.tl-dim .dim-label{font-family:Arial,Helvetica,sans-serif;font-weight:700;font-size:28px;fill:var(--markup-red);
  stroke:#fff;stroke-width:7;stroke-linejoin:round;paint-order:stroke;}
.tl-dim .dim-handle{fill:#fff;stroke:var(--markup-red);stroke-width:2.6;}
/* states: is-pen (pen down) -> is-drawn (released) -> is-labeled; is-selected shows the handles */
.tl-dim .dim-shaft{opacity:0;transform-box:fill-box;transform-origin:left center;transform:scaleX(0);
  transition:transform .7s cubic-bezier(.45,.05,.25,1),opacity .15s ease;}
.tl-dim.is-pen .dim-shaft,.tl-dim.is-drawn .dim-shaft{opacity:1;}
.tl-dim.is-drawn .dim-shaft{transform:none;}
.tl-dim .dim-head{opacity:0;transition:opacity .25s ease;}
.tl-dim.is-drawn .dim-head{opacity:1;}
.tl-dim .dim-handle{opacity:0;transition:opacity .25s ease;}
.tl-dim.is-selected .dim-handle{opacity:1;}
/* the far handle rides the pen from the start point to the end point */
.tl-dim .dim-follow{transform:translateX(var(--dim-run,0px));transition:transform .7s cubic-bezier(.45,.05,.25,1);}
.tl-dim.is-drawn .dim-follow{transform:none;}
.tl-dim .dim-label{opacity:0;transform-box:fill-box;transform-origin:left center;transform:scale(.6);
  transition:opacity .35s var(--ease),transform .45s cubic-bezier(.34,1.56,.64,1);}
.tl-dim.is-labeled .dim-label{opacity:1;transform:none;}
/* drawn down the canvas: the shaft grows from its top, the far handle rides the pen down, the label sits at its left */
.tl-dim.is-vertical .dim-shaft{transform-origin:center top;transform:scaleY(0);}
.tl-dim.is-vertical.is-drawn .dim-shaft{transform:none;}
.tl-dim.is-vertical .dim-follow{transform:translateY(var(--dim-run,0px));}
.tl-dim.is-vertical.is-drawn .dim-follow{transform:none;}
.tl-dim.is-vertical .dim-label{transform-origin:right center;}
.tl-dim.is-vertical.is-labeled .dim-label{transform:none;}

/* ---------- the name popover (the editor's MEASURES search) ---------- */
#trPop{position:absolute;width:302px;background:#fff;border-radius:16px;z-index:6;
  box-shadow:0 22px 55px -18px rgba(10,25,60,.35);padding:14px 16px;font-family:switzer,sans-serif;
  opacity:0;transform:scale(.9);transform-origin:50% 0;pointer-events:none;
  transition:opacity .3s var(--ease),transform .3s var(--ease);}
#trPop.on{opacity:1;transform:none;}
#trPop .hd{font-size:10.5px;font-weight:700;letter-spacing:.09em;color:#a3aab8;text-align:center;margin-bottom:8px;}
#trPop .inp{display:flex;align-items:center;border:2px solid #2563eb;border-radius:10px;padding:8px 8px 8px 12px;
  font-size:15px;color:#1d1d1f;margin-bottom:10px;min-height:42px;}
#trPop .ptxt{white-space:pre;}
#trPop .caret{display:inline-block;width:1px;height:15px;background:#1d1d1f;margin-left:1px;animation:tlblink 1s steps(1) infinite;}
@keyframes tlblink{50%{opacity:0;}}
#trPop .kbd{margin-left:auto;font-size:11px;font-weight:700;color:#8a90a0;border:1px solid #dfe3ea;border-bottom-width:2px;
  border-radius:6px;padding:1px 6px;background:#f8fafc;transition:background .15s ease,color .15s ease,transform .15s ease;}
#trPop .kbd.is-down{background:#1e4fa3;border-color:#1e4fa3;color:#fff;transform:translateY(1px);}
#trPop .opts{opacity:0;transition:opacity .3s var(--ease);}
#trPop .opts.on{opacity:1;}
/* a measure the search matched (FF3's suggestion chip: its letter, then its name) */
#trPop .opt-pick{display:inline-flex;align-items:center;gap:6px;border:1px solid #dbe3ee;border-radius:999px;
  padding:4px 12px 4px 5px;font-size:13px;color:#334155;background:#fff;
  transition:border-color .15s ease,color .15s ease,background-color .15s ease;}
#trPop .opt-letter{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;
  background:#f1f5f9;font-size:10px;font-weight:700;color:#0f172a;}
#trPop .opt-pick.tl-press{border-radius:999px;border-color:#1e4fa3;color:#1e4fa3;background-color:#eef5ff;}

/* ---------- the measurements panel: B's row flashes as its line links ---------- */
.tl-row-flash{transition:box-shadow .5s var(--ease),background-color .5s var(--ease),border-color .5s var(--ease);}
.tl-row-flash.on{border-color:#1e4fa3;box-shadow:inset 0 0 0 1.5px #1e4fa3;background-color:#eef5ff;}

/* ---------- the flight between the report and the editor ---------- */
.tl-ghost{position:fixed;z-index:70;overflow:hidden;background:#fff;border-radius:4px;pointer-events:none;
  box-shadow:0 20px 50px -20px rgba(10,25,60,.35);
  transition:left .85s cubic-bezier(.4,0,.2,1),top .85s cubic-bezier(.4,0,.2,1),width .85s cubic-bezier(.4,0,.2,1),
    height .85s cubic-bezier(.4,0,.2,1),opacity .4s ease;}
.tl-ghost > img{display:block;width:100%;height:100%;}
.tl-ghost.is-gone{opacity:0;}

/* ---------- demo cursor: light-blue halo, flies in, clicks, moves on ---------- */
.ffcur{position:fixed;z-index:400;width:24px;height:24px;margin:-4px 0 0 -4px;pointer-events:none;opacity:0;
  transition:left .7s cubic-bezier(.45,.05,.25,1), top .7s cubic-bezier(.45,.05,.25,1), opacity .3s ease;}
.ffcur.show{opacity:1;}
.ffcur .halo{position:absolute;left:-15px;top:-15px;width:54px;height:54px;border-radius:50%;
  background:radial-gradient(circle, rgba(147,197,253,0) 38%, rgba(96,165,250,.5) 60%, rgba(37,99,235,0) 74%);
  transform:scale(.9);}
.ffcur svg{position:relative;filter:drop-shadow(0 2px 5px rgba(10,25,60,.35));}
.ffcur.clk .halo{animation:ffcurclk .5s ease;}
@keyframes ffcurclk{0%{transform:scale(.9);}45%{transform:scale(.5);}100%{transform:scale(1.2);opacity:.65;}}
