/* ClipoTxt Interactive Product Demonstration — Section 2 (#next)
   Preserves .next design tokens, #aStage .mac/.knot geometry for motion-options.js & lesson-ways-options.js,
   and renders genuine ClipoTxt Liquid Glass + Obsidian interactive Capture -> Extract -> Paste stages. */
.next {
  --muted: var(--c-muted);
  --line: var(--c-haze-14);
  --line2: var(--c-haze-24);
  --sys: var(--font-system);
  --app: var(--c-1c1d22);
  --app2: var(--c-232429);
  --app3: var(--c-2b2c32);
  --gl: var(--c-white-6p5);
  --tx: var(--c-e8e9ec);
  --tx2: var(--c-a9adb8);
  --tx3: var(--c-7c808c);
  --pick: var(--c-2f9e6a);
  --accent: var(--c-thread);
  --cobaltk: var(--c-506cff);
}
.serif {
  font-family: var(--font-display);
  font-weight: 400;
}
.next em {
  color: var(--brass);
  font-style: italic;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.next-head {
  text-align: center;
}
.next-head .mono {
  color: var(--cobalt);
  margin-bottom: 18px;
}
.next-head h2 {
  font-size: clamp(44px, 5.4vw, 72px);
  line-height: 1;
}
.next-head p {
  margin: 18px auto 0;
  max-width: 560px;
  color: var(--mist);
  font-size: 16px;
  line-height: 1.6;
}

.lesson {
  max-width: 1040px;
  margin: 8vh auto 0;
}

/* Interactive 3-step cards above the demo window */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.step {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--line);
  opacity: 0.68;
  transition:
    opacity 0.35s,
    border-color 0.35s,
    background 0.35s;
}
.step::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.step:hover {
  opacity: 0.94;
  border-color: var(--line2);
}
.step.on {
  opacity: 1;
  border-color: var(--line2);
  background: var(--c-cream-3);
}
.step.on::before {
  transform: scaleX(0.24);
}
.step.done {
  opacity: 0.88;
}
.step.done::before {
  transform: scaleX(1);
}
.step-btn {
  width: 100%;
  height: 100%;
  display: block;
  text-align: left;
  background: none;
  border: 0;
  color: inherit;
  padding: 18px 18px 16px;
  border-radius: 14px;
  cursor: pointer;
  font: inherit;
  touch-action: manipulation;
}
.step-btn:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}
.step .st-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.step .t {
  color: var(--brass);
  font-variant-numeric: tabular-nums;
}
.step h3 {
  margin-top: 8px;
  font-size: 26px;
  line-height: 1.05;
}
.step p {
  margin-top: 6px;
  color: var(--mist);
  font-size: 14px;
  line-height: 1.5;
}
.step p kbd {
  font: 500 11.5px var(--font-mono);
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--line2);
  color: var(--cream);
}

/* Demo Stage Container (.mac preserved cleanly) */
.stage {
  position: relative;
  margin: 30px 0 0;
  font-family: var(--sys);
}
.mac {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #090d18;
  color: var(--tx);
  border: 1px solid var(--c-white-13);
  box-shadow:
    0 0 0 0.5px var(--c-black-80),
    inset 0 1px 0 var(--c-white-8),
    0 50px 120px var(--c-black-60),
    0 20px 40px var(--c-black-35);
  opacity: 0;
  transform: translateY(46px) scale(0.965);
  transition:
    opacity 1.1s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.stage.in .mac {
  opacity: 1;
  transform: none;
}
.ct-demo-shell button,
.ct-demo-shell input,
.ct-demo-shell textarea {
  touch-action: manipulation;
}

.mac-title {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 14px;
  background: var(--c-1c1d22);
  border-bottom: 1px solid var(--c-white-8);
}
.ct-mac-dots {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.ct-mac-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-white-12);
}
.ct-mac-dots span:nth-child(1) {
  background: rgba(232, 113, 78, 0.72);
}
.ct-mac-dots span:nth-child(2) {
  background: rgba(209, 167, 95, 0.72);
}
.ct-mac-dots span:nth-child(3) {
  background: rgba(76, 200, 140, 0.72);
}
.mac-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-d9dbe0);
  white-space: nowrap;
}
.ct-win-ico {
  border-radius: 4px;
  display: block;
}

