/* Synomy for students and researchers: the pictures under each claim on
   students.html, and the students door on index.html. v-students.js builds
   them into the [data-v] slots (site/README.md, "Glimpses").

   Every piece is drawn at design pixels inside .vs-art, which the script scales
   to the slot's width as one picture, so the CSS below says the app's own
   numbers in plain px: theme.css dark, editor.css, chrome.css, and the LaTeX and
   Read aloud extensions' sheets. Under 640px of slot the script swaps in a phone
   arrangement (.vs-n). Everything is scoped under .vs, because index.html loads
   this sheet too. */

.vs {
  --vs-text: #ececea; --vs-sec: #9b9b98; --vs-faint: #74767b; --vs-rule: rgba(255, 255, 255, .09);
  --vs-accent: #6cb4ff; --vs-ground: #0e0e11; --vs-surface: #1b1b1e; --vs-hover: rgba(255, 255, 255, .065);
  --vs-danger: #e07a73; --vs-good: #46c47c;
  --vs-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'DejaVu Sans Mono', monospace;
  --vs-ease: cubic-bezier(.2, .7, .2, 1);
  position: relative; isolation: isolate; width: 100%;
  font-family: var(--ui); color: var(--vs-text); text-align: left; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -webkit-user-select: none; user-select: none;
}
/* The light the pieces stand in: the range's colour, as on the other glimpses. */
.vs::before {
  content: ""; position: absolute; inset: -8% -4%; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 48% at 50% 54%, rgba(47, 123, 255, .2), rgba(47, 123, 255, .055) 56%, transparent 74%);
}
.vs-art { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.vs .g svg { display: block; fill: currentColor; width: calc(var(--gw, 1) * 1em); height: calc(var(--gh, 1) * 1em); }

/* A piece of the app, floating in the night: the glimpses' material without
   their drift; here the work inside the piece is what moves. */
.vs-gp {
  position: absolute; overflow: hidden; border-radius: 18px;
  background: linear-gradient(180deg, rgba(34, 35, 40, .96), rgba(20, 21, 24, .97));
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 34px 80px -26px rgba(0, 0, 0, .92),
    0 0 70px -24px rgba(47, 123, 255, .42);
}

/* A caret that blinks only while nobody types, as an editor's does. */
.vs-cur { display: inline-block; width: 1.5px; height: 1.2em; margin-right: -1.5px; vertical-align: text-bottom; background: var(--vs-text); }
.vs-idle .vs-cur { animation: vs-blink 1.1s steps(1) infinite; }
@keyframes vs-blink { 50% { opacity: 0; } }

/* The ring the app turns while it works. */
.vs-ring {
  display: inline-block; flex: none; box-sizing: border-box; width: 12px; height: 12px; border-radius: 50%;
  border: 1.6px solid color-mix(in srgb, currentColor 22%, transparent); border-top-color: currentColor;
  animation: vs-spin .8s linear infinite;
}
@keyframes vs-spin { to { transform: rotate(360deg); } }

/* ================================================================ LaTeX */
.vs-lx-bar {
  position: absolute; right: 0; top: 0; display: flex; align-items: center; gap: 2px; height: 40px; padding: 0 6px;
  border-radius: 14px; background: var(--vs-surface); border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 18px 40px -18px rgba(0, 0, 0, .9);
  font-size: 13px; font-weight: 500;
}
.vs-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 9px; color: var(--vs-sec); white-space: nowrap; }
.vs-chip .g { font-size: 14px; }
.vs-chip.on { background: var(--vs-hover); color: var(--vs-text); }
.vs-chip.icon { width: 32px; padding: 0; justify-content: center; }
.vs-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--vs-good); }
.vs-chip .num { font-variant-numeric: tabular-nums; }
.vs-lx-go { color: var(--vs-text); }
.vs-lx-go .lb { min-width: 74px; }
.vs-lx-go .vs-ring { display: none; }
.vs-lx-go.busy .vs-ring { display: block; margin: 0 1px; }
.vs-lx-go.busy .g { display: none; }

