/*
 * Animated product demos on the v3 landing page (views/v3/landing/demos/*.ejs).
 * Each demo is a small app window built from the real ui3.css components, rendered at a fixed
 * design size (data-w × data-h) and scaled to its slot by public/scripts/ui3/landing-demos.js.
 * Scene choreography: the engine adds s1…sN to .u-lp-demo; `.on-N` pieces appear from scene N,
 * `.off-N` pieces leave at scene N. Raw colors live in the token block only.
 */

/* ---------- Tokens ---------- */
html.ui3.u-lp {
  --u-lpd-slide: #0f766e;
  --u-lpd-slide-accent: #14b8a6;
  --u-lpd-slide-sub: #a7f3d0;
  --u-lpd-slide-ink: #0b0b0d;
  --u-lpd-cursor: #0b0b0d;
  --u-lpd-cursor-ring: rgba(4, 120, 87, 0.35);
  --u-lpd-window-shadow: 0 30px 60px -24px rgba(10, 10, 15, 0.28), 0 0 0 1px rgba(10, 10, 15, 0.06);
  --u-lpd-backdrop: linear-gradient(160deg, #f4f4f5 0%, #ecfdf5 100%);
  --u-lpd-phone-frame: #0b0b0d;
  --u-lpd-phone-shadow: 0 24px 48px -18px rgba(10, 10, 15, 0.45), 0 0 0 1px rgba(10, 10, 15, 0.12);
  --u-lpd-app-bg: #fafafa;
  --u-lpd-glass: rgba(255, 255, 255, 0.92);
  --u-lpd-tab-shadow: 0 8px 24px rgba(10, 10, 15, 0.12), 0 0 0 1px rgba(10, 10, 15, 0.06);
  --u-lpd-tab-on: rgba(10, 10, 15, 0.05);
  --u-lpd-mini-shadow: 0 16px 32px rgba(10, 10, 15, 0.18);
}

/* ---------- Fit (scale a fixed-size window to its slot) ---------- */
.u-lp .u-lp-demo-fit {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--u-lpd-backdrop);
}
.u-lp .u-lp-demo-fit[data-ratio="square"] { aspect-ratio: 1 / 1; }
.u-lp .u-lp-demo-fit[data-ratio="wide"] { aspect-ratio: 16 / 9; }
.u-lp .u-lp-demo-fit > .u-lp-demo {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  transform: scale(var(--u-lpd-scale, 1));
  transform-origin: top left;
}
.u-lp[dir="rtl"] .u-lp-demo-fit > .u-lp-demo { transform-origin: top right; }

/* ---------- Demo window ---------- */
.u-lp .u-lp-demo {
  box-sizing: border-box;
  padding: 22px;
  font-size: var(--u-t-base);
  color: var(--u-ink);
  text-align: start;
  pointer-events: none;
  user-select: none;
}
.u-lp .u-lp-demo *,
.u-lp .u-lp-demo *::before,
.u-lp .u-lp-demo *::after { box-sizing: border-box; }
.u-lp .u-lpd-win {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--u-surface);
  border-radius: var(--u-r-xl);
  box-shadow: var(--u-lpd-window-shadow);
  transition: opacity 0.45s var(--u-ease);
}
.u-lp .u-lp-demo.is-ending .u-lpd-win { opacity: 0; }
.u-lp .u-lp-demo.is-resetting *,
.u-lp .u-lp-demo.is-resetting *::before,
.u-lp .u-lp-demo.is-resetting *::after { transition: none !important; animation-play-state: paused; }
.u-lp .u-lpd-bar {
  display: flex; align-items: center; gap: 8px; flex: none;
  height: 42px; padding-inline: 14px;
  border-block-end: 1px solid var(--u-line);
  background: var(--u-surface);
  font-size: var(--u-t-sm); font-weight: 600; color: var(--u-ink);
}
.u-lp .u-lpd-bar .u-i { color: var(--u-ink-3); }
.u-lp .u-lpd-bar__title { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.u-lp .u-lpd-bar__spacer { flex: 1; }
.u-lp .u-lpd-dots { display: inline-flex; gap: 5px; margin-inline-end: 4px; }
.u-lp .u-lpd-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--u-surface-3); }
.u-lp .u-lpd-body { position: relative; flex: 1; min-height: 0; }
.u-lp .u-lpd-view { position: absolute; inset: 0; padding: 16px; }
.u-lp .u-lpd-sample {
  position: absolute; inset-block-end: 10px; inset-inline-end: 10px; z-index: 6;
  padding: 2px 7px; border-radius: var(--u-r-pill);
  background: var(--u-surface-2); color: var(--u-ink-4);
  font-size: var(--u-t-2xs); font-weight: 500; letter-spacing: 0.02em;
}

/* ---------- Scene choreography ---------- */
.u-lp .u-lp-demo :is(.on-1, .on-2, .on-3, .on-4, .on-5, .on-6, .on-7, .on-8) {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s var(--u-ease), transform 0.45s var(--u-ease);
}
.u-lp .u-lp-demo.s1 .on-1, .u-lp .u-lp-demo.s2 .on-2, .u-lp .u-lp-demo.s3 .on-3,
.u-lp .u-lp-demo.s4 .on-4, .u-lp .u-lp-demo.s5 .on-5, .u-lp .u-lp-demo.s6 .on-6,
.u-lp .u-lp-demo.s7 .on-7, .u-lp .u-lp-demo.s8 .on-8 { opacity: 1; transform: none; }
.u-lp .u-lp-demo :is(.off-2, .off-3, .off-4, .off-5, .off-6, .off-7, .off-8) { transition: opacity 0.35s var(--u-ease), transform 0.4s var(--u-ease); }
.u-lp .u-lp-demo.s2 .off-2, .u-lp .u-lp-demo.s3 .off-3, .u-lp .u-lp-demo.s4 .off-4,
.u-lp .u-lp-demo.s5 .off-5, .u-lp .u-lp-demo.s6 .off-6, .u-lp .u-lp-demo.s7 .off-7,
.u-lp .u-lp-demo.s8 .off-8 { opacity: 0; transform: translateY(-6px); }
.u-lp .u-lp-demo .d1 { transition-delay: 0.15s; }
.u-lp .u-lp-demo .d2 { transition-delay: 0.45s; }
.u-lp .u-lp-demo .d3 { transition-delay: 0.75s; }
.u-lp .u-lp-demo .d4 { transition-delay: 1.05s; }
.u-lp .u-lp-demo .d5 { transition-delay: 1.35s; }

/* `.gone-N` removes a piece from the layout at scene N (for things that would leave a gap). */
.u-lp .u-lp-demo.s2 .gone-2, .u-lp .u-lp-demo.s3 .gone-3, .u-lp .u-lp-demo.s4 .gone-4,
.u-lp .u-lp-demo.s5 .gone-5, .u-lp .u-lp-demo.s6 .gone-6 { display: none; }
/* `.from-N` takes no space until scene N, then fades in with its own display (flex, grid…) intact. */
.u-lp .u-lp-demo:not(.s2) .from-2, .u-lp .u-lp-demo:not(.s3) .from-3,
.u-lp .u-lp-demo:not(.s4) .from-4, .u-lp .u-lp-demo:not(.s5) .from-5 { display: none; }
.u-lp .u-lp-demo.s2 .from-2, .u-lp .u-lp-demo.s3 .from-3, .u-lp .u-lp-demo.s4 .from-4, .u-lp .u-lp-demo.s5 .from-5 { animation: u-fade 0.4s var(--u-ease) both; }

