:root {
  color: #1e2529;
  background: #f4f3ee;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

.login-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(39, 98, 83, 0.08), transparent 42%),
    #f4f3ee;
}

.login-panel {
  width: min(100%, 420px);
  box-sizing: border-box;
  border: 1px solid #d8ddd8;
  border-radius: 8px;
  padding: 28px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(31, 43, 47, 0.12);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.login-brand h1 {
  margin: 0;
  color: #172329;
  font-size: 22px;
  line-height: 1.15;
}

.login-brand span {
  display: block;
  margin-top: 6px;
  color: #667479;
  font-size: 13px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: #1f2b2f;
  font-size: 13px;
  font-weight: 800;
}

.login-form input {
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  border: 1px solid #cbd5cd;
  border-radius: 6px;
  padding: 0 12px;
  background: #fbfcfb;
  color: #1e2529;
  font: inherit;
  font-weight: 600;
}

.login-form input:focus {
  border-color: #276253;
  outline: 3px solid rgba(39, 98, 83, 0.14);
}

.login-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  background: #276253;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.login-form button:hover {
  background: #2f6f5c;
}

.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid #e0b8ae;
  border-radius: 6px;
  padding: 0 10px;
  background: #fff5f2;
  color: #8c3328;
  font-size: 13px;
  font-weight: 750;
}

.product-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
  background: #f4f3ee;
}

.process-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
  box-sizing: border-box;
  height: 100dvh;
  min-height: 0;
  padding: 20px 18px;
  border-right: 1px solid #d8ddd8;
  background: #e9ede8;
  color: #1f2b2f;
  overflow: hidden;
}

.service-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 64px;
}

.service-mark {
  position: relative;
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
}

.service-coin {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  transform: translateZ(0);
  transition: opacity 160ms ease;
  will-change: opacity;
}

.service-coin-main {
  opacity: 1;
}

.service-coin-hover {
  opacity: 0;
}

.service-brand:hover .service-coin-main,
.service-brand:focus-within .service-coin-main,
.service-mark:hover .service-coin-main,
.service-mark:active .service-coin-main {
  opacity: 0;
}

.service-brand:hover .service-coin-hover,
.service-brand:focus-within .service-coin-hover,
.service-mark:hover .service-coin-hover,
.service-mark:active .service-coin-hover {
  opacity: 1;
}

.service-brand strong,
.service-brand span {
  display: block;
}

.service-brand strong {
  font-size: 15px;
  color: #172329;
}

.service-brand span {
  margin-top: 4px;
  color: #667479;
  font-size: 12px;
}

.upload-control,
.sidebar-package-panel,
.run-summary {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.upload-control {
  flex: 0 0 auto;
}

.upload-picker {
  position: relative;
}

.run-summary span {
  display: block;
  color: #667479;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.upload-button,
.inline-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 850;
}

.upload-button {
  width: 100%;
  border: 0;
  padding: 0 12px;
  background: #276253;
  color: #ffffff;
  font-size: 15px;
}

.upload-button:hover,
.upload-button-open {
  background: #2f6f5c;
}

.upload-button span {
  min-width: 0;
}

.upload-button svg:last-child {
  flex: 0 0 auto;
  transition: transform 140ms ease;
}

.upload-button-open svg:last-child {
  transform: rotate(180deg);
}

.upload-button:focus-visible {
  outline: 2px solid rgba(39, 98, 83, 0.3);
  outline-offset: 2px;
}

.inline-upload-button {
  margin-top: 14px;
  border: 0;
  padding: 0 16px;
  background: #2f6f5c;
  color: #fff;
}

.upload-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  display: grid;
  gap: 0;
  width: 100%;
  max-height: min(420px, calc(100dvh - 156px));
  overflow: auto;
  border: 1px solid #cbd5cd;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(31, 43, 47, 0.14);
}

.upload-menu button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  min-height: 64px;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid #e1e7e2;
  border-radius: 0;
  background: #ffffff;
  color: #1f2b2f;
  cursor: pointer;
  text-align: left;
}

.upload-menu button:last-child {
  border-bottom: 0;
}

.upload-menu button:hover {
  background: #f6f8f5;
}

.upload-menu button[aria-selected="true"] {
  background: #eef4ef;
}

.upload-menu strong,
.upload-menu span,
.current-package span {
  display: block;
}

.upload-menu strong {
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.upload-menu span {
  margin-top: 4px;
  color: #68767a;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.upload-option-copy {
  min-width: 0;
}

.upload-option-copy strong,
.upload-option-copy span {
  white-space: normal;
}

.upload-menu .demo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  min-height: 22px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid #cbd7cf;
  border-radius: 999px;
  background: #eef3ef;
  color: #446055;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.current-package {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid #ccd5ce;
}

.current-package span {
  color: #6b797d;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar-package-panel {
  display: grid;
  gap: 0;
  min-height: 0;
  padding-top: 8px;
}

.sidebar-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4f5f64;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.sidebar-package-file strong,
.sidebar-package-file span {
  display: block;
}

.sidebar-package-file span {
  margin-top: 3px;
  color: #68767a;
  font-size: 12px;
  line-height: 1.35;
}

