/* ==========================================================================
   OmniPad — marketing landing page (liquid glass)
   Tokens → base → background → nav → hero → form → demo → pain → tools →
   circle-to-ask → FAQ → CTA → footer → utilities
   ========================================================================== */

:root {
  --paper: #F4F5F3;
  --paper-2: #FFFFFF;
  --paper-3: #E9EBE8;
  --ink: #141922;
  --ink-2: #3A414E;
  --muted: #5E6672;
  --line: #D9DDE2;
  --line-2: #E7EAEE;

  --cobalt: #2A4DD0;
  --cobalt-2: #1F3DB0;
  --cobalt-soft: #E4E9FB;
  --lime: #E4F55A;
  --lime-ink: #55600A;
  --peach: #FFB59B;

  --btn-fg: #FFFFFF;

  /* Liquid glass */
  --glass: rgba(255, 255, 255, 0.52);
  --glass-2: rgba(255, 255, 255, 0.70);
  --glass-line: rgba(255, 255, 255, 0.72);
  --spec: rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 24px 60px -30px rgba(20, 25, 36, 0.28);
  --shadow-1: 0 1px 2px rgba(20, 25, 36, 0.05), 0 12px 32px -18px rgba(20, 25, 36, 0.18);
  --dot: rgba(20, 25, 36, 0.13);

  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-hand: "Caveat", "Bradley Hand", "Comic Sans MS", cursive;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  --radius: 22px;
  --radius-lg: 30px;
  --measure: 1180px;
  --gutter: clamp(18px, 4vw, 40px);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1116;
    --paper-2: #161A21;
    --paper-3: #1D222B;
    --ink: #EDEFF3;
    --ink-2: #C8CDD6;
    --muted: #98A1AD;
    --line: #2A303A;
    --line-2: #20252E;
    --cobalt: #7C93FF;
    --cobalt-2: #97A9FF;
    --cobalt-soft: #1A2140;
    --lime: #D9EE45;
    --lime-ink: #EAF58F;
    --peach: #B9654A;
    --btn-fg: #0E1116;
    --glass: rgba(255, 255, 255, 0.055);
    --glass-2: rgba(255, 255, 255, 0.09);
    --glass-line: rgba(255, 255, 255, 0.12);
    --spec: rgba(255, 255, 255, 0.22);
    --glass-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.7);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px -18px rgba(0, 0, 0, 0.7);
    --dot: rgba(237, 239, 243, 0.12);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0E1116;
  --paper-2: #161A21;
  --paper-3: #1D222B;
  --ink: #EDEFF3;
  --ink-2: #C8CDD6;
  --muted: #98A1AD;
  --line: #2A303A;
  --line-2: #20252E;
  --cobalt: #7C93FF;
  --cobalt-2: #97A9FF;
  --cobalt-soft: #1A2140;
  --lime: #D9EE45;
  --lime-ink: #EAF58F;
  --peach: #B9654A;
  --btn-fg: #0E1116;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.09);
  --glass-line: rgba(255, 255, 255, 0.12);
  --spec: rgba(255, 255, 255, 0.22);
  --glass-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.7);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px -18px rgba(0, 0, 0, 0.7);
  --dot: rgba(237, 239, 243, 0.12);
  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.9rem); letter-spacing: -0.035em; line-height: 0.98; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0; }
.lede { font-size: clamp(1.05rem, 1.4vw, 1.22rem); color: var(--ink-2); max-width: 34em; text-wrap: pretty; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--lime); border-radius: 2px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--measure)); margin-inline: auto; }
.section { padding-block: clamp(60px, 8vw, 110px); }
.section-head { display: grid; gap: 14px; max-width: 42em; margin-bottom: clamp(24px, 4vw, 44px); }
.section-head.center { justify-items: center; text-align: center; margin-inline: auto; }

/* Marker highlight, drawn in on load */
.mark { position: relative; display: inline-block; white-space: nowrap; }
.mark::before {
  content: ""; position: absolute; z-index: -1; left: -0.08em; right: -0.08em; top: 0.52em; bottom: 0.02em;
  background: var(--lime); border-radius: 0.2em 0.5em 0.25em 0.6em / 0.6em 0.3em 0.6em 0.3em;
  transform-origin: left center; opacity: 0.9;
}
.js .mark::before { animation: sweep 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s both; }
@keyframes sweep { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* --------------------------------------------------------------------------
   Liquid glass primitives
   -------------------------------------------------------------------------- */
.glass {
  position: relative;
  background: linear-gradient(135deg, var(--glass-2), var(--glass));
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--spec), inset 1px 0 0 rgba(255, 255, 255, 0.35), inset 0 -1px 0 rgba(20, 25, 36, 0.04), 0 1px 2px rgba(20, 25, 36, 0.04), var(--glass-shadow);
}
.glass::before { /* specular sheen along the top edge */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 60% at 15% -10%, rgba(255, 255, 255, 0.55), transparent 60%);
  opacity: 0.9;
}
:root[data-theme="dark"] .glass::before { opacity: 0.18; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .glass::before { opacity: 0.18; } }
.glass > * { position: relative; }

/* Ambient colour behind the glass — gradients on the body itself (no fixed layers, no filters),
   tiled down the page so every glass panel has colour to refract */
body {
  background-image:
    radial-gradient(52vw 46vw at 8% 6%, color-mix(in srgb, var(--lime) 40%, transparent), transparent 70%),
    radial-gradient(46vw 44vw at 96% 30%, color-mix(in srgb, var(--cobalt) 20%, transparent), transparent 70%),
    radial-gradient(44vw 40vw at 40% 92%, color-mix(in srgb, var(--peach) 36%, transparent), transparent 70%);
  background-size: 100% 1600px;
  background-repeat: repeat-y;
}
.bg { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; font-size: 0.98rem; letter-spacing: -0.005em; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn-primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--cobalt) 82%, white), var(--cobalt));
  color: var(--btn-fg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 10px 24px -12px var(--cobalt);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-primary:active { transform: translateY(0); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.9rem; }

/* --------------------------------------------------------------------------
   Nav — a floating glass pill
   -------------------------------------------------------------------------- */
.nav { position: sticky; top: 12px; z-index: 50; padding: 0 var(--gutter); }
.nav-inner { display: flex; align-items: center; gap: 22px; min-height: 58px; padding: 0 8px 0 18px; border-radius: 999px; max-width: var(--measure); margin-inline: auto; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.03em; }
.wordmark .logo { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--ink); color: var(--paper); }
.wordmark .logo svg { width: 16px; height: 16px; }
.nav-links { display: flex; gap: 2px; margin-left: 6px; }
.nav-links a { padding: 8px 12px; border-radius: 999px; font-size: 0.95rem; font-weight: 500; color: var(--ink-2); transition: background-color 0.15s ease; }
.nav-links a:hover { background: var(--glass-2); color: var(--ink); }
.nav-cta { margin-left: auto; }
@media (max-width: 800px) { .nav-links { display: none; } .nav { top: 8px; } }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(60px, 9vw, 120px); padding-bottom: clamp(36px, 5vw, 64px); margin-top: -70px; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.35) 55%, transparent 92%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.35) 55%, transparent 92%);
}
.hero-inner { position: relative; z-index: 1; text-align: center; display: grid; justify-items: center; gap: 22px; padding-top: 70px; }
.hero h1 { max-width: 22ch; }
.hero .lede { max-width: 32em; margin-inline: auto; }
.hero-note { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--muted); }
.hero-note .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 30%, transparent); }

