:root {
  --bg: #fff7dd;
  --ink: #15131d;
  --muted: #67606f;
  --line: #17131d;
  --paper: #fffdf5;
  --blue: #2563ff;
  --cyan: #16d9ff;
  --pink: #ff4db8;
  --lime: #b6ff37;
  --yellow: #ffd338;
  --orange: #ff7a1a;
  --green: #18c77a;
  --red: #ff3b30;
  --shadow: 8px 8px 0 #15131d;
  --soft-shadow: 0 18px 60px rgba(21, 19, 29, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial,
    sans-serif;
  background:
    linear-gradient(90deg, rgba(21, 19, 29, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(21, 19, 29, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 8% 10%, rgba(255, 77, 184, 0.32), transparent 24%),
    radial-gradient(circle at 86% 14%, rgba(22, 217, 255, 0.38), transparent 26%),
    radial-gradient(circle at 60% 90%, rgba(182, 255, 55, 0.34), transparent 28%),
    var(--bg);
  background-size: 28px 28px, 28px 28px, auto, auto, auto, auto;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 180px;
  height: 180px;
  border: 3px solid var(--line);
  pointer-events: none;
}

body::before {
  top: 36px;
  right: 42px;
  border-radius: 42% 58% 48% 52%;
  background: var(--lime);
  transform: rotate(12deg);
}

body::after {
  left: 72px;
  bottom: 54px;
  border-radius: 28px;
  background: var(--pink);
  transform: rotate(-10deg);
}

button,
input,
select {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-right: 3px solid var(--line);
  background: rgba(255, 253, 245, 0.86);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 1000;
  border: 3px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 46%),
    var(--yellow);
  box-shadow: var(--shadow);
  transform: rotate(-4deg);
}

.brand h1,
.topbar h2,
.hero-card h3,
.result-card h3,
.audit-card h3,
.report h3,
.section-banner h3 {
  margin: 0;
}

.brand h1 {
  font-size: 28px;
  letter-spacing: 0.03em;
}

.eyebrow,
.tag {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.panel,
.card,
.module-card,
.table-card,
.control-card,
.result-card,
.trace-card,
.audit-card,
.report,
.section-banner {
  border: 3px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 245, 0.94);
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.intro h2 {
  margin: 0 0 10px;
  font-size: 23px;
  line-height: 1.18;
}

.intro p,
.card p,
.module-card p,
.trace-card p,
.audit-card p,
.report p,
.clean-list {
  color: var(--muted);
  line-height: 1.72;
}

.mascot-panel {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 14px;
  background:
    radial-gradient(circle at 18% 22%, rgba(22, 217, 255, 0.24), transparent 34%),
    var(--paper);
}

.mascot-panel h3,
.mascot-panel p {
  margin: 0;
}

.pigeon {
  position: relative;
  width: 82px;
  height: 76px;
  border: 3px solid var(--line);
  border-radius: 48% 52% 44% 56%;
  background: var(--cyan);
  box-shadow: 5px 5px 0 var(--line);
  transform: rotate(-7deg);
}

.pigeon::before {
  content: "";
  position: absolute;
  left: 10px;
  top: -22px;
  width: 44px;
  height: 36px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: #fff;
}

.pigeon-eye {
  position: absolute;
  z-index: 2;
  top: -9px;
  left: 40px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
  box-shadow: 11px 2px 0 var(--line);
}

.pigeon-wing {
  position: absolute;
  left: 11px;
  top: 25px;
  width: 42px;
  height: 28px;
  border: 3px solid var(--line);
  border-radius: 58% 42% 52% 48%;
  background: var(--blue);
}

.pigeon-beak {
  position: absolute;
  z-index: 3;
  right: -14px;
  top: 6px;
  width: 22px;
  height: 17px;
  border: 3px solid var(--line);
  border-left: 0;
  border-radius: 0 14px 14px 0;
  background: var(--orange);
}

.nav {
  display: grid;
  gap: 10px;
}

.nav-btn {
  width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  text-align: left;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--line);
  cursor: pointer;
  transition: 0.16s ease;
}

.nav-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--line);
  background: #fff;
}

.nav-btn.active {
  color: var(--ink);
  background: var(--lime);
}

.metrics {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

.metrics div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 2px dashed rgba(21, 19, 29, 0.26);
}

