/* ============================================================
   Pre/cision Executive Suite — demo app styles
   Light data-professional chrome, editorial serif headlines.
   ============================================================ */
:root {
  --suite-bg: #F4F6F8;
  --suite-sidebar: #0B0F1A;
  --suite-card: #FFFFFF;
  --sev-critical: #D62839;
  --sev-warning: #E58F00;
  --sev-positive: #1B9E62;
  --sev-info: #3E9CCF;
  --type-commercial-bg: #E7F4FB; --type-commercial-fg: #1E6E9C;
  --type-customer-bg: #F3E8F5; --type-customer-fg: #8E2D8E;
  --type-marketing-bg: #FDE6EF; --type-marketing-fg: #C40050;
  --type-sensory-bg: #EEF1F4; --type-sensory-fg: #444444;
}
html, body { height: 100%; }
body.suite { background: var(--suite-bg); overflow: hidden; }

.app { display: grid; grid-template-columns: 232px 1fr; height: 100vh; }

/* ---------------- sidebar ---------------- */
.sidebar {
  background: var(--suite-sidebar); color: rgba(255,255,255,.62);
  display: flex; flex-direction: column; padding: 18px 12px 14px;
}
.sidebar .brand { display: flex; align-items: flex-start; justify-content: space-between; padding: 4px 10px 18px; }
.sidebar .brand .logo-svg { display: block; width: auto; color: #fff; }
.sidebar .brand .logo-full { height: 20px; }
.sidebar .brand .logo-min { display: none; height: 24px; }
.sidebar .brand .sub { display: block; font-size: 8.5px; font-weight: 700; letter-spacing: .28em; color: rgba(255,255,255,.42); margin-top: 5px; }
.sidebar .brand .bell { color: rgba(255,255,255,.5); position: relative; padding-top: 2px; }
.sidebar .brand .bell .dot { position: absolute; top: 0; right: -2px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-pink); border: 1.5px solid var(--suite-sidebar); }
.snav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.snav a {
  display: flex; align-items: center; gap: 11px;
  font-size: 13.5px; font-weight: 500; color: rgba(255,255,255,.62);
  padding: 9px 10px; border-radius: 8px; position: relative;
  transition: background .15s ease, color .15s ease;
}
.snav a:hover { color: #fff; background: rgba(255,255,255,.05); }
.snav a.active { color: #fff; background: rgba(255,255,255,.08); font-weight: 600; }
.snav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand-pink); }
.snav svg { flex: none; opacity: .85; }
.sidebar .spacer { flex: 1; }
.sfoot { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 10px; }
.sfoot a { display: flex; align-items: center; gap: 11px; font-size: 13px; color: rgba(255,255,255,.5); padding: 7px 10px; border-radius: 8px; }
.sfoot a:hover { color: #fff; background: rgba(255,255,255,.05); }
.user { display: flex; align-items: center; gap: 10px; padding: 10px 10px 2px; }
.user .avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--grad-brand); color: #fff; font-size: 11.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.user .u-name { font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.85); line-height: 1.2; }
.user .u-mail { font-size: 10.5px; color: rgba(255,255,255,.4); }

/* ---------------- main / topbar ---------------- */
.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: #fff; border-bottom: 1px solid var(--border-1);
  padding: 0 22px; height: 52px; flex: none;
}
.topbar .crumb { font-size: 13px; font-weight: 600; color: var(--fg-2); display: flex; align-items: center; gap: 8px; }
.topbar .crumb .sep { color: var(--border-2); }
.topbar .right { display: flex; align-items: center; gap: 12px; }
.topbar .backlink { font-size: 13px; font-weight: 600; color: var(--fg-2); white-space: nowrap; }
.topbar .backlink:hover { color: var(--fg-1); }
.topbar .walkthrough-cta { white-space: nowrap; }
.sidebar .brand a { text-decoration: none; display: block; }
@media (max-width: 767px) { .topbar .backlink { display: none; } }
.workspace {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--fg-1);
  border: 1px solid var(--border-1); border-radius: 8px; padding: 6px 12px; background: #fff; cursor: default;
}
.workspace svg { opacity: .6; }
.demo-flag {
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
  color: var(--blue-800); background: var(--blue-100);
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.content { flex: 1; overflow-y: auto; padding: 28px 30px 96px; }
.view { max-width: 1060px; margin: 0 auto; }

/* shared page furniture */
.pg-kicker { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); }
.pg-title { font-family: var(--font-serif); font-weight: 700; font-size: 40px; letter-spacing: -0.01em; color: var(--fg-1); margin-top: 6px; line-height: 1.1; }
.pg-sub { font-size: 14px; color: var(--text-muted); margin-top: 8px; }
.card { background: var(--suite-card); border: 1px solid var(--border-1); border-radius: 12px; }
.s-label { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); }

