:root {
  --bg: #04080f;
  --panel: rgba(6, 12, 24, .88);
  --panel2: rgba(8, 18, 34, .72);
  --line: rgba(80, 140, 255, .16);
  --line2: rgba(80, 140, 255, .32);
  --blue: #3b9eff;
  --green: #00e5a0;
  --orange: #ff7043;
  --purple: #c084fc;
  --yellow: #ffd166;
  --red: #ff4d6d;
  --text: #d4e4ff;
  --muted: #6f89a8;
  --soft: rgba(212, 228, 255, .08);
  --shadow: 0 22px 70px rgba(0, 0, 0, .36);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
}

body {
  background-image:
    radial-gradient(circle at 18% 12%, rgba(59, 158, 255, .08), transparent 34%),
    radial-gradient(circle at 86% 70%, rgba(0, 229, 160, .06), transparent 36%),
    linear-gradient(rgba(59, 158, 255, .024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 158, 255, .024) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  padding: 72px 22px 22px 238px;
}

.topbar {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid rgba(59, 158, 255, .10);
  background: linear-gradient(to bottom, rgba(4, 8, 15, .98), rgba(4, 8, 15, .82));
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(59, 158, 255, .35);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: rgba(59, 158, 255, .08);
  font-weight: 900;
  letter-spacing: 0;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  background: linear-gradient(120deg, #7ec8ff, var(--blue), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
}

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

.status-pill {
  border: 1px solid rgba(0, 229, 160, .28);
  background: rgba(0, 229, 160, .08);
  color: var(--green);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  white-space: nowrap;
}

.ghost-btn,
.primary-btn,
.icon-btn {
  border: 1px solid var(--line2);
  color: var(--text);
  background: rgba(6, 12, 24, .76);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .16s, background .16s, transform .16s;
}

.ghost-btn,
.primary-btn {
  padding: 9px 13px;
  font-size: 13px;
}

.primary-btn {
  border-color: rgba(0, 229, 160, .45);
  background: linear-gradient(135deg, rgba(59, 158, 255, .22), rgba(0, 229, 160, .16));
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}

.ghost-btn:hover,
.primary-btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(126, 200, 255, .60);
  background: rgba(16, 32, 58, .86);
}

.sidebar {
  position: fixed;
  z-index: 25;
  top: 58px;
  left: 0;
  bottom: 0;
  width: 216px;
  padding: 16px 12px;
  border-right: 1px solid rgba(59, 158, 255, .10);
  background: rgba(4, 8, 15, .82);
  backdrop-filter: blur(18px);
  overflow-y: auto;
}

.nav-section {
  margin: 12px 8px 7px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #97b4d4;
  font-size: 13px;
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(59, 158, 255, .07);
}

.nav-link.active {
  color: var(--text);
  border-color: rgba(59, 158, 255, .30);
  background: linear-gradient(135deg, rgba(59, 158, 255, .16), rgba(0, 229, 160, .07));
}

.nav-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 14px rgba(59, 158, 255, .72);
  flex: 0 0 auto;
}

.nav-link:nth-of-type(3n) .nav-dot {
  background: var(--green);
  box-shadow: 0 0 14px rgba(0, 229, 160, .72);
}

.nav-link:nth-of-type(4n) .nav-dot {
  background: var(--purple);
  box-shadow: 0 0 14px rgba(192, 132, 252, .72);
}

.ai-output {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(59, 158, 255, .18);
  border-radius: 8px;
  background: rgba(6, 14, 28, .56);
}

.ai-output-title {
  margin-bottom: 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .8px;
}

.markdown-body {
  color: var(--text);
  font-size: 13px;
  line-height: 1.8;
}

.markdown-body p {
  margin: 0 0 9px;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  margin: 12px 0 7px;
  color: #7ec8ff;
  font-weight: 700;
  letter-spacing: 0;
}

