/* ============================================================
   Relate AI Workspace — Contact Cockpit
   Scoped to #cockpitContainer so it never bleeds into
   the broader workspace styles. Uses workspace token colours.
   ============================================================ */

/* status hook — set on #cockpitContainer */
#cockpitContainer[data-status="stable"]  { --st: #34d8a0; --st-rgb: 52,216,160; }
#cockpitContainer[data-status="cooling"] { --st: #f7b84b; --st-rgb: 247,184,75; }
#cockpitContainer[data-status="risk"]    { --st: #FF6F8B; --st-rgb: 251,113,133; }

#cockpitContainer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: ck-rise .22s ease-out both;
}

@keyframes ck-rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- HEADER CLUSTER ---- */
.ck-cluster {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    radial-gradient(220px 140px at 100% 0%, rgba(var(--st-rgb),.13), transparent 65%),
    var(--panel);
  overflow: hidden;
}

.ck-cluster::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--st), transparent);
  opacity: .8;
}

.ck-who { min-width: 0; }

.ck-id {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ck-avatar {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 16px; font-weight: 700;
  color: var(--text);
  background: linear-gradient(145deg, rgba(var(--st-rgb),.3), rgba(var(--st-rgb),.08));
  border: 1px solid rgba(var(--st-rgb),.45);
  box-shadow: 0 0 20px -6px rgba(var(--st-rgb),.55);
}

.ck-name {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
}

.ck-rel {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.ck-statusline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ck-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--st);
  background: rgba(var(--st-rgb),.12);
  border: 1px solid rgba(var(--st-rgb),.34);
}

.ck-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--st);
  box-shadow: 0 0 0 0 rgba(var(--st-rgb),.5);
  animation: ck-pulse 2.4s ease-out infinite;
}

@keyframes ck-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(var(--st-rgb),.5); }
  70%  { box-shadow: 0 0 0 7px rgba(var(--st-rgb),0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--st-rgb),0); }
}

.ck-trend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

/* gauge */
.ck-gauge {
  position: relative;
  width: 88px; height: 88px;
  display: grid; place-items: center;
}

.ck-gauge svg { position: absolute; inset: 0; transform: rotate(-90deg); }

.ck-gauge-val {
  font-family: var(--mono, monospace);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
}