/* Typing caret on the element currently being typed */
.u-lp .u-lp-demo [data-type]:not(:empty)::after {
  content: "";
  display: inline-block; width: 1.5px; height: 1em; margin-inline-start: 1px;
  background: var(--u-accent); vertical-align: -2px;
  animation: u-lpd-caret 0.9s steps(1) infinite;
}
.u-lp .u-lp-demo.is-typed-done [data-type]::after,
.u-lp .u-lp-demo [data-type].is-done::after { display: none; }
@keyframes u-lpd-caret { 50% { opacity: 0; } }

/* Fake pointer */
.u-lp .u-lpd-cursor {
  position: absolute; z-index: 20; width: 22px; height: 22px;
  inset-block-start: 110%; inset-inline-start: 60%;
  transition: inset-block-start 0.9s var(--u-ease), inset-inline-start 0.9s var(--u-ease), opacity 0.3s;
  pointer-events: none;
}
.u-lp .u-lpd-cursor svg { width: 22px; height: 22px; color: var(--u-lpd-cursor); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25)); }
.u-lp[dir="rtl"] .u-lpd-cursor svg { transform: scaleX(-1); }
.u-lp .u-lpd-cursor::after {
  content: ""; position: absolute; inset-block-start: -6px; inset-inline-start: -6px; width: 22px; height: 22px;
  border-radius: 50%; background: var(--u-lpd-cursor-ring); opacity: 0; transform: scale(0.3);
}
.u-lp .u-lpd-cursor.is-tap::after { animation: u-lpd-tap 0.5s var(--u-ease); }
@keyframes u-lpd-tap { 0% { opacity: 0.9; transform: scale(0.3); } 100% { opacity: 0; transform: scale(1.6); } }
.u-lp .u-lpd-press { transition: transform 0.15s var(--u-ease), box-shadow 0.2s; }

/* ===================================================================== */
/* 1. Paper Summarizer                                                    */
/* ===================================================================== */
.u-lp .u-lpd-upload { display: grid; align-content: center; gap: 12px; padding: 24px; }
.u-lp .u-lpd-upload .u-dialog__head { padding: 0; }
.u-lp .u-lpd-drop {
  position: relative; display: grid; place-items: center; gap: 6px; height: 150px;
  border: 1.5px dashed var(--u-line-strong); border-radius: var(--u-r-lg);
  color: var(--u-ink-3); font-size: var(--u-t-sm); text-align: center;
  transition: border-color 0.3s, background 0.3s;
}
.u-lp .u-lp-demo.s1 .u-lpd-drop { border-color: var(--u-accent); background: var(--u-accent-soft); }
.u-lp .u-lpd-drop__inner { display: grid; justify-items: center; gap: 6px; }
.u-lp .u-lpd-pdf {
  position: absolute; z-index: 4; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--u-r-md); background: var(--u-surface); box-shadow: var(--u-sh-lg);
  font-size: var(--u-t-xs); font-weight: 500; color: var(--u-ink);
  inset-block-start: 112%; inset-inline-start: 58%;
  transition: inset-block-start 1.1s var(--u-ease), inset-inline-start 1.1s var(--u-ease), opacity 0.3s;
}
.u-lp .u-lpd-pdf .u-i { color: var(--u-danger); }
.u-lp .u-lp-demo.s1 .u-lpd-pdf { inset-block-start: 56%; inset-inline-start: 24%; }
.u-lp .u-lp-demo.s2 .u-lpd-pdf { opacity: 0; }
.u-lp .u-lpd-uprog { display: grid; gap: 8px; }
.u-lp .u-lpd-uprog .u-upload-progress__row { display: flex; justify-content: space-between; font-size: var(--u-t-xs); color: var(--u-ink-3); }
.u-lp .u-lpd-uprog .u-progress__bar { width: 0; transition: width 1.3s var(--u-ease); }
.u-lp .u-lp-demo.s2 .u-lpd-uprog .u-progress__bar { width: 100%; }
.u-lp .u-lpd-lib { display: grid; align-content: start; gap: 4px; padding: 14px 18px; }
.u-lp .u-lpd-lib .u-row { margin: 0; padding: 12px 0; cursor: default; }
.u-lp .u-lpd-lib .u-row:hover { background: none; }
.u-lp .u-lpd-lib .u-lrow__title { font-size: var(--u-t-base); }
.u-lp .u-lpd-lib .u-bullets { margin-block-start: 10px; }
.u-lp .u-lpd-lib .u-lrow__busy { opacity: 1; transition: opacity 0.3s; }
.u-lp .u-lpd-lib .u-lrow__play { opacity: 0; transform: scale(0.9); }
.u-lp .u-lp-demo.s4 .u-lpd-lib .u-lrow__busy { opacity: 0; }
.u-lp .u-lp-demo.s5 .u-lpd-lib .u-lrow__play { opacity: 1; transform: none; }
.u-lp .u-lp-demo.s5 .u-lpd-lib .u-lrow__thumb { box-shadow: 0 0 0 2px var(--u-accent); }
.u-lp .u-lpd-lib .u-lrow__acts .u-btn { pointer-events: none; }
.u-lp .u-lp-demo.s5 .u-lpd-listen { background: var(--u-surface-2); color: var(--u-ink); }
.u-lp .u-lpd-skel { display: grid; gap: 7px; margin-block-start: 10px; }
.u-lp .u-lpd-skel .u-skeleton { height: 9px; }
.u-lp .u-lpd-skel .u-skeleton:nth-child(2) { width: 82%; }
.u-lp .u-lpd-player {
  position: absolute; inset-inline: 12px; inset-block-end: 12px; z-index: 5;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px;
  height: auto; padding: 10px 12px;
  border: 1px solid var(--u-line); border-radius: var(--u-r-lg); box-shadow: var(--u-sh-lg);
}
.u-lp .u-lpd-player .u-player__who { display: grid; min-width: 0; }
.u-lp .u-lpd-player .u-player__title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--u-t-sm); font-weight: 600; }
.u-lp .u-lpd-player .u-player__sub { font-size: var(--u-t-xs); color: var(--u-accent-ink); }
.u-lp .u-lpd-player__rt { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; font-size: var(--u-t-2xs); color: var(--u-ink-3); }
.u-lp .u-lpd-player .u-scrub { flex: 1; width: auto; }
.u-lp .u-lpd-player .u-scrub__fill { width: 0; transition: width 3.4s linear; background: var(--u-accent); }
.u-lp .u-lp-demo.s5 .u-lpd-player .u-scrub__fill { width: 36%; }
.u-lp .u-lpd-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.u-lp .u-lpd-eq span { width: 3px; height: 100%; border-radius: 2px; background: var(--u-accent); animation: u-ntd-wave 0.9s var(--u-ease) infinite; transform-origin: bottom; }
.u-lp .u-lpd-eq span:nth-child(2) { animation-delay: -0.3s; }
.u-lp .u-lpd-eq span:nth-child(3) { animation-delay: -0.6s; }