.markdown-body h1 { font-size: 18px; }
.markdown-body h2 { font-size: 16px; }
.markdown-body h3 { font-size: 14px; }

.markdown-body ul,
.markdown-body ol {
  margin: 7px 0 11px;
  padding-left: 22px;
}

.markdown-body li {
  margin-bottom: 5px;
}

.markdown-body strong {
  color: #9ed7ff;
  font-weight: 700;
}

.markdown-body code {
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(59, 158, 255, .13);
  color: var(--green);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.markdown-body pre {
  margin: 9px 0;
  padding: 10px 12px;
  overflow-x: auto;
  border: 1px solid rgba(59, 158, 255, .18);
  border-radius: 8px;
  background: rgba(0, 0, 0, .28);
}

.markdown-body pre code {
  padding: 0;
  background: transparent;
  color: #c9d9ed;
}

.markdown-body table {
  width: 100%;
  margin: 10px 0;
  border-collapse: collapse;
  font-size: 12px;
}

.markdown-body th,
.markdown-body td {
  padding: 7px 9px;
  border: 1px solid rgba(59, 158, 255, .16);
  vertical-align: top;
}

.markdown-body th {
  color: var(--blue);
  background: rgba(59, 158, 255, .08);
}

.evidence-summary {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  display: grid;
  gap: 6px;
}

.evidence-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.page-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.eyebrow {
  color: var(--green);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: 0;
}

.lead {
  margin: 9px 0 0;
  max-width: 840px;
  color: #8fa9c8;
  font-size: 14px;
  line-height: 1.8;
}

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

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

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

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

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.panel.pad {
  padding: 16px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.panel-title h2,
.panel-title h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0;
}

.panel-title span {
  color: var(--muted);
  font-size: 11px;
}

.metric {
  min-height: 112px;
  padding: 16px;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
}

.metric-value {
  margin-top: 12px;
  font-size: 27px;
  font-weight: 800;
  font-family: "JetBrains Mono", Consolas, monospace;
}

.metric-foot {
  margin-top: 8px;
  color: #8fa9c8;
  font-size: 12px;
}

.blue {
  color: var(--blue);
}

.green {
  color: var(--green);
}

.orange {
  color: var(--orange);
}

.purple {
  color: var(--purple);
}

.yellow {
  color: var(--yellow);
}

.red {
  color: var(--red);
}

.muted {
  color: var(--muted);
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: #91abc8;
  font-size: 12px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 8, 18, .82);
  color: var(--text);
  padding: 10px 11px;
  outline: none;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(0, 229, 160, .45);
}

.result-box {
  min-height: 190px;
  border: 1px solid rgba(0, 229, 160, .18);
  border-radius: 8px;
  background: rgba(0, 229, 160, .045);
  padding: 14px;
  color: #bdd3ec;
  line-height: 1.8;
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  border: 1px solid rgba(59, 158, 255, .24);
  color: #9fc7f2;
  background: rgba(59, 158, 255, .07);
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
}

.tag.hot {
  color: var(--green);
  border-color: rgba(0, 229, 160, .28);
  background: rgba(0, 229, 160, .07);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid rgba(80, 140, 255, .10);
  padding: 11px 9px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: #82a3c6;
  font-weight: 600;
  background: rgba(59, 158, 255, .04);
}

.data-table td {
  color: #c4d7ef;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(212, 228, 255, .08);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.timeline {
  display: grid;
  gap: 11px;
}

.timeline-item {
  position: relative;
  padding-left: 22px;
  color: #bdd3ec;
  font-size: 13px;
  line-height: 1.7;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px rgba(0, 229, 160, .72);
}

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

.flow-step {
  border: 1px solid rgba(59, 158, 255, .18);
  border-radius: 8px;
  background: rgba(59, 158, 255, .055);
  padding: 13px;
  min-height: 112px;
}

.flow-step b {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
}