/* severity + type chips */
.sevdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sevdot.critical { background: var(--sev-critical); }
.sevdot.warning { background: var(--sev-warning); }
.sevdot.positive { background: var(--sev-positive); }
.sevdot.info { background: var(--sev-info); }
.typetag { font-size: 10px; font-weight: 700; letter-spacing: .08em; padding: 3px 8px; border-radius: 4px; }
.typetag.commercial { background: var(--type-commercial-bg); color: var(--type-commercial-fg); }
.typetag.customer { background: var(--type-customer-bg); color: var(--type-customer-fg); }
.typetag.marketing { background: var(--type-marketing-bg); color: var(--type-marketing-fg); }
.typetag.sensory { background: var(--type-sensory-bg); color: var(--type-sensory-fg); }

/* buttons */
.sbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  border: 1px solid var(--border-2); background: #fff; color: var(--fg-1);
  padding: 8px 16px; border-radius: 8px; cursor: pointer; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease-out;
}
.sbtn:active:not(.queued), .fpill:active, .suggest:active, .tour-btn:active, .dyk-tabs button:active { transform: scale(.97); }
.sbtn:hover { background: var(--surface-subtle); color: var(--fg-1); }
.sbtn.ink { background: var(--fg-1); border-color: var(--fg-1); color: #fff; }
.sbtn.ink:hover { background: #262626; color: #fff; }
.sbtn.pink { background: var(--brand-pink); border-color: var(--brand-pink); color: #fff; }
.sbtn.pink:hover { background: var(--pink-600); color: #fff; }
.sbtn.queued { background: #E4F5EC; border-color: #BFE8D4; color: var(--sev-positive); cursor: default; }

/* ---------------- command center ---------------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 26px; }
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 7px; }
.kpi .v { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--fg-1); line-height: 1; }
.kpi .d { font-size: 12px; font-weight: 700; }
.kpi .d.up { color: var(--sev-positive); } .kpi .d.down { color: var(--sev-critical); } .kpi .d.flat { color: var(--text-muted); font-weight: 500; }
.cc-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 14px; margin-top: 14px; align-items: start; }
.panel { padding: 20px; }
.panel .p-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel .p-title { font-size: 14.5px; font-weight: 700; color: var(--fg-1); }
.panel .p-link { font-size: 12.5px; font-weight: 600; }
.attn-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px;
  border-top: 1px solid var(--border-1); cursor: pointer;
}
.attn-row:hover .a-title { color: var(--brand-pink); }
.attn-row .a-title { font-family: var(--font-serif); font-size: 15px; font-weight: 600; color: var(--fg-1); flex: 1; line-height: 1.35; transition: color .15s ease; }
.attn-row .a-delta { font-size: 14px; font-weight: 800; }
.attn-row .a-delta.down { color: var(--sev-critical); } .attn-row .a-delta.up { color: var(--sev-positive); }
.queue-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--border-1); }
.queue-row p { flex: 1; font-size: 13px; color: var(--fg-2); line-height: 1.45; }
.queue-row p b { color: var(--fg-1); }
.digest-note { margin-top: 14px; padding: 14px 18px; display: flex; gap: 12px; align-items: center; background: var(--blue-100); border: 1px solid var(--blue-200); border-radius: 10px; font-size: 12.5px; color: var(--blue-800); }

/* ---------------- signals list ---------------- */
.sig-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; flex-wrap: wrap; }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border-1); width: 100%; margin-top: 14px; }
.tabs button {
  font-size: 11.5px; font-weight: 700; letter-spacing: .14em;
  color: var(--text-muted); background: none; border: none; cursor: pointer;
  padding: 10px 2px; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.on { color: var(--fg-1); border-bottom-color: var(--fg-1); }
.search { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border-1); background: #fff; border-radius: 8px; padding: 7px 12px; color: var(--text-muted); }
.search input { border: none; outline: none; font-family: var(--font-sans); font-size: 13px; width: 170px; color: var(--fg-1); background: transparent; }
.filters { display: flex; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.filters .f-label { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; color: var(--text-muted); margin-right: 4px; }
.fpill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--fg-2);
  border: 1px solid var(--border-1); background: #fff;
  padding: 6px 13px; border-radius: 999px; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease-out;
}
.fpill:hover { border-color: var(--border-2); }
.fpill.on { background: var(--fg-1); border-color: var(--fg-1); color: #fff; }
.fpill .cnt { font-size: 10.5px; font-weight: 800; background: var(--surface-subtle); color: var(--fg-2); border-radius: 4px; padding: 1px 6px; }
.fpill.on .cnt { background: rgba(255,255,255,.18); color: #fff; }

.sev-group { margin-top: 26px; }
.sev-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; border-bottom: 2px solid var(--fg-1); }
.sev-head .l { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.sev-head .l.critical { color: var(--sev-critical); } .sev-head .l.warning { color: #B26F00; }
.sev-head .l.positive { color: var(--sev-positive); } .sev-head .l.info { color: var(--sev-info); }
.sev-head .r { font-size: 11px; color: var(--text-muted); letter-spacing: .08em; }
.sig-card {
  display: grid; grid-template-columns: minmax(0, 7fr) 3fr 170px; gap: 20px;
  background: #fff; border: 1px solid var(--border-1); border-left: 3px solid var(--border-2);
  border-radius: 10px; padding: 18px 20px; margin-top: 12px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.sig-card:hover { box-shadow: var(--shadow-card); }
.sig-card.critical { border-left-color: var(--sev-critical); }
.sig-card.warning { border-left-color: var(--sev-warning); }
.sig-card.positive { border-left-color: var(--sev-positive); }
.sig-card.info { border-left-color: var(--sev-info); }
.sig-meta { display: flex; align-items: center; gap: 9px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; color: var(--text-muted); }
.sig-title { font-family: var(--font-serif); font-size: 17.5px; font-weight: 700; color: var(--fg-1); margin-top: 8px; line-height: 1.3; }
.sig-narr { font-size: 12.5px; color: var(--fg-3); line-height: 1.55; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.sig-reco .s-label { display: block; margin-bottom: 7px; }
.sig-reco p { font-size: 12.5px; color: var(--fg-2); line-height: 1.5; }
.sig-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; text-align: right; }
.sig-delta { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.sig-delta.down { color: var(--sev-critical); } .sig-delta.up { color: var(--sev-positive); }
.sig-stat { font-size: 10.5px; color: var(--text-muted); letter-spacing: .06em; line-height: 1.6; }
.sig-stat b { color: var(--fg-2); }
.sig-empty { margin-top: 26px; padding: 44px; text-align: center; color: var(--text-muted); font-size: 14px; border: 1px dashed var(--border-2); border-radius: 12px; }

/* ---------------- signal detail ---------------- */
.back { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--fg-2); margin-bottom: 18px; cursor: pointer; }
.back:hover { color: var(--brand-pink); }
.det-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.badges { display: flex; gap: 7px; flex-wrap: wrap; }
.badge-s { font-size: 9.5px; font-weight: 800; letter-spacing: .1em; padding: 4px 9px; border-radius: 4px; background: var(--surface-subtle); color: var(--fg-2); border: 1px solid var(--border-1); }
.badge-s.warn { background: #FDF3E2; color: #B26F00; border-color: #F3DFB8; }
.badge-s.crit { background: #FBE7E9; color: var(--sev-critical); border-color: #F3C6CB; }
.badge-s.new { background: var(--pink-100); color: var(--pink-600); border-color: var(--pink-200); }
.det-title { font-family: var(--font-serif); font-size: 34px; font-weight: 700; color: var(--fg-1); line-height: 1.15; margin-top: 14px; letter-spacing: -0.01em; }
.det-bullets { margin: 14px 0 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 5px; }
.det-bullets li { font-size: 13.5px; color: var(--fg-2); }
.det-detected { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-muted); margin-top: 14px; letter-spacing: .04em; }
.det-sec { margin-top: 34px; }
.det-sec .sec-tag { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 800; letter-spacing: .16em; color: var(--brand-pink); }
.det-sec .sec-tag::after { content: ""; flex: 0 0 26px; height: 2px; background: var(--brand-pink); }
.det-sec h2 { font-family: var(--font-serif); font-size: 23px; font-weight: 700; margin-top: 8px; }
.ana-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.ana-card { padding: 18px 20px; }
.ana-card .s-label { display: block; margin-bottom: 8px; }
.ana-card p { font-size: 13.5px; color: var(--fg-2); line-height: 1.6; }
.act-row {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: start;
  padding: 18px 20px; margin-top: 12px;
}
.act-row .n { font-size: 13px; font-weight: 800; color: var(--brand-pink); padding-top: 2px; }
.act-row h3 { font-size: 15px; font-weight: 700; color: var(--fg-1); }
.act-row p { font-size: 12.5px; color: var(--fg-3); margin-top: 6px; line-height: 1.55; }
.act-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.reco-chip { font-size: 9.5px; font-weight: 800; letter-spacing: .12em; background: var(--surface-subtle); border: 1px solid var(--border-1); color: var(--fg-2); padding: 4px 9px; border-radius: 4px; }
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.chart-card { padding: 16px 18px 12px; }
.chart-card .c-title { font-size: 12.5px; font-weight: 700; color: var(--fg-1); margin-bottom: 10px; }
.chart-card svg { display: block; width: 100%; height: auto; }
.chart-note { font-size: 10.5px; color: var(--text-muted); margin-top: 8px; }

/* ---------------- ask precision ---------------- */
.ask-wrap { display: grid; grid-template-columns: 230px 1fr; gap: 14px; height: calc(100vh - 52px - 56px); max-width: 1120px; margin: 0 auto; }
.convo-list { padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.convo-list .sbtn { width: 100%; }
.convo-item { font-size: 12.5px; color: var(--fg-2); padding: 9px 10px; border-radius: 8px; cursor: pointer; line-height: 1.4; border: 1px solid transparent; }
.convo-item:hover { background: var(--surface-subtle); }
.convo-item.on { background: var(--surface-subtle); border-color: var(--border-1); font-weight: 600; color: var(--fg-1); }
.convo-empty { font-size: 12px; color: var(--text-muted); text-align: center; padding: 18px 6px; }
.chat-panel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 20px; border-bottom: 1px solid var(--border-1); flex: none; }
.chat-head .t { font-size: 12.5px; font-weight: 700; color: var(--fg-1); letter-spacing: .02em; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 26px 26px 16px; min-height: 0; }
.chat-inner { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }

.empty-state { text-align: center; padding: 40px 20px 20px; }
.empty-state .orb {
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 18px;
  background: var(--grad-brand); opacity: .9;
  animation: orb 3.2s ease-in-out infinite;
}
@keyframes orb { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.empty-state h2 { font-family: var(--font-serif); font-size: 26px; font-weight: 700; }
.empty-state p { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.try-label { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; color: var(--text-muted); margin: 26px 0 10px; text-align: center; }
.suggests { display: flex; flex-direction: column; gap: 8px; max-width: 480px; margin: 0 auto; }
.suggest {
  font-family: var(--font-sans); font-size: 13.5px; color: var(--fg-2); text-align: left;
  background: #fff; border: 1px solid var(--border-1); border-radius: 10px;
  padding: 12px 16px; cursor: pointer;
  transition: border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .12s ease-out;
}
.suggest:hover { border-color: var(--brand-pink); color: var(--fg-1); box-shadow: var(--shadow-card); }

.msg-user { align-self: flex-end; max-width: 85%; background: var(--fg-1); color: #fff; font-size: 14px; padding: 11px 16px; border-radius: 14px 14px 3px 14px; line-height: 1.5; }
.msg-ai { align-self: stretch; }
.ai-head { display: flex; align-items: center; gap: 9px; }
.ai-head .avatar-p { width: 22px; height: 22px; border-radius: 6px; background: var(--grad-brand); flex: none; }
.ai-head .who { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--fg-1); }
.ai-head .when { font-size: 10.5px; color: var(--text-muted); }
.reason-line {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 9px;
  font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--blue-800);
  background: var(--blue-100); border: 1px solid var(--blue-200); border-radius: 6px; padding: 5px 10px;
}
.reason-line .zap { color: var(--brand-pink); }
.thinking { display: inline-flex; gap: 5px; padding: 12px 4px; }
.thinking i { width: 7px; height: 7px; border-radius: 50%; background: var(--border-2); animation: think 1.1s ease infinite; }
.thinking i:nth-child(2) { animation-delay: .18s; } .thinking i:nth-child(3) { animation-delay: .36s; }
@keyframes think { 0%,100% { opacity: .35; transform: translateY(0);} 45% { opacity: 1; transform: translateY(-4px);} }
.ai-body { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.ai-body p { font-size: 13.5px; color: var(--fg-2); line-height: 1.65; }
.ai-body h4 { font-family: var(--font-serif); font-size: 16.5px; color: var(--fg-1); font-weight: 700; }
.ai-body ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.ai-body ol li { font-size: 13px; color: var(--fg-2); line-height: 1.6; }
.ai-body ol li::marker { font-weight: 800; color: var(--brand-pink); }
.ai-note { font-size: 12.5px; color: var(--blue-800); background: var(--blue-100); border-left: 3px solid var(--brand-blue); padding: 10px 14px; border-radius: 0 8px 8px 0; line-height: 1.55; }
.ai-callout { font-size: 12.5px; color: #7A5800; background: #FDF6E3; border: 1px solid #F3E4B5; padding: 10px 14px; border-radius: 8px; line-height: 1.6; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border-1); border-radius: 10px; }
table.dtable { border-collapse: collapse; width: 100%; font-size: 12px; }
.dtable th { text-align: left; font-size: 9.5px; font-weight: 800; letter-spacing: .1em; color: var(--text-muted); background: var(--surface-subtle); padding: 9px 12px; border-bottom: 1px solid var(--border-1); white-space: nowrap; }
.dtable td { padding: 9px 12px; border-bottom: 1px solid var(--border-1); color: var(--fg-2); white-space: nowrap; }
.dtable tr:last-child td { border-bottom: none; }
.dtable tr td:first-child { font-weight: 600; color: var(--fg-1); }
.dtable tr.total td { font-weight: 800; color: var(--fg-1); background: var(--surface-subtle); }

.chat-inputbar { flex: none; border-top: 1px solid var(--border-1); padding: 12px 20px; background: #fff; }
.chat-input { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border-2); border-radius: 10px; padding: 4px 4px 4px 16px; }
.chat-input:focus-within { border-color: var(--brand-blue); box-shadow: 0 0 0 3px var(--focus-ring); }
.chat-input input { flex: 1; border: none; outline: none; font-family: var(--font-sans); font-size: 13.5px; color: var(--fg-1); background: transparent; padding: 9px 0; }
.chat-input .mode { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; color: var(--text-muted); border-right: 1px solid var(--border-1); padding-right: 10px; }
.chat-fine { font-size: 10px; color: var(--text-muted); text-align: center; margin-top: 8px; letter-spacing: .03em; }

/* ---------------- catalog ---------------- */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 24px; }
.metric { padding: 18px 20px; }
.metric .v { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--fg-1); margin-top: 7px; }
.metric .v.muted { color: var(--border-2); }
.metric .s { font-size: 11px; color: var(--text-muted); margin-top: 5px; }
.dyk { margin-top: 14px; padding: 22px 24px; }
.dyk-tabs { display: flex; gap: 8px; }
.dyk-tabs button {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border-1); background: #fff;
  font-size: 11.5px; font-weight: 800; color: var(--fg-2); cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease-out;
}
.dyk-tabs button.on { background: var(--fg-1); border-color: var(--fg-1); color: #fff; }
.dyk h3 { font-family: var(--font-serif); font-size: 21px; font-weight: 700; margin-top: 16px; line-height: 1.3; }
.dyk p { font-size: 13.5px; color: var(--fg-2); margin-top: 10px; max-width: 640px; line-height: 1.6; }
.dyk .tagchip { display: inline-block; margin-top: 14px; font-size: 10px; font-weight: 800; letter-spacing: .12em; background: var(--pink-100); color: var(--pink-600); padding: 5px 11px; border-radius: 5px; }
.mod-rows { margin-top: 14px; }
.mod-row { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 15px 20px; border-top: 1px solid var(--border-1); }
.mod-row:first-child { border-top: none; }
.mod-row .m-h { font-size: 14px; font-weight: 700; color: var(--fg-1); }
.mod-row .m-p { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.mod-row .status { font-size: 9.5px; font-weight: 800; letter-spacing: .12em; color: var(--sev-positive); background: #E4F5EC; padding: 4px 9px; border-radius: 4px; }

/* ---------------- exploration ---------------- */
.exp-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.stat-chip { font-size: 12px; color: var(--fg-2); border: 1px solid var(--border-1); background: #fff; border-radius: 999px; padding: 7px 14px; }
.stat-chip b { color: var(--fg-1); font-weight: 800; }
.exp-grid { display: grid; grid-template-columns: 1fr 300px; gap: 14px; margin-top: 16px; align-items: stretch; }
.graph-card { padding: 10px; position: relative; }
.graph-card svg { width: 100%; height: auto; display: block; }
.gnode { cursor: pointer; }
.gnode circle.halo { fill: transparent; transition: fill .2s ease; }
.gnode:hover circle.halo, .gnode.on circle.halo { fill: rgba(106,187,229,.14); }
.gnode.on circle.core { stroke: var(--fg-1); stroke-width: 2.5; }
.gnode text { font-family: var(--font-sans); font-size: 11px; font-weight: 700; fill: var(--fg-1); text-anchor: middle; pointer-events: none; }
.gedge { stroke: var(--border-2); stroke-width: 1.2; }
.gedge-label { font-family: var(--font-sans); font-size: 8.5px; font-weight: 700; letter-spacing: .06em; fill: var(--text-muted); text-anchor: middle; }
.entity-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.entity-card .e-dot { width: 12px; height: 12px; border-radius: 4px; }
.entity-card h3 { font-family: var(--font-serif); font-size: 21px; font-weight: 700; }
.entity-card .e-desc { font-size: 12.5px; color: var(--fg-3); line-height: 1.55; }
.entity-card .fields { display: flex; flex-wrap: wrap; gap: 6px; }
.entity-card .fld { font-size: 10.5px; font-family: ui-monospace, "SF Mono", Menlo, monospace; background: var(--surface-subtle); border: 1px solid var(--border-1); color: var(--fg-2); padding: 3px 8px; border-radius: 5px; }
.entity-card .conn { font-size: 12px; color: var(--fg-2); display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--border-1); }
.entity-card .conn .rel { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; color: var(--blue-800); background: var(--blue-100); padding: 2px 7px; border-radius: 4px; }

/* ---------------- tour ---------------- */
/* enter slow (drawer-class), exit fast — transitions so both directions retarget cleanly */
.tour-bar {
  position: fixed; left: 50%; bottom: 20px;
  width: min(620px, calc(100vw - 32px)); z-index: 90;
  background: var(--suite-sidebar); color: #fff; border-radius: 14px;
  box-shadow: 0 18px 50px rgba(10,10,10,.35);
  padding: 16px 18px;
  visibility: hidden; opacity: 0; transform: translate(-50%, 8px);
  transition: opacity .15s ease-out, transform .15s ease-out, visibility 0s linear .15s;
}
.tour-bar.on {
  visibility: visible; opacity: 1; transform: translate(-50%, 0);
  transition: opacity .45s cubic-bezier(.16,1,.3,1), transform .45s cubic-bezier(.16,1,.3,1);
}
.tour-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-label { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; color: var(--brand-blue); }
.tour-step { font-size: 10.5px; color: rgba(255,255,255,.5); letter-spacing: .1em; }
.tour-text { font-size: 13px; color: rgba(255,255,255,.85); line-height: 1.55; margin-top: 8px; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; }
.tour-dots { display: flex; gap: 6px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.25); transition: background .2s ease, width .2s ease; }
.tour-dots i.on { background: var(--brand-pink); width: 18px; border-radius: 3px; }
.tour-btns { display: flex; gap: 8px; }
.tour-btn { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; padding: 7px 14px; border-radius: 7px; cursor: pointer; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; }
.tour-btn:hover { background: rgba(255,255,255,.08); }
.tour-btn.primary { background: var(--brand-pink); border-color: var(--brand-pink); }
.tour-btn.primary:hover { background: var(--pink-600); }
.tour-hint {
  position: fixed; right: 20px; bottom: 20px; z-index: 89;
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--border-1); border-radius: 999px;
  box-shadow: var(--shadow-pop); padding: 8px 8px 8px 18px; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--fg-1);
  visibility: hidden; opacity: 0; transform: translateY(8px);
  transition: opacity .15s ease-out, transform .15s ease-out, visibility 0s linear .15s;
}
.tour-hint.on {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity .45s cubic-bezier(.16,1,.3,1), transform .45s cubic-bezier(.16,1,.3,1);
}
.tour-hint .go { background: var(--fg-1); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 7px 14px; }

/* view transitions — seen on every navigation, so fast + strong ease-out */
.view { animation: viewIn .2s cubic-bezier(.23, 1, .32, 1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* embed mode (landing preview iframe) */
body.embed .tour-hint, body.embed .tour-bar { display: none !important; }

/* responsive (demo is desktop-first; make it usable, not perfect, on small) */
/* reduced motion: keep opacity/state changes, drop movement */
@media (prefers-reduced-motion: reduce) {
  .view { animation: none; }
  .empty-state .orb { animation: none; }
  .thinking i { animation: none; opacity: .6; }
  .tour-bar, .tour-hint { transition-duration: .01ms; transform: translate(-50%, 0); }
  .tour-hint { transform: none; }
  .ai-body > * { transition: none !important; transform: none !important; opacity: 1 !important; }
}

@media (max-width: 900px) {
  .app { grid-template-columns: 64px 1fr; }
  .workspace { display: none; }
  .sidebar { padding: 14px 8px; }
  .sidebar .brand .logo-full, .sidebar .brand .sub, .snav a span, .sfoot a span, .user div, .sidebar .brand .bell { display: none; }
  .sidebar .brand .logo-min { display: block; }
  .snav a, .sfoot a { justify-content: center; padding: 10px 6px; }
  .kpis, .metrics { grid-template-columns: repeat(2, 1fr); }
  .cc-grid, .ana-grid, .charts-grid, .exp-grid { grid-template-columns: 1fr; }
  .ask-wrap { grid-template-columns: 1fr; }
  .convo-list { display: none; }
  .sig-card { grid-template-columns: 1fr; gap: 12px; }
  .sig-side { flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
  .content { padding: 20px 16px 96px; }
  .pg-title { font-size: 30px; }
  .det-title { font-size: 26px; }
}