/* Guidance Mode Selector + Logo Tour Trigger */
.ct-mode-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ct-tour-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(140, 193, 82, 0.42);
  background: rgba(140, 193, 82, 0.14);
  color: #cbe8a6;
  font: 600 11.5px var(--sys);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, transform 0.15s;
}
.ct-tour-btn:hover:not(:disabled) {
  background: rgba(140, 193, 82, 0.24);
  border-color: #8cc152;
  transform: translateY(-1px);
}
.ct-tour-btn:disabled,
.ct-mode-btn:disabled {
  opacity: 0.46;
  cursor: default;
}
.ct-tour-btn.is-playing {
  background: #8cc152;
  border-color: #a3d66b;
  color: #0e1a0c;
}
.ct-tour-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.ct-tour-btn.is-playing .ct-tour-dot {
  animation: ctTourPulse 1s ease-in-out infinite;
}
@keyframes ctTourPulse {
  50% { opacity: 0.35; transform: scale(1.3); }
}
.ct-mode-switch {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 999px;
  background: #0b0e18;
  border: 1px solid var(--c-white-12);
  flex-shrink: 0;
}
.ct-mode-btn {
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--tx2);
  font: 600 11.5px var(--sys);
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}
.ct-mode-btn:hover {
  color: var(--cream);
}
.ct-mode-btn.on {
  background: var(--cream);
  color: var(--c-night);
}
.ct-mode-btn:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

/* Interactive Viewport */
.ct-viewport {
  position: relative;
  min-height: 460px;
  background: radial-gradient(
    110% 85% at 18% 0%,
    #141c36 0%,
    #090c17 65%,
    #070912 100%
  );
  overflow: hidden;
}
.ct-stage-pane {
  position: relative;
  width: 100%;
  min-height: 440px;
  padding: 18px 22px 22px;
  box-sizing: border-box;
  animation: ctPaneIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ct-stage-pane[hidden] {
  display: none;
}
@keyframes ctPaneIn {
  from {
    opacity: 0.76;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Stage 01: Capture Desktop Workspace */
.ct-desktop-space {
  max-width: 860px;
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid var(--c-white-12);
  background: #0f1423;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.ct-desktop-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 10px 16px;
  background: #090d18;
  border-bottom: 1px solid var(--c-white-8);
  font-size: 12px;
  color: var(--tx2);
  flex-wrap: wrap;
}
.ct-desk-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--cream);
}
.ct-desk-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.ct-desk-status {
  font-size: 11px;
  color: var(--mist);
}
.ct-workspace-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ct-doc-context {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ct-doc-line {
  height: 8px;
  border-radius: 999px;
  background: rgba(185, 193, 211, 0.1);
}
.ct-doc-line.w60 {
  width: 58%;
}
.ct-doc-line.w45 {
  width: 38%;
}

.ct-capture-region {
  position: relative;
  display: block;
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: 2px dashed rgba(120, 144, 255, 0.65);
  background: rgba(120, 144, 255, 0.06);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.2s;
}
.ct-capture-region:hover {
  border-color: #93a8ff;
  background: rgba(120, 144, 255, 0.11);
}
.ct-capture-region:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}
.ct-sample-img {
  width: 100%;
  max-height: 245px;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  background: #f4f7f6;
}
.ct-marquee-frame {
  position: absolute;
  inset: 6px;
  border-radius: 10px;
  pointer-events: none;
}
.ct-handle {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #7890ff;
  border: 1px solid #060810;
}
.ct-handle.tl {
  left: -4px;
  top: -4px;
}
.ct-handle.tr {
  right: -4px;
  top: -4px;
}
.ct-handle.bl {
  left: -4px;
  bottom: -4px;
}
.ct-handle.br {
  right: -4px;
  bottom: -4px;
}
.ct-dim-chip {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(6, 8, 16, 0.88);
  border: 1px solid rgba(120, 144, 255, 0.45);
  color: #eef2ff;
  font-size: 10.5px;
}
.ct-shutter-flash {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: #f1ecdf;
  opacity: 0;
  pointer-events: none;
}
.ct-cap-pane.is-snapping .ct-shutter-flash {
  animation: ctFlash 0.35s ease-out;
}
.ct-cap-pane.is-captured .ct-capture-region {
  border-style: solid;
  border-color: #4cc88c;
  background: rgba(76, 200, 140, 0.08);
}
@keyframes ctFlash {
  0% {
    opacity: 0.65;
  }
  100% {
    opacity: 0;
  }
}

.ct-cap-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.ct-hotkey-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--mist);
}
.ct-hotkey-hint kbd {
  font: 600 11.5px var(--sys);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line2);
  background: var(--app3);
  color: var(--cream);
}

