#demo-capture .capture-rows {
  display: block;
}

#demo-capture .capture-row {
  display: grid;
  grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
  align-items: start;
  gap: 48px;
  padding-block: 64px;
  border-top: 1px solid var(--line);
}

#demo-capture .capture-row:first-child {
  border-top: 0;
}

#demo-capture .capture-copy {
  max-width: 30rem;
}

#demo-capture .capture-copy h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
}

#demo-capture .capture-copy-keys {
  margin-top: 12px;
}

#demo-capture .capture-copy-keys .fn-keys {
  gap: 5px;
}

#demo-capture .capture-copy-keys .keycap {
  min-width: 36px;
  min-height: 36px;
  padding-inline: 8px;
  font-size: 16px;
}

#demo-capture .capture-copy p {
  max-width: 30rem;
  margin-top: 16px;
  color: var(--ink-2);
  font-size: var(--type-body);
  line-height: 1.6;
}

#demo-capture .capture-vignette {
  position: relative;
  width: 100%;
  min-width: 0;
  margin: 0;
  aspect-ratio: 640 / 360;
}

#demo-capture .capture-art {
  position: relative;
  width: 640px;
  height: 360px;
  overflow: hidden;
  background: var(--bg-raised);
  color: var(--ink);
  font-family: var(--font-ui);
}

#demo-capture .capture-vignette .fn-pause {
  position: absolute;
  z-index: 20;
  right: 12px;
  bottom: 12px;
}

#demo-capture .capture-vignette.is-static .fn-pause {
  display: none;
}

/* Text capture scene */
#demo-capture .capture-pdf-window {
  position: absolute;
  top: 48px;
  left: 28px;
  width: 556px;
  height: 276px;
}

#demo-capture .capture-pdf-body {
  position: relative;
  height: 246px;
  background: var(--card);
}

#demo-capture .capture-pdf-toolbar {
  display: flex;
  height: 28px;
  align-items: center;
  justify-content: space-between;
  padding-inline: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 10px;
  line-height: 1;
}

#demo-capture .capture-paper {
  width: 500px;
  margin: 13px auto 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  line-height: 1.43;
}

#demo-capture .capture-paper h4 {
  margin: 0 0 7px;
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: inherit;
}

#demo-capture .capture-paper p {
  margin: 0 0 7px;
}

#demo-capture .capture-selected-sentence {
  border-radius: 1px;
  background: transparent;
  transition: background-color 180ms var(--ease-out);
}

#demo-capture .capture-text-art.is-selected .capture-selected-sentence {
  background: var(--select);
}

#demo-capture .capture-focus-tag {
  position: absolute;
  z-index: 4;
  top: 32px;
  left: 48px;
}

#demo-capture .capture-video-focus-tag,
#demo-capture .capture-browser-focus-tag {
  position: absolute;
  z-index: 4;
}

#demo-capture .capture-video-focus-tag {
  top: 24px;
  left: 44px;
}

#demo-capture .capture-browser-focus-tag {
  top: 26px;
  left: 48px;
}

#demo-capture .capture-text-pointer,
#demo-capture .capture-text-ibeam,
#demo-capture .capture-note-pointer {
  position: absolute;
  z-index: 8;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(var(--pointer-x, 0), var(--pointer-y, 0), 0);
  transition: opacity 150ms var(--ease-out), transform 650ms var(--ease-out);
}

#demo-capture .capture-text-pointer {
  width: 20px;
  height: 24px;
}

#demo-capture .capture-text-pointer.is-visible {
  opacity: 1;
}

#demo-capture .capture-arrow-svg {
  display: block;
  width: 20px;
  height: 24px;
}

#demo-capture .capture-text-ibeam {
  width: 16px;
  height: 24px;
  opacity: 0;
}

#demo-capture .capture-text-ibeam svg {
  display: block;
  width: 16px;
  height: 24px;
}

