/* Animated feature demos (home page). Each scene is drawn at 760 x 500 and scaled to fit. */
.fdemo { margin-top: 34px; display: grid; grid-template-columns: 300px 1fr; gap: 34px; align-items: start; }
.ftabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 16px; }
.ftabs button { border: 1px solid var(--border); background: var(--card); color: var(--ink); font: 600 14.5px/1.2 inherit; font-family: inherit;
  padding: 11px 10px; border-radius: 12px; cursor: pointer; text-align: left; display: flex; gap: 8px; align-items: center; }
.ftabs button i { font-style: normal; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--canvas); font-size: 13px; flex: none; }
.ftabs button[aria-selected="true"] { background: var(--dusk); color: #fff; border-color: transparent; }
.ftabs button[aria-selected="true"] i { background: rgba(255,255,255,.22); }
.fcap h3 { margin: 4px 0 6px; }
.fcap p { color: var(--muted); margin: 0 0 10px; font-size: 15.5px; }
.fsteps { list-style: none; margin: 0; padding: 0; }
.fsteps li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; padding: 6px 0; color: var(--muted); font-size: 15px; transition: color .3s; }
.fsteps li .n { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; font-size: 11.5px; font-weight: 700; transition: all .3s; }
.fsteps li.on { color: var(--ink); }
.fsteps li.on .n { background: var(--dusk); border-color: transparent; color: #fff; }

.stage-wrap { position: relative; width: 100%; border-radius: 22px; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 26px 60px rgba(46,49,66,.2);
  border: 7px solid #1D1A2B; background: #1D1A2B; }
.stage { position: absolute; left: 0; top: 0; width: 760px; height: 500px; transform-origin: 0 0; background: #FBF8F3; overflow: hidden;
  font: 14px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif; color: #2E3142; }
.stage .scene { position: absolute; inset: 0; display: none; }
.stage .scene.show { display: block; }
.stage .scene * { box-sizing: border-box; }
.stage .abs { position: absolute; }

/* app chrome */
.stage .chrome { position: absolute; left: 0; right: 0; top: 0; height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px;
  background: #FBF8F3; border-bottom: 1px solid #EDE6DA; z-index: 5; }
.stage .chrome .t { font-weight: 700; font-size: 15px; }
.stage .chrome .l { color: #8B6CC8; font-weight: 600; font-size: 14px; }
.stage .chrome .r { display: flex; gap: 10px; }
.stage .chrome .r span { width: 26px; height: 26px; border-radius: 50%; background: #F1EBE1; display: grid; place-items: center; font-size: 13px; }
.stage .chrome .r .ai { background: linear-gradient(200deg,#FFB04A,#F2664A 25%,#B03A9A 60%,#5A2A9C); color: #fff; }
.stage .chrome .r .rec { background: #FCE3DF; color: #D0392B; }
.stage .paperbg { position: absolute; left: 0; right: 0; top: 46px; bottom: 0; background: #FFFDF8;
  background-image: repeating-linear-gradient(to bottom, transparent 0 39px, #E9E1D2 39px 40px); background-position: 0 20px; }
.stage .paperbg.grid { background-image: linear-gradient(#EEE7DA 1px, transparent 1px), linear-gradient(90deg, #EEE7DA 1px, transparent 1px); background-size: 24px 24px; }

/* handwriting */
.stage .hw { position: absolute; font-family: "Caveat", "Bradley Hand", cursive; font-weight: 700; font-size: 27px; line-height: 1; color: #2B4C9A; white-space: nowrap;
  clip-path: inset(-10px 100% -10px 0); }
.stage .hw.on { animation: hwr var(--d, 1.1s) steps(22) forwards; }
@keyframes hwr { to { clip-path: inset(-10px -10px -10px 0); } }
.stage .hw.red { color: #C2412F; } .stage .hw.green { color: #2E7D5B; } .stage .hw.dk { color: #33394D; } .stage .hw.big { font-size: 38px; }
.stage .hw.gone { transition: opacity .4s, filter .4s; opacity: 0; filter: blur(3px); }

.stage .draw path, .stage .draw rect, .stage .draw ellipse, .stage .draw polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.stage .draw.on path, .stage .draw.on rect, .stage .draw.on ellipse, .stage .draw.on polyline { transition: stroke-dashoffset var(--d, .9s) ease-in-out; stroke-dashoffset: 0; }
.stage .draw.gone { transition: opacity .35s; opacity: 0; }

.stage .pop { opacity: 0; transform: translateY(8px) scale(.96); transition: opacity .4s ease, transform .45s cubic-bezier(.2,.9,.3,1.25); }
.stage .pop.on { opacity: 1; transform: none; }
.stage .fade { opacity: 0; transition: opacity .4s; } .stage .fade.on { opacity: 1; }
.stage [data-k].out { opacity: 0 !important; pointer-events: none; transition: opacity .35s; }

/* cards like the app */
.stage .lcard { position: absolute; background: #FFFDF8; border-radius: 14px; box-shadow: 0 8px 22px rgba(46,49,66,.14), 0 0 0 1px #ECE4D5; overflow: hidden; }
.stage .lcard::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 4.5px; border-radius: 3px; background: #8B6CC8; }
.stage .lcard .hd { display: flex; align-items: center; gap: 9px; padding: 11px 14px 6px 22px; font-weight: 700; font-size: 15px; }
.stage .lcard .hd .tile { width: 26px; height: 26px; border-radius: 8px; background: #8B6CC8; color: #fff; display: grid; place-items: center; font-size: 13px; }
.stage .lcard .hd .ring { margin-left: auto; font-size: 12px; color: #7C7F92; font-weight: 600; }
.stage .rrow { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 22px; border-top: 1px solid #F0E9DC; font-size: 14px; }
.stage .rrow .c { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #8B6CC8; flex: none; position: relative; transition: all .3s; }
.stage .rrow.done .c { background: #8B6CC8; }
.stage .rrow.done .c::after { content: "\2713"; color: #fff; position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.stage .rrow.done .tx { color: #A3A6B5; text-decoration: line-through; }
.stage .rrow .due { margin-left: auto; font-size: 12px; font-weight: 600; color: #C2412F; }
.stage .rrow .due.g { color: #7C7F92; }

.stage .rbtn { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(200deg,#FFB04A,#F2664A 25%,#B03A9A 60%,#5A2A9C); color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 14px; box-shadow: 0 6px 16px rgba(176,58,154,.4); }
.stage .rbtn.on { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(176,58,154,.15), 0 6px 16px rgba(176,58,154,.4); } }
.stage .menu { position: absolute; background: #fff; border-radius: 14px; box-shadow: 0 14px 40px rgba(30,20,60,.25); padding: 8px; width: 220px; }
.stage .menu .mh { font-size: 12px; color: #7C7F92; font-weight: 700; padding: 4px 8px 6px; letter-spacing: .04em; text-transform: uppercase; }
.stage .menu .mi { padding: 9px 10px; border-radius: 9px; font-weight: 600; display: flex; justify-content: space-between; transition: background .2s, color .2s; }
.stage .menu .mi small { color: #7C7F92; font-weight: 500; }
.stage .menu .mi.hit { background: #8B6CC8; color: #fff; } .stage .menu .mi.hit small { color: #EDE6FF; }

.stage .toast { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(14px); background: #2E3142; color: #fff; padding: 10px 16px; border-radius: 99px;
  font-weight: 600; font-size: 13.5px; opacity: 0; transition: all .4s cubic-bezier(.2,.9,.3,1.2); white-space: nowrap; z-index: 9; }
.stage .toast.on { opacity: 1; transform: translateX(-50%); }
.stage .toast b { color: #FFD27A; }

/* AI panel */
.stage .panel { position: absolute; top: 46px; right: 0; bottom: 0; width: 330px; background: #FFFFFF; border-left: 1px solid #ECE4D5; box-shadow: -10px 0 30px rgba(46,49,66,.1);
  transform: translateX(105%); transition: transform .55s cubic-bezier(.2,.8,.2,1); z-index: 6; padding: 14px 16px; }
.stage .panel.on { transform: none; }
.stage .panel .ph2 { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; margin-bottom: 10px; }
.stage .panel .ph2 .b { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(200deg,#FFB04A,#F2664A 25%,#B03A9A 60%,#5A2A9C); color: #fff; display: grid; place-items: center; font-size: 14px; }
.stage .seg { display: flex; background: #F3EEE6; border-radius: 10px; padding: 3px; margin-bottom: 10px; }
.stage .seg span { flex: 1; text-align: center; font-size: 12.5px; font-weight: 600; padding: 6px 0; border-radius: 8px; color: #6F7286; }
.stage .seg span.sel { background: #fff; color: #2E3142; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.stage .sec { margin-top: 9px; }
.stage .sec .k { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #B03A9A; margin-bottom: 3px; }
.stage .sec .v { font-size: 13.5px; }
.stage .sec .v div { padding: 2px 0 2px 14px; position: relative; }
.stage .sec .v div::before { content: ""; position: absolute; left: 2px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: #B03A9A; }
.stage .pbtn { display: inline-block; margin-top: 12px; background: #8B6CC8; color: #fff; padding: 9px 14px; border-radius: 10px; font-weight: 700; font-size: 13.5px; transition: transform .15s; }
.stage .pbtn.press { transform: scale(.94); }
.stage .shimmer { height: 10px; border-radius: 5px; background: linear-gradient(90deg,#F1EBE1,#E6DDCE,#F1EBE1); background-size: 200% 100%; animation: sh 1s linear infinite; margin: 6px 0; }
@keyframes sh { to { background-position: -200% 0; } }

/* meeting */
.stage .divider { position: absolute; left: 24px; right: 24px; top: 64px; border-radius: 12px; padding: 10px 14px 12px 22px; background: #FFFDF8; box-shadow: inset 0 2px 7px rgba(0,0,0,.06); }
.stage .divider::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 5px; border-radius: 3px; background: #8B6CC8; }
.stage .divider .dl { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; color: #7C7F92; text-transform: uppercase; }
.stage .divider .tt { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.stage .divider .mic { position: absolute; right: 14px; top: 18px; width: 38px; height: 38px; border-radius: 50%; background: #E5483A; color: #fff; display: grid; place-items: center; font-size: 15px; }
.stage .divider .mic.live { animation: redp 1.2s infinite; border-radius: 10px; }
@keyframes redp { 50% { box-shadow: 0 0 0 9px rgba(229,72,58,.18); } }
.stage .att { font-size: 14px; }
.stage .att div { display: flex; gap: 8px; align-items: center; padding: 3px 0; }
.stage .att .bx { width: 15px; height: 15px; border: 1.8px solid #A9A08E; border-radius: 4px; display: grid; place-items: center; font-size: 11px; color: #fff; transition: all .25s; }
.stage .att .on .bx { background: #2E7D5B; border-color: #2E7D5B; }
.stage .rpill { position: absolute; display: flex; align-items: center; gap: 10px; background: #FFFDF8; border-radius: 99px; padding: 8px 14px; box-shadow: 0 6px 18px rgba(46,49,66,.14), 0 0 0 1px #ECE4D5; font-weight: 600; font-size: 13.5px; }
.stage .rpill .dot { width: 10px; height: 10px; border-radius: 50%; background: #E5483A; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.stage .wave { display: flex; gap: 3px; align-items: center; height: 22px; }
.stage .wave i { width: 3px; border-radius: 2px; background: #E5483A; animation: wv .9s ease-in-out infinite; }
@keyframes wv { 0%,100% { height: 5px; } 50% { height: 20px; } }
.stage .chips span { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: #E2F3EA; color: #1F6A4A; margin: 2px 4px 2px 0; }
.stage .chips span.ab { background: #EEE; color: #8A8A8A; }

/* pdf */
.stage .pdfpage { position: absolute; left: 28px; top: 66px; width: 420px; height: 418px; background: #fff; border-radius: 6px; box-shadow: 0 6px 22px rgba(46,49,66,.15); padding: 26px 30px; color: #2B2F3A; font: 12.5px/1.75 Georgia, "Times New Roman", serif; }
.stage .pdfpage h4 { font: 800 19px/1.2 -apple-system, sans-serif; margin: 0 0 8px; letter-spacing: -.01em; }
.stage .pdfpage p { margin: 0 0 9px; position: relative; }
.stage .hl { position: absolute; left: -3px; height: 21px; background: rgba(255,214,64,.55); border-radius: 4px; width: 0; mix-blend-mode: multiply; transition: width 1.1s ease-in-out; }
.stage .hl.on { width: var(--w); }
.stage .bubble { position: absolute; background: #FFF3C4; border: 1px solid #F0D77A; border-radius: 10px 10px 10px 2px; padding: 7px 10px; font: 600 12.5px/1.3 -apple-system, sans-serif; color: #5E4A0B; box-shadow: 0 6px 14px rgba(0,0,0,.08); }
.stage .snapbox { position: absolute; border: 2px dashed #8B6CC8; border-radius: 8px; background: rgba(139,108,200,.06); }
.stage .snapbar { position: absolute; display: flex; gap: 4px; background: #2E3142; border-radius: 10px; padding: 4px; }
.stage .snapbar span { color: #fff; font-weight: 600; font-size: 12.5px; padding: 6px 10px; border-radius: 7px; transition: background .2s; }
.stage .snapbar span.hit { background: #8B6CC8; }
.stage .notecol { position: absolute; left: 470px; top: 66px; right: 22px; bottom: 18px; background: #FFFDF8; border-radius: 10px; box-shadow: 0 0 0 1px #ECE4D5; padding: 12px; overflow: hidden;
  background-image: repeating-linear-gradient(to bottom, transparent 0 33px, #ECE4D5 33px 34px); }
.stage .notecol .nt { font-weight: 800; font-size: 13px; color: #7C7F92; }
.stage .snapcard { position: absolute; left: 12px; right: 12px; top: 120px; background: #FFFDF8; border-radius: 10px; padding: 12px 12px 10px 18px; font: 13px/1.45 -apple-system, sans-serif;
  box-shadow: 0 8px 22px rgba(46,49,66,.15), 0 0 0 1px #ECE4D5; transform: translate(-340px, -40px) scale(.85); opacity: 0; transition: all .8s cubic-bezier(.2,.8,.2,1); }
.stage .snapcard::before { content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 4px; border-radius: 2px; background: #8B6CC8; }
.stage .snapcard.on { transform: none; opacity: 1; }
.stage .snapcard .chip { display: inline-block; margin-top: 7px; font-size: 11px; font-weight: 700; color: #8B6CC8; background: #EFE8FB; border-radius: 99px; padding: 3px 8px; }
.stage .penmark { position: absolute; width: 30px; height: 30px; transform: rotate(-35deg); transition: left 1.1s ease-in-out, top .3s; }

/* study */
.stage .fcard { position: absolute; perspective: 900px; }
.stage .fcard .inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3,.7,.3,1); }
.stage .fcard.fcardnow .inner { transform: rotateY(180deg); }
.stage .fcard .face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 14px; display: grid; place-items: center; text-align: center; padding: 16px; font-weight: 700; font-size: 16px;
  background: #fff; box-shadow: 0 8px 24px rgba(46,49,66,.16), 0 0 0 1px #ECE4D5; }
.stage .fcard .face small { display: block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #B03A9A; margin-bottom: 6px; }
.stage .fcard .back { transform: rotateY(180deg); background: linear-gradient(160deg,#FFF6EC,#F7EEFF); }
.stage .quiz .q { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.stage .quiz .o { border: 1.5px solid #E6DDCE; border-radius: 10px; padding: 8px 11px; margin-bottom: 6px; font-size: 13.5px; transition: all .3s; display: flex; justify-content: space-between; }
.stage .quiz .o.right { border-color: #2E7D5B; background: #E2F3EA; color: #1F5C43; font-weight: 700; }
.stage .quiz .ex { font-size: 12.5px; color: #6F7286; }

/* pencil gestures */
.stage .gcell { position: absolute; top: 70px; width: 228px; height: 400px; border-radius: 16px; background: #FFFDF8; box-shadow: 0 0 0 1px #ECE4D5; }
.stage .gcell .gl { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-weight: 700; font-size: 14px; }
.stage .gcell .gs { position: absolute; left: 0; right: 0; bottom: -6px; text-align: center; font-size: 12px; color: #7C7F92; }
.stage .bigbox { position: absolute; width: 30px; height: 30px; border: 2.5px solid #2E3142; border-radius: 6px; transition: all .3s; }
.stage .bigbox.on { background: #8B6CC8; border-color: #8B6CC8; transform: scale(1.12); }
.stage .strike { position: absolute; height: 2.5px; background: #7C7F92; width: 0; transition: width .4s; }
.stage .strike.on { width: var(--w); }

@media (max-width: 900px) { .fdemo { grid-template-columns: minmax(0, 1fr); gap: 16px; } .ftabs { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .ftabs { grid-template-columns: repeat(2, 1fr); } .stage-wrap { border-width: 4px; border-radius: 14px; } }
@media (prefers-reduced-motion: reduce) {
  .stage .hw { clip-path: none !important; animation: none !important; }
  .stage .rbtn.on, .stage .wave i, .stage .rpill .dot, .stage .divider .mic.live, .stage .shimmer { animation: none !important; }
}
.stage [data-k="load"].out { display: none; }
.fdemo > * { min-width: 0; }
