/* Citeful website demos: live, scripted walk-throughs of the real app (screenshots, no video).
   Used by demos.js. Colours follow the site tokens in web/pages/site.css; the fallbacks keep it usable on its own. */
.cd{--cd-ink:var(--ink,#14162A);--cd-muted:var(--muted,#555A6E);--cd-line:var(--line,#E7E5E0);--cd-card:var(--card,#fff);
  --cd-accent:var(--s5,#8F7BFF);--cd-ui:var(--ui,"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif);
  position:relative;max-width:1120px;margin:0 auto;font:15px/1.5 var(--cd-ui);color:var(--cd-ink)}
.cd *{box-sizing:border-box}

/* scene tabs */
.cd-tabs{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:0 0 18px;padding:0;list-style:none}
.cd-tab{appearance:none;border:1px solid var(--cd-line);background:var(--cd-card);color:var(--cd-ink);font:500 14px/1 var(--cd-ui);
  padding:11px 18px;border-radius:999px;cursor:pointer;position:relative;overflow:hidden;transition:background .2s,border-color .2s,color .2s}
.cd-tab:hover{border-color:#cfcbe6}
.cd-tab[aria-selected="true"]{background:var(--cd-ink);border-color:var(--cd-ink);color:#fff}
.cd-tab:focus-visible,.cd-step:focus-visible,.cd-pause:focus-visible{outline:2.5px solid var(--cd-accent);outline-offset:3px}
/* the tab fills while its scene plays (only while the tour moves on by itself) */
.cd-tab i{position:absolute;left:0;bottom:0;height:3px;width:0;background:linear-gradient(90deg,#34C79A,#FFA24A,#FF6E9B,#4DA8F0,#8F7BFF)}
.cd-tab[aria-selected="true"] i.run{width:100%;transition:width var(--run,8s) linear}

/* the window */
.cd-window{border-radius:14px;overflow:hidden;background:#fff;box-shadow:0 30px 80px rgba(20,22,42,.22),0 0 0 1px rgba(20,22,42,.08)}
.cd-chrome{display:flex;align-items:center;height:32px;padding:0 14px;background:linear-gradient(#f3f1ec,#e9e6df);border-bottom:1px solid rgba(20,22,42,.08)}
.cd-chrome b{width:11px;height:11px;border-radius:50%;margin-right:7px;background:#ff5f57}
.cd-chrome b:nth-child(2){background:#febc2e}.cd-chrome b:nth-child(3){background:#28c840}
.cd-chrome span{flex:1;text-align:center;font:500 12px/1 var(--cd-ui);color:#6a6d7c;margin-right:50px}
.cd-stage{position:relative;aspect-ratio:1400/880;container-type:inline-size;overflow:hidden;background:#ecebe6;user-select:none}
.cd-scene{position:absolute;inset:0;opacity:0;visibility:hidden;transition:opacity .35s}
.cd-scene.on{opacity:1;visibility:visible}
.cd-scene img{display:block}
.cd-full{position:absolute;left:0;top:0;width:100%;height:100%;object-fit:fill}

/* fade between two states (Columns, Side, Look, Word) */
.cd-fade{opacity:0;transition:opacity .4s ease}
.cd-fade.on{opacity:1}

/* Bottom layout: the reader slides up over the library, as in the app. The tab bar and the left column (highlights
   replace the sidebar) change at once; the rest rises from the bottom. */
.cd-ov{position:absolute;overflow:hidden}
.cd-ov img{position:absolute;width:100cqw;height:calc(100cqw*880/1400);max-width:none}
.cd-ov.tabs{left:0;top:0;width:100%;height:5%;opacity:0;transition:opacity .25s}
.cd-ov.strip{left:0;top:5%;width:16.571%;height:95%;opacity:0;transition:opacity .25s}
.cd-ov.strip img{top:-3.143cqw}
.cd-ov.pane{left:16.571%;top:5%;width:83.429%;height:95%;transform:translateY(101%);transition:transform .6s cubic-bezier(.22,.8,.24,1)}
.cd-ov.pane img{left:-16.571cqw;top:-3.143cqw}
.cd-open .cd-ov.tabs,.cd-open .cd-ov.strip{opacity:1}
.cd-open .cd-ov.pane{transform:none}

/* the pointer */
.cd-cursor{position:absolute;left:60%;top:70%;width:0;height:0;z-index:5;pointer-events:none;opacity:0;
  transition:left .95s cubic-bezier(.45,.05,.25,1),top .95s cubic-bezier(.45,.05,.25,1),opacity .3s}
.cd-cursor.show{opacity:1}
.cd-cursor svg{position:absolute;left:-3px;top:-2px;width:3.1cqw;max-width:34px;min-width:18px;height:auto;filter:drop-shadow(0 2px 3px rgba(20,22,42,.35))}
.cd-cursor::after{content:"";position:absolute;left:-1.3cqw;top:-1.3cqw;width:2.6cqw;height:2.6cqw;border-radius:50%;
  border:2px solid rgba(143,123,255,.9);background:rgba(143,123,255,.18);opacity:0;transform:scale(.3)}
.cd-cursor.click::after{animation:cd-ping .45s ease-out}
@keyframes cd-ping{0%{opacity:1;transform:scale(.3)}100%{opacity:0;transform:scale(1.5)}}

/* Look and feel: a label chip row under the window follows the change */
.cd-look-chips{position:absolute;left:0;right:0;bottom:2.2cqw;display:flex;justify-content:center;gap:.6cqw;z-index:4;pointer-events:none}

/* Word: a plain document beside the real Citeful sidebar */
.cd-word{background:#dcd9d2}
.cd-doc{position:absolute;left:3.5%;top:5%;width:58%;height:92%;background:#fff;box-shadow:0 .4cqw 2cqw rgba(20,22,42,.18);padding:5cqw 5.2cqw 0;overflow:hidden;
  font-family:var(--page,"Tinos","Times New Roman",Times,"Liberation Serif",serif);color:#1b1b1b}
.cd-doc h4{margin:0 0 2cqw;font:700 2.5cqw/1.2 var(--page,"Tinos","Times New Roman",Times,serif);letter-spacing:0}
.cd-doc p{margin:0 0 1.6cqw;font-size:1.72cqw;line-height:1.55;text-align:left}
.cd-doc p.ghost{height:1.1cqw;background:#ecebe8;border-radius:.3cqw;margin:0 0 1.1cqw}
.cd-doc sup{font-size:1.05cqw;vertical-align:.8cqw;opacity:0;transition:opacity .3s}
.cd-doc .fn{position:absolute;left:5.2cqw;right:5.2cqw;bottom:3.4cqw;border-top:.14cqw solid #999;padding-top:1cqw;font-size:1.4cqw;line-height:1.45;opacity:0;transform:translateY(.8cqw);transition:opacity .4s .15s,transform .4s .15s}
.cd-doc .fn sup{opacity:1;font-size:1cqw;vertical-align:.6cqw;margin-right:.3cqw}
.cd-word.ins .cd-doc sup.mk{opacity:1}
.cd-word.ins .cd-doc .fn{opacity:1;transform:none}
.cd-side{position:absolute;right:0;top:0;height:100%;width:29.8%;border-left:1px solid rgba(20,22,42,.12);background:#f5f1e8}
.cd-side img{position:absolute;left:0;top:0;width:100%;height:100%;object-fit:fill}

/* below the window: caption, step buttons, pause */
.cd-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 20px;margin-top:18px}
.cd-cap{flex:1 1 380px;margin:0;color:var(--cd-muted);font-size:15px;min-height:3em}
.cd-cap strong{color:var(--cd-ink);font-weight:600}
.cd-ctl{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.cd-steps{display:flex;gap:4px;padding:3px;border-radius:999px;background:var(--card2,#F4F2EC)}
.cd-step{appearance:none;border:0;background:none;font:500 13px/1 var(--cd-ui);color:var(--cd-muted);padding:8px 13px;border-radius:999px;cursor:pointer}
.cd-step[aria-pressed="true"]{background:#fff;color:var(--cd-ink);box-shadow:0 1px 2px rgba(20,22,42,.12)}
.cd-pause{appearance:none;border:1px solid var(--cd-line);background:#fff;color:var(--cd-muted);font:500 13px/1 var(--cd-ui);padding:9px 14px;border-radius:999px;cursor:pointer}
.cd-pause:hover{color:var(--cd-ink)}

/* ---------- scripted scenes (Save, Keep, Cite, Word add-in) ---------- */
.cd-cover{object-fit:cover;object-position:top}

/* Save: the browser's popup */
.cd-pop{position:absolute;left:71.68%;top:9.55%;width:27.12%;aspect-ratio:640/556;border-radius:1.1cqw;overflow:hidden;background:#fff;opacity:0;transform:translateY(-1.4cqw) scale(.97);transform-origin:top right;
  transition:opacity .25s,transform .35s cubic-bezier(.2,.8,.2,1);box-shadow:0 1.2cqw 3.4cqw rgba(20,22,42,.32),0 0 0 1px rgba(20,22,42,.1);z-index:3}
.cd-pop.on{opacity:1;transform:none}
.cd-pop>img{position:absolute;left:0;top:0;width:100%;height:100%}
.cd-saving{position:absolute;inset:0;background:#fff;font:1.5cqw/1.4 var(--cd-ui);color:#555a6e}
.cd-saving .h{display:flex;align-items:center;gap:.9cqw;padding:1.35cqw 1.7cqw;border-bottom:1px solid #e7e5e0;color:#14162a;font-weight:600;font-size:1.7cqw}
.cd-saving .dot{width:2.2cqw;height:2.2cqw;border-radius:50%;background:conic-gradient(#34C79A,#FFA24A,#FF6E9B,#4DA8F0,#8F7BFF,#34C79A);-webkit-mask:radial-gradient(circle,transparent 38%,#000 40%);mask:radial-gradient(circle,transparent 38%,#000 40%)}
.cd-saving p{margin:1.5cqw 1.7cqw 0}
.cd-saving p.s{font-size:1.3cqw;opacity:.8}
.cd-saving .cd-bar{margin:1.6cqw 1.7cqw 0;height:.55cqw;border-radius:9px;background:#eceae5;overflow:hidden}
.cd-saving .cd-bar i{display:block;height:100%;width:40%;border-radius:9px;background:linear-gradient(90deg,#34C79A,#FFA24A,#FF6E9B,#4DA8F0,#8F7BFF);animation:cd-load 1.1s ease-in-out infinite}
@keyframes cd-load{0%{margin-left:-40%}100%{margin-left:100%}}
.cd-flash{position:absolute;left:17.2%;top:19.3%;width:81.4%;height:3.6%;border-radius:.5cqw;pointer-events:none;opacity:0;z-index:2}
.cd-flash.go{animation:cd-flash 1.7s ease-out .25s}
@keyframes cd-flash{0%{opacity:1;box-shadow:0 0 0 .3cqw rgba(143,123,255,.9),0 0 0 .9cqw rgba(143,123,255,.35)}100%{opacity:0;box-shadow:0 0 0 .3cqw rgba(143,123,255,0),0 0 0 2.2cqw rgba(143,123,255,0)}}

/* Cite and Word add-in: a page with real footnotes, written the way Citeful writes them */
.cd-doc{padding:3.2cqw 4.6cqw 0}
.cd-doc h4{font-size:2.2cqw;margin:0 0 1.3cqw}
.cd-doc .cd-body p{margin:0 0 1.1cqw;font-size:1.5cqw;line-height:1.55;transition:none}
.cd-doc .cd-body sup{opacity:1;font-size:.95cqw;vertical-align:.7cqw}
.cd-doc .cd-bib{margin-top:1.8cqw}
.cd-bib .bt{font-weight:700;font-size:1.7cqw;margin-bottom:.7cqw}
.cd-bib .bh{font:600 1.25cqw/1.2 var(--cd-ui,Inter,system-ui,sans-serif);margin:.9cqw 0 .35cqw;color:#333}
.cd-bib .be{font-size:1.3cqw;line-height:1.45;padding-left:1.6cqw;text-indent:-1.6cqw;animation:cd-rise .5s both}
.cd-bib .bh{animation:cd-rise .5s both}
@keyframes cd-rise{from{opacity:0;transform:translateY(.8cqw)}to{opacity:1;transform:none}}
.cd-doc .fns{position:absolute;left:4.6cqw;right:4.6cqw;bottom:2.2cqw;border-top:.12cqw solid #999;padding-top:.9cqw}
.cd-doc .note{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 .45cqw;font-size:1.2cqw;line-height:1.5;margin:0 0 .35cqw;padding:.15cqw .4cqw;border-radius:.4cqw;opacity:1;transform:none;position:static;border:0;animation:cd-rise .45s both}
.cd-doc .note>sup{opacity:1;font-size:.85cqw;vertical-align:.45cqw;margin:0}
.cd-doc .note sup.o,.cd-doc .be sup.o{font-size:.8cqw;vertical-align:.45cqw;opacity:1}
.cd-doc .note.stale{background:#fff1d2;animation:none}
.cd-doc .tg{font:600 .95cqw/1 var(--cd-ui,Inter,system-ui,sans-serif);font-style:normal;padding:.35cqw .75cqw;border-radius:99px;margin-left:.7cqw;background:#dff5ec;color:#14543f;white-space:nowrap}
.cd-doc .tg.warn{background:#ffd9a6;color:#6b3a00}

@media (max-width:720px){
  .cd-tab{padding:9px 13px;font-size:13px}
  .cd-chrome{height:24px}.cd-chrome b{width:8px;height:8px;margin-right:5px}.cd-chrome span{font-size:10px}
  .cd-foot{margin-top:12px}
}
@media (prefers-reduced-motion:reduce){
  .cd-scene,.cd-fade,.cd-ov,.cd-cursor,.cd-tab i,.cd-doc sup,.cd-doc .fn{transition:none!important}
  .cd-cursor{display:none}
}
