/* ============================================
   VIEWS SECTION
   "Seven views. One workflow." — pinned scroll
   story between the ticker and the horizontal
   deck. Tabs on one side, a single app window on
   the other (js/views-slide.js; pin in main.js).
   ============================================ */


/* ─── Section shell ───────────────────────────────────────────────────── */

.views-section {
  position: relative;
  height: 100vh;
  height: 100svh;
  padding: clamp(20px, 4vh, 48px) clamp(20px, 4vw, 56px);
  /* No permanent will-change here: a composited ancestor makes descendant
     glass tabs' backdrop-filter render as squared halos (ignores radius). */
  overflow: hidden;
  color: #ffffff;
}

.vw-shell {
  height: 100%;
  max-width: 1360px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 2fr);
  grid-template-rows: 1fr auto auto 1fr;
  grid-template-areas:
    ".      stage"
    "header stage"
    "tabs   stage"
    ".      stage";
  column-gap: clamp(28px, 3.5vw, 64px);
}

.vw-header   { grid-area: header; }
.vw-tabs     { grid-area: tabs; }
.vw-stage    { grid-area: stage; }
.vw-controls { grid-area: controls; }


/* ─── Header ──────────────────────────────────────────────────────────── */

.vw-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.vw-eyebrow::before {
  content: '';
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #7dd3fc, #38bdf8);
}

.vw-title {
  margin: 0 0 var(--space-3);
  font-family: var(--font-sans);
  font-size: clamp(2rem, 1.1rem + 2.2vw, 3.25rem);
  font-weight: var(--font-bold);
  line-height: 1.06;
  letter-spacing: var(--tracking-tight);
  color: #ffffff;
}

.vw-title .hero-accent {
  display: block;
}

.vw-subtitle {
  max-width: 38ch;
  margin: 0 0 clamp(14px, 3vh, 28px);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--font-light);
  line-height: var(--leading-relaxed);
  color: rgba(255, 255, 255, 0.78);
}


/* ─── Tabs (view list) ────────────────────────────────────────────────── */

.vw-tabs {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vw-tab {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: 12px;
  width: 100%;
  padding: 8px 14px 8px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background-color: transparent;
  color: rgba(255, 255, 255, 0.74);
  font-family: var(--font-sans);
  text-align: start;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 350ms ease,
    border-color 350ms ease,
    box-shadow 350ms ease,
    color 250ms ease,
    padding 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.vw-tab:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.05);
}

.vw-tab:focus-visible {
  outline: 2px solid #7dd3fc;
  outline-offset: 2px;
}

.vw-tab.is-active {
  padding-block-end: 16px;
  color: #ffffff;
  background-color: color-mix(in srgb, var(--c-glass) 18%, transparent);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 24px rgba(0, 10, 40, 0.18);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

/* Accent stripe on the leading edge of the active tab */
.vw-tab::before {
  content: '';
  position: absolute;
  inset-block: 12px;
  inset-inline-start: 0;
  width: 3px;
  border-start-end-radius: 3px;
  border-end-end-radius: 3px;
  background: var(--view-accent);
  opacity: 0;
  transition: opacity 300ms ease;
}

.vw-tab.is-active::before {
  opacity: 1;
}

.vw-tab-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  transition: background-color 350ms ease, color 350ms ease, box-shadow 350ms ease;
}

.vw-tab-icon svg {
  display: block;
}

.vw-tab.is-active .vw-tab-icon {
  background: color-mix(in srgb, var(--view-accent) 20%, transparent);
  color: var(--view-accent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--view-accent) 32%, transparent);
}

.vw-tab-body {
  min-width: 0;
}

.vw-tab-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 34px;
}

.vw-tab-title {
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  letter-spacing: var(--tracking-wide);
  white-space: nowrap;
}

.vw-tab-badge {
  padding: 4px 7px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #7dd3fc, #c4b5fd);
  color: #0b1530;
  font-size: 9px;
  font-weight: var(--font-bold);
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.vw-tab-key {
  margin-inline-start: auto;
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.7);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: var(--font-medium);
  line-height: 1.4;
  white-space: nowrap;
}

/* Description reveal: 0fr → 1fr grid rows animate the height to content */
.vw-tab-reveal {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.vw-tab.is-active .vw-tab-reveal {
  grid-template-rows: 1fr;
}

.vw-tab-text {
  display: block;
  overflow: hidden;
  font-size: var(--text-xs);
  font-weight: var(--font-light);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.vw-tab-progress {
  position: absolute;
  inset-inline: 14px;
  bottom: 7px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  opacity: 0;
  transition: opacity 300ms ease;
}

.vw-tab.is-active .vw-tab-progress {
  opacity: 1;
}

.vw-tab-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--view-accent);
  transform: scaleX(0);
  transform-origin: left center;
}

