/* fourthought.css — log + browse blocks for the FourThought tab.
   Palette and component conventions match self-health (white panels,
   #e2e8f0 borders, #2a9d8f teal accent, JetBrains Mono for numerics). */

#fourthought-view { padding: 18px 20px; }

#fourthought-view .sr-only,
#ft-modal .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ft-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 1000px) {
  .ft-layout { grid-template-columns: 1fr; }
}

.ft-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
}
.ft-view-panel { min-height: 0; }

.ft-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  position: relative;
}
.ft-panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
}

.ft-compose-head { justify-content: space-between; }
.ft-mode-switch {
  display: flex;
  padding: 3px;
  margin-left: auto;
  border-radius: 8px;
  background: #f1f5f9;
}
.ft-mode-switch button {
  padding: 5px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}
.ft-mode-switch button.active {
  background: #fff;
  color: #1e293b;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.14);
}
.ft-mode-note {
  margin: -5px 0 10px;
  color: #64748b;
  font-size: 11.5px;
}

/* ── log block ────────────────────────────────────────── */

.ft-thought-input {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font: inherit;
  font-size: 13.5px;
  color: #334155;
  background: #f8fafc;
  line-height: 1.55;
}
.ft-thought-input:focus {
  outline: none;
  border-color: #2a9d8f;
  background: #fff;
}
.ft-thought-input::placeholder { color: #94a3b8; }
#ft-log-block.multi-mode .ft-thought-input {
  min-height: 310px;
  background: #fff;
}
.ft-multi-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: #64748b;
  font-size: 11px;
}
.ft-multi-controls[hidden] { display: none; }
.ft-multi-controls .ft-submit-btn { white-space: nowrap; }

.ft-compose-context {
  min-width: 0;
  overflow-wrap: anywhere;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  background: #f0f9ff;
  color: #0f4c81;
  font-size: 12px;
  line-height: 1.45;
}
.ft-compose-context-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px;
  margin-bottom: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}