.ct-primary-action {
  padding: 9px 18px;
  border-radius: 999px;
  border: 0;
  background: var(--cream);
  color: var(--c-night);
  font: 600 13px var(--sys);
  cursor: pointer;
  transition:
    transform 0.2s,
    background 0.2s;
}
.ct-primary-action:hover:not(:disabled) {
  transform: scale(1.03);
  background: #fff;
}
.ct-primary-action:disabled {
  opacity: 0.65;
  cursor: default;
}
.ct-primary-action:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

.ct-secondary-action {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: rgba(241, 236, 223, 0.06);
  color: var(--cream);
  font: 600 12.5px var(--sys);
  cursor: pointer;
}
.ct-secondary-action:hover {
  background: rgba(241, 236, 223, 0.12);
}

.ct-detect-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(47, 158, 106, 0.14);
  border: 1px solid rgba(76, 200, 140, 0.4);
}
.ct-detect-banner[hidden] {
  display: none;
}
.ct-detect-logo {
  border-radius: 6px;
  flex-shrink: 0;
}
.ct-detect-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--mist);
}
.ct-detect-copy strong {
  color: #d1fae5;
  font-size: 12.5px;
}
.ct-mini-next {
  padding: 7px 14px;
  border-radius: 999px;
  border: 0;
  background: #1a3529;
  color: #ecfdf5;
  font: 600 12px var(--sys);
  cursor: pointer;
  border: 1px solid rgba(76, 200, 140, 0.45);
  white-space: nowrap;
}
.ct-mini-next:hover {
  background: #234737;
}

/* Stage 02: Extract — Authentic ClipoTxt Liquid Glass Interface */
.ct-app-shell {
  display: grid;
  grid-template-columns: 188px 1fr;
  border-radius: 12px;
  overflow: hidden;
  background: #f5f4ef;
  color: #1b2620;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  min-height: 412px;
}
.ct-app-sidebar {
  background: #eceae2;
  border-right: 1px solid rgba(26, 53, 41, 0.1);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ct-app-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: #16241d;
}
.ct-app-status-dot {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.ct-app-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ct-nav-item {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: #526158;
}
.ct-nav-item.on {
  background: #1a3529;
  color: #f6f5f0;
  font-weight: 600;
}
.ct-app-privacy {
  margin-top: auto;
  padding: 10px;
  border-radius: 8px;
  background: #f9f8f4;
  border: 1px solid rgba(26, 53, 41, 0.12);
  font-size: 11px;
  color: #526158;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ct-app-privacy strong {
  color: #16241d;
  font-size: 11.5px;
}

.ct-app-main {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.ct-app-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.ct-app-kicker {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #5a6961;
  font-weight: 700;
}
.ct-app-h {
  font-size: 21px;
  font-weight: 800;
  color: #13211a;
  letter-spacing: -0.02em;
  margin-top: 2px;
}
.ct-clip-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(26, 53, 41, 0.15);
  font-size: 12px;
  font-weight: 600;
  color: #3c4b43;
}
.ct-clip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}
.ct-clip-indicator.busy .ct-clip-dot {
  background: #d97706;
}
.ct-clip-indicator.ready {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
}
.ct-clip-indicator.ready .ct-clip-dot {
  background: #16a34a;
}