.flow-step p {
  margin: 0;
  color: #91abc8;
  font-size: 12px;
  line-height: 1.7;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  gap: 14px;
}

.canvas-panel {
  min-height: 460px;
  position: relative;
  overflow: hidden;
}

.node-map {
  position: absolute;
  inset: 0;
}

.map-node {
  position: absolute;
  display: grid;
  place-items: center;
  width: 98px;
  height: 98px;
  border-radius: 50%;
  border: 1px solid rgba(59, 158, 255, .34);
  background: radial-gradient(circle, rgba(59, 158, 255, .20), rgba(6, 12, 24, .92));
  text-align: center;
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 0 42px rgba(59, 158, 255, .15);
}

.map-node.green-node {
  border-color: rgba(0, 229, 160, .34);
  background: radial-gradient(circle, rgba(0, 229, 160, .16), rgba(6, 12, 24, .92));
}

.map-node.purple-node {
  border-color: rgba(192, 132, 252, .34);
  background: radial-gradient(circle, rgba(192, 132, 252, .16), rgba(6, 12, 24, .92));
}

.mobile-menu {
  display: none;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  border: 1px solid rgba(0, 229, 160, .32);
  background: rgba(6, 12, 24, .95);
  color: var(--text);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .18s, transform .18s;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.viz-section {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 12, 24, .62);
  padding: 16px;
  box-shadow: var(--shadow);
}

.viz-grid {
  display: grid;
  gap: 14px;
}

.viz-cols-1 {
  grid-template-columns: 1fr;
}

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

.viz-card {
  min-height: 310px;
  overflow: hidden;
}

.viz-svg {
  display: block;
  width: 100%;
  min-height: 220px;
  border: 1px solid rgba(80, 140, 255, .12);
  border-radius: 8px;
  background:
    linear-gradient(rgba(126, 200, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 200, 255, .035) 1px, transparent 1px),
    rgba(3, 8, 18, .46);
  background-size: 32px 32px;
}

.viz-radar {
  min-height: 260px;
  background: rgba(3, 8, 18, .46);
}

.viz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  color: #91abc8;
  font-size: 12px;
}

.viz-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.viz-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.viz-bars {
  display: grid;
  gap: 10px;
}

.viz-bar-row {
  display: grid;
  grid-template-columns: minmax(82px, 150px) minmax(0, 1fr) minmax(42px, auto);
  gap: 10px;
  align-items: center;
  min-height: 26px;
}

.viz-bar-label {
  color: #bdd3ec;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viz-bar-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(212, 228, 255, .08);
}