.metrics div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.metrics strong {
  color: var(--pink);
  font-size: 24px;
  font-weight: 1000;
}

.metrics span {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.workspace {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 211, 56, 0.34), transparent),
    rgba(255, 253, 245, 0.9);
  box-shadow: var(--shadow);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.studio-pill,
.pill,
.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 1000;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--yellow);
}

.primary-btn,
.secondary-btn {
  border: 3px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 1000;
  cursor: pointer;
  transition: 0.16s ease;
  box-shadow: 5px 5px 0 var(--line);
}

.primary-btn {
  padding: 12px 18px;
  background: var(--pink);
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--line);
}

.primary-btn:active,
.secondary-btn:active,
.nav-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--line);
}

.secondary-btn {
  padding: 12px 16px;
  background: var(--cyan);
}

.full {
  width: 100%;
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 20px;
}

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 22px;
  padding: 28px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(37, 99, 255, 0.94), rgba(255, 77, 184, 0.88)),
    var(--blue);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  right: 250px;
  top: -38px;
  width: 120px;
  height: 120px;
  border: 3px solid rgba(21, 19, 29, 0.9);
  border-radius: 28px;
  background: var(--lime);
  transform: rotate(18deg);
}

.hero-card h3 {
  position: relative;
  max-width: 820px;
  color: white;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-card p {
  position: relative;
  max-width: 820px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
}

.hero-card .tag {
  color: var(--lime);
}

.hero-tags {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.phone-mock {
  position: relative;
  z-index: 1;
  padding: 16px;
  border: 3px solid var(--line);
  border-radius: 30px;
  background: #fffdf7;
  box-shadow: 8px 8px 0 var(--line);
}

.phone-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

.phone-head span {
  width: 12px;
  height: 12px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--green);
}

.phone-card {
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.phone-card + .phone-card {
  margin-top: 12px;
}

.phone-card.hot {
  background: var(--yellow);
}

.phone-card small,
.phone-card strong,
.phone-card p {
  display: block;
  margin: 0;
  color: var(--ink);
}

.phone-card strong {
  margin: 4px 0;
  font-size: 19px;
}

.process-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.process-strip div {
  padding: 16px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 5px 5px 0 var(--line);
}

.process-strip b,
.process-strip span {
  display: block;
}

.process-strip b {
  margin-bottom: 6px;
}

.process-strip span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  padding: 20px;
}

.card:nth-child(2n),
.module-card:nth-child(2n),
.trace-card:nth-child(2n) {
  background: #f2fbff;
}

.card h4,
.module-card h4,
.trace-card h4 {
  margin: 0 0 10px;
  font-size: 18px;
}

.clean-list {
  padding-left: 18px;
  margin: 0;
}

.clean-list li + li {
  margin-top: 8px;
}

.mini {
  background: #f4ffe5;
}

.mini.warning {
  background: #fff2c2;
}

.mini.danger {
  background: #ffe5f2;
}

.section-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  background: var(--lime);
}

.section-banner span {
  padding: 8px 12px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 1000;
}

.match-banner {
  background: var(--cyan);
}

.risk-banner {
  background: var(--yellow);
}

.trace-banner {
  background: var(--pink);
}

.trace-banner .tag,
.trace-banner h3,
.trace-banner span {
  color: var(--ink);
}

.warroom-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 18%, rgba(182, 255, 55, 0.35), transparent 28%),
    linear-gradient(135deg, #15131d, #2637ff 52%, #ff4db8);
  box-shadow: var(--shadow);
}

.warroom-hero h3 {
  margin: 0;
  color: white;
  font-size: clamp(30px, 4.2vw, 58px);
  line-height: 1.02;
}

.warroom-hero p {
  max-width: 850px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.75;
}

.warroom-hero .tag {
  color: var(--lime);
}

.warroom-score {
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  justify-self: end;
  color: var(--ink);
  border: 3px solid var(--line);
  border-radius: 36px;
  background: var(--yellow);
  box-shadow: 7px 7px 0 var(--line);
  transform: rotate(4deg);
}

.warroom-score span {
  font-size: 54px;
  font-weight: 1000;
  line-height: 1;
}

.warroom-score small {
  max-width: 96px;
  color: var(--ink);
  font-weight: 1000;
  text-align: center;
}