.ct-app-grid {
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.ct-app-preview-card,
.ct-app-result-card {
  background: #fff;
  border: 1px solid rgba(26, 53, 41, 0.11);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.ct-card-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: #2b3d34;
}
.ct-preview-frame {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #f4f7f6;
  border: 1px solid rgba(26, 53, 41, 0.1);
  padding: 6px;
}
.ct-preview-frame img {
  width: 100%;
  height: 148px;
  object-fit: contain;
  display: block;
}
.ct-scan-beam {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    #16a34a,
    #8cc152,
    transparent
  );
  opacity: 0;
  pointer-events: none;
}
.ct-ext-pane.is-scanning .ct-scan-beam {
  opacity: 1;
  animation: ctOcrScan 0.55s ease-in-out infinite;
}
@keyframes ctOcrScan {
  0% {
    top: 4%;
  }
  100% {
    top: 92%;
  }
}

.ct-format-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}
.ct-ctx-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(26, 53, 41, 0.16);
  background: #f5f4ef;
  color: #1c2d24;
  font-size: 11.5px;
  cursor: pointer;
}
.ct-ctx-toggle[aria-pressed="true"] .ct-ctx-pill {
  background: #1a3529;
  color: #ecfdf5;
}
.ct-ctx-pill {
  padding: 2px 6px;
  border-radius: 5px;
  background: #d6d3c9;
  font-weight: 700;
  font-size: 10px;
}
.ct-auto-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #eceae0;
  border: 1px solid rgba(26, 53, 41, 0.14);
  color: #1c2d24;
  font: 600 11px var(--sys);
}
.ct-auto-badge.busy {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}
.ct-auto-badge.ready {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}
.ct-auto-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.ct-auto-badge.busy .ct-auto-dot {
  animation: ctTourPulse 0.8s ease-in-out infinite;
}

/* Realistic Desktop Completion Notification inside Stage 02 */
.ct-desktop-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #17231e;
  border: 1px solid rgba(134, 239, 172, 0.35);
  box-shadow:
    0 16px 36px rgba(13, 27, 21, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #f4f7f5;
  animation: ctToastSlide 0.36s cubic-bezier(0.2, 0.9, 0.2, 1);
  flex-wrap: wrap;
}
.ct-desktop-toast[hidden] {
  display: none;
}
@keyframes ctToastSlide {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.ct-toast-app-ico {
  border-radius: 6px;
  flex-shrink: 0;
  display: block;
}
.ct-toast-copy {
  flex: 1;
  min-width: 190px;
}
.ct-toast-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
}
.ct-toast-head strong {
  color: #ffffff;
  font-weight: 700;
}
.ct-toast-tag {
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(134, 239, 172, 0.16);
  color: #86efac;
  font-weight: 700;
}
.ct-toast-title {
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 600;
  color: #ecfdf5;
}
.ct-toast-msg {
  font-size: 11.5px;
  color: #a9c2b5;
}
.ct-toast-pill-img {
  height: 36px;
  width: auto;
  border-radius: 8px;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24);
}

.ct-result-body {
  flex: 1;
  border-radius: 8px;
  background: #f7f6f1;
  border: 1px solid rgba(26, 53, 41, 0.09);
  padding: 10px 12px;
  min-height: 190px;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.ct-result-empty,
.ct-result-scanning {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  color: #526158;
  font-size: 12px;
}
.ct-result-empty[hidden],
.ct-result-scanning[hidden],
.ct-result-output[hidden],
.ct-result-foot[hidden] {
  display: none;
}
.ct-empty-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: #e7e5dc;
  color: #2b3d34;
  font-weight: 600;
  font-size: 11px;
}
.ct-scan-spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(26, 53, 41, 0.2);
  border-top-color: #1a3529;
  animation: ctSpin 0.7s linear infinite;
}
@keyframes ctSpin {
  to {
    transform: rotate(360deg);
  }
}
.ct-md-pre {
  margin: 0;
  font: 11px/1.45 var(--font-mono);
  color: #13211a;
  white-space: pre-wrap;
  word-break: break-word;
}
.ct-perf-chip {
  font-size: 10.5px;
  font-weight: 600;
  color: #4f6157;
}
.ct-result-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 2px;
  flex-wrap: wrap;
}
.ct-copied-pill {
  font-size: 11.5px;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  border: 1px solid #86efac;
  padding: 4px 10px;
  border-radius: 999px;
}