.sidebar-package-files {
  display: grid;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.sidebar-package-file {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  column-gap: 10px;
  align-items: start;
  min-height: 0;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid #d5ddd6;
  border-radius: 0;
  background: transparent;
}

.sidebar-package-file > svg {
  margin-top: 3px;
  color: #596a6f;
}

.sidebar-package-file > div {
  min-width: 0;
}

.sidebar-package-file strong {
  display: -webkit-box;
  overflow: hidden;
  color: #1f2b2f;
  font-size: 13px;
  line-height: 1.22;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.file-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  align-self: center;
  min-width: 18px;
  min-height: 24px;
  padding: 1px 10px 0;
  border-radius: 999px;
  color: #527265;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.file-state-muted::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #9aa8a1;
}

.file-state-muted {
  min-width: 18px;
  padding: 0;
}

.sidebar-package-file .file-state-good {
  background: #e6f1ec;
  color: #2f6f5c;
}

.file-state svg {
  color: currentColor;
}

.sidebar-package-file .file-state-warn {
  background: #f8ead0;
  color: #9a6c1f;
}

.sidebar-package-file .file-state-danger {
  background: #f7ddd7;
  color: #a04436;
}

.run-button,
.reset-button,
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.sidebar-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  flex: 0 0 auto;
  gap: 8px;
}

.run-button {
  border: 1px solid #b7c5bd;
  background: rgba(255, 255, 255, 0.24);
  color: #34464b;
}

.run-button:hover,
.reset-button:hover {
  border-color: #9fb6a9;
  background: rgba(255, 255, 255, 0.4);
}

.run-button:disabled {
  cursor: not-allowed;
  border-color: #c8d2cc;
  background: rgba(255, 255, 255, 0.18);
  color: #8a9892;
}

.reset-button {
  border: 1px solid #bcc9c1;
  background: rgba(255, 255, 255, 0.24);
  color: #405257;
}

.sidebar-actions svg {
  width: 14px;
  height: 14px;
}

.run-summary {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #ccd5ce;
}

.run-summary strong {
  display: block;
  margin: 8px 0;
  font-size: 34px;
  line-height: 1;
}

.summary-bar,
.agent-progress {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #dfe5e1;
}

.summary-bar {
  background: #d2dad4;
}

.summary-bar i,
.agent-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2f6b5a;
  transition: width 160ms linear;
}

.run-summary small {
  display: block;
  margin-top: 10px;
  color: #667479;
  line-height: 1.4;
}

.process-workspace {
  min-width: 0;
  padding: 24px;
}

.process-header,
.header-actions,
.package-head,
.panel-title,
.agent-top {
  display: flex;
  align-items: center;
}

.process-header {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.process-header h1 {
  display: none;
}

.header-actions {
  gap: 10px;
}

.download-button {
  border: 0;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  background: #276253;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.download-button:disabled {
  cursor: not-allowed;
  background: #cbd3cf;
  color: #657277;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 1px 10px 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.status-muted {
  background: #eef0ee;
  color: #59666a;
}

.status-good {
  background: #e5f0eb;
  color: #245846;
}

.status-warn {
  background: #f8ead0;
  color: #7b571b;
}

.status-danger {
  background: #f4e3df;
  color: #8f4a3d;
}

.process-sidebar .status-badge {
  border: 1px solid rgba(244, 241, 234, 0.16);
  background: rgba(244, 241, 234, 0.1);
  color: #dde5e1;
}

.process-sidebar .status-good {
  border-color: rgba(75, 137, 113, 0.38);
  background: rgba(75, 137, 113, 0.2);
  color: #d6e8df;
}

.process-sidebar .status-warn {
  border-color: rgba(180, 139, 61, 0.4);
  background: rgba(180, 139, 61, 0.18);
  color: #f0dcae;
}

.process-sidebar .status-danger {
  border-color: rgba(171, 88, 72, 0.4);
  background: rgba(171, 88, 72, 0.18);
  color: #efc6bd;
}

.status-active {
  background: #e4edf5;
  color: #315a7b;
}

.hero-console,
.board-panel,
.status-panel,
.result-panel,
.inspector-panel {
  border: 1px solid #dcdeda;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.hero-console {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 18px;
  padding: 20px;
  margin-bottom: 16px;
}

.upload-only {
  grid-template-columns: minmax(0, 1fr);
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.empty-workspace {
  display: grid;
  grid-template-columns: 24px minmax(0, max-content) minmax(220px, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid #dcdeda;
  border-radius: 8px;
  background: #fff;
  color: #526166;
}

.empty-workspace span {
  color: #1f2b30;
  font-weight: 800;
}

.empty-workspace p {
  margin: 0;
  color: #607075;
  font-size: 14px;
  line-height: 1.4;
}

.hero-copy h2 {
  margin: 6px 0 8px;
  font-size: 28px;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 720px;
  color: #526066;
  line-height: 1.55;
}

.preset-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.package-card {
  padding: 14px;
  border: 1px solid #e1e6e1;
  border-radius: 8px;
  background: #fbfcfa;
}

.package-empty {
  display: grid;
  place-items: center;
  min-height: 240px;
  text-align: center;
}

.package-empty strong,
.package-empty span {
  display: block;
}

.package-empty span {
  max-width: 320px;
  color: #667378;
  line-height: 1.45;
}

.package-head {
  gap: 10px;
  margin-bottom: 10px;
}

.package-head strong,
.package-head span,
.package-file strong,
.package-file span {
  display: block;
}

.package-head span,
.package-file span {
  margin-top: 3px;
  color: #667378;
  font-size: 13px;
}

.package-files {
  display: grid;
  gap: 8px;
}

.package-file {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  border: 1px solid #e6e9e5;
  border-radius: 8px;
  background: #fff;
}

.live-grid,
.result-grid,
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(340px, 0.9fr);
  gap: 16px;
}

.live-grid-primary {
  margin-top: 16px;
  margin-bottom: 16px;
}

.result-grid {
  margin-top: 16px;
}

.result-grid-full {
  grid-template-columns: 1fr;
}

.detail-grid {
  grid-template-columns: 1fr;
  margin-top: 16px;
}

.package-context {
  margin-bottom: 0;
}

.board-panel,
.status-panel,
.result-panel,
.inspector-panel,
.pipeline-summary {
  padding: 18px;
}

.pipeline-summary {
  position: relative;
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pipeline-summary-open {
  gap: 12px;
}

.summary-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
}

.pipeline-summary-open .summary-main {
  display: block;
  min-height: 34px;
}

.pipeline-summary-open .summary-toggle {
  position: absolute;
  top: 0;
  right: 0;
}

.pipeline-summary-open .events-heading {
  padding-right: 48px;
}

.analysis-heading,
.events-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}

.analysis-heading svg,
.events-heading svg {
  color: #223035;
}

.analysis-heading strong,
.events-heading strong {
  color: #1f2b30;
  font-size: 18px;
  line-height: 1.2;
}

.pipeline-summary-open.pipeline-summary-error {
  border-color: transparent;
  background: transparent;
}

.summary-left,
.summary-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #cfd7d1;
  border-radius: 6px;
  background: #fff;
  color: #2d393d;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.summary-toggle svg {
  transition: transform 140ms ease;
}

