:root {
  --ink: #14251f;
  --muted: #66756f;
  --line: #dfe7e2;
  --line-soft: #edf1ee;
  --paper: #f4f7f5;
  --surface: #ffffff;
  --sidebar: #10221c;
  --sidebar-2: #183229;
  --green: #1f8f63;
  --green-dark: #116847;
  --green-soft: #e6f5ee;
  --amber: #b87817;
  --amber-soft: #fff5dc;
  --red: #c84d45;
  --blue: #3f68b0;
  --shadow: 0 16px 42px rgba(18, 39, 31, .07);
  --radius: 14px;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; min-height: 100vh; background: var(--paper); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; z-index: 20;
  display: flex; flex-direction: column; padding: 24px 18px 18px;
  color: #e8f0ec; background:
    radial-gradient(circle at 20% 0, rgba(60, 147, 107, .19), transparent 32%),
    var(--sidebar);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 7px 22px; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px;
  color: #10221c; background: #effcf5; font-weight: 900; letter-spacing: -.04em;
}
.brand-copy { display: grid; gap: 1px; }
.brand-copy b { font-size: 15px; letter-spacing: -.01em; }
.brand-copy small { color: #8fa69d; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.workspace {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) 20px; align-items: center; gap: 9px;
  padding: 11px; border: 1px solid rgba(255,255,255,.08); border-radius: 11px; background: rgba(255,255,255,.045);
}
.workspace-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: #b6ead1; background: var(--sidebar-2); font-size: 12px; font-weight: 800; }
.workspace span:nth-child(2) { display: grid; min-width: 0; }
.workspace small { color: #81988f; font-size: 9px; }
.workspace b { margin-top: 2px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.workspace button { border: 0; color: #8fa69d; background: none; cursor: pointer; }
.side-nav { display: grid; gap: 6px; margin-top: 27px; }
.nav-item {
  width: 100%; display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px;
  padding: 10px 11px; border: 0; border-radius: 9px; color: #9db0a8; background: transparent;
  font-size: 12px; text-align: left; cursor: pointer; transition: .18s ease;
}
.nav-item:hover { color: #ecf8f2; background: rgba(255,255,255,.05); }
.nav-item.active { color: white; background: #1d3b30; box-shadow: inset 3px 0 #55c998; }
.nav-icon { width: 22px; color: #7e9a8f; font-size: 16px; text-align: center; }
.nav-item.active .nav-icon { color: #7ee0b5; }
.nav-item em { min-width: 20px; padding: 2px 5px; border-radius: 12px; color: #8ba198; background: rgba(255,255,255,.06); font-size: 9px; font-style: normal; text-align: center; }
.sidebar-foot { display: grid; gap: 15px; margin-top: auto; }
.environment { display: flex; align-items: center; gap: 9px; padding: 11px; border-top: 1px solid rgba(255,255,255,.07); border-bottom: 1px solid rgba(255,255,255,.07); }
.environment > i { width: 8px; height: 8px; border-radius: 50%; background: #64d8a8; box-shadow: 0 0 0 4px rgba(100,216,168,.1); }
.environment span { display: grid; gap: 2px; }
.environment small { color: #758d84; font-size: 9px; }
.environment b { font-size: 10px; font-weight: 600; }
.sidebar-foot > a { display: flex; justify-content: space-between; padding: 0 11px; color: #82978f; font-size: 10px; }
.sidebar-foot > a:hover { color: white; }

.main { min-width: 0; }
.topbar {
  min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 17px 32px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9);
  backdrop-filter: blur(14px);
}
.breadcrumb { margin: 0 0 4px; color: #87928e; font-size: 10px; letter-spacing: .02em; }
h1 { margin: 0; font-size: 21px; letter-spacing: -.035em; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.saved-state { display: flex; align-items: center; gap: 6px; margin-right: 5px; color: #718079; font-size: 10px; }
.saved-state i { width: 6px; height: 6px; border-radius: 50%; background: #5cb990; }
.button {
  min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 14px; border: 1px solid transparent; border-radius: 8px; font-size: 11px; font-weight: 700;
  cursor: pointer; transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button-primary { color: white; background: var(--green-dark); box-shadow: 0 7px 16px rgba(17,104,71,.18); }
.button-primary:hover:not(:disabled) { background: #0d593c; }
.button-quiet { border-color: var(--line); background: white; }
.button-secondary { width: 100%; border-color: var(--line); background: #f8faf9; }
.button-wide { width: 100%; }
.play { font-size: 8px; }
.status-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 32px; border-bottom: 1px solid #dbe5df; background: #edf7f2; color: #52655d; font-size: 10px;
}
.status-main, .status-meta { display: flex; align-items: center; gap: 14px; }
.status-main p { margin: 0; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 20px; color: #176544; background: white; font-weight: 700; }
.status-badge i { width: 6px; height: 6px; border-radius: 50%; background: #33a06f; }
.status-meta span + span { padding-left: 14px; border-left: 1px solid #cbdcd3; }
.status-meta b { margin-left: 4px; color: #344a40; }
.content { max-width: 1540px; margin: 0 auto; padding: 26px 32px 46px; }
.view { display: none; animation: rise .24s ease both; }
.view.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.section-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.eyebrow, .panel-kicker { margin: 0 0 6px; color: var(--green); font-size: 8px; font-weight: 800; letter-spacing: .16em; }
.section-intro h2 { margin: 0; font-size: 20px; letter-spacing: -.035em; }
.suite-state { display: flex; align-items: center; gap: 7px; color: #66766f; font-size: 10px; }
.suite-state-dot { width: 7px; height: 7px; border-radius: 50%; background: #58ad85; }
.suite-state[data-state="running"] .suite-state-dot { background: #d8992f; animation: pulse 1s infinite; }
.suite-state[data-state="complete"] .suite-state-dot { background: #24966a; box-shadow: 0 0 0 5px rgba(36,150,106,.1); }
@keyframes pulse { 50% { opacity: .35; } }

.metrics-grid { display: grid; grid-template-columns: 1.15fr repeat(3, 1fr); gap: 13px; }
.metric-card, .panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 24px rgba(27,48,39,.035); }
.metric-card { min-height: 176px; padding: 18px; overflow: hidden; }
.metric-hero { color: white; border-color: #173b2d; background: linear-gradient(145deg, #173b2d, #0f2b21); box-shadow: 0 16px 30px rgba(18,53,39,.15); }
.metric-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.metric-hero .metric-head { color: #b6cabf; }
.metric-head em { padding: 3px 6px; border-radius: 12px; color: #18704c; background: var(--green-soft); font-size: 8px; font-style: normal; font-weight: 800; }
.metric-head em.neutral { color: #687770; background: #f0f3f1; }
.metric-head em.good { color: #16704a; }
.metric-card > strong { display: block; margin-top: 23px; font-size: 28px; letter-spacing: -.05em; }
.metric-card strong small { margin-left: 3px; color: #829089; font-size: 13px; font-weight: 700; letter-spacing: 0; }
.readiness { display: flex; align-items: center; justify-content: space-between; margin: 11px 0 6px; }
.readiness strong { font-size: 34px; letter-spacing: -.06em; }
.readiness strong small { margin-left: 2px; color: #90ae9f; font-size: 13px; }
.ring {
  --p: calc(var(--progress) * 1%);
  width: 54px; height: 54px; border-radius: 50%;
  background: conic-gradient(#6de0ae var(--p), rgba(255,255,255,.1) 0);
  position: relative;
}
.ring::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #143429; }
.metric-foot { margin-top: 12px; color: #85928c; font-size: 9px; }
.metric-hero .metric-foot { color: #99b1a5; }
.metric-foot > i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #6de0ae; }
.micro-bars { height: 48px; display: flex; align-items: flex-end; gap: 6px; margin-top: 2px; }
.micro-bars i { flex: 1; height: var(--h); border-radius: 3px 3px 1px 1px; background: #dce6e1; }
.micro-bars i.latest { background: #54ad85; }
.sparkline { width: 100%; height: 54px; margin-top: 1px; overflow: visible; }
.sparkline .area { fill: rgba(31,143,99,.09); }
.sparkline .line { fill: none; stroke: #2d9a6d; stroke-width: 2; }
.cost-breakdown { display: flex; gap: 3px; height: 20px; margin-top: 12px; overflow: hidden; border-radius: 5px; }
.cost-breakdown span { width: var(--w); display: flex; align-items: center; padding-left: 6px; overflow: hidden; color: transparent; background: #aed7c4; font-size: 7px; white-space: nowrap; transition: .2s; }
.cost-breakdown span:nth-child(2) { background: #c9e4d8; }
.cost-breakdown span:nth-child(3) { background: #e2eee8; }
.cost-breakdown:hover span { color: #285241; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(260px, .65fr); gap: 13px; margin-top: 13px; }
.panel { padding: 19px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.panel-head h3 { margin: 0; font-size: 14px; letter-spacing: -.025em; }
.text-button { border: 0; color: var(--green-dark); background: none; font-size: 9px; font-weight: 700; cursor: pointer; }
.run-summary { display: grid; grid-template-columns: .8fr 1.2fr; gap: 16px; margin: 17px 0 19px; }
.run-input, .run-result { padding: 13px; border-radius: 9px; background: #f7f9f8; }
.run-input > span, .run-result > span { color: #84918b; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.run-input p, .run-result p { margin: 7px 0 0; color: #2a3d34; font-size: 11px; line-height: 1.65; }
.run-result { border-left: 3px solid #5db68c; background: #f2f8f5; }
.run-result div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.run-result div b { padding: 4px 6px; border-radius: 4px; color: #567168; background: white; font-size: 7px; }
.stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 0; padding: 0; list-style: none; }
.stepper li { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 8px; min-width: 0; padding-right: 10px; }
.stepper li:not(:last-child)::after { content: ""; position: absolute; top: 10px; left: 21px; width: calc(100% - 20px); height: 1px; background: #d8e3dd; }
.stepper i { position: relative; z-index: 1; width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; color: white; background: #39996e; font-size: 8px; font-style: normal; }
.stepper span { min-width: 0; display: grid; gap: 2px; }
.stepper b { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.stepper small { overflow: hidden; color: #829089; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.stepper em { grid-column: 2; color: #8b9791; font-size: 7px; font-style: normal; }
.count { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: var(--amber); background: var(--amber-soft); font-size: 10px; font-weight: 800; }
.risk-item { margin-top: 17px; padding: 14px; border: 1px solid #efe2bd; border-radius: 9px; background: #fffbf1; }
.risk-level { color: var(--amber); font-size: 8px; font-weight: 800; }
.risk-item h4 { margin: 7px 0 6px; font-size: 11px; }
.risk-item p { margin: 0; color: #746b54; font-size: 9px; line-height: 1.6; }
.risk-item > div { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 11px; }
.risk-item > div span { color: #9a8f71; font-size: 7px; }
.risk-item button { border: 0; color: #805610; background: transparent; font-size: 8px; font-weight: 800; cursor: pointer; }
.risk-item.resolved { border-color: #cfe5da; background: #f1f8f5; }
.risk-item.resolved .risk-level { color: var(--green); }
.decision-note { margin-top: 12px; padding: 13px; border-radius: 9px; background: #f4f6f5; }
.decision-note span { color: #75847d; font-size: 8px; font-weight: 800; }
.decision-note p { margin: 6px 0 0; color: #475c52; font-size: 9px; line-height: 1.55; }

.legend, .filter-group { display: flex; align-items: center; gap: 8px; }
.legend span { display: flex; align-items: center; gap: 5px; color: #6e7c75; font-size: 8px; }
.legend i { width: 7px; height: 7px; border-radius: 2px; background: #68a47f; }
.legend i.model { background: #7467ba; }
.legend i.human { background: #c28b43; }
.workflow-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) 300px; gap: 13px; }
.canvas-panel { padding: 0; overflow: hidden; }
.canvas-toolbar { height: 45px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; border-bottom: 1px solid var(--line); color: #7d8984; font-size: 8px; }
.canvas-toolbar div { display: flex; align-items: center; gap: 7px; }
.canvas-toolbar button { width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 5px; background: white; cursor: pointer; }
.flow-canvas {
  position: relative; min-height: 520px; overflow: hidden;
  background-color: #fafcfa;
  background-image: radial-gradient(#d9e2dd 1px, transparent 1px);
  background-size: 18px 18px;
}
.connectors { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.connectors path { fill: none; stroke: #b7c6be; stroke-width: 1.5; stroke-dasharray: 4 3; }
.flow-node {
  position: absolute; left: var(--x); top: var(--y); width: 160px; min-height: 72px;
  display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; align-items: center;
  padding: 11px; border: 1px solid #cddbd3; border-radius: 10px; color: #31463c; background: white;
  text-align: left; box-shadow: 0 8px 18px rgba(28,53,42,.06); cursor: pointer; transition: .16s ease;
}
.flow-node:hover, .flow-node.selected { transform: translateY(-2px); border-color: #60ae88; box-shadow: 0 10px 24px rgba(35,105,76,.12); }
.flow-node > span { grid-row: 1 / 3; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; color: #2d7657; background: #e9f5ef; font-size: 8px; font-weight: 800; }
.flow-node b { font-size: 10px; }
.flow-node small { color: #829089; font-size: 7px; }
.flow-node.model > span { color: #5f52a5; background: #efedfa; }
.flow-node.rule > span { color: #2c6c8b; background: #eaf4f8; }
.flow-node.human > span { color: #946522; background: #fff2da; }
.flow-node.end > span { color: white; background: #246f50; }
.flow-note { position: absolute; left: var(--x); top: var(--y); padding: 10px 13px; border: 1px dashed #d4c28f; border-radius: 8px; color: #786940; background: #fffbef; }
.flow-note span { font-size: 7px; font-weight: 800; }
.flow-note p { margin: 5px 0 0; font-size: 8px; line-height: 1.5; }
.node-inspector { padding: 0 18px 18px; }
.inspector-head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; border-bottom: 1px solid var(--line-soft); color: #728078; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.inspector-head button { border: 0; color: #87928e; background: none; cursor: pointer; }
.node-inspector > h3 { margin: 17px 0 7px; font-size: 17px; }
.node-inspector > p { margin: 0; color: #6c7b74; font-size: 9px; line-height: 1.65; }
.node-inspector dl { display: grid; gap: 11px; margin: 19px 0; }
.node-inspector dl div { padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.node-inspector dt { margin-bottom: 4px; color: #8a9690; font-size: 7px; }
.node-inspector dd { margin: 0; color: #34493f; font-size: 9px; line-height: 1.5; }
.constraint-list { margin-bottom: 16px; padding: 13px; border-radius: 9px; background: #f6f8f7; }
.constraint-list h4 { margin: 0 0 10px; font-size: 9px; }
.constraint-list label { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 8px; font-size: 7px; }
.constraint-list label span { display: flex; align-items: center; gap: 6px; color: #5e6d66; }
.constraint-list label i { width: 5px; height: 5px; border-radius: 50%; background: #49a477; }
.constraint-list label b { color: var(--green-dark); font-size: 7px; }

.filter-group { padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.filter-group button { padding: 6px 9px; border: 0; border-radius: 5px; color: #77837d; background: none; font-size: 8px; cursor: pointer; }
.filter-group button.active { color: #284a3b; background: #edf4f0; font-weight: 800; }
.acceptance-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) 280px; gap: 13px; }
.test-table-panel { padding: 0; overflow: hidden; }
.test-overview { display: grid; grid-template-columns: 100px 1fr auto; align-items: center; gap: 18px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.test-overview > div:first-child { display: grid; gap: 2px; }
.test-overview strong { font-size: 20px; letter-spacing: -.04em; }
.test-overview span { color: #7c8983; font-size: 8px; }
.progress-track { height: 7px; overflow: hidden; border-radius: 6px; background: #e9eeeb; }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2c8c63, #62bd91); transition: width .35s ease; }
.test-numbers { display: flex; gap: 10px; }
.test-numbers span { display: flex; align-items: center; gap: 4px; }
.test-numbers i { width: 6px; height: 6px; border-radius: 50%; background: #48a578; }
.test-numbers i.review { background: #d09a35; }
.test-numbers i.fail { background: #d45c55; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 9px; }
th { padding: 11px 16px; color: #7d8a84; background: #f7f9f8; font-size: 7px; font-weight: 700; text-align: left; white-space: nowrap; }
td { padding: 13px 16px; border-top: 1px solid var(--line-soft); color: #596960; vertical-align: middle; }
td:first-child { color: #2a4035; font-weight: 700; }
.test-status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; border-radius: 12px; color: #25714f; background: #eaf6f0; font-size: 7px; font-weight: 800; white-space: nowrap; }
.test-status.review { color: #926516; background: #fff4dc; }
.test-status.running { color: #3968a0; background: #eaf1f8; }
.test-status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.evidence-link { border: 0; color: var(--green-dark); background: none; font-size: 8px; font-weight: 700; cursor: pointer; }
.coverage-panel { align-self: start; }
.coverage-row { display: grid; grid-template-columns: 74px 1fr 30px; align-items: center; gap: 8px; margin-top: 17px; font-size: 8px; }
.coverage-row > div { height: 5px; overflow: hidden; border-radius: 5px; background: #edf1ef; }
.coverage-row > div i { display: block; height: 100%; border-radius: inherit; background: #58ad85; transition: width .3s ease; }
.coverage-row b { color: #557066; font-size: 8px; text-align: right; }
.coverage-row.warning > div i { background: #d0a04b; }
.coverage-note { margin-top: 21px; padding: 12px; border-radius: 8px; background: #f4f7f5; }
.coverage-note b { font-size: 8px; }
.coverage-note p { margin: 5px 0 0; color: #6d7c74; font-size: 8px; line-height: 1.55; }

.release-version, .trace-id { padding: 6px 9px; border: 1px solid var(--line); border-radius: 15px; color: #6e7d75; background: white; font-size: 8px; }
.release-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) 330px; gap: 13px; }
.gate-list { padding: 0 19px 8px; }
.gate-list .panel-head { padding: 18px 0; border-bottom: 1px solid var(--line); }
.gate-list .panel-head strong { color: var(--green); font-size: 17px; }
.gate-item { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.gate-item > i { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; color: #24734f; background: #e6f5ee; font-size: 9px; font-style: normal; font-weight: 900; }
.gate-item span { display: grid; gap: 3px; }
.gate-item b { font-size: 9px; }
.gate-item small { color: #839089; font-size: 7px; }
.gate-item em { padding: 4px 7px; border-radius: 12px; color: #257450; background: #edf8f2; font-size: 7px; font-style: normal; }
.gate-item.pending > i { color: #9a6d1d; background: #fff2d6; }
.gate-item.pending em { color: #9a6d1d; background: #fff4dd; }
.release-card { align-self: start; padding: 26px; text-align: center; }
.release-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 15px; border-radius: 14px; color: #267350; background: #e8f5ee; font-size: 20px; }
.release-card h3 { margin: 0; font-size: 16px; }
.release-card > p { margin: 8px 0 18px; color: #718078; font-size: 9px; line-height: 1.6; }
.release-details { display: grid; margin-bottom: 17px; border-top: 1px solid var(--line); }
.release-details span { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); color: #839089; font-size: 8px; }
.release-details b { color: #40554b; }
.release-card > small { display: block; margin-top: 10px; color: #9aa39f; font-size: 7px; }
.release-card.released { border-color: #94c9ae; background: linear-gradient(180deg, #fff, #f2faf6); }

.trace-layout { display: grid; grid-template-columns: minmax(340px, .9fr) minmax(0, 1.3fr); gap: 13px; }
.trace-list { padding: 0; overflow: hidden; }
.trace-total { display: flex; flex-wrap: wrap; gap: 17px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #f8faf9; }
.trace-total span { color: #7c8983; font-size: 8px; }
.trace-total b { margin-right: 3px; color: #2d4539; }
.trace-step { width: 100%; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 13px 16px; border: 0; border-bottom: 1px solid var(--line-soft); background: white; text-align: left; cursor: pointer; }
.trace-step:hover, .trace-step.active { background: #f1f7f4; }
.trace-step > i { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; color: #5d4da3; background: #efedfa; font-size: 8px; font-style: normal; font-weight: 900; }
.trace-step > i.rule { color: #226e8f; background: #e9f4f8; }
.trace-step > i.tool { color: #8b6421; background: #fff2dc; }
.trace-step span { display: grid; gap: 2px; }
.trace-step b { font-size: 9px; }
.trace-step small { color: #85928c; font-size: 7px; }
.trace-step em { color: #77867e; font-size: 8px; font-style: normal; }
.trace-detail { padding: 0 18px 18px; background: #17251f; color: #eaf2ee; }
.trace-detail .inspector-head { border-color: rgba(255,255,255,.08); color: #8da198; }
.trace-detail h3 { margin: 17px 0 12px; font-size: 15px; }
.code-tabs { display: flex; gap: 3px; margin-bottom: 8px; }
.code-tabs button { padding: 6px 9px; border: 0; border-radius: 5px; color: #82978d; background: transparent; font-size: 8px; cursor: pointer; }
.code-tabs button.active { color: white; background: rgba(255,255,255,.08); }
.trace-detail pre { min-height: 235px; margin: 0; padding: 16px; overflow: auto; border: 1px solid rgba(255,255,255,.06); border-radius: 9px; color: #b8dbc9; background: #101c17; font: 9px/1.8 "SFMono-Regular", Consolas, monospace; white-space: pre-wrap; }
.trace-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.trace-meta span { display: grid; gap: 3px; color: #738a7f; font-size: 7px; }
.trace-meta b { color: #dce9e2; font-size: 8px; }

.brief-dialog { width: min(760px, calc(100vw - 30px)); padding: 28px; border: 0; border-radius: 18px; color: var(--ink); box-shadow: 0 30px 90px rgba(5,20,13,.28); }
.brief-dialog::backdrop { background: rgba(8,23,16,.55); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; background: white; cursor: pointer; }
.brief-dialog h2 { margin: 0 0 22px; font-size: 24px; letter-spacing: -.04em; }
.brief-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.brief-grid section { padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: #fafcfa; }
.brief-grid section > span { color: var(--green); font-size: 9px; font-weight: 900; }
.brief-grid h3 { margin: 8px 0 6px; font-size: 11px; }
.brief-grid p { margin: 0; color: #63736b; font-size: 9px; line-height: 1.65; }
.brief-foot { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); color: #87928d; font-size: 8px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; max-width: 320px; padding: 12px 15px; border-radius: 9px; color: white; background: #173c2e; box-shadow: var(--shadow); font-size: 9px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 200px minmax(0, 1fr); }
  .sidebar { padding-inline: 13px; }
  .content, .topbar, .status-strip { padding-left: 22px; padding-right: 22px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .workflow-layout, .acceptance-layout, .release-grid { grid-template-columns: 1fr; }
  .risk-panel, .coverage-panel, .release-card { order: -1; }
  .workflow-layout .node-inspector { order: 0; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar {
    position: relative; height: auto; padding: 13px 14px 10px;
    display: grid; grid-template-columns: 1fr auto; align-items: center;
  }
  .brand { padding: 0; }
  .brand-copy small, .workspace, .sidebar-foot { display: none; }
  .side-nav {
    grid-column: 1 / -1; display: flex; gap: 4px; margin: 12px -4px 0; overflow-x: auto; scrollbar-width: none;
  }
  .side-nav::-webkit-scrollbar { display: none; }
  .nav-item { width: auto; flex: 0 0 auto; grid-template-columns: 18px auto; padding: 8px 10px; }
  .nav-item em { display: none; }
  .topbar { min-height: auto; align-items: flex-start; padding: 17px 15px; }
  .topbar h1 { font-size: 18px; }
  .saved-state, .button-quiet { display: none; }
  .button { min-height: 34px; padding: 0 11px; font-size: 9px; }
  .status-strip { padding: 9px 15px; }
  .status-main p, .status-meta { display: none; }
  .content { padding: 19px 14px 36px; }
  .section-intro { align-items: flex-start; }
  .section-intro h2 { max-width: 300px; font-size: 18px; }
  .suite-state, .legend { display: none; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { min-height: 150px; padding: 14px; }
  .metric-card > strong { font-size: 24px; }
  .metric-head { align-items: flex-start; }
  .metric-head em { display: none; }
  .dashboard-grid { gap: 9px; }
  .panel { padding: 15px; }
  .run-summary { grid-template-columns: 1fr; }
  .stepper { grid-template-columns: 1fr; gap: 10px; }
  .stepper li { grid-template-columns: 22px 1fr auto; }
  .stepper li::after { display: none; }
  .stepper em { grid-column: 3; grid-row: 1; }
  .filter-group { max-width: 100%; overflow-x: auto; }
  .test-overview { grid-template-columns: 80px 1fr; }
  .test-numbers { grid-column: 1 / -1; }
  table { min-width: 680px; }
  .workflow-layout { display: block; }
  .canvas-panel { margin-bottom: 9px; }
  .flow-canvas { min-height: 620px; overflow-x: auto; }
  .flow-canvas::after { content: ""; display: block; width: 760px; height: 1px; }
  .connectors { width: 760px; }
  .flow-node { width: 140px; }
  .flow-node[style*="--x:80%"] { left: 600px; }
  .flow-node[style*="--x:51%"] { left: 390px; }
  .flow-node[style*="--x:57%"] { left: 430px; }
  .flow-node[style*="--x:78%"] { left: 590px; }
  .flow-note { left: 590px; }
  .trace-layout { grid-template-columns: 1fr; }
  .trace-detail pre { min-height: 190px; }
  .trace-meta { grid-template-columns: repeat(2, 1fr); }
  .brief-dialog { padding: 24px 18px; }
  .brief-grid { grid-template-columns: 1fr; }
  .toast { left: 14px; right: 14px; bottom: 14px; max-width: none; }
}

@media (max-width: 440px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 140px; }
  .metric-hero { min-height: 160px; }
  .section-intro { display: grid; }
  .release-grid { grid-template-columns: minmax(0, 1fr); }
  .gate-item { grid-template-columns: 26px 1fr; }
  .gate-item em { grid-column: 2; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