/* Stage 03: Paste Destination Workspace */
.ct-dest-app {
  max-width: 860px;
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid var(--c-white-12);
  background: #0c1120;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.ct-dest-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  background: #080c17;
  border-bottom: 1px solid var(--c-white-8);
  flex-wrap: wrap;
}
.ct-dest-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cream);
}
.ct-dest-badge {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(120, 144, 255, 0.16);
  color: #a5b4fc;
  font-size: 10px;
  font-weight: 700;
}
.ct-dest-clip {
  font-size: 11px;
  color: var(--mist);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--c-white-8);
}
/* Stage 03: Claude Code New Chat Workspace */
.ct-dest-app {
  max-width: 920px;
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid #2e2c2b;
  background: #181818;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.ct-cc-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  background: #141414;
  border-bottom: 1px solid #2a2826;
  flex-wrap: wrap;
}
.ct-dest-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  color: #f4eee6;
}
.ct-cc-spark {
  display: block;
  flex: 0 0 auto;
}
.ct-cc-name {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: -0.01em;
  color: #f4eee6;
}
.ct-dest-badge {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(217, 119, 87, 0.16);
  color: #ea987c;
  font-size: 10px;
  font-weight: 700;
}
.ct-dest-clip {
  font-size: 11px;
  color: var(--mist);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #2e2c2b;
}
.ct-dest-clip.ready {
  color: #bbf7d0;
  border-color: rgba(76, 200, 140, 0.4);
  background: rgba(76, 200, 140, 0.12);
}

.ct-dest-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ct-dest-prompt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--cream);
  flex-wrap: wrap;
}
.ct-user-pill {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(209, 167, 95, 0.16);
  color: var(--brass);
  font-weight: 700;
}
.ct-editor-box {
  border-radius: 10px;
  border: 1px solid var(--c-white-13);
  background: #070a13;
  overflow: hidden;
  transition: border-color 0.2s;
}
.ct-editor-box:focus-within {
  border-color: #7890ff;
}
.ct-demo-editor {
  width: 100%;
  min-height: 174px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: var(--cream);
  font: 12px/1.5 var(--font-mono);
  resize: vertical;
  outline: none;
  display: block;
}
.ct-demo-editor::placeholder {
  color: var(--tx3);
}
.ct-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--c-white-8);
  background: #0b101d;
  flex-wrap: wrap;
}
.ct-paste-instr {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--mist);
}
.ct-paste-instr kbd {
  font: 600 11px var(--sys);
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid var(--line2);
  background: var(--app3);
  color: var(--cream);
}
.ct-cc-workspace {
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 16px;
  align-items: start;
}
.ct-cc-workspace[hidden] {
  display: none;
}
.ct-cc-visual-col,
.ct-cc-chat-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.ct-cc-shot-frame {
  border-radius: 10px;
  border: 1px solid #2d2b29;
  background: #181818;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.ct-cc-shot-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: #1e1d1c;
  border-bottom: 1px solid #2d2b29;
  font-size: 10px;
  color: #9d9d9d;
}
.ct-cc-shot {
  width: 100%;
  height: auto;
  display: block;
  background: #181818;
}

.ct-dest-prompt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #e6dfd5;
  flex-wrap: wrap;
}
.ct-user-pill {
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(217, 119, 87, 0.16);
  color: #ea987c;
  font-weight: 700;
}

.ct-cc-composer {
  border-radius: 12px;
  border: 1.5px solid rgba(217, 119, 87, 0.48);
  background: #1f1f1f;
  overflow: hidden;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.ct-cc-composer:focus-within {
  border-color: #d97757;
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.18);
}
.ct-demo-editor {
  width: 100%;
  min-height: 158px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: #ece7df;
  font: 12px/1.5 var(--font-mono);
  resize: vertical;
  outline: none;
  display: block;
}
.ct-demo-editor::placeholder {
  color: #8b8680;
}