.summary-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.summary-left span,
.summary-left strong {
  display: block;
}

.summary-left span {
  color: #627176;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-left strong {
  margin-top: 3px;
  color: #1d2a2e;
}

.collapsed-agent-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}

.analysis-panel-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 440px);
  gap: 14px;
  padding-top: 0;
}

.analysis-section,
.events-section {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.collapsed-agent {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 56px;
  padding: 8px 12px 7px 12px;
  border-left: 3px solid #d7ded9;
  background: #f8f9f7;
}

.collapsed-agent span {
  display: block;
  min-width: 0;
}

.collapsed-agent span {
  color: #657277;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.18;
  white-space: normal;
}

.collapsed-good {
  border-left-color: #7aa992;
  background: #f8faf8;
}

.collapsed-warn {
  border-left-color: #d1b16c;
  background: #faf7ef;
}

.collapsed-danger {
  border-left-color: #c99286;
  background: #fff5f3;
}

.panel-title {
  gap: 10px;
  margin-bottom: 14px;
}

.panel-title span {
  color: #6b7478;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.panel-title h2 {
  margin: 2px 0 0;
  font-size: 18px;
}

.analysis-panel-body .board-panel,
.analysis-panel-body .status-panel {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.analysis-panel-body .panel-title {
  margin-bottom: 10px;
}

.agent-lanes {
  display: grid;
  border-top: 1px solid #e6e8e4;
}

.flow-board {
  display: grid;
  gap: 14px;
}

.sequential-board {
  display: grid;
  gap: 10px;
}

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

.flow-card {
  position: relative;
  display: grid;
  align-content: space-between;
  min-width: 0;
  min-height: 144px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid #e0e5e0;
  border-radius: 8px;
  background: #fbfcfa;
}

.flow-card-running {
  border-color: #aebfd0;
  background: #f5f8fb;
  box-shadow: inset 0 0 0 1px rgba(69, 109, 134, 0.18);
}

.flow-card-done {
  border-color: #c6d8ce;
  background: #f7faf8;
}

.flow-card-blocked {
  border-color: #e4beb6;
  background: #fff7f5;
}

.flow-card-top {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.flow-card-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #edf2ef;
  color: #2f6f5c;
}

.flow-card-number {
  position: absolute;
  top: 23px;
  left: 54px;
  color: #7a8783;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.flow-card-top .status-badge {
  justify-self: stretch;
  width: 100%;
  min-width: 0;
  min-height: 24px;
  overflow: hidden;
  padding: 1px 8px 0;
  font-size: 11px;
  text-overflow: ellipsis;
}

.flow-card-main {
  margin-top: 12px;
}

.flow-card h3 {
  margin: 0;
  color: #1f2b30;
  font-size: 15px;
  line-height: 1.2;
}

.flow-card p {
  margin: 7px 0 0;
  color: #5e6d72;
  font-size: 12px;
  line-height: 1.35;
}

.flow-card-progress {
  margin-top: 12px;
}

.sequence-agent {
  display: grid;
  grid-template-columns: 30px 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid #e1e6e1;
  border-radius: 8px;
  background: #fbfcfa;
}

.sequence-gate {
  border-color: #cbd8d2;
  background: #f7faf8;
}

.sequence-running {
  border-color: #b6c9d9;
  background: #f5f9fc;
}

.sequence-done {
  border-color: #c6dacd;
  background: #f7fbf8;
}

.sequence-blocked {
  border-color: #edc0b6;
  background: #fff7f4;
}

.sequence-index,
.sequence-icon {
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-weight: 900;
}

.sequence-index {
  width: 28px;
  height: 28px;
  background: #eef2ef;
  color: #56666b;
  font-size: 12px;
}

.sequence-icon {
  width: 36px;
  height: 36px;
  background: #edf4f1;
  color: #276253;
}

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

.sequence-head h3 {
  margin: 0;
  color: #1f2b30;
  font-size: 15px;
}

.sequence-head span,
.sequence-copy p {
  color: #637176;
  font-size: 12px;
  line-height: 1.35;
}

.sequence-head span {
  display: block;
  margin-top: 3px;
  font-weight: 750;
}

.sequence-copy p {
  margin: 8px 0;
  color: #3d4b50;
  font-size: 13px;
}

.flow-step {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e1e6e1;
  border-radius: 8px;
  background: #fbfcfa;
}

.flow-gate {
  border-color: #cbd8d2;
  background: #f7faf8;
}

.flow-step-head,
.direction-board-head,
.direction-lane-title,
.direction-stage-top {
  display: flex;
  align-items: center;
}

.flow-step-head {
  gap: 10px;
}

.flow-step-head > div {
  min-width: 0;
  flex: 1;
}

.flow-step h3,
.direction-lane-title strong,
.direction-stage strong {
  margin: 0;
  color: #1f2b30;
}

.flow-step span,
.direction-board-head span,
.direction-lane-title span,
.direction-stage span {
  color: #637176;
  font-size: 12px;
  line-height: 1.35;
}

.flow-step p {
  margin: 0;
  color: #4f5f64;
  font-size: 13px;
  line-height: 1.45;
}

.direction-board {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e1e6e1;
  border-radius: 8px;
  background: #fff;
}

.direction-board-head {
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8ebe6;
}

.direction-board-head strong {
  color: #1f2b30;
  font-size: 14px;
}

.direction-lane {
  display: grid;
  grid-template-columns: minmax(150px, 0.34fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  padding: 10px 0;
  border-bottom: 1px solid #edf0ec;
}

.direction-lane:last-child {
  border-bottom: 0;
}

.direction-lane-title {
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.direction-stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.direction-stage {
  display: grid;
  gap: 6px;
  min-height: 98px;
  padding: 10px;
  border: 1px solid #e2e7e2;
  border-radius: 8px;
  background: #fbfcfa;
}

.direction-stage-top {
  justify-content: space-between;
  gap: 8px;
}

.direction-stage-running {
  border-color: #b6c9d9;
  background: #f5f9fc;
}

.direction-stage-done {
  border-color: #c6dacd;
  background: #f7fbf8;
}

.direction-stage-blocked,
.direction-lane-blocked .direction-stage {
  border-color: #edc0b6;
  background: #fff7f4;
}

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

.agent-card {
  display: grid;
  grid-template-columns: 38px minmax(130px, 0.45fr) minmax(220px, 1fr) minmax(130px, 0.32fr);
  gap: 12px;
  align-items: center;
  min-height: 82px;
  padding: 12px 0;
  border-bottom: 1px solid #e6e8e4;
  background: transparent;
  transition: background 160ms ease;
}

.agent-running {
  background: #f7fafc;
}

.agent-done {
  background: #f8faf8;
}

.agent-blocked {
  background: #fbf3f1;
}

.agent-top {
  justify-content: space-between;
  gap: 10px;
}

.agent-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #edf3f1;
  color: #276253;
}

.agent-card h3 {
  margin: 0 0 3px;
  font-size: 15px;
}

.agent-role {
  display: block;
  color: #657277;
  font-size: 13px;
}

.agent-progress {
  margin: 0 0 8px;
}

.agent-card p {
  margin: 0;
  color: #3d4b50;
  font-size: 13px;
  line-height: 1.45;
}

.agent-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
  color: #6a7479;
  font-size: 12px;
  text-align: right;
}

.agent-meta strong {
  color: #8b5d11;
}

.stage-map {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  border-radius: 8px;
  background: #eff3f1;
  color: #314246;
  font-size: 12px;
  font-weight: 800;
}

.stage-arrow {
  rotate: -90deg;
  color: #829097;
}

.event-log {
  display: grid;
  gap: 8px;
  min-width: 0;
  max-height: 360px;
  overflow: auto;
}

.event-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 150px;
  padding: 18px;
  border: 1px dashed #ccd4d0;
  border-radius: 8px;
  color: #627176;
  text-align: center;
}

.result-empty,
.inspector-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 180px;
  padding: 24px;
  border: 1px dashed #ccd4d0;
  border-radius: 8px;
  color: #657277;
  text-align: center;
}