/* ===================================================================== */
/* 2. AI Note Taker                                                       */
/* ===================================================================== */
.u-lp .u-lpd-rec { display: grid; justify-items: center; align-content: center; gap: 10px; text-align: center; }
.u-lp .u-lpd-rec .u-ntr__status { height: 24px; padding: 0 10px; border-radius: var(--u-r-pill); font-size: var(--u-t-xs); font-weight: 600; }
.u-lp .u-lpd-meter { display: flex; align-items: center; justify-content: center; gap: 3px; width: 300px; height: 56px; }
.u-lp .u-lpd-meter span {
  flex: 1; max-width: 5px; height: 100%; border-radius: var(--u-r-pill); background: var(--u-line-strong);
  transform: scaleY(0.08); transform-origin: center;
}
.u-lp .u-lp-demo.s2 .u-lpd-meter span { background: color-mix(in srgb, var(--u-rec) 55%, var(--u-line-strong)); animation: u-lpd-level 0.9s var(--u-ease) infinite alternate; }
.u-lp .u-lp-demo.s2 .u-lpd-meter span:nth-child(7n + 2) { background: var(--u-rec); }
.u-lp .u-lp-demo.s3 .u-lpd-meter span { animation: none; }
.u-lp .u-lpd-meter span:nth-child(3n) { animation-delay: -0.2s; animation-duration: 0.7s; }
.u-lp .u-lpd-meter span:nth-child(3n + 1) { animation-delay: -0.5s; animation-duration: 1.1s; }
.u-lp .u-lpd-meter span:nth-child(4n) { animation-delay: -0.35s; }
.u-lp .u-lpd-meter span:nth-child(5n) { animation-duration: 0.6s; }
@keyframes u-lpd-level { 0% { transform: scaleY(0.1); } 100% { transform: scaleY(var(--u-lpd-amp, 0.6)); } }
.u-lp .u-lpd-meter span:nth-child(2n) { --u-lpd-amp: 0.35; }
.u-lp .u-lpd-meter span:nth-child(3n) { --u-lpd-amp: 0.8; }
.u-lp .u-lpd-meter span:nth-child(5n) { --u-lpd-amp: 0.95; }
.u-lp .u-lpd-meter span:nth-child(7n) { --u-lpd-amp: 0.25; }
.u-lp .u-lpd-timer { font-family: var(--u-mono); font-variant-numeric: tabular-nums; font-size: 44px; font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.u-lp .u-lpd-timer small { margin-inline-start: 6px; font-size: var(--u-t-sm); color: var(--u-ink-4); }
.u-lp .u-lpd-recbtn {
  position: relative; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
  background: var(--u-rec); color: var(--u-on-accent); box-shadow: 0 8px 24px color-mix(in srgb, var(--u-rec) 35%, transparent);
}
.u-lp .u-lpd-recbtn .u-i { width: 24px; height: 24px; transition: opacity 0.2s; }
.u-lp .u-lpd-recbtn .u-ntr__stopsq { position: absolute; display: block; width: 18px; height: 18px; opacity: 0; transition: opacity 0.2s; }
.u-lp .u-lp-demo.s2 .u-lpd-recbtn .u-i { opacity: 0; }
.u-lp .u-lp-demo.s2 .u-lpd-recbtn .u-ntr__stopsq { opacity: 1; }
.u-lp .u-lpd-recbtn::before {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--u-rec) 30%, transparent); opacity: 0;
}
.u-lp .u-lp-demo.s2 .u-lpd-recbtn::before { opacity: 1; animation: u-pulse 1.4s var(--u-ease) infinite; }
.u-lp .u-lpd-reclabel { font-size: var(--u-t-xs); color: var(--u-ink-3); }
.u-lp .u-lpd-transcript {
  width: 100%; min-height: 64px; padding: 10px 12px; border-radius: var(--u-r-lg);
  background: var(--u-surface-2); font-family: var(--u-font-read); font-size: var(--u-t-sm); line-height: 1.55; color: var(--u-ink-2); text-align: start;
}
.u-lp .u-lpd-writing { display: grid; justify-items: center; align-content: center; gap: 10px; color: var(--u-ink-3); font-size: var(--u-t-sm); }
.u-lp .u-lpd-note { display: grid; align-content: start; gap: 10px; padding: 16px 18px; }
.u-lp .u-lpd-note__head { display: flex; align-items: center; gap: 8px; }
.u-lp .u-lpd-note__head .u-tag { display: inline-flex; align-items: center; gap: 5px; }
.u-lp .u-lpd-note__title { font-size: var(--u-t-lg); font-weight: 600; letter-spacing: -0.015em; }
.u-lp .u-lpd-soap { display: grid; gap: 8px; }
.u-lp .u-lpd-soap__row { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 9px 10px; border: 1px solid var(--u-line); border-radius: var(--u-r-md); }
.u-lp .u-lpd-soap__k {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: var(--u-r-sm);
  background: var(--u-accent-soft); color: var(--u-accent-ink); font-size: var(--u-t-xs); font-weight: 700;
}
.u-lp .u-lpd-soap__h { font-size: var(--u-t-2xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--u-ink-3); }
.u-lp .u-lpd-soap__t { font-size: var(--u-t-sm); line-height: 1.45; color: var(--u-ink); }

/* ===================================================================== */
/* 3. AI Chat with citations                                              */
/* ===================================================================== */
.u-lp .u-lpd-chat { display: flex; flex-direction: column; padding: 0; }
.u-lp .u-lpd-log { flex: 1; min-height: 0; display: grid; align-content: start; gap: 14px; padding: 16px 16px 8px; overflow: hidden; }
.u-lp .u-lpd-log .u-msg { animation: none; }
.u-lp .u-lpd-log .u-msg__bubble { font-size: var(--u-t-sm); }
.u-lp .u-lpd-log .u-msg__head { margin-block-end: 8px; }
.u-lp .u-lpd-log .u-msg__mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: var(--u-r-sm); background: var(--u-ink); color: var(--u-on-ink); }
.u-lp .u-lpd-log .u-prep { padding: 12px 14px; }
.u-lp .u-lpd-log .u-prep__bar > span { animation-duration: 2.4s; }
.u-lp .u-lpd-log .key-takeaway-card { margin-block-end: 10px; padding: 10px 12px; }
.u-lp .u-lpd-log .key-takeaway-body { font-size: var(--u-t-sm); }
.u-lp .u-lpd-log .u-answer { font-size: 14.5px; line-height: 1.6; }
.u-lp .u-lpd-log .inline-ref { transition: opacity 0.3s, transform 0.3s, background 0.3s; }
.u-lp .u-lp-demo.s5 .u-lpd-ref1 { background: var(--u-accent-soft); border-color: var(--u-accent-line); }
.u-lp .u-lpd-log .u-refs { margin-block-start: 10px; }
.u-lp .u-lpd-log .u-srcchip { max-width: 180px; }
.u-lp .u-lp-demo.s5 .u-lpd-chip1 { border-color: var(--u-accent-line); background: var(--u-accent-soft); }
.u-lp .u-lpd-prepstack { position: relative; }
.u-lp .u-lpd-prepstack > * { transition: opacity 0.3s, transform 0.3s; }
.u-lp .u-lpd-prepstack > .u-lpd-ans { position: absolute; inset-block-start: 0; inset-inline: 0; }
.u-lp .u-lpd-composer {
  margin: 0 12px 12px; padding: 10px 12px; border: 1px solid var(--u-line-strong); border-radius: var(--u-r-xl);
  background: var(--u-surface); box-shadow: var(--u-sh-sm);
}
.u-lp .u-lpd-composer__input { min-height: 38px; font-size: var(--u-t-sm); line-height: 1.45; color: var(--u-ink); }
.u-lp .u-lpd-composer__ph { color: var(--u-ink-4); }
.u-lp .u-lp-demo.s1 .u-lpd-composer__ph { display: none; }
.u-lp .u-lpd-composer__row { display: flex; align-items: center; gap: 8px; margin-block-start: 6px; font-size: var(--u-t-xs); color: var(--u-ink-3); }
.u-lp .u-lpd-composer__row .u-switch { pointer-events: none; }
.u-lp .u-lpd-send { margin-inline-start: auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--u-r-md); background: var(--u-surface-3); color: var(--u-ink-4); transition: background 0.2s, color 0.2s, transform 0.15s; }
.u-lp .u-lp-demo.s1 .u-lpd-send { background: var(--u-ink); color: var(--u-on-ink); }
.u-lp .u-lp-demo.s2 .u-lpd-send { background: var(--u-surface-3); color: var(--u-ink-4); }
.u-lp .u-lp-demo.s2 .u-lpd-composer__typed { display: none; }
.u-lp .u-lp-demo.s2 .u-lpd-composer__ph { display: inline; }

