/* ── Krytz · Product page interactive demos ─────────────────────────── */

/* Section shell */
.demo-section {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}
.demo-section.bg-2 { background: var(--bg-2); }
.demo-section.bg-ink { background: var(--ink); color: #fff; }
.demo-section.bg-ink .h-section,
.demo-section.bg-ink h2 { color: #fff; }
.demo-section.bg-ink .lede { color: rgba(255,255,255,0.72); }
.demo-section.bg-ink .eyebrow { color: var(--g-mid); }

.demo-head {
  margin-bottom: 48px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: end;
}
.demo-head .lede { margin-top: 18px; }
.demo-head .demo-instructions {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; flex-direction: column;
  gap: 6px;
}
.demo-head .demo-instructions span strong {
  color: var(--ink);
  font-weight: 500;
}
.demo-section.bg-ink .demo-instructions { color: rgba(255,255,255,0.55); }
.demo-section.bg-ink .demo-instructions span strong { color: #fff; }

@media (max-width: 880px) {
  .demo-head { grid-template-columns: 1fr; gap: 24px; }
}

/* ══════════════════════════════════════════════════════════════════
   1. FORCE-DIRECTED DEPENDENCY GRAPH
   ══════════════════════════════════════════════════════════════════ */
.fg-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  box-shadow: var(--sh-2);
  padding: 0;
  overflow: hidden;
  position: relative;
}
.fg-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.fg-toolbar-left { display: flex; align-items: center; gap: 18px; }
.fg-toolbar-left .v { color: var(--ink); font-weight: 500; }
.fg-toolbar-right { display: flex; gap: 8px; }
.fg-btn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  background: var(--surface);
  cursor: pointer;
  transition: all 120ms ease-out;
}
.fg-btn:hover { border-color: var(--ink); color: var(--ink); }
.fg-btn.is-on { background: var(--g); color: #fff; border-color: var(--g); }

.fg-canvas {
  position: relative;
  width: 100%;
  height: 540px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(27, 42, 74,0.06), transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(27, 42, 74,0.04), transparent 50%),
    var(--surface);
  cursor: grab;
  user-select: none;
  overflow: hidden;
}
.fg-canvas.is-dragging { cursor: grabbing; }
.fg-canvas svg { width: 100%; height: 100%; display: block; }

.fg-detail {
  position: absolute;
  bottom: 16px; left: 16px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-2);
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  max-width: 280px;
  box-shadow: var(--sh-3);
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}
.fg-detail.is-visible { opacity: 1; transform: translateY(0); }
.fg-detail .d-title { font-family: var(--font); font-size: 14px; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 8px; color: #fff; }
.fg-detail .d-row { display: flex; justify-content: space-between; gap: 14px; padding: 2px 0; color: rgba(255,255,255,0.7); }
.fg-detail .d-row .v { color: #fff; }

/* ══════════════════════════════════════════════════════════════════
   2. PRIORITY RECOMPUTE
   ══════════════════════════════════════════════════════════════════ */
.pr-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  box-shadow: var(--sh-2);
  padding: 28px;
}
@media (max-width: 880px) { .pr-grid { grid-template-columns: 1fr; padding: 20px; } }

.pr-controls h4 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.pr-controls .pr-sub {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}
.pr-slider-row { margin-bottom: 18px; }
.pr-slider-row .pr-slabel {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.pr-slider-row .pr-slabel .v { color: var(--g); font-weight: 500; }
.pr-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--bg-3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.pr-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  background: var(--g);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(27, 42, 74,0.4);
  cursor: pointer;
}
.pr-slider::-moz-range-thumb {
  width: 16px; height: 16px;
  background: var(--g);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(27, 42, 74,0.4);
  cursor: pointer;
}
.pr-task-select {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.pr-task-select-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.pr-task-select-list button {
  text-align: left;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 120ms ease-out;
  font-family: var(--font);
}
.pr-task-select-list button:hover { border-color: var(--line-3); }
.pr-task-select-list button.is-on {
  border-color: var(--g);
  background: var(--g-soft);
  color: var(--g-deep);
  font-weight: 500;
}

.pr-list {
  position: relative;
  height: 480px;
}
.pr-row {
  position: absolute;
  left: 0; right: 0;
  height: 64px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 14px;
  align-items: center;
  transition: transform 480ms cubic-bezier(0.2, 0.9, 0.3, 1.1), box-shadow 200ms ease-out, border-color 200ms ease-out;
  will-change: transform;
}
.pr-row.is-focus {
  border-color: var(--g);
  box-shadow: 0 8px 24px rgba(27, 42, 74,0.18);
}
.pr-row .pr-rank {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-align: center;
}
.pr-row.is-rank-1 .pr-rank { color: var(--g); font-weight: 600; }
.pr-row .pr-title { font-size: 14px; font-weight: 500; letter-spacing: -0.005em; }
.pr-row .pr-meta { display: flex; gap: 12px; margin-top: 3px; }
.pr-row .pr-meta .m {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.pr-row .pr-meta .m strong { color: var(--ink-2); font-weight: 500; }
.pr-row .pr-score {
  display: flex; flex-direction: column; align-items: end;
  font-family: var(--mono);
}
.pr-row .pr-score .num { font-size: 16px; color: var(--ink); font-weight: 500; }
.pr-row .pr-score .delta { font-size: 10px; color: var(--ink-3); letter-spacing: 0.04em; transition: color 200ms; }
.pr-row .pr-score .delta.up { color: var(--done); }
.pr-row .pr-score .delta.down { color: var(--action); }
.pr-row .pr-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  background: var(--g);
  border-radius: 0 0 12px 12px;
  transition: width 480ms ease-out;
}

/* ══════════════════════════════════════════════════════════════════
   3. AI EXTRACTION
   ══════════════════════════════════════════════════════════════════ */
.cx-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 880px) { .cx-grid { grid-template-columns: 1fr; } }

.cx-pane {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  box-shadow: var(--sh-2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 460px;
}
.cx-pane-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.cx-pane-head .v { color: var(--ink); font-weight: 500; }
.cx-pane-head .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink-4);
  display: inline-block; margin-right: 6px;
}
.cx-pane-head.is-live .dot {
  background: #2ed573;
  box-shadow: 0 0 0 3px rgba(46,213,115,0.22);
  animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 3px rgba(46,213,115,0.22); }
  50%     { box-shadow: 0 0 0 6px rgba(46,213,115,0.05); }
}