.avatar-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 82% 20%, rgba(22, 217, 255, 0.3), transparent 30%),
    linear-gradient(135deg, #15131d, #2563ff 48%, #16d9ff);
  box-shadow: var(--shadow);
}

.avatar-hero h3 {
  margin: 0;
  color: white;
  font-size: clamp(32px, 4.4vw, 62px);
  line-height: 1;
}

.avatar-hero p {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.75;
}

.avatar-hero .tag {
  color: var(--lime);
}

.avatar-provider {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--lime);
  box-shadow: 6px 6px 0 var(--line);
}

.avatar-provider b {
  font-size: 13px;
  text-transform: uppercase;
}

.avatar-provider span {
  font-size: 22px;
  font-weight: 1000;
}

.avatar-provider small {
  color: var(--muted);
  font-weight: 900;
}

.avatar-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(0, 1fr);
  gap: 18px;
}

.avatar-stage,
.avatar-control,
.adapter-card {
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.avatar-stage,
.avatar-control {
  padding: 20px;
}

.avatar-screen {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 77, 184, 0.32), transparent),
    radial-gradient(circle at 50% 38%, rgba(182, 255, 55, 0.36), transparent 30%),
    #15131d;
  overflow: hidden;
}

.avatar-screen::before {
  content: "REAL SDK NOT CONNECTED";
  position: absolute;
  z-index: 4;
  left: 16px;
  top: 16px;
  padding: 7px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.08em;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(8, 13, 28, 0.82);
  box-shadow: 0 0 24px rgba(8, 13, 28, 0.42);
}

.avatar-screen.has-sdk::before,
.avatar-screen.has-live::before {
  content: "LIVE DIGITAL HUMAN";
  background: rgba(255, 59, 48, 0.82);
  box-shadow: 0 0 24px rgba(255, 59, 48, 0.42);
}

.avatar-screen.has-sdk::after,
.avatar-screen.has-live::after {
  content: "AI灵工顾问：正在根据用工工单、灵工档案、作业轨迹、结算流水生成讲解";
  position: absolute;
  z-index: 4;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 12px 14px;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  background: rgba(8, 13, 28, 0.72);
  backdrop-filter: blur(10px);
}

.avatar-screen video {
  position: relative;
  z-index: 3;
  display: none;
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  background: #000;
}

.avatar-screen.has-live video {
  display: block;
}

.avatar-screen.has-sdk .avatar-placeholder {
  display: none;
}

.xfyun-vms-stream {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  width: 100%;
  height: 100%;
  min-height: 420px;
  overflow: hidden;
  background: #000;
}

.avatar-screen.sdk-preparing .xfyun-vms-stream {
  display: block;
  opacity: 0;
  pointer-events: none;
}

.avatar-screen.has-sdk .xfyun-vms-stream {
  display: block;
  opacity: 1;
}

.xfyun-vms-stream video,
.xfyun-vms-stream canvas {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

.avatar-screen.has-sdk.is-speaking::after,
.avatar-screen.has-live.is-speaking::after {
  content: "AI灵工顾问：建议先做 5 家门店试点，再分层邀约，并把合规风控前置到发薪前";
}

.avatar-placeholder {
  position: absolute;
  inset: 72px 28px 28px;
  z-index: 3;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 14px;
  max-width: none;
  padding: 28px;
  color: white;
  text-align: left;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(37, 99, 255, 0.22), transparent),
    rgba(8, 13, 28, 0.76);
  opacity: 1;
  pointer-events: auto;
}

.avatar-placeholder h3,
.avatar-placeholder p {
  margin: 0;
}

.avatar-placeholder p {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

.avatar-face {
  position: relative;
  width: 130px;
  height: 154px;
  border: 3px solid var(--line);
  border-radius: 48px 48px 34px 34px;
  background: var(--yellow);
  box-shadow: 8px 8px 0 var(--line);
}

.avatar-face::before {
  content: "";
  position: absolute;
  left: 22px;
  top: -28px;
  width: 82px;
  height: 42px;
  border: 3px solid var(--line);
  border-radius: 42px 42px 10px 10px;
  background: var(--cyan);
}

.avatar-face span {
  position: absolute;
  top: 58px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--line);
}

.avatar-face span:first-child {
  left: 34px;
}