[dir="rtl"] .vw-tab-progress-fill {
  transform-origin: right center;
}


/* ─── Stage + app window ──────────────────────────────────────────────── */

.vw-stage {
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Lets the window fit the cell like object-fit: contain (cq units). */
  container-type: size;
}

.vw-window {
  position: relative;
  width: min(100cqw, 160cqh);
  aspect-ratio: 680 / 425;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  overflow: hidden;
  background: #0f1218;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.25),
    0 30px 80px -24px rgba(0, 8, 40, 0.6),
    0 12px 32px rgba(0, 8, 40, 0.35),
    0 0 120px -30px var(--vw-accent, #64b5f6),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-family: var(--font-app);
  transition: box-shadow 600ms ease;
}

/* Fixed logical size, scaled to the window by js/views-slide.js
   (--vw-scale). Anchored to the physical top-left because the scale is
   derived from physical widths in both LTR and RTL. */
.vw-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 680px;
  height: 425px;
  display: flex;
  flex-direction: column;
  transform: scale(var(--vw-scale, 1));
  transform-origin: 0 0;
}

.vw-window-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 36px;
  padding: 0 12px;
  background: color-mix(in srgb, #3a3f4b 22%, #0f1218);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.vw-switcher {
  position: relative;
  display: inline-flex;
  gap: 2px;
  margin-inline: auto;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
}

/* Positioned from the active button's offsetLeft by js/views-slide.js,
   so it is anchored to the physical left in both directions. */
.vw-switcher-pill {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 0;
  border: 1px solid color-mix(in srgb, #4a90d9 45%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, #4a90d9 28%, transparent);
  transition:
    transform 380ms cubic-bezier(0.4, 0, 0.2, 1),
    width 380ms cubic-bezier(0.4, 0, 0.2, 1);
}

.vw-switcher-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 7px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10.5px;
  font-weight: var(--font-medium);
  white-space: nowrap;
  transition: color 250ms ease;
}

.vw-switcher-btn svg {
  display: block;
  flex: none;
}

.vw-switcher-label {
  display: none;
}

.vw-switcher-btn.is-active {
  color: #ffffff;
}

.vw-switcher-btn.is-active .vw-switcher-label {
  display: inline;
}

.vw-window-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 112px;
  height: 22px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  white-space: nowrap;
}

.vw-window-search svg {
  flex: none;
}


/* ─── View panels (stacked crossfade) ─────────────────────────────────── */

#slide-6 .kp-view-preview {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#slide-6 .kp-view-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(calc(var(--vw-dir, 1) * 10px)) scale(0.985);
  transition:
    opacity 450ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 450ms,
    transform 450ms cubic-bezier(0.4, 0, 0.2, 1);
}

#slide-6 .kp-view-panel.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
}

#slide-6 .kp-view-panel > .kp-demo {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Board */
#slide-6 .kp-board-compact .kp-board-body {
  flex: 1;
  min-height: 0;
  padding: 14px;
  gap: 12px;
}

#slide-6 .kp-board-compact .kp-col {
  flex: 1;
  width: auto;
  min-width: 0;
}

#slide-6 .kp-board-compact .kp-col-cards {
  gap: 8px;
  padding: 8px;
}

/* List */
#slide-6 .kp-list-toolbar {
  border-radius: 0;
  padding: 8px 14px;
}

#slide-6 .kp-list-body {
  flex: 1;
  min-height: 0;
  padding: 12px 14px;
  overflow: hidden;
}

/* Calendar */
#slide-6 .kp-cal-toolbar {
  border-radius: 0;
  padding: 8px 14px;
}

#slide-6 .kp-cal-grid {
  flex: 1;
  min-height: 0;
  grid-template-rows: auto repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 10px 14px 14px;
}

#slide-6 .kp-cal-day {
  min-height: 0;
  padding: 5px;
}

#slide-6 .kp-cal-num {
  font-size: 9px;
  margin-bottom: 4px;
}

#slide-6 .kp-cal-badge {
  font-size: 8px;
  padding: 2px 4px;
}

/* Notes */
#slide-6 .kp-view-panel > .kp-notes-compact {
  flex-direction: row;
  min-height: 0;
}