.cx-input-area {
  padding: 20px;
  display: flex; flex-direction: column;
  flex: 1;
}
.cx-input {
  width: 100%;
  min-height: 200px;
  border: 0;
  resize: none;
  outline: none;
  background: transparent;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  flex: 1;
}
.cx-input::placeholder { color: var(--ink-4); }
.cx-input-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  margin-top: 14px;
}
.cx-input-hint {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}
.cx-input-hint kbd {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 5px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-2);
}
.cx-presets { display: flex; flex-direction: column; gap: 6px; padding: 12px 20px 0; }
.cx-presets-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.cx-preset {
  text-align: left;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 120ms;
  font-family: var(--font);
  line-height: 1.4;
}
.cx-preset:hover { border-color: var(--g); color: var(--ink); background: var(--g-soft-2); }

.cx-output { padding: 20px; flex: 1; overflow: auto; }
.cx-empty {
  height: 100%;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--ink-4);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-align: center;
}
.cx-loading { display: flex; flex-direction: column; gap: 14px; padding: 8px 0; }
.cx-loading-row { display: flex; gap: 10px; align-items: center; }
.cx-loading-bar {
  flex: 1; height: 12px;
  background: linear-gradient(90deg, var(--bg-3) 0%, var(--g-soft) 50%, var(--bg-3) 100%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: cx-shimmer 1.4s ease-in-out infinite;
}
@keyframes cx-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.cx-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  animation: cx-pop 360ms cubic-bezier(0.2,0.9,0.3,1.1) backwards;
}
@keyframes cx-pop {
  0% { opacity: 0; transform: translateY(8px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.cx-item-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px;
}
.cx-item-badge {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 4px;
  font-weight: 500;
}
.cx-item.task .cx-item-badge   { background: var(--g-soft); color: var(--g-deep); }
.cx-item.deadline .cx-item-badge { background: var(--action-soft); color: var(--action); }
.cx-item.blocker .cx-item-badge { background: var(--waiting-soft); color: var(--waiting); }
.cx-item.event .cx-item-badge   { background: var(--info-soft); color: var(--info); }
.cx-item.entity .cx-item-badge  { background: var(--memory-soft); color: var(--memory); }
.cx-item-title { font-size: 14px; font-weight: 500; letter-spacing: -0.005em; }
.cx-item-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  line-height: 1.5;
}
.cx-summary {
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.5;
}
.cx-summary .lbl {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
  margin-bottom: 4px;
}

.cx-error {
  background: var(--action-soft);
  border: 1px solid rgba(216,73,58,0.2);
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  color: var(--action);
  font-family: var(--mono);
}

/* ══════════════════════════════════════════════════════════════════
   4. PRICING CALCULATOR
   ══════════════════════════════════════════════════════════════════ */
.pc-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  box-shadow: var(--sh-2);
  padding: 36px 40px 32px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 880px) { .pc-wrap { grid-template-columns: 1fr; padding: 24px; gap: 32px; } }