.avatar-face span:nth-child(2) {
  right: 34px;
}

.avatar-face i {
  position: absolute;
  left: 45px;
  bottom: 34px;
  width: 40px;
  height: 14px;
  border: 3px solid var(--line);
  border-radius: 0 0 20px 20px;
  background: var(--pink);
}

@keyframes avatar-idle {
  0%,
  100% {
    transform: scale(1.01) translateY(0);
    filter: saturate(1.02) brightness(1);
  }
  50% {
    transform: scale(1.035) translateY(-4px);
    filter: saturate(1.12) brightness(1.05);
  }
}

@keyframes avatar-speaking {
  0%,
  100% {
    filter: saturate(1.08) brightness(1);
  }
  50% {
    filter: saturate(1.2) brightness(1.08);
  }
}

@keyframes voice-wave {
  from {
    opacity: 0.58;
    transform: translateX(-50%) scaleX(0.72);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scaleX(1.18);
  }
}

.avatar-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.conversation-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.conversation-panel > div {
  min-height: 118px;
  padding: 14px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 4px 4px 0 var(--line);
}

.conversation-panel p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

#avatar-status-dot {
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--yellow);
}

#avatar-status-dot[data-mode="live"] {
  background: var(--green);
}

#avatar-status-dot[data-mode="error"] {
  background: var(--red);
}

.avatar-control {
  display: grid;
  gap: 14px;
}

textarea {
  width: 100%;
  resize: vertical;
  padding: 12px;
  color: var(--ink);
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  line-height: 1.65;
}

textarea:focus {
  outline: 3px solid var(--cyan);
}

.avatar-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.realtime-actions {
  margin-top: -2px;
}

.avatar-chatbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 12px;
}

.avatar-chatbar input {
  min-width: 0;
  padding: 12px;
  color: var(--ink);
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  font-weight: 900;
}

.avatar-chatbar input:focus {
  outline: 3px solid var(--cyan);
}

.pipeline-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.pipeline-step {
  min-height: 74px;
  padding: 10px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--line);
}

.pipeline-step b,
.pipeline-step span {
  display: block;
}

.pipeline-step b {
  margin-bottom: 5px;
  font-size: 13px;
}

.pipeline-step span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.pipeline-step[data-status="active"] {
  background: var(--yellow);
  animation: pulse-step 0.9s ease-in-out infinite;
}

.pipeline-step[data-status="done"] {
  background: var(--lime);
}

@keyframes pulse-step {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.adapter-card {
  padding: 16px;
  background: #e7fbff;
}

.adapter-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.integration-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.integration-strip div {
  padding: 16px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 5px 5px 0 var(--line);
}

.integration-strip b,
.integration-strip span {
  display: block;
}

.integration-strip span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.warroom-grid,
.action-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 18px;
}

.signal-panel,
.radar-panel,
.action-card,
.evidence-card,
.agent-card {
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.signal-panel,
.radar-panel,
.action-card,
.evidence-card {
  padding: 20px;
}

.brief-text {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.72;
}

.warroom-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff7dd;
}

.warroom-form label {
  font-size: 12px;
}

.warroom-form select,
.warroom-form input[type="number"] {
  padding: 9px 10px;
  border-width: 2px;
  background: white;
}

.warroom-form .checkbox {
  align-self: end;
  min-height: 42px;
  padding: 8px 10px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: white;
}

.signal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.signal-tags span {
  padding: 8px 10px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--lime);
  font-size: 13px;
  font-weight: 1000;
}

.warroom-progress {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: white;
}

.warroom-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.warroom-progress b {
  color: var(--ink);
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #eee9da;
}

.progress-track i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--pink));
  transition: width 320ms ease;
}

#run-warroom:disabled {
  cursor: wait;
  filter: grayscale(0.25);
  opacity: 0.78;
}

.radar-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.radar-map div {
  display: grid;
  place-items: center;
  min-height: 128px;
  padding: 12px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at center, var(--paper) 0 42%, transparent 43%),
    conic-gradient(var(--pink) calc(var(--value) * 1%), #ffffff 0);
  box-shadow: 4px 4px 0 var(--line);
  text-align: center;
}

.radar-map b,
.radar-map span {
  display: block;
}