/* ===================================================================== */
/* Wide (tool card) demos: shared                                         */
/* ===================================================================== */
.u-lp .u-lp-demo--wide { padding: 16px; font-size: var(--u-t-md); }
.u-lp .u-lp-demo--wide .u-lpd-bar { height: 40px; font-size: var(--u-t-base); }

/* 4. Presentations */
.u-lp .u-lpd-gen { display: grid; place-items: center; }
.u-lp .u-lpd-gen .u-gen { padding: 0; gap: 4px; }
.u-lp .u-lpd-gen .u-gen__bar { margin: 10px 0 12px; }
.u-lp .u-lpd-gen .u-gen__bar .u-progress__bar { width: 8%; transition: width 2.6s var(--u-ease); }
.u-lp .u-lp-demo.s1 .u-lpd-gen .u-gen__bar .u-progress__bar { width: 92%; }
.u-lp .u-lpd-gen .u-gen__steps li { font-size: var(--u-t-base); }
.u-lp .u-lp-demo.s1 .u-lpd-gen li.g1 { color: var(--u-ink-3); }
.u-lp .u-lpd-gen li .u-gen__mark { transition: background 0.3s, border-color 0.3s; }
.u-lp .u-lpd-gen li .u-gen__mark .u-i { opacity: 0; transition: opacity 0.2s; }
.u-lp .u-lp-demo.s1 .u-lpd-gen li.g1 .u-gen__mark,
.u-lp .u-lp-demo.s2 .u-lpd-gen li .u-gen__mark { border-color: var(--u-accent); background: var(--u-accent); color: var(--u-on-accent); }
.u-lp .u-lp-demo.s1 .u-lpd-gen li.g1 .u-gen__mark .u-i,
.u-lp .u-lp-demo.s2 .u-lpd-gen li .u-gen__mark .u-i { opacity: 1; }
.u-lp .u-lpd-deck { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; padding: 14px; background: var(--u-bg); }
.u-lp .u-lpd-thumbs { display: grid; align-content: start; gap: 8px; }
.u-lp .u-lpd-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--u-r-sm); overflow: hidden; box-shadow: 0 0 0 1px var(--u-line); }
.u-lp .u-lpd-thumb.is-current { box-shadow: 0 0 0 2px var(--u-accent); }
.u-lp .u-lp-demo.s4 .u-lpd-thumb.t1 { box-shadow: 0 0 0 1px var(--u-line); }
.u-lp .u-lp-demo.s4 .u-lpd-thumb.t2 { box-shadow: 0 0 0 2px var(--u-accent); }
.u-lp .u-lpd-slide { position: relative; aspect-ratio: 16 / 9; border-radius: var(--u-r-md); overflow: hidden; box-shadow: var(--u-sh-md); }
.u-lp .u-lpd-sl { position: absolute; inset: 0; display: grid; align-content: center; gap: 8px; padding: 8% 9%; transition: opacity 0.45s var(--u-ease); }
.u-lp .u-lpd-sl--title { background: var(--u-lpd-slide); color: var(--u-on-ink); }
.u-lp .u-lpd-sl--title::before { content: ""; width: 44px; height: 4px; border-radius: 2px; background: var(--u-lpd-slide-accent); }
.u-lp .u-lpd-sl--title::after { content: ""; position: absolute; inset-inline: 0; inset-block-end: 0; height: 6px; background: var(--u-lpd-slide-accent); }
.u-lp .u-lpd-sl__t { font-size: 17px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.u-lp .u-lpd-sl__s { font-size: var(--u-t-xs); color: var(--u-lpd-slide-sub); }
.u-lp .u-lpd-sl--content { align-content: start; background: var(--u-surface); color: var(--u-lpd-slide-ink); }
.u-lp .u-lpd-sl--content .u-lpd-sl__t { padding-block-end: 6px; border-block-end: 3px solid var(--u-lpd-slide-accent); font-size: 15px; color: var(--u-lpd-slide); }
.u-lp .u-lpd-sl__li { display: flex; gap: 8px; font-size: 11.5px; line-height: 1.45; color: var(--u-ink-2); }
.u-lp .u-lpd-sl__li::before { content: ""; flex: none; width: 6px; height: 6px; margin-block-start: 5px; border-radius: 50%; background: var(--u-lpd-slide-accent); }
.u-lp .u-lpd-thumb .u-lpd-sl { padding: 10%; gap: 3px; }
.u-lp .u-lpd-thumb .u-lpd-sl__t { font-size: 5px; }
.u-lp .u-lpd-thumb .u-lpd-sl__s { font-size: 3.5px; }
.u-lp .u-lpd-thumb .u-lpd-sl--title::before { width: 12px; height: 1.5px; }
.u-lp .u-lpd-thumb .u-lpd-sl__line { height: 2px; border-radius: 1px; background: var(--u-line-strong); }
.u-lp .u-lpd-slide .u-lpd-sl--content { opacity: 0; }
.u-lp .u-lp-demo.s4 .u-lpd-slide .u-lpd-sl--content { opacity: 1; }

/* 5. AI Writer */
.u-lp .u-lpd-wre { display: grid; grid-template-columns: minmax(0, 1fr) 150px; height: 100%; }
.u-lp .u-lpd-paper { padding: 14px 20px; background: var(--u-bg); }
.u-lp .u-lpd-paper__sheet { height: 100%; padding: 16px 18px; border-radius: var(--u-r-md); background: var(--u-surface); box-shadow: var(--u-sh-sm); font-family: var(--u-font-read); font-size: 13px; line-height: 1.6; color: var(--u-ink-2); }
.u-lp .u-lpd-paper__h { margin: 0 0 6px; font-family: var(--u-font); font-size: var(--u-t-md); font-weight: 600; color: var(--u-ink); }
.u-lp .u-lpd-cite {
  display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding-inline: 4px; margin-inline: 2px;
  border-radius: var(--u-r-pill); background: var(--u-accent-soft); color: var(--u-accent-ink);
  font: 600 10px/1 var(--u-font); vertical-align: 1px;
}
.u-lp .u-lpd-side { display: grid; align-content: start; gap: 8px; padding: 12px; border-inline-start: 1px solid var(--u-line); }
.u-lp .u-lpd-side__tab { display: inline-flex; align-items: center; gap: 6px; font-size: var(--u-t-xs); font-weight: 600; color: var(--u-ink); }
.u-lp .u-lpd-side__tab .u-wre__tabcount, .u-lp .u-lpd-count { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding-inline: 4px; border-radius: var(--u-r-pill); background: var(--u-surface-3); font-size: var(--u-t-2xs); }
.u-lp .u-lpd-ref { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 6px; padding: 8px; border: 1px solid var(--u-line); border-radius: var(--u-r-md); font-size: 10.5px; line-height: 1.35; color: var(--u-ink); }
.u-lp .u-lpd-ref small { display: block; margin-block-start: 2px; color: var(--u-ink-3); font-size: 9.5px; }
.u-lp .u-lpd-saved { display: inline-flex; align-items: center; gap: 4px; font-size: var(--u-t-xs); font-weight: 500; color: var(--u-ink-4); }

/* 6. Study Mode */
.u-lp .u-lpd-study { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 10px; padding: 14px 18px; }
.u-lp .u-lpd-study .u-sts__head { margin: 0; align-items: center; }
.u-lp .u-lpd-study .u-sts__progress { margin: 0; }
.u-lp .u-lpd-study .u-sts__progress > span:nth-child(3) { transition: background 0.3s; }
.u-lp .u-lp-demo.s4 .u-lpd-study .u-sts__progress > span:nth-child(3) { background: var(--u-accent); }
.u-lp .u-lpd-study .u-flip { height: 100%; min-height: 0; }
.u-lp .u-lpd-study .u-flip__inner { height: 100%; min-height: 0; }
.u-lp .u-lpd-study .u-flip__face { min-height: 0; height: 100%; box-shadow: var(--u-sh-sm); }
.u-lp .u-lpd-study .u-flip__face { padding: 14px 16px; gap: 6px; }
.u-lp .u-lpd-study .u-flip__text { font-size: var(--u-t-md); font-weight: 500; }
.u-lp .u-lpd-study .u-flip__face--back .u-flip__text { font-size: var(--u-t-xl); font-weight: 600; color: var(--u-accent-ink); }
.u-lp .u-lpd-study .u-sts__expl { padding-block-start: 6px; font-size: var(--u-t-xs); }
.u-lp .u-lp-demo.s3 .u-lpd-study .u-flip__inner { transform: rotateY(180deg); }
.u-lp .u-lpd-study__foot { position: relative; height: 40px; }
.u-lp .u-lpd-study__foot > * { position: absolute; inset: 0; }
.u-lp .u-lpd-study__foot > :first-child { display: flex; justify-content: center; }
.u-lp .u-lpd-study .u-sts__reveal { min-width: 0; width: 60%; margin-inline: auto; height: 38px; }
.u-lp .u-lpd-study .u-sts__rates { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.u-lp .u-lpd-study .u-sts__reveal { width: 60%; }
.u-lp .u-lpd-study .u-sts__rate { padding-block: 6px; transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.u-lp .u-lpd-study .u-sts__ratelabel { font-size: var(--u-t-xs); }
.u-lp .u-lpd-study .u-sts__rateint { font-size: var(--u-t-2xs); }
.u-lp .u-lp-demo.s4 .u-lpd-study .u-sts__rate--good { border-color: var(--u-accent); background: var(--u-accent-soft); transform: translateY(-1px); }

/* 7. Quick Discover */
.u-lp .u-lpd-disc { display: grid; align-content: start; gap: 10px; padding: 14px 18px; }
.u-lp .u-lpd-search { display: flex; align-items: center; gap: 8px; height: 40px; padding-inline: 12px 6px; border: 1px solid var(--u-line-strong); border-radius: var(--u-r-lg); background: var(--u-surface); font-size: var(--u-t-sm); }
.u-lp .u-lpd-search .u-i { color: var(--u-ink-4); flex: none; }
.u-lp .u-lpd-search__q { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.u-lp .u-lpd-search .u-btn { height: 28px; flex: none; }
.u-lp .u-lpd-indet { position: relative; height: 3px; border-radius: var(--u-r-pill); background: var(--u-surface-3); overflow: hidden; }
.u-lp .u-lpd-indet::after { content: ""; position: absolute; inset-block: 0; width: 35%; border-radius: inherit; background: var(--u-accent); animation: u-lpd-indet 1.1s var(--u-ease) infinite; }
@keyframes u-lpd-indet { from { inset-inline-start: -35%; } to { inset-inline-start: 100%; } }
.u-lp .u-lpd-synth { padding: 10px 12px; border: 1px solid var(--u-accent-line); border-radius: var(--u-r-lg); background: linear-gradient(180deg, var(--u-accent-soft), var(--u-surface)); }
.u-lp .u-lpd-synth__t { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: var(--u-t-xs); font-weight: 600; color: var(--u-accent-ink); }
.u-lp .u-lpd-synth ol { margin: 0; padding-inline-start: 18px; display: grid; gap: 4px; font-family: var(--u-font-read); font-size: 12.5px; line-height: 1.45; color: var(--u-ink-2); }
.u-lp .u-lpd-prow { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; padding: 8px 2px; border-block-start: 1px solid var(--u-line); }
.u-lp .u-lpd-prow__n { font-size: var(--u-t-xs); font-weight: 600; color: var(--u-ink-4); }
.u-lp .u-lpd-prow__t { font-size: var(--u-t-sm); font-weight: 600; line-height: 1.3; color: var(--u-ink); }
.u-lp .u-lpd-prow__m { margin-block-start: 3px; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: var(--u-t-2xs); color: var(--u-ink-3); }
.u-lp .u-lpd-prow__m .u-badge { height: 18px; padding-inline: 6px; font-size: var(--u-t-2xs); gap: 4px; }
.u-lp .u-lpd-prow__m .u-badge .u-i { width: 10px; height: 10px; }

/* 8. 16-Week Accelerator */
.u-lp .u-lpd-acc { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; padding: 14px 18px; }
.u-lp .u-lpd-week { display: flex; align-items: center; gap: 10px; }
.u-lp .u-lpd-week__n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--u-r-md); background: var(--u-accent); color: var(--u-on-accent); font-size: var(--u-t-lg); font-weight: 700; }
.u-lp .u-lpd-week__t { font-size: var(--u-t-md); font-weight: 600; line-height: 1.2; }
.u-lp .u-lpd-week .u-badge { margin-block-start: 3px; height: 20px; font-size: var(--u-t-2xs); }
.u-lp .u-lpd-prog { display: grid; gap: 6px; margin-block-start: 12px; }
.u-lp .u-lpd-prog__h { display: flex; justify-content: space-between; font-size: var(--u-t-2xs); color: var(--u-ink-3); }
.u-lp .u-lpd-prog .u-progress { height: 6px; }
.u-lp .u-lpd-prog .u-progress__bar { width: 12.5%; transition: width 0.8s var(--u-ease); }
.u-lp .u-lp-demo.s4 .u-lpd-prog .u-progress__bar { width: 18.75%; }
.u-lp .u-lpd-weeks { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-block-start: 10px; }
.u-lp .u-lpd-weeks span { height: 18px; border-radius: 4px; background: var(--u-surface-3); }
.u-lp .u-lpd-weeks span.is-done { background: var(--u-accent); }
.u-lp .u-lpd-weeks span.is-now { background: var(--u-accent-soft); box-shadow: inset 0 0 0 1.5px var(--u-accent); }
.u-lp .u-lp-demo.s4 .u-lpd-weeks span.is-now { background: var(--u-accent); }
.u-lp .u-lpd-tasks { display: grid; align-content: start; gap: 6px; }
.u-lp .u-lpd-tasks__h { margin: 0 0 2px; font-size: var(--u-t-2xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--u-ink-3); }
.u-lp .u-lpd-task { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--u-line); border-radius: var(--u-r-md); font-size: var(--u-t-sm); color: var(--u-ink); transition: border-color 0.3s, background 0.3s, color 0.3s; }
.u-lp .u-lpd-task > .u-i { color: var(--u-ink-3); }
.u-lp .u-lpd-task__check { margin-inline-start: auto; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--u-line-strong); color: transparent; transition: background 0.3s, border-color 0.3s, color 0.3s; }
.u-lp .u-lpd-task__check .u-i { width: 11px; height: 11px; stroke-width: 3; }
.u-lp .u-lp-demo.s1 .u-lpd-task.k1, .u-lp .u-lp-demo.s2 .u-lpd-task.k2, .u-lp .u-lp-demo.s3 .u-lpd-task.k3 { border-color: var(--u-accent-line); background: var(--u-accent-soft); }
.u-lp .u-lp-demo.s1 .u-lpd-task.k1 .u-lpd-task__check,
.u-lp .u-lp-demo.s2 .u-lpd-task.k2 .u-lpd-task__check,
.u-lp .u-lp-demo.s3 .u-lpd-task.k3 .u-lpd-task__check { border-color: var(--u-accent); background: var(--u-accent); color: var(--u-on-accent); }
.u-lp .u-lpd-paperline { margin-block-start: 10px; padding: 8px 10px; border-radius: var(--u-r-md); background: var(--u-bg); }
.u-lp .u-lpd-paperline__t { font-size: var(--u-t-xs); font-weight: 600; line-height: 1.3; color: var(--u-ink); }
.u-lp .u-lpd-paperline__m { margin-block-start: 2px; font-size: var(--u-t-2xs); color: var(--u-ink-3); }