.viz-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.viz-bar-track span.green {
  background: linear-gradient(90deg, var(--green), #80ffd5);
}

.viz-bar-track span.purple {
  background: linear-gradient(90deg, var(--purple), #e7ccff);
}

.viz-bar-track span.orange {
  background: linear-gradient(90deg, var(--orange), #ffc2a8);
}

.viz-bar-track span.yellow {
  background: linear-gradient(90deg, var(--yellow), #fff0ad);
}

.viz-bar-track span.red {
  background: linear-gradient(90deg, var(--red), #ff9aad);
}

.viz-bar-value {
  color: var(--green);
  font-size: 12px;
  font-family: Consolas, monospace;
  text-align: right;
}

.viz-arch {
  display: grid;
  grid-template-columns: repeat(9, auto);
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.viz-arch-node {
  min-width: 128px;
  border: 1px solid rgba(59, 158, 255, .22);
  border-radius: 8px;
  padding: 13px;
  background: rgba(59, 158, 255, .06);
}

.viz-arch-node b {
  display: block;
  margin-bottom: 7px;
  color: var(--green);
}

.viz-arch-node span {
  color: #91abc8;
  font-size: 12px;
  line-height: 1.6;
}

.viz-arch-arrow {
  display: grid;
  place-items: center;
  color: var(--blue);
  font-size: 22px;
}

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

.viz-media {
  margin: 0;
  border: 1px solid rgba(80, 140, 255, .14);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(3, 8, 18, .52);
}

.viz-media img {
  display: block;
  width: 100%;
  aspect-ratio: 1.45;
  object-fit: cover;
}

.viz-media figcaption,
.viz-audio span {
  color: #91abc8;
  font-size: 12px;
}

.viz-media figcaption {
  padding: 8px;
}

.viz-audio {
  grid-column: span 2;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(80, 140, 255, .14);
  border-radius: 8px;
  padding: 10px;
  background: rgba(3, 8, 18, .52);
}

.viz-audio div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.viz-audio b {
  color: #bdd3ec;
  font-size: 12px;
}

.viz-audio audio {
  width: 100%;
  height: 34px;
}

.formula-rank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.formula-rank-card {
  border: 1px solid rgba(80, 140, 255, .16);
  border-radius: 8px;
  background: rgba(3, 8, 18, .58);
  padding: 12px;
}

.formula-rank-card.best {
  border-color: rgba(0, 229, 160, .36);
  background: linear-gradient(135deg, rgba(0, 229, 160, .10), rgba(59, 158, 255, .06));
}

.formula-rank-top,
.formula-rank-meta,
.requirement-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.formula-rank-top span {
  color: var(--muted);
  font-size: 11px;
}

.formula-rank-top b {
  color: var(--green);
  font-size: 24px;
  font-family: Consolas, monospace;
}

.formula-rank-card h4 {
  margin: 8px 0 10px;
  font-size: 14px;
  line-height: 1.45;
}

.formula-rank-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.formula-rank-meta span {
  border: 1px solid rgba(59, 158, 255, .18);
  border-radius: 999px;
  padding: 4px 7px;
  color: #9fc7f2;
  font-size: 11px;
  background: rgba(59, 158, 255, .05);
}

.formula-score-line,
.requirement-track {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(212, 228, 255, .08);
}

.formula-score-line {
  margin: 11px 0 8px;
}

.formula-score-line span,
.requirement-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.formula-rank-card p {
  margin: 0;
  color: #91abc8;
  font-size: 12px;
  line-height: 1.55;
}

.formula-matrix {
  display: grid;
  gap: 7px;
}

.formula-matrix-head,
.formula-matrix-row {
  display: grid;
  grid-template-columns: minmax(92px, 1.2fr) repeat(5, minmax(42px, .7fr));
  gap: 7px;
  align-items: center;
}

.formula-matrix-head span {
  color: var(--muted);
  font-size: 11px;
}

.formula-matrix-row > span:first-child {
  color: #bdd3ec;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.formula-heat {
  display: grid;
  place-items: center;
  min-height: 30px;
  border-radius: 6px;
  color: #ecf7ff;
  font-size: 12px;
  font-family: Consolas, monospace;
  background: rgba(0, 229, 160, calc(.08 + var(--heat) * .34));
  border: 1px solid rgba(0, 229, 160, calc(.12 + var(--heat) * .32));
}

.formula-quadrant {
  min-height: 270px;
}

.formula-funnel {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.formula-funnel-step {
  min-width: 44%;
  border: 1px solid rgba(0, 229, 160, .22);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  background: linear-gradient(135deg, rgba(59, 158, 255, .12), rgba(0, 229, 160, .08));
}

.formula-funnel-step b {
  display: block;
  margin-bottom: 5px;
  color: var(--green);
}

.formula-funnel-step span {
  color: #bdd3ec;
  font-size: 12px;
}

.formula-funnel-arrow {
  color: var(--blue);
  font-size: 18px;
  line-height: 1;
}

.requirement-align {
  display: grid;
  gap: 12px;
}

.requirement-row {
  display: grid;
  grid-template-columns: minmax(86px, 1.1fr) minmax(0, 1.6fr) minmax(46px, auto);
}

.requirement-row b {
  display: block;
  color: #d4e4ff;
  font-size: 13px;
}

.requirement-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.requirement-row em {
  color: var(--green);
  font-style: normal;
  font-family: Consolas, monospace;
  font-size: 12px;
  text-align: right;
}

.process-window,
.enterprise-tier,
.alert-timeline,
.data-quality {
  display: grid;
  gap: 11px;
}

.process-window-row {
  display: grid;
  grid-template-columns: minmax(130px, .8fr) minmax(0, 1.5fr);
  gap: 12px;
  align-items: center;
}

.process-window-row b,
.enterprise-tier-row b {
  display: block;
  color: #d4e4ff;
  font-size: 13px;
}

.process-window-row span,
.enterprise-tier-row span {
  color: var(--muted);
  font-size: 11px;
}

.process-range {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: rgba(212, 228, 255, .08);
  overflow: hidden;
}

.process-range .range-band {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(59, 158, 255, .72), rgba(0, 229, 160, .82));
}

.process-range i {
  position: absolute;
  top: 1px;
  width: 2px;
  height: 16px;
  background: var(--yellow);
  box-shadow: 0 0 12px rgba(255, 209, 102, .8);
}

.process-loop,
.data-pipeline {
  display: grid;
  grid-template-columns: repeat(7, auto);
  gap: 8px;
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 4px;
}

.process-loop-node,
.data-pipeline-node {
  min-width: 132px;
  border: 1px solid rgba(59, 158, 255, .2);
  border-radius: 8px;
  padding: 12px;
  background: rgba(59, 158, 255, .055);
}

.process-loop-node strong,
.data-pipeline-node strong {
  display: block;
  color: var(--green);
  font-size: 24px;
  font-family: Consolas, monospace;
  margin-bottom: 5px;
}

.process-loop-node b,
.data-pipeline-node b {
  display: block;
  color: #d4e4ff;
  margin-bottom: 5px;
}

.process-loop-node span,
.data-pipeline-node span {
  color: #91abc8;
  font-size: 12px;
  line-height: 1.6;
}

.process-loop-arrow {
  display: grid;
  place-items: center;
  color: var(--blue);
  font-size: 22px;
}

.enterprise-tier-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(0, 1fr) 42px 72px;
  gap: 10px;
  align-items: center;
}

.enterprise-tier-score {
  height: 9px;
  border-radius: 999px;
  background: rgba(212, 228, 255, .08);
  overflow: hidden;
}

.enterprise-tier-score span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.enterprise-tier-row em {
  color: var(--green);
  font-style: normal;
  font-family: Consolas, monospace;
  text-align: right;
}

.enterprise-tier-row i {
  border: 1px solid rgba(0, 229, 160, .18);
  border-radius: 999px;
  padding: 4px 7px;
  color: #9fc7f2;
  font-size: 11px;
  font-style: normal;
  text-align: center;
  background: rgba(0, 229, 160, .05);
}

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

.equipment-cell {
  min-height: 82px;
  border-radius: 8px;
  border: 1px solid rgba(80, 140, 255, .16);
  padding: 10px;
  background: rgba(3, 8, 18, .55);
}

.equipment-cell.good {
  border-color: rgba(0, 229, 160, .26);
  background: rgba(0, 229, 160, .065);
}

.equipment-cell.warn {
  border-color: rgba(255, 209, 102, .28);
  background: rgba(255, 209, 102, .065);
}

.equipment-cell.risk {
  border-color: rgba(255, 77, 109, .28);
  background: rgba(255, 77, 109, .065);
}

.equipment-cell b,
.equipment-cell span,
.equipment-cell em {
  display: block;
}

.equipment-cell b {
  color: #d4e4ff;
  font-size: 12px;
  line-height: 1.35;
}

.equipment-cell span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.equipment-cell em {
  margin-top: 8px;
  color: var(--green);
  font-style: normal;
  font-size: 20px;
  font-family: Consolas, monospace;
}

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

.prod-kpi {
  border: 1px solid rgba(80, 140, 255, .16);
  border-radius: 8px;
  padding: 12px;
  background: rgba(3, 8, 18, .55);
}

.prod-kpi span {
  color: var(--muted);
  font-size: 12px;
}

.prod-kpi b {
  display: block;
  margin: 8px 0 10px;
  color: #d4e4ff;
  font-size: 24px;
  font-family: Consolas, monospace;
}

.prod-kpi small {
  margin-left: 4px;
  color: #91abc8;
  font-size: 12px;
}

.prod-kpi div {
  height: 8px;
  border-radius: 999px;
  background: rgba(212, 228, 255, .08);
  overflow: hidden;
}

.prod-kpi i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.alert-timeline-item {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 86px;
  gap: 10px;
  align-items: center;
  border-left: 3px solid var(--blue);
  border-radius: 6px;
  padding: 9px 10px;
  background: rgba(3, 8, 18, .52);
}

.alert-timeline-item.high {
  border-left-color: var(--red);
}

.alert-timeline-item.medium {
  border-left-color: var(--yellow);
}

.alert-timeline-item span,
.alert-timeline-item em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.alert-timeline-item b {
  color: #d4e4ff;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-quality-row {
  display: grid;
  grid-template-columns: 80px repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.data-quality-row > b {
  display: grid;
  place-items: center start;
  color: var(--green);
  font-size: 13px;
}

.data-quality-row span {
  min-height: 58px;
  border: 1px solid rgba(0, 229, 160, calc(.12 + var(--quality) * .26));
  border-radius: 8px;
  padding: 8px;
  background: rgba(0, 229, 160, calc(.04 + var(--quality) * .12));
}

.data-quality-row i,
.data-quality-row em {
  display: block;
  font-style: normal;
}

.data-quality-row i {
  color: #91abc8;
  font-size: 11px;
}

.data-quality-row em {
  margin-top: 7px;
  color: #d4e4ff;
  font-size: 18px;
  font-family: Consolas, monospace;
}

.data-pipeline {
  grid-template-columns: repeat(7, auto);
}

.data-pipeline-link {
  width: 38px;
  align-self: center;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--green));
  box-shadow: 0 0 12px rgba(59, 158, 255, .35);
}

@media (max-width: 1080px) {
  .app-shell {
    padding-left: 22px;
  }

  .sidebar {
    transform: translateX(-105%);
    transition: transform .2s;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-menu {
    display: grid;
  }

  .split,
  .cols-2,
  .cols-3,
  .cols-4,
  .flow,
  .viz-cols-2 {
    grid-template-columns: 1fr;
  }

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

  .formula-rank-grid {
    grid-template-columns: 1fr;
  }

  .equipment-matrix,
  .prod-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .enterprise-tier-row,
  .process-window-row,
  .alert-timeline-item,
  .data-quality-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 70px 12px 16px;
  }

  .topbar {
    padding: 0 12px;
  }

  .brand-sub,
  .status-pill,
  .top-actions .ghost-btn {
    display: none;
  }

  .page-head {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 22px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .viz-section {
    padding: 12px;
  }

  .viz-bar-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .viz-bar-value {
    text-align: left;
  }

  .viz-media-grid {
    grid-template-columns: 1fr;
  }

  .viz-audio {
    grid-column: span 1;
  }

  .formula-matrix-head,
  .formula-matrix-row {
    grid-template-columns: minmax(82px, 1fr) repeat(5, minmax(34px, .55fr));
    gap: 5px;
  }

  .formula-heat {
    min-height: 26px;
    font-size: 11px;
  }

  .requirement-row {
    grid-template-columns: 1fr;
  }

  .requirement-row em {
    text-align: left;
  }

  .equipment-matrix,
  .prod-kpi-grid {
    grid-template-columns: 1fr;
  }
}
