/* ============================================================
   Discovery OS · v5.0 styles
   Namespace: .ds-*  (no conflict with .bs- orange / .as- blue)
   Palette: mint #11D49B → iris #7C5CFF gradient
   Tokens borrowed from mock-im-v2/im.css (--ink / --paper / --bone-2 / etc)
   ============================================================ */

.studio-discovery-os {
  display: block;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: var(--paper);
  font-family: var(--font-ui, 'Geist', 'Inter', system-ui, sans-serif);
  color: var(--ink);
}

.ds-mount,
.ds-root {
  display: block;
  width: 100%;
  min-height: 100%;
  position: relative;
}

.ds-fallback {
  padding: 60px 24px;
  text-align: center;
  color: var(--ink-60);
}
.ds-fallback-glyph { font-size: 48px; opacity: 0.5; }
.ds-fallback-title { font-family: var(--font-display, serif); font-size: 28px; margin: 12px 0 6px; }
.ds-fallback-sub { font-size: 13px; }
.ds-fallback-hint { font-family: var(--font-mono, monospace); font-size: 11px; margin-top: 16px; letter-spacing: 0.12em; opacity: 0.5; }

/* -------- root layout -------- */
.ds-root {
  padding: 24px 28px 80px;
  max-width: 1600px;
  margin: 0 auto;
  position: relative;
}

/* -------- resume banner (D) -------- */
.ds-resume-slot { margin-bottom: 20px; }
.ds-resume {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  background: rgba(17, 212, 155, 0.06);
  border: 1px solid rgba(17, 212, 155, 0.22);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}
.ds-resume::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
}
.ds-resume-glyph {
  font-size: 28px;
  text-align: center;
  color: var(--ok);
}
.ds-resume-body { font-size: 13px; line-height: 1.55; }
.ds-resume-line { margin-bottom: 4px; }
.ds-resume-line strong { color: var(--ink); font-weight: 600; }
.ds-resume-actions { display: flex; gap: 8px; }

/* -------- header -------- */
.ds-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ink-08);
}
.ds-eyebrow {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(20, 20, 26, 0.55);
  margin-bottom: 6px;
}
.ds-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 36px;
  line-height: 1.1;
  font-weight: 400;
  margin: 0 0 8px;
  color: var(--ink);
}
.ds-sub {
  font-size: 13px;
  color: var(--ink-60);
  max-width: 700px;
  margin: 0;
  line-height: 1.5;
}
.ds-header-right { display: flex; gap: 8px; }

/* -------- buttons -------- */
.ds-btn {
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 140ms var(--ease);
  white-space: nowrap;
}
.ds-btn--ghost {
  background: transparent;
  border-color: rgba(20, 20, 26, 0.15);
  color: rgba(20, 20, 26, 0.8);
}
.ds-btn--ghost:hover {
  background: var(--ink-04);
  border-color: rgba(20, 20, 26, 0.25);
}
.ds-btn--primary {
  background: var(--ink);
  color: var(--paper);
  border-color: transparent;
}
.ds-btn--primary:hover { opacity: 0.92; transform: translateY(-1px); }

/* -------- controls (A) -------- */
.ds-controls {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 16px;
  padding: 18px;
  background: white;
  border: 1px solid var(--ink-08);
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(20, 20, 26, 0.03);
}
@media (max-width: 1280px) { .ds-controls { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1100px) { .ds-controls { grid-template-columns: 1fr 1fr; } }
.ds-ctl {}
.ds-ctl-label {
  display: block;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(20, 20, 26, 0.55);
  margin-bottom: 8px;
}
.ds-textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  background: var(--paper);
  border: 1px solid rgba(20, 20, 26, 0.12);
  border-radius: 8px;
  resize: vertical;
  color: var(--ink);
  outline: none;
  transition: border-color 140ms;
}
.ds-textarea:focus { border-color: #7C5CFF; }
.ds-textarea--tall { min-height: 220px; }
.ds-ctl-meta { font-size: 11px; margin-top: 6px; min-height: 16px; }
.ds-meta-ok { color: #11A574; }
.ds-meta-warn { color: #B8893A; }
.ds-ctl-hint {
  font-size: 11px;
  color: rgba(20, 20, 26, 0.5);
  margin-top: 6px;
  line-height: 1.4;
}

.ds-slider-row { display: flex; align-items: center; gap: 12px; }
.ds-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(20, 20, 26, 0.10);
  border-radius: 2px;
  outline: none;
}
.ds-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  background: var(--ink);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(20, 20, 26, 0.15);
}
.ds-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  background: var(--ink);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}
.ds-slider-val {
  min-width: 32px;
  font-family: var(--font-mono, monospace);
  font-size: 14px;
  font-weight: 600;
  color: #7C5CFF;
  text-align: right;
}