#demo-capture .capture-text-art.is-selected .capture-text-ibeam,
#demo-capture .capture-text-art.is-saved .capture-text-ibeam {
  opacity: 1;
}

#demo-capture .capture-text-keys,
#demo-capture .capture-area-keys,
#demo-capture .capture-note-keys,
#demo-capture .capture-note-save-keys {
  position: absolute;
  z-index: 9;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out);
}

#demo-capture .capture-text-keys.is-visible,
#demo-capture .capture-area-keys.is-visible,
#demo-capture .capture-note-keys.is-visible,
#demo-capture .capture-note-save-keys.is-visible {
  opacity: 1;
  transform: translateY(0);
}

#demo-capture .capture-text-keys {
  top: 38px;
  right: 28px;
}

#demo-capture .capture-vignette {
  --toast-scale: var(--toast-demo-scale);
}

#demo-capture .capture-text-toast,
#demo-capture .capture-area-toast,
#demo-capture .capture-note-toast {
  position: absolute;
  bottom: 28px;
  left: 50%;
  z-index: 9;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px) scale(var(--toast-scale));
  transform-origin: bottom center;
  transition: opacity 200ms var(--ease-in), transform 0ms linear 200ms;
}

#demo-capture .capture-text-toast.is-visible,
#demo-capture .capture-area-toast.is-visible,
#demo-capture .capture-note-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(var(--toast-scale));
  transition: opacity var(--t-toast) var(--ease-out), transform var(--t-toast) var(--ease-out);
}

#demo-capture .capture-markdown-card {
  position: absolute;
  z-index: 7;
  right: 18px;
  bottom: 44px;
  width: 300px;
  min-height: 158px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  box-shadow: var(--shadow-panel);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out);
}

#demo-capture .capture-text-art.is-markdown .capture-markdown-card {
  opacity: 1;
  transform: translateY(0);
}

#demo-capture .capture-markdown-title {
  height: 28px;
  padding: 7px 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.2;
}

#demo-capture .capture-markdown-content {
  padding: 9px 10px 10px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

#demo-capture .capture-md-heading {
  color: var(--accent);
}

#demo-capture .capture-md-comment {
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 10px;
}

#demo-capture .capture-md-sentence {
  margin-top: 8px;
}

/* Screen-area capture scene */
#demo-capture .capture-video-window {
  position: absolute;
  top: 40px;
  left: 24px;
  width: 452px;
  height: 282px;
}

#demo-capture .capture-video-body {
  position: relative;
  height: 254px;
  background: var(--card);
}

#demo-capture .capture-video-screen {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--bg-raised);
}

#demo-capture .capture-slide-title {
  position: absolute;
  top: 18px;
  left: 26px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

#demo-capture .capture-video-table {
  position: absolute;
  top: 57px;
  left: 26px;
  width: 348px;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
}

#demo-capture .capture-video-table tr {
  height: 29px;
  border-bottom: 1px solid var(--line);
}

#demo-capture .capture-video-table td {
  padding: 5px 9px;
}

#demo-capture .capture-video-table td:first-child {
  width: 56%;
  color: var(--ink-2);
}

#demo-capture .capture-video-shade {
  position: absolute;
  z-index: 3;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 48%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease-out;
}

#demo-capture .capture-video-window.is-dimmed .capture-video-shade {
  opacity: 1;
}

#demo-capture .capture-selection-box {
  position: absolute;
  z-index: 4;
  top: 60px;
  left: 26px;
  width: 350px;
  height: 92px;
  border: 1.5px solid var(--accent);
  border-radius: 2px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  opacity: 0;
  transform: scale(.023, .087);
  transform-origin: top left;
  transition: transform 700ms var(--ease-out), opacity 100ms ease-out;
}

#demo-capture .capture-area-art.is-dragging .capture-selection-box {
  transform: scale(1);
  opacity: 1;
}

#demo-capture .capture-crosshair {
  position: absolute;
  z-index: 5;
  top: 60px;
  left: 26px;
  width: 20px;
  height: 20px;
  opacity: 0;
  pointer-events: none;
}