/* Grid views never grow past their window (long nowrap lines would otherwise widen them). */
.u-lp .u-lpd-upload, .u-lp .u-lpd-lib, .u-lp .u-lpd-note, .u-lp .u-lpd-study, .u-lp .u-lpd-disc, .u-lp .u-lpd-tasks { grid-template-columns: minmax(0, 1fr); }

/* Per-demo touches */
.u-lp .u-lpd-chat .u-lpd-sample { inset-block-end: auto; inset-block-start: 12px; inset-inline-end: auto; inset-inline-start: 12px; }
/* Chat: after sending, the composer compacts and the thread scrolls up as the answer grows. */
.u-lp .u-lpd-log { transition: transform 0.8s var(--u-ease); }
.u-lp .u-lp-demo.s4 .u-lpd-log { transform: translateY(-52px); }
.u-lp .u-lp-demo.s5 .u-lpd-log { transform: translateY(-128px); }
.u-lp .u-lpd-composer { position: relative; z-index: 3; }
.u-lp .u-lpd-composer__row { transition: opacity 0.3s; }
.u-lp .u-lp-demo.s2 .u-lpd-composer__row { display: none; }
.u-lp .u-lp-demo.s2 .u-lpd-composer__input { min-height: 0; }
.u-lp .u-lp-demo.s2 .u-lpd-press { transform: scale(0.96); box-shadow: var(--u-ring); }
.u-lp .u-lp-demo.s3 .u-lpd-press { transform: none; }

