* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --coral: #f97068;
  --lime: #d1d646;
  --platinum: #edf2ef;
  --aqua: #57c4e5;
  --teal: #114b5f;
  --bg: #e4ebe6;
  --surface: #ffffff;
  --surface2: #f2f6f3;
  --surface3: #e8eeea;
  --border: rgba(17,75,95,.11);
  --text-primary: #114b5f;
  --text-secondary: #2d6678;
  --text-muted: #7fa8b8;
  --accent: #57c4e5;
  --accent-light: rgba(87,196,229,.10);
  --tag-blue: rgba(87,196,229,.18);
  --tag-blue-text: #0e7a9a;
  --tag-amber: rgba(209,214,70,.22);
  --tag-amber-text: #5a5e00;
  --tag-green: rgba(40,170,100,.14);
  --tag-green-text: #1a6640;
  --tag-red: rgba(249,112,104,.18);
  --tag-red-text: #b82a1e;
  --tag-purple: rgba(130,80,200,.13);
  --tag-purple-text: #5a2a90;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 6px rgba(17,75,95,.07), 0 4px 18px rgba(17,75,95,.05);
  --shadow-lg: 0 4px 24px rgba(17,75,95,.09), 0 12px 48px rgba(17,75,95,.06);
}

body {
  font-family: "DM Sans", sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-image: radial-gradient(ellipse at 5% 0%, rgba(87,196,229,.09) 0%, transparent 50%), radial-gradient(ellipse at 95% 100%, rgba(249,112,104,.07) 0%, transparent 50%);
}