#demo-capture .capture-crosshair svg {
  display: block;
  width: 20px;
  height: 20px;
}

#demo-capture .capture-crosshair.is-visible {
  opacity: 1;
  animation: d-capture-crosshair-drag 850ms var(--ease-out) both;
}

@keyframes d-capture-crosshair-drag {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(var(--drag-dx, 320px), var(--drag-dy, 75px), 0); }
}

#demo-capture .capture-video-controls {
  display: flex;
  height: 34px;
  align-items: center;
  gap: 9px;
  padding-inline: 12px;
  color: var(--ink-2);
  font-size: 9px;
  line-height: 1;
}

#demo-capture .capture-play-icon {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid var(--ink-2);
}

#demo-capture .capture-video-time {
  flex: 0 0 auto;
}

#demo-capture .capture-video-track {
  position: relative;
  display: block;
  height: 2px;
  flex: 1 1 auto;
  border-radius: 2px;
  background: var(--line);
}

#demo-capture .capture-video-track span {
  display: block;
  width: 44%;
  height: 100%;
  border-radius: inherit;
  background: var(--ink-2);
}

#demo-capture .capture-area-keys {
  top: 48px;
  left: 36px;
}

#demo-capture .capture-area-art.is-flash::after {
  position: absolute;
  z-index: 6;
  inset: 0;
  background: color-mix(in srgb, var(--ink) 18%, transparent);
  content: "";
  pointer-events: none;
  animation: d-capture-flash 420ms ease-out both;
}

@keyframes d-capture-flash {
  from { opacity: .9; }
  to { opacity: 0; }
}

#demo-capture .capture-thumbnail {
  position: absolute;
  z-index: 7;
  top: 88px;
  left: 382px;
  width: 230px;
  height: 156px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  box-shadow: var(--shadow-panel);
  opacity: 0;
  transform: translate3d(28px, 0, 0) scale(.94);
  transition: opacity 320ms var(--ease-out), transform 420ms var(--ease-out);
}

#demo-capture .capture-area-art.is-captured .capture-thumbnail {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

#demo-capture .capture-thumb-topline {
  display: flex;
  height: 24px;
  align-items: center;
  justify-content: space-between;
  padding-inline: 9px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 9px;
  line-height: 1;
}

#demo-capture .capture-thumb-slide {
  position: relative;
  height: 131px;
  padding: 10px 10px 8px;
  background: var(--bg-raised);
}

#demo-capture .capture-thumb-title {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

#demo-capture .capture-thumb-table {
  margin-top: 7px;
  color: var(--ink-2);
  font-size: 8px;
  line-height: 1.25;
}

#demo-capture .capture-thumb-row {
  display: grid;
  min-height: 21px;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 5px;
  border-bottom: 1px solid var(--line);
}

#demo-capture .capture-ocr-word {
  border-radius: 2px;
  background: transparent;
  transition: background-color 110ms ease-out;
}

#demo-capture .capture-ocr-word.is-found {
  background: var(--accent-soft);
}

#demo-capture .capture-scan-line {
  position: absolute;
  z-index: 2;
  top: 35px;
  right: 8px;
  left: 8px;
  height: 1px;
  background: var(--accent);
  opacity: 0;
  transform: translateY(0);
  transition: transform 220ms linear, opacity 120ms ease-out;
}

#demo-capture .capture-thumbnail.is-scanning .capture-scan-line {
  opacity: 1;
}

#demo-capture .capture-searchable-pill {
  position: absolute;
  z-index: 8;
  top: 252px;
  left: 382px;
  max-width: 230px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-2);
  font-size: 10px;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}

#demo-capture .capture-searchable-pill.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Quick-note scene */
#demo-capture .capture-browser-window {
  position: absolute;
  top: 42px;
  left: 28px;
  width: 584px;
  height: 276px;
}

#demo-capture .capture-map-body {
  position: relative;
  height: 248px;
  overflow: hidden;
  background: var(--bg-raised);
}