.ds-seg {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 3px;
  background: var(--ink-05);
  border-radius: 8px;
}
.ds-seg-btn {
  font-family: inherit;
  font-size: 11px;
  padding: 6px 8px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  color: rgba(20, 20, 26, 0.7);
  transition: all 120ms;
  white-space: nowrap;
}
.ds-seg-btn:hover { background: var(--ink-04); }
.ds-seg-btn.is-active {
  background: white;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(20, 20, 26, 0.10);
}

/* -------- tabs -------- */
.ds-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(20, 20, 26, 0.10);
}
.ds-tab {
  font-family: inherit;
  font-size: 13px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: rgba(20, 20, 26, 0.55);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 140ms;
}
.ds-tab:hover { color: rgba(20, 20, 26, 0.9); }
.ds-tab.is-active {
  color: #7C5CFF;
  border-bottom-color: #7C5CFF;
  font-weight: 600;
}

/* -------- reflow badge -------- */
.ds-reflow-badge {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(20, 20, 26, 0.92);
  color: white;
  border-radius: 999px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(8px);
  transition: all 200ms var(--ease);
  pointer-events: none;
  z-index: 100;
}
.ds-reflow-badge.is-visible { opacity: 1; transform: translateY(0); }
.ds-rb-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
}

/* -------- toast -------- */
.ds-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 14px 18px;
  background: rgba(20, 20, 26, 0.95);
  color: white;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  transition: all 240ms var(--ease);
  max-width: 420px;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(20, 20, 26, 0.25);
}
.ds-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.ds-toast--ok { border-left: 3px solid #11D49B; }
.ds-toast--warn { border-left: 3px solid #F4B941; }
.ds-toast--bad { border-left: 3px solid #C13D5F; }

/* ============================================================
   B + C  Sprint grid + week dashboard
   ============================================================ */
.ds-sprint-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 1280px) { .ds-sprint-grid { grid-template-columns: 1fr; } }

.ds-track {
  background: white;
  border: 1px solid var(--ink-08);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  transition: all 180ms var(--ease);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ds-track::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--track-color, #7C5CFF);
  opacity: 0.6;
  transition: opacity 180ms;
}
.ds-track:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--ink-08); }
.ds-track:hover::before { opacity: 1; }
.ds-track.is-active { box-shadow: 0 0 0 2px var(--track-color, #7C5CFF); }
.ds-track.is-active::before { opacity: 1; width: 4px; }
.ds-track.is-paused { opacity: 0.7; }

.ds-track-head {}
.ds-track-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.ds-track-id {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(20, 20, 26, 0.55);
}
.ds-track-name {
  font-family: var(--font-display, serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 8px;
  min-height: 44px;
}
.ds-track-meta { display: flex; flex-wrap: wrap; gap: 6px; }

.ds-pill {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ds-pill--ok { background: rgba(17, 165, 116, 0.12); color: #11A574; }
.ds-pill--warn { background: rgba(244, 185, 65, 0.15); color: #B8893A; }
.ds-pill--bad { background: rgba(193, 61, 95, 0.12); color: #C13D5F; }
.ds-pill--iris { background: rgba(124, 92, 255, 0.12); color: #7C5CFF; }
.ds-pill--neutral { background: rgba(20, 20, 26, 0.06); color: var(--ink-60); }

.ds-chip {
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--ink-05);
  color: rgba(20, 20, 26, 0.7);
  border: 1px solid transparent;
  white-space: nowrap;
}

.ds-track-section {
  padding-top: 12px;
  border-top: 1px dashed var(--ink-08);
}
.ds-track-section:first-of-type { border-top: none; padding-top: 0; }
.ds-track-section-label {
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(20, 20, 26, 0.5);
  margin-bottom: 10px;
}

/* current week row */
.ds-current-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}
.ds-current-cell { text-align: center; }
.ds-current-num {
  font-family: var(--font-display, serif);
  font-size: 28px;
  line-height: 1;
  color: var(--ink);
}
.ds-current-num--actual {
  color: var(--accent);
  font-style: italic;
}
.ds-current-lbl {
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(20, 20, 26, 0.5);
  margin-top: 4px;
}
.ds-current-arrow {
  font-size: 14px;
  color: rgba(20, 20, 26, 0.3);
}

/* weekly cards */
.ds-weeks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 6px;
}

.ds-week {
  background: var(--paper);
  border: 1px solid rgba(20, 20, 26, 0.06);
  border-radius: 8px;
  padding: 8px;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 96px;
}
.ds-week.is-current {
  background: rgba(17, 212, 155, 0.08);
  border-color: rgba(124, 92, 255, 0.25);
}
.ds-week.is-paused { opacity: 0.5; }
.ds-week-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ds-week-tag {
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--ink-60);
  font-weight: 600;
}
.ds-week-fill {
  flex: 1;
  height: 3px;
  background: var(--ink-08);
  border-radius: 2px;
  overflow: hidden;
}
.ds-week-fill-bar {
  height: 100%;
  background: var(--ok);
  transition: width 200ms;
}
.ds-week-stats {
  display: flex;
  gap: 6px;
  font-size: 10px;
  color: var(--ink-60);
}
.ds-week-stats strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.ds-week-quotes { display: flex; flex-direction: column; gap: 3px; }
.ds-week-quote {
  font-size: 10px;
  line-height: 1.4;
  color: rgba(20, 20, 26, 0.7);
  font-style: italic;
  border-left: 2px solid rgba(124, 92, 255, 0.3);
  padding-left: 6px;
}
.ds-week-status {
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: #7C5CFF;
  padding: 3px 6px;
  background: rgba(124, 92, 255, 0.08);
  border-radius: 4px;
  text-align: center;
}
.ds-week-next {
  font-size: 10px;
  color: rgba(20, 20, 26, 0.7);
  line-height: 1.4;
}
.ds-week-next strong { color: #11A574; }

/* 7-day plan */
.ds-day7 { display: flex; flex-direction: column; gap: 6px; }
.ds-day7-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 6px 0;
}
.ds-day7-day {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  color: #7C5CFF;
  background: rgba(124, 92, 255, 0.08);
  border-radius: 4px;
  text-align: center;
  padding: 4px 0;
  height: fit-content;
}
.ds-day7-body {}
.ds-day7-label {
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: rgba(20, 20, 26, 0.55);
  margin-bottom: 4px;
}
.ds-day7-tasks {
  margin: 0;
  padding-left: 14px;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(20, 20, 26, 0.75);
}
.ds-day7-tasks li { margin-bottom: 2px; }

/* recruit paths */
.ds-recruit { display: flex; flex-direction: column; gap: 8px; }
.ds-recruit-row { display: grid; grid-template-columns: 60px 1fr; gap: 10px; align-items: center; }
.ds-recruit-bar {
  height: 4px;
  background: rgba(20, 20, 26, 0.06);
  border-radius: 2px;
  overflow: hidden;
}
.ds-recruit-bar-fill { height: 100%; transition: width 200ms; }
.ds-recruit-body { display: flex; flex-direction: column; gap: 2px; font-size: 11px; }
.ds-recruit-body strong { color: var(--ink); font-weight: 600; }
.ds-recruit-meta { font-size: 10px; color: rgba(20, 20, 26, 0.55); }

/* track actions */
.ds-track-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-top: 12px; border-top: 1px dashed var(--ink-08); }
.ds-track-btn {
  font-family: inherit;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid rgba(20, 20, 26, 0.15);
  color: rgba(20, 20, 26, 0.8);
  cursor: pointer;
  transition: all 140ms;
}
.ds-track-btn:hover { background: var(--ink-04); }
.ds-track-btn--primary {
  background: var(--ink);
  color: var(--paper);
  border-color: transparent;
}

/* priority banner */
.ds-priority-banner { margin-top: 24px; }
.ds-priority {
  padding: 18px 20px;
  background: var(--ink);
  border-radius: 14px;
  color: var(--paper);
}
.ds-priority-eyebrow {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 12px;
}
.ds-priority-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.6;
}
.ds-priority-list li { margin-bottom: 6px; color: rgba(255, 255, 255, 0.85); }
.ds-priority-list strong { color: #11D49B; }

/* ============================================================
   F-1  Mom test detector
   ============================================================ */
.ds-momtest {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 18px;
}
@media (max-width: 900px) { .ds-momtest { grid-template-columns: 1fr; } }
.ds-momtest-left,
.ds-momtest-right {
  background: white;
  border: 1px solid var(--ink-08);
  border-radius: 12px;
  padding: 18px;
}
.ds-section-label {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(20, 20, 26, 0.55);
  margin-bottom: 12px;
}
.ds-momtest-rule-summary {
  margin-top: 10px;
  font-size: 11px;
  color: rgba(20, 20, 26, 0.5);
}
.ds-momtest-results { display: flex; flex-direction: column; gap: 10px; max-height: 480px; overflow-y: auto; }
.ds-empty {
  padding: 32px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-40);
}
.ds-mom-tally { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.ds-mom-pill {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--ink-05);
  color: rgba(20, 20, 26, 0.7);
}
.ds-mom-pill--bad { background: rgba(193, 61, 95, 0.12); color: #C13D5F; }
.ds-mom-pill--warn { background: rgba(244, 185, 65, 0.15); color: #B8893A; }
.ds-mom-pill--ok { background: rgba(17, 165, 116, 0.12); color: #11A574; }

.ds-mom-row {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--paper);
  border-left: 3px solid rgba(20, 20, 26, 0.1);
  font-size: 12px;
}
.ds-mom-row--leading { border-left-color: #C13D5F; background: rgba(193, 61, 95, 0.05); }
.ds-mom-row--hypothetical { border-left-color: #B8893A; background: rgba(244, 185, 65, 0.06); }
.ds-mom-row--honest { border-left-color: #11A574; background: rgba(17, 165, 116, 0.05); }
.ds-mom-q {
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 6px;
  color: var(--ink);
}
.ds-mom-type {
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: rgba(20, 20, 26, 0.55);
  margin-bottom: 6px;
}
.ds-mom-advice {
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(20, 20, 26, 0.75);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ds-mom-advice strong { color: var(--ink); }
.ds-mom-advice-text { color: var(--ink-60); }

/* ============================================================
   F-2  Script generator
   ============================================================ */
.ds-script {
  background: white;
  border: 1px solid var(--ink-08);
  border-radius: 12px;
  padding: 18px;
}
.ds-script-controls {
  display: flex;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--ink-08);
}
.ds-script-ctl { display: flex; flex-direction: column; gap: 4px; }
.ds-script-ctl label {
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(20, 20, 26, 0.55);
}
.ds-script-ctl select {
  font-family: inherit;
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid rgba(20, 20, 26, 0.12);
  border-radius: 6px;
  background: var(--paper);
  cursor: pointer;
  outline: none;
}

.ds-script-doc { display: flex; flex-direction: column; gap: 16px; }
.ds-script-head {}
.ds-script-meta { display: flex; flex-wrap: wrap; gap: 6px; }

.ds-script-section {
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--paper);
  border-left: 3px solid rgba(20, 20, 26, 0.15);
}
.ds-script-section--open { border-left-color: #11D49B; }
.ds-script-section--specific { border-left-color: #7C5CFF; }
.ds-script-section--fear { border-left-color: #C13D5F; }
.ds-script-section--followup { border-left-color: #F4B941; }
.ds-script-section--close { border-left-color: var(--ink-40); }

.ds-script-section-label {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(20, 20, 26, 0.7);
  margin-bottom: 10px;
  font-weight: 600;
}
.ds-script-q {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.6;
}
.ds-script-q li { margin-bottom: 4px; }

.ds-script-redflags {
  padding: 14px 16px;
  background: rgba(193, 61, 95, 0.05);
  border-radius: 10px;
  border-left: 3px solid #C13D5F;
}
.ds-script-redflags ul {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(20, 20, 26, 0.8);
}

/* ============================================================
   F-3  State machine
   ============================================================ */
.ds-sm {
  background: white;
  border: 1px solid var(--ink-08);
  border-radius: 12px;
  padding: 18px;
}
.ds-sm-eyebrow {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(20, 20, 26, 0.5);
  margin: 16px 0 12px;
}
.ds-sm-eyebrow:first-child { margin-top: 0; }
.ds-sm-states {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
@media (max-width: 900px) { .ds-sm-states { grid-template-columns: repeat(2, 1fr); } }

.ds-sm-state {
  padding: 12px;
  border-radius: 10px;
  background: var(--paper);
  border-left: 3px solid rgba(20, 20, 26, 0.2);
}
.ds-sm-state--ok { border-left-color: #11A574; background: rgba(17, 165, 116, 0.05); }
.ds-sm-state--warn { border-left-color: #F4B941; background: rgba(244, 185, 65, 0.05); }
.ds-sm-state--bad { border-left-color: #C13D5F; background: rgba(193, 61, 95, 0.05); }
.ds-sm-state--iris { border-left-color: #7C5CFF; background: rgba(124, 92, 255, 0.05); }
.ds-sm-state--neutral { border-left-color: rgba(20, 20, 26, 0.3); }

.ds-sm-state-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ds-sm-state-label {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.ds-sm-state-count {
  font-family: var(--font-display, serif);
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
}
.ds-sm-state-desc {
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink-60);
  margin-bottom: 8px;
}
.ds-sm-state-hyps { display: flex; gap: 4px; flex-wrap: wrap; }
.ds-sm-state-hyp {
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  background: var(--ink-08);
  border-radius: 3px;
}

.ds-sm-transitions { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.ds-sm-tx {
  display: grid;
  grid-template-columns: 100px 24px 100px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  background: var(--paper);
  border-radius: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
}
.ds-sm-tx-from, .ds-sm-tx-to { color: rgba(20, 20, 26, 0.8); font-weight: 600; }
.ds-sm-tx-arrow { color: #7C5CFF; text-align: center; }
.ds-sm-tx-trigger { color: var(--ink-60); font-family: inherit; font-size: 11.5px; }
@media (max-width: 700px) { .ds-sm-tx { grid-template-columns: 1fr; } }

.ds-sm-actions { display: flex; flex-direction: column; gap: 6px; }
.ds-sm-action {
  padding: 8px 12px;
  background: rgba(17, 212, 155, 0.04);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
}
.ds-sm-action strong { color: #7C5CFF; }
.ds-sm-action span { color: rgba(20, 20, 26, 0.75); }

/* ============================================================
   Quote bank
   ============================================================ */
.ds-quotes {
  background: white;
  border: 1px solid var(--ink-08);
  border-radius: 12px;
  padding: 18px;
}
.ds-quote-filters {
  display: flex;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--ink-08);
}
.ds-quote-filter-group { display: flex; flex-direction: column; gap: 4px; }
.ds-quote-filter-group label {
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(20, 20, 26, 0.55);
}
.ds-quote-filter-group select {
  font-family: inherit;
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(20, 20, 26, 0.12);
  border-radius: 6px;
  background: var(--paper);
  outline: none;
  cursor: pointer;
}
.ds-quote-count {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: rgba(20, 20, 26, 0.55);
  margin-left: auto;
}
.ds-quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.ds-quote-card {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--paper);
  border-left: 3px solid var(--sent, #7C5CFF);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 140ms;
}
.ds-quote-card:hover { transform: translateY(-1px); }
.ds-quote-text {
  font-style: italic;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink);
}
.ds-quote-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ds-quote-source { font-size: 11px; color: rgba(20, 20, 26, 0.7); font-weight: 500; }
.ds-quote-meta {
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: rgba(20, 20, 26, 0.5);
}
.ds-quote-theme {
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  color: var(--sent, #7C5CFF);
  letter-spacing: 0.04em;
}

/* ============================================================
   JTBD
   ============================================================ */
.ds-jtbd {
  background: white;
  border: 1px solid var(--ink-08);
  border-radius: 12px;
  padding: 18px;
}
.ds-jtbd-eyebrow {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(20, 20, 26, 0.5);
  margin-bottom: 16px;
}
.ds-jtbd-group { margin-bottom: 18px; }
.ds-jtbd-group:last-child { margin-bottom: 0; }
.ds-jtbd-group-head {
  font-size: 13px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ds-jtbd-group-head strong { color: #7C5CFF; font-family: var(--font-mono, monospace); }
.ds-jtbd-count {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(20, 20, 26, 0.06);
  border-radius: 3px;
  color: var(--ink-60);
  margin-left: auto;
}
.ds-jtbd-rows { display: flex; flex-direction: column; gap: 8px; }
.ds-jtbd-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--paper);
  border-radius: 8px;
}
.ds-jtbd-bar {
  height: 4px;
  background: rgba(20, 20, 26, 0.06);
  border-radius: 2px;
  overflow: hidden;
}
.ds-jtbd-bar-fill {
  height: 100%;
  background: var(--accent);
}
.ds-jtbd-body { display: flex; flex-direction: column; gap: 2px; }
.ds-jtbd-label { font-size: 13px; font-weight: 500; color: var(--ink); }
.ds-jtbd-hire { font-size: 11.5px; color: rgba(20, 20, 26, 0.7); }
.ds-jtbd-evidence {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  color: var(--ink-40);
  letter-spacing: 0.04em;
}

/* -------- phone fallback (≤600px) -------- */
@media (max-width: 600px) {
  .ds-root { padding: 12px; }
  .ds-toast { right: 8px; bottom: 8px; left: auto; transform: none; max-width: calc(100vw - 16px); }
  .ds-toast.is-visible { transform: none; }
  .ds-reflow-badge { right: 8px; bottom: 8px; }
  .ds-slider::-webkit-slider-thumb { width: 24px; height: 24px; }
  .ds-slider::-moz-range-thumb { width: 24px; height: 24px; }
}
body.is-phone .ds-controls { grid-template-columns: 1fr !important; }
body.is-phone .ds-sprint-grid,
body.is-phone .ds-momtest,
body.is-phone .ds-sm-states { grid-template-columns: 1fr !important; }
body.is-phone .ds-toast { z-index: 9999; }

/* ============================================================
   v5.6 P0 — Progressive Disclosure (Discovery OS)
   ============================================================ */
.ds-root-pro { display: flex; flex-direction: column; }
.ds-root-pro .ds-header-pro {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 22px 28px 16px;
  border-bottom: 1px solid var(--ink-08);
}
.ds-root-pro .ds-h-l { display: flex; flex-direction: column; gap: 3px; }
.ds-root-pro .ds-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--ink-60);
  text-transform: uppercase;
}
.ds-root-pro .ds-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.015em;
}
.ds-root-pro .ds-h-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-60);
  letter-spacing: 0.04em;
}
.ds-root-pro .ds-h-r { display: flex; align-items: center; gap: 8px; }
.ds-h-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bone);
  border: 1px solid var(--ink-08);
  color: var(--ink-60);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all 180ms var(--ease);
}
.ds-h-pill:hover { color: var(--ink); border-color: var(--ink-24); }
.ds-h-pill.is-open { color: var(--accent); border-color: var(--accent); background: rgba(209,74,36,0.05); }
.ds-h-pill-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }
.ds-resume-collapse { padding: 0 28px 8px; }
.ds-resume-collapse[hidden] { display: none; }

/* tabs 加 number badge */
.ds-tabs .ds-tab-n {
  display: inline-block;
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  background: var(--bone);
  color: var(--ink-60);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 500;
}
.ds-tabs .ds-tab.is-active .ds-tab-n {
  background: var(--accent);
  color: var(--paper);
}

@media (max-width: 900px) {
  .ds-root-pro .ds-header-pro { padding: 18px 18px 14px; flex-direction: column; gap: 10px; }
}

/* ds-flow-pane (跨工具数据流 tab content) */
.ds-flow-pane {
  background: var(--bone);
  padding: 22px 24px;
  border-radius: 12px;
  margin-top: 16px;
}
.ds-flow-pane-h {
  font-size: 13.5px;
  color: var(--ink);
  margin-bottom: 14px;
}
.ds-flow-actions-pro {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