/* ===================================================================== */
/* Phone variant (flag landing-v3-phone-demos = phone)                    */
/* ===================================================================== */
/* The canvas widens from 440×440 to data-phone-w×data-phone-h and the phone overlaps the window's
   lower corner. Control never shows the phone, so its layout is unchanged. */
.u-lp .u-lp-demo--sq { width: 440px; height: 440px; }
.u-lp .u-lpd-phone { display: none; }
.u-lp .u-lp-alsophone { display: none; }
html.ui3.u-lp.lp-phone-demos .u-lp-demo-fit[data-phone-w] { aspect-ratio: 560 / 460; }
html.ui3.u-lp.lp-phone-demos .u-lp-demo-fit[data-phone-w] > .u-lp-demo--sq { width: 560px; height: 460px; padding: 18px; }
html.ui3.u-lp.lp-phone-demos .u-lp-demo--sq > .u-lpd-win { width: 404px; height: 404px; }
html.ui3.u-lp.lp-phone-demos .u-lp-demo--sq > .u-lpd-phone { display: block; }
html.ui3.u-lp.lp-phone-demos .u-lp-alsophone {
  display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 0;
  font-size: var(--u-t-sm); font-weight: 500; color: var(--u-ink-2);
}
html.ui3.u-lp.lp-phone-demos .u-lp-alsophone .u-i { color: var(--u-accent); }

/* Phone shell: a modern handset (outer 182×384 in demo units). */
.u-lp .u-lpd-phone {
  position: absolute; z-index: 8;
  inset-inline-end: 14px; inset-block-end: 10px;
  width: 182px; height: 384px; padding: 7px;
  border-radius: 34px; background: var(--u-lpd-phone-frame);
  box-shadow: var(--u-lpd-phone-shadow);
}
.u-lp .u-lpd-phone__screen { position: relative; width: 168px; height: 370px; overflow: hidden; border-radius: 27px; background: var(--u-bg); }

/* ---------- Native app (medisummary-mobile, ui-v3) at its real size, scaled into the screen ----------
   390 × 859 pt scaled by 168/390. Values follow src/theme (tokens, typography, spacing) of the app. */
.u-lp .u-lpa {
  position: absolute; inset-block-start: 0; inset-inline-start: 0;
  width: 390px; height: 859px; overflow: hidden;
  transform: scale(0.43077); transform-origin: top left;
  background: var(--u-bg); color: var(--u-ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  font-size: 15px; line-height: 21px; text-align: start;
}
/* inset-inline-start already anchors to the right edge in RTL; only the scale origin flips. */
.u-lp[dir="rtl"] .u-lpa { transform-origin: top right; }
.u-lp .u-lpa .u-i { width: 1em; height: 1em; }
.u-lp .u-lpa__surface { background: var(--u-surface); }
.u-lp .u-lpa__view { position: absolute; inset: 0; display: flex; flex-direction: column; }
.u-lp .u-lpa__status { display: flex; align-items: center; justify-content: space-between; flex: none; height: 54px; padding-block: 18px 0; padding-inline: 46px 34px; font-size: 17px; font-weight: 600; }
.u-lp .u-lpa__status .u-lpa__glyphs { display: inline-flex; align-items: center; gap: 6px; font-size: 17px; }
.u-lp .u-lpa__island { position: absolute; z-index: 9; inset-block-start: 11px; inset-inline-start: 132px; width: 126px; height: 37px; border-radius: 20px; background: var(--u-lpd-phone-frame); }
.u-lp .u-lpa__scroll { flex: 1; min-height: 0; overflow: hidden; position: relative; }

/* TabHeader: large title */
.u-lp .u-lpa-th { display: flex; align-items: center; gap: 12px; padding: 8px 20px 12px; }
.u-lp .u-lpa-th__text { flex: 1; min-width: 0; }
.u-lp .u-lpa-th__title { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-lp .u-lpa-th__sub { margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--u-ink-3); }
.u-lp .u-lpa-ib { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none; font-size: 20px; }
.u-lp .u-lpa-ib--primary { background: var(--u-ink); color: var(--u-on-ink); }
.u-lp .u-lpa-ib--secondary { background: var(--u-surface); border: 1px solid var(--u-line); color: var(--u-ink); font-size: 18px; }
.u-lp .u-lpa-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none; background: var(--u-accent-soft); border: 1px solid var(--u-accent-line); color: var(--u-accent-ink); font-size: 12px; font-weight: 600; }

/* Floating iOS tab bar (hub on): Research · Home · Notes + search */
.u-lp .u-lpa-tabs { position: absolute; z-index: 6; inset-inline: 16px; inset-block-end: 34px; display: flex; gap: 10px; }
.u-lp .u-lpa-tabs__pill { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); height: 62px; padding: 6px; border-radius: 31px; background: var(--u-lpd-glass); box-shadow: var(--u-lpd-tab-shadow); }
.u-lp .u-lpa-tab { display: grid; justify-items: center; align-content: center; gap: 2px; font-size: 10.5px; font-weight: 500; color: var(--u-ink-3); border-radius: 24px; }
.u-lp .u-lpa-tab .u-i { font-size: 24px; }
.u-lp .u-lpa-tab.is-on .u-i { color: var(--u-accent); }
.u-lp .u-lpa-tab.is-on { background: var(--u-lpd-tab-on); }
.u-lp .u-lpa-tabs__search { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: var(--u-lpd-glass); box-shadow: var(--u-lpd-tab-shadow); color: var(--u-ink-2); font-size: 22px; }