.ft-compose-context button {
  grid-column: 2;
  grid-row: 1;
  border: 0;
  background: transparent;
  color: #0369a1;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  padding: 0;
}
.ft-compose-context-head > .ft-context-chip { grid-column: 1; }
.ft-compose-context button:hover { text-decoration: underline; }
.ft-context-chip {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.ft-type-row { display: flex; gap: 4px; margin-top: 10px; }
.ft-type-btn {
  flex: 1;
  min-width: 0;
  padding: 6px 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ft-type-btn:hover { background: #e2e8f0; }
.ft-type-btn.active.statement   { background: #e0f2fe; color: #0369a1; }
.ft-type-btn.active.prediction  { background: #f3e8ff; color: #6d28d9; }
.ft-type-btn.active.reflection  { background: #dcfce7; color: #166534; }
.ft-type-btn.active.question    { background: #fef9c3; color: #854d0e; }

/* sliders */
.ft-grad { margin-top: 16px; }
.ft-grad-title {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.ft-grad-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ft-grad-label {
  font-size: 11px;
  font-weight: 500;
  color: #334155;
  transition: opacity 0.12s;
  min-width: 56px;
}
.ft-grad-label.right { text-align: right; }

.ft-grad-track {
  flex: 1;
  position: relative;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  cursor: pointer;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.ft-grad-track.verity .ft-grad-fill {
  background: #fde68a;
}
.ft-grad-track.verity .ft-grad-handle {
  border-color: #fde68a;
  box-shadow: 0 1px 3px rgba(133, 77, 14, 0.25);
}

.ft-grad-track.valence::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  bottom: -3px;
  width: 1px;
  background: #cbd5e1;
}
.ft-grad-track.valence .ft-grad-fill {
  background: linear-gradient(to right, #e2e8f0, #059669);
}
.ft-grad-track.valence .ft-grad-fill.negative {
  background: linear-gradient(to left, #e2e8f0, #4338ca);
}
.ft-grad-track.valence .ft-grad-handle { border-color: #059669; }
.ft-grad-track.valence .ft-grad-handle.negative { border-color: #4338ca; }

.ft-grad-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  border-radius: 999px;
}
.ft-grad-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #2a9d8f;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}
.ft-grad-pct {
  min-width: 44px;
  text-align: right;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: #1e293b;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.ft-submit-row {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  align-items: center;
}
.ft-domain-select {
  flex: 1;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}
.ft-domain-select:focus {
  outline: none;
  border-color: #2a9d8f;
  background: #fff;
}
.ft-tier-select {
  flex: 0 0 92px;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}
.ft-tier-select:focus {
  outline: none;
  border-color: #2a9d8f;
  background: #fff;
}
.ft-submit-btn {
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 600;
  background: #2a9d8f;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
.ft-submit-btn:hover { background: #218a7e; }
.ft-submit-btn:disabled { background: #cbd5e1; cursor: not-allowed; }

.ft-stake-status {
  font-size: 11px;
  color: #64748b;
  margin-top: 6px;
  font-family: "JetBrains Mono", monospace;
}
.ft-stake-status.error { color: #be123c; }
.ft-stake-status.ok { color: #059669; }

/* ── view block ───────────────────────────────────────── */

.ft-search {
  flex: 1;
  padding: 7px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  background: #f8fafc;
}
.ft-search:focus {
  outline: none;
  border-color: #2a9d8f;
  background: #fff;
}

.ft-link-filter {
  width: 92px;
  height: 31px;
  padding: 6px 9px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font: inherit;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  background: #f8fafc;
}
.ft-link-filter:focus {
  outline: none;
  border-color: #2a9d8f;
  background: #fff;
}

.ft-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  user-select: none;
  transition: background 0.12s;
}
.ft-pill:hover { background: #e2e8f0; }
.ft-pill.active { background: #2a9d8f; color: #fff; }
.ft-pill .label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}
.ft-pill .value { font-size: 12px; font-weight: 500; }
#ft-source-pill .value {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#ft-source-menu { min-width: 260px; }
.ft-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
}
.ft-pill .caret { font-size: 10px; opacity: 0.5; }
.ft-pill .dot.statement   { background: #0369a1; }
.ft-pill .dot.reflection  { background: #166534; }
.ft-pill .dot.prediction  { background: #6d28d9; }
.ft-pill .dot.question    { background: #854d0e; }

.ft-pill-menu {
  position: absolute;
  z-index: 10;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  display: none;
  margin-top: 4px;
}
.ft-pill-menu.open { display: block; }
/* Speaker menu sits at the right edge of the panel; anchor it to the right
   so it expands leftward instead of clipping outside the panel. */
.ft-pill-menu[data-pill="speaker"] {
  right: 0;
  left: auto;
  min-width: 220px;
}
.ft-pill-menu .opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 12.5px;
  color: #334155;
  border-radius: 5px;
  cursor: pointer;
}
.ft-pill-menu .opt:hover { background: #f1f5f9; }
.ft-pill-menu .opt-count {
  margin-left: auto;
  font-size: 10.5px;
  color: #94a3b8;
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
}
.ft-pill-menu .opt.active {
  background: #ecfdf5;
  color: #166534;
  font-weight: 500;
}
.ft-pill-menu .opt .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
}

.ft-time-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #94a3b8;
}
.ft-time-axis {
  flex: 1;
  height: 18px;
  position: relative;
  background: #f1f5f9;
  border-radius: 4px;
  cursor: pointer;
  touch-action: none;
}
.ft-time-window {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #2a9d8f;
  opacity: 0.35;
  border-radius: 3px;
  cursor: grab;
}
.ft-time-window.dragging { cursor: grabbing; }
.ft-time-handle {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 4px;
  background: #2a9d8f;
  border-radius: 2px;
  cursor: ew-resize;
}

.ft-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #94a3b8;
}
.ft-count { letter-spacing: 0.02em; }
.ft-jump-btn {
  font: inherit;
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  color: #2a9d8f;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}
.ft-jump-btn:hover { color: #218a7e; text-decoration: underline; }

.ft-list {
  overflow-y: auto;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
  margin-right: -14px;
}
.ft-empty {
  color: #94a3b8;
  font-size: 13px;
  padding: 24px 8px;
  text-align: center;
}
.ft-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
}
.ft-card header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.ft-card-type {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
}
.ft-card-domain {
  font-size: 10.5px;
  font-weight: 500;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.ft-card-type-statement  { background: #e0f2fe; color: #0369a1; }
.ft-card-type-prediction { background: #f3e8ff; color: #6d28d9; }
.ft-card-type-reflection { background: #dcfce7; color: #166534; }
.ft-card-type-question   { background: #fef9c3; color: #854d0e; }
.ft-card-ts {
  font-size: 11px;
  color: #94a3b8;
  font-family: "JetBrains Mono", monospace;
  white-space: nowrap;
  margin-left: auto;
}
.ft-card-body {
  margin: 0;
  color: #334155;
  font-size: 13.5px;
  line-height: 1.55;
}
.ft-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ft-card-link-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
}
.ft-card footer {
  display: flex;
  gap: 14px;
  margin-top: 6px;
  font-size: 11px;
  color: #94a3b8;
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
}
.ft-card-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.ft-card-action {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  font: inherit;
  font-size: 10.5px;
  line-height: 1;
  padding: 4px 8px;
}
.ft-card-action:hover {
  border-color: #2a9d8f;
  color: #0f766e;
}

/* ── suggest modal ───────────────────────────────────── */
.ft-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.ft-modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 22px 24px;
  width: 460px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.ft-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 12px;
}
.ft-modal-x {
  font: inherit;
  font-size: 22px;
  line-height: 1;
  color: #94a3b8;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 4px;
}
.ft-modal-x:hover { color: #475569; }

.ft-modal-thought {
  margin: 0 0 14px 0;
  padding: 10px 12px;
  background: #f8fafc;
  border-left: 3px solid #2a9d8f;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.55;
  color: #334155;
}
.ft-modal-loading {
  font-size: 12px;
  color: #94a3b8;
  font-family: "JetBrains Mono", monospace;
  text-align: center;
  padding: 18px 0;
}
.ft-modal-section-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 14px 0 6px 0;
}
.ft-modal-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.ft-modal-row-col {
  flex: 1 1 0;
  min-width: 0;
}
.ft-modal-row-col .ft-modal-section-label {
  margin-top: 0;
}
.ft-modal-row-col select {
  width: 100%;
}
.ft-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.ft-modal-btn {
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid transparent;
}
.ft-modal-btn.primary {
  background: #2a9d8f;
  color: #fff;
}
.ft-modal-btn.primary:hover { background: #218a7e; }
.ft-modal-btn.primary:disabled { background: #cbd5e1; cursor: not-allowed; }
.ft-modal-btn.secondary {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}
.ft-modal-btn.secondary:hover { background: #e2e8f0; }
.ft-vote-presets { display: flex; gap: 8px; margin-bottom: 4px; }
.ft-vote-presets .active {
  border-color: #2a9d8f;
  color: #147d73;
  background: #e8f8f5;
}

/* ── multi-stake review ─────────────────────────────── */
.ft-multi-modal-box {
  display: flex;
  flex-direction: column;
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: hidden;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 50px rgba(15, 23, 42, 0.24);
}
.ft-multi-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid #e2e8f0;
}
.ft-multi-modal-head strong { font-size: 15px; }
.ft-multi-modal-head p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 11.5px;
}
.ft-multi-list {
  overflow-y: auto;
  padding: 4px 22px;
}
.ft-multi-row {
  display: grid;
  grid-template-columns: 24px minmax(250px, 1fr) 430px;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid #e2e8f0;
}
.ft-multi-row:last-child { border-bottom: 0; }
.ft-multi-include {
  width: 15px;
  height: 15px;
  margin-top: 9px;
  accent-color: #2a9d8f;
}
.ft-multi-thought {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #334155;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
}
.ft-multi-thought:focus,
.ft-multi-field select:focus {
  outline: none;
  border-color: #2a9d8f;
}
.ft-multi-labels {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
}
.ft-multi-field label {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ft-multi-field select {
  width: 100%;
  height: 32px;
  padding: 5px 7px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  font: inherit;
  font-size: 11.5px;
}
.ft-multi-axis input {
  width: 100%;
  height: 16px;
  accent-color: #2a9d8f;
}
.ft-multi-axis-ends {
  display: flex;
  justify-content: space-between;
  color: #94a3b8;
  font-size: 9px;
}
.ft-multi-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}
#ft-multi-count {
  margin-right: auto;
  color: #64748b;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}
#ft-multi-warning {
  padding: 6px 9px;
  border: 1px solid #fde68a;
  border-radius: 6px;
  background: #fffbeb;
  color: #92400e;
  font-size: 10.5px;
}
#ft-multi-status { margin: 0; padding: 0 22px 12px; }

@media (max-width: 900px) {
  .ft-multi-row { grid-template-columns: 24px 1fr; }
  .ft-multi-labels { grid-column: 2; }
  #ft-multi-warning { display: none; }
}
@media (max-width: 600px) {
  .ft-multi-labels { grid-template-columns: 1fr 1fr; }
  .ft-multi-actions { flex-wrap: wrap; }
  #ft-multi-count { width: 100%; }
}

/* ── Thread view ───────────────────────────────────────────────── */
.ft-card-open { cursor: pointer; transition: border-color 0.12s, box-shadow 0.12s; }
.ft-card-open:hover { border-color: #cbd5e1; box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06); }
.ft-card-tier {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
}
.ft-card-link {
  color: #64748b;
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
}

.ft-thread { display: flex; flex-direction: column; gap: 12px; }
.ft-thread-back {
  align-self: flex-start;
  background: none;
  border: none;
  color: #2a9d8f;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
}
.ft-thread-back:hover { text-decoration: underline; }

/* Ancestry: quiet, slightly indented, connected upward to the focus. */
.ft-thread-ancestors {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 14px;
  border-left: 2px solid #e2e8f0;
}

.ft-thread-focus {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 16px 18px;
  background: #fff;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.05);
}
.ft-thread-focus header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ft-thread-focus-body {
  margin: 0;
  color: #1e293b;
  font-size: 15px;
  line-height: 1.6;
}
.ft-thread-focus footer {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  font-size: 11px;
  color: #94a3b8;
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.ft-thread-section { display: flex; flex-direction: column; gap: 8px; }
.ft-thread-section h4 {
  margin: 4px 0 2px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
/* Replies sit indented under the focus, thread-style. */
.ft-thread-section + .ft-thread-section,
.ft-thread-focus + .ft-thread-section { margin-top: 4px; }

.ft-mini {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px 12px;
  background: #fafbfc;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.ft-mini:hover { border-color: #cbd5e1; background: #fff; }
.ft-mini-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 11px;
  color: #94a3b8;
  font-family: "JetBrains Mono", monospace;
}
.ft-mini-user { color: #475569; }
.ft-mini-ts { margin-left: auto; white-space: nowrap; }
.ft-mini-foot {
  margin-top: 6px;
  font-size: 11px;
  color: #94a3b8;
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
}
.ft-mini-body {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Replies under the focus get a left rail to read as a thread. */
.ft-thread-section h4 + .ft-mini,
.ft-thread-section .ft-mini ~ .ft-mini { margin-left: 0; }

/* Reply tree: root at top, nested replies indented under their parent. */
.ft-thread-tree { display: flex; flex-direction: column; }
.ft-node { display: flex; flex-direction: column; }
.ft-node-children {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 0 16px;
  padding-left: 16px;
}
/* Per-child connectors. Each child draws an elbow into its card; the vertical
   run only continues to the next sibling, so the last child terminates at its
   own card instead of dangling down past the bottom of the subtree. */
.ft-node-children > .ft-node { position: relative; }
.ft-node-children > .ft-node::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 0;
  width: 12px;
  height: 20px;
  border-left: 2px solid #e2e8f0;
  border-bottom: 2px solid #e2e8f0;
  border-bottom-left-radius: 6px;
}
.ft-node-children > .ft-node:not(:last-child)::after {
  content: "";
  position: absolute;
  left: -16px;
  top: 0;
  bottom: -10px;
  border-left: 2px solid #e2e8f0;
}
.ft-thread-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
}
.ft-thread-card.is-root {
  border-color: #cbd5e1;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.05);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.ft-thread-card header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ft-thread-card-body { margin: 0; color: #334155; font-size: 13.5px; line-height: 1.55; }
.ft-thread-card.is-root .ft-thread-card-body { font-size: 15px; color: #1e293b; line-height: 1.6; }
.ft-thread-card footer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  font-size: 11px;
  color: #94a3b8;
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
}
.ft-thread-card footer .ft-card-actions { margin-left: auto; }

/* Manual multi-staking reuses the normal stake fields in compact cards. */
#ft-multi-method { display: flex; width: 100%; margin: 0 0 16px; }
#ft-multi-method[hidden], #ft-manual-controls[hidden], #ft-thought-input[hidden], #ft-mode-note[hidden] { display: none; }
#ft-multi-method button { flex: 1; }
.ft-manual-row { border: 1px solid #d5dfeb; border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.ft-manual-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 12px; }
.ft-manual-remove, .ft-manual-split { border: 0; background: none; color: #64748b; cursor: pointer; }
.ft-manual-remove { font-size: 22px; }
.ft-manual-row .ft-multi-thought { width: 100%; min-height: 120px; }
.ft-manual-split { padding: 6px 0; font: inherit; font-size: 11px; }
.ft-manual-split:disabled { opacity: 0.5; cursor: default; }
.ft-manual-selects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.ft-manual-selects select { width: 100%; min-width: 0; border: 1px solid #d5dfeb; border-radius: 6px; padding: 7px 4px; color: #1e293b; background: white; font: inherit; font-size: 12px; }
.ft-manual-ratings { display: flex; gap: 14px; margin-top: 16px; margin-bottom: 4px; }
.ft-manual-ratings label { display: flex; align-items: center; flex: 1; min-width: 0; gap: 6px; font-size: 11px; }
.ft-manual-ratings output { min-width: 28px; text-align: right; font: 11px "JetBrains Mono", monospace; }
.ft-manual-ratings input { appearance: none; -webkit-appearance: none; flex: 1; min-width: 36px; width: 100%; height: 6px; margin: 0; border-radius: 999px; cursor: pointer; }
.ft-manual-ratings input::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; border: 2px solid var(--thumb-color); border-radius: 50%; background: white; box-shadow: 0 1px 3px #0002; }
.ft-manual-ratings input::-moz-range-thumb { width: 14px; height: 14px; border: 2px solid var(--thumb-color); border-radius: 50%; background: white; }
.ft-manual-ratings input:focus-visible { outline: 2px solid #2a9d8f; outline-offset: 5px; }
@media (max-width: 520px) {
  .ft-manual-ratings { flex-direction: column; gap: 16px; }
}