.result-empty strong,
.result-empty span,
.inspector-empty strong,
.inspector-empty span {
  display: block;
}

.result-empty strong,
.inspector-empty strong {
  color: #202b2f;
  font-size: 16px;
}

.result-empty span,
.inspector-empty span {
  max-width: 360px;
  line-height: 1.45;
}

.event-row {
  display: grid;
  grid-template-columns: 18px 38px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e4e7e3;
  border-radius: 8px;
  background: #fbfcfa;
}

.event-row span {
  color: #69747a;
  font-size: 12px;
  font-weight: 800;
}

.event-row p {
  min-width: 0;
  margin: 0;
  color: #344044;
  font-size: 13px;
  line-height: 1.4;
}

.event-warn {
  background: #fffaf0;
}

.event-done {
  background: #f3fbf7;
}

.result-panel-pending {
  color: #5e6a6f;
}

.result-panel-error {
  border-color: #e2b5ab;
}

.result-pending-line,
.result-decision,
.control-gap-line {
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-top: 1px solid #e6e8e4;
}

.result-pending-line {
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid #e6e8e4;
}

.control-gap-line span,
.risk-summary span {
  display: block;
  color: #667277;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.result-decision strong {
  display: block;
  color: #1f2b30;
  font-size: 18px;
  line-height: 1.2;
}