/* Research list */
.u-lp .u-lpa-search { display: flex; align-items: center; gap: 8px; height: 40px; margin: 0 20px 12px; padding: 0 12px; border-radius: 12px; background: var(--u-surface-2); color: var(--u-ink-4); font-size: 15px; }
.u-lp .u-lpa-search .u-i { font-size: 16px; }
.u-lp .u-lpa-chips { display: flex; gap: 8px; padding: 0 20px 12px; }
.u-lp .u-lpa-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--u-surface); border: 1px solid var(--u-line); color: var(--u-ink-2); font-size: 13px; font-weight: 500; white-space: nowrap; }
.u-lp .u-lpa-chip.is-on { background: var(--u-ink); border-color: var(--u-ink); color: var(--u-on-ink); }
.u-lp .u-lpa-chip .u-i { font-size: 14px; }
.u-lp .u-lpa-group { padding: 20px 20px 4px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.2px; color: var(--u-ink-3); }
.u-lp .u-lpa-list { padding: 0 20px; }
.u-lp .u-lpa-pc { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--u-line); }
.u-lp .u-lpa-pc__thumb { position: relative; flex: none; width: 60px; height: 78px; border-radius: 8px; background: var(--u-surface-2); border: 1px solid var(--u-line); display: grid; place-items: center; color: var(--u-ink-4); font-size: 20px; }
.u-lp .u-lpa-pc__thumb .u-lpa-pdf { position: absolute; inset: 8px 7px; display: grid; align-content: start; gap: 5px; }
.u-lp .u-lpa-pc__thumb .u-lpa-pdf i { display: block; height: 3px; border-radius: 2px; background: var(--u-line-strong); }
.u-lp .u-lpa-pc__thumb .u-lpa-pdf i:first-child { height: 6px; width: 80%; background: var(--u-ink-4); }
.u-lp .u-lpa-spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--u-line-strong); border-top-color: var(--u-ink-3); animation: u-spin 0.8s linear infinite; }
.u-lp .u-lpa-spin--xs { width: 12px; height: 12px; border-width: 2px; border-top-color: var(--u-warn); }
.u-lp .u-lpa-pc__play { position: absolute; inset-inline-end: -8px; inset-block-end: -8px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--u-ink); border: 2px solid var(--u-surface); color: var(--u-on-ink); font-size: 13px; }
.u-lp .u-lpa-pc__body { flex: 1; min-width: 0; display: grid; align-content: start; gap: 4px; }
.u-lp .u-lpa-pc__title { font-size: 16px; line-height: 21px; font-weight: 600; letter-spacing: -0.1px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.u-lp .u-lpa-pc__meta { display: flex; align-items: center; gap: 5px; font-size: 12px; line-height: 16px; color: var(--u-ink-3); }
.u-lp .u-lpa-pc__meta .u-lpa-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--u-ink-4); }
.u-lp .u-lpa-pc__status { display: inline-flex; align-items: center; gap: 4px; color: var(--u-warn); }
.u-lp .u-lpa-pc__bullets { display: grid; gap: 4px; margin-top: 4px; }
.u-lp .u-lpa-pc__bullets span { position: relative; padding-inline-start: 12px; font-size: 13px; line-height: 18px; color: var(--u-ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.u-lp .u-lpa-pc__bullets span::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: 7px; width: 4px; height: 4px; border-radius: 2px; background: var(--u-ink-4); }
.u-lp .u-lpa-pc--new { transition: opacity 0.4s; }
/* Mini-player floating above the tab bar */
.u-lp .u-lpa-mini {
  position: absolute; z-index: 7; inset-inline: 16px; inset-block-end: 104px;
  display: flex; align-items: center; gap: 8px; height: 60px; padding-inline: 8px 10px; overflow: hidden;
  border-radius: 20px; background: var(--u-surface); border: 1px solid var(--u-line); box-shadow: var(--u-lpd-mini-shadow);
}
.u-lp .u-lpa-mini__art { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 8px; background: var(--u-accent-soft); color: var(--u-accent-ink); font-size: 18px; }
.u-lp .u-lpa-mini__text { flex: 1; min-width: 0; margin-inline-start: 2px; }
.u-lp .u-lpa-mini__title { font-size: 13px; line-height: 18px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-lp .u-lpa-mini__sub { font-size: 12px; line-height: 16px; color: var(--u-ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.u-lp .u-lpa-mini__btn { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--u-ink); color: var(--u-on-ink); font-size: 17px; }
.u-lp .u-lpa-mini__prog { position: absolute; inset-inline: 0; inset-block-end: 0; height: 2px; background: var(--u-line); }
.u-lp .u-lpa-mini__prog i { display: block; height: 100%; width: 0; background: var(--u-ink-2); transition: width 3.4s linear; }
.u-lp .u-lp-demo.s5 .u-lpa-mini__prog i { width: 36%; }

/* Recorder (full-screen modal) */
.u-lp .u-lpa-mh { position: relative; display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 16px; font-size: 17px; font-weight: 600; }
.u-lp .u-lpa-mh__close { position: absolute; inset-inline-end: 16px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--u-surface-2); color: var(--u-ink-2); font-size: 17px; }
.u-lp .u-lpa-rec { display: grid; justify-items: center; padding: 40px 20px 0; text-align: center; }
.u-lp .u-lpa-rec__status { position: relative; height: 22px; margin-bottom: 8px; font-size: 13px; line-height: 22px; }
.u-lp .u-lpa-rec__status > span { display: inline-flex; align-items: center; gap: 8px; }
.u-lp .u-lpa-rec__idle { color: var(--u-ink-3); font-weight: 500; }
.u-lp .u-lpa-rec__live { color: var(--u-rec); font-weight: 600; }
.u-lp .u-lpa-rec__live i { width: 8px; height: 8px; border-radius: 50%; background: var(--u-rec); animation: u-pulse 1.4s var(--u-ease) infinite; }
.u-lp .u-lpa-rec__timer { font-size: 64px; line-height: 76px; font-weight: 200; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.u-lp .u-lpa-rec__left { margin: 4px 0 16px; font-size: 12px; line-height: 16px; color: var(--u-ink-3); font-variant-numeric: tabular-nums; }
.u-lp .u-lpa-rec__limit { width: 60%; height: 3px; border-radius: 999px; background: var(--u-surface-3); overflow: hidden; }
.u-lp .u-lpa-rec__limit i { display: block; width: 1%; height: 100%; background: var(--u-ink-2); }
.u-lp .u-lpa-wave { display: flex; align-items: center; justify-content: center; gap: 3px; height: 60px; margin: 16px 0; }
.u-lp .u-lpa-wave span { width: 3px; height: 6px; border-radius: 2px; background: var(--u-ink-4); }
.u-lp .u-lp-demo.s2 .u-lpa-wave span { background: var(--u-rec); animation: u-lpa-level 0.7s var(--u-ease) infinite alternate; }
.u-lp .u-lpa-wave span:nth-child(3n) { animation-delay: -0.25s; animation-duration: 0.55s; }
.u-lp .u-lpa-wave span:nth-child(3n + 1) { animation-delay: -0.4s; animation-duration: 0.85s; }
.u-lp .u-lpa-wave span:nth-child(4n) { animation-delay: -0.15s; }
@keyframes u-lpa-level { from { height: 6px; } to { height: 46px; } }
.u-lp .u-lpa-rec__hint { padding: 0 20px; margin-bottom: 20px; font-size: 12px; line-height: 16px; color: var(--u-ink-4); }
.u-lp .u-lpa-mic { display: grid; place-items: center; width: 96px; height: 96px; padding: 5px; border-radius: 50%; border: 3px solid var(--u-line-strong); }
.u-lp .u-lpa-mic > span { position: relative; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--u-rec); color: var(--u-on-accent); font-size: 36px; transition: background 0.25s; }
.u-lp .u-lpa-mic .u-lpa-mic__pause { position: absolute; opacity: 0; color: var(--u-rec); transition: opacity 0.2s; }
.u-lp .u-lp-demo.s2 .u-lpa-mic > span { background: var(--u-surface); border: 1px solid var(--u-line); box-shadow: var(--u-sh-md); }
.u-lp .u-lp-demo.s2 .u-lpa-mic .u-lpa-mic__mic { opacity: 0; }
.u-lp .u-lp-demo.s2 .u-lpa-mic .u-lpa-mic__pause { opacity: 1; }
.u-lp .u-lpa-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.u-lp .u-lpa-btn .u-i { font-size: 17px; }
.u-lp .u-lpa-btn--secondary { min-width: 140px; margin-top: 20px; background: var(--u-surface); border: 1px solid var(--u-line); box-shadow: var(--u-sh-xs); color: var(--u-ink); }
.u-lp .u-lpa-btn--accent { background: var(--u-accent); color: var(--u-on-accent); }
.u-lp .u-lpa-btn--primary-sm { height: 34px; padding: 0 12px; border-radius: 8px; gap: 6px; background: var(--u-ink); color: var(--u-on-ink); font-size: 13px; }
.u-lp .u-lpa-btn--primary-sm .u-i { font-size: 15px; }
/* Note detail */
.u-lp .u-lpa-nd__bar { display: flex; align-items: center; gap: 4px; min-height: 52px; padding: 0 8px; }
.u-lp .u-lpa-nd__bar > .u-i { font-size: 24px; margin: 0 8px; }
.u-lp .u-lpa-nd__bar .u-lpa-sp { flex: 1; }
.u-lp .u-lpa-nd__more { display: grid; place-items: center; width: 40px; height: 40px; font-size: 21px; color: var(--u-ink); }
.u-lp .u-lpa-nd { padding: 8px 20px 0; }
.u-lp .u-lpa-nd__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; color: var(--u-ink-3); }
.u-lp .u-lpa-nd__src { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: var(--u-surface-2); font-weight: 500; }
.u-lp .u-lpa-nd__title { font-size: 25px; line-height: 31px; font-weight: 700; letter-spacing: -0.5px; }
.u-lp .u-lpa-nd__listen { margin-top: 16px; }
.u-lp .u-lpa-md { margin-top: 20px; font-family: var(--u-font-read); font-size: 17px; line-height: 28px; color: var(--u-ink-2); }
.u-lp .u-lpa-md h2 { margin: 16px 0 6px; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif; font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -0.3px; color: var(--u-ink); }
.u-lp .u-lpa-md h2:first-child { margin-top: 0; }
.u-lp .u-lpa-md p { margin: 0; }
.u-lp .u-lpa-wait { display: grid; justify-items: center; align-content: center; gap: 12px; height: 100%; font-size: 13px; color: var(--u-ink-3); }

/* Chat (Home tab) */
.u-lp .u-lpa-log { padding: 16px 0; }
.u-lp .u-lpa-user { display: flex; justify-content: flex-end; padding: 0 16px; margin-bottom: 20px; }
.u-lp .u-lpa-user > div { max-width: 85%; padding: 10px 14px; border-radius: 18px; border-end-end-radius: 6px; background: var(--u-surface-2); font-size: 15px; line-height: 23px; }
.u-lp .u-lpa-ai { position: relative; padding: 0 20px; }
.u-lp .u-lpa-ai__head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.u-lp .u-lpa-ai__mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--u-accent); color: var(--u-on-accent); font-size: 12px; }
.u-lp .u-lpa-kt { margin-bottom: 18px; padding: 14px 16px 12px; border-radius: 12px; background: var(--u-accent-soft); border: 1px solid var(--u-accent-line); }
.u-lp .u-lpa-kt__h { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 12px; font-weight: 600; color: var(--u-accent-ink); }
.u-lp .u-lpa-kt__b { font-size: 16px; line-height: 25px; font-weight: 500; }
.u-lp .u-lpa-ans { font-family: var(--u-font-read); font-size: 16px; line-height: 27px; color: var(--u-ink-2); }
.u-lp .u-lpa-cite { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif; font-size: 12px; font-weight: 600; color: var(--u-accent-ink); }
.u-lp .u-lpa-refs { display: inline-flex; align-items: center; gap: 6px; height: 28px; margin-top: 18px; font-size: 12px; font-weight: 500; color: var(--u-ink-3); }
.u-lp .u-lpa-refs .u-i { font-size: 13px; }
.u-lp .u-lpa-think { padding: 14px 16px; border-radius: 12px; background: var(--u-surface); border: 1px solid var(--u-line); box-shadow: var(--u-sh-xs); }
.u-lp .u-lpa-think__l { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.u-lp .u-lpa-think__bar { height: 3px; margin: 12px 0 10px; border-radius: 999px; background: var(--u-surface-3); overflow: hidden; }
.u-lp .u-lpa-think__bar i { display: block; height: 100%; width: 0; background: var(--u-accent); transition: width 2s var(--u-ease); }
.u-lp .u-lp-demo.s2 .u-lpa-think__bar i { width: 85%; }
.u-lp .u-lpa-think__sk { display: grid; gap: 8px; }
.u-lp .u-lpa-think__sk i { display: block; height: 8px; border-radius: 999px; background: var(--u-surface-2); }
.u-lp .u-lpa-think__sk i:nth-child(2) { width: 80%; }
.u-lp .u-lpa-composer { position: absolute; z-index: 5; inset-inline: 16px; inset-block-end: 108px; padding: 8px; border-radius: 24px; background: var(--u-surface); border: 1px solid var(--u-line); box-shadow: var(--u-sh-sm); }
.u-lp .u-lpa-composer__in { min-height: 30px; padding: 4px 8px; font-size: 16px; line-height: 22px; color: var(--u-ink); }
.u-lp .u-lpa-composer__ph { color: var(--u-ink-4); }
.u-lp .u-lp-demo.s1 .u-lpa-composer__ph, .u-lp .u-lp-demo.s2 .u-lpa-composer__typed { display: none; }
.u-lp .u-lp-demo.s2 .u-lpa-composer__ph { display: inline; }
.u-lp .u-lpa-composer__row { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.u-lp .u-lpa-composer__add { display: grid; place-items: center; width: 36px; height: 36px; font-size: 22px; color: var(--u-ink-2); }
.u-lp .u-lpa-composer__deep { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--u-accent-ink); }
.u-lp .u-lpa-switch { position: relative; width: 30px; height: 18px; border-radius: 9px; background: var(--u-accent); }
.u-lp .u-lpa-switch::after { content: ""; position: absolute; inset-block-start: 2px; inset-inline-end: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--u-surface); }
.u-lp .u-lpa-composer__deep .u-i { font-size: 15px; color: var(--u-accent); }
.u-lp .u-lpa-composer__send { margin-inline-start: auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--u-surface-3); color: var(--u-ink-4); font-size: 19px; transition: background 0.2s, color 0.2s; }
.u-lp .u-lp-demo.s1 .u-lpa-composer__send { background: var(--u-ink); color: var(--u-on-ink); }
.u-lp .u-lp-demo.s2 .u-lpa-composer__send { background: var(--u-surface-3); color: var(--u-ink-4); }

/* ---------- Reduced motion: final frame, no loops ---------- */
@media (prefers-reduced-motion: reduce) {
  .u-lp .u-lp-demo *,
  .u-lp .u-lp-demo *::before,
  .u-lp .u-lp-demo *::after { animation: none; transition: none; }
  .u-lp .u-lpd-cursor { display: none; }
}