.radar-map em {
  color: var(--blue);
  font-size: 18px;
  font-style: normal;
}

.radar-map b {
  font-size: 20px;
  font-weight: 1000;
}

.radar-map span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.agent-council {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.agent-card {
  padding: 18px;
  background: #fff;
  transition: 0.16s ease;
}

.agent-card:nth-child(2) {
  background: #e7fbff;
}

.agent-card:nth-child(3) {
  background: #fff2c2;
}

.agent-card:nth-child(4) {
  background: #ffe5f2;
}

.agent-card:hover,
.agent-card.active {
  transform: translate(-3px, -3px);
  box-shadow: 11px 11px 0 var(--line);
}

.agent-card.done {
  background: var(--lime);
}

.agent-card.blocked {
  color: white;
  background: var(--red);
}

.agent-card.blocked p,
.agent-card.blocked b {
  color: white;
}

.agent-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.agent-card .agent-status {
  padding: 6px 8px;
  color: var(--muted);
  border: 2px solid var(--line);
  border-radius: 999px;
  background: white;
  font-size: 11px;
  font-style: normal;
  font-weight: 1000;
}

.agent-verdict {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0;
}

.agent-verdict strong {
  font-size: 32px;
  line-height: 1;
}

.agent-verdict em {
  color: var(--blue);
  font-style: normal;
  font-weight: 1000;
}

.agent-card span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  color: var(--ink);
  font-weight: 1000;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--yellow);
}

.agent-card h4 {
  margin: 0 0 8px;
}

.agent-card p {
  min-height: 104px;
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.agent-card b {
  display: block;
  padding-top: 10px;
  border-top: 2px dashed rgba(21, 19, 29, 0.28);
  font-size: 13px;
  line-height: 1.55;
}

.council-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(110deg, #fff, #e7fbff);
  box-shadow: var(--shadow);
}

.council-summary h3,
.council-summary p {
  margin: 0;
}

.council-summary > div:first-child > p:last-child {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.vote-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(76px, 1fr));
  gap: 8px;
}

.vote-board span {
  display: grid;
  place-items: center;
  min-width: 76px;
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--yellow);
  font-size: 12px;
  font-weight: 1000;
}

.vote-board b {
  font-size: 24px;
}

.action-card ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.75;
}

.evidence-flow {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.evidence-flow span {
  position: relative;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 1000;
}

.evidence-flow span:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 28px;
  bottom: -13px;
  width: 3px;
  height: 13px;
  background: var(--line);
}

.module-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 14px;
}

.module-card {
  padding: 18px;
  transition: 0.16s ease;
}

.module-card:hover,
.card:hover,
.trace-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 10px 10px 0 var(--line);
}

.module-card span,
.trace-card span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  color: var(--ink);
  font-weight: 1000;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--yellow);
}

.table-card {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 2px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--ink);
  background: var(--lime);
  font-size: 13px;
}

td {
  color: #413b4c;
  line-height: 1.55;
  background: rgba(255, 255, 255, 0.55);
}

.demo-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
}

.control-card,
.result-card {
  padding: 20px;
}

.control-card {
  display: grid;
  gap: 14px;
  align-content: start;
  background: #fff;
}

.control-card h3 {
  margin: 0 0 4px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 1000;
}

select,
input[type="number"] {
  width: 100%;
  padding: 11px 12px;
  color: var(--ink);
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

select:focus,
input[type="number"]:focus {
  outline: 3px solid var(--cyan);
}

input[type="range"] {
  accent-color: var(--pink);
}

.checkbox {
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.checkbox input {
  width: 20px;
  height: 20px;
  accent-color: var(--pink);
}

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.pill {
  background: var(--lime);
}

.candidate-list,
.decision-list {
  display: grid;
  gap: 12px;
}

.candidate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 16px;
  padding: 16px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--line);
}

.candidate h4 {
  margin: 0 0 8px;
}

.candidate p,
.decision-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.match-score {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  justify-self: end;
  color: var(--ink);
  font-size: 22px;
  font-weight: 1000;
  border: 3px solid var(--line);
  border-radius: 24px;
  background: var(--lime);
  box-shadow: 4px 4px 0 var(--line);
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.risk-box {
  padding: 16px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--yellow);
}

.risk-box:nth-child(2) {
  background: #ffe5f2;
}