.pc-left h3 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.pc-left h3 em { font-style: normal; color: var(--g); }
.pc-tier-row {
  display: flex; gap: 8px;
  margin-top: 20px;
  margin-bottom: 28px;
}
.pc-tier {
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
  background: var(--surface);
  cursor: pointer;
  transition: all 120ms;
}
.pc-tier.is-on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.pc-billing {
  display: inline-flex;
  background: var(--bg-3);
  padding: 4px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.pc-billing button {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: all 160ms;
}
.pc-billing button.is-on {
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  box-shadow: 0 1px 4px rgba(27, 42, 74,0.08);
}
.pc-slider-wrap { margin-top: 8px; }
.pc-slider-label {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px;
}
.pc-slider-label .l {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pc-slider-label .v {
  font-family: var(--mono);
  font-size: 22px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.pc-ticks {
  display: flex; justify-content: space-between;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0.04em;
}

.pc-right { text-align: right; }
.pc-total-label {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pc-total {
  font-size: clamp(48px, 6vw, 84px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
  font-feature-settings: 'tnum';
  margin-top: 6px;
}
.pc-total .currency {
  font-size: 0.4em;
  vertical-align: top;
  color: var(--ink-3);
  margin-right: 2px;
  font-weight: 500;
  display: inline-block;
  transform: translateY(0.6em);
}
.pc-total .per {
  font-size: 0.18em;
  color: var(--ink-3);
  font-weight: 400;
  letter-spacing: 0;
  margin-left: 4px;
}
.pc-breakdown {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
}
.pc-breakdown .b-row {
  display: flex; justify-content: space-between;
}
.pc-breakdown .b-row .l { color: var(--ink-3); }
.pc-savings {
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--g-soft);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--g-deep);
  letter-spacing: 0.04em;
  text-align: left;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ══════════════════════════════════════════════════════════════════
   5. SYSTEMS SHOWCASE
   ══════════════════════════════════════════════════════════════════ */
.ep-wrap {
  background: var(--ink);
  border-radius: var(--r-4);
  padding: 36px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.ep-wrap::before {
  content: '';
  position: absolute;
  top: -160px; right: -160px;
  width: 480px; height: 480px;
  background: radial-gradient(closest-side, rgba(27, 42, 74,0.30), transparent 70%);
  pointer-events: none;
}
.ep-inner { position: relative; }
.ep-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
}
@media (max-width: 980px) { .ep-layout { grid-template-columns: 1fr; } }

.ep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.ep-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: all 180ms ease-out;
  position: relative;
}
.ep-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-2px);
}
.ep-card.is-on {
  background: var(--g);
  border-color: var(--g);
  box-shadow: 0 16px 36px rgba(27, 42, 74,0.4);
}
.ep-card.is-on .ep-num,
.ep-card.is-on .ep-name,
.ep-card.is-on .ep-meta { color: #fff; }
.ep-num {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.1em;
}
.ep-name {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: #fff;
  margin-top: 4px;
  line-height: 1.25;
}
.ep-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  margin-top: 6px;
  letter-spacing: 0.04em;
}
.ep-dot {
  position: absolute;
  top: 12px; right: 12px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #2ed573;
  box-shadow: 0 0 0 3px rgba(46,213,115,0.2);
}
.ep-card.is-on .ep-dot {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

.ep-detail {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 22px;
  height: fit-content;
  position: sticky;
  top: 88px;
}
.ep-detail-head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 4px;
}
.ep-detail-head .num {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.08em;
}
.ep-detail-head .name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #fff;
}
.ep-detail-desc {
  font-size: 12.5px;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
  margin-top: 4px;
  margin-bottom: 20px;
}
.ep-metric-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-family: var(--mono);
}
.ep-metric-row:first-of-type { border-top: 0; }
.ep-metric-row .l {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ep-metric-row .v {
  font-size: 18px;
  color: #fff;
  font-weight: 500;
  font-feature-settings: 'tnum';
  letter-spacing: -0.01em;
  transition: color 200ms;
}
.ep-metric-row .v.pop { color: var(--g-mid); }
.ep-metric-row .u { font-size: 11px; color: rgba(255,255,255,0.4); margin-left: 4px; }

.ep-spark {
  margin-top: 16px;
  height: 60px;
  width: 100%;
}

/* Flying chips */
.ep-fly-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}
.ep-fly {
  position: absolute;
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--g);
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(27, 42, 74,0.4);
  animation: ep-fly 1100ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