.ck-gauge-cap {
  position: absolute;
  bottom: -18px;
  font-family: var(--mono, monospace);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- BRIEFING ---- */
.ck-briefing {
  position: relative;
  padding: 16px 18px;
  border: 1px solid rgba(var(--st-rgb),.24);
  border-radius: 12px;
  background:
    radial-gradient(300px 120px at 0% 0%, rgba(var(--st-rgb),.09), transparent 60%),
    var(--panel);
  box-shadow: 0 0 32px -18px rgba(var(--st-rgb),.6);
}

.ck-label {
  font-family: var(--mono, monospace);
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.ck-label .ai { color: var(--accent); }

.ck-headline {
  margin: 0;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
  text-wrap: pretty;
}

.ck-move {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.ck-move .arrow { color: var(--st); flex: 0 0 auto; margin-top: 1px; }
.ck-move .txt   { font-size: 13px; line-height: 1.5; color: var(--muted); }
.ck-move .txt b { color: var(--text); font-weight: 650; }

/* ---- HEALTH STRIP ---- */
.ck-health-strip {
  padding: 12px 16px;
  border: 1px solid rgba(var(--st-rgb), .22);
  border-radius: 10px;
  background: rgba(var(--st-rgb), .06);
}

.ck-health-reason {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

/* ---- FOLLOW-UPS ---- */
.ck-followup {
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.ck-followup:first-of-type { border-top: 0; }

.ck-followup-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.ck-urgency {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}

.ck-urgency-high   { color: #FF6F8B; background: rgba(251,113,133,.14); }
.ck-urgency-medium { color: #f7b84b; background: rgba(247,184,75,.14); }
.ck-urgency-low    { color: var(--muted); background: rgba(255,255,255,.06); }

.ck-followup-when {
  font-size: 11px;
  color: var(--muted);
}

.ck-followup-reason {
  margin: 0 0 8px;
  font-size: 12.5px;
  line-height: 1.45;
}

.ck-followup-starter {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}

.ck-followup-starter:hover { border-color: var(--accent); }

.ck-loop-evidence {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin: 4px 0 6px;
}

/* ---- NEXT BEST ACTIONS ---- */
.ck-next-actions {
  border-color: rgba(var(--st-rgb), .24);
  background:
    linear-gradient(180deg, rgba(var(--st-rgb), .08), transparent 70%),
    var(--panel);
}

.ck-approach {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.ck-next-action {
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.ck-next-action:first-of-type { border-top: 0; }

.ck-next-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.ck-action-kind {
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ck-action-title {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

.ck-action-reason,
.ck-action-instruction,
.ck-action-evidence {
  display: block;
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

/* ---- PATTERNS + COVERAGE ---- */
.ck-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.ck-meta-chip,
.ck-topic-chip {
  font-size: 10.5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255, 255, 255, .04);
}

.ck-topic-chip {
  color: var(--text);
  border-color: rgba(var(--st-rgb), .28);
  background: rgba(var(--st-rgb), .08);
}

.ck-insight-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ck-insight-list li {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text);
}

.ck-suggest-list li { color: var(--muted); }

.ck-coverage-block { margin-bottom: 10px; }
.ck-coverage-block:last-child { margin-bottom: 0; }

.ck-coverage-cap {
  display: block;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

/* ---- TWO-COL (loops + changes) ---- */
.ck-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 700px) { .ck-two { grid-template-columns: 1fr; } }

.ck-card {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* loops */
.ck-loop {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 9px 0;
  border-top: 1px solid var(--border);
}

.ck-loop:first-of-type { border-top: 0; }

.ck-tick {
  margin-top: 3px;
  width: 8px; height: 8px; border-radius: 50%;
  border: 2px solid var(--muted);
  background: transparent;
}

.ck-loop.warm .ck-tick { border-color: var(--accent); }

.ck-loop-body p   { margin: 0; font-size: 12.5px; line-height: 1.4; }
.ck-loop-body sub { font-size: 11px; color: var(--muted); display: block; margin-top: 2px; }
.ck-wait          { font-family: var(--mono, monospace); font-size: 10px; color: var(--muted); white-space: nowrap; margin-top: 2px; }
.ck-wait.hot      { color: #f7b84b; }

/* deltas */
.ck-delta {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 9px 0;
  border-top: 1px solid var(--border);
}

.ck-delta:first-of-type { border-top: 0; }

.ck-dic {
  width: 20px; height: 20px; border-radius: 6px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800; margin-top: 1px;
}

.ck-delta.up   .ck-dic { color: #34d8a0; background: rgba(52,216,160,.12); }
.ck-delta.down .ck-dic { color: #FF6F8B; background: rgba(251,113,133,.12); }
.ck-delta.flat .ck-dic { color: var(--muted); background: rgba(255,255,255,.05); }

.ck-delta-body p   { margin: 0; font-size: 12.5px; line-height: 1.4; }
.ck-delta-body sub { font-size: 11px; color: var(--muted); display: block; margin-top: 2px; }
.ck-when           { font-family: var(--mono, monospace); font-size: 10px; color: var(--muted); margin-top: 2px; white-space: nowrap; }

/* ---- SMART ACTIONS ---- */
.ck-actions { display: flex; flex-direction: column; gap: 12px; }

.ck-seg {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0,0,0,.25);
}

.ck-seg button {
  min-height: unset;
  padding: 7px 4px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
  transition: background .15s, color .15s;
}

.ck-seg button:hover { color: var(--text); }

.ck-seg button.active {
  color: #06121f;
  background: var(--accent);
  box-shadow: 0 0 14px -4px rgba(94,234,212,.6);
}

.ck-suggestion {
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-soft);
  animation: ck-rise .18s ease-out both;
}

.ck-suggestion p {
  margin: 0 0 11px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
}

.ck-smeta {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ck-tag {
  font-family: var(--mono, monospace);
  font-size: 9.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.ck-tag.tone   { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.ck-tag.high   { color: #34d8a0; border-color: rgba(52,216,160,.32); background: rgba(52,216,160,.07); }
.ck-tag.medium { color: var(--muted); }
.ck-tag.low    { color: #FF6F8B; border-color: rgba(251,113,133,.3); background: rgba(251,113,133,.07); }

.ck-smeta .grow { flex: 1; }

.ck-copy {
  min-height: unset;
  padding: 6px 14px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  transition: border-color .15s, color .15s;
}

.ck-copy:hover { border-color: var(--accent); color: var(--accent); }
.ck-copy.done  { border-color: rgba(52,216,160,.5); color: #34d8a0; background: rgba(52,216,160,.07); }

.ck-regen {
  width: 100%;
  min-height: unset;
  padding: 9px;
  border-radius: 9px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: border-color .15s, color .15s;
}

.ck-regen:hover { border-color: var(--accent); color: var(--accent); }

/* ---- ADVANCED DISCLOSURE ---- */
.ck-adv-toggle {
  width: 100%;
  min-height: unset;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: color .15s, border-color .15s;
}

.ck-adv-toggle:hover { color: var(--text); }
.ck-adv-toggle .chev { transition: transform .2s; color: var(--muted); }
.ck-adv-open .ck-adv-toggle { border-radius: 10px 10px 0 0; border-bottom: 0; }
.ck-adv-open .ck-adv-toggle .chev { transform: rotate(180deg); }

.ck-adv-body {
  display: none;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: var(--panel);
  overflow: hidden;
}

.ck-adv-open .ck-adv-body { display: block; }

.ck-tool { border-top: 1px solid var(--border); }
.ck-tool:first-child { border-top: 0; }

.ck-tool-head {
  width: 100%;
  min-height: unset;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: background .15s;
}

.ck-tool-head:hover { background: rgba(255,255,255,.02); }
.ck-tool-head .chev { color: var(--muted); transition: transform .2s; }
.ck-tool-open .ck-tool-head .chev { transform: rotate(180deg); }

.ck-tool-body { display: none; padding: 4px 14px 16px; }
.ck-tool-open .ck-tool-body { display: block; }

/* empty/loading states */
.ck-empty {
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  padding: 20px 0;
}

.ck-loading { color: var(--muted); font-size: 12.5px; padding: 6px 0; }

/* ============================================================
   COMPANION SECTION
   Uses --companion (sky blue) — distinct from teal --accent.
   ============================================================ */

.ck-intel-bar {
  display: flex;
  justify-content: flex-end;
  margin: 2px 0 4px;
}

.ck-refresh-intel {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.ck-refresh-intel:hover {
  color: var(--accent);
  border-color: var(--accent);
}

#cockpitContainer:not(:empty) {
  animation: ck-rise .22s ease-out both;
}

.ck-companion {
  padding: 14px 16px;
  background: rgba(255, 111, 181, 0.07);
  border: 1px solid rgba(255, 111, 181, 0.20);
  border-radius: 12px;
}

.ck-spark { color: #FF6FB5; }

.ck-companion-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.ck-cpill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ck-conf-yakin     { color: #bbf7d0; background: rgba(34,197,94,0.14);  border: 1px solid rgba(34,197,94,0.30); }
.ck-conf-perkiraan { color: #fde68a; background: rgba(245,158,11,0.14); border: 1px solid rgba(245,158,11,0.30); }
.ck-conf-terbatas  { color: var(--muted); background: rgba(255,255,255,0.04); border: 1px solid var(--border); }

.ck-cmode   { color: #bae6fd; background: rgba(56,189,248,0.12); border: 1px solid rgba(56,189,248,0.25); }
.ck-crhythm { color: var(--muted); background: rgba(255,255,255,0.04); border: 1px solid var(--border); }

.ck-cwhisper {
  margin: 0;
  font-size: 14px;
  line-height: 1.58;
  color: var(--text);
}

/* ---- Tutup loop button ---- */
.ck-tutup {
  display: inline-flex;
  align-items: center;
  min-height: unset;
  padding: 3px 9px;
  margin-top: 6px;
  border-radius: 999px;
  border: 1px solid rgba(56,189,248,0.22);
  background: rgba(56,189,248,0.07);
  color: #FF6FB5;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background .14s, border-color .14s;
}

.ck-tutup:hover {
  background: rgba(56,189,248,0.16);
  border-color: rgba(56,189,248,0.42);
}

.ck-tool-action,
.ck-tool-secondary {
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.ck-tool-action {
  border: 1px solid rgba(77, 227, 255, 0.45);
  background: rgba(15, 118, 110, 0.38);
  color: #dffdf7;
}

.ck-tool-secondary {
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--muted);
}

#cockpitContainer .tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  margin: 2px 4px 2px 0;
  border-radius: 999px;
  font-size: 11px;
  color: var(--text);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}

/* ============================================================
   Design System 2.0 refinements (layered surfaces, soft depth)
   Inherits the premium token palette from styles.css.
   ============================================================ */

#cockpitContainer { gap: 16px; }

.ck-cluster {
  border-radius: var(--r-lg, 16px);
  background:
    radial-gradient(240px 150px at 100% 0%, rgba(var(--st-rgb), 0.16), transparent 65%),
    linear-gradient(180deg, var(--panel), var(--bg-elev));
  box-shadow: var(--sh-2, 0 10px 30px -12px rgba(0, 0, 0, 0.7)), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ck-card,
.ck-companion,
.ck-health-strip,
.ck-suggestion,
.ck-adv-toggle,
.ck-adv-body {
  border-radius: var(--r, 12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.ck-card,
.ck-adv-toggle,
.ck-adv-body {
  background: linear-gradient(180deg, var(--panel), var(--bg-elev));
}

.ck-card { transition: border-color 0.16s var(--ease, ease), transform 0.16s var(--ease, ease); }
.ck-card:hover { border-color: var(--border-strong, #353b48); }

.ck-suggestion { transition: border-color 0.16s var(--ease, ease); }
.ck-suggestion:hover { border-color: var(--accent-line, rgba(77, 227, 255, 0.28)); }

/* gauge: thicker, calmer cap */
.ck-gauge-cap { letter-spacing: 0.22em; color: var(--faint, #6b7280); }

/* segmented control — match new accent gradient */
.ck-seg { border-radius: var(--r, 12px); background: rgba(0, 0, 0, 0.28); }
.ck-seg button.active {
  color: var(--accent-ink, #04211e);
  background: linear-gradient(180deg, var(--accent), var(--accent-2, #8B5CFF));
  box-shadow: 0 4px 16px -6px rgba(139, 92, 255, 0.6);
}

.ck-copy:hover { background: var(--panel-hover, #232733); }

/* tool action buttons reuse the accent gradient */
.ck-tool-action {
  border-color: var(--accent-line);
  background: linear-gradient(180deg, var(--accent), var(--accent-2, #8B5CFF));
  color: var(--accent-ink, #04211e);
}
.ck-followup-starter:hover { background: var(--accent-soft, rgba(77, 227, 255, 0.1)); }

/* skeleton helper for cockpit loading rows (optional hook) */
.ck-skeleton {
  height: 12px;
  border-radius: 6px;
  background: var(--panel-soft);
  position: relative;
  overflow: hidden;
}
.ck-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  animation: ck-shimmer 1.4s infinite;
}
@keyframes ck-shimmer { 100% { transform: translateX(100%); } }

.ck-reciprocity {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.ck-reciprocity-score {
  font-size: 12px;
  margin-bottom: 4px;
}

.ck-reciprocity-saldo {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 4px;
}

.ck-reciprocity-evidence {
  margin-top: 4px;
}

/* ============================================================
   Cockpit Readability Polish — evidence-first briefing desk
   ============================================================ */

.ck-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.ck-label-row .ck-label {
  margin-bottom: 0;
}

.ck-read-confidence,
.ck-action-confidence,
.ck-action-score {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 8px;
  border: 1px solid rgba(var(--st-rgb), 0.26);
  border-radius: 999px;
  color: var(--st);
  background: rgba(var(--st-rgb), 0.08);
  font-family: var(--mono, monospace);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.ck-action-score {
  min-width: 32px;
  justify-content: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--border);
}

.ck-relationship-read {
  position: relative;
  gap: 12px;
  padding: 18px;
  border-color: rgba(var(--st-rgb), 0.32);
  background:
    radial-gradient(360px 180px at 100% 0%, rgba(var(--st-rgb), 0.14), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 46%),
    var(--panel);
  overflow: hidden;
}

.ck-relationship-read::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--st), transparent);
  opacity: 0.75;
}

.ck-read-headline {
  position: relative;
  margin: 0;
  max-width: 68ch;
  color: var(--text);
  font-size: clamp(17px, 2.1vw, 22px);
  font-weight: 720;
  line-height: 1.28;
  letter-spacing: 0;
}

.ck-read-diagnosis {
  margin: -4px 0 0;
  max-width: 76ch;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.ck-read-section {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.ck-read-section-title {
  color: var(--faint, var(--muted));
  font-family: var(--mono, monospace);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ck-read-hypotheses {
  padding-left: 0;
  list-style: none;
}

.ck-read-hypotheses li {
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
}

.ck-read-hypotheses li + li {
  margin-top: 6px;
}

.ck-read-move {
  padding: 12px;
  border: 1px solid rgba(var(--st-rgb), 0.26);
  border-radius: 10px;
  background: rgba(var(--st-rgb), 0.06);
}

.ck-read-move .ck-action-instruction {
  margin-top: 0;
  color: var(--text);
  font-size: 13.5px;
}

.ck-watch-list {
  margin-bottom: 0;
}

.ck-next-action {
  padding: 12px 0;
}

.ck-next-head {
  flex-wrap: wrap;
}

.ck-action-spacer {
  flex: 1 1 auto;
}

.ck-action-signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.ck-action-signal,
.ck-evidence-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--mono, monospace);
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ck-action-signal {
  color: var(--accent);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
}

.ck-evidence-pill {
  color: var(--muted);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
}

.ck-next-actions .ck-approach {
  padding: 10px 11px;
  border: 1px solid rgba(var(--st-rgb), 0.22);
  border-radius: 10px;
  background: rgba(var(--st-rgb), 0.055);
}

@media (max-width: 640px) {
  .ck-cluster {
    grid-template-columns: 1fr;
  }

  .ck-gauge {
    justify-self: start;
  }

  .ck-label-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .ck-action-spacer {
    display: none;
  }
}

/* ============================================================
   Structural pass — stronger hierarchy, flatter nesting, rhythm.
   No markup/class changes; semantic status colours (--st) preserved.
   The point: the cockpit stops reading as a stack of identical dark
   boxes and gains a clear lead (cluster + briefing + read) over the
   supporting panels.
   ============================================================ */

#cockpitContainer { gap: 18px; }

/* --- Cluster: a real header band, gauge integrated --- */
.ck-cluster { padding: 22px 24px; align-items: center; }
.ck-id {
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
}
.ck-avatar { width: 48px; height: 48px; font-size: 18px; border-radius: 14px; }
.ck-name { font-size: 24px; }
.ck-gauge { width: 96px; height: 96px; }
.ck-gauge svg { width: 96px; height: 96px; }
.ck-gauge-val { font-size: 30px; }

/* --- Consistent section markers: a small accent tick before each label
   gives the panel stack a readable rhythm instead of faint repetition --- */
.ck-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--faint, var(--muted));
}
.ck-label::before {
  content: "";
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.85;
  flex: 0 0 auto;
}
/* Companion already carries its own ✦ marker — don't double it up */
.ck-label:has(.ck-spark)::before { display: none; }
.ck-label-row { align-items: center; }

/* --- Lead panels carry more weight --- */
.ck-headline { font-size: 16px; font-weight: 550; }
.ck-relationship-read { padding: 20px 22px; }
.ck-read-headline { font-size: clamp(18px, 2.2vw, 23px); }

/* Flatten the "box in a box": hypotheses become a clean accented list */
.ck-read-hypotheses li {
  padding: 7px 0 7px 14px;
  border: 0;
  border-left: 2px solid var(--accent-line);
  border-radius: 0;
  background: transparent;
}
.ck-read-hypotheses li + li { margin-top: 2px; }
.ck-read-section { padding-top: 14px; gap: 9px; }

/* --- Supporting cards: calmer, tighter, clearly secondary --- */
.ck-card { padding: 16px 18px; }
.ck-two { gap: 16px; }

/* --- Action zone gets a bit more presence as the "do something" area --- */
.ck-actions { gap: 14px; }
.ck-seg { padding: 4px; }
.ck-seg button { padding: 9px 4px; }

/* ============================================================
   Futuristic motion layer — subtle, premium, GPU-only.
   Staggered entrance + slow ambient sheen on lead panels + a thin
   status scan-line. Continuous motion is limited to 2 hero surfaces
   and runs slow (no hot-path cost). Disabled under reduced-motion.
   ============================================================ */
@keyframes ck-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes ck-sheen   { 0% { background-position: 170% 0; } 100% { background-position: -70% 0; } }
@keyframes ck-scan    { 0% { background-position: -40% 0; } 100% { background-position: 160% 0; } }

/* children stagger in instead of the whole panel rising as one block */
#cockpitContainer:not(:empty) { animation: none; }
#cockpitContainer > * { animation: ck-fade-up 0.42s var(--ease, ease) both; }
#cockpitContainer > *:nth-child(1) { animation-delay: 0.03s; }
#cockpitContainer > *:nth-child(2) { animation-delay: 0.08s; }
#cockpitContainer > *:nth-child(3) { animation-delay: 0.13s; }
#cockpitContainer > *:nth-child(4) { animation-delay: 0.18s; }
#cockpitContainer > *:nth-child(5) { animation-delay: 0.23s; }
#cockpitContainer > *:nth-child(6) { animation-delay: 0.28s; }
#cockpitContainer > *:nth-child(7) { animation-delay: 0.33s; }
#cockpitContainer > *:nth-child(n + 8) { animation-delay: 0.38s; }

/* slow neutral sheen sweep across the two lead surfaces */
.ck-cluster::after,
.ck-relationship-read::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, 0.05) 50%, transparent 58%);
  background-size: 220% 100%;
  animation: ck-sheen 7.5s ease-in-out infinite;
}

/* the cluster's status hairline becomes a slow scan */
.ck-cluster::before {
  background: linear-gradient(90deg, transparent, var(--st), transparent);
  background-size: 220% 100%;
  animation: ck-scan 5s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  #cockpitContainer > *,
  .ck-cluster::after,
  .ck-relationship-read::after,
  .ck-cluster::before { animation: none !important; }
  #cockpitContainer > * { opacity: 1; transform: none; }
}

/* ---- CUSTOM MODE PANEL ---- */
.ck-seg { grid-template-columns: repeat(4, 1fr); }

.ck-custom { margin: 8px 0 4px; display: flex; flex-direction: column; gap: 8px; }
.ck-custom-brief {
  width: 100%; min-height: 64px; resize: vertical;
  background: var(--surface, rgba(255,255,255,.04));
  border: 1px solid var(--border, rgba(255,255,255,.12));
  border-radius: 10px; padding: 10px 12px; color: inherit;
  font: inherit; font-size: 13px; line-height: 1.4;
}
.ck-custom-brief:focus { outline: none; border-color: var(--accent, #34d8a0); }
.ck-custom-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ck-custom-chips .ck-chip {
  font-size: 11.5px; padding: 4px 10px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); color: inherit;
}
.ck-custom-chips .ck-chip:hover { background: rgba(255,255,255,.1); }
.ck-custom-gen {
  align-self: flex-start; padding: 7px 14px; border-radius: 10px; cursor: pointer;
  font-size: 12.5px; font-weight: 600; border: none;
  background: var(--accent, #34d8a0); color: #06231b;
}
.ck-custom-gen:disabled { opacity: .45; cursor: not-allowed; }