.ct-cc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-top: 1px solid #2d2b29;
  background: #191919;
  flex-wrap: wrap;
}
.ct-cc-chips {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.ct-cc-chip {
  padding: 2px 7px;
  border-radius: 999px;
  background: #292827;
  color: #b8b3ac;
  font-size: 10px;
  line-height: 1.4;
}
.ct-cc-chip.model {
  background: #302b28;
  color: #e5ddd2;
}

.ct-editor-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ct-editor-btns button {
  white-space: nowrap;
}
.ct-cc-paste-btn {
  background: #d97757;
  color: #18120e;
  font-weight: 700;
}
.ct-cc-paste-btn:hover:not(:disabled) {
  background: #e38667;
}
.ct-finish-btn {
  background: var(--cream);
  color: var(--c-night);
  font-weight: 700;
  box-shadow: 0 0 0 3px rgba(209, 167, 95, 0.25);
}
.ct-finish-btn:hover {
  background: #ffffff;
}

.ct-rendered-preview {
  border-radius: 10px;
  border: 1px solid rgba(76, 200, 140, 0.3);
  background: #0a1516;
  padding: 12px 14px;
  animation: ctPaneIn 0.3s ease-out;
}
.ct-paste-instr {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #b3aca3;
  flex-wrap: wrap;
}
.ct-paste-instr[hidden] {
  display: none;
}
.ct-paste-instr kbd {
  font: 600 11px var(--sys);
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid #3c3a37;
  background: #252423;
  color: #f1ecdf;
}

.ct-rendered-preview {
  border-radius: 10px;
  border: 1px solid rgba(76, 200, 140, 0.32);
  background: #0c1714;
  padding: 10px 12px;
  animation: ctPaneIn 0.3s ease-out;
  overflow-x: auto;
}
.ct-rendered-preview[hidden] {
  display: none;
}
.ct-rp-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 10.5px;
  color: #86efac;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.ct-rp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: var(--cream);
}
.ct-rp-table th,
.ct-rp-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ct-rp-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  color: #86efac;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.ct-rp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  color: var(--cream);
}
.ct-rp-table th,
.ct-rp-table td {
  text-align: left;
  padding: 5px 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ct-rp-table th {
  color: var(--brass);
  font-weight: 600;
}

.ct-need-extract {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(209, 167, 95, 0.12);
  border: 1px solid rgba(209, 167, 95, 0.35);
  font-size: 12.5px;
  color: var(--cream);
  flex-wrap: wrap;
}
.ct-need-extract {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(209, 167, 95, 0.12);
  border: 1px solid rgba(209, 167, 95, 0.35);
  font-size: 12px;
  color: var(--cream);
  flex-wrap: wrap;
}
.ct-need-extract[hidden] {
  display: none;
}

/* Completion Summary Card when Finish is clicked */
.ct-finish-card {
  padding: 30px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: ctPaneIn 0.3s ease-out;
}
.ct-finish-card[hidden] {
  display: none;
}
.ct-finish-badge {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(76, 200, 140, 0.15);
  border: 1px solid rgba(76, 200, 140, 0.4);
  color: #86efac;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.ct-finish-logos {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}
.ct-finish-arrow {
  color: #d97757;
  font-size: 16px;
  font-weight: 700;
}
.ct-finish-card h4 {
  margin: 2px 0 0;
  font-size: 24px;
  color: var(--cream);
  font-weight: 600;
}
.ct-finish-card p {
  margin: 0;
  max-width: 54ch;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--mist);
}
.ct-finish-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.ct-finish-stats span {
  padding: 4px 10px;
  border-radius: 999px;
  background: #232220;
  border: 1px solid #353330;
  color: #e9e3d8;
  font-size: 11px;
}
.ct-finish-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.ct-finish-dl {
  text-decoration: none;
  background: var(--cream);
  color: var(--c-night);
  font-weight: 700;
}
.ct-finish-dl:hover {
  background: #ffffff;
}

/* DemoOverlay & DemoPointer (Mode-Aware) */
.ct-demo-coach {
  padding: 10px 18px;
  background: rgba(16, 22, 40, 0.92);
  border-bottom: 1px solid rgba(120, 144, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ct-demo-coach[hidden] {
  display: none;
}
.ct-coach-main {
  display: flex;
  align-items: baseline;
  gap: 8px 10px;
  flex-wrap: wrap;
  font-size: 12.5px;
}
.ct-coach-kicker {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(120, 144, 255, 0.16);
  color: #93a8ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.ct-coach-title {
  color: var(--cream);
  font-weight: 700;
}
.ct-coach-hint {
  color: var(--mist);
  font-size: 12px;
}

.ct-demo-ring {
  position: absolute;
  z-index: 18;
  border-radius: 10px;
  pointer-events: none;
  transition:
    left 0.25s,
    top 0.25s,
    width 0.25s,
    height 0.25s;
}
.ct-demo-ring[hidden] {
  display: none;
}
.ct-demo-ring.is-guided {
  border: 2px solid #7890ff;
  box-shadow: 0 0 0 4px rgba(120, 144, 255, 0.16);
  animation: ctRingPulse 1.8s ease-in-out infinite;
}
.ct-demo-ring.is-hints {
  border: 1.5px solid rgba(209, 167, 95, 0.55);
  box-shadow: 0 0 10px rgba(209, 167, 95, 0.12);
}
@keyframes ctRingPulse {
  50% {
    border-color: var(--brass);
    box-shadow: 0 0 0 6px rgba(209, 167, 95, 0.12);
  }
}

.ct-mode-hint-pill {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 19;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(8, 10, 18, 0.88);
  border: 1px solid rgba(209, 167, 95, 0.35);
  font: 600 11.5px var(--sys);
  color: var(--brass);
  pointer-events: none;
}
.ct-mode-hint-pill[hidden] {
  display: none;
}

/* Chatbot-Style Translucent Step Bubble anchored beside the Lassoed Target */
.ct-guide-bub {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 33;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(10, 14, 30, 0.88);
  border: 1px solid var(--c-haze-14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  color: #f1ecdf;
  font: 600 11.5px var(--sys);
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.22s ease, translate 0.35s cubic-bezier(0.2, 0.85, 0.2, 1);
}
.ct-guide-bub[hidden] {
  display: none;
}
.ct-guide-bub.on {
  opacity: 1;
}
.ct-guide-bub.pulse {
  transform: scale(1.06);
}
.ct-gb-kicker {
  font-size: 10px;
  font-weight: 700;
  color: var(--brass);
  letter-spacing: 0.08em;
}
.ct-gb-kicker[hidden] {
  display: none;
}
.ct-gb-text {
  color: var(--c-cream);
}

/* Progress Footer inside .mac (kept clear of bottom-right .knot) */
.ct-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 56px 10px 14px;
  background: var(--c-1f2025);
  border-top: 1px solid var(--c-white-8);
  flex-wrap: wrap;
}
.ct-prog-crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ct-crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--tx2);
  font: 600 12px var(--sys);
  cursor: pointer;
}
.ct-crumb:hover {
  color: var(--cream);
  background: var(--c-white-6p5);
}
.ct-crumb.on {
  background: var(--c-white-8);
  border-color: var(--line2);
  color: var(--cream);
}
.ct-crumb.done .ct-crumb-num {
  color: #4cc88c;
}
.ct-crumb-num {
  font-size: 11px;
  color: var(--brass);
}

.ct-prog-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ct-nav-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--c-white-12);
  background: var(--app3);
  color: var(--cream);
  font: 600 12px var(--sys);
  cursor: pointer;
}
.ct-nav-btn:hover:not(:disabled) {
  background: var(--c-white-12);
}
.ct-nav-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.ct-nav-btn.hi {
  background: var(--cream);
  color: var(--c-night);
  border-color: var(--cream);
}