.risk-box:nth-child(3) {
  background: #e7fbff;
}

.risk-box span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.risk-box strong {
  font-size: 28px;
  font-weight: 1000;
}

.decision-item {
  padding: 15px 16px;
  border: 3px solid var(--line);
  border-left-width: 10px;
  border-radius: 8px;
  background: #f8fbff;
  box-shadow: 4px 4px 0 var(--line);
}

.decision-item.high {
  border-left-color: var(--red);
  background: #ffe5e5;
}

.decision-item.mid {
  border-left-color: var(--orange);
  background: #fff2c2;
}

.decision-item.low {
  border-left-color: var(--green);
  background: #edffe0;
}

.decision-item h4 {
  margin: 0 0 6px;
}

.trace-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.trace-toolbar {
  display: grid;
  grid-template-columns: 0.8fr 0.8fr minmax(240px, 1.4fr) auto;
  align-items: end;
  gap: 12px;
  padding: 18px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.trace-toolbar input[type="search"] {
  width: 100%;
  padding: 11px 12px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: white;
}

.trace-toolbar input[type="search"]:focus {
  outline: 3px solid var(--cyan);
}

.trace-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.trace-kpis article {
  display: grid;
  gap: 5px;
  padding: 18px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 5px 5px 0 var(--line);
}

.trace-kpis article:nth-child(2) {
  background: #fff2c2;
}

.trace-kpis article:nth-child(3) {
  background: #ffe5f2;
}

.trace-kpis article:nth-child(4) {
  background: #edffe0;
}

.trace-kpis span,
.trace-kpis small {
  color: var(--muted);
  font-weight: 800;
}

.trace-kpis strong {
  font-size: 34px;
  line-height: 1;
}

.trace-card {
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.trace-card > strong {
  display: block;
  margin-top: 8px;
  font-size: 15px;
}

.trace-card > small {
  display: block;
  padding-top: 10px;
  color: var(--muted);
  border-top: 2px dashed rgba(21, 19, 29, 0.2);
  overflow-wrap: anywhere;
}

.trace-card.done span {
  background: var(--green);
}

.trace-card.warning {
  background: #fff2c2;
}

.trace-card.warning span {
  background: var(--orange);
}

.trace-card.danger {
  color: white;
  background: var(--red);
}

.trace-card.danger p,
.trace-card.danger small {
  color: white;
}

.trace-card.danger span {
  background: white;
}

.trace-card.pending {
  background: #e7fbff;
}

.trace-card.pending span {
  background: var(--cyan);
}

.trace-card.active {
  background: var(--yellow);
}

.trace-card.active span {
  background: #fff;
}

.trace-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  gap: 18px;
}

.trace-list-panel,
.trace-detail-panel {
  min-width: 0;
  padding: 20px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.trace-list-panel h3,
.trace-detail-panel h3 {
  margin: 0;
}

.trace-list-head,
.trace-case-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) 0.72fr 0.58fr 0.72fr;
  align-items: center;
  gap: 10px;
}

.trace-list-head {
  margin-top: 16px;
  padding: 0 12px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
}

.trace-case-list {
  display: grid;
  gap: 8px;
}

.trace-case-row {
  width: 100%;
  padding: 12px;
  color: var(--ink);
  text-align: left;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: 0.16s ease;
}

.trace-case-row:hover,
.trace-case-row.selected {
  transform: translate(-2px, -2px);
  background: #edffe0;
  box-shadow: 5px 5px 0 var(--line);
}

.trace-case-row > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.trace-case-row small {
  color: var(--muted);
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trace-completeness i {
  position: relative;
  display: block;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eee9da;
}

.trace-completeness i::after {
  content: "";
  display: block;
  width: var(--progress);
  height: 100%;
  background: var(--blue);
}

.trace-risk-badge,
.trace-risk-pill {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 7px 9px;
  border: 2px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 1000;
}

.trace-risk-badge.low,
.trace-risk-pill.low {
  background: var(--lime);
}

.trace-risk-badge.mid,
.trace-risk-pill.mid {
  background: var(--yellow);
}

.trace-risk-badge.high,
.trace-risk-pill.high {
  color: white;
  background: var(--red);
}

.trace-empty {
  display: none;
  padding: 34px 12px;
  color: var(--muted);
  text-align: center;
}

.trace-empty.show {
  display: block;
}

.trace-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.trace-meta span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff7dd;
  font-size: 12px;
}