@keyframes ep-fly {
  0%   { opacity: 0; transform: translate(0,0) scale(0.85); }
  10%  { opacity: 1; transform: translate(0, -8px) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx, 120px), var(--dy, -80px)) scale(0.95); }
}

/* ══════════════════════════════════════════════════════════════════
   6. TIMELINE SCRUBBER
   ══════════════════════════════════════════════════════════════════ */
.tl-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  box-shadow: var(--sh-2);
  padding: 32px;
}
.tl-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 20px;
}
.tl-time {
  font-family: var(--mono);
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-feature-settings: 'tnum';
  line-height: 1;
}
.tl-time .ampm { font-size: 20px; color: var(--ink-3); margin-left: 4px; }
.tl-day {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 6px;
}

.tl-stats {
  display: flex; gap: 24px;
  text-align: right;
}
.tl-stat .v {
  font-family: var(--mono);
  font-size: 20px;
  color: var(--ink);
  font-weight: 500;
}
.tl-stat .l {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.tl-scrubber-wrap {
  margin: 20px 0 12px;
  position: relative;
  height: 60px;
}
.tl-track {
  position: absolute;
  top: 28px; left: 0; right: 0;
  height: 4px;
  background: var(--bg-3);
  border-radius: 2px;
}
.tl-fill {
  position: absolute;
  top: 28px; left: 0;
  height: 4px;
  background: var(--g);
  border-radius: 2px;
}
.tl-handle {
  position: absolute;
  top: 18px;
  width: 24px; height: 24px;
  background: #fff;
  border: 3px solid var(--g);
  border-radius: 50%;
  transform: translateX(-50%);
  cursor: grab;
  box-shadow: 0 4px 12px rgba(27, 42, 74,0.3);
  z-index: 3;
  transition: transform 80ms;
}
.tl-handle:active { cursor: grabbing; transform: translateX(-50%) scale(1.1); }
.tl-ticks {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
  pointer-events: none;
}
.tl-tick {
  display: flex; flex-direction: column;
  align-items: center;
}
.tl-tick .bar {
  width: 1px; height: 6px;
  background: var(--ink-4);
  margin-top: 27px;
}
.tl-tick.major .bar { height: 10px; margin-top: 23px; background: var(--ink-3); }
.tl-tick .lbl {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.tl-events {
  margin-top: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  height: 220px;
  overflow: hidden;
  position: relative;
}
.tl-events-inner {
  position: absolute;
  inset: 0;
}
.tl-event {
  position: absolute;
  left: 0; right: 0;
  display: grid;
  grid-template-columns: 60px 80px 1fr;
  gap: 14px;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
  transition: opacity 240ms, transform 360ms cubic-bezier(0.2,0.9,0.3,1);
  will-change: transform, opacity;
}
.tl-event .t {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.tl-event .type {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 3px 7px;
  border-radius: 4px;
  text-align: center;
  background: var(--bg-3);
  color: var(--ink-2);
}
.tl-event.capture .type { background: var(--g-soft); color: var(--g-deep); }
.tl-event.decision .type { background: var(--info-soft); color: var(--info); }
.tl-event.rank .type { background: var(--waiting-soft); color: var(--waiting); }
.tl-event.complete .type { background: var(--done-soft); color: var(--done); }
.tl-event.blocker .type { background: var(--action-soft); color: var(--action); }
.tl-event .txt { color: var(--ink); font-weight: 500; letter-spacing: -0.005em; }
.tl-event .txt .sub {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  font-weight: 400;
}
.tl-event.is-current { opacity: 1; }
.tl-event.is-past { opacity: 0.42; }
.tl-event.is-future { opacity: 0.18; }

.tl-cursor-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--g) 0%, transparent 100%);
  opacity: 0.4;
  pointer-events: none;
  transform: translateX(-0.5px);
}

.tl-controls { margin-top: 22px; display: flex; gap: 8px; align-items: center; }
.tl-play {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--g);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border: 0;
  transition: background 140ms;
}
.tl-play:hover { background: var(--g-deep); }
.tl-speed {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.tl-speed select {
  font: inherit;
  color: var(--ink);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  margin-left: 6px;
}