/* Corner Companion Logo Dock (travels via NusKnot3D strand lasso & clickable for Logo Tour) */
.knot {
  position: absolute;
  z-index: 31;
  right: -92px;
  bottom: -64px;
  width: 96px;
  height: 96px;
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 0.55s,
    transform 0.65s cubic-bezier(0.2, 1.3, 0.3, 1);
  pointer-events: auto;
  cursor: pointer;
  border-radius: 50%;
}
.stage.in .knot {
  opacity: 1;
  transform: none;
}
.knot:focus-visible {
  outline: 2px solid #8cc152;
  outline-offset: 6px;
}
.knot canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0 !important;
  pointer-events: none;
}
.ct-stage-brand {
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.55));
}
.strand-layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  display: none;
  pointer-events: none;
  z-index: 30;
}

.a-status {
  margin-top: 34px;
  min-height: 60px;
  text-align: center;
  color: var(--mist);
  font-size: 15px;
  line-height: 1.6;
}
.a-status b {
  color: var(--cream);
  font-weight: 600;
}
.cta {
  display: inline-flex;
  margin-top: 12px;
  font: 600 14px var(--font-body);
  border-radius: 999px;
  padding: 12px 20px;
  cursor: pointer;
  border: 0;
  background: var(--cream);
  color: var(--c-night);
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cta:hover {
  transform: scale(1.04);
}
.cta:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.today {
  max-width: 1040px;
  margin: 2vh auto 0;
  padding: 26px 30px;
  border-radius: 16px;
  border: 1px solid var(--c-brass-35);
  background: linear-gradient(90deg, var(--c-brass-8), var(--c-brass-0));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.today .k {
  color: var(--brass);
  margin-bottom: 8px;
}
.today h4 {
  font-size: 30px;
  line-height: 1.1;
}
.today p {
  margin-top: 6px;
  color: var(--mist);
  font-size: 15px;
}
.today kbd {
  font: 500 12px var(--font-mono);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--line2);
  color: var(--cream);
}

@media (max-width: 1000px) {
  .steps {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .step-btn {
    padding: 14px 16px;
  }
  .step h3 {
    font-size: 22px;
  }
  .ct-app-shell {
    grid-template-columns: 1fr;
  }
  .ct-app-sidebar {
    flex-direction: row;
    align-items: center;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(26, 53, 41, 0.1);
  }
  .ct-app-nav,
  .ct-app-privacy {
    display: none;
  }
  .ct-app-grid {
    grid-template-columns: 1fr;
  }
  .ct-cc-workspace {
    grid-template-columns: 1fr;
  }
  .ct-footer {
    padding: 10px 14px;
  }
  .knot {
    right: -2px;
    bottom: -72px;
    width: 74px;
    height: 74px;
  }
  .a-status {
    margin-top: 86px;
    font-size: 14px;
  }
  .today {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 640px) {
  .mac-title {
    flex-wrap: wrap;
    padding: 8px 10px;
    gap: 8px;
  }
  .ct-mac-dots {
    display: none;
  }
  .mac-name {
    font-size: 12px;
  }
  .ct-mode-btn {
    padding: 5px 9px;
    font-size: 11px;
  }
  .ct-tour-btn {
    padding: 5px 9px;
    font-size: 11px;
  }
  .ct-guide-bub {
    font-size: 10.5px;
    padding: 5px 10px;
  }
  .ct-stage-pane {
    padding: 12px;
    min-height: 360px;
  }
  .ct-demo-coach {
    padding: 8px 12px;
  }
  .ct-coach-main {
    font-size: 11.5px;
    gap: 4px 8px;
  }
  .ct-primary-action,
  .ct-secondary-action {
    font-size: 12px;
    padding: 8px 13px;
    white-space: nowrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mac,
  .knot,
  .step,
  .step::before,
  .ct-demo-pointer,
  .ct-demo-ring,
  .ct-demo-coach,
  .ct-stage-pane {
    transition: none;
    animation: none;
  }
  .ct-scan-beam,
  .ct-scan-spinner,
  .ct-ptr-svg,
  .ct-ptr-ripple {
    animation: none;
  }
  .cta:hover,
  .btn:hover {
    transform: none;
  }
}