.result-decision p,
.control-gap-line p {
  margin: 0;
  color: #405056;
  line-height: 1.5;
}

.summary-widget {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #e6e8e4;
}

.summary-donut {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
}

.summary-donut svg {
  width: 132px;
  height: 132px;
  overflow: visible;
  transform: rotate(-90deg);
}

.summary-ring-bg,
.summary-ring-segment {
  fill: none;
}

.summary-ring-bg {
  stroke: #e4e9e4;
  stroke-width: 14;
}

.summary-ring-segment {
  stroke-width: 14;
  stroke-linecap: butt;
  cursor: pointer;
  outline: none;
  transition: opacity 160ms ease, stroke-width 160ms ease, filter 160ms ease;
}

.summary-ring-segment:hover,
.summary-ring-segment:focus-visible,
.summary-ring-segment.active {
  stroke-width: 18;
  filter: drop-shadow(0 3px 5px rgba(31, 43, 48, 0.16));
}

.summary-ring-segment.dimmed {
  opacity: 0.34;
}

.summary-donut-center {
  position: absolute;
  inset: 29px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0;
  border: 1px solid #dce5df;
  border-radius: 999px;
  background: #fff;
  color: #1f2b30;
  cursor: pointer;
  text-align: center;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.summary-donut-center:hover,
.summary-donut-center:focus-visible {
  border-color: #b9c8bf;
  background: #f8faf8;
  box-shadow: 0 2px 7px rgba(31, 43, 48, 0.09);
}

.summary-donut-center strong,
.summary-donut-center span,
.summary-widget-copy strong,
.summary-widget-copy p,
.summary-legend-button span,
.summary-legend-button strong {
  display: block;
}

.summary-donut-center strong {
  color: #1f2b30;
  font-size: 34px;
  line-height: 0.96;
}

.summary-donut-center span {
  color: #667277;
  font-size: 11px;
  font-weight: 800;
}

.summary-widget-copy strong {
  color: #1f2b30;
  font-size: 18px;
}

.summary-widget-copy p {
  max-width: 760px;
  margin: 7px 0 0;
  color: #4b5b60;
  line-height: 1.45;
}

.summary-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.summary-legend-button,
.summary-filter-reset {
  min-height: 30px;
  border: 1px solid #dde4df;
  border-radius: 6px;
  background: #fff;
  color: #405056;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.summary-legend-button {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 650;
}

.summary-legend-button:hover,
.summary-legend-button:focus-visible,
.summary-filter-reset:hover,
.summary-filter-reset:focus-visible {
  border-color: #b9c8bf;
  background: #f7faf8;
  color: #1f2b30;
  box-shadow: 0 1px 4px rgba(31, 43, 48, 0.07);
}

.summary-legend-button.active {
  border-color: #91b5a4;
  background: #edf5f1;
  color: #1f2b30;
}

.summary-legend-button:disabled {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
}

.summary-legend-button i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.summary-legend-button strong {
  color: #68767a;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
}

.summary-filter-reset {
  padding: 0 10px;
  color: #607076;
  font-size: 12px;
  font-weight: 800;
}

.legend-critical {
  background: #9f3f32;
}

.legend-high {
  background: #a8792c;
}

.legend-medium {
  background: #456d86;
}

.legend-low {
  background: #2f6f5c;
}

.risk-summary {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) repeat(4, minmax(120px, 0.8fr));
  gap: 0;
  margin-top: 8px;
  border-top: 1px solid #e6e8e4;
  border-bottom: 1px solid #e6e8e4;
}

.risk-total,
.risk-count-cell {
  min-height: 74px;
  padding: 12px 14px;
  border-right: 1px solid #e6e8e4;
}

.risk-count-cell:last-child {
  border-right: 0;
}

.risk-summary strong {
  display: block;
  margin-top: 4px;
  color: #1d282c;
  font-size: 26px;
  line-height: 1;
}

.risk-total strong {
  font-size: 34px;
}

.risk-danger strong {
  color: #9b3828;
}

.risk-warn strong {
  color: #8b5d11;
}

.risk-active strong {
  color: #315a7b;
}

.risk-good strong {
  color: #245846;
}

.finding-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.finding-selector button {
  min-height: 42px;
  border: 1px solid #dce2dd;
  border-radius: 8px;
  background: #fff;
  color: #273236;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  text-align: left;
}

.finding-selector button.active {
  border-color: #276253;
  background: #edf7f3;
}

.finding-preview {
  padding: 14px;
  border: 1px solid #e2e6e2;
  border-radius: 8px;
  background: #fbfcfa;
}

.finding-preview strong {
  display: block;
  font-size: 16px;
}

.finding-preview p,
.finding-preview small {
  color: #3f4c50;
  line-height: 1.5;
}

.finding-inspector-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.finding-list {
  display: grid;
  border: 1px solid #e2e6e2;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.finding-filter-empty {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 186px;
  padding: 22px;
  color: #667277;
  text-align: center;
}

.finding-filter-empty strong {
  color: #405056;
  font-size: 14px;
  line-height: 1.25;
}

.finding-filter-empty button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #d8e1dc;
  border-radius: 6px;
  background: #fff;
  color: #405056;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.finding-filter-empty button:hover,
.finding-filter-empty button:focus-visible {
  border-color: #b9c8bf;
  background: #f7faf8;
  box-shadow: 0 1px 4px rgba(31, 43, 48, 0.07);
}