.trace-timeline {
  display: grid;
  gap: 0;
}

.trace-event {
  position: relative;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 0 12px 18px;
  border-left: 3px solid var(--line);
}

.trace-event::before {
  content: "";
  position: absolute;
  top: 18px;
  left: -8px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--green);
}

.trace-event.warning::before,
.trace-event.pending::before {
  background: var(--yellow);
}

.trace-event.fail::before {
  background: var(--red);
}

.trace-event time,
.trace-event > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.trace-event p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.trace-rules {
  margin-top: 14px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #f2fbff;
}

.trace-rules h4,
.trace-rules ul {
  margin: 0;
}

.trace-rules ul {
  margin-top: 8px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.audit-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px;
  background:
    linear-gradient(90deg, rgba(22, 217, 255, 0.28), transparent),
    var(--paper);
}

.audit-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.toast {
  display: none;
  padding: 14px 16px;
  color: var(--ink);
  font-weight: 1000;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--lime);
  box-shadow: 5px 5px 0 var(--line);
}

.toast.show {
  display: block;
}

.modal-open {
  overflow: hidden;
}

.report-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.report-modal.show {
  opacity: 1;
  visibility: visible;
}

.report-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(21, 19, 29, 0.72);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.report-dialog {
  position: relative;
  width: min(860px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px;
  border: 3px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 12px 12px 0 var(--pink);
  transform: translateY(18px) scale(0.98);
  transition: transform 180ms ease;
}

.report-modal.show .report-dialog {
  transform: translateY(0) scale(1);
}

.report-head,
.report-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.report-head h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}

.report-time {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.icon-btn {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: var(--yellow);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.report {
  margin: 20px 0;
  padding: 20px;
  background: #fff;
  box-shadow: none;
}

.report-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--line);
}

.report-summary strong {
  line-height: 1.55;
}

.report-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.report-kpis div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 2px solid var(--line);
  background: #fff7dd;
}

.report-kpis span,
.report-kpis small {
  color: var(--muted);
}

.report-kpis strong {
  font-size: 24px;
}

.report-list {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.75;
}

.report-list li + li {
  margin-top: 8px;
}

.report-actions {
  justify-content: flex-end;
}

#report-feedback {
  margin-right: auto;
  color: var(--green);
  font-weight: 900;
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    border-right: 0;
    border-bottom: 3px solid var(--line);
  }

  .nav {
    grid-template-columns: repeat(7, minmax(126px, 1fr));
    overflow-x: auto;
  }

  .module-row,
  .trace-grid,
  .trace-kpis,
  .grid.three,
  .agent-council,
  .integration-strip,
  .process-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trace-dashboard {
    grid-template-columns: 1fr;
  }

  .trace-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .workspace,
  .sidebar {
    padding: 16px;
  }

  .topbar,
  .audit-card,
  .section-banner,
  .council-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .grid.two,
  .grid.three,
  .warroom-form,
  .trace-toolbar,
  .trace-kpis,
  .demo-layout,
  .warroom-hero,
  .warroom-grid,
  .avatar-hero,
  .avatar-layout,
  .integration-strip,
  .avatar-actions,
  .pipeline-board,
  .conversation-panel,
  .agent-council,
  .action-board,
  .risk-grid,
  .trace-grid,
  .module-row,
  .process-strip,
  .hero-card {
    grid-template-columns: 1fr;
  }

  .audit-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .trace-list-head {
    display: none;
  }

  .trace-case-list {
    margin-top: 14px;
  }

  .trace-case-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .trace-case-row > span:nth-child(2) {
    display: none;
  }

  .trace-meta {
    grid-template-columns: 1fr;
  }

  .trace-event {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .trace-event > span {
    grid-column: 2;
  }

  .phone-mock {
    max-width: 340px;
  }

  .report-modal {
    padding: 12px;
  }

  .report-dialog {
    max-height: calc(100vh - 24px);
    padding: 16px;
  }

  .report-kpis {
    grid-template-columns: 1fr;
  }

  .report-actions {
    align-items: stretch;
    flex-direction: column;
  }

  #report-feedback {
    margin-right: 0;
  }
}