#demo-capture .capture-map-content {
  position: absolute;
  inset: 0;
  transition: transform 650ms var(--ease-out);
}

#demo-capture .capture-note-art.is-map-dragged .capture-map-content {
  transform: translateX(-40px);
}

#demo-capture .capture-map-streets,
#demo-capture .capture-map-route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#demo-capture .capture-map-streets {
  overflow: visible;
}

#demo-capture .capture-note-pointer {
  z-index: 12;
  width: 20px;
  height: 24px;
  opacity: 0;
}

#demo-capture .capture-note-pointer.is-visible {
  opacity: 1;
}

/* Press feedback at the click, pivoting on the arrow tip. */
#demo-capture .capture-note-pointer .capture-arrow-svg {
  transform-origin: 2px 1.5px;
  transition: transform 80ms ease-out;
}

#demo-capture .capture-note-pointer.is-pressed .capture-arrow-svg {
  transform: scale(.85);
}

#demo-capture .capture-quick-panel {
  position: absolute;
  z-index: 10;
  top: 92px;
  left: 276px;
  width: 340px;
  height: 200px;
  overflow: hidden;
  border-radius: var(--radius-quick);
  background: var(--panel);
  opacity: 0;
  transform: scale(.98);
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
}

#demo-capture .capture-quick-panel.is-open {
  opacity: 1;
  transform: scale(1);
}

#demo-capture .capture-quick-panel.is-saving {
  opacity: 0;
  transform: scale(.98);
  transition-duration: 320ms;
}

#demo-capture .capture-quick-topband {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  left: 0;
  height: 38px;
}

#demo-capture .capture-quick-title {
  position: absolute;
  top: 0;
  left: 50%;
  width: 140px;
  overflow: hidden;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 500;
  line-height: 38px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateX(-50%);
  transition: color var(--t-out) var(--ease-in);
}

#demo-capture .capture-quick-panel.is-hover .capture-quick-title {
  color: var(--ink-2);
  transition: color var(--t-fast) var(--ease-out);
}

#demo-capture .capture-quick-left,
#demo-capture .capture-quick-cluster {
  position: absolute;
  top: 5px;
  display: flex;
  height: 28px;
  align-items: center;
  opacity: 0;
  transition: opacity var(--t-out) var(--ease-in);
}

#demo-capture .capture-quick-left {
  left: 8px;
  gap: 1px;
}

#demo-capture .capture-quick-cluster {
  right: 9px;
  gap: 0;
  padding: 1px;
  border: .5px solid var(--line);
  border-radius: 14px;
  background: var(--fill-soft);
}

#demo-capture .capture-quick-panel.is-hover .capture-quick-left,
#demo-capture .capture-quick-panel.is-hover .capture-quick-cluster {
  opacity: 1;
  transition: opacity var(--t-fast) var(--ease-out);
}

#demo-capture .capture-icon-button {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-2);
}

#demo-capture .capture-quick-cluster .capture-icon-button {
  width: 25px;
  height: 24px;
}

#demo-capture .capture-icon-button svg {
  display: block;
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#demo-capture .capture-quick-cluster .capture-icon-button:last-child svg {
  fill: currentColor;
  stroke: none;
}

#demo-capture .capture-quick-body {
  position: absolute;
  top: 38px;
  right: 20px;
  bottom: 38px;
  left: 20px;
  padding-top: 13px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

#demo-capture .capture-note-heading {
  min-height: 20px;
  margin-bottom: 2px;
  font-size: 15px;
  line-height: 1.25;
}

#demo-capture .capture-note-task {
  display: none;
  min-height: 20px;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
  white-space: nowrap;
}

#demo-capture .capture-note-task.is-visible {
  display: flex;
}

/* Mirrors the app's drawCheckbox: 13px box, 1.5px stroke inside the rect,
   3.5px radius, white tick on accent fill, tick points relative to the full box. */