.finding-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 14px;
  gap: 10px;
  align-items: start;
  width: 100%;
  min-height: 78px;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid #e6e8e4;
  border-radius: 0;
  background: #fff;
  color: #223035;
  cursor: pointer;
  text-align: left;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.priority-dot {
  justify-self: end;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #9ba6a2;
}

.priority-warn {
  background: #a87324;
}

.priority-danger {
  background: #a84838;
}

.priority-active {
  background: #456b88;
}

.priority-good {
  background: #36735f;
}

.priority-muted {
  background: #9ba6a2;
}

.finding-row:hover,
.finding-row.active {
  background: #f7f9f8;
}

.finding-row.active {
  box-shadow: inset 3px 0 0 #276253;
}

.finding-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: transparent;
  color: #54666b;
  font-size: 13px;
  font-weight: 900;
}

.finding-row-main,
.finding-row-main strong,
.finding-row-main small {
  display: block;
  min-width: 0;
}

.finding-row-main strong {
  color: #223035;
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.finding-row-main small {
  overflow: hidden;
  margin-top: 4px;
  color: #69777b;
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finding-detail {
  padding: 18px;
  border: 1px solid #e2e6e2;
  border-radius: 8px;
  background: #fff;
}

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

.priority-label {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 2px;
  color: #56656a;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
}

.priority-label span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.priority-label strong {
  color: currentColor;
  font-size: 12px;
}

.priority-label-danger {
  color: #a84838;
}

.priority-label-warn {
  color: #a87324;
}

.priority-label-active {
  color: #456b88;
}

.priority-label-good {
  color: #36735f;
}

.priority-label-muted {
  color: #6b767a;
}

.finding-detail-head span,
.finding-meta-line span,
.finding-section span,
.score-line span,
.recommendation-section span {
  display: block;
  color: #667479;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.finding-detail-head .priority-label span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  color: inherit;
}

.finding-detail-head .priority-label strong {
  color: inherit;
  font-size: 12px;
}

.finding-detail-head h3 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: 0;
}

.finding-meta-line {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  padding: 12px 0;
  border-top: 1px solid #e6e8e4;
  border-bottom: 1px solid #e6e8e4;
}

.finding-meta-line strong {
  display: block;
  margin-top: 5px;
  color: #243136;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.finding-sections {
  display: grid;
  margin-top: 4px;
}

.finding-section,
.recommendation-section {
  padding: 14px 0;
  border-bottom: 1px solid #e6e8e4;
}

.finding-section p,
.recommendation-section p,
.recommendation-section strong {
  margin: 8px 0 0;
  color: #35454a;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-line;
}

.score-line {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #e6e8e4;
}

.score-line strong {
  display: block;
  margin-top: 6px;
  color: #222f34;
  font-size: 18px;
}

.score-line small {
  display: block;
  margin-top: 6px;
  color: #5f6e73;
  line-height: 1.45;
}

.recommendation-section {
  background: transparent;
}

.recommendation-section strong {
  display: block;
  color: #245846;
  font-weight: 800;
}

.defect-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.defect-chips span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef1ef;
  color: #3f4d52;
  font-size: 12px;
  font-weight: 700;
}

.input-error-list {
  display: grid;
  gap: 10px;
}

.input-error-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e4e8e4;
  border-radius: 8px;
  background: #fbfcfa;
}

.input-error-row strong,
.input-error-row span,
.technical-note strong,
.technical-note span {
  display: block;
}

.input-error-row span,
.technical-note span {
  margin-top: 4px;
  color: #647277;
  line-height: 1.45;
}

.technical-note {
  padding: 14px;
  border: 1px solid #efb5a7;
  border-radius: 8px;
  background: #fff8f5;
}

.risk-strip {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

button {
  font: inherit;
}

button,
.process-sidebar,
.process-header,
.empty-workspace,
.pipeline-summary,
.flow-card,
.event-row,
.panel-title,
.status-badge,
.file-state,
.priority-dot,
.priority-label,
.summary-donut,
.summary-legend,
.finding-row,
.finding-number,
.input-error-row,
.result-pending-line,
.collapsed-agent {
  -webkit-user-select: none;
  user-select: none;
}

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

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px 16px;
  background: #1f2a2e;
  color: #f8f6f1;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #d7efe5;
  color: #17372e;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 14px;
  line-height: 1.25;
}

.brand span {
  margin-top: 4px;
  color: #b9c4c2;
  font-size: 12px;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #d5dddd;
  cursor: pointer;
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  background: #314247;
  color: #ffffff;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px;
  border: 1px solid #435357;
  border-radius: 8px;
}