#slide-6 .kp-notes-sidebar {
  width: 150px;
}

#slide-6 .kp-notes-editor {
  padding: 16px 20px;
}

/* Gantt */
#slide-6 .kp-gantt-nav {
  display: inline-grid;
  place-items: center;
}

#slide-6 .kp-gantt-body {
  flex: 1;
  min-height: 0;
}

#slide-6 .kp-gantt-rail {
  width: 140px;
}


/* ─── Team mock (org chart) ───────────────────────────────────────────── */

.kp-team {
  color: #e8eaed;
  font-size: 11px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(167, 139, 250, 0.08) 0%, transparent 60%),
    #0f1218;
}

.kp-team-toolbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: color-mix(in srgb, #3a3f4b 14%, transparent);
}

.kp-team-seg {
  display: inline-flex;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.kp-team-seg-btn {
  padding: 3px 10px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.kp-team-seg-btn.is-active {
  background: color-mix(in srgb, #a78bfa 22%, transparent);
  color: #ddd6fe;
}

.kp-team-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-full);
  color: rgba(255, 255, 255, 0.85);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.kp-team-chip--agent {
  border-style: dashed;
}

.kp-team-zoom {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-inline-start: auto;
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
}

.kp-team-zoom-btn {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.kp-team-zoom-val {
  min-width: 36px;
  text-align: center;
  font-family: var(--font-mono);
}

/* The org chart stays LTR in every locale, as it does in the app. */
.kp-team-canvas {
  position: relative;
  flex: 1;
  min-height: 0;
  direction: ltr;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 14px 14px;
}

.kp-team-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.kp-team-link {
  fill: none;
  stroke: color-mix(in srgb, #a78bfa 55%, transparent);
  stroke-width: 1.5;
}

.kp-team-link--agent {
  stroke-dasharray: 4 4;
}

.kp-team-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  max-width: 168px;
  padding: 7px 18px 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-inline-start: 3px solid var(--node-accent);
  border-radius: 12px;
  background: color-mix(in srgb, #1a1f2e 94%, transparent);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.kp-team-node--agent {
  border-inline-start-style: dashed;
  background: color-mix(in srgb, #1e1a2e 94%, transparent);
}

.kp-team-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--avatar-color) 70%, #0f1218);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
}

.kp-team-avatar--agent {
  border: 1px dashed color-mix(in srgb, var(--avatar-color) 50%, transparent);
  background: color-mix(in srgb, var(--avatar-color) 20%, transparent);
  color: var(--avatar-color);
}

.kp-team-avatar svg {
  display: block;
}

.kp-team-node-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.kp-team-node-name {
  overflow: hidden;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kp-team-role {
  align-self: flex-start;
  max-width: 100%;
  overflow: hidden;
  padding: 1px 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kp-team-runtime {
  align-self: flex-start;
  color: var(--node-accent);
  font-family: var(--font-mono);
  font-size: 9px;
  white-space: nowrap;
}

.kp-team-status {
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.6);
}

.kp-team-status--paused {
  background: #fb923c;
  box-shadow: none;
}

.kp-team-status--running {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}


/* ─── Neuron mock (force-directed ticket graph) ───────────────────────── */

.kp-neuron {
  color: #e8eaed;
  font-size: 11px;
  background:
    radial-gradient(ellipse at 40% 45%, rgba(244, 114, 182, 0.07) 0%, transparent 55%),
    #0f1218;
}

.kp-neuron-toolbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: color-mix(in srgb, #3a3f4b 14%, transparent);
}

.kp-neuron-count {
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
}

.kp-neuron-search {
  display: inline-flex;
  align-items: center;
  flex: 0 1 180px;
  gap: 6px;
  min-width: 0;
  padding: 3px 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  white-space: nowrap;
}

.kp-neuron-search svg {
  flex: none;
}

.kp-neuron-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: auto;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  white-space: nowrap;
}

.kp-neuron-select {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
}

.kp-neuron-chips {
  flex: none;
  display: flex;
  gap: 6px;
  padding: 8px 12px 0;
  overflow: hidden;
}

.kp-neuron-chip {
  padding: 3px 10px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.kp-neuron-chip.is-active {
  border-style: solid;
  border-color: color-mix(in srgb, #f472b6 45%, transparent);
  background: color-mix(in srgb, #f472b6 14%, transparent);
  color: #fce7f3;
}

/* The graph stays LTR in every locale, as it does in the app. */
.kp-neuron-canvas {
  position: relative;
  flex: 1;
  min-height: 0;
  direction: ltr;
}

.kp-neuron-graph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.kp-neuron-edge {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1;
  opacity: 0.6;
}

.kp-neuron-edge--hub {
  stroke-dasharray: 3 3;
}

.kp-neuron-edge--hot {
  stroke: #fcd34d;
  stroke-width: 1.6;
  stroke-dasharray: 5 4;
  opacity: 1;
  filter: url(#kp-neuron-glow);
  animation: kp-neuron-flow 1.2s linear infinite;
}

@keyframes kp-neuron-flow {
  to { stroke-dashoffset: -18; }
}

.kp-neuron-node {
  opacity: 0.6;
}

.kp-neuron-node--hub,
.kp-neuron-node--person,
.kp-neuron-node--near,
.kp-neuron-node--focus {
  opacity: 1;
}

.kp-neuron-dot {
  fill: color-mix(in srgb, var(--node-color) 45%, #0f1218);
  stroke: var(--node-color);
  stroke-width: 1.4;
}

.kp-neuron-node--hub .kp-neuron-dot {
  fill: color-mix(in srgb, var(--node-color) 30%, #0f1218);
  stroke-width: 2;
}

.kp-neuron-node--person .kp-neuron-dot {
  fill: color-mix(in srgb, var(--node-color) 75%, #0f1218);
  stroke: color-mix(in srgb, var(--node-color) 60%, #ffffff);
}

.kp-neuron-node--focus .kp-neuron-dot {
  fill: var(--node-color);
}

.kp-neuron-halo {
  fill: none;
  stroke: var(--node-color);
  stroke-width: 2;
  opacity: 0.45;
  filter: url(#kp-neuron-glow);
}

.kp-neuron-initials {
  fill: #ffffff;
  font-size: 8px;
  font-weight: 700;
  text-anchor: middle;
}

.kp-neuron-label {
  fill: rgba(255, 255, 255, 0.75);
  font-size: 9px;
  font-weight: 500;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #0f1218;
  stroke-width: 3px;
  stroke-linejoin: round;
}

.kp-neuron-node--hub .kp-neuron-label {
  fill: #ffffff;
  font-size: 10px;
  font-weight: 600;
}

.kp-neuron-tip-wrap {
  overflow: visible;
}

.kp-neuron-tip {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: max-content;
  max-width: 100%;
  margin-inline-start: auto;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(22, 26, 36, 0.94);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  color: #ffffff;
  font-family: var(--font-app);
  font-size: 10px;
  line-height: 1.35;
}

.kp-neuron-tip-title {
  font-weight: 600;
  white-space: nowrap;
}

.kp-neuron-tip-meta {
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-mono);
  font-size: 9px;
  white-space: nowrap;
}


/* ─── Controls (caption + autoplay; tablet and mobile only) ───────────── */

.vw-controls {
  display: none;
  align-items: center;
  gap: var(--space-3);
}

.vw-caption {
  flex: 1;
  min-height: 3em;
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--font-light);
  line-height: var(--leading-normal);
  color: rgba(255, 255, 255, 0.82);
}

.vw-autoplay {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
}

.vw-autoplay[hidden] {
  display: none;
}

.vw-autoplay:focus-visible {
  outline: 2px solid #7dd3fc;
  outline-offset: 2px;
}

.vw-autoplay-icon {
  display: block;
}

.vw-autoplay-icon--play,
.vw-autoplay.is-paused .vw-autoplay-icon--pause {
  display: none;
}

.vw-autoplay.is-paused .vw-autoplay-icon--play {
  display: block;
}


/* ─── Short desktop viewports ─────────────────────────────────────────── */

@media (min-width: 1024px) and (max-height: 760px) {
  .vw-title {
    font-size: clamp(1.75rem, 1rem + 1.8vw, 2.5rem);
  }

  .vw-subtitle {
    margin-bottom: var(--space-3);
  }

  .vw-tab {
    padding-block: 5px;
  }

  .vw-tab.is-active {
    padding-block-end: 13px;
  }

  .vw-tab-icon {
    width: 30px;
    height: 30px;
  }

  .vw-tab-head {
    min-height: 30px;
  }
}


/* ─── Tablet: tabs become a row above the window (still pinned) ───────── */

@media (max-width: 1023px) {
  .vw-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas:
      "header"
      "tabs"
      "stage"
      "controls";
    align-content: center;
    row-gap: 16px;
  }

  /* Width-led sizing, capped so header + tabs + window + caption fit the
     pinned viewport. */
  .vw-stage {
    container-type: inline-size;
  }

  .vw-window {
    width: min(100cqw, calc((100vh - 340px) * 1.6));
    width: min(100cqw, calc((100svh - 340px) * 1.6));
  }

  .vw-header {
    text-align: center;
  }

  .vw-title .hero-accent {
    display: inline;
  }

  .vw-subtitle {
    max-width: 60ch;
    margin-inline: auto;
    margin-bottom: 0;
  }

  .vw-tabs {
    flex-direction: row;
    justify-content: safe center;
    gap: 6px;
    padding: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .vw-tabs::-webkit-scrollbar {
    display: none;
  }

  .vw-tab {
    flex: none;
    width: auto;
    grid-template-columns: auto auto;
    align-items: center;
    column-gap: 6px;
    padding: 5px 12px 7px 6px;
    border-radius: var(--radius-full);
  }

  .vw-tab.is-active {
    padding-block-end: 7px;
  }

  .vw-tab::before,
  .vw-tab-reveal,
  .vw-tab-key {
    display: none;
  }

  .vw-tab-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
  }

  .vw-tab-icon svg {
    width: 15px;
    height: 15px;
  }

  .vw-tab-head {
    gap: 6px;
    min-height: 24px;
  }

  .vw-tab-title {
    font-size: var(--text-sm);
  }

  .vw-tab-badge {
    padding: 3px 5px;
    font-size: 8px;
  }

  .vw-tab-progress {
    inset-inline: 16px;
    bottom: 3px;
  }

  .vw-controls {
    display: flex;
  }

  .vw-caption {
    text-align: center;
  }
}


/* ─── Mobile: not pinned; the window body is a swipeable carousel ─────── */

@media (max-width: 768px) {
  .views-section {
    height: auto;
    padding: var(--space-12) var(--space-4);
  }

  .vw-shell {
    grid-template-rows: auto;
    row-gap: var(--space-4);
  }

  .vw-tabs {
    justify-content: flex-start;
    margin-inline: calc(var(--space-4) * -1);
    padding-inline: var(--space-4);
    scroll-padding-inline: var(--space-4);
  }

  .vw-stage {
    display: block;
    container-type: normal;
  }

  .vw-window {
    width: 100%;
    aspect-ratio: 420 / 315;
    border-radius: 14px;
  }

  .vw-canvas {
    width: 420px;
    height: 315px;
  }

  .vw-window-bar {
    height: 30px;
    gap: 8px;
    padding: 0 10px;
  }

  .vw-window-search {
    display: none;
  }

  #slide-6 .kp-view-preview {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  #slide-6 .kp-view-preview::-webkit-scrollbar {
    display: none;
  }

  #slide-6 .kp-view-panel {
    position: relative;
    inset: auto;
    flex: 0 0 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }

  #slide-6 .kp-board-compact .kp-board-body {
    padding: 10px;
    gap: 8px;
  }

  #slide-6 .kp-notes-sidebar {
    width: 110px;
  }

  #slide-6 .kp-notes-editor {
    padding: 12px;
  }

  #slide-6 .kp-gantt-rail {
    width: 104px;
  }

  #slide-6 .kp-gantt-subheader .kp-gantt-badge {
    display: none;
  }

  .kp-team-chip {
    display: none;
  }

  .kp-team-node {
    min-width: 0;
    width: 118px;
    max-width: none;
    gap: 6px;
    padding: 5px 14px 5px 6px;
  }

  .kp-team-avatar {
    width: 22px;
    height: 22px;
  }

  .kp-neuron-field {
    display: none;
  }

  .kp-neuron-chip:not(.is-active) {
    display: none;
  }

  .kp-neuron-label {
    font-size: 13px;
  }

  .kp-neuron-node--hub .kp-neuron-label {
    font-size: 14px;
  }

  .kp-neuron-tip {
    font-size: 13px;
  }

  .kp-neuron-tip-meta {
    font-size: 12px;
  }

  .vw-controls {
    align-items: flex-start;
  }

  .vw-caption {
    text-align: start;
  }
}


/* ─── Reduced motion ──────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .vw-tab,
  .vw-tab-reveal,
  .vw-tab-icon,
  .vw-switcher-pill,
  .vw-window,
  #slide-6 .kp-view-panel {
    transition: none;
  }

  .kp-neuron-edge--hot,
  .kp-team-status--running {
    animation: none;
  }
}