#demo-capture .capture-task-checkbox {
  position: relative;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border: 1.5px solid var(--accent);
  border-radius: 3.5px;
  background-color: transparent;
  transition: background-color 120ms ease-out;
}

/* Cover the border box, not the content box, so the tick sits where the app draws it. */
#demo-capture .capture-task-checkbox svg {
  position: absolute;
  inset: -1.5px;
  display: block;
  width: 13px;
  height: 13px;
  overflow: visible;
}

/* 10.24 is the polyline's length in viewBox units. */
#demo-capture .capture-task-checkbox polyline {
  fill: none;
  stroke: #fff;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 10.24;
  stroke-dashoffset: 10.24;
  opacity: 0;
}

#demo-capture .capture-task-text {
  text-decoration-line: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: transparent;
  transition: color 200ms ease-out, text-decoration-color 200ms ease-out;
}

#demo-capture .capture-note-task.is-checked .capture-task-checkbox {
  background-color: var(--accent);
}

#demo-capture .capture-note-task.is-checked .capture-task-checkbox polyline {
  opacity: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 220ms cubic-bezier(.3, 0, .2, 1) 60ms;
}

/* Completed task: secondary colour + strikethrough, as in the editor. */
#demo-capture .capture-note-task.is-checked .capture-task-text {
  color: var(--ink-3);
  text-decoration-color: currentColor;
}

#demo-capture .capture-quick-footer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  height: 38px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity var(--t-out) var(--ease-in);
}

#demo-capture .capture-quick-panel.is-hover .capture-quick-footer {
  opacity: 1;
  transition: opacity var(--t-fast) var(--ease-out);
}

#demo-capture .capture-quick-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

#demo-capture .capture-quick-footer .keycap {
  min-width: 22px;
  min-height: 18px;
  padding-inline: 4px;
  border-radius: var(--radius-keycap-small);
  font-size: 10px;
  line-height: 1;
}

#demo-capture .capture-note-caption {
  position: absolute;
  z-index: 8;
  bottom: 19px;
  left: 20px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}

#demo-capture .capture-note-caption.is-visible {
  opacity: 1;
  transform: translateY(0);
}

#demo-capture .capture-note-keys {
  top: 48px;
  left: 22px;
}

#demo-capture .capture-note-save-keys {
  bottom: 19px;
  left: 20px;
}

@media (max-width: 720px) {
  #demo-capture .capture-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
}

/* Keep stage annotations legible when the vignette is reduced for narrow layouts. */
#demo-capture .capture-vignette.is-compact .focus-tag {
  font-size: 14px;
  transform: scale(var(--boost));
  transform-origin: bottom left;
}

#demo-capture .capture-vignette.is-compact .fn-keys--overlay {
  transform: scale(var(--boost));
  transform-origin: bottom center;
}

#demo-capture .capture-vignette.is-compact .fn-keys--overlay .keycap {
  font-size: 14px;
}

#demo-capture .capture-vignette.is-compact {
  --toast-scale: calc(min(var(--boost), 1.6) * var(--toast-demo-scale));
}

#demo-capture .capture-vignette.is-compact .capture-markdown-title-text {
  display: inline-block;
  font-size: 14px;
  transform: scale(var(--boost));
  transform-origin: top left;
}

#demo-capture .capture-vignette.is-compact .capture-searchable-pill {
  font-size: 14px;
  transform: translateY(4px) scale(var(--boost));
  transform-origin: top right;
}

#demo-capture .capture-vignette.is-compact .capture-searchable-pill.is-visible {
  transform: translateY(0) scale(var(--boost));
}

#demo-capture .capture-vignette.is-compact .capture-note-caption {
  font-size: 14px;
  transform: translateY(4px) scale(var(--boost));
  transform-origin: bottom left;
}

#demo-capture .capture-vignette.is-compact .capture-note-caption.is-visible {
  transform: translateY(0) scale(var(--boost));
}

#demo-capture .capture-vignette.is-static .fn-toast {
  transition: none;
}