.sidebar-footer p {
  margin: 10px 0 0;
  color: #c6d0ce;
  font-size: 12px;
  line-height: 1.45;
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.topbar h1 {
  margin: 4px 0 0;
  font-size: 30px;
  letter-spacing: 0;
}

.eyebrow,
.section-title span {
  color: #69747a;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

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

.icon-button,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border-radius: 6px;
  cursor: pointer;
}

.icon-button {
  width: 38px;
  border: 1px solid #cfd5d2;
  background: #ffffff;
  color: #283235;
}

.primary-button {
  border: 0;
  padding: 0 14px;
  background: #276253;
  color: #ffffff;
  font-weight: 700;
}

.secondary-button {
  width: 100%;
  border: 1px solid #cfd5d2;
  padding: 0 12px;
  background: #ffffff;
  color: #2a3437;
  font-weight: 700;
}

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

.span-4 {
  grid-column: span 4;
}

.span-5 {
  grid-column: span 5;
}

.span-6 {
  grid-column: span 6;
}

.span-7 {
  grid-column: span 7;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: span 12;
}

.panel,
.metric {
  border: 1px solid #d9ddd8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(33, 39, 42, 0.04);
}

.panel {
  padding: 18px;
}

.section-title {
  margin-bottom: 14px;
}

.section-title h2 {
  margin: 3px 0 0;
  font-size: 18px;
  letter-spacing: 0;
}

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

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

.metric span,
.metric small {
  display: block;
  color: #6b7478;
}

.metric strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 24px;
  line-height: 1.1;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-neutral {
  background: #edf0ef;
  color: #526064;
}

.badge-good {
  background: #dcefe7;
  color: #1f604e;
}

.badge-warn {
  background: #fff0ce;
  color: #80601a;
}

.badge-high {
  background: #ffe1d8;
  color: #a33a25;
}

.area-list,
.gap-list,
.file-table,
.check-list,
.quality-list,
.scale-list,
.findings-list {
  display: grid;
  gap: 10px;
}

.area-row,
.gap,
.file-row,
.check-row,
.quality-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e3e6e2;
  border-radius: 8px;
  background: #fbfcfa;
}

.area-row {
  grid-template-columns: minmax(0, 1fr) 74px;
}

.area-row strong,
.area-row span,
.gap strong,
.gap span,
.file-row strong,
.file-row span,
.check-row strong,
.check-row span,
.quality-row strong,
.quality-row span {
  display: block;
}

.area-row span,
.gap span,
.file-row span,
.check-row span,
.quality-row span {
  margin-top: 4px;
  color: #68747a;
  font-size: 13px;
  line-height: 1.45;
}

.risk-count {
  text-align: right;
}

.risk-count strong {
  font-size: 24px;
}

.gap,
.quality-row {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.gap-icon,
.quality-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #eef3f1;
  color: #276253;
}

.report-text,
.panel p {
  color: #344044;
  line-height: 1.6;
}

.file-row {
  grid-template-columns: 26px minmax(0, 1fr) auto;
}

.validation-status {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 18px;
  border-radius: 8px;
  background: #edf6f2;
  color: #245c4e;
  text-align: center;
}

.validation-status strong {
  font-size: 18px;
}

.check-row {
  grid-template-columns: 20px minmax(0, 1fr);
}

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

.pipeline-step {
  min-height: 144px;
  padding: 14px;
  border: 1px solid #dde3df;
  border-radius: 8px;
  background: #fbfcfa;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 24px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: #27393d;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.pipeline-step strong,
.pipeline-step small {
  display: block;
}

.pipeline-step small {
  margin-top: 3px;
  color: #69747a;
}

.pipeline-step p {
  margin-bottom: 0;
  font-size: 13px;
}

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

.findings-list-panel {
  padding: 14px;
}

.list-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.finding-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid #e2e6e2;
  border-radius: 8px;
  background: #ffffff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.finding-item.active {
  border-color: #276253;
  box-shadow: inset 3px 0 0 #276253;
}

.finding-item strong,
.finding-item span {
  display: block;
}

.finding-item span {
  margin-top: 4px;
  color: #667277;
  font-size: 13px;
}

.detail-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.detail-heading h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

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

.loan-strip div {
  padding: 12px;
  border-radius: 8px;
  background: #f1f4f2;
}

.loan-strip span,
.loan-strip strong {
  display: block;
}

.loan-strip span {
  color: #6a7478;
  font-size: 12px;
}

.compare-grid,
.analysis-grid,
.feedback-grid {
  display: grid;
  gap: 12px;
}

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

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

.compare-grid article,
.analysis-grid article,
.feedback,
.report-finding {
  padding: 14px;
  border: 1px solid #e2e5e1;
  border-radius: 8px;
  background: #fbfcfa;
}

.compare-grid h3,
.analysis-grid h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 4px 10px;
  padding: 10px 0;
  border-bottom: 1px solid #e2e5e1;
}

.score-row strong {
  text-align: right;
  font-size: 24px;
}

.score-row small {
  grid-column: 1 / -1;
  color: #68747a;
}

.scale-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2e5e1;
  border-radius: 8px;
}

.scale-row > strong {
  display: grid;
  place-items: center;
  height: 42px;
  border-radius: 8px;
  background: #26383c;
  color: #ffffff;
}

.scale-row span {
  font-weight: 800;
}

.scale-row p {
  margin: 4px 0 0;
}

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

.matrix-cell {
  min-height: 76px;
  padding: 10px;
  border: 1px solid #dfe4df;
  border-radius: 8px;
  background: #f4f6f4;
}

.matrix-cell.hot {
  background: #fff0d7;
}

.matrix-cell.critical {
  background: #ffe1d8;
}

.matrix-cell span,
.matrix-cell strong {
  display: block;
}

.matrix-cell span {
  color: #657176;
  font-size: 12px;
}

.matrix-cell strong {
  margin-top: 8px;
}

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

.feedback strong {
  display: block;
  margin-top: 10px;
}

.report-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 16px;
  align-items: start;
}

.report-paper {
  max-width: 920px;
  padding: 34px;
  border: 1px solid #d9ddd8;
  border-radius: 8px;
  background: #ffffff;
}

.report-cover {
  min-height: 180px;
  padding-bottom: 22px;
  border-bottom: 2px solid #27393d;
}