.tiles { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.tile {
  position: absolute; width: 74px; height: 74px; border-radius: 22px; display: grid; place-items: center; color: #fff;
  box-shadow: 0 18px 40px -18px rgba(20, 25, 36, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -8px 16px rgba(0, 0, 0, 0.12);
  animation: float var(--dur, 6s) ease-in-out var(--delay, 0s) infinite alternate;
  transform: rotate(var(--rot, 0deg));
}
.tile::after { content: ""; position: absolute; inset: 1px; border-radius: inherit; background: linear-gradient(160deg, rgba(255,255,255,0.35), transparent 45%); }
.tile svg { width: 34px; height: 34px; position: relative; }
.tile.t-pdf { background: linear-gradient(160deg, #FF7A59, #E0432A); left: 9%; top: 30%; --rot: -10deg; --dur: 6.5s; }
.tile.t-yt { background: linear-gradient(160deg, #FF5A5F, #C81E2B); right: 9%; top: 24%; --rot: 8deg; --dur: 7.5s; --delay: -2s; }
.tile.t-calc { background: linear-gradient(160deg, #2B3240, #121620); left: 15%; bottom: 16%; --rot: 7deg; --dur: 8s; --delay: -1s; }
.tile.t-calc svg { color: var(--lime); }
.tile.t-ai { background: linear-gradient(160deg, #4E6BFF, #2A4DD0); right: 13%; bottom: 18%; --rot: -8deg; --dur: 7s; --delay: -3s; }
.tile.t-web { background: linear-gradient(160deg, #2CC6A8, #138F79); left: 30%; top: 16%; width: 56px; height: 56px; border-radius: 17px; --rot: 12deg; --dur: 9s; --delay: -4s; }
.tile.t-web svg { width: 26px; height: 26px; }
@keyframes float { from { transform: rotate(var(--rot, 0deg)) translateY(0); } to { transform: rotate(calc(var(--rot, 0deg) + 3deg)) translateY(-14px); } }
@media (max-width: 900px) {
  .tile { width: 56px; height: 56px; border-radius: 17px; }
  .tile svg { width: 26px; height: 26px; }
  .tile.t-pdf { left: 4%; top: 18%; }
  .tile.t-yt { right: 5%; top: 16%; }
  .tile.t-calc { left: 6%; bottom: 8%; }
  .tile.t-ai { right: 6%; bottom: 10%; }
  .tile.t-web { display: none; }
}
@media (max-width: 600px) {
  .hero { padding-top: 56px; }
  .hero-inner { padding-top: 124px; }
  .tile { width: 46px; height: 46px; border-radius: 14px; }
  .tile svg { width: 22px; height: 22px; }
  .tile.t-pdf { left: 6%; top: 128px; }
  .tile.t-calc { left: 30%; top: 100px; bottom: auto; }
  .tile.t-ai { right: 30%; top: 108px; bottom: auto; }
  .tile.t-yt { right: 6%; top: 132px; }
}
.js .hero-inner > * { animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.js .hero-inner > *:nth-child(2) { animation-delay: 0.06s; }
.js .hero-inner > *:nth-child(3) { animation-delay: 0.12s; }
.js .hero-inner > *:nth-child(4) { animation-delay: 0.18s; }
.js .hero-inner > *:nth-child(5) { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   Waitlist form
   -------------------------------------------------------------------------- */
.waitlist { width: 100%; max-width: 520px; display: grid; gap: 10px; text-align: left; }
.wl-row { display: flex; gap: 8px; padding: 6px; border-radius: 999px; transition: box-shadow 0.15s ease; }
.wl-row:focus-within { box-shadow: inset 0 1px 0 var(--spec), 0 0 0 4px color-mix(in srgb, var(--cobalt) 18%, transparent), var(--glass-shadow); }
.waitlist.is-invalid .wl-row { box-shadow: inset 0 1px 0 var(--spec), 0 0 0 3px rgba(210, 64, 47, 0.35), var(--glass-shadow); }
.wl-row input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 14px 0 18px; font-size: 1rem; outline: none; color: var(--ink); }
.wl-row input::placeholder { color: var(--muted); }
.wl-row .btn { flex: none; }
.wl-msg { font-size: 0.9rem; color: var(--muted); min-height: 1.4em; padding-left: 18px; }
.waitlist.is-invalid .wl-msg, .waitlist.is-error .wl-msg { color: #C6392A; }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; opacity: 0; }
.wl-done { display: none; align-items: flex-start; gap: 14px; padding: 16px 18px; border-radius: 24px; }
.wl-done .tick { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--lime-ink); }
.wl-done .tick svg { width: 18px; height: 18px; }
.wl-done strong { display: block; font-family: var(--font-display); font-size: 1.05rem; letter-spacing: -0.01em; }
.wl-done p { color: var(--ink-2); font-size: 0.95rem; }
.wl-done button { color: var(--cobalt); font-weight: 600; font-size: 0.9rem; margin-top: 4px; }
.waitlist.is-success .wl-row, .waitlist.is-success .wl-msg { display: none; }
.waitlist.is-success .wl-done { display: flex; animation: rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.waitlist.is-submitting .btn { opacity: 0.85; pointer-events: none; }
@media (max-width: 520px) {
  .wl-row { flex-direction: column; border-radius: 24px; padding: 8px; }
  .wl-row input { padding: 12px 12px 6px; }
  .wl-row .btn { width: 100%; }
}

/* --------------------------------------------------------------------------
   Demo: tabs with a liquid timer, then the tablet stage
   -------------------------------------------------------------------------- */
:root { --sweep: var(--lime); --tab-on: #FFFFFF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sweep: rgba(124, 147, 255, 0.42); --tab-on: #262C36; } }
:root[data-theme="dark"] { --sweep: rgba(124, 147, 255, 0.42); --tab-on: #262C36; }

.demo { padding-top: clamp(40px, 6vw, 72px); }
.demo .section-head { margin-bottom: 22px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 18px; padding: 5px; border-radius: 999px; width: max-content; max-width: 100%; }
.tab {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 12px; border-radius: 999px;
  font-weight: 600; font-size: 0.92rem; color: var(--muted);
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.tab svg { width: 16px; height: 16px; flex: none; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); background: var(--tab-on); box-shadow: 0 1px 2px rgba(20, 25, 36, 0.06), 0 8px 20px -12px rgba(20, 25, 36, 0.35), inset 0 1px 0 var(--spec); }
.tab::before { /* the timer: a liquid fill sweeping across the whole tab, icon included */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(90deg, var(--sweep), color-mix(in srgb, var(--sweep) 75%, transparent));
  transform: scaleX(0); transform-origin: left center;
}
.tab.is-playing::before { animation: sweepfill var(--dur, 7s) linear forwards; }
@keyframes sweepfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 640px) {
  .tabs { width: 100%; display: grid; grid-template-columns: 1fr 1fr; border-radius: 22px; }
  .tab { justify-content: center; padding: 10px 10px; font-size: 0.86rem; }
}
.demo-hint { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: 0.9rem; color: var(--muted); }
.demo-hint span { display: inline-flex; align-items: center; gap: 7px; }

.stage-wrap {
  --W: 1180; --H: 800; --bz: 18; --s: 1;
  position: relative; width: 100%;
  aspect-ratio: calc(var(--W) + 2 * var(--bz)) / calc(var(--H) + 2 * var(--bz));
}
.stage-wrap::before { /* glow under the device */
  content: ""; position: absolute; inset: 10% -4% -6%; z-index: -1; pointer-events: none; border-radius: 50%;
  background: radial-gradient(60% 60% at 50% 50%, color-mix(in srgb, var(--cobalt) 22%, transparent), transparent 70%);
  filter: blur(40px);
}
.stage-wrap.tall { --W: 640; --H: 860; --bz: 16; }
.ipad {
  position: absolute; left: 0; top: 0;
  width: calc((var(--W) + 2 * var(--bz)) * 1px); height: calc((var(--H) + 2 * var(--bz)) * 1px);
  transform: scale(var(--s)); transform-origin: 0 0;
  background: #0E1014; border-radius: 40px; padding: calc(var(--bz) * 1px);
  box-shadow: 0 40px 90px -40px rgba(10, 12, 20, 0.6), 0 0 0 1px rgba(255,255,255,0.08) inset;
  font-family: var(--font-body); font-size: 15px; line-height: 1.4; color: #1A1F2B;
  user-select: none; -webkit-user-select: none;
}
.stage-wrap.tall .ipad { border-radius: 34px; }
.ipad::before { content: ""; position: absolute; left: 50%; top: 7px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #1F2430; box-shadow: 0 0 0 1px #2B3140; }
.stage-wrap.tall .ipad::before { top: 5px; }
.screen {
  position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 24px;
  --scr-paper: #FBFBF8; --scr-ink: #1A1F2B; --scr-muted: #6B7280; --scr-line: #E5E7EB;
  --scr-glass: rgba(255, 255, 255, 0.72); --pen: #223B93; --pen-2: #3B4A82;
  background: var(--scr-paper); color: var(--scr-ink);
}
.stage-wrap.tall .screen { border-radius: 20px; }

.lib, .work { position: absolute; inset: 0; transition: opacity 0.35s ease, visibility 0.35s; }
.ipad[data-scene="library"] .work { visibility: hidden; opacity: 0; }
.ipad:not([data-scene="library"]) .lib { visibility: hidden; opacity: 0; }

/* --- Library ------------------------------------------------------------ */
.lib { display: grid; grid-template-columns: 224px 1fr; background: #F4F4F0; }
.lib-side { padding: 22px 14px; border-right: 1px solid var(--scr-line); background: #EFEFEA; display: flex; flex-direction: column; gap: 18px; }
.lib-search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 10px; background: #E3E3DD; color: var(--scr-muted); font-size: 13px; }
.lib-search svg { width: 14px; height: 14px; }
.lib-group { display: grid; gap: 2px; }
.lib-group h4 { margin: 0 0 6px 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--scr-muted); }
.lib-item { display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 10px; border-radius: 9px; font-size: 14px; font-weight: 500; color: #2B3240; }
.lib-item svg { width: 15px; height: 15px; color: var(--scr-muted); }
.lib-item.is-on { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.06); color: var(--scr-ink); }
.lib-item .swatch { width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.lib-main { padding: 26px 30px; overflow: hidden; }
.lib-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.lib-head h2 { font-family: var(--font-display); font-size: 26px; letter-spacing: -0.02em; margin: 0; color: var(--scr-ink); }
.lib-head p { font-size: 13px; color: var(--scr-muted); margin-top: 4px; }
.lib-new { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--scr-ink); color: #fff; font-size: 13px; font-weight: 600; }
.lib-new svg { width: 14px; height: 14px; }
.lib-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px 18px; }
.nb { display: grid; gap: 9px; }
.nb-cover { position: relative; aspect-ratio: 3 / 4; border-radius: 6px 12px 12px 6px; overflow: hidden; background: var(--cover, #fff); box-shadow: 0 10px 24px -14px rgba(20, 25, 40, 0.5), 0 1px 0 rgba(255,255,255,0.6) inset; transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
.nb:hover .nb-cover { transform: translateY(-3px) rotate(-0.6deg); }
.nb-cover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--spine, #2A4DD0); }
.nb-cover::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(20,25,40,0.14) 0.8px, transparent 1px); background-size: 12px 12px; opacity: 0.6; }
.nb-glyph { position: absolute; right: 10px; top: 10px; z-index: 1; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,0.8); color: var(--spine); font-family: var(--font-hand); font-size: 20px; font-weight: 600; }
.nb-ink { position: absolute; left: 20px; right: 12px; bottom: 14px; z-index: 1; font-family: var(--font-hand); font-size: 15px; line-height: 1.15; color: var(--pen); opacity: 0.9; }
.nb-title { font-size: 13.5px; font-weight: 600; line-height: 1.2; color: var(--scr-ink); }
.nb-meta { font-size: 11.5px; color: var(--scr-muted); }
.nb.nb-add .nb-cover { background: transparent; border: 1.5px dashed #C9CBD2; box-shadow: none; display: grid; place-items: center; color: var(--scr-muted); }
.nb.nb-add .nb-cover::before, .nb.nb-add .nb-cover::after { display: none; }
.nb.nb-add svg { width: 22px; height: 22px; }
.lib.is-in .nb { animation: rise 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 55ms); }
.stage-wrap.tall .lib { grid-template-columns: 1fr; }
.stage-wrap.tall .lib-side { display: none; }
.stage-wrap.tall .lib-main { padding: 24px 22px; }
.stage-wrap.tall .lib-grid { grid-template-columns: repeat(3, 1fr); gap: 20px 14px; }
.stage-wrap.tall .lib-head h2 { font-size: 24px; }
.stage-wrap.tall .nb-title { font-size: 14px; }
.stage-wrap.tall .nb:nth-child(n+7) { display: none; }

/* --- Workspace: top bar --------------------------------------------------- */
.topbar {
  position: absolute; left: 0; right: 0; top: 0; height: 56px; z-index: 5;
  display: flex; align-items: center; gap: 12px; padding: 0 14px;
  background: var(--scr-glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(20, 25, 40, 0.08); box-shadow: inset 0 1px 0 #fff;
}
.tb-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb-back { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px 0 6px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: #1F3DB0; }
.tb-back:hover { background: rgba(42, 77, 208, 0.08); }
.tb-back svg { width: 16px; height: 16px; }
.tb-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title small { font-weight: 500; color: var(--scr-muted); margin-left: 8px; }
.tb-tools { display: flex; gap: 2px; margin-inline: auto; padding: 3px; border-radius: 12px; background: rgba(20, 25, 40, 0.05); }
.tool { position: relative; width: 34px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #4B5360; }
.tool svg { width: 17px; height: 17px; }
.tool.is-on { background: #fff; color: var(--scr-ink); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.tool .pen-dot { position: absolute; left: 50%; bottom: 3px; width: 12px; height: 3px; margin-left: -6px; border-radius: 2px; background: var(--pen); }
.tb-right { display: flex; align-items: center; gap: 4px; }
.launch { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 7px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: #3B4250; }
.launch:hover { background: rgba(20, 25, 40, 0.06); }
.launch .li { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; color: #fff; }
.launch .li svg { width: 11px; height: 11px; }
.launch[data-state="open"] { background: rgba(42, 77, 208, 0.1); color: #1F3DB0; }
.launch[data-state="min"] { color: var(--scr-muted); }
.li-pdf { background: #E85A3C; } .li-web { background: #1FA88C; } .li-yt { background: #E53935; } .li-calc { background: #2B3240; } .li-ai { background: #3E5CE6; }
.stage-wrap.tall .tb-tools { display: none; }
.stage-wrap.tall .launch span:not(.li) { display: none; }
.stage-wrap.tall .launch { padding: 0 6px; }
.stage-wrap.tall .tb-title small { display: none; }
.stage-wrap.tall .tb-right { margin-left: auto; }

/* --- Workspace: canvas ---------------------------------------------------- */
.canvas {
  position: absolute; inset: 56px 0 0 0; background-color: var(--scr-paper);
  background-image: radial-gradient(rgba(26, 31, 43, 0.16) 1px, transparent 1.2px); background-size: 18px 18px;
  cursor: crosshair; touch-action: pan-y;
}
.ink { position: absolute; inset: 0; pointer-events: none; font-family: var(--font-hand); color: var(--pen); font-weight: 600; }
.ink-line { position: absolute; white-space: nowrap; clip-path: inset(-12px 100% -12px -12px); line-height: 1; }
.ink-line sup { font-size: 0.6em; vertical-align: 0.55em; }
.ink-line.hl { color: var(--pen-2); font-weight: 500; }
.ink.written .ink-line { clip-path: none; }
.ink.writing .ink-line { animation: write var(--wd, 1s) linear var(--wt, 0s) forwards; }
@keyframes write { to { clip-path: inset(-12px -12px -12px -12px); } }
.ink-svg, .draw-svg, .circle-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.ink-svg path { fill: none; stroke: var(--pen); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.ink.written .ink-svg path { stroke-dashoffset: 0; }
.ink.writing .ink-svg path { animation: draw var(--wd, 0.6s) ease-out var(--wt, 0s) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.draw-svg path { fill: none; stroke: var(--pen); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.draw-hint { position: absolute; left: 62px; bottom: 34px; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-hand); font-size: 22px; color: #8A93A3; pointer-events: none; transition: opacity 0.4s ease; }
.draw-hint svg { width: 34px; height: 22px; color: #8A93A3; }
.draw-hint.is-off { opacity: 0; }
.stage-wrap.tall .draw-hint { left: 24px; bottom: 22px; font-size: 20px; }

/* Grey ink arrow pointing up at the lecture window's title bar. It sits in
   .canvas, whose origin is 56px (the top bar) below the widgets' own origin —
   so these coordinates are the widget's --x/--y minus that. */
.drag-hint { position: absolute; left: 452px; top: 410px; z-index: 30; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-hand); font-size: 22px; color: #8A93A3; white-space: nowrap; pointer-events: none; transition: opacity 0.4s ease; }
.drag-hint svg { width: 34px; height: 22px; color: #8A93A3; flex: none; }
.drag-hint.is-off { opacity: 0; }
.stage-wrap.tall .drag-hint { left: 350px; top: 452px; font-size: 20px; }
/* Portrait puts the lecture window below the hint, so the arrow points down. */
.stage-wrap.tall .drag-hint svg { transform: scaleY(-1); }

.t1 { left: 60px; top: 92px; font-size: 38px; }
.t2 { left: 64px; top: 152px; font-size: 33px; }
.t3 { left: 60px; top: 224px; font-size: 33px; }
.t4 { left: 88px; top: 292px; font-size: 28px; }
.t5 { left: 88px; top: 338px; font-size: 28px; }
.t6 { left: 88px; top: 402px; font-size: 31px; }
.t7 { left: 88px; top: 456px; font-size: 33px; }
.t8 { left: 430px; top: 330px; font-size: 26px; transform: rotate(-6deg); }
.stage-wrap.tall .t8 { left: 110px; top: 528px; transform: rotate(-3deg); }
.stage-wrap.tall .ink-svg .s-arrow { display: none; }
.stage-wrap.tall .ink-svg .s-arrow-tall { display: block; }
.ink-svg .s-arrow-tall { display: none; }

.circle-svg path { fill: none; stroke: #E4F55A; stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; mix-blend-mode: multiply; stroke-dasharray: 1; stroke-dashoffset: 1; }
.circle-svg.is-on path { animation: draw 1.1s cubic-bezier(0.3, 0, 0.2, 1) 0.4s forwards; }
.circle-svg.is-set path { stroke-dashoffset: 0; }
.actionbar {
  position: absolute; left: 96px; top: 346px; z-index: 90;
  display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: var(--scr-glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.9); box-shadow: inset 0 1px 0 #fff, 0 14px 34px -14px rgba(20, 25, 40, 0.45), 0 1px 3px rgba(20,25,40,0.08);
  opacity: 0; transform: translateY(6px) scale(0.96); pointer-events: none;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.actionbar.is-on { opacity: 1; transform: none; pointer-events: auto; }
.actionbar button { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px 0 10px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--scr-ink); }
.actionbar button:hover { background: rgba(20, 25, 40, 0.07); }
.actionbar button:first-child { background: var(--scr-ink); color: #fff; }
.actionbar button svg { width: 15px; height: 15px; }
.actionbar .ab-tip { position: absolute; left: 18px; top: -7px; width: 12px; height: 12px; background: var(--scr-glass); border-left: 1px solid rgba(255,255,255,0.9); border-top: 1px solid rgba(255,255,255,0.9); transform: rotate(45deg); }
.stage-wrap.tall .actionbar { left: 40px; top: 346px; }
.stage-wrap.tall .actionbar button { padding: 0 10px 0 8px; font-size: 12.5px; }

/* --- Widgets ------------------------------------------------------------- */
.widget {
  position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h); z-index: var(--z, 10);
  display: flex; flex-direction: column; border-radius: 18px; overflow: hidden;
  background: linear-gradient(160deg, rgba(255,255,255,0.86), rgba(255,255,255,0.66));
  -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: inset 0 1px 0 #fff, inset 1px 0 0 rgba(255,255,255,0.6), 0 24px 60px -24px rgba(20, 25, 40, 0.5), 0 2px 8px rgba(20, 25, 40, 0.08);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease, box-shadow 0.2s ease;
  transform-origin: center;
}
.widget.is-min { transform: translate(var(--tx, 0px), var(--ty, 0px)) scale(0.12); opacity: 0; pointer-events: none; }
.widget.is-closed { display: none; }
.widget.is-dragging { transition: none; box-shadow: inset 0 1px 0 #fff, 0 40px 80px -30px rgba(20, 25, 40, 0.6), 0 4px 12px rgba(20, 25, 40, 0.1); }
.widget.is-entering { animation: wenter 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes wenter { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: none; } }
.wbar { flex: none; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 12px; border-bottom: 1px solid rgba(20, 25, 40, 0.07); cursor: grab; touch-action: none; user-select: none; }
.wbar:active { cursor: grabbing; }
.wbar .wi { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; color: #fff; flex: none; }
.wbar .wi svg { width: 11px; height: 11px; }
.wtitle { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #2B3240; }
.wgrow { flex: 1; }
.wbtn { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: #5B6370; touch-action: manipulation; }
.wbtn:hover { background: rgba(20, 25, 40, 0.08); color: var(--scr-ink); }
.wbtn svg { width: 12px; height: 12px; }
.wbody { flex: 1; min-height: 0; position: relative; }
.wresize { position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; cursor: nwse-resize; touch-action: none; }
.wresize::after { content: ""; position: absolute; right: 7px; bottom: 7px; width: 8px; height: 8px; border-right: 2px solid rgba(20,25,40,0.3); border-bottom: 2px solid rgba(20,25,40,0.3); border-radius: 0 0 2px 0; }

.w-yt { --x: 720px; --y: 84px; --w: 410px; --h: 318px; }
.w-pdf { --x: 690px; --y: 424px; --w: 450px; --h: 330px; }
.w-calc { --x: 420px; --y: 430px; --w: 250px; --h: 330px; }
.w-web { --x: 620px; --y: 120px; --w: 420px; --h: 340px; }
.w-chat { --x: 632px; --y: 84px; --w: 400px; --h: 640px; }
.stage-wrap.tall .w-yt { --x: 20px; --y: 596px; --w: 300px; --h: 244px; }
.stage-wrap.tall .w-pdf { --x: 334px; --y: 556px; --w: 286px; --h: 284px; }
.stage-wrap.tall .w-calc { --x: 396px; --y: 76px; --w: 224px; --h: 300px; }
.stage-wrap.tall .w-web { --x: 40px; --y: 380px; --w: 420px; --h: 320px; }
.stage-wrap.tall .w-chat { --x: 20px; --y: 344px; --w: 600px; --h: 496px; }

.yt-video { position: relative; aspect-ratio: 16 / 9; background: #10131A; overflow: hidden; }
.yt-board { position: absolute; inset: 0; display: grid; place-content: center; gap: 6px; padding: 18px; background: radial-gradient(120% 90% at 30% 20%, #23352F, #131C19 70%); color: #F2EFE4; font-family: var(--font-hand); font-size: 26px; text-align: center; line-height: 1.15; }
.yt-board small { font-size: 18px; opacity: 0.75; }
.yt-play { position: absolute; left: 50%; top: 50%; width: 46px; height: 32px; margin: -16px 0 0 -23px; border-radius: 10px; background: rgba(229, 57, 53, 0.95); display: grid; place-items: center; color: #fff; }
.yt-play svg { width: 16px; height: 16px; margin-left: 2px; }
.yt-ctrl { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 10px 8px; background: linear-gradient(transparent, rgba(0,0,0,0.55)); color: #fff; font-size: 11px; font-family: var(--font-mono); display: grid; gap: 6px; }
.yt-bar { height: 3px; border-radius: 3px; background: rgba(255,255,255,0.3); overflow: hidden; }
.yt-bar i { display: block; height: 100%; width: 42%; background: #E53935; animation: ytprog 140s linear infinite; }
@keyframes ytprog { from { width: 42%; } to { width: 100%; } }
.yt-ctrl .row { display: flex; justify-content: space-between; align-items: center; }
.yt-ctrl .row span:last-child { opacity: 0.8; }
.yt-meta { padding: 10px 12px; display: grid; gap: 2px; }
.yt-meta b { font-size: 13px; line-height: 1.25; }
.yt-meta span { font-size: 11.5px; color: var(--scr-muted); }

.calc { display: flex; flex-direction: column; height: 100%; padding: 10px; gap: 8px; }
.calc-display { flex: none; height: 62px; border-radius: 10px; background: #1B2029; color: #F2F4F7; font-family: var(--font-mono); display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-end; padding: 8px 12px; overflow: hidden; }
.calc-expr { font-size: 11px; color: #9AA3B2; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; min-height: 14px; }
.calc-val { font-size: 22px; font-weight: 500; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; color: #E4F55A; }
.calc-keys { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); grid-auto-rows: 1fr; gap: 5px; min-height: 0; }
.calc-keys button { border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(20,25,40,0.08), 0 0 0 1px rgba(20,25,40,0.05); font-family: var(--font-mono); font-size: 13.5px; font-weight: 500; color: var(--scr-ink); touch-action: manipulation; transition: transform 0.08s ease, background-color 0.12s ease; }
.calc-keys button:hover { background: #F2F3F6; }
.calc-keys button:active { transform: scale(0.94); }
.calc-keys button.fn { background: #EEF0F4; color: #3B4250; font-size: 12px; }
.calc-keys button.op { background: #E9EDFB; color: #1F3DB0; }
.calc-keys button.eq { background: var(--scr-ink); color: #fff; }

.pdf { height: 100%; display: flex; flex-direction: column; background: #E9EAEE; }
.slide { margin: 12px 14px 8px; aspect-ratio: 16 / 9; background: #fff; border-radius: 6px; box-shadow: 0 6px 20px -12px rgba(20,25,40,0.4); padding: 14px 18px; display: grid; align-content: start; gap: 6px; font-size: 11.5px; }
.slide h5 { margin: 0; font-family: var(--font-display); font-size: 15px; letter-spacing: -0.01em; color: #1D2A63; padding-bottom: 6px; border-bottom: 2px solid #1D2A63; }
.slide .f { font-family: "Times New Roman", serif; font-style: italic; font-size: 15px; margin-top: 2px; }
.slide ul { margin: 0; padding-left: 14px; display: grid; gap: 2px; color: #3B4250; }
.slide .tag { justify-self: start; margin-top: 2px; padding: 2px 7px; border-radius: 4px; background: #E4F55A; color: #55600A; font-weight: 600; font-size: 10.5px; }
.pdf-nav { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 12px 10px; font-family: var(--font-mono); font-size: 11.5px; color: #4B5360; }
.pdf-nav button { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: #fff; box-shadow: 0 1px 2px rgba(20,25,40,0.1); }
.pdf-nav button svg { width: 12px; height: 12px; }

.web { height: 100%; display: flex; flex-direction: column; background: #fff; }
.url { margin: 8px 10px; height: 30px; border-radius: 9px; background: #EEF0F3; display: flex; align-items: center; gap: 8px; padding: 0 10px; font-size: 12px; color: #3B4250; }
.url svg { width: 12px; height: 12px; color: var(--scr-muted); }
.results { padding: 4px 14px 12px; display: grid; gap: 12px; overflow: hidden; }
.result b { display: block; font-size: 13px; color: #1A0DAB; font-weight: 500; }
.result span { display: block; font-size: 11px; color: #4B5360; line-height: 1.35; }
.result small { display: block; font-size: 10.5px; color: #1F8A4C; margin-bottom: 1px; }

.chat { height: 100%; display: flex; flex-direction: column; }
.chat-ctx { flex: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px 0 6px; border-radius: 8px; background: #fff; border: 1px solid rgba(20,25,40,0.1); font-size: 11.5px; font-weight: 600; color: #2B3240; }
.chip .ci { width: 16px; height: 16px; border-radius: 4px; display: grid; place-items: center; }
.chip .ci svg { width: 10px; height: 10px; }
.chip.circled .ci { background: #E4F55A; color: #55600A; }
.chip.page .ci { background: #E7ECFB; color: #1F3DB0; }
.chip .thumb { width: 34px; height: 16px; border-radius: 3px; background: #fff; border: 1px solid #E5E7EB; font-family: var(--font-hand); font-size: 12px; line-height: 14px; text-align: center; color: #223B93; position: relative; }
.chip .thumb::after { content: ""; position: absolute; inset: -2px -3px; border: 2px solid #E4F55A; border-radius: 50%; opacity: 0.9; }
.chip.page.is-off { opacity: 0.55; }
.chat-log { flex: 1; min-height: 0; overflow: hidden; padding: 6px 12px 10px; display: flex; flex-direction: column; gap: 10px; justify-content: flex-end; }
.msg { max-width: 92%; padding: 9px 12px; border-radius: 14px; font-size: 13px; line-height: 1.45; animation: rise 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.msg.user { align-self: flex-end; background: #1A1F2B; color: #fff; border-bottom-right-radius: 5px; }
.msg.ai { align-self: flex-start; background: #fff; border: 1px solid rgba(20,25,40,0.08); border-bottom-left-radius: 5px; color: #1A1F2B; }
.msg.ai .who { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: #1F3DB0; margin-bottom: 4px; letter-spacing: 0.02em; }
.msg.ai .who svg { width: 12px; height: 12px; }
.msg .caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; background: #2A4DD0; vertical-align: -0.15em; animation: blink 0.9s steps(2) infinite; }
@keyframes blink { to { opacity: 0; } }
.dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: #9AA3B2; animation: bounce 1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: 0.15s; } .dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(-4px); opacity: 1; } }
.chat-in { flex: none; padding: 8px 12px 6px; display: grid; gap: 6px; }
.chat-box { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 6px 0 12px; border-radius: 12px; background: #fff; border: 1px solid rgba(20,25,40,0.12); }
.chat-box span { flex: 1; font-size: 12.5px; color: var(--scr-muted); }
.chat-box .pg { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border-radius: 7px; font-size: 11px; font-weight: 600; background: #E7ECFB; color: #1F3DB0; }
.chat-box .pg.is-off { background: #EEF0F3; color: var(--scr-muted); }
.chat-box .pg svg { width: 11px; height: 11px; }
.chat-box .send { width: 28px; height: 28px; border-radius: 8px; background: var(--scr-ink); color: #fff; display: grid; place-items: center; }
.chat-box .send svg { width: 13px; height: 13px; }
.chat-disc { font-size: 10.5px; color: var(--scr-muted); text-align: center; }

.dock { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.pill { display: none; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 7px; border-radius: 999px; background: var(--scr-glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.9); box-shadow: inset 0 1px 0 #fff, 0 10px 24px -12px rgba(20,25,40,0.45), 0 1px 3px rgba(20,25,40,0.08); font-size: 12px; font-weight: 600; color: #2B3240; touch-action: manipulation; }
.pill.is-on { display: inline-flex; animation: pop 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.pill:hover { transform: translateX(-3px); }
.pill .wi { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; color: #fff; }
.pill .wi svg { width: 12px; height: 12px; }
@keyframes pop { from { opacity: 0; transform: translateX(14px) scale(0.9); } to { opacity: 1; transform: none; } }
.stage-wrap.tall .dock { right: 8px; top: 72px; transform: none; }
.stage-wrap.tall .pill span { display: none; }
.stage-wrap.tall .pill { padding: 0 7px; }

/* --------------------------------------------------------------------------
   Pain point: app-hopping vs one page
   -------------------------------------------------------------------------- */
.pain-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: stretch; }
.pain-panel { border-radius: var(--radius); padding: 16px; display: grid; grid-template-rows: auto 1fr auto; gap: 14px; }
.pain-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-left: 4px; }
.pain-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #E0432A; }
.pain-tag.good::before { background: var(--lime); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 35%, transparent); }
.pain-vis { position: relative; height: 300px; border-radius: 16px; overflow: hidden; background: #F3F3EF; color: #1A1F2B; }
.pain-cap { font-size: 0.98rem; color: var(--ink-2); padding: 0 4px; text-wrap: pretty; }
.pain-cap b { color: var(--ink); }
.vs { align-self: center; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.04em; color: var(--muted); }

/* the deck of apps you keep switching between */
.deck { position: absolute; inset: 0; display: grid; place-items: center; }
.app {
  position: absolute; width: min(74%, 260px); aspect-ratio: 16 / 10.5; border-radius: 14px; background: #fff; overflow: hidden;
  border: 1px solid rgba(20,25,36,0.08); box-shadow: 0 24px 44px -20px rgba(20,25,36,0.45);
  animation: shuffle 9s linear infinite; animation-delay: calc(var(--i, 0) * -1.5s);
}
.app-bar { height: 26px; display: flex; align-items: center; gap: 7px; padding: 0 10px; font-size: 11px; font-weight: 600; color: #2B3240; border-bottom: 1px solid rgba(20,25,36,0.06); }
.app-bar i { width: 12px; height: 12px; border-radius: 4px; background: var(--c, #999); }
.app-body { padding: 10px; display: grid; gap: 6px; }
.ln { height: 7px; border-radius: 4px; background: rgba(20,25,36,0.1); width: var(--w, 80%); }
.ln.dk { background: rgba(20,25,36,0.7); }
.ln.bl { background: #1A0DAB; opacity: 0.7; }
.blk { border-radius: 6px; background: #131C19; height: 56px; position: relative; }
.blk::after { content: ""; position: absolute; left: 50%; top: 50%; width: 0; height: 0; margin: -7px 0 0 -5px; border-left: 12px solid #E53935; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.keys i { height: 12px; border-radius: 3px; background: rgba(20,25,36,0.08); }
.app .hand { font-family: var(--font-hand); color: #223B93; font-size: 15px; line-height: 1.1; }
@keyframes shuffle {
  0%    { transform: translateY(0) scale(1); opacity: 1; z-index: 6; }
  12%   { transform: translateY(-52px) scale(1.02); opacity: 0; z-index: 6; }
  13%   { transform: translateY(46px) scale(0.82); opacity: 0; z-index: 1; }
  16.6% { transform: translateY(40px) scale(0.84); opacity: 0.35; z-index: 1; }
  33.3% { transform: translateY(32px) scale(0.88); opacity: 0.5; z-index: 2; }
  50%   { transform: translateY(24px) scale(0.91); opacity: 0.65; z-index: 3; }
  66.6% { transform: translateY(16px) scale(0.94); opacity: 0.8; z-index: 4; }
  83.3% { transform: translateY(8px) scale(0.97); opacity: 0.92; z-index: 5; }
  100%  { transform: translateY(0) scale(1); opacity: 1; z-index: 6; }
}
.deck-tally { position: absolute; left: 14px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; color: #5E6672; background: rgba(255,255,255,0.8); padding: 5px 9px; border-radius: 8px; }
.deck-tally i { width: 7px; height: 7px; border-radius: 50%; background: #E0432A; animation: blink 1.5s steps(2) infinite; }

/* the calm alternative: one page, tools floating */
.calm { position: absolute; inset: 0; background: #FBFBF8; background-image: radial-gradient(rgba(26,31,43,0.14) 1px, transparent 1.2px); background-size: 16px 16px; }
.calm .hand { position: absolute; font-family: var(--font-hand); color: #223B93; font-weight: 600; font-size: 26px; line-height: 1; }
.calm .hand sup { font-size: 0.6em; vertical-align: 0.55em; }
.calm-stroke { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.calm-stroke path { fill: none; stroke: #223B93; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.in-view .calm-stroke path { animation: draw 2.2s cubic-bezier(0.4, 0, 0.3, 1) 0.6s forwards; }
.mini-w { position: absolute; border-radius: 12px; background: rgba(255,255,255,0.78); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.95); box-shadow: inset 0 1px 0 #fff, 0 16px 34px -16px rgba(20,25,36,0.45); overflow: hidden; animation: float var(--dur, 7s) ease-in-out var(--delay, 0s) infinite alternate; --rot: 0deg; }
.mw-bar { height: 22px; font-size: 10px; font-weight: 600; display: flex; align-items: center; gap: 6px; padding: 0 8px; border-bottom: 1px solid rgba(20,25,36,0.06); color: #2B3240; }
.mw-bar i { width: 10px; height: 10px; border-radius: 3px; background: var(--c, #999); }
.mw-bar em { margin-left: auto; font-style: normal; color: #8A93A3; font-size: 10px; letter-spacing: 1px; }
.mw-video { background: #131C19; height: 62px; position: relative; }
.mw-video::after { content: ""; position: absolute; left: 50%; top: 50%; margin: -6px 0 0 -4px; border-left: 10px solid #E53935; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.mw-video i { position: absolute; left: 0; bottom: 0; height: 3px; width: 46%; background: #E53935; }
.mw-slide { margin: 6px; background: #fff; border: 1px solid #ECEDF0; border-radius: 4px; padding: 6px; display: grid; gap: 4px; }
.mw-slide .ln.dk { height: 6px; width: 60%; }
.mw-slide .ln { height: 5px; }
.calm .mini-w.v { right: 14px; top: 20px; width: 150px; --dur: 8s; }
.calm .mini-w.p { right: 36px; bottom: 22px; width: 156px; --dur: 7s; --delay: -3s; }
.calm .mini-w.c { left: 16px; bottom: 18px; width: 92px; --dur: 9s; --delay: -5s; }
.mw-calc { padding: 6px; display: grid; gap: 4px; }
.mw-calc b { display: block; height: 18px; border-radius: 4px; background: #1B2029; color: #E4F55A; font-family: var(--font-mono); font-size: 10px; line-height: 18px; text-align: right; padding-right: 5px; font-weight: 500; }
@media (max-width: 860px) {
  .pain-grid { grid-template-columns: 1fr; }
  .vs { justify-self: center; }
  .pain-vis { height: 260px; }
}

/* --------------------------------------------------------------------------
   Tools: mini previews, not paragraphs
   -------------------------------------------------------------------------- */
.tools-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.tools-copy { position: sticky; top: 96px; display: grid; gap: 20px; }
.behaviors { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.behaviors li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; font-size: 0.92rem; font-weight: 600; color: var(--ink-2); }
.behaviors .bi { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--cobalt-soft); color: var(--cobalt); }
.behaviors .bi svg { width: 15px; height: 15px; }
.pass { position: relative; border-radius: var(--radius); overflow: hidden; background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 16px 16px; }
.pass svg { width: 100%; height: auto; }
.pass .frame { fill: var(--glass-2); stroke: var(--glass-line); }
.pass .frame-title { fill: var(--muted); font: 600 10px var(--font-body); letter-spacing: 0.06em; }
.pass .stroke { fill: none; stroke: var(--cobalt); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.pass .label { fill: var(--muted); font: 500 11px var(--font-body); }
.pass .hand { fill: var(--cobalt); font: 600 15px var(--font-hand); }
.pass.in-view .stroke { animation: draw 2.6s cubic-bezier(0.4, 0, 0.3, 1) 0.3s forwards; }
.pass .pen-tip { fill: var(--cobalt); opacity: 0; }
.pass.in-view .pen-tip { animation: pen 3.5s cubic-bezier(0.4, 0, 0.3, 1) 0.3s forwards; }
@keyframes pen { 0% { opacity: 1; offset-distance: 0%; } 96% { opacity: 1; } 100% { opacity: 0; offset-distance: 100%; } }

.tool-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tcard { border-radius: var(--radius); padding: 10px 10px 14px; display: grid; gap: 12px; transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
.tcard:hover { transform: translateY(-3px); }
.tcard.wide { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.tprev { position: relative; height: 150px; border-radius: 15px; overflow: hidden; background: #F6F6F2; background-image: radial-gradient(rgba(26,31,43,0.14) 1px, transparent 1.2px); background-size: 16px 16px; color: #1A1F2B; }
.tprev .hand { position: absolute; left: 16px; top: 14px; font-family: var(--font-hand); color: #223B93; font-weight: 600; font-size: 20px; opacity: 0.8; }
.mp { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -46%); width: 78%; border-radius: 12px; background: rgba(255,255,255,0.82); border: 1px solid #fff; box-shadow: inset 0 1px 0 #fff, 0 18px 34px -16px rgba(20,25,36,0.45); overflow: hidden; font-size: 10px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.tcard:hover .mp { transform: translate(-50%, -50%); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.mp .url { margin: 6px; height: 20px; font-size: 9.5px; border-radius: 6px; }
.mp .url svg { width: 10px; height: 10px; }
.mp .res { padding: 0 8px 8px; display: grid; gap: 6px; }
.mp .res .ln { height: 5px; }
.mp .mw-video { height: 58px; }
.mp .yt-meta { padding: 6px 8px; }
.mp .yt-meta b { font-size: 10.5px; }
.mp .yt-meta span { font-size: 9px; }
.mp .mw-calc { grid-template-columns: repeat(4, 1fr); }
.mp .mw-calc b { grid-column: 1 / -1; height: 22px; font-size: 11px; line-height: 22px; }
.mp .mw-calc i { height: 14px; border-radius: 4px; background: #fff; box-shadow: 0 0 0 1px rgba(20,25,36,0.08); }
.mp .mw-calc i.op { background: #E9EDFB; }
.mp .chat-ctx { padding: 6px 8px 2px; }
.mp .chip { height: 20px; font-size: 9px; padding: 0 6px 0 4px; }
.mp .chip .ci { width: 12px; height: 12px; }
.mp .chip .ci svg { width: 8px; height: 8px; }
.mp .chip .thumb { width: 26px; height: 12px; font-size: 9px; line-height: 10px; }
.mp .log { padding: 4px 8px 8px; display: grid; gap: 5px; }
.mp .msg { font-size: 9.5px; padding: 5px 8px; border-radius: 9px; animation: none; max-width: 90%; }
.mp .msg.user { justify-self: end; }
.tcap { display: flex; align-items: center; gap: 12px; padding: 0 6px; }
.tcap .ti { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,0.4); }
.tcap .ti svg { width: 18px; height: 18px; }
.tcap b { display: block; font-family: var(--font-display); font-size: 1.02rem; letter-spacing: -0.01em; line-height: 1.2; }
.tcap span { display: block; font-size: 0.88rem; color: var(--muted); }
.ti-pdf { background: linear-gradient(160deg, #FF7A59, #E0432A); }
.ti-web { background: linear-gradient(160deg, #2CC6A8, #138F79); }
.ti-yt { background: linear-gradient(160deg, #FF5A5F, #C81E2B); }
.ti-calc { background: linear-gradient(160deg, #2B3240, #121620); color: #E4F55A !important; }
.ti-ai { background: linear-gradient(160deg, #4E6BFF, #2A4DD0); }
@media (max-width: 900px) { .tools-grid { grid-template-columns: 1fr; } .tools-copy { position: static; } }
@media (max-width: 560px) { .tool-cards { grid-template-columns: 1fr; } .tcard.wide { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Circle-to-ask steps
   -------------------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: step; }
.step { display: grid; grid-template-rows: auto 1fr; border-radius: var(--radius); overflow: hidden; padding: 10px; gap: 12px; }
.step-vis { position: relative; height: 190px; border-radius: 15px; background: #FBFBF8; background-image: radial-gradient(rgba(26,31,43,0.14) 1px, transparent 1.2px); background-size: 16px 16px; color: #1A1F2B; overflow: hidden; }
.step-copy { padding: 4px 8px 8px; display: grid; gap: 4px; align-content: start; }
.step-copy h3::before { counter-increment: step; content: counter(step) " · "; color: var(--cobalt); font-family: var(--font-mono); font-weight: 500; font-size: 0.9em; }
.step-copy p { color: var(--muted); font-size: 0.93rem; }
.sv-ink { position: absolute; left: 34px; top: 74px; font-family: var(--font-hand); font-size: 30px; font-weight: 600; color: #223B93; }
.sv-ink sup { font-size: 0.6em; vertical-align: 0.55em; }
.sv-loop { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sv-loop path { fill: none; stroke: #E4F55A; stroke-width: 9; stroke-linecap: round; opacity: 0.85; mix-blend-mode: multiply; stroke-dasharray: 1; stroke-dashoffset: 1; }
.in-view .sv-loop path { animation: draw 1.2s cubic-bezier(0.3, 0, 0.2, 1) 0.4s forwards; }
.sv-pen { position: absolute; left: 190px; top: 56px; width: 26px; height: 26px; color: #1A1F2B; opacity: 0; }
.in-view .sv-pen { animation: penhop 1.6s ease 0.3s forwards; }
@keyframes penhop { 0% { opacity: 0; transform: translate(-40px, 40px); } 20% { opacity: 1; } 100% { opacity: 1; transform: translate(8px, -6px); } }
.sv-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.96); display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,0.85); border: 1px solid #fff; box-shadow: inset 0 1px 0 #fff, 0 14px 34px -14px rgba(20,25,40,0.45), 0 1px 3px rgba(20,25,40,0.08); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); opacity: 0; }
.in-view .sv-bar { animation: barin 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.6s forwards; }
@keyframes barin { to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.sv-bar span { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 9px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #1A1F2B; white-space: nowrap; }
.sv-bar span:first-child { background: #1A1F2B; color: #fff; }
.sv-bar svg { width: 14px; height: 14px; }
.sv-cursor { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: 14px 0 0 -84px; border-radius: 50%; background: rgba(42,77,208,0.25); border: 2px solid rgba(42,77,208,0.6); opacity: 0; }
.in-view .sv-cursor { animation: tap 1.2s ease 1.3s forwards; }
@keyframes tap { 0% { opacity: 0; transform: scale(1.6); } 40% { opacity: 1; transform: scale(0.9); } 100% { opacity: 0; transform: scale(1.4); } }
.sv-chat { position: absolute; left: 18px; right: 18px; top: 20px; display: grid; gap: 8px; }
.sv-chat .chip { justify-self: start; }
.sv-chat .msg { animation: none; }
.in-view .sv-chat .msg.user { animation: rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s both; }
.in-view .sv-chat .msg.ai { animation: rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) 1.1s both; }
.sv-chat .msg.ai .stream { display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; width: 0; vertical-align: bottom; }
.in-view .sv-chat .msg.ai .stream { animation: type 2.2s steps(46) 1.4s forwards; }
@keyframes type { to { width: 100%; } }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } .step-vis { height: 180px; } }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.faq { display: grid; border-radius: var(--radius); padding: 4px 22px; }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq details:last-child { border-bottom: 0; }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); transition: transform 0.25s ease, background-color 0.2s ease; }
.faq summary .plus svg { width: 12px; height: 12px; }
.faq details[open] summary .plus { transform: rotate(45deg); background: var(--ink); color: var(--paper); border-color: var(--ink); }
.faq .answer { padding: 0 0 20px; color: var(--ink-2); max-width: 40em; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Final CTA — a big glass slab over saturated colour
   -------------------------------------------------------------------------- */
.cta-wrap { position: relative; }
.cta-blob { position: absolute; z-index: 0; border-radius: 50%; filter: blur(48px); pointer-events: none; }
.cta-blob.a { width: 46%; aspect-ratio: 1; left: -8%; top: -30%; background: var(--lime); opacity: 0.7; }
.cta-blob.b { width: 50%; aspect-ratio: 1; right: -10%; bottom: -40%; background: var(--cobalt); opacity: 0.4; }
.cta-blob.c { width: 30%; aspect-ratio: 1; left: 40%; top: 50%; background: var(--peach); opacity: 0.5; }
.cta { position: relative; z-index: 1; overflow: hidden; border-radius: var(--radius-lg); padding: clamp(40px, 7vw, 88px) clamp(22px, 5vw, 72px); display: grid; justify-items: center; text-align: center; gap: 22px; }
.cta h2 { max-width: 14ch; }
.cta-note { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; font-size: 0.9rem; color: var(--muted); }
.cta-note span { display: inline-flex; align-items: center; gap: 7px; }
.cta-note svg { width: 14px; height: 14px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer { padding: 40px 0 44px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.92rem; color: var(--ink-2); }
.footer-links a:hover { color: var(--ink); }
.footer-fine { margin-top: 18px; font-size: 0.8rem; color: var(--muted); max-width: 70em; }

/* --------------------------------------------------------------------------
   Reveal on scroll + reduced motion
   -------------------------------------------------------------------------- */
.js .reveal { transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.js .reveal.pre { opacity: 0; transform: translateY(18px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .js .reveal.pre { opacity: 1; transform: none; }
  .ink .ink-line { clip-path: none !important; }
  .ink-svg path, .circle-svg path, .pass .stroke, .sv-loop path, .calm-stroke path { stroke-dashoffset: 0 !important; }
  .app { animation: none; opacity: 1; transform: translateY(calc(var(--i) * 10px)) scale(calc(1 - var(--i) * 0.03)); z-index: calc(6 - var(--i)); }
}