.night-mode {
  --coral: #fb8f7a;
  --lime: #bad763;
  --aqua: #58c8ee;
  --teal: #17314d;
  --bg: #060c16;
  --surface: #0f1a2a;
  --surface2: #132236;
  --surface3: #1a2b42;
  --border: rgba(135,179,220,.2);
  --text-primary: #e0edf9;
  --text-secondary: #bad3ea;
  --text-muted: #83a8cd;
  --accent-light: rgba(88,200,238,.18);
  --tag-blue: rgba(88,200,238,.22);
  --tag-blue-text: #8ee5ff;
  --shadow: 0 1px 8px rgba(2,5,12,.35), 0 8px 24px rgba(2,5,12,.28);
  --shadow-lg: 0 8px 32px rgba(2,5,12,.45), 0 18px 56px rgba(2,5,12,.33);
  background-image: radial-gradient(ellipse at 12% -10%, rgba(88,200,238,.24) 0%, transparent 55%), radial-gradient(ellipse at 88% 0%, rgba(31,90,170,.22) 0%, transparent 58%), linear-gradient(180deg, #040812 0%, #071020 45%, #050d1b 100%);
  overflow-y: auto;
  overflow-x: hidden;
}

.night-mode .site-header {
  background: linear-gradient(120deg, rgba(14,27,43,.9), rgba(33,78,111,.45) 45%, rgba(12,25,40,.86));
}

.night-mode footer[style] {
  background: linear-gradient(180deg, rgba(7, 13, 24, 0.88) 0%, rgba(10, 18, 30, 0.96) 100%) !important;
  border-top-color: rgba(135, 179, 220, .16) !important;
}

.night-mode .left-nav {
  background: rgba(8,14,24,.92);
  border-right: 1px solid var(--border);
}

.night-mode .main-card,
.night-mode .lp-card,
.night-mode .rcard,
.night-mode .scard {
  background: var(--surface);
}

.night-mode .bub.persona {
  background: #142238;
  color: var(--text-primary);
}

.night-mode .irow {
  background: #132235;
}

.night-mode .cinput {
  color: #e6f2ff;
}

.night-mode .cinput::placeholder {
  color: #84a8ca;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(120deg, rgba(17,75,95,.14), rgba(87,196,229,.14) 45%, rgba(17,75,95,.06));
}
.site-header-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.site-back-chevron {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  box-shadow: var(--shadow);
  transition: border-color .18s ease, color .18s ease, transform .18s ease;
}
.site-back-chevron:hover {
  border-color: var(--aqua);
  color: var(--aqua);
  transform: translateX(-1px);
}
.site-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.header-profile {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.header-username {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.site-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.site-wordmark .mark {
  font-size: 34px;
  color: var(--aqua);
  display: flex;
  align-items: center;
}

.zf-logo-path-flow {
  stroke-dasharray: 30 10;
  stroke-dashoffset: 80;
  animation: zf-logo-flow 6s linear infinite;
}

@keyframes zf-logo-flow {
  from { stroke-dashoffset: 80; }
  to { stroke-dashoffset: 0; }
}

.site-wordmark .name {
  font-size: 33px;
  color: var(--text-primary);
}

.site-wordmark .ai {
  font-size: 33px;
  color: #38bdf8;
}

.night-mode .site-wordmark .name {
  color: #fff;
}

.app-shell { flex: 1; display: flex; min-height: 0; overflow: hidden; }

.left-nav { width: 56px; display: flex; flex-direction: column; align-items: center; padding: 16px 0; gap: 4px; background: var(--bg); }
.nav-logo { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg,var(--coral),var(--aqua)); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.nav-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.nav-icon.active { background: rgba(87,196,229,.14); color: var(--aqua); }
.nav-spacer { flex: 1; }
.left-nav { position: relative; }
.nav-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg,var(--teal),#2d8ca8); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 11px; color: #fff; border: none; cursor: pointer; }
.theme-menu {
  position: absolute;
  left: 46px;
  bottom: 10px;
  min-width: 132px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 50;
}
.header-profile .theme-menu {
  left: auto;
  right: 0;
  top: calc(100% + 8px);
  bottom: auto;
}
.theme-menu-item {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  padding: 6px 8px;
  cursor: pointer;
}
.theme-menu-item:hover {
  background: var(--surface2);
  border-color: var(--border);
  color: var(--teal);
}

.workspace { flex: 1; display: flex; min-width: 0; min-height: 0; }
.left-panel { width: 250px; display: flex; flex-direction: column; padding: 10px 8px; gap: 8px; overflow-y: auto; min-height: 0; }
.right-panel { width: 300px; display: flex; flex-direction: column; padding: 10px 8px; gap: 8px; overflow-y: auto; min-height: 0; }
.main-card { flex: 1; background: var(--surface); border-radius: var(--radius); margin: 10px 6px; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-lg); border-top: 2px solid var(--aqua); min-width: 0; min-height: 0; }
.lp-card, .rcard { background: var(--surface); border-radius: var(--radius-sm); padding: 13px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.panel-title { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 9px; }
.text-theme-primary { color: var(--text-primary); }
.text-theme-secondary { color: var(--text-secondary); }
.text-theme-muted { color: var(--text-muted); }

.module-selector { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.aud-link { font-size: 12px; padding: 6px 8px; border-radius: 8px; display: block; text-decoration: none; color: var(--text-secondary); }
.aud-link.active { background: var(--accent-light); color: var(--teal); font-weight: 600; }
.module-selector-button {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
  padding: 9px 10px;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
}
.module-selector-button::-webkit-details-marker { display: none; }
.segment-picker[open] .module-selector-button {
  border-color: var(--aqua);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.module-selector-title { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.module-selector-subtitle { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.module-selector-chevron { color: var(--text-muted); font-size: 10px; }
.segment-dropdown {
  margin-top: 7px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  max-height: 240px;
  overflow-y: auto;
}
.segment-option {
  display: block;
  padding: 10px 11px;
  text-decoration: none;
  border-bottom: 1px solid var(--surface3);
}
.segment-option:last-child { border-bottom: none; }
.segment-option:hover { background: var(--surface2); }
.segment-option.active { background: var(--accent-light); }
.segment-help-btn {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.segment-help-btn:hover { border-color: var(--aqua); color: var(--aqua); }
.segment-help-btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
  width: 100%;
  border-radius: 10px;
  border: none;
  background: var(--coral);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 12px;
  cursor: pointer;
}
.btn-primary:hover { background: #e05d54; }
.btn-orange {
  width: 100%;
  border-radius: 10px;
  border: none;
  background: #f08a24;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 12px;
  cursor: pointer;
}
.btn-orange:hover { background: #de7a18; }
.segment-modal {
  border: none;
  border-radius: 16px;
  max-width: 720px;
  width: min(92vw, 720px);
  padding: 0;
  box-shadow: var(--shadow-lg);
  background: var(--surface);
}
.segment-modal::backdrop { background: rgba(17, 75, 95, .45); }
.segment-modal-inner { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.segment-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.segment-modal-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.segment-modal-close {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 9px;
  cursor: pointer;
}
.segment-modal-close:hover { border-color: var(--aqua); color: var(--aqua); }
.segment-detail-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface2);
}
.segment-detail-title { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.segment-detail-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
}
.segment-field-label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.segment-field-value { font-size: 11px; color: var(--text-secondary); }
.gauntlet-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 14px;
}
.gauntlet-kicker { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.gauntlet-title { font-size: 20px; font-weight: 700; color: var(--text-primary); margin-top: 4px; }
.gauntlet-copy { font-size: 12px; color: var(--text-secondary); margin-top: 6px; line-height: 1.55; }
.gauntlet-empty { font-size: 13px; color: var(--text-muted); }
.gauntlet-pre {
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
  font-family: "DM Sans", sans-serif;
}
.gauntlet-tab {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text-secondary);
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}
.gauntlet-tab.active {
  border-color: var(--aqua);
  background: var(--accent-light);
  color: var(--teal);
}
.night-mode .gauntlet-tab {
  background: var(--surface2);
  border-color: rgba(135, 179, 220, .3);
  color: #b9d5ee;
}
.night-mode .gauntlet-tab.active {
  background: rgba(88, 200, 238, .26);
  border-color: rgba(142, 229, 255, .55);
  color: #f2fbff;
}
.gauntlet-textarea {
  width: 100%;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  padding: 9px 11px;
  font-size: 12px;
}
.gauntlet-textarea:focus { outline: none; border-color: var(--aqua); box-shadow: 0 0 0 3px var(--accent-light); }
.gauntlet-compose-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.gauntlet-compose-row .gauntlet-textarea {
  flex: 1;
}
.gauntlet-send-btn {
  width: auto;
  white-space: nowrap;
  padding: 9px 14px;
}
.gauntlet-chat-message {
  border-radius: 10px;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(87, 196, 229, .08) 0%, rgba(87, 196, 229, .02) 100%),
    var(--surface);
  border-left: 2px solid var(--aqua);
  padding: 10px 11px;
}
.gauntlet-chat-message.user {
  border-color: rgba(87, 196, 229, .4);
  background: var(--accent-light);
  border-left: 2px solid var(--teal);
}
.gauntlet-chat-role { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.gauntlet-chat-text { font-size: 12px; color: var(--text-secondary); line-height: 1.55; white-space: pre-wrap; }
.gauntlet-chat-text.gauntlet-rerun-prompt {
  font-size: 14px;
  line-height: 1.65;
}
.gauntlet-chat-text.gauntlet-rerun-prompt p {
  font-size: 14px;
  line-height: 1.65;
}
.gauntlet-speaker-link {
  color: var(--teal);
  text-decoration: none;
  font-weight: 700;
}
.gauntlet-speaker-link:hover { color: var(--aqua); text-decoration: underline; }
.gauntlet-inline-reply {
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}
.gauntlet-inline-reply:hover { border-color: var(--aqua); color: var(--teal); }
.gauntlet-panel-shell {
  width: 100%;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.gauntlet-agent-head,
.gauntlet-lens-card,
.gauntlet-chat-shell {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--aqua);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 14px;
}
.gauntlet-run-highlight {
  border-left: 2px solid #2ea463;
  border-color: rgba(46, 164, 99, .42);
  background:
    radial-gradient(circle at 100% 0%, rgba(46, 164, 99, .24) 0%, rgba(46, 164, 99, 0) 58%),
    linear-gradient(180deg, rgba(46, 164, 99, .17) 0%, var(--surface) 44%);
  box-shadow:
    0 0 0 1px rgba(46, 164, 99, .22) inset,
    0 10px 28px rgba(30, 120, 74, .2);
}
.gauntlet-run-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.gauntlet-run-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1b8f57;
  background: rgba(46, 164, 99, .16);
  border: 1px solid rgba(46, 164, 99, .35);
  box-shadow: 0 0 0 1px rgba(46, 164, 99, .14) inset;
}
.gauntlet-run-icon svg {
  width: 13px;
  height: 13px;
}
.gauntlet-run-kicker {
  color: #1f8f58;
}
.gauntlet-vp-apply-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 50;
  width: min(1080px, 96vw);
  max-height: calc(100vh - 3rem);
  transform: translate(-50%, -50%);
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.gauntlet-vp-apply-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(87, 196, 229, .09) 0%, var(--surface) 100%);
}
.gauntlet-vp-apply-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gauntlet-vp-diff-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface2);
  padding: 10px;
}
.gauntlet-vp-diff-card.has-changes {
  border-color: rgba(240, 138, 36, .6);
  box-shadow: 0 0 0 1px rgba(240, 138, 36, .22) inset;
}
.gauntlet-vp-diff-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.gauntlet-vp-diff-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}
.gauntlet-vp-diff-badge {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.gauntlet-vp-diff-badge.changed {
  color: #8a4d00;
  background: rgba(255, 198, 120, .42);
  border: 1px solid rgba(240, 138, 36, .5);
}
.gauntlet-vp-diff-badge.unchanged {
  color: var(--text-muted);
  background: rgba(17, 75, 95, .06);
  border: 1px solid var(--border);
}
.gauntlet-vp-diff-columns {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.gauntlet-vp-side-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 8px;
}
.gauntlet-vp-side-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.gauntlet-vp-side-pre {
  margin-top: 5px;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
  font-family: "DM Sans", sans-serif;
  min-height: 54px;
}
.gauntlet-vp-diff-pre {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 7px 8px;
  white-space: pre-wrap;
  font-size: 11px;
  line-height: 1.45;
  font-family: "DM Mono", monospace;
}
.gauntlet-vp-diff-line {
  display: block;
  padding: 1px 4px;
  border-radius: 5px;
}
.gauntlet-vp-diff-line.context {
  color: var(--text-muted);
}
.gauntlet-vp-diff-line.removed {
  color: #b81f1f;
  background: rgba(249, 112, 104, .14);
}
.gauntlet-vp-diff-line.added {
  color: #17663d;
  background: rgba(40, 170, 100, .16);
}
.gauntlet-vp-apply-footer {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.night-mode .gauntlet-vp-diff-line.context {
  color: #9dbad3;
}
.night-mode .gauntlet-vp-diff-line.removed {
  color: #ffd2cf;
  background: rgba(249, 112, 104, .24);
}
.night-mode .gauntlet-vp-diff-line.added {
  color: #d7ffe9;
  background: rgba(44, 186, 115, .28);
}
@media (max-width: 900px) {
  .gauntlet-vp-diff-columns {
    grid-template-columns: 1fr;
  }
}
.gauntlet-gap-action-btn {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(222, 173, 20, .72);
  background: linear-gradient(180deg, rgba(255, 244, 170, .98) 0%, rgba(255, 234, 130, .96) 100%);
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.gauntlet-gap-action-btn:hover {
  border-color: #c08b00;
  background: linear-gradient(180deg, rgba(255, 249, 194, 1) 0%, rgba(255, 238, 149, .98) 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(165, 120, 8, .2);
}
.gauntlet-gap-action-btn:focus-visible {
  outline: none;
  border-color: #9c7100;
  box-shadow: 0 0 0 3px rgba(255, 201, 58, .44);
}
.gauntlet-gap-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.gauntlet-gap-action-name {
  font-size: 14px;
  font-weight: 700;
  color: #6b4800;
}
.gauntlet-gap-action-metrics {
  font-size: 11px;
  font-weight: 700;
  color: #76540a;
}
.gauntlet-gap-action-copy {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}
.gauntlet-gap-action-alert {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
}
.gauntlet-gap-action-cta {
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid rgba(122, 87, 3, .35);
  background: rgba(255, 255, 255, .42);
  color: #6d4a00;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 6px 11px;
}
.night-mode .gauntlet-gap-action-btn {
  background: linear-gradient(180deg, rgba(224, 167, 22, .98) 0%, rgba(197, 140, 8, .96) 100%);
  border-color: rgba(255, 233, 156, .72);
}
.night-mode .gauntlet-gap-action-btn:hover {
  background: linear-gradient(180deg, rgba(237, 179, 26, 1) 0%, rgba(208, 149, 10, .99) 100%);
  border-color: rgba(255, 241, 189, .84);
  box-shadow: 0 8px 18px rgba(41, 25, 3, .6);
}
.night-mode .gauntlet-gap-action-name {
  color: #fff4ce;
}
.night-mode .gauntlet-gap-action-metrics {
  color: #ffefbd;
}
.night-mode .gauntlet-gap-action-cta {
  border-color: rgba(255, 230, 156, .35);
  background: rgba(42, 25, 3, .28);
  color: #fff0c4;
}
.gauntlet-tab-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.gauntlet-tab-row .gauntlet-tab { width: 100%; text-align: center; }
.gauntlet-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}
.gauntlet-back-link:hover { color: var(--aqua); }
.customer-profile-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.customer-fact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.customer-fact-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  background:
    linear-gradient(180deg, rgba(87, 196, 229, .05) 0%, rgba(87, 196, 229, 0) 100%),
    var(--surface2);
  box-shadow: 0 0 0 1px rgba(255,255,255,.02) inset;
}
.customer-fact-card-wide {
  grid-column: span 2;
}
.customer-fact-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
}
.customer-fact-value {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}
.customer-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.customer-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  border: 1px solid rgba(87, 196, 229, .2);
  background: rgba(87, 196, 229, .08);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.customer-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.customer-stat-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background:
    radial-gradient(circle at top right, rgba(249, 112, 104, .08) 0%, rgba(249, 112, 104, 0) 42%),
    var(--surface2);
}
.customer-stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
}
.customer-stat-value {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
}
.customer-pill {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.customer-pill span {
  font-size: 10px;
  color: inherit;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 700;
}
.customer-pill strong {
  font-size: 11px;
  color: inherit;
  font-weight: 700;
}
.customer-pill-1 { background: rgba(87, 196, 229, .16); color: #0e7a9a; border-color: rgba(87, 196, 229, .36); }
.customer-pill-2 { background: rgba(249, 112, 104, .14); color: #b82a1e; border-color: rgba(249, 112, 104, .32); }
.customer-pill-3 { background: rgba(209, 214, 70, .2); color: #5a5e00; border-color: rgba(209, 214, 70, .35); }
.customer-pill-4 { background: rgba(40, 170, 100, .14); color: #1a6640; border-color: rgba(40, 170, 100, .3); }
.psych-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.psych-row {
  display: grid;
  grid-template-columns: 120px 1fr 34px;
  align-items: center;
  gap: 8px;
}
.psych-label {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 600;
}
.psych-track {
  height: 8px;
  background: rgba(17, 75, 95, .1);
  border-radius: 999px;
  overflow: hidden;
}
.psych-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #57c4e5 0%, #114b5f 100%);
}
.psych-score {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
}
.night-mode .customer-fact-card,
.night-mode .customer-stat-card {
  background:
    linear-gradient(180deg, rgba(88, 200, 238, .07) 0%, rgba(88, 200, 238, 0) 100%),
    rgba(19, 34, 54, .92);
  border-color: rgba(135, 179, 220, .24);
}
.night-mode .customer-tag {
  background: rgba(88, 200, 238, .12);
  border-color: rgba(142, 229, 255, .22);
  color: #dff4ff;
}
.customer-bio p:first-child {
  margin-top: 0;
}
.customer-bio h1,
.customer-bio h2,
.customer-bio h3 {
  display: none;
}
.task-status { color: var(--text-secondary); }
.task-status-title { font-size: 14px; font-weight: 700; color: var(--teal); }
.task-status-copy { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.gauntlet-pending-ghost-wrap {
  display: inline-block;
  vertical-align: middle;
  width: 20px;
  height: 20px;
  margin-right: 5px;
}
.gauntlet-pending-ghost {
  display: inline-block;
  line-height: 1;
  animation: gauntlet-ghost-bounce 1200ms cubic-bezier(.22,.61,.36,1) infinite;
  transform-origin: center bottom;
  will-change: transform;
}
.gauntlet-pending-zero-pulse {
  position: relative;
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
}
.gauntlet-pending-zero-ring {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 1px solid rgba(34, 211, 238, 0.4);
  animation: gauntlet-zero-ping 1200ms cubic-bezier(.22,.61,.36,1) infinite;
}
.gauntlet-pending-zero-mark {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(1) brightness(1.25);
}
.gauntlet-pending-live {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #8dc7df;
}
.gauntlet-pending-text-wave {
  display: inline-flex;
  gap: 4px;
  color: #a6d5ea;
}
.gauntlet-pending-text-wave > span {
  display: inline-block;
  animation: gauntlet-text-wave 700ms ease-in-out infinite;
  animation-delay: calc(var(--i) * 55ms);
  will-change: transform, opacity;
}
.gauntlet-pending-dots {
  display: inline-flex;
  margin-left: 1px;
  color: #b7e6fa;
}
.gauntlet-pending-dots > span {
  display: inline-block;
  min-width: 5px;
  animation: gauntlet-dot-blink 900ms ease-in-out infinite;
  animation-delay: calc(var(--d) * 140ms);
}
@keyframes gauntlet-ghost-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes gauntlet-zero-ping {
  0% { transform: scale(.72); opacity: .95; }
  70% { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}
@keyframes gauntlet-text-wave {
  0%, 100% { transform: translateY(0); opacity: .72; }
  50% { transform: translateY(-4px); opacity: 1; }
}
@keyframes gauntlet-dot-blink {
  0%, 80%, 100% { opacity: .25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

@media (max-width: 768px) {
  .segment-detail-grid { grid-template-columns: 1fr; }
  .psych-row { grid-template-columns: 1fr; gap: 4px; }
  .psych-score { text-align: left; }
  .gauntlet-compose-row { flex-direction: column; align-items: stretch; }
  .gauntlet-send-btn { width: 100%; }
  .customer-fact-grid,
  .customer-stat-grid,
  .lens-metric-grid {
    grid-template-columns: 1fr;
  }
  .customer-fact-card-wide {
    grid-column: span 1;
  }
}

.pcard { display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-radius: 9px; cursor: pointer; text-decoration: none; color: inherit; }
.pcard:hover { background: var(--surface2); }
.pav { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0; }
.pcard-info { min-width: 0; flex: 1; }
.pcard-name { font-size: 11px; font-weight: 600; }
.pcard-sub { font-size: 9px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sent-pip { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--accent); }

.chat-header { display: flex; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border); gap: 10px; }
.survey-info { flex: 1; text-align: center; }
.survey-name { font-size: 13px; font-weight: 600; }
.survey-sub { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.hbtn { padding: 6px 13px; border-radius: 40px; border: 1px solid var(--border); font-size: 11px; background: transparent; color: var(--text-secondary); }
.hbtn.pri { background: var(--coral); color: white; border: none; }
.res-chip { display: flex; align-items: center; gap: 5px; background: rgba(87,196,229,.14); border: 1px solid rgba(87,196,229,.30); border-radius: 40px; padding: 5px 10px; font-size: 10px; font-weight: 600; color: var(--text-primary); }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }

.chat-body { flex: 1; overflow-y: auto; padding: 22px 36px; display: flex; flex-direction: column; gap: 18px; min-height: 0; }
.factory-busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(88, 200, 238, .12) 0%, rgba(88, 200, 238, 0) 32%),
    rgba(7, 17, 26, .48);
  backdrop-filter: blur(5px);
}
.factory-busy-overlay.hidden {
  display: none;
}
.factory-busy-backdrop-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(249, 112, 104, .09) 0%, rgba(249, 112, 104, 0) 24%),
    radial-gradient(circle at 50% 45%, rgba(88, 200, 238, .12) 0%, rgba(88, 200, 238, 0) 34%);
}
.factory-infinity-svg {
  width: 120px;
  height: 75px;
}
.factory-ghost {
  font-size: 11px;
  transform: translate(-6px, 4px);
  filter: drop-shadow(0 0 9px rgba(88, 213, 238, .45));
}
.factory-ghost-orbit {
  animation: factory-ghost-figure-eight 2200ms linear infinite;
  will-change: transform;
}
@keyframes factory-ghost-figure-eight {
  0% { transform: translate(0, 0); }
  12.5% { transform: translate(6px, -4px); }
  25% { transform: translate(10px, 0); }
  37.5% { transform: translate(6px, 4px); }
  50% { transform: translate(0, 0); }
  62.5% { transform: translate(-6px, -4px); }
  75% { transform: translate(-10px, 0); }
  87.5% { transform: translate(-6px, 4px); }
  100% { transform: translate(0, 0); }
}
.factory-busy-title {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #eaf7ff;
  text-align: center;
  text-shadow: 0 1px 8px rgba(3, 13, 20, .3);
}
.gauntlet-progress-card {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 220;
  width: min(640px, calc(100vw - 32px));
  padding: 24px 24px 20px;
  border-radius: 24px;
  border: 1px solid rgba(122, 167, 212, .28);
  background:
    radial-gradient(circle at top left, rgba(249, 112, 104, .14) 0%, rgba(249, 112, 104, 0) 28%),
    radial-gradient(circle at right center, rgba(88, 200, 238, .16) 0%, rgba(88, 200, 238, 0) 38%),
    rgba(6, 14, 26, .96);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, .42),
    0 0 0 1px rgba(255, 255, 255, .03) inset;
  backdrop-filter: blur(18px);
  color: #eaf7ff;
}
.gauntlet-progress-head {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: stretch;
  gap: 18px;
}
.gauntlet-progress-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
}
.gauntlet-progress-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(11, 22, 37, .92) 0%, rgba(12, 25, 42, .65) 100%);
  border: 1px solid rgba(115, 171, 224, .16);
  box-shadow: 0 12px 30px rgba(2, 8, 15, .26) inset;
}
.gauntlet-progress-infinity {
  width: 96px;
  height: 60px;
  color: #58c8ee;
}
.gauntlet-progress-copy {
  min-width: 0;
}
.gauntlet-progress-kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: #ffb36f;
}
.gauntlet-progress-title {
  margin-top: 6px;
  font-size: 24px;
  line-height: 1.18;
  font-weight: 700;
  color: #f5fbff;
}
.gauntlet-progress-meta {
  margin-top: 10px;
  font-size: 13px;
  color: #9fc4e4;
}
.gauntlet-progress-pill {
  align-self: start;
  border-radius: 999px;
  border: 1px solid rgba(255, 179, 111, .3);
  background: rgba(249, 158, 76, .1);
  color: #ffd1a0;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.gauntlet-progress-bar-wrap {
  margin-top: 22px;
}
.gauntlet-progress-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #87accf;
}
.gauntlet-progress-bar-track {
  margin-top: 10px;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(18, 35, 54, .85);
  box-shadow: 0 0 0 1px rgba(115, 171, 224, .1) inset;
}
.gauntlet-progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f08824 0%, #d1d646 48%, #58c8ee 100%);
  box-shadow: 0 0 16px rgba(88, 200, 238, .28);
  transition: width .45s ease;
}
.gauntlet-progress-note {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #8fb1d0;
}
@media (max-width: 720px) {
  .gauntlet-progress-card {
    padding: 18px 18px 16px;
    border-radius: 20px;
  }
  .gauntlet-progress-head {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .gauntlet-progress-content {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .gauntlet-progress-ghost {
    min-height: 84px;
  }
  .gauntlet-progress-title {
    font-size: 20px;
  }
  .gauntlet-progress-pill {
    justify-self: start;
  }
}
.t-div { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 9px; align-self: center; }
.t-div::before, .t-div::after { content: ""; width: 40px; height: 1px; background: var(--border); }
.mrow { display: flex; gap: 9px; max-width: 700px; }
.mrow.user { align-self: flex-end; flex-direction: row-reverse; }
.mav, .agg-av, .pav-chat { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; flex-shrink: 0; margin-top: 2px; }
.mav { background: var(--surface3); color: var(--text-secondary); }
.agg-av { background: linear-gradient(135deg,var(--teal),#2d8ca8); }
.mcontent { flex: 1; }
.pn { font-size: 10px; font-weight: 700; color: var(--text-secondary); }
.pd { font-size: 9px; color: var(--text-muted); font-family: "DM Mono", monospace; }
.tag { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 20px; font-size: 9px; font-weight: 700; }
.plabel { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; flex-wrap: wrap; }
.bub { padding: 12px 14px; border-radius: 14px; line-height: 1.6; font-size: 13px; }
.bub.user { background: var(--teal); color: #fff; border-radius: 14px 4px 14px 14px; }
.bub.persona { background: #fff; border: 1px solid var(--border); border-left: 2px solid var(--aqua); border-radius: 4px 14px 14px 14px; box-shadow: var(--shadow); }
.bub.agg { background: rgba(209,214,70,.12); border: 1px solid rgba(209,214,70,.30); border-left: 2px solid var(--lime); border-radius: 4px 14px 14px 14px; }
.bub-tags { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--border); display: flex; gap: 5px; flex-wrap: wrap; }
.mtag { display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 20px; font-size: 9px; font-weight: 600; background: var(--tag-blue); color: var(--tag-blue-text); }
.wtp-mini { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.wtp-mini-label { font-size: 9px; color: var(--text-muted); margin-bottom: 6px; font-weight: 700; text-transform: uppercase; }
.wrow { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.wprice { font-size: 10px; font-family: "DM Mono", monospace; color: var(--text-secondary); width: 36px; }
.wtrack { flex: 1; height: 4px; background: var(--surface3); border-radius: 3px; overflow: hidden; }
.wfill { height: 100%; border-radius: 3px; }
.wpct { font-size: 9px; color: var(--text-muted); font-family: "DM Mono", monospace; width: 24px; text-align: right; }

.input-area { padding: 12px 18px 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.irow { display: flex; align-items: center; gap: 7px; background: var(--surface2); border-radius: 40px; padding: 6px 6px 6px 16px; border: 1.5px solid var(--border); }
.cinput { flex: 1; border: none; background: transparent; font-size: 12px; color: var(--text-primary); outline: none; }
.sbtn { width: 30px; height: 30px; border-radius: 50%; background: var(--coral); border: none; color: #fff; }
.imeta { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--text-muted); }
.psel { background: var(--surface3); border-radius: 20px; padding: 2px 8px; border: none; font-size: 10px; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.scard { background: var(--surface2); border-radius: 8px; padding: 10px; text-align: center; }
.sv { font-size: 18px; font-weight: 700; }
.sl { font-size: 8px; color: var(--text-muted); text-transform: uppercase; }
.sidebar-polish {
  border: 1px solid var(--border);
  border-left: 2px solid var(--aqua);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(87, 196, 229, .08) 0%, var(--surface) 34%);
  box-shadow: var(--shadow);
  padding: 14px;
}
.sidebar-kicker {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}
.sidebar-copy {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-top: 7px;
}
.sidebar-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-secondary);
  padding: 5px 0;
  border-bottom: 1px solid rgba(17, 75, 95, .08);
}
.sidebar-row:last-child { border-bottom: none; }
.pmf-results-card {
  border-left-color: rgba(87, 196, 229, .65);
}
.pmf-northstar-row {
  margin-top: 6px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
}
.pmf-northstar-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}
.pmf-northstar-value {
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 800;
}
.pmf-northstar-value.go {
  color: #1f8f58;
}
.pmf-northstar-value.caution {
  color: #c57815;
}
.pmf-funnel {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
  padding: 10px;
}
.pmf-bar-row {
  margin-top: 8px;
}
.pmf-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
}
.pmf-bar-track {
  margin-top: 4px;
  height: 9px;
  border-radius: 999px;
  background: rgba(17, 75, 95, .10);
  overflow: hidden;
}
.pmf-bar-fill {
  height: 100%;
  border-radius: 999px;
}
.pmf-bar-fill.resonance {
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}
.pmf-bar-fill.consideration {
  background: linear-gradient(90deg, #fde047 0%, #eab308 100%);
}
.pmf-bar-fill.buy-intent {
  background: linear-gradient(90deg, #fb7185 0%, #ef4444 100%);
}
.pmf-objections {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pmf-obj-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
}
.pmf-obj-pill.high {
  background: rgba(249, 112, 104, .22);
  border-color: rgba(249, 112, 104, .42);
  color: #9d1f16;
}
.pmf-obj-pill.medium {
  background: rgba(251, 191, 36, .24);
  border-color: rgba(217, 119, 6, .35);
  color: #8a4d00;
}
.pmf-obj-pill.low {
  background: rgba(17, 75, 95, .08);
  border-color: var(--border);
  color: var(--text-secondary);
}
.segment-pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.segment-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid transparent;
}
.segment-pill-1 { background: rgba(87, 196, 229, .16); color: #0e7a9a; border-color: rgba(87, 196, 229, .36); }
.segment-pill-2 { background: rgba(249, 112, 104, .14); color: #b82a1e; border-color: rgba(249, 112, 104, .32); }
.segment-pill-3 { background: rgba(209, 214, 70, .2); color: #5a5e00; border-color: rgba(209, 214, 70, .35); }
.segment-pill-4 { background: rgba(40, 170, 100, .14); color: #1a6640; border-color: rgba(40, 170, 100, .3); }
.segment-pill-5 { background: rgba(130, 80, 200, .13); color: #5a2a90; border-color: rgba(130, 80, 200, .28); }
.markdown-panel { white-space: normal; }
.markdown-panel h1 { font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 0 0 8px; }
.markdown-panel h2 { font-size: 14px; font-weight: 700; color: var(--text-primary); margin: 12px 0 6px; }
.markdown-panel h3 { font-size: 13px; font-weight: 700; color: var(--text-secondary); margin: 10px 0 5px; }
.markdown-panel p { font-size: 11px; line-height: 1.5; color: var(--text-secondary); margin: 4px 0; }
.markdown-panel ul, .markdown-panel ol { margin: 4px 0 4px 16px; color: var(--text-secondary); font-size: 11px; }
.markdown-panel li { margin: 3px 0; }
.markdown-panel code {
  background: rgba(17, 75, 95, .08);
  color: var(--teal);
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 10px;
}
.markdown-panel pre {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  overflow-x: auto;
  margin: 7px 0;
}
.markdown-panel pre code { background: transparent; padding: 0; }
.night-mode .markdown-panel p,
.night-mode .markdown-panel ul,
.night-mode .markdown-panel ol,
.night-mode .markdown-panel li {
  color: #d9eaff;
}
.night-mode .gauntlet-chat-text.markdown-panel {
  color: #e0edf9 !important;
}
.night-mode .gauntlet-chat-text {
  color: #d3e5f8;
}

.hm-sub { font-size: 9px; color: var(--text-muted); margin-bottom: 9px; }
.hm-grid { display: grid; grid-template-columns: 42px repeat(4,1fr); gap: 2.5px; }
.hm-ch { font-size: 8px; font-weight: 700; color: var(--text-muted); text-align: center; }
.hm-rh { font-size: 9px; font-family: "DM Mono", monospace; color: var(--text-secondary); display: flex; align-items: center; }
.cell { height: 24px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; }
.c90{background:rgba(87,196,229,.22);color:#0e7a9a;border:1px solid rgba(87,196,229,.38)}
.c80{background:rgba(87,196,229,.15);color:#1a7a95;border:1px solid rgba(87,196,229,.26)}
.c70{background:rgba(87,196,229,.10);color:#2d6678;border:1px solid rgba(87,196,229,.18)}
.c60{background:rgba(209,214,70,.16);color:#5a5e00;border:1px solid rgba(209,214,70,.28)}
.c50{background:rgba(209,214,70,.10);color:#6b6e00;border:1px solid rgba(209,214,70,.18)}
.c40{background:rgba(17,75,95,.06);color:#7fa8b8;border:1px solid rgba(17,75,95,.10)}
.c30{background:rgba(249,112,104,.12);color:#c0281c;border:1px solid rgba(249,112,104,.22)}
.c20{background:rgba(249,112,104,.18);color:#a82014;border:1px solid rgba(249,112,104,.30)}
.c10{background:rgba(249,112,104,.24);color:#8c1a10;border:1px solid rgba(249,112,104,.38)}
.hm-legend { display: flex; align-items: center; gap: 5px; margin-top: 8px; }
.hml { font-size: 8px; color: var(--text-muted); }
.hm-scale { flex: 1; height: 5px; border-radius: 3px; background: linear-gradient(to right,rgba(249,112,104,.7),rgba(209,214,70,.5),rgba(87,196,229,.7)); }
.insight-box { margin-top: 8px; padding: 8px 10px; background: rgba(0,129,175,.07); border-radius: 8px; border-left: 2px solid var(--aqua); font-size: 10px; }

.persona-detail { height: 100%; overflow-y: auto; }
.ocean-header { padding: 18px 28px 16px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, rgba(87,196,229,.07) 0%, #fff 100%); }
.ocean-persona-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ocean-av { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; color: #fff; }
.ocean-name { font-size: 15px; font-weight: 700; }
.ocean-demo { font-size: 10px; color: var(--text-muted); font-family: "DM Mono", monospace; margin-top: 2px; }
.ocean-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.ocean-tag { font-size: 9px; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: var(--tag-blue); color: var(--tag-blue-text); }
.ocean-back { margin-left: auto; background: transparent; border: 1px solid var(--border); border-radius: 8px; padding: 5px 9px; font-size: 10px; color: var(--text-muted); text-decoration: none; }
.ocean-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }
.ocean-row { display: flex; align-items: center; gap: 8px; }
.ocean-label { font-size: 9px; font-weight: 700; color: var(--text-muted); width: 80px; flex-shrink: 0; text-transform: uppercase; }
.ocean-track { flex: 1; height: 6px; background: var(--surface3); border-radius: 4px; overflow: hidden; }
.ocean-fill { height: 100%; border-radius: 4px; }
.ocean-score { font-size: 10px; font-weight: 700; font-family: "DM Mono", monospace; width: 26px; text-align: right; }
.gauntlet-body { padding: 20px 28px; display: flex; flex-direction: column; gap: 16px; }
.gstage { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: linear-gradient(180deg, rgba(255, 255, 255, .02) 0%, rgba(255, 255, 255, 0) 100%), var(--surface); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03); }
.gstage-header { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, rgba(17, 75, 95, .11) 0%, rgba(17, 75, 95, .03) 100%), var(--surface2); }
.gstage-num { width: 20px; height: 20px; border-radius: 50%; background: var(--accent-light); color: var(--teal); display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800; }
.gstage-name { font-size: 10px; font-weight: 700; }
.gstage-q { font-size: 9px; color: var(--text-muted); }
.gstage-score-pill { margin-left: auto; font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: rgba(87, 196, 229, .14); color: #0e7a9a; border: 1px solid rgba(87, 196, 229, .24); }
.gstage-state-pill { font-size: 9px; font-weight: 800; padding: 4px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; border: 1px solid transparent; }
.gstage-state-pill.supportive { background: rgba(87, 196, 229, .09); color: #0e7a9a; border-color: rgba(87, 196, 229, .22); }
.gstage-state-pill.failed { background: rgba(249, 112, 104, .14); color: #b82a1e; border-color: rgba(249, 112, 104, .26); }
.gstage-failed { border-color: rgba(249, 112, 104, .24); box-shadow: 0 0 0 1px rgba(249, 112, 104, .08) inset; }
.gstage-body { padding: 14px; font-size: 12px; line-height: 1.65; display: flex; flex-direction: column; gap: 12px; }
.lens-metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lens-metric-card { border: 1px solid var(--border); border-radius: 12px; padding: 10px 11px; background: linear-gradient(180deg, rgba(255, 255, 255, .02) 0%, rgba(255, 255, 255, 0) 100%), var(--surface2); }
.lens-metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lens-metric-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.lens-metric-value { font-size: 12px; font-weight: 800; color: var(--text-primary); }
.lens-metric-track { margin-top: 8px; height: 8px; border-radius: 999px; overflow: hidden; background: rgba(17, 75, 95, .12); }
.lens-metric-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #57c4e5 0%, #114b5f 100%); }
.gstage-insight { padding: 10px 12px; border-radius: 10px; font-size: 11px; line-height: 1.55; font-weight: 600; background: rgba(87, 196, 229, .08); color: #0e7a9a; border: 1px solid rgba(87, 196, 229, .16); }
.gstage-insight-failed { background: rgba(249, 112, 104, .1); color: #9f2418; border-color: rgba(249, 112, 104, .2); }
.gstage-fix-card { border: 1px solid rgba(40, 170, 100, .22); border-radius: 12px; padding: 10px 12px; background: rgba(40, 170, 100, .08); }
.gstage-fix-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #17663d; }
.gstage-fix-copy { margin-top: 6px; font-size: 12px; line-height: 1.55; color: var(--text-secondary); }
.night-mode .gstage-num {
  background: rgba(88, 200, 238, .32);
  color: #eaf7ff;
  border: 1px solid rgba(142, 229, 255, .45);
}
.night-mode .gstage-score-pill {
  background: rgba(88, 200, 238, .24);
  color: #ecf8ff;
  border: 1px solid rgba(142, 229, 255, .4);
}
.night-mode .gstage-state-pill.supportive {
  background: rgba(88, 200, 238, .14);
  color: #b9eeff;
  border-color: rgba(142, 229, 255, .24);
}
.night-mode .gstage-state-pill.failed {
  background: rgba(255, 130, 120, .14);
  color: #ffb7ae;
  border-color: rgba(255, 130, 120, .24);
}
.night-mode .gstage-failed {
  border-color: rgba(255, 130, 120, .22);
  box-shadow: 0 0 0 1px rgba(255, 130, 120, .08) inset;
}
.night-mode .lens-metric-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .02) 0%, rgba(255, 255, 255, 0) 100%), rgba(10, 20, 35, .6);
}
.night-mode .lens-metric-track {
  background: rgba(255, 255, 255, .08);
}
.night-mode .gstage-insight {
  background: rgba(88, 200, 238, .09);
  color: #b9eeff;
  border-color: rgba(142, 229, 255, .16);
}
.night-mode .gstage-insight-failed {
  background: rgba(255, 130, 120, .12);
  color: #ffb7ae;
  border-color: rgba(255, 130, 120, .22);
}
.night-mode .gstage-fix-card {
  background: rgba(40, 170, 100, .11);
  border-color: rgba(93, 214, 145, .22);
}
.night-mode .gstage-fix-label {
  color: #99f0bf;
}

@media (max-width: 1200px) {
  .right-panel { display: none; }
}
@media (max-width: 900px) {
  body { overflow-y: auto; }
  .left-panel { display: none; }
  .main-card { margin: 8px; }
}