.report-cover h2 {
  margin: 18px 0 10px;
  font-size: 34px;
}

.report-section {
  padding: 22px 0;
  border-bottom: 1px solid #e3e6e2;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid #e4e7e3;
  text-align: left;
}

th {
  color: #5e6b70;
  font-size: 12px;
  text-transform: uppercase;
}

.report-finding {
  margin-bottom: 10px;
}

.report-finding p {
  margin: 8px 0;
}

.report-finding small {
  color: #5f6c70;
  line-height: 1.5;
}

.report-tools {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #d9ddd8;
  border-radius: 8px;
  background: #ffffff;
}

@media (max-width: 1500px) {
  .analysis-panel-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .pipeline-summary-open .events-heading {
    padding-right: 0;
  }
}

@media (max-width: 1100px) {
  .product-shell {
    grid-template-columns: 1fr;
    align-content: start;
    min-height: 0;
  }

  .process-sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(220px, 1fr) minmax(260px, 1.3fr) 150px 110px;
    align-items: center;
    gap: 10px;
    height: auto;
    min-height: 0;
    padding: 12px;
    overflow: visible;
  }

  .run-summary {
    display: none;
  }

  .hero-console,
  .live-grid,
  .analysis-panel-body,
  .result-grid,
  .finding-inspector-layout {
    grid-template-columns: 1fr;
  }

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

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

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
    display: block;
    padding: 12px;
  }

  .brand,
  .sidebar-footer {
    display: none;
  }

  .nav {
    display: flex;
    overflow-x: auto;
  }

  .nav-item {
    flex: 0 0 auto;
  }

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

  .findings-layout,
  .report-preview {
    grid-template-columns: 1fr;
  }

  .report-tools {
    position: static;
  }
}

@media (max-width: 920px) {
  .process-sidebar {
    position: static;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 14px;
  }

  .service-brand,
  .upload-control,
  .sidebar-package-panel,
  .run-summary {
    grid-column: 1 / -1;
  }

  .service-brand {
    min-height: 52px;
  }

  .service-mark {
    width: 52px;
    height: 52px;
  }

  .service-brand strong {
    font-size: 14px;
  }

  .service-brand span {
    font-size: 11px;
  }

  .upload-button,
  .inline-upload-button,
  .run-button,
  .reset-button,
  .download-button {
    min-height: 40px;
    font-size: 14px;
  }

  .current-package {
    margin-top: 10px;
    padding-top: 10px;
  }

  .current-package span,
  .sidebar-panel-title,
  .run-summary span {
    font-size: 10px;
  }

  .sidebar-package-panel {
    padding-top: 10px;
  }

  .sidebar-package-file span {
    font-size: 11px;
  }

  .sidebar-package-files {
    max-height: 136px;
  }

  .sidebar-package-file {
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    padding: 8px 0;
  }

  .sidebar-package-file .status-badge {
    grid-column: 3;
    margin-top: 0;
  }

  .sidebar-package-file strong {
    font-size: 12px;
  }

  .run-summary {
    margin-top: 0;
    padding-top: 10px;
  }

  .run-summary strong {
    margin: 6px 0;
    font-size: 20px;
  }

  .run-summary small {
    margin-top: 6px;
    font-size: 11px;
  }

  .process-workspace {
    padding: 14px;
  }

  .process-header h1 {
    font-size: 24px;
    line-height: 1.15;
  }

  .process-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
  }

  .download-button {
    flex: 1;
  }

  .package-file {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .package-file .status-badge {
    grid-column: 2;
    justify-self: start;
  }

  .agent-lanes,
  .collapsed-agent-row,
  .risk-summary,
  .finding-selector,
  .finding-meta-line,
  .score-line {
    grid-template-columns: 1fr;
  }

  .sequence-agent {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .analysis-flow,
  .summary-widget {
    grid-template-columns: 1fr;
  }

  .summary-donut {
    justify-self: center;
  }

  .sequence-icon {
    display: none;
  }

  .agent-card {
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: start;
  }

  .agent-work,
  .agent-meta {
    grid-column: 2;
  }

  .agent-meta {
    justify-items: start;
    text-align: left;
  }

  .risk-total,
  .risk-count-cell {
    border-right: 0;
    border-bottom: 1px solid #e6e8e4;
  }

  .risk-count-cell:last-child {
    border-bottom: 0;
  }

  .finding-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .finding-row .status-badge {
    grid-column: 2;
    justify-self: start;
  }

  .stage-map {
    grid-template-columns: 1fr;
  }

  .stage-arrow {
    display: none;
  }

  .workspace {
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
  }

  .primary-button {
    flex: 1;
  }

  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8,
  .span-12 {
    grid-column: span 12;
  }

  .metrics-grid,
  .pipeline,
  .compare-grid,
  .analysis-grid,
  .feedback-grid,
  .loan-strip,
  .matrix {
    grid-template-columns: 1fr;
  }

  .file-row,
  .quality-row,
  .gap,
  .area-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .file-row .badge,
  .quality-row .badge,
  .gap .badge {
    grid-column: 2;
    justify-self: start;
  }

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

  .risk-count {
    text-align: left;
  }

  .report-paper {
    padding: 20px;
  }
}

@media (max-width: 920px) {
  .process-sidebar {
    position: static;
    grid-template-columns: 1fr 1fr;
  }

  .run-button,
  .reset-button {
    width: 100%;
  }
}