.vs-lx-desk {
  position: absolute; left: 0; right: 0; top: 52px; bottom: 0; display: flex; gap: 1px; padding: 0;
  background: rgba(255, 255, 255, .08);
}
.vs-lx-desk > div { position: relative; overflow: hidden; display: flex; flex-direction: column; background: var(--vs-ground); }
.vs-lx-files { width: 150px; flex: none; font-size: 13px; }
.vs-lx-code { width: 398px; flex: none; }
.vs-lx-prev { flex: 1; background: #141416 !important; }

.vs-lx-head { display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 6px; }
.vs-lx-filter { display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border-radius: 10px; background: var(--vs-hover); color: var(--vs-faint); font-size: 12.5px; }
.vs-lx-filter .g { font-size: 12px; }
.vs-lx-tools { display: flex; gap: 2px; color: var(--vs-sec); }
.vs-lx-tools span { display: grid; place-items: center; width: 28px; height: 26px; border-radius: 7px; font-size: 14px; }
.vs-lx-tree { flex: 1; padding: 2px 6px; }
.vs-lx-row { display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px 0 calc(4px + var(--d, 0) * 14px); border-radius: 7px; white-space: nowrap; }
.vs-lx-row .tw { width: 14px; flex: none; color: var(--vs-faint); font-size: 9px; display: grid; place-items: center; }
.vs-lx-row .tw .g { transform: rotate(90deg); }
.vs-lx-row .k { flex: none; width: 16px; display: grid; place-items: center; color: var(--vs-sec); font-size: 13px; }
.vs-lx-row .k.tex { color: color-mix(in srgb, var(--vs-accent) 85%, #fff); }
.vs-lx-row .k.dir { color: color-mix(in srgb, var(--vs-accent) 75%, var(--vs-sec)); }
.vs-lx-row.on { background: color-mix(in srgb, var(--vs-accent) 18%, transparent); font-weight: 560; }
.vs-lx-row .main { margin-left: auto; padding: 0 6px; border-radius: 5px; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; color: var(--vs-sec); background: var(--vs-hover); }
.vs-lx-foot { padding: 8px 10px 10px; border-top: 1px solid var(--vs-hover); }
.vs-lx-engine { display: flex; align-items: center; justify-content: space-between; height: 28px; padding: 0 8px; border-radius: 7px; background: var(--vs-hover); font-size: 12px; }
.vs-lx-engine .g { font-size: 10px; color: var(--vs-sec); }

/* The strip along the top of the code and the preview: ltx-crumbs, ltx-strip. */
.vs-lx-strip {
  flex: none; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08); background: var(--vs-ground);
  color: var(--vs-sec); font-size: 12px; white-space: nowrap;
}
.vs-lx-strip .file { display: flex; align-items: center; gap: 6px; color: var(--vs-text); font-weight: 560; }
.vs-lx-strip .file .g { color: color-mix(in srgb, var(--vs-accent) 85%, #fff); font-size: 13px; }
.vs-lx-strip .gap { flex: 1; }
.vs-lx-strip .pill { height: 24px; padding: 0 9px; border-radius: 7px; display: inline-flex; align-items: center; }
.vs-lx-strip .pill.on { background: var(--vs-hover); color: var(--vs-text); }
.vs-lx-strip .pill.i { width: 26px; padding: 0; justify-content: center; font-size: 15px; }
.vs-lx-strip .cnt { font-variant-numeric: tabular-nums; }
.vs-lx-busy { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; color: var(--vs-text); opacity: 0; transition: opacity .2s ease; }
.vs-lx-busy.on { opacity: 1; }

/* The code: CodeMirror as the extension dresses it, coloured from the palette. */
.vs-lx-host { position: relative; flex: 1; overflow: hidden; }
.vs-lx-scroll { padding: 14px 0 0; font-family: var(--vs-mono); font-size: 11px; line-height: 17px; transition: transform .35s var(--vs-ease); }
.vs-ln { display: flex; min-height: 17px; }
.vs-ln .n { flex: none; width: 40px; padding: 0 6px 0 0; text-align: right; color: #5d6066; font-variant-numeric: tabular-nums; box-sizing: border-box; }
.vs-ln .t { flex: 1; min-width: 0; padding: 0 12px 0 9px; white-space: pre-wrap; overflow-wrap: anywhere; color: #fff; }
.vs-ln.at .t { background: rgba(255, 255, 255, .035); }
.vs-ln.at .n { color: var(--vs-sec); }
.vs-ln.new { transition: opacity .5s ease; }
.vs-lx-code.out .vs-ln.new { opacity: 0; }
.vs-ln .c { color: color-mix(in srgb, var(--vs-accent) 88%, #fff); }
.vs-ln .e { color: #c49ae6; }
.vs-ln .m { color: #6fc7b2; }
.vs-ln .u { color: #e0a26c; }
.vs-ln .b { color: #8a8c91; }
.vs-ln .r { color: #74767b; }
.vs-probe { position: absolute; visibility: hidden; white-space: pre; }

/* Completion: the window's popover look, keys in the code's face. */
.vs-lx-pop {
  position: absolute; z-index: 3; min-width: 250px; padding: 4px; border-radius: 10px;
  background: var(--vs-surface); border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 1px 3px rgba(0, 0, 0, .3);
  font-family: var(--vs-mono); font-size: 11px; line-height: 1.5;
  opacity: 0; transform: translateY(-3px); transition: opacity .14s ease, transform .14s ease;
}
.vs-lx-pop.on { opacity: 1; transform: none; }
.vs-lx-pop div { display: flex; align-items: baseline; gap: 14px; padding: 3px 8px; border-radius: 6px; white-space: nowrap; color: #fff; }
.vs-lx-pop div.sel { background: color-mix(in srgb, var(--vs-accent) 30%, transparent); }
.vs-lx-pop b { font-weight: 650; }
.vs-lx-pop small { margin-left: auto; font-family: var(--ui); font-size: 11px; color: var(--vs-sec); }

/* The preview: the PDF the last compile wrote, page under page. */
.vs-lx-pages { position: relative; flex: 1; overflow: hidden; padding: 14px 14px 0; }
.vs-lx-sheet { transition: transform .5s var(--vs-ease); }
.vs-lx-sheet .vs-paper { aspect-ratio: 1 / 1.414; }

/* A compiled page, set as LaTeX sets the article class: Computer Modern
   (KaTeX's own faces, which are it), justified, numbered sections and
   equations. White in both themes, as every PDF page in the app is. */
.vs-paper {
  position: relative; box-sizing: border-box; width: 100%; padding: 40px 36px 40px; background: #fff; color: #141414;
  border-radius: 2px; box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 30px rgba(0, 0, 0, .35);
  font-family: KaTeX_Main, 'Latin Modern Roman', 'CMU Serif', 'Times New Roman', serif; font-size: 12.2px; line-height: 1.32;
  text-align: justify; -webkit-hyphens: auto; hyphens: auto; font-kerning: normal;
}
.vs-paper .katex { font-size: 1em; }
.vs-paper .katex-display { margin: 0; }
/* Display maths a shade over the text, as the eye reads a page on screen. */
.vs-paper .eq .katex { font-size: 1.08em; }
.vs-paper p { margin: 0; }
.vs-paper p + p { text-indent: 1.5em; }
.vs-paper .tt { text-align: center; font-size: 20px; line-height: 1.25; }
.vs-paper .au { text-align: center; font-size: 13px; margin-top: 13px; }
.vs-paper .dt { text-align: center; font-size: 13px; margin-top: 5px; }
.vs-paper .ab { margin: 20px 20px 0; font-size: 10.8px; -webkit-hyphens: manual; hyphens: manual; }
.vs-paper .ab h6 { margin: 0 0 4px; font: inherit; font-weight: 700; text-align: center; }
.vs-paper h5 { margin: 17px 0 7px; font-size: 13.8px; font-weight: 700; text-align: left; }
.vs-paper h5 span { display: inline-block; width: 2em; }
.vs-paper .eq { position: relative; margin: 8px 0; text-align: center; }
.vs-paper .eq .no { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.vs-lx-new { opacity: 0; filter: blur(3px); transition: opacity .5s ease, filter .5s ease; }
.vs-lx-new.on { opacity: 1; filter: none; }
.vs-lx-new.on.b { transition-delay: .12s; }
.vs-lx-new.on.c { transition-delay: .24s; }
/* A line found from the source, lit (ltx-lit), then let go. */
.vs-lit {
  position: absolute; inset: -4px -6px; border-radius: 3px; pointer-events: none;
  background: color-mix(in srgb, var(--vs-accent) 22%, transparent);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--vs-accent) 55%, transparent);
  opacity: 0; transition: opacity 1.1s ease;
}
.vs-lit.on { opacity: 1; transition-duration: .3s; }

.vs-n .vs-lx-files { display: none; }
.vs-n .vs-lx-bar { display: none; }
.vs-n .vs-lx-desk { top: 0; flex-direction: column; gap: 12px; overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.vs-n .vs-lx-desk > div { border-radius: 16px; border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 30px 70px -26px rgba(0, 0, 0, .9), 0 0 60px -26px rgba(47, 123, 255, .4); }
.vs-n .vs-lx-code { width: auto; height: 214px; }
.vs-n .vs-lx-prev { width: auto; }
.vs-n .vs-lx-scroll { font-size: 10px; line-height: 16px; }
.vs-n .vs-ln { min-height: 16px; }
.vs-n .vs-ln .n { width: 36px; }
.vs-n .vs-ln .t { padding: 0 10px 0 8px; }
.vs-n .vs-lx-pages { padding: 12px 12px 0; }
.vs-n .vs-paper { padding: 26px 24px 30px; font-size: 9.6px; }
.vs-n .vs-lx-sheet .vs-paper { aspect-ratio: auto; min-height: 760px; }
.vs-n .vs-lx-strip .zoom { display: none; }

/* ---------------------------------------------------------------- The door on index.html */
.vs-dr-code { left: 0; top: 18px; width: 400px; height: 132px; border-radius: 16px; }
.vs-dr-code .vs-lx-strip { background: transparent; }
.vs-dr-code .vs-lx-scroll { padding-top: 10px; font-size: 10.5px; line-height: 19px; }
.vs-dr-code .vs-ln { min-height: 19px; }
.vs-dr-code .vs-ln .n { width: 34px; }
.vs-dr-took { display: inline-flex; align-items: center; gap: 6px; color: var(--vs-sec); font-variant-numeric: tabular-nums; }
.vs-dr-took .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--vs-good); }
.vs-dr-took .vs-ring { color: var(--vs-text); }
.vs-dr-took > * { transition: opacity .2s ease; }
.vs-dr-paper {
  position: absolute; left: 112px; top: 112px; width: 348px; height: 200px; overflow: hidden; border-radius: 4px; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 30px 70px -20px rgba(0, 0, 0, .9), 0 0 70px -20px rgba(47, 123, 255, .45);
}
.vs-dr-paper .vs-paper { box-shadow: none; padding: 26px 30px; font-size: 11px; height: 100%; }
.vs-dr-eq { position: relative; height: 66px; margin: 12px 0; }
.vs-dr-eq > div { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 17px; opacity: 0; filter: blur(4px); transform: translateY(3px); transition: opacity .45s ease, filter .45s ease, transform .55s var(--vs-ease); }
.vs-dr-eq > div.on { opacity: 1; filter: none; transform: none; }
.vs-dr-eq .no { position: absolute; right: 0; font-size: 11px; }
.vs-dr-lead, .vs-dr-after { transition: opacity .4s ease; }
.vs-dr-paper.out .vs-dr-lead, .vs-dr-paper.out .vs-dr-after { opacity: 0; }
.vs-dr-code .vs-ln .t span.typed { transition: opacity .35s ease; }
.vs-dr-code.out .typed { opacity: 0; }

.vs-n .vs-dr-code { top: 0; width: 320px; height: 112px; }
.vs-n .vs-dr-code .vs-lx-scroll { font-size: 8.4px; line-height: 16px; padding-top: 7px; }
.vs-n .vs-dr-code .vs-ln { min-height: 16px; }
.vs-n .vs-dr-code .vs-ln .n { width: 28px; }
.vs-n .vs-dr-code .vs-ln .t { padding: 0 8px 0 7px; }
.vs-n .vs-dr-code .vs-lx-strip { height: 30px; font-size: 11px; }
.vs-n .vs-dr-paper { left: 52px; top: 84px; width: 288px; height: 146px; }
.vs-n .vs-dr-paper .vs-paper { padding: 16px 20px; font-size: 9.5px; }
.vs-n .vs-dr-eq { height: 54px; margin: 8px 0; }
.vs-n .vs-dr-eq > div { font-size: 14px; }

/* ================================================================ A lecture, typed out */
.vs-lc-box { left: 0; top: 0; width: 100%; height: 418px; }
.vs-lc-head { padding: 20px 26px 14px; border-bottom: 1px solid var(--vs-rule); }
.vs-lc-head b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.012em; }
.vs-lc-head span { display: block; margin-top: 3px; font-size: 12.5px; color: var(--vs-sec); }
.vs-lc-view {
  position: absolute; left: 0; right: 0; top: 82px; bottom: 0; overflow: hidden; padding: 0 26px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 34px, #000 calc(100% - 70px), transparent calc(100% - 26px));
  mask-image: linear-gradient(180deg, transparent, #000 34px, #000 calc(100% - 70px), transparent calc(100% - 26px));
}
.vs-lc-roll { position: absolute; left: 26px; right: 26px; top: 0; transition: transform .7s var(--vs-ease); }
.vs-tb { padding-top: 22px; transition: opacity .6s ease; }
.vs-tb .hd { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.vs-tb .av { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(255, 255, 255, .11); color: var(--vs-sec); font-size: 10px; font-weight: 600; }
.vs-tb .nm { font-size: 12px; font-weight: 600; color: var(--voice); }
.vs-tb .tx { margin: 0; padding-left: 14px; border-left: 2px solid rgba(255, 255, 255, .18); font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, .92); }
.vs-tb .w { transition: opacity .5s ease; }
.vs-tb .w.p { opacity: .45; }
.vs-tb.in { animation: vs-rise .5s var(--vs-ease) both; }
@keyframes vs-rise { from { opacity: 0; transform: translateY(6px); } }

/* The meeting bar: the one capsule in the window about something still happening. */
.vs-mbar {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
  padding: 9px 10px 9px 16px; border-radius: 16px; background: var(--vs-surface); border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .5), 0 30px 60px -20px rgba(0, 0, 0, .8); white-space: nowrap;
}
.vs-mbar .rec { width: 9px; height: 9px; border-radius: 50%; background: var(--vs-danger); flex: none; }
.vs-mbar .clock { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 42px; }
.vs-mbar .meter { display: flex; align-items: center; gap: 2px; height: 18px; padding: 0 2px; }
.vs-mbar .meter i { display: block; width: 2px; height: 18px; border-radius: 1px; background: var(--vs-danger); transform: scaleY(.111); transition: transform 140ms linear; }
.vs-mbar .lines { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding-right: 8px; }
.vs-mbar .into { display: flex; align-items: center; gap: 5px; font-size: 12px; }
.vs-mbar .into .g { color: var(--vs-accent); font-size: 12px; }
.vs-mbar .sub { font-size: 11px; color: var(--vs-faint); }
.vs-mbar .stop { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--vs-danger); color: var(--vs-danger); font-size: 12px; }
.vs-mbar .stop i { width: 8px; height: 8px; border-radius: 1.5px; background: currentColor; }

.vs-n .vs-lc-box { height: 410px; }
.vs-n .vs-lc-head { padding: 16px 18px 12px; }
.vs-n .vs-lc-head b { font-size: 17px; }
.vs-n .vs-lc-view { top: 72px; padding: 0 18px; }
.vs-n .vs-lc-roll { left: 18px; right: 18px; }
.vs-n .vs-tb .tx { font-size: 14px; }
.vs-n .vs-mbar { gap: 8px; padding: 8px 8px 8px 13px; }
.vs-n .vs-mbar .lines { display: none; }

/* ================================================================ Papers */
.vs-pd-frame { left: 0; top: 0; width: 100%; height: 100%; border-radius: 14px; background: #08080a; }
.vs-pd-frame::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .26); }
.vs-pd-page {
  position: absolute; left: 50%; top: 18px; width: 620px; margin-left: -310px; height: 820px; overflow: visible;
  padding: 42px 64px 0; border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 40px rgba(0, 0, 0, .5);
  font-size: 12.3px; line-height: 1.36;
}
.vs-pd-page .jr { display: flex; justify-content: space-between; font-size: 9px; color: #555; border-bottom: .5px solid #999; padding-bottom: 5px; text-align: left; }
.vs-pd-page .tt { margin-top: 22px; font-size: 20.5px; font-weight: 700; line-height: 1.2; }
.vs-pd-page .au { margin-top: 10px; font-size: 11.5px; }
.vs-pd-page .af { text-align: center; font-size: 9.4px; font-style: italic; color: #333; margin-top: 2px; }
.vs-pd-page .ab { margin: 16px 30px 0; font-size: 10.9px; }
.vs-pd-page h5 { margin-top: 16px; font-size: 12.5px; }
.vs-pd-ink { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; }
.vs-pd-ink i {
  position: absolute; display: block; border-radius: 2.5px; transform-origin: 0 50%; transform: scaleX(0);
  transition: transform var(--t, .6s) cubic-bezier(.45, .05, .35, 1), opacity .7s ease;
}
.vs-pd-ink i.on { transform: none; }
.vs-pd-page.clean .vs-pd-ink i, .vs-pd-page.clean .vs-pd-box { opacity: 0; }
/* A text box: type on paper. While it is dragged out and typed in, the
   placing outline; at rest, nothing round it. */
.vs-pd-box {
  position: absolute; box-sizing: border-box; padding: 2px 4px; border-radius: 3px;
  font-family: var(--ui); font-size: 11.5px; line-height: 1.35; color: #1f5fbf; text-align: left;
  outline: 1px dashed transparent; outline-offset: 1px; transition: outline-color .3s ease, background-color .3s ease, opacity .7s ease;
}
.vs-pd-box.placing { outline-color: color-mix(in srgb, var(--vs-accent) 80%, transparent); background: color-mix(in srgb, var(--vs-accent) 6%, transparent); }
.vs-pd-box .katex { font-size: 1.08em; }
.vs-pd-box .vs-cur { display: none; background: #1f5fbf; height: 1.15em; }
.vs-pd-box.placing .vs-cur { display: inline-block; }
.vs-pd-box .fx { display: inline-block; opacity: 0; transition: opacity .35s ease; }
.vs-pd-box .fx.on { opacity: 1; }
/* The floating bar over the paper, pdf-bar: frosted, a capsule. */
.vs-pd-bar {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 4px;
  border-radius: 999px; background: rgba(38, 38, 40, .88); border: .5px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(28px) saturate(1.9); backdrop-filter: blur(28px) saturate(1.9);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .12);
  color: var(--vs-text); font-size: 12px; white-space: nowrap; z-index: 2;
}
.vs-pd-bar .cnt { padding: 0 8px 0 12px; color: var(--vs-sec); font-variant-numeric: tabular-nums; }
.vs-pd-bar .rule { width: 1px; height: 15px; margin: 0 4px 0 2px; background: rgba(255, 255, 255, .14); }
.vs-pd-bar .bt { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; font-size: 15px; transition: background-color .2s ease, color .2s ease; }
.vs-pd-bar .lvl { min-width: 54px; height: 26px; line-height: 26px; padding: 0 8px; text-align: center; font-variant-numeric: tabular-nums; }
.vs-pd-bar .bt.on { background: color-mix(in srgb, var(--vs-accent) 18%, transparent); color: var(--vs-accent); }
.vs-pd-bar .pen { position: relative; }
.vs-pd-bar .pen .g { font-size: 15px; }
.vs-pd-bar .pen::after { content: ""; position: absolute; left: 5px; width: 9px; bottom: 4px; height: 2.5px; border-radius: 2px; background: var(--ink, #ffe53d); transition: background-color .3s ease; }
.vs-pd-bar .hue { width: 18px; }
.vs-pd-bar .hue::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink, #ffe53d); box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .25); transition: background-color .3s ease; }
.vs-pd-bar .tx { font-family: var(--ui); font-weight: 600; font-size: 13px; }

.vs-n .vs-pd-page { width: 340px; margin-left: -170px; padding: 58px 20px 0; font-size: 9.7px; line-height: 1.34; }
.vs-n .vs-pd-page .jr { font-size: 7.2px; }
.vs-n .vs-pd-page .tt { margin-top: 14px; font-size: 15px; }
.vs-n .vs-pd-page .au { margin-top: 7px; font-size: 9.6px; }
.vs-n .vs-pd-page .af { font-size: 7.8px; }
.vs-n .vs-pd-page .ab { margin: 11px 8px 0; font-size: 8.7px; }
.vs-n .vs-pd-page h5 { margin-top: 12px; font-size: 10.6px; }
.vs-n .vs-pd-box { font-size: 9px; }
.vs-n .vs-pd-bar .lvl, .vs-n .vs-pd-bar .zm { display: none; }

/* ================================================================ Search */
.vs-sr-panel { left: 40px; top: 0; width: 470px; height: 430px; padding: 6px; display: flex; flex-direction: column; border-radius: 14px; background: var(--vs-surface); z-index: 2; font-size: 13px; }
.vs-sr-field { display: flex; align-items: center; gap: 9px; height: 42px; flex: none; padding: 0 12px; margin-bottom: 4px; border-radius: 10px; background: var(--vs-hover); font-size: 15px; }
.vs-sr-field .g { color: var(--vs-sec); font-size: 14px; }
.vs-sr-q { white-space: pre; border-radius: 2px; transition: background-color .15s ease; }
.vs-sr-q.sel { background: color-mix(in srgb, var(--vs-accent) 30%, transparent); }
.vs-sr-hint { color: var(--vs-faint); }
.vs-sr-body { position: relative; flex: 1; }
.vs-sr-hits { position: absolute; inset: 0; }
.vs-hit { padding: 8px 10px; border-radius: 7px; opacity: 0; transform: translateY(5px); transition: opacity .4s ease, transform .5s var(--vs-ease), background-color .3s ease; }
.vs-hit.on { opacity: 1; transform: none; }
.vs-hit.go { background: var(--vs-hover); }
.vs-sr-hits.out .vs-hit { opacity: 0; transform: none; transition-duration: .3s; transition-delay: 0s !important; }
.vs-hit .top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.vs-hit .pg { flex: 1; font-size: 11px; font-weight: 600; color: var(--vs-sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-hit .sc { font-size: 10px; color: var(--vs-faint); font-variant-numeric: tabular-nums; }
.vs-hit .tx { font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, .9); }
.vs-hit mark { color: inherit; font-weight: 500; border-radius: 2px; background: color-mix(in srgb, var(--vs-accent) 32%, transparent); }
.vs-sr-foot { display: flex; justify-content: flex-end; padding: 5px 10px 1px; font-size: 10.5px; color: var(--vs-faint); font-variant-numeric: tabular-nums; }

/* The page the top hit opens, behind the panel. */
.vs-sr-page { left: 470px; top: 48px; width: 450px; height: 340px; }
.vs-sr-card { position: absolute; inset: 0; padding: 28px 30px 0 70px; opacity: 0; transition: opacity .5s ease; }
.vs-sr-card.on { opacity: 1; }
.vs-sr-card .t { font-size: 22px; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; }
.vs-sr-card .m { margin-top: 4px; font-size: 12px; color: var(--vs-sec); }
.vs-sr-card p { margin: 12px 0 0; font-size: 14px; line-height: 1.6; color: rgba(255, 255, 255, .86); }
.vs-sr-card .fl { border-radius: 4px; transition: background-color .6s ease; }
.vs-sr-card.on .fl { background: color-mix(in srgb, var(--vs-accent) 26%, transparent); transition-delay: .35s; }
.vs-sr-card .vs-tb { padding-top: 14px; }
.vs-sr-card .vs-tb .tx { font-size: 14px; }
.vs-sr-card dl { margin: 14px 0 0; display: grid; grid-template-columns: 96px 1fr; gap: 8px 10px; font-size: 13.5px; }
.vs-sr-card dt { color: var(--vs-sec); }
.vs-sr-card dd { margin: 0; color: rgba(255, 255, 255, .9); }

.vs-n .vs-sr-panel { left: 0; width: 100%; }
.vs-n .vs-sr-page { display: none; }

/* ================================================================ Read aloud */
.vs-ra-page { left: 0; top: 0; width: 100%; height: 446px; background: linear-gradient(180deg, rgba(20, 20, 23, .98), rgba(14, 14, 17, .98)); }
.vs-ra-view {
  position: absolute; inset: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 6px, #000 40px, #000 calc(100% - 96px), transparent calc(100% - 40px));
  mask-image: linear-gradient(180deg, transparent 6px, #000 40px, #000 calc(100% - 96px), transparent calc(100% - 40px));
}
.vs-ra-doc { position: relative; z-index: 0; padding: 46px 84px 200px; font-size: 16px; line-height: 24px; color: #fff; }
.vs-ra-doc h4 { margin: 0 0 6px; font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.vs-ra-doc .mt { font-size: 13px; color: var(--vs-sec); margin-bottom: 14px; }
.vs-ra-doc p { margin: 0; padding: 6px 0; }
.vs-ra-glow { position: absolute; left: 0; top: 0; height: 0; pointer-events: none; z-index: -1; }
.vs-ra-glow > * { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform; }
.vs-ra-glow > .on { opacity: 1; }
.vs-ra-line { border-radius: 7px; background: color-mix(in srgb, var(--vs-accent) 17%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--vs-accent) 24%, transparent); transition: transform .32s cubic-bezier(.2, .8, .2, 1), width .32s cubic-bezier(.2, .8, .2, 1), height .2s, opacity .25s; }
.vs-ra-word { border-radius: 6px; background: color-mix(in srgb, var(--vs-accent) 36%, transparent); box-shadow: 0 1px 8px color-mix(in srgb, var(--vs-accent) 22%, transparent); transition: transform .14s ease-out, width .14s ease-out, opacity .2s; }
.vs-ra-bar { width: 3px; border-radius: 3px; background: var(--vs-accent); box-shadow: 0 0 8px color-mix(in srgb, var(--vs-accent) 40%, transparent); transition: transform .45s cubic-bezier(.2, .8, .2, 1), height .45s cubic-bezier(.2, .8, .2, 1), opacity .25s; }
.vs-ra-doc.out .vs-ra-glow > * { opacity: 0; transition-duration: .5s; }
.vs-ra-roll { transition: transform .42s cubic-bezier(.65, 0, .35, 1), opacity .5s ease; }
.vs-ra-roll.fade { opacity: 0; }

.vs-ra-player {
  left: 50%; bottom: 0; width: 540px; margin-left: -270px; height: 56px; display: flex; align-items: center; gap: 2px; padding: 8px 8px 8px 10px; box-sizing: border-box;
  border-radius: 16px; background: var(--vs-surface); border: .5px solid rgba(255, 255, 255, .14);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .12); font-size: 13px;
}
.vs-ra-player .ic { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; color: var(--vs-text); }
.vs-ra-player svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.vs-ra-player .play { width: 38px; height: 38px; border-radius: 50%; margin: 0 2px; background: #fff; color: var(--vs-surface); }
.vs-ra-player .mid { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; padding: 0 12px 0 10px; }
.vs-ra-player .st { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--vs-sec); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vs-ra-player .rail { height: 4px; margin: 6px 0; border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, .1); }
.vs-ra-player .fill { display: block; height: 100%; width: 0; background: var(--vs-accent); transition: width .3s linear; }
.vs-ra-player .sp { height: 32px; padding: 0 8px; display: grid; place-items: center; color: var(--vs-sec); font-variant-numeric: tabular-nums; }
.vs-ra-player .vc { display: inline-flex; align-items: center; gap: 3px; height: 30px; margin: 0 2px 0 2px; padding: 0 7px 0 11px; border-radius: 15px; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .16); white-space: nowrap; }
.vs-ra-player .vc svg { width: 14px; height: 14px; color: var(--vs-sec); }

.vs-n .vs-ra-page { height: 430px; }
.vs-n .vs-ra-doc { padding: 30px 26px 200px; font-size: 15px; line-height: 23px; }
.vs-n .vs-ra-doc h4 { font-size: 25px; }
.vs-n .vs-ra-player { width: 336px; margin-left: -168px; }
.vs-n .vs-ra-player .sp, .vs-n .vs-ra-player .vc, .vs-n .vs-ra-player .bk, .vs-n .vs-ra-player .nx { display: none; }

/* ================================================================ A group project */
.vs-gr-page { left: 0; top: 0; width: 100%; height: 100%; background: linear-gradient(180deg, rgba(20, 20, 23, .98), rgba(14, 14, 17, .98)); }
.vs-gr-doc { padding: 40px 64px 0; font-size: 15px; line-height: 26px; color: #fff; }
.vs-gr-doc h4 { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.vs-gr-doc h5 { margin: 18px 0 2px; font-size: 18px; line-height: 26px; font-weight: 700; letter-spacing: -.01em; }
.vs-gr-doc p { margin: 0; padding: 4px 0; color: rgba(255, 255, 255, .9); }
.vs-gr-doc ul { list-style: none; margin: 0; padding: 0; }
.vs-gr-doc li { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
.vs-gr-doc li .bx { flex: none; width: 15px; height: 15px; box-sizing: border-box; border-radius: 4px; border: 1.5px solid var(--vs-faint); transition: background-color .25s ease, border-color .25s ease; }
.vs-gr-doc li .bx svg { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .2s ease; }
.vs-gr-doc li.done .bx { background: var(--vs-accent); border-color: var(--vs-accent); }
.vs-gr-doc li.done .bx svg { opacity: 1; }
.vs-gr-doc li .lt { transition: color .3s ease; }
.vs-gr-doc li.done .lt { color: var(--vs-sec); text-decoration: line-through; text-decoration-color: rgba(155, 155, 152, .6); }
.vs-gr-doc .typed { transition: opacity .6s ease; }
.vs-gr-doc.out .typed { opacity: 0; }
/* Somebody else's caret: their colour, their name over it (live-caret). */
.vs-pen { position: relative; display: inline-block; width: 2px; height: 1.25em; margin: 0 -1px; vertical-align: text-bottom; border-radius: 1px; background: var(--c); transition: opacity .5s ease; }
.vs-pen::after {
  content: attr(data-who); position: absolute; left: 0; bottom: 100%; margin-bottom: 1px; padding: 1px 5px; border-radius: 3px 3px 3px 0;
  background: var(--c); color: #fff; font-size: 10px; font-weight: 600; line-height: 1.35; white-space: nowrap; opacity: .94;
}
.vs-gr-doc.out .vs-pen { opacity: 0; }
/* The ticked task fades and comes back unticked, so the loop never un-ticks it in view. */
.vs-gr-doc li.tk { transition: opacity .6s ease; }
.vs-gr-doc.out li.tk { opacity: 0; }
.vs-gr-faces {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 5px 6px;
  border-radius: 10px; background: rgba(28, 29, 31, .86); box-shadow: 0 0 0 .5px rgba(255, 255, 255, .08), 0 4px 14px rgba(0, 0, 0, .3);
}
.vs-face { position: relative; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: #f2f2f0; color: #141416; font-size: 11px; font-weight: 600; opacity: .38; }
.vs-face.here { opacity: 1; }
.vs-face.live { box-shadow: 0 0 0 1.5px #0e0e11, 0 0 0 3px var(--c); }
.vs-face.here::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 6px; height: 6px; border-radius: 50%; background: #35c46c; box-shadow: 0 0 0 1.5px #0e0e11; }

.vs-n .vs-gr-doc { padding: 28px 24px 0; font-size: 14px; line-height: 24px; }
.vs-n .vs-gr-doc h4 { font-size: 23px; }
.vs-n .vs-gr-doc h5 { font-size: 16px; margin-top: 14px; }

@media (prefers-reduced-motion: reduce) {
  .vs *, .vs *::before, .vs *::after { transition: none !important; animation: none !important; }
}
