:root {
  --ink: #13233a;
  --ink-soft: #52647a;
  --blue: #0a5bd8;
  --blue-deep: #073a8f;
  --blue-soft: #eaf2ff;
  --cyan: #3bd1d8;
  --green: #11a36a;
  --amber: #e8a318;
  --red: #d94d54;
  --line: #dce4ef;
  --line-soft: #eaf0f6;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --nav: #0a1730;
  --nav-soft: #132443;
  --shadow: 0 18px 45px rgba(24, 49, 83, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.credential-username {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

body.login-active {
  overflow: hidden;
}

.app-shell.is-locked {
  visibility: hidden;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  min-height: 100vh;
  color: white;
  background: #071226;
  grid-template-columns: minmax(520px, 1.15fr) minmax(470px, 0.85fr);
}

.login-screen.hidden {
  display: none;
}

.login-story {
  position: relative;
  display: flex;
  min-height: 100vh;
  padding: 48px 7vw 46px;
  overflow: hidden;
  background:
    linear-gradient(rgba(36, 112, 218, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 112, 218, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 18% 20%, rgba(55, 218, 226, 0.18), transparent 28%),
    radial-gradient(circle at 76% 76%, rgba(17, 91, 216, 0.28), transparent 34%),
    linear-gradient(145deg, #0b1d3b, #061126 74%);
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
  flex-direction: column;
}

.login-story::after {
  position: absolute;
  right: -90px;
  bottom: 4vh;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(97, 220, 226, 0.17);
  border-radius: 50%;
  box-shadow:
    0 0 0 42px rgba(48, 130, 224, 0.04),
    0 0 0 98px rgba(48, 130, 224, 0.03);
  content: "";
}

.login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 14px;
  align-items: center;
}

.login-brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  color: #071226;
  background: linear-gradient(135deg, white, #77e5ea);
  border-radius: 14px;
  font-size: 19px;
  font-weight: 900;
  place-items: center;
  box-shadow: 0 12px 34px rgba(51, 215, 225, 0.22);
}

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

.login-brand strong {
  font-size: 19px;
  letter-spacing: 0.03em;
}

.login-brand span {
  color: #8fa8c7;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.login-story-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: auto 0;
}

.login-kicker {
  color: #73e2e7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.login-story-copy h1 {
  margin: 25px 0 22px;
  max-width: 720px;
  font-size: clamp(44px, 4.1vw, 66px);
  line-height: 1.17;
  letter-spacing: -0.04em;
}

.login-story-copy p {
  max-width: 620px;
  margin: 0;
  color: #afc0d5;
  font-size: 17px;
  line-height: 1.85;
}

.login-capabilities {
  position: relative;
  z-index: 1;
  display: grid;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  grid-template-columns: repeat(3, 1fr);
}

.login-capabilities div {
  display: flex;
  padding: 22px 20px 0 0;
  gap: 10px;
  flex-direction: column;
}

.login-capabilities span {
  color: #64dbe1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.login-capabilities strong {
  color: #dbe7f4;
  font-size: 14px;
}

.login-entry {
  display: grid;
  min-height: 100vh;
  padding: 54px 7vw;
  color: var(--ink);
  background: #f4f7fb;
  place-items: center;
}

.login-card {
  width: min(460px, 100%);
  padding: 38px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(22, 50, 85, 0.13);
}

.login-client-badge {
  display: grid;
  margin-bottom: 30px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #eaf4ff, #f4fbff);
  border: 1px solid #cfe2f7;
  border-radius: 14px;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: center;
}

.login-client-badge span {
  grid-row: 1 / span 2;
  padding: 7px 9px;
  color: white;
  background: var(--blue);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.login-client-badge strong {
  font-size: 16px;
}

.login-client-badge small {
  color: #60758d;
  font-size: 10px;
}

.login-card h2 {
  margin: 8px 0 8px;
  font-size: 31px;
  letter-spacing: -0.03em;
}

.login-intro {
  margin: 0 0 26px;
  color: var(--ink-soft);
}

#login-form {
  display: grid;
  gap: 17px;
}

#login-form label {
  display: grid;
  color: #475c72;
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
}

#login-form select,
#login-form input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: #f8fafc;
  border: 1px solid #d6e0eb;
  border-radius: 10px;
  outline: none;
}

#login-form select:focus,
#login-form input:focus {
  background: white;
  border-color: #6ca6f2;
  box-shadow: 0 0 0 3px rgba(10, 91, 216, 0.1);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 62px !important;
}

.password-field span {
  position: absolute;
  top: 50%;
  right: 12px;
  padding: 3px 7px;
  color: #087a56;
  background: #e2f7ed;
  border-radius: 999px;
  font-size: 9px;
  transform: translateY(-50%);
}

.login-button {
  display: flex;
  height: 52px;
  margin-top: 4px;
  padding: 0 18px;
  color: white;
  background: linear-gradient(100deg, #0a5bd8, #0d72e8);
  border: 0;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 800;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 12px 28px rgba(10, 91, 216, 0.25);
}

.login-button i {
  font-size: 20px;
  font-style: normal;
}

.login-button:disabled {
  cursor: wait;
  opacity: 0.68;
  box-shadow: none;
}

.login-error {
  min-height: 18px;
  margin: -4px 0 0;
  color: #b42318;
  font-size: 11px;
  font-weight: 700;
}

.login-error.success {
  color: #087a56;
}

.login-trust-row {
  display: flex;
  margin: 26px 0 18px;
  color: #5e7186;
  font-size: 10px;
  gap: 14px;
  flex-wrap: wrap;
}

.login-trust-row span::before {
  margin-right: 5px;
  color: var(--green);
  content: "✓";
  font-weight: 900;
}

.login-disclaimer {
  display: block;
  padding-top: 16px;
  color: #8190a1;
  border-top: 1px solid var(--line-soft);
  font-size: 9px;
  line-height: 1.65;
}

.logout-button {
  padding: 6px 9px;
  color: #60758d;
  background: transparent;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  font-size: 10px;
}

@media (max-width: 1000px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-story {
    display: none;
  }

  .login-entry {
    padding: 28px;
  }
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 268px;
  padding: 28px 20px 20px;
  color: white;
  background:
    radial-gradient(circle at 10% 92%, rgba(34, 98, 195, 0.34), transparent 32%),
    linear-gradient(164deg, #0c1b36, #071225 72%);
  flex-direction: column;
}

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

.brand-mark {
  display: grid;
  width: 43px;
  height: 43px;
  color: #071225;
  background: linear-gradient(135deg, #ffffff, #88e9ee);
  border-radius: 12px;
  font-size: 18px;
  font-weight: 900;
  place-items: center;
  box-shadow: 0 8px 24px rgba(54, 210, 220, 0.18);
}

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

.brand strong {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.brand span {
  margin-top: 2px;
  color: #8fa4c2;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.client-card {
  display: flex;
  margin: 28px 4px 22px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  flex-direction: column;
}

.client-card strong {
  margin: 5px 0 2px;
  font-size: 17px;
}

.client-card span {
  color: #9eb0c8;
  font-size: 11px;
}

.client-label {
  color: #73dce2 !important;
  letter-spacing: 0.12em;
}

.main-nav {
  display: flex;
  gap: 5px;
  flex-direction: column;
}

.nav-item {
  display: flex;
  width: 100%;
  padding: 13px 14px;
  color: #aebdd0;
  background: transparent;
  border: 0;
  border-radius: 11px;
  gap: 13px;
  align-items: center;
  text-align: left;
  transition: 180ms ease;
}

.nav-item:hover {
  color: white;
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
  color: white;
  background: linear-gradient(90deg, #155fc7, #174b9c);
  box-shadow: 0 10px 24px rgba(7, 59, 143, 0.28);
}

.nav-icon {
  display: grid;
  width: 25px;
  height: 25px;
  color: #7ddce0;
  border: 1px solid rgba(125, 220, 224, 0.35);
  border-radius: 7px;
  font-size: 9px;
  font-weight: 800;
  place-items: center;
}

.nav-item.active .nav-icon {
  color: #08204c;
  background: #8be4e7;
  border-color: #8be4e7;
}

.sidebar-bottom {
  margin-top: auto;
}

.framework-note {
  display: flex;
  margin: 0 4px 14px;
  padding: 13px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  gap: 10px;
  align-items: center;
}

.framework-note strong,
.framework-note span {
  display: block;
}

.framework-note strong {
  font-size: 12px;
}

.framework-note span {
  color: #91a5bf;
  font-size: 9px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #53d89d;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(83, 216, 157, 0.12);
}

.text-button {
  color: #7890ae;
  background: transparent;
  border: 0;
  font-size: 11px;
}

.text-button:hover {
  color: white;
}

.main-area {
  min-height: 100vh;
  margin-left: 268px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 86px;
  padding: 18px 34px 15px;
  background: rgba(244, 247, 251, 0.92);
  border-bottom: 1px solid rgba(213, 224, 237, 0.8);
  backdrop-filter: blur(14px);
  align-items: center;
  justify-content: space-between;
}

.breadcrumb {
  display: block;
  margin-bottom: 3px;
  color: #8290a2;
  font-size: 11px;
}

.topbar h1 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.02em;
}

.topbar-actions {
  display: flex;
  gap: 11px;
  align-items: center;
}

.demo-badge {
  display: inline-flex;
  margin-right: 7px;
  padding: 7px 10px;
  color: #3c5e86;
  background: #edf3fb;
  border: 1px solid #dbe5f2;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  align-items: center;
  gap: 7px;
}

.demo-badge i,
.live-label i {
  width: 6px;
  height: 6px;
  background: #17b675;
  border-radius: 50%;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(23, 182, 117, 0.25);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(23, 182, 117, 0);
  }
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  color: #53667c;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 18px;
  place-items: center;
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  color: white;
  background: linear-gradient(135deg, #0c62db, #12a9bf);
  border-radius: 10px;
  font-weight: 800;
  place-items: center;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-info strong {
  font-size: 12px;
}

.user-info span {
  color: #8794a5;
  font-size: 9px;
}

.page {
  display: none;
  max-width: 1500px;
  margin: 0 auto;
  padding: 30px 34px 60px;
}

.page.active {
  display: block;
  animation: pageIn 240ms ease;
}

[hidden] {
  display: none !important;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow.light {
  color: #85e1e7;
}

.intro-row {
  display: flex;
  margin-bottom: 28px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.intro-row.compact {
  align-items: center;
}

.intro-row h2 {
  max-width: 820px;
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.intro-row p {
  max-width: 800px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.intro-actions,
.output-actions,
.approval-actions {
  display: flex;
  gap: 9px;
  align-items: center;
}

.output-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary-button,
.secondary-button,
.start-button {
  border-radius: 9px;
  font-weight: 700;
  transition: 170ms ease;
}

.primary-button {
  padding: 10px 16px;
  color: white;
  background: var(--blue);
  border: 1px solid var(--blue);
  box-shadow: 0 8px 18px rgba(10, 91, 216, 0.16);
}

.primary-button:hover {
  background: #074bb7;
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.primary-button.small {
  padding: 8px 12px;
  font-size: 11px;
}

.secondary-button {
  padding: 8px 12px;
  color: #496079;
  background: white;
  border: 1px solid #d8e1ec;
  font-size: 11px;
}

.secondary-button:hover {
  color: var(--blue);
  border-color: #9fbae0;
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.secondary-button.danger {
  color: #b8464c;
}

.link-button {
  display: inline-flex;
  text-decoration: none;
  align-items: center;
}

.metric-strip {
  display: grid;
  margin-bottom: 34px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
}

.metric {
  min-height: 135px;
  padding: 22px 24px;
  border-right: 1px solid var(--line-soft);
}

.metric:last-child {
  border-right: 0;
}

.metric > span,
.metric small {
  display: block;
}

.metric > span {
  color: #63758a;
  font-size: 11px;
  font-weight: 700;
}

.metric strong {
  display: inline-block;
  margin: 7px 0 2px;
  color: var(--blue-deep);
  font-size: 36px;
  line-height: 1;
}

.metric small {
  color: #8a98aa;
  font-size: 10px;
}

.metric.accent {
  color: white;
  background: linear-gradient(135deg, #0b5bd5, #0b83b0);
}

.metric.accent > span,
.metric.accent small,
.metric.accent strong {
  color: white;
}

.section-heading {
  display: flex;
  margin: 18px 0 16px;
  align-items: flex-end;
  justify-content: space-between;
}

.section-heading h3,
.panel-title h3,
.knowledge-panel h3,
.separation-panel h3 {
  margin: 0;
  font-size: 18px;
}

.section-note {
  color: #8592a3;
  font-size: 10px;
}

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

.scenario-card {
  position: relative;
  min-height: 265px;
  padding: 19px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 8px 26px rgba(29, 58, 91, 0.06);
}

.scenario-card.selected {
  border-color: #74a8ec;
  box-shadow: 0 12px 32px rgba(18, 89, 181, 0.13);
}

.scenario-card h4 {
  margin: 14px 0 5px;
  font-size: 16px;
}

.scenario-card p {
  min-height: 45px;
  margin: 0 0 15px;
  color: #66788d;
  font-size: 11px;
}

.scenario-no {
  position: absolute;
  top: 15px;
  right: 16px;
  color: #b4c0ce;
  font-size: 10px;
  font-weight: 800;
}

.scenario-visual {
  position: relative;
  height: 110px;
  background: #f2f6fb;
  border: 1px solid #e4eaf2;
  border-radius: 11px;
  overflow: hidden;
}

.scenario-visual::before,
.scenario-visual::after,
.scenario-visual span {
  position: absolute;
  display: block;
  content: "";
}

.drawing-visual::before {
  inset: 20px;
  background:
    linear-gradient(#b7c7da 0 0) 0 8px / 75% 1px,
    linear-gradient(#b7c7da 0 0) 0 28px / 92% 1px,
    linear-gradient(#b7c7da 0 0) 0 48px / 60% 1px,
    linear-gradient(#b7c7da 0 0) 0 68px / 82% 1px;
  background-repeat: no-repeat;
}

.drawing-visual span {
  width: 11px;
  height: 11px;
  border: 2px solid #4e85c7;
  border-radius: 50%;
}

.drawing-visual span:nth-child(1) { left: 33px; top: 23px; }
.drawing-visual span:nth-child(2) { left: 114px; top: 42px; }
.drawing-visual span:nth-child(3) { right: 42px; top: 63px; }
.drawing-visual span:nth-child(4) { left: 67px; bottom: 18px; }

.table-visual::before {
  inset: 18px 25px;
  background:
    repeating-linear-gradient(to bottom, #b9c9dc 0 1px, transparent 1px 20px),
    repeating-linear-gradient(to right, #b9c9dc 0 1px, transparent 1px 52px);
}

.table-visual span {
  left: 32px;
  height: 8px;
  background: #70a3df;
  border-radius: 3px;
}

.table-visual span:nth-child(1) { top: 26px; width: 55px; }
.table-visual span:nth-child(2) { top: 46px; width: 102px; }
.table-visual span:nth-child(3) { top: 66px; width: 72px; }
.table-visual span:nth-child(4) { top: 86px; width: 126px; }

.sld-visual::before {
  left: 22px;
  right: 22px;
  top: 26px;
  height: 5px;
  background: #286ac0;
}

.sld-visual span {
  top: 31px;
  width: 2px;
  height: 54px;
  background: #607c9f;
}

.sld-visual span::after {
  position: absolute;
  bottom: -9px;
  left: -7px;
  width: 14px;
  height: 14px;
  border: 2px solid #14a06a;
  border-radius: 50%;
  content: "";
}

.sld-visual span:nth-child(1) { left: 42px; }
.sld-visual span:nth-child(2) { left: 92px; }
.sld-visual span:nth-child(3) { left: 142px; }
.sld-visual span:nth-child(4) { right: 42px; }

.flow-visual::before {
  top: 51px;
  left: 24px;
  right: 24px;
  height: 2px;
  background: #9aafc7;
}

.flow-visual span {
  top: 37px;
  width: 30px;
  height: 30px;
  background: white;
  border: 2px solid #4f86cb;
  border-radius: 8px;
}

.flow-visual span:nth-child(1) { left: 22px; }
.flow-visual span:nth-child(2) { left: 78px; }
.flow-visual span:nth-child(3) { left: 134px; }
.flow-visual span:nth-child(4) { right: 22px; border-color: #1aa876; }

.maturity {
  padding: 5px 8px;
  color: #7b8797;
  background: #f0f3f7;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 700;
}

.maturity.active {
  color: #07593c;
  background: #e2f7ee;
}

.two-column {
  display: grid;
  margin-top: 16px;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}

.bottom-space {
  margin-top: 18px;
}

.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 8px 26px rgba(29, 58, 91, 0.055);
}

.panel-title {
  display: flex;
  padding: 18px 20px 14px;
  align-items: center;
  justify-content: space-between;
}

.roadmap-panel,
.ownership-panel {
  padding-bottom: 10px;
}

.roadmap {
  padding: 0 20px 10px;
}

.roadmap-item {
  display: grid;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  gap: 11px;
  grid-template-columns: 30px 1fr auto;
  align-items: start;
}

.roadmap-item > span {
  display: grid;
  width: 26px;
  height: 26px;
  color: white;
  background: #165fbc;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  place-items: center;
}

.roadmap-item strong {
  font-size: 12px;
}

.roadmap-item p {
  margin: 2px 0 0;
  color: #748397;
  font-size: 10px;
}

.roadmap-item small {
  color: #8491a1;
  font-size: 9px;
}

.roadmap-item small.status-ready {
  padding: 4px 7px;
  color: #08734b;
  background: #e8f8f0;
  border: 1px solid #c9eedc;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

.ownership-stack {
  padding: 0 20px 10px;
}

.ownership-stack > div {
  padding: 12px 15px;
  border-top: 1px solid var(--line-soft);
}

.ownership-stack span,
.ownership-stack strong {
  display: block;
}

.ownership-stack span {
  color: #75869a;
  font-size: 9px;
}

.ownership-stack strong {
  margin-top: 2px;
  font-size: 12px;
}

.run-hero {
  display: grid;
  min-height: 284px;
  margin-bottom: 16px;
  padding: 34px 38px;
  color: white;
  background:
    radial-gradient(circle at 75% 15%, rgba(55, 213, 223, 0.22), transparent 25%),
    linear-gradient(135deg, #0b2147, #06499a 72%, #057a9f);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(7, 50, 107, 0.18);
  grid-template-columns: 1fr 310px;
  align-items: center;
}

.run-hero h2 {
  margin: 0 0 10px;
  font-size: 29px;
  line-height: 1.3;
}

.run-hero p {
  max-width: 680px;
  margin: 0 0 20px;
  color: #b7cce8;
  font-size: 13px;
}

.source-chip {
  display: inline-flex;
  min-width: 315px;
  padding: 11px 13px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  gap: 11px;
  align-items: center;
}

.file-icon {
  display: grid;
  width: 30px;
  height: 34px;
  color: #0a563b;
  background: #71ddb5;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  place-items: center;
}

.source-chip strong,
.source-chip span {
  display: block;
}

.source-chip strong {
  font-size: 12px;
}

.source-chip span {
  color: #9fb8d8;
  font-size: 9px;
}

.run-hero-action {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.readiness-ring {
  display: grid;
  width: 108px;
  height: 108px;
  margin-bottom: 17px;
  background:
    radial-gradient(circle, #0c3d79 57%, transparent 58%),
    conic-gradient(#70e5e5 0 93%, rgba(255, 255, 255, 0.12) 93% 100%);
  border-radius: 50%;
  place-items: center;
}

.readiness-ring > div {
  text-align: center;
}

.readiness-ring strong,
.readiness-ring span {
  display: block;
}

.readiness-ring strong {
  font-size: 20px;
}

.readiness-ring span {
  color: #a8c5e5;
  font-size: 9px;
}

.start-button {
  display: flex;
  width: 230px;
  padding: 13px 15px;
  color: #07214b;
  background: linear-gradient(135deg, #f7ffff, #80e4e8);
  border: 0;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 26px rgba(18, 207, 219, 0.18);
}

.start-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(18, 207, 219, 0.25);
}

.start-button.running {
  cursor: wait;
  opacity: 0.78;
}

.run-hero-action small {
  margin-top: 8px;
  color: #8facce;
  font-size: 9px;
}

.workflow-progress {
  display: grid;
  margin-bottom: 16px;
  padding: 16px 17px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  grid-template-columns: repeat(6, 1fr);
  box-shadow: 0 8px 26px rgba(29, 58, 91, 0.05);
}

.progress-step {
  position: relative;
  display: flex;
  min-height: 48px;
  padding: 0 14px;
  gap: 9px;
  align-items: center;
}

.progress-step:not(:last-child)::after {
  position: absolute;
  top: 23px;
  right: -3px;
  width: 18px;
  height: 1px;
  background: #cbd7e4;
  content: "";
}

.step-index {
  display: grid;
  width: 26px;
  height: 26px;
  color: #8493a5;
  background: #f1f4f8;
  border: 1px solid #dfe6ee;
  border-radius: 50%;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  place-items: center;
  flex: 0 0 auto;
}

.progress-step strong,
.progress-step span {
  display: block;
}

.progress-step strong {
  font-size: 10px;
}

.progress-step span {
  color: #8b98a8;
  font-size: 8px;
}

.progress-step.active .step-index {
  color: white;
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 0 0 5px rgba(10, 91, 216, 0.1);
}

.progress-step.completed .step-index {
  color: white;
  background: var(--green);
  border-color: var(--green);
}

.progress-step.waiting .step-index {
  color: #76510e;
  background: #fff2cd;
  border-color: #f0d58b;
}

.progress-step.locked {
  opacity: 0.48;
}

.run-grid {
  display: grid;
  margin-bottom: 16px;
  gap: 16px;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
}

.run-grid > * {
  min-width: 0;
}

.data-panel,
.quality-panel {
  min-height: 340px;
}

.table-wrap {
  padding: 0 20px 18px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  white-space: nowrap;
}

th {
  color: #8190a2;
  background: #f8fafc;
  font-size: 9px;
  font-weight: 700;
}

td {
  color: #3f5369;
  font-size: 10px;
}

td strong {
  color: var(--ink);
}

.row-status {
  display: inline-flex;
  padding: 3px 7px;
  color: #236947;
  background: #e6f7ee;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 700;
}

.row-status.review {
  color: #855b06;
  background: #fff1c9;
}

.quality-score {
  padding: 6px 9px;
  color: #788797;
  background: #f0f4f8;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 700;
}

.quality-score.ready {
  color: #135d3e;
  background: #e3f7ee;
}

.quality-summary {
  display: grid;
  margin: 0 20px 12px;
  padding: 12px 0;
  background: #f7f9fc;
  border-radius: 10px;
  grid-template-columns: repeat(3, 1fr);
}

.quality-summary div {
  border-right: 1px solid #e1e7ef;
  text-align: center;
}

.quality-summary div:last-child {
  border: 0;
}

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

.quality-summary strong {
  font-size: 21px;
}

.quality-summary span {
  color: #8390a0;
  font-size: 8px;
}

.issue-list {
  max-height: 190px;
  padding: 0 20px 18px;
  overflow-y: auto;
}

.optimization-panel {
  margin-bottom: 16px;
  padding-bottom: 18px;
}

.optimization-summary {
  display: grid;
  margin: 0 20px 14px;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.optimization-metric {
  display: flex;
  padding: 12px 14px;
  background: #f7f9fc;
  border: 1px solid #e1e8ef;
  border-radius: 10px;
  align-items: center;
  gap: 10px;
}

.optimization-metric strong {
  font-size: 23px;
}

.optimization-metric span {
  color: #64778b;
  font-size: 10px;
  font-weight: 700;
}

.optimization-metric.action strong {
  color: #a56d0b;
}

.optimization-metric.review strong {
  color: #0b5bd5;
}

.optimization-metric.ok strong {
  color: #137657;
}

.optimization-list {
  display: grid;
  margin: 0 20px;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.optimization-item {
  display: grid;
  min-width: 0;
  padding: 12px;
  background: #fbfcfe;
  border: 1px solid var(--line-soft);
  border-left: 4px solid #0b5bd5;
  border-radius: 9px;
  gap: 10px;
  grid-template-columns: auto 1fr;
}

.optimization-item.action {
  border-left-color: #b77a13;
}

.optimization-item.ok {
  border-left-color: #178562;
}

.optimization-item > span {
  height: fit-content;
  padding: 4px 7px;
  color: #245fa8;
  background: #eaf2ff;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.optimization-item.action > span {
  color: #80560a;
  background: #fff1cf;
}

.optimization-item.ok > span {
  color: #116047;
  background: #e5f6ee;
}

.optimization-item strong {
  display: block;
  color: var(--ink);
  font-size: 11px;
}

.optimization-item p {
  margin: 4px 0 0;
  color: #617489;
  font-size: 9px;
  line-height: 1.55;
}

.optimization-boundary {
  margin: 14px 20px 0;
  color: #7c8998;
  font-size: 9px;
}

.empty-state {
  display: flex;
  min-height: 145px;
  color: #9aa7b5;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.empty-state span {
  display: grid;
  width: 36px;
  height: 36px;
  margin-bottom: 7px;
  color: #7e8fa2;
  background: #edf2f7;
  border-radius: 50%;
  place-items: center;
}

.empty-state p {
  max-width: 230px;
  margin: 0;
  font-size: 10px;
}

.issue-item {
  display: grid;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  gap: 8px;
  grid-template-columns: 54px 1fr;
}

.issue-item > span {
  display: inline-flex;
  height: 20px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 8px;
  font-weight: 800;
  align-items: center;
  justify-content: center;
}

.issue-item.warning > span {
  color: #8a5c00;
  background: #fff0c4;
}

.issue-item.info > span {
  color: #28658c;
  background: #e1f2fc;
}

.issue-item.error > span {
  color: #99383e;
  background: #ffe0e2;
}

.issue-item strong,
.issue-item small {
  display: block;
}

.issue-item strong {
  font-size: 10px;
}

.issue-item small {
  color: #7e8b9a;
  font-size: 8px;
}

.drawing-review-panel {
  margin-bottom: 16px;
  overflow: hidden;
}

.drawing-review-title {
  border-bottom: 1px solid var(--line-soft);
}

.drawing-page-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.drawing-page-controls button {
  min-width: 34px;
  padding: 7px 9px;
}

.drawing-page-controls span {
  min-width: 88px;
  color: #64788d;
  font-size: 9px;
  text-align: center;
}

.drawing-review-grid {
  display: grid;
  min-height: 520px;
  grid-template-columns: minmax(0, 1fr) 270px;
}

.drawing-preview-area {
  min-width: 0;
  padding: 15px;
  background: #edf2f7;
}

.drawing-preview-legend {
  display: flex;
  margin-bottom: 10px;
  color: #60758b;
  gap: 16px;
  align-items: center;
  font-size: 9px;
}

.drawing-preview-legend span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.drawing-preview-legend span:last-child {
  margin-left: auto;
}

.drawing-preview-legend i {
  width: 10px;
  height: 10px;
  border: 2px solid #0b65c9;
  border-radius: 2px;
}

.drawing-preview-legend i.text {
  border-color: #c96a18;
}

.drawing-canvas-scroll {
  position: relative;
  display: grid;
  max-height: 650px;
  min-height: 455px;
  background: #dce4ec;
  border: 1px solid #c7d3df;
  border-radius: 10px;
  overflow: auto;
  place-items: start center;
}

.drawing-canvas-wrap {
  position: relative;
  display: none;
  margin: 14px;
  background: white;
  box-shadow: 0 8px 26px rgba(22, 46, 73, 0.16);
}

.drawing-canvas-wrap.ready {
  display: block;
}

#drawing-source-canvas {
  display: block;
}

.drawing-annotation-layer {
  position: absolute;
  inset: 0;
}

.drawing-annotation-box {
  position: absolute;
  min-width: 10px;
  min-height: 10px;
  padding: 0;
  background: rgba(11, 101, 201, 0.08);
  border: 2px solid rgba(11, 101, 201, 0.78);
  border-radius: 3px;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.72) inset;
}

.drawing-annotation-box.text {
  background: rgba(201, 106, 24, 0.09);
  border-color: rgba(201, 106, 24, 0.82);
}

.drawing-annotation-box:hover,
.drawing-annotation-box.active {
  z-index: 3;
  background: rgba(11, 101, 201, 0.2);
  border-width: 3px;
  box-shadow: 0 0 0 4px rgba(11, 101, 201, 0.12);
}

.drawing-annotation-box.text:hover,
.drawing-annotation-box.text.active {
  background: rgba(201, 106, 24, 0.2);
  box-shadow: 0 0 0 4px rgba(201, 106, 24, 0.12);
}

.drawing-annotation-box span {
  position: absolute;
  top: -20px;
  left: -2px;
  display: none;
  max-width: 180px;
  padding: 3px 6px;
  color: white;
  background: #0b5bd5;
  border-radius: 4px;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawing-annotation-box.text span {
  background: #b75b0c;
}

.drawing-annotation-box:hover span,
.drawing-annotation-box.active span {
  display: block;
}

.drawing-preview-loading {
  position: absolute;
  inset: 0;
  display: grid;
  color: #72859a;
  font-size: 10px;
  place-items: center;
}

.drawing-preview-loading.hidden {
  display: none;
}

.annotation-inspector {
  padding: 20px;
  background: #fbfcfe;
  border-left: 1px solid var(--line-soft);
}

.annotation-empty {
  margin-top: 14px;
  padding: 18px;
  color: #7d8da0;
  background: #f1f5f9;
  border-radius: 10px;
  font-size: 10px;
  line-height: 1.7;
}

.annotation-type-row {
  display: flex;
  margin-top: 14px;
  align-items: center;
  justify-content: space-between;
}

.annotation-type-row span,
.annotation-type-row strong {
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 8px;
}

.annotation-type-row span {
  color: #0b5bd5;
  background: #e7f0ff;
}

.annotation-type-row strong {
  color: #176847;
  background: #e4f6ed;
}

.annotation-inspector h4 {
  margin: 14px 0 7px;
  color: #18334f;
  font-size: 15px;
  line-height: 1.45;
  word-break: break-word;
}

.annotation-inspector p {
  margin: 0 0 17px;
  color: #708297;
  font-size: 9px;
  line-height: 1.6;
}

.annotation-inspector label {
  display: block;
  margin-top: 11px;
  color: #61758a;
  font-size: 8px;
  font-weight: 700;
}

.annotation-inspector input {
  width: 100%;
  margin-top: 5px;
  padding: 9px 10px;
  color: #233f5b;
  background: white;
  border: 1px solid #cdd9e5;
  border-radius: 8px;
  outline: none;
  font-size: 9px;
}

.annotation-inspector input:focus {
  border-color: #79a8e4;
  box-shadow: 0 0 0 3px rgba(11, 91, 213, 0.08);
}

.annotation-inspector button {
  width: 100%;
  margin-top: 13px;
}

.annotation-inspector small {
  display: block;
  margin-top: 9px;
  color: #8897a7;
  font-size: 8px;
  line-height: 1.55;
}

.annotation-inspector small.saved {
  color: #176847;
}

#data-table-body tr.locatable {
  cursor: pointer;
}

#data-table-body tr.locatable:hover td,
#data-table-body tr.annotation-row-active td {
  background: #eef5ff;
}

.row-status.corrected {
  color: #6044a5;
  background: #eee8ff;
}

.row-status.confirmed {
  color: #176847;
  background: #e4f6ed;
}

.output-panel {
  overflow: hidden;
  scroll-margin-top: 102px;
}

.output-title {
  border-bottom: 1px solid var(--line-soft);
}

.draft-badge {
  padding: 6px 9px;
  color: #7e5708;
  background: #fff0c6;
  border-radius: 7px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.draft-badge.approved {
  color: #105b3d;
  background: #dcf5e9;
}

.run-standard-evidence {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 20px;
  color: #6f5521;
  background: #fff9e9;
  border-bottom: 1px solid #eadcaf;
}

.run-standard-evidence[hidden] {
  display: none;
}

.run-standard-evidence.approved {
  color: #175d49;
  background: #eefaf5;
  border-bottom-color: #cde8dc;
}

.run-standard-evidence div {
  display: flex;
  min-width: 240px;
  flex-direction: column;
}

.run-standard-evidence span {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.run-standard-evidence strong {
  margin-top: 3px;
  color: #17324f;
  font-size: 10px;
}

.run-standard-evidence p {
  margin: 0;
  font-size: 8px;
  line-height: 1.55;
  text-align: right;
}

.diagram-stage {
  position: relative;
  min-height: 440px;
  background-color: #fbfcfe;
  background-image:
    linear-gradient(#eef2f7 1px, transparent 1px),
    linear-gradient(90deg, #eef2f7 1px, transparent 1px);
  background-size: 22px 22px;
  overflow: auto;
}

.diagram-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  color: #91a0b0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.diagram-placeholder strong {
  margin-top: 14px;
  color: #65788e;
  font-size: 13px;
}

.diagram-placeholder span {
  margin-top: 3px;
  font-size: 9px;
}

.placeholder-lines {
  position: relative;
  width: 120px;
  height: 52px;
  border-top: 4px solid #aebdcd;
}

.placeholder-lines::before,
.placeholder-lines::after {
  position: absolute;
  top: 0;
  width: 2px;
  height: 45px;
  background: #c0ccd9;
  content: "";
}

.placeholder-lines::before {
  left: 28px;
}

.placeholder-lines::after {
  right: 28px;
}

.engineering-diagram {
  display: block;
  width: 100%;
  min-width: 920px;
  height: 440px;
}

.engineering-diagram text {
  font-family: Inter, "Microsoft YaHei", sans-serif;
}

.approval-bar {
  display: flex;
  min-height: 82px;
  padding: 15px 20px;
  background: #f8fafc;
  border-top: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.approval-bar > div:first-child {
  display: flex;
  gap: 10px;
  align-items: center;
}

.approval-bar strong,
.approval-bar span {
  display: block;
}

.approval-bar strong {
  font-size: 11px;
}

.approval-bar span:not(.approval-icon) {
  color: #7f8d9d;
  font-size: 9px;
}

.approval-icon {
  display: grid;
  width: 34px;
  height: 34px;
  color: white;
  background: #174c93;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  place-items: center;
}

.approval-actions input {
  width: 210px;
  padding: 9px 10px;
  background: white;
  border: 1px solid #d7e0eb;
  border-radius: 8px;
  outline: none;
  font-size: 10px;
}

.approval-actions input:focus {
  border-color: #78a4e1;
  box-shadow: 0 0 0 3px rgba(10, 91, 216, 0.08);
}

.studio-layout {
  display: grid;
  min-height: 680px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  grid-template-columns: 220px minmax(520px, 1fr) 310px;
  overflow: hidden;
}

.studio-library {
  padding: 18px 14px;
  background: #fafcfe;
  border-right: 1px solid var(--line);
}

.library-heading {
  padding: 0 5px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.library-heading strong,
.library-heading span {
  display: block;
}

.library-heading strong {
  font-size: 13px;
}

.library-heading span {
  color: #8794a4;
  font-size: 9px;
}

.library-group {
  display: flex;
  margin-top: 16px;
  gap: 6px;
  flex-direction: column;
}

.library-group > span {
  margin: 0 5px 3px;
  color: #8b98a8;
  font-size: 9px;
  font-weight: 700;
}

.library-group button {
  display: flex;
  padding: 9px 10px;
  color: #4e6074;
  background: white;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  font-size: 10px;
  gap: 8px;
  align-items: center;
  text-align: left;
}

.library-group button:hover {
  color: var(--blue);
  border-color: #aac4e8;
}

.lib-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.lib-dot.blue { background: #3b7bd3; }
.lib-dot.green { background: #29ab76; }
.lib-dot.amber { background: #e7a623; }

.studio-canvas {
  min-width: 0;
}

.canvas-toolbar {
  display: flex;
  min-height: 57px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
}

.canvas-toolbar > div:first-child {
  display: flex;
  gap: 9px;
  align-items: baseline;
}

.canvas-toolbar strong {
  font-size: 12px;
}

.canvas-toolbar span {
  color: #7f8d9c;
  font-size: 9px;
}

.canvas-toolbar > div:last-child {
  display: flex;
  overflow: hidden;
  border: 1px solid #dde5ee;
  border-radius: 7px;
  align-items: center;
}

.canvas-toolbar button {
  width: 28px;
  height: 27px;
  color: #5b6c7f;
  background: white;
  border: 0;
}

.canvas-toolbar > div:last-child span {
  padding: 0 7px;
}

.canvas-grid {
  min-height: 623px;
  padding: 38px;
  background-color: #f7f9fc;
  background-image: radial-gradient(#cbd7e4 0.7px, transparent 0.7px);
  background-size: 18px 18px;
  overflow: auto;
}

.flow-column {
  position: relative;
  display: flex;
  min-width: 460px;
  gap: 28px;
  flex-direction: column;
  align-items: center;
}

.flow-column::before {
  position: absolute;
  top: 58px;
  bottom: 58px;
  left: 50%;
  width: 2px;
  background: #b9c9dc;
  content: "";
}

.flow-node {
  position: relative;
  z-index: 1;
  display: grid;
  width: 350px;
  min-height: 70px;
  padding: 12px 14px;
  background: white;
  border: 1px solid #dbe4ee;
  border-radius: 11px;
  box-shadow: 0 8px 20px rgba(33, 62, 96, 0.08);
  gap: 11px;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  text-align: left;
}

.flow-node:hover,
.flow-node.selected {
  border-color: #6e9fdf;
  box-shadow: 0 10px 24px rgba(30, 91, 171, 0.13);
}

.flow-node-icon {
  display: grid;
  width: 34px;
  height: 34px;
  color: #185cb6;
  background: #e9f2ff;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 900;
  place-items: center;
}

.flow-node.rule .flow-node-icon {
  color: #76510e;
  background: #fff0c7;
}

.flow-node.human .flow-node-icon {
  color: #12613f;
  background: #e2f6ec;
}

.flow-node.locked {
  border-style: dashed;
  opacity: 0.7;
}

.flow-node strong,
.flow-node span {
  display: block;
}

.flow-node strong {
  font-size: 11px;
}

.flow-node span {
  color: #7d8b9a;
  font-size: 8px;
}

.flow-node-status {
  color: #25835d;
  font-size: 9px;
  font-weight: 700;
}

.config-panel {
  padding: 18px;
  border-left: 1px solid var(--line);
}

.config-heading {
  display: flex;
  margin-bottom: 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line-soft);
  align-items: center;
  justify-content: space-between;
}

.config-heading span,
.config-heading strong {
  display: block;
}

.config-heading > div > span {
  color: #8794a4;
  font-size: 9px;
}

.config-heading strong {
  margin-top: 2px;
  font-size: 14px;
}

.config-status {
  padding: 4px 7px;
  color: #176544;
  background: #e4f6ed;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 700;
}

.config-panel label {
  display: flex;
  margin-bottom: 14px;
  color: #5e7084;
  font-size: 9px;
  font-weight: 700;
  gap: 6px;
  flex-direction: column;
}

.config-panel input,
.config-panel select,
.config-panel textarea {
  width: 100%;
  padding: 9px 10px;
  color: #263a50;
  background: white;
  border: 1px solid #dce4ed;
  border-radius: 8px;
  outline: none;
  font-size: 10px;
}

.config-panel textarea {
  height: 105px;
  resize: vertical;
}

.config-panel input:focus,
.config-panel select:focus,
.config-panel textarea:focus {
  border-color: #79a5df;
  box-shadow: 0 0 0 3px rgba(10, 91, 216, 0.07);
}

.field-note {
  margin: -3px 0 15px;
  padding: 10px;
  color: #586b80;
  background: #eff6ff;
  border-left: 3px solid #4d8cdd;
  border-radius: 5px;
}

.field-note strong {
  font-size: 9px;
}

.field-note p {
  margin: 3px 0 0;
  font-size: 8px;
}

.config-footer {
  display: flex;
  margin-top: 8px;
  padding-top: 13px;
  border-top: 1px solid var(--line-soft);
  align-items: center;
  justify-content: space-between;
}

.config-footer span {
  color: #8794a4;
  font-size: 8px;
}

.rule-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: 1.3fr 0.7fr;
}

.rule-actions {
  display: flex;
  gap: 9px;
  align-items: center;
}

.rule-actions .link-button,
.rule-actions button {
  min-width: 116px;
  white-space: nowrap;
}

.rule-asset-id {
  display: block;
  margin-top: 5px;
  color: #74869a;
  font-family: Consolas, monospace;
  font-size: 8px;
}

.rule-list-panel {
  min-height: 620px;
}

.version-tag {
  padding: 6px 9px;
  color: #63758a;
  background: #f0f4f8;
  border-radius: 7px;
  font-size: 9px;
}

.rule-list {
  padding: 0 20px 20px;
}

.semantic-rule-section {
  margin: 0 20px 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.semantic-rule-heading {
  display: flex;
  gap: 14px;
  align-items: start;
  justify-content: space-between;
}

.semantic-rule-heading h3 {
  margin: 4px 0 0;
  font-size: 14px;
}

.semantic-rule-heading > span {
  padding: 5px 7px;
  color: #8a5c00;
  background: #fff0c4;
  border-radius: 6px;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.semantic-rule-note {
  margin: 9px 0 14px;
  color: #72849a;
  font-size: 9px;
  line-height: 1.7;
}

.semantic-rule-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.semantic-rule-card {
  min-width: 0;
  padding: 13px;
  background: #f7faff;
  border: 1px solid #dce8f5;
  border-radius: 10px;
}

.semantic-rule-card > div {
  display: flex;
  margin-bottom: 8px;
  gap: 7px;
  align-items: center;
}

.semantic-rule-card strong {
  color: #183a60;
  font-size: 10px;
}

.semantic-rule-id {
  padding: 3px 5px;
  color: #0b5bb8;
  background: #e4efff;
  border-radius: 4px;
  font-family: Consolas, monospace;
  font-size: 7px;
}

.semantic-rule-card p,
.semantic-rule-card small {
  display: block;
  margin: 4px 0 0;
  color: #6f8196;
  font-size: 8px;
  line-height: 1.55;
}

.semantic-rule-card small {
  margin-top: 8px;
  padding-top: 8px;
  color: #476784;
  border-top: 1px solid #dce8f5;
}

.fanout-policy-card {
  margin-top: 12px;
  padding: 15px;
  background: linear-gradient(135deg, #f2f9ff, #f1fbf6);
  border: 1px solid #cfe3dd;
  border-radius: 11px;
}

.fanout-policy-head {
  display: flex;
  gap: 14px;
  align-items: start;
  justify-content: space-between;
}

.fanout-policy-head h3 {
  margin: 4px 0 0;
  font-size: 13px;
}

.fanout-policy-head a {
  padding: 5px 8px;
  color: #0b5bb8;
  background: white;
  border: 1px solid #cfe0f2;
  border-radius: 6px;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.fanout-policy-card > p {
  margin: 9px 0 11px;
  color: #5f7589;
  font-size: 9px;
  line-height: 1.65;
}

.fanout-policy-flow {
  display: flex;
  padding: 9px;
  background: white;
  border: 1px solid #dce9e5;
  border-radius: 8px;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.fanout-policy-flow span,
.fanout-policy-flow strong {
  padding: 5px 7px;
  color: #355773;
  background: #edf4fb;
  border-radius: 5px;
  font-size: 8px;
}

.fanout-policy-flow strong {
  color: #08704d;
  background: #e2f6ed;
}

.fanout-policy-flow i {
  color: #7b90a3;
  font-size: 9px;
  font-style: normal;
}

.fanout-policy-card > small {
  display: block;
  margin-top: 9px;
  color: #718599;
  font-family: Consolas, monospace;
  font-size: 7px;
}

.rule-item {
  display: grid;
  min-height: 102px;
  padding: 15px 0;
  border-top: 1px solid var(--line-soft);
  gap: 12px;
  grid-template-columns: 54px 1fr 90px 48px;
  align-items: center;
}

.rule-id {
  color: #55718f;
  font-family: Consolas, monospace;
  font-size: 9px;
}

.rule-copy strong,
.rule-copy span {
  display: block;
}

.rule-copy strong {
  font-size: 12px;
}

.rule-copy span {
  margin-top: 3px;
  color: #8390a0;
  font-size: 9px;
}

.severity {
  display: inline-flex;
  width: fit-content;
  padding: 5px 7px;
  border-radius: 6px;
  font-size: 8px;
  font-weight: 700;
}

.severity.error {
  color: #99383e;
  background: #ffe2e4;
}

.severity.warning {
  color: #885c06;
  background: #fff0c3;
}

.severity.info {
  color: #28658c;
  background: #e3f2fb;
}

.toggle {
  position: relative;
  width: 38px;
  height: 21px;
}

.toggle input {
  position: absolute;
  opacity: 0;
}

.toggle span {
  position: absolute;
  inset: 0;
  background: #cbd5e0;
  border-radius: 999px;
  transition: 150ms ease;
}

.toggle span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
  content: "";
  transition: 150ms ease;
}

.toggle input:checked + span {
  background: var(--blue);
}

.toggle input:checked + span::after {
  transform: translateX(17px);
}

.rule-side {
  display: flex;
  gap: 16px;
  flex-direction: column;
}

.knowledge-panel,
.separation-panel {
  padding: 20px;
}

.knowledge-panel h3,
.separation-panel h3 {
  margin-bottom: 14px;
}

.knowledge-item {
  display: grid;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  gap: 10px;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
}

.knowledge-icon {
  display: grid;
  width: 32px;
  height: 32px;
  color: #185cb6;
  background: #e9f2ff;
  border-radius: 9px;
  font-size: 9px;
  font-weight: 800;
  place-items: center;
}

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

.knowledge-item strong {
  font-size: 10px;
}

.knowledge-item div span {
  color: #8491a1;
  font-size: 8px;
}

.knowledge-item em {
  color: #25805b;
  font-size: 8px;
  font-style: normal;
}

.knowledge-item em.pending {
  color: #a57614;
}

.separation-row {
  display: grid;
  padding: 11px 0;
  border-top: 1px solid var(--line-soft);
  gap: 12px;
  grid-template-columns: 42px 1fr;
  align-items: center;
}

.separation-row span {
  display: grid;
  width: 36px;
  height: 36px;
  color: white;
  background: #1e65bc;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 800;
  place-items: center;
}

.separation-row:nth-child(4) span {
  background: #d59113;
}

.separation-row:nth-child(5) span {
  background: #16845a;
}

.separation-row p {
  margin: 0;
  color: #627489;
  font-size: 9px;
}

.governance-grid {
  display: grid;
  margin-bottom: 16px;
  gap: 16px;
  grid-template-columns: 0.8fr 1.2fr;
}

.inquiry-summary {
  display: grid;
  margin-bottom: 16px;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.inquiry-summary > div {
  display: grid;
  min-height: 118px;
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  align-content: center;
  gap: 4px;
}

.inquiry-summary span {
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 800;
}

.inquiry-summary strong {
  color: var(--blue);
  font-size: 28px;
  line-height: 1;
}

.inquiry-summary small {
  color: #8b99a8;
  font-size: 8px;
}

.inquiry-workspace {
  overflow: hidden;
}

.inquiry-admin-list {
  display: grid;
  padding: 0 20px 20px;
  gap: 12px;
}

.inquiry-admin-list.loading {
  opacity: .65;
}

.inquiry-admin-card {
  padding: 20px;
  background: #f8fafc;
  border: 1px solid #dfe7ef;
  border-radius: 11px;
}

.inquiry-admin-head {
  display: flex;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e9f0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.inquiry-ref {
  color: #71869c;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
  font-weight: 800;
}

.inquiry-admin-head h3 {
  margin: 5px 0 4px;
  font-size: 17px;
}

.inquiry-admin-head p {
  margin: 0;
  color: #687d91;
  font-size: 10px;
}

.inquiry-status-select {
  min-width: 118px;
  padding: 8px 10px;
  color: #35516d;
  background: white;
  border: 1px solid #cbd9e7;
  border-radius: 8px;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
}

.inquiry-status-select.status-new { color: #915a06; background: #fff7df; border-color: #f1d995; }
.inquiry-status-select.status-contacted { color: #155fb2; background: #eaf3ff; border-color: #bfd8f7; }
.inquiry-status-select.status-qualified { color: #087a56; background: #e7f7ef; border-color: #b9e5d2; }
.inquiry-status-select.status-closed { color: #607080; background: #eef2f5; border-color: #d8e0e7; }

.inquiry-admin-meta {
  display: grid;
  padding: 16px 0;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.inquiry-admin-meta span {
  color: #344d66;
  font-size: 10px;
  line-height: 1.55;
}

.inquiry-admin-meta b,
.inquiry-admin-message b {
  display: block;
  margin-bottom: 4px;
  color: #8192a3;
  font-size: 8px;
  font-weight: 800;
}

.inquiry-admin-message {
  padding: 13px 15px;
  background: white;
  border-radius: 8px;
}

.inquiry-admin-message p {
  margin: 0;
  color: #405870;
  font-size: 10px;
  line-height: 1.7;
}

.asset-list {
  padding: 0 20px 20px;
}

.asset-list > div {
  display: grid;
  padding: 11px 0;
  border-top: 1px solid var(--line-soft);
  gap: 9px;
  grid-template-columns: 32px 110px 1fr;
  align-items: center;
}

.asset-list > div > span {
  color: #4a7ebd;
  font-size: 9px;
  font-weight: 800;
}

.asset-list strong {
  font-size: 11px;
}

.asset-list p {
  margin: 0;
  color: #7f8d9d;
  font-size: 9px;
}

.boundary-table {
  padding: 0 20px 20px;
}

.boundary-table > div {
  display: grid;
  padding: 11px 10px;
  border-top: 1px solid var(--line-soft);
  gap: 10px;
  grid-template-columns: 145px 1fr 80px;
  align-items: center;
}

.boundary-head {
  color: #8290a1;
  background: #f7f9fc;
  border-radius: 7px 7px 0 0;
  font-size: 8px;
  font-weight: 700;
}

.boundary-table strong {
  font-size: 10px;
}

.boundary-table span {
  color: #687a8f;
  font-size: 9px;
}

.boundary-table em {
  color: #9a6b0f;
  font-size: 8px;
  font-style: normal;
}

.boundary-table em.confirmed {
  color: #197250;
}

.audit-list {
  padding: 0 20px 20px;
}

.audit-item {
  display: grid;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  gap: 10px;
  grid-template-columns: 62px 58px 110px 1fr;
  align-items: center;
}

.audit-item span {
  color: #7f8d9d;
  font-size: 8px;
}

.audit-item strong {
  font-size: 9px;
}

.audit-item p {
  margin: 0;
  color: #5d7085;
  font-size: 9px;
}

.live-label {
  display: inline-flex;
  color: #477058;
  font-size: 8px;
  gap: 6px;
  align-items: center;
}

.architecture-stack {
  padding: 0 20px 20px;
}

.arch-layer {
  display: grid;
  padding: 10px 13px;
  border: 1px solid;
  border-radius: 9px;
  grid-template-columns: 130px 1fr;
  align-items: center;
}

.arch-layer span {
  font-size: 10px;
  font-weight: 800;
}

.arch-layer div {
  font-size: 9px;
}

.model-layer {
  color: #3e5f84;
  background: #f1f6fc;
  border-color: #ceddeb;
}

.framework-layer {
  color: #164f9c;
  background: #e8f2ff;
  border-color: #a9c8ef;
}

.control-layer {
  color: #7c570e;
  background: #fff5d8;
  border-color: #efd387;
}

.system-layer {
  color: #1b6548;
  background: #eaf8f1;
  border-color: #adddc8;
}

.arch-arrow {
  padding: 3px;
  color: #8896a7;
  font-size: 8px;
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  padding: 20px;
  background: rgba(4, 16, 35, 0.65);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  position: relative;
  width: min(560px, 100%);
  padding: 31px;
  background: white;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(3, 18, 42, 0.28);
}

.modal h2 {
  margin: 0 0 10px;
  font-size: 23px;
}

.modal > p {
  margin: 0 0 18px;
  color: #627489;
  font-size: 12px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 15px;
  width: 30px;
  height: 30px;
  color: #6f8094;
  background: #f2f5f8;
  border: 0;
  border-radius: 8px;
  font-size: 18px;
}

.modal-points {
  margin-bottom: 21px;
  border-top: 1px solid var(--line-soft);
}

.modal-points > div {
  display: grid;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  gap: 12px;
  grid-template-columns: 80px 1fr;
}

.modal-points strong {
  font-size: 10px;
}

.modal-points span {
  color: #748599;
  font-size: 10px;
}

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 150;
  padding: 12px 16px;
  color: white;
  background: #102b50;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(7, 31, 67, 0.25);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 180ms ease;
}

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

@media (max-width: 1180px) {
  .sidebar {
    width: 220px;
  }

  .main-area {
    margin-left: 220px;
  }

  .studio-layout {
    grid-template-columns: 180px minmax(460px, 1fr);
  }

  .config-panel {
    display: none;
  }

  .workflow-progress {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 8px;
  }

  .metric-strip,
  .scenario-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .drawing-review-grid {
    grid-template-columns: 1fr;
  }

  .annotation-inspector {
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }
}

@media (max-width: 820px) {
  .sidebar {
    position: static;
    width: 100%;
    min-height: auto;
  }

  .main-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .sidebar-bottom {
    display: none;
  }

  .main-area {
    margin-left: 0;
  }

  .topbar {
    position: static;
    padding: 16px 20px;
  }

  .user-info,
  .demo-badge {
    display: none;
  }

  .page {
    padding: 22px 18px 50px;
  }

  .intro-row,
  .run-hero,
  .run-grid,
  .two-column,
  .rule-layout,
  .governance-grid {
    grid-template-columns: 1fr;
  }

  .intro-row {
    align-items: stretch;
    flex-direction: column;
  }

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

  .semantic-rule-list {
    grid-template-columns: 1fr;
  }

  .fanout-policy-flow {
    flex-wrap: wrap;
  }

  .inquiry-summary {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .inquiry-admin-head {
    align-items: stretch;
    flex-direction: column;
  }

  .inquiry-status-select {
    width: 100%;
  }

  .run-hero {
    display: grid;
  }

  .run-hero-action {
    margin-top: 25px;
  }

  .metric-strip,
  .scenario-grid {
    grid-template-columns: 1fr;
  }

  .studio-layout {
    display: block;
  }

  .studio-library {
    display: none;
  }

  .approval-bar,
  .approval-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .approval-actions input {
    width: 100%;
  }

  .drawing-review-title {
    align-items: stretch;
    flex-direction: column;
  }

  .drawing-page-controls {
    justify-content: space-between;
  }
}

.scenario-center-head {
  display: flex;
  margin-bottom: 15px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.scenario-center-head h2 {
  margin: 4px 0 5px;
  font-size: 24px;
}

.scenario-center-head p {
  max-width: 760px;
  margin: 0;
  color: #6d7f93;
  font-size: 11px;
}

.scenario-count-badge {
  padding: 8px 11px;
  color: #105b3d;
  background: #dcf5e9;
  border: 1px solid #b8e6d1;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.scenario-standard-controls {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.customer-standard-select-label {
  display: grid;
  min-width: 300px;
  gap: 4px;
}

.customer-standard-select-label > span,
.customer-standard-select-label > small {
  color: #6b7d91;
  font-size: 8px;
}

.customer-standard-select-label select {
  width: 100%;
  padding: 8px 10px;
  color: #173b5f;
  background: #fff;
  border: 1px solid #c5d5e3;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 700;
}

.scenario-switcher {
  display: grid;
  margin-bottom: 16px;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.live-upload-panel {
  display: grid;
  margin-bottom: 16px;
  padding: 24px 26px;
  background:
    radial-gradient(circle at 15% 0, rgba(41, 185, 214, 0.1), transparent 34%),
    linear-gradient(135deg, #f8fbff, #eef7f8);
  border: 1px solid #bdd9e3;
  border-radius: 16px;
  grid-template-columns: minmax(0, 0.86fr) minmax(420px, 1.14fr);
  gap: 30px;
  align-items: center;
  box-shadow: 0 10px 30px rgba(27, 79, 111, 0.07);
}

.electrical-upload-panel {
  background:
    radial-gradient(circle at 15% 0, rgba(27, 164, 115, 0.12), transparent 34%),
    linear-gradient(135deg, #f8fcfa, #eef8f3);
  border-color: #b9ddcb;
}

.electrical-badge {
  background: linear-gradient(135deg, #116b50, #168b68);
  box-shadow: 0 8px 18px rgba(18, 125, 92, 0.18);
}

.electrical-file-icon {
  background: linear-gradient(145deg, #15724f, #1c9a71);
}

.electrical-trust-row span {
  color: #25634e;
  border-color: #d0e7dc;
}

.electrical-requirement-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.electrical-requirement-summary article {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #d4e9df;
  border-radius: 9px;
}

.electrical-requirement-summary strong {
  color: #116b50;
  font-size: 16px;
}

.electrical-requirement-summary span {
  color: #668177;
  font-size: 8px;
}

.electrical-upload-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 166px;
  align-items: center;
}

.template-download-row {
  display: flex;
  grid-column: 1 / -1;
  gap: 9px;
  align-items: center;
}

.template-download-row .secondary-button {
  flex: 0 0 auto;
  color: #135d47;
  border-color: #b7d9cc;
}

.template-download-row span {
  color: #71877f;
  font-size: 8px;
  line-height: 1.45;
}

.electrical-scope-summary {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.electrical-scope-summary strong {
  color: #1f4f3e;
  font-size: 9px;
}

.electrical-scope-summary span {
  color: #688579;
  font-size: 8px;
  line-height: 1.5;
}

.live-upload-heading {
  display: flex;
  margin-bottom: 10px;
  gap: 12px;
  align-items: center;
}

.live-badge {
  display: inline-grid;
  min-width: 62px;
  min-height: 36px;
  padding: 0 9px;
  color: white;
  background: linear-gradient(135deg, #087b82, #0b5bd5);
  border-radius: 8px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.7px;
  place-items: center;
  box-shadow: 0 8px 18px rgba(10, 91, 216, 0.18);
}

.live-upload-heading h3 {
  margin: 2px 0 0;
  font-size: 17px;
}

.live-upload-copy > p {
  max-width: 590px;
  margin: 0;
  color: #5f748a;
  font-size: 11px;
  line-height: 1.75;
}

.upload-trust-row {
  display: flex;
  margin-top: 14px;
  gap: 7px;
  flex-wrap: wrap;
}

.upload-trust-row span {
  padding: 5px 8px;
  color: #326372;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid #d5e7eb;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 700;
}

.live-upload-action {
  display: grid;
  gap: 10px;
}

.electrical-draft-editor {
  display: grid;
  min-width: 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #c7e2d6;
  border-radius: 13px;
  grid-column: 1 / -1;
  gap: 14px;
}

.electrical-draft-editor[hidden] {
  display: none;
}

.electrical-draft-heading,
.electrical-draft-footer {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.electrical-draft-heading h4 {
  margin: 3px 0 4px;
  color: #173e32;
  font-size: 15px;
}

.electrical-draft-heading p {
  max-width: 760px;
  margin: 0;
  color: #6a8078;
  font-size: 9px;
  line-height: 1.55;
}

.electrical-draft-summary {
  display: grid;
  min-width: 110px;
  text-align: right;
  gap: 3px;
}

.electrical-draft-summary strong {
  color: #116b50;
  font-size: 16px;
}

.electrical-draft-summary span,
.electrical-draft-footer > span {
  color: #72867f;
  font-size: 9px;
}

.electrical-system-editor {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.secondary-project-editor {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.secondary-draft-table th,
.secondary-draft-table td {
  min-width: 138px;
}

.secondary-draft-table th:first-child,
.secondary-draft-table td:first-child {
  min-width: 54px;
}

.project-intake-panel {
  display: grid;
  margin-bottom: 16px;
  padding: 22px 26px;
  background:
    radial-gradient(circle at 10% 0, rgba(11, 91, 213, 0.1), transparent 38%),
    linear-gradient(135deg, #f8fbff, #f3f6ff);
  border: 1px solid #c7d5ed;
  border-radius: 16px;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
  gap: 18px 28px;
  align-items: center;
  box-shadow: 0 10px 30px rgba(24, 67, 133, 0.07);
}

.project-intake-copy {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}

.project-intake-badge {
  flex: 0 0 auto;
  background: linear-gradient(135deg, #163d7d, #0b5bd5);
}

.project-intake-copy h3 {
  margin: 3px 0 7px;
  color: #17375f;
  font-size: 17px;
}

.project-intake-copy p {
  max-width: 650px;
  margin: 0;
  color: #61758f;
  font-size: 10px;
  line-height: 1.65;
}

.project-intake-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}

.project-intake-flow article {
  display: grid;
  min-height: 58px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #d4def0;
  border-radius: 10px;
  gap: 4px;
}

.project-intake-flow strong {
  color: #0b5bd5;
  font-size: 12px;
}

.project-intake-flow span,
.project-intake-flow i {
  color: #6f819a;
  font-size: 8px;
  font-style: normal;
  line-height: 1.45;
}

.project-intake-action {
  display: flex;
  grid-column: 1 / -1;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.project-intake-action .upload-status {
  flex: 1;
}

.project-intake-action .primary-button {
  min-width: 190px;
}

.project-intake-result {
  display: grid;
  padding: 15px;
  background: #fff;
  border: 1px solid #b9ddcb;
  border-radius: 12px;
  grid-column: 1 / -1;
  grid-template-columns: minmax(230px, 1.5fr) repeat(4, minmax(100px, 0.65fr)) auto;
  gap: 10px;
  align-items: stretch;
}

.project-intake-result[hidden] {
  display: none;
}

.project-intake-result > div:first-child,
.project-intake-result article {
  display: grid;
  padding: 9px 11px;
  background: #f7fbf9;
  border: 1px solid #d8e9e1;
  border-radius: 9px;
  gap: 3px;
  align-content: center;
}

.project-intake-result > div:first-child strong {
  color: #173e32;
  font-size: 11px;
}

.project-intake-result small,
.project-intake-result article span {
  color: #72867f;
  font-size: 8px;
}

.project-intake-result article strong {
  color: #116b50;
  font-size: 14px;
}

.project-intake-result-actions {
  display: grid;
  gap: 7px;
  align-content: center;
}

.project-batch-panel {
  display: grid;
  margin-bottom: 16px;
  padding: 22px 26px;
  color: #e7f3ff;
  background:
    radial-gradient(circle at 85% 10%, rgba(78, 219, 210, 0.16), transparent 34%),
    linear-gradient(135deg, #102b55, #0f4170 58%, #0b5c76);
  border: 1px solid rgba(163, 212, 233, 0.32);
  border-radius: 16px;
  gap: 17px;
  box-shadow: 0 14px 34px rgba(11, 43, 82, 0.16);
}

.project-batch-heading {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}

.project-batch-badge {
  flex: 0 0 auto;
  background: linear-gradient(135deg, #23a7b3, #31c98c);
}

.project-batch-heading .eyebrow,
.project-batch-result .eyebrow {
  color: #70ddca;
}

.project-batch-heading h3 {
  margin: 3px 0 7px;
  color: #fff;
  font-size: 17px;
}

.project-batch-heading p {
  max-width: 900px;
  margin: 0;
  color: #bad0e2;
  font-size: 10px;
  line-height: 1.65;
}

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

.project-batch-file {
  display: grid;
  min-height: 68px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(184, 218, 235, 0.28);
  border-radius: 12px;
  grid-template-columns: auto 1fr auto;
  gap: 11px;
  align-items: center;
  cursor: pointer;
  transition: 160ms ease;
}

.project-batch-file:hover,
.project-batch-file.has-file {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(112, 221, 202, 0.7);
  transform: translateY(-1px);
}

.project-batch-file input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.project-batch-file > span {
  display: grid;
  width: 34px;
  height: 34px;
  color: #0b3f51;
  background: #70ddca;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 950;
  place-items: center;
}

.project-batch-file > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.project-batch-file strong {
  color: #fff;
  font-size: 11px;
}

.project-batch-file small {
  overflow: hidden;
  color: #b9cfe0;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-batch-file > i {
  padding: 7px 10px;
  color: #dffbf4;
  border: 1px solid rgba(112, 221, 202, 0.45);
  border-radius: 8px;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
}

.project-batch-preflight {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.project-batch-preflight .upload-status {
  flex: 1;
  color: #c6d8e7;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(187, 214, 232, 0.24);
}

.project-batch-preflight .upload-status.success {
  color: #d8fff1;
  background: rgba(29, 163, 112, 0.17);
  border-color: rgba(112, 221, 202, 0.38);
}

.project-batch-preflight .upload-status.error {
  color: #ffe1df;
  background: rgba(210, 77, 74, 0.16);
  border-color: rgba(255, 157, 151, 0.38);
}

.project-batch-preflight .primary-button {
  min-width: 210px;
  background: linear-gradient(135deg, #27bba8, #1d9b83);
  box-shadow: 0 8px 20px rgba(21, 169, 142, 0.22);
}

.project-batch-pairs,
.project-batch-result-list {
  display: grid;
  gap: 8px;
}

.project-batch-empty,
.project-batch-pair,
.project-batch-issue,
.project-batch-result-row {
  display: grid;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(188, 215, 231, 0.2);
  border-radius: 10px;
  gap: 8px;
  align-items: center;
}

.project-batch-empty {
  color: #a9c0d3;
  font-size: 9px;
}

.project-batch-pair,
.project-batch-result-row {
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) auto;
}

.project-batch-pair strong,
.project-batch-result-row strong {
  color: #fff;
  font-size: 10px;
}

.project-batch-pair span,
.project-batch-result-row span,
.project-batch-pair small,
.project-batch-result-row small {
  overflow: hidden;
  color: #b8cde0;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-batch-pair em {
  padding: 5px 8px;
  color: #bdf6e6;
  background: rgba(42, 190, 152, 0.14);
  border-radius: 999px;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
}

.project-batch-issue {
  color: #ffd8d5;
  background: rgba(210, 77, 74, 0.14);
  border-color: rgba(255, 157, 151, 0.3);
  font-size: 9px;
}

.project-batch-result {
  display: grid;
  padding: 13px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(112, 221, 202, 0.4);
  border-radius: 12px;
  gap: 10px;
}

.project-batch-result[hidden] {
  display: none;
}

.project-batch-result-summary {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(4, minmax(90px, 0.55fr));
  gap: 8px;
}

.project-batch-result-summary > div,
.project-batch-result-summary article {
  display: grid;
  min-height: 58px;
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  gap: 3px;
  align-content: center;
}

.project-batch-result-summary strong {
  color: #fff;
  font-size: 13px;
}

.project-batch-result-summary small,
.project-batch-result-summary span {
  color: #b9cedf;
  font-size: 8px;
}

.project-batch-result-row .project-batch-open-actions {
  display: flex;
  gap: 6px;
}

.project-batch-result-row .secondary-button {
  color: #dffbf4;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(112, 221, 202, 0.4);
}

.electrical-system-editor label {
  display: grid;
  color: #5f756d;
  font-size: 8px;
  font-weight: 800;
  gap: 4px;
}

.electrical-system-editor input,
.electrical-system-editor select,
.electrical-draft-table input {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  color: #213c33;
  background: #fff;
  border: 1px solid #cddfd7;
  border-radius: 7px;
  font: inherit;
  outline: none;
}

.electrical-system-editor input:focus,
.electrical-system-editor select:focus,
.electrical-draft-table input:focus {
  border-color: #168b68;
  box-shadow: 0 0 0 2px rgba(22, 139, 104, 0.12);
}

.electrical-draft-table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid #d4e4dd;
  border-radius: 9px;
}

.electrical-draft-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.electrical-draft-table th,
.electrical-draft-table td {
  min-width: 112px;
  padding: 6px;
  border-right: 1px solid #e0ebe6;
  border-bottom: 1px solid #e0ebe6;
  font-size: 8px;
  text-align: left;
  vertical-align: middle;
}

.electrical-draft-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #375f51;
  background: #edf7f2;
  font-weight: 900;
  white-space: nowrap;
}

.electrical-draft-table th:first-child,
.electrical-draft-table td:first-child {
  min-width: 54px;
  text-align: center;
}

.electrical-draft-table input.changed,
.electrical-system-editor .changed {
  background: #fff8df;
  border-color: #e2b948;
}

.electrical-draft-footer > div {
  display: flex;
  gap: 7px;
}

.secondary-link-editor {
  display: grid;
  padding: 15px;
  background: linear-gradient(145deg, #f5faff, #f7fcf9);
  border: 1px solid #c9dfe4;
  border-radius: 12px;
  gap: 13px;
}

.secondary-link-heading,
.secondary-link-groups > header,
.secondary-link-board section > header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.secondary-link-heading h5 {
  margin: 3px 0 4px;
  color: #173f4a;
  font-size: 13px;
}

.secondary-link-heading p {
  max-width: 760px;
  margin: 0;
  color: #687f86;
  font-size: 8px;
  line-height: 1.55;
}

.secondary-link-rule {
  padding: 6px 9px;
  color: #0c6c73;
  background: #e5f7f4;
  border: 1px solid #bce5dc;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.secondary-link-board {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px minmax(220px, 1fr);
  gap: 12px;
  align-items: stretch;
}

.secondary-link-board section {
  min-width: 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #d5e5e8;
  border-radius: 10px;
}

.secondary-link-board section > header,
.secondary-link-groups > header {
  margin-bottom: 8px;
  color: #315863;
  font-size: 9px;
}

.secondary-link-board header small,
.secondary-link-groups header small {
  color: #7d9096;
  font-size: 8px;
}

.secondary-link-list {
  display: grid;
  max-height: 240px;
  overflow: auto;
  gap: 6px;
}

.secondary-link-card {
  display: grid;
  width: 100%;
  padding: 8px;
  cursor: pointer;
  color: #28454e;
  background: #fff;
  border: 1px solid #d6e3e6;
  border-radius: 8px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  text-align: left;
  transition: 140ms ease;
}

.secondary-link-card:hover {
  border-color: #78afb7;
  transform: translateY(-1px);
}

.secondary-link-card.source {
  border-left: 3px solid #357ed0;
}

.secondary-link-card.target {
  border-left: 3px solid #27a477;
}

.secondary-link-card.selected,
.secondary-link-card.drag-over {
  background: #ecf8f4;
  border-color: #1f9b75;
  box-shadow: 0 0 0 2px rgba(31, 155, 117, 0.13);
}

.secondary-link-card.incompatible {
  cursor: not-allowed;
  opacity: 0.42;
}

.secondary-link-type {
  display: grid;
  width: 27px;
  height: 27px;
  color: #12667a;
  background: #e6f4f7;
  border-radius: 7px;
  font-size: 8px;
  font-weight: 900;
  place-items: center;
}

.secondary-link-card strong,
.secondary-link-card small,
.secondary-link-card em {
  display: block;
}

.secondary-link-card strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.secondary-link-card small {
  margin-top: 2px;
  overflow: hidden;
  color: #72868d;
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.secondary-link-card em {
  max-width: 95px;
  overflow: hidden;
  color: #71858b;
  font-size: 7px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.secondary-link-controls {
  display: flex;
  padding: 10px;
  background: #eef6fa;
  border: 1px solid #d3e2ea;
  border-radius: 10px;
  flex-direction: column;
  gap: 7px;
  justify-content: center;
  text-align: center;
}

.secondary-link-arrow {
  color: #168b68;
  font-size: 22px;
  font-weight: 900;
}

.secondary-link-controls label {
  display: grid;
  color: #5f757d;
  font-size: 8px;
  font-weight: 800;
  gap: 4px;
  text-align: left;
}

.secondary-link-controls input {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  color: #213c45;
  background: #fff;
  border: 1px solid #c4d8df;
  border-radius: 7px;
  font: inherit;
  outline: none;
}

.secondary-link-controls input:focus {
  border-color: #168b68;
  box-shadow: 0 0 0 2px rgba(22, 139, 104, 0.12);
}

.secondary-link-controls > small {
  color: #6f848b;
  font-size: 7px;
  line-height: 1.4;
}

.secondary-link-controls button {
  width: 100%;
}

.secondary-link-groups > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.secondary-link-group {
  display: grid;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #d5e4e5;
  border-left: 3px solid #27a477;
  border-radius: 8px;
  gap: 4px;
}

.secondary-link-group.warning {
  background: #fff8ec;
  border-left-color: #d6962f;
}

.secondary-link-group > span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.secondary-link-group strong {
  color: #28525b;
  font-size: 8px;
}

.secondary-link-group small {
  color: #668087;
  font-size: 7px;
}

.secondary-link-group p,
.secondary-link-empty {
  margin: 0;
  color: #6c8188;
  font-size: 7px;
  line-height: 1.45;
}

.secondary-link-group b {
  color: #168b68;
}

.drawing-dropzone {
  display: flex;
  min-height: 68px;
  padding: 12px 14px;
  cursor: pointer;
  background: white;
  border: 1.5px dashed #9ec6d2;
  border-radius: 12px;
  gap: 11px;
  align-items: center;
  transition: 160ms ease;
}

.drawing-dropzone:hover,
.drawing-dropzone.dragging {
  background: #f5fcfd;
  border-color: #0a7d91;
  transform: translateY(-1px);
}

.drawing-dropzone.has-file {
  background: #f3fbf8;
  border-style: solid;
  border-color: #77bda5;
}

.drawing-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.dropzone-icon {
  display: grid;
  width: 38px;
  height: 44px;
  color: white;
  background: linear-gradient(145deg, #0b5bd5, #0696a7);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  place-items: center;
  flex: 0 0 auto;
}

.dropzone-copy {
  min-width: 0;
  flex: 1;
}

.dropzone-copy strong,
.dropzone-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropzone-copy strong {
  color: #193653;
  font-size: 11px;
}

.dropzone-copy small {
  margin-top: 4px;
  color: #7b8ea2;
  font-size: 8px;
}

.drawing-dropzone > i {
  padding: 6px 9px;
  color: #0b5bd5;
  background: #edf4ff;
  border-radius: 7px;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.upload-controls {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 150px;
  align-items: end;
}

.upload-controls label {
  color: #61768c;
  font-size: 8px;
  font-weight: 700;
}

.upload-controls select {
  width: 100%;
  margin-top: 4px;
  padding: 9px 10px;
  color: #26445f;
  background: white;
  border: 1px solid #cddbe6;
  border-radius: 8px;
  font-size: 9px;
}

.live-analyze-button {
  min-height: 36px;
}

.upload-status {
  display: flex;
  min-height: 16px;
  color: #77899c;
  gap: 7px;
  align-items: center;
}

.upload-status span {
  width: 7px;
  height: 7px;
  background: #aab8c6;
  border-radius: 50%;
}

.upload-status p {
  margin: 0;
  font-size: 8px;
}

.upload-status.running span {
  background: #0b5bd5;
  box-shadow: 0 0 0 4px rgba(11, 91, 213, 0.12);
  animation: pulse 1.2s infinite;
}

.upload-status.success {
  color: #176847;
}

.upload-status.success span {
  background: #26a473;
}

.upload-status.error {
  color: #a43d35;
}

.upload-status.error span {
  background: #d45a52;
}

@keyframes pulse {
  50% { opacity: 0.35; }
}

.scenario-switch {
  position: relative;
  display: grid;
  min-height: 88px;
  padding: 13px 13px 12px;
  color: #35506d;
  background: #fff;
  border: 1px solid #d6e0ea;
  border-radius: 13px;
  text-align: left;
  grid-template-columns: 38px 1fr 16px;
  gap: 9px;
  align-items: center;
  box-shadow: 0 7px 22px rgba(29, 58, 91, 0.05);
}

.scenario-switch:hover {
  border-color: #9bbce6;
  transform: translateY(-1px);
}

.scenario-switch.active {
  color: #fff;
  background: linear-gradient(135deg, #0c336b, #0b65c9);
  border-color: #0b5bd5;
  box-shadow: 0 12px 28px rgba(11, 91, 213, 0.2);
}

.scenario-switch-no {
  position: absolute;
  top: 8px;
  right: 9px;
  color: #a2afbd;
  font-size: 8px;
  font-weight: 800;
}

.scenario-switch.active .scenario-switch-no {
  color: #98c6ff;
}

.scenario-switch-icon {
  display: grid;
  width: 38px;
  height: 38px;
  color: #0b5bd5;
  background: #eaf2ff;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 900;
  place-items: center;
}

.scenario-switch.active .scenario-switch-icon {
  color: #0d4d91;
  background: #fff;
}

.scenario-switch strong,
.scenario-switch small {
  display: block;
}

.scenario-switch strong {
  margin-bottom: 4px;
  font-size: 11px;
}

.scenario-switch small {
  color: #8090a2;
  font-size: 8px;
}

.scenario-switch.active small {
  color: #b9d8fb;
}

.scenario-switch > i {
  color: #9aabba;
  font-size: 13px;
  font-style: normal;
}

.scenario-switch.active > i {
  color: #fff;
}

.scenario-result-svg {
  height: 470px;
}

@media (max-width: 1180px) {
  .scenario-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-upload-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .scenario-center-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .scenario-standard-controls {
    width: 100%;
    justify-items: stretch;
  }

  .customer-standard-select-label {
    min-width: 0;
  }

  .scenario-switcher {
    grid-template-columns: 1fr;
  }

  .live-upload-panel {
    padding: 19px;
    gap: 18px;
  }

  .upload-controls {
    grid-template-columns: 1fr;
  }

  .electrical-upload-actions {
    grid-template-columns: 1fr;
  }

  .project-intake-panel {
    grid-template-columns: 1fr;
    padding: 19px;
  }

  .project-intake-flow {
    grid-template-columns: 1fr;
  }

  .project-intake-flow > i {
    display: none;
  }

  .project-intake-action {
    align-items: stretch;
    flex-direction: column;
  }

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

  .project-intake-result > div:first-child,
  .project-intake-result-actions {
    grid-column: 1 / -1;
  }

  .project-batch-panel {
    padding: 19px;
  }

  .project-batch-files,
  .project-batch-result-summary {
    grid-template-columns: 1fr;
  }

  .project-batch-preflight {
    align-items: stretch;
    flex-direction: column;
  }

  .project-batch-pair,
  .project-batch-result-row {
    grid-template-columns: 1fr;
  }

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

  .electrical-draft-heading,
  .electrical-draft-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .electrical-draft-summary {
    text-align: left;
  }

  .secondary-link-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .secondary-link-board {
    grid-template-columns: 1fr;
  }

  .secondary-link-arrow {
    transform: rotate(90deg);
  }

  .secondary-link-groups > div {
    grid-template-columns: 1fr;
  }

  .template-download-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .live-analyze-button {
    width: 100%;
  }

  .source-chip {
    min-width: 0;
    width: 100%;
  }
}

/* Engineering task workbench */
.workbench-intro {
  align-items: flex-end;
}

.workbench-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.portfolio-kpis {
  display: grid;
  margin: 24px 0;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 15px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.portfolio-kpis article {
  min-width: 0;
  padding: 20px 18px;
  border-right: 1px solid var(--line-soft);
}

.portfolio-kpis article:last-child {
  border-right: 0;
}

.portfolio-kpis span,
.portfolio-kpis strong,
.portfolio-kpis small {
  display: block;
}

.portfolio-kpis span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.portfolio-kpis strong {
  margin: 8px 0 5px;
  color: var(--blue-deep);
  font-size: 27px;
  line-height: 1;
}

.portfolio-kpis small {
  color: #8290a1;
  font-size: 8px;
  line-height: 1.45;
}

.portfolio-kpis .attention {
  background: #fffaf0;
}

.portfolio-kpis .attention strong {
  color: #a96a00;
}

.portfolio-kpis .success {
  background: #f2fbf7;
}

.portfolio-kpis .success strong {
  color: #08784d;
}

.portfolio-grid {
  display: grid;
  align-items: start;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.portfolio-register-panel,
.portfolio-insight-panel {
  min-width: 0;
}

.portfolio-title {
  align-items: center;
}

.portfolio-title .live-label b {
  color: inherit;
}

.portfolio-toolbar {
  display: grid;
  gap: 10px;
  padding: 0 20px 16px;
  grid-template-columns: minmax(210px, 1.7fr) minmax(130px, 0.8fr) minmax(130px, 0.8fr);
}

.portfolio-toolbar label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
}

.portfolio-toolbar input,
.portfolio-toolbar select {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  color: var(--ink);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 10px;
  outline: none;
}

.portfolio-toolbar input:focus,
.portfolio-toolbar select:focus {
  border-color: #86b6ef;
  box-shadow: 0 0 0 3px rgba(10, 91, 216, 0.08);
}

.portfolio-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.portfolio-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.portfolio-table th {
  padding: 10px 13px;
  color: #718196;
  background: #f4f7fb;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line);
  font-size: 8px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.portfolio-table th:nth-child(1) { width: 20%; }
.portfolio-table th:nth-child(2) { width: 25%; }
.portfolio-table th:nth-child(3) { width: 12%; }
.portfolio-table th:nth-child(4) { width: 18%; }
.portfolio-table th:nth-child(5) { width: 13%; }
.portfolio-table th:nth-child(6) { width: 12%; }

.portfolio-table td {
  padding: 14px 13px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.portfolio-table tr:last-child td {
  border-bottom: 0;
}

.portfolio-table tbody tr:hover {
  background: #fbfdff;
}

.portfolio-table td strong,
.portfolio-table td small,
.run-source strong,
.run-source small {
  display: block;
}

.portfolio-table td strong {
  font-size: 9px;
}

.portfolio-table td small {
  margin-top: 4px;
  color: #7c8b9d;
  font-size: 8px;
  line-height: 1.4;
}

.run-id {
  max-width: 100%;
  color: #153f73;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-source {
  min-width: 0;
}

.run-source strong,
.run-source small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mode-chip,
.run-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 900;
}

.mode-chip {
  margin-bottom: 6px;
  padding: 3px 7px;
}

.mode-chip.live {
  color: #075e6c;
  background: #e6f9fa;
}

.mode-chip.demo {
  color: #4c5f77;
  background: #edf2f7;
}

.mode-chip.paired {
  color: #165f46;
  background: #e5f7ee;
}

.quality-value {
  color: var(--blue-deep);
  font-size: 15px !important;
}

.run-status {
  padding: 5px 8px;
}

.run-status.pending {
  color: #966000;
  background: #fff3d8;
}

.run-status.approved {
  color: #08784d;
  background: #e2f7ec;
}

.run-status.returned {
  color: #a5333c;
  background: #fdebed;
}

.run-action {
  text-align: right;
}

.run-action .secondary-button {
  min-width: 72px;
  padding: 7px 9px;
  font-size: 8px;
}

.portfolio-empty {
  padding: 24px;
  color: #75869b;
  font-size: 10px;
  text-align: center;
}

.portfolio-empty.compact {
  padding: 12px 0;
  text-align: left;
}

.portfolio-empty.error {
  color: var(--red);
}

.portfolio-insight-panel {
  padding-bottom: 18px;
}

.portfolio-proof {
  display: grid;
  gap: 18px;
  padding: 0 20px 18px;
}

.proof-meter > div:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.proof-meter strong,
.proof-meter span {
  display: block;
}

.proof-meter strong {
  font-size: 9px;
}

.proof-meter span {
  color: #718196;
  font-size: 8px;
  text-align: right;
}

.proof-track {
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
  background: #e9eff6;
  border-radius: 999px;
}

.proof-track i {
  display: block;
  height: 100%;
  min-width: 3px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  border-radius: inherit;
}

.portfolio-next-action {
  padding: 13px;
  color: #d9e9fb;
  background: #102b50;
  border-radius: 9px;
}

.portfolio-next-action span,
.portfolio-next-action strong {
  display: block;
}

.portfolio-next-action span {
  margin-bottom: 5px;
  color: #7fe1e5;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.portfolio-next-action strong {
  font-size: 9px;
  line-height: 1.6;
}

.pilot-boundary-note {
  margin: 0 20px;
  padding: 13px;
  color: #52647a;
  background: #f4f7fb;
  border-left: 3px solid var(--blue);
  border-radius: 0 8px 8px 0;
}

.pilot-boundary-note strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 9px;
}

.pilot-boundary-note p {
  margin: 0;
  font-size: 8px;
  line-height: 1.6;
}

@media (max-width: 1180px) {
  .portfolio-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .portfolio-kpis article:nth-child(3) {
    border-right: 0;
  }

  .portfolio-kpis article:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line-soft);
  }

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

  .portfolio-proof {
    grid-template-columns: repeat(3, 1fr);
  }

  .portfolio-next-action {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .workbench-intro {
    align-items: stretch;
    flex-direction: column;
  }

  .workbench-actions {
    flex-direction: column;
  }

  .workbench-actions,
  .workbench-actions button {
    width: 100%;
  }

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

  .portfolio-kpis article,
  .portfolio-kpis article:nth-child(3) {
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
  }

  .portfolio-kpis article:nth-child(even) {
    border-right: 0;
  }

  .portfolio-kpis article:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .portfolio-toolbar,
  .portfolio-proof {
    grid-template-columns: 1fr;
  }

  .portfolio-table thead {
    display: none;
  }

  .portfolio-table,
  .portfolio-table tbody,
  .portfolio-table tr,
  .portfolio-table td {
    display: block;
    width: 100%;
  }

  .portfolio-table tr {
    padding: 12px 16px;
    border-top: 1px solid var(--line-soft);
  }

  .portfolio-table td {
    display: grid;
    padding: 7px 0;
    border: 0;
    grid-template-columns: 94px minmax(0, 1fr);
  }

  .portfolio-table td::before {
    color: #7c8b9d;
    content: attr(data-label);
    font-size: 8px;
    font-weight: 900;
  }

  .portfolio-table td.run-action {
    display: block;
    padding-top: 12px;
  }

  .run-action .secondary-button {
    width: 100%;
  }

  .portfolio-proof {
    gap: 14px;
  }

  .portfolio-next-action {
    grid-column: auto;
  }
}

/* Standard-answer evaluation center */
.evaluation-intro {
  align-items: flex-end;
}

.evaluation-principles {
  display: grid;
  margin: 24px 0;
  color: white;
  background: linear-gradient(135deg, #0b2447, #0a3565);
  border-radius: 15px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  box-shadow: 0 18px 44px rgba(6, 29, 61, 0.18);
  overflow: hidden;
}

.evaluation-principles article {
  padding: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.evaluation-principles article:last-child {
  border-right: 0;
}

.evaluation-principles span,
.evaluation-principles strong,
.evaluation-principles p {
  display: block;
  margin: 0;
}

.evaluation-principles span {
  color: #6fe1e7;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.evaluation-principles strong {
  margin: 7px 0 5px;
  font-size: 14px;
}

.evaluation-principles p {
  color: #a9bfd7;
  font-size: 8px;
}

.evaluation-grid {
  display: grid;
  align-items: start;
  gap: 18px;
  grid-template-columns: 390px minmax(0, 1fr);
}

.evaluation-stage,
.evaluation-badge {
  padding: 5px 8px;
  color: #4d6580;
  background: #eef3f8;
  border-radius: 999px;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.evaluation-form {
  display: grid;
  gap: 0;
  padding: 0 20px 20px;
}

.evaluation-step {
  display: grid;
  padding: 17px 0;
  border-top: 1px solid var(--line-soft);
  gap: 12px;
  grid-template-columns: 28px minmax(0, 1fr);
}

.evaluation-step:first-child {
  padding-top: 4px;
  border-top: 0;
}

.evaluation-step > b {
  display: grid;
  width: 28px;
  height: 28px;
  color: #0b4a91;
  background: #e8f3ff;
  border-radius: 8px;
  font-size: 10px;
  place-items: center;
}

.evaluation-step label,
.evaluation-step small {
  display: block;
}

.evaluation-step label:not(.answer-upload) {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 9px;
  font-weight: 900;
}

.evaluation-step select,
.evaluation-step input {
  width: 100%;
  height: 39px;
  padding: 0 10px;
  color: var(--ink);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 9px;
  outline: 0;
}

.evaluation-step select:focus,
.evaluation-step input:focus {
  border-color: #86b6ef;
  box-shadow: 0 0 0 3px rgba(10, 91, 216, 0.08);
}

.evaluation-step small {
  margin-top: 7px;
  color: #7c8b9d;
  font-size: 8px;
  line-height: 1.55;
}

.evaluation-form .full {
  justify-content: center;
  width: 100%;
}

.answer-upload {
  display: block;
  margin-top: 9px;
  padding: 12px;
  color: #0b4a91;
  background: #f5f9fd;
  border: 1px dashed #9bb8d8;
  border-radius: 9px;
  cursor: pointer;
  text-align: center;
}

.answer-upload:hover {
  background: #edf6ff;
  border-color: #4e91dc;
}

.answer-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.answer-upload > span {
  display: block;
  font-size: 9px;
  font-weight: 900;
}

.answer-upload small {
  margin-top: 4px;
}

#answer-set-file-status.ready {
  color: #08784d;
}

#answer-set-file-status.error {
  color: var(--red);
}

.answer-meta-inputs {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 70px;
}

.evaluation-result-panel {
  min-width: 0;
}

.evaluation-result-title {
  align-items: center;
}

.evaluation-badge {
  color: #966000;
  background: #fff3d8;
}

.evaluation-empty {
  display: grid;
  min-height: 430px;
  padding: 40px;
  color: #718196;
  text-align: center;
  place-content: center;
}

.evaluation-empty > span {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  color: #0b4a91;
  background: #e8f3ff;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 900;
  place-items: center;
}

.evaluation-empty strong {
  color: var(--ink);
  font-size: 14px;
}

.evaluation-empty p {
  max-width: 390px;
  margin: 7px auto 0;
  font-size: 9px;
}

.evaluation-metrics {
  display: grid;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.evaluation-metrics article {
  padding: 16px 12px;
  border-right: 1px solid var(--line-soft);
}

.evaluation-metrics article:last-child {
  border-right: 0;
}

.evaluation-metrics span,
.evaluation-metrics strong {
  display: block;
}

.evaluation-metrics span {
  color: #718196;
  font-size: 8px;
}

.evaluation-metrics strong {
  margin-top: 6px;
  color: var(--blue-deep);
  font-size: 21px;
}

.evaluation-counts {
  display: flex;
  padding: 12px 16px;
  background: #f8fafc;
  gap: 14px;
  flex-wrap: wrap;
}

.evaluation-counts span {
  color: #617287;
  font-size: 8px;
}

.evaluation-counts strong {
  color: var(--ink);
  font-size: 9px;
}

.comparison-table-wrap {
  max-height: 330px;
  overflow: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.comparison-table th,
.comparison-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 8px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}

.comparison-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #718196;
  background: #f2f6fa;
  font-weight: 900;
}

.comparison-table td strong,
.comparison-table td small {
  display: block;
}

.comparison-table td small {
  margin-top: 3px;
  color: #8090a2;
}

.comparison-status {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  font-weight: 900;
}

.comparison-status.exact {
  color: #08784d;
  background: #e2f7ec;
}

.comparison-status.mismatch {
  color: #a5333c;
  background: #fdebed;
}

.comparison-status.missing {
  color: #966000;
  background: #fff3d8;
}

.evaluation-notice {
  margin: 0;
  padding: 12px 16px;
  color: #66778b;
  background: #fffdf5;
  border-top: 1px solid #f0e4bb;
  font-size: 8px;
}

.evaluation-history-panel {
  margin-top: 18px;
}

.evaluation-history {
  display: grid;
}

.evaluation-history-item {
  display: grid;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--line-soft);
  gap: 16px;
  grid-template-columns: minmax(250px, 1fr) auto auto;
}

.evaluation-history-item > div:first-child span,
.evaluation-history-item > div:first-child strong,
.evaluation-history-item > div:first-child small {
  display: block;
}

.evaluation-history-item > div:first-child span {
  color: #0a6e91;
  font-size: 8px;
  font-weight: 900;
}

.evaluation-history-item > div:first-child strong {
  margin: 3px 0;
  font-size: 10px;
}

.evaluation-history-item > div:first-child small {
  max-width: 550px;
  color: #7c8b9d;
  font-size: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evaluation-history-metrics {
  display: flex;
  gap: 8px;
}

.evaluation-history-metrics span {
  padding: 7px 9px;
  color: #64758a;
  background: #f2f6fa;
  border-radius: 7px;
  font-size: 8px;
}

.evaluation-history-metrics b {
  color: #0b4a91;
}

.evaluation-boundary {
  display: grid;
  margin-top: 18px;
  padding: 15px 18px;
  color: #52647a;
  background: #eef3f8;
  border-left: 4px solid var(--blue);
  border-radius: 0 10px 10px 0;
  gap: 5px;
  grid-template-columns: 90px minmax(0, 1fr);
}

.evaluation-boundary strong {
  color: var(--ink);
  font-size: 9px;
}

.evaluation-boundary p {
  margin: 0;
  font-size: 8px;
}

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

  .evaluation-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .evaluation-step,
  .evaluation-step:first-child {
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
  }
}

@media (max-width: 820px) {
  .evaluation-intro {
    align-items: stretch;
    flex-direction: column;
  }

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

  .evaluation-principles article:nth-child(2) {
    border-right: 0;
  }

  .evaluation-principles article:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

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

  .evaluation-metrics article {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .evaluation-history-item {
    grid-template-columns: 1fr;
  }

  .evaluation-history-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .evaluation-history-item button {
    width: 100%;
  }

  .evaluation-boundary {
    grid-template-columns: 1fr;
  }

  .comparison-table {
    min-width: 650px;
  }
}

/* Approved answer sets and model/version comparison */
#save-answer-set {
  margin-top: 9px;
}

.comparison-intro {
  align-items: flex-end;
}

.comparison-guardrails {
  display: grid;
  margin: 24px 0;
  color: white;
  background: linear-gradient(135deg, #082a50, #0b5b72);
  border-radius: 15px;
  box-shadow: 0 18px 44px rgba(6, 29, 61, 0.18);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
}

.comparison-guardrails article {
  padding: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.13);
}

.comparison-guardrails article:last-child {
  border-right: 0;
}

.comparison-guardrails span,
.comparison-guardrails strong,
.comparison-guardrails p {
  display: block;
  margin: 0;
}

.comparison-guardrails span {
  color: #6fe1e7;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.comparison-guardrails strong {
  margin: 7px 0 5px;
  font-size: 14px;
}

.comparison-guardrails p {
  color: #b8ccdf;
  font-size: 8px;
}

.comparison-layout {
  display: grid;
  align-items: start;
  gap: 18px;
  grid-template-columns: 330px minmax(0, 1fr);
}

.comparison-main {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.answer-set-registry {
  display: grid;
  max-height: 650px;
  overflow: auto;
}

.answer-set-card {
  padding: 15px 18px;
  border-top: 1px solid var(--line-soft);
}

.answer-set-card:first-child {
  border-top: 0;
}

.answer-set-card-head,
.answer-set-card-actions,
.answer-set-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.answer-set-card-head {
  justify-content: space-between;
}

.answer-set-card-head strong,
.answer-set-card > small,
.answer-set-card-meta {
  display: block;
}

.answer-set-card-head strong {
  min-width: 0;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.answer-set-card > small {
  margin-top: 5px;
  color: #78899d;
  font-size: 8px;
  line-height: 1.5;
}

.answer-set-card-meta {
  margin-top: 10px;
  color: #6b7c90;
  font-size: 8px;
  flex-wrap: wrap;
}

.answer-set-card-meta span {
  padding: 4px 7px;
  background: #f1f5f9;
  border-radius: 6px;
}

.answer-set-status {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 7px;
  font-weight: 900;
}

.answer-set-status.draft {
  color: #966000;
  background: #fff3d8;
}

.answer-set-status.approved {
  color: #08784d;
  background: #e2f7ec;
}

.answer-set-status.retired {
  color: #65758a;
  background: #edf1f5;
}

.answer-set-card-actions {
  margin-top: 10px;
}

.answer-set-card-actions .secondary-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 8px;
}

.registry-note {
  padding: 14px 18px;
  color: #5e7085;
  background: #f3f7fb;
  border-top: 1px solid var(--line-soft);
}

.registry-note strong,
.registry-note p {
  display: block;
  margin: 0;
}

.registry-note strong {
  color: var(--ink);
  font-size: 9px;
}

.registry-note p {
  margin-top: 4px;
  font-size: 8px;
  line-height: 1.55;
}

.comparable-run-form {
  display: grid;
  align-items: end;
  padding: 0 20px 14px;
  gap: 12px;
  grid-template-columns: minmax(180px, 1fr) minmax(200px, 1.2fr) auto;
}

.comparable-run-form label span {
  display: block;
  margin-bottom: 6px;
  color: #617287;
  font-size: 8px;
  font-weight: 900;
}

.comparable-run-form select {
  width: 100%;
  height: 39px;
  padding: 0 10px;
  color: var(--ink);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 9px;
  outline: 0;
}

.comparable-run-form .primary-button {
  justify-content: center;
  min-width: 122px;
}

.comparable-run-status {
  margin: 0;
  padding: 10px 20px;
  color: #6c7c90;
  background: #f8fafc;
  border-top: 1px solid var(--line-soft);
  font-size: 8px;
}

.comparable-run-status.error {
  color: #a5333c;
  background: #fff7f7;
}

.comparable-run-status.success {
  color: #08784d;
  background: #f3fbf7;
}

.comparison-dashboard-title {
  align-items: center;
}

.comparison-dashboard-empty {
  display: grid;
  min-height: 330px;
  padding: 40px;
  color: #718196;
  text-align: center;
  place-content: center;
}

.comparison-dashboard-empty > span {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  color: #0b5b72;
  background: #e4f4f6;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 900;
  place-items: center;
}

.comparison-dashboard-empty strong {
  color: var(--ink);
  font-size: 14px;
}

.comparison-dashboard-empty p {
  max-width: 420px;
  margin: 7px auto 0;
  font-size: 9px;
}

.comparison-kpis {
  display: grid;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.comparison-kpis article {
  padding: 16px;
  border-right: 1px solid var(--line-soft);
}

.comparison-kpis article:last-child {
  border-right: 0;
}

.comparison-kpis span,
.comparison-kpis strong,
.comparison-kpis small {
  display: block;
}

.comparison-kpis span {
  color: #718196;
  font-size: 8px;
}

.comparison-kpis strong {
  margin-top: 5px;
  color: var(--blue-deep);
  font-size: 20px;
}

.comparison-kpis small {
  margin-top: 3px;
  color: #8a98a9;
  font-size: 7px;
}

.comparison-leader {
  margin: 16px 20px 0;
  padding: 12px 14px;
  color: #0b4a64;
  background: #eaf7f8;
  border-left: 4px solid #2da2ad;
  border-radius: 0 9px 9px 0;
  font-size: 9px;
  line-height: 1.55;
}

.version-bars {
  display: grid;
  padding: 16px 20px 18px;
  gap: 13px;
}

.version-bar-row {
  display: grid;
  align-items: center;
  gap: 12px;
  grid-template-columns: minmax(145px, 0.8fr) minmax(180px, 1.6fr) 46px;
}

.version-bar-label strong,
.version-bar-label small {
  display: block;
}

.version-bar-label strong {
  font-size: 9px;
}

.version-bar-label small {
  margin-top: 3px;
  color: #8190a2;
  font-size: 7px;
}

.version-bar-track {
  height: 10px;
  background: #e8eef4;
  border-radius: 999px;
  overflow: hidden;
}

.version-bar-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0b5bd5, #24a4b0);
  border-radius: inherit;
}

.version-bar-row > b {
  color: #0b4a91;
  font-size: 10px;
  text-align: right;
}

.comparison-version-table-wrap {
  overflow: auto;
  border-top: 1px solid var(--line-soft);
}

.comparison-version-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.comparison-version-table th,
.comparison-version-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 8px;
  text-align: left;
  vertical-align: top;
}

.comparison-version-table th {
  color: #718196;
  background: #f2f6fa;
  font-weight: 900;
}

.comparison-version-table td strong,
.comparison-version-table td small {
  display: block;
}

.comparison-version-table td small {
  margin-top: 3px;
  color: #8190a2;
}

.comparison-delta {
  font-weight: 900;
}

.comparison-delta.positive {
  color: #08784d;
}

.comparison-delta.negative {
  color: #a5333c;
}

.comparison-delta.neutral {
  color: #6f7f92;
}

.comparison-boundary {
  margin-bottom: 20px;
}

.customer-standard-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

.customer-standard-heading,
.customer-standard-actions,
.customer-standard-card-head,
.customer-standard-card-meta,
.customer-standard-card-actions {
  display: flex;
  align-items: center;
}

.customer-standard-heading,
.customer-standard-card-head {
  justify-content: space-between;
  gap: 16px;
}

.customer-standard-heading h3 {
  margin: 4px 0 0;
}

.customer-standard-actions,
.customer-standard-card-actions {
  gap: 8px;
}

.customer-standard-import {
  cursor: pointer;
}

.customer-standard-import input {
  display: none;
}

.customer-standard-builder {
  margin-top: 14px;
  padding: 16px;
  background: linear-gradient(135deg, #f7fbff 0%, #f2f8ff 100%);
  border: 1px solid #c9dbee;
  border-radius: 12px;
}

.customer-standard-builder[hidden] {
  display: none;
}

.customer-standard-builder-head,
.guided-standard-subhead,
.customer-standard-builder-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.customer-standard-builder-head h4 {
  margin: 4px 0 0;
  color: #17324f;
  font-size: 11px;
}

.customer-standard-builder-head p {
  max-width: 620px;
  margin: 7px 0 0;
  color: #5d7187;
  font-size: 8px;
  line-height: 1.6;
}

.customer-standard-builder form {
  margin-top: 14px;
}

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

.customer-standard-builder label,
.guided-standard-reference-row label,
.guided-standard-notes {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #425a72;
  font-size: 8px;
  font-weight: 800;
}

.customer-standard-builder input,
.customer-standard-builder textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #c9d7e5;
  border-radius: 8px;
  color: #17324f;
  background: #fff;
  font: inherit;
  font-weight: 600;
}

.customer-standard-builder input:focus,
.customer-standard-builder textarea:focus {
  border-color: #0a6ce0;
  outline: 3px solid rgba(10, 108, 224, 0.12);
}

.customer-standard-builder label small {
  color: #7b8da0;
  font-size: 7px;
  font-weight: 500;
}

.guided-standard-voltage {
  display: flex;
  align-items: center;
  margin: 12px 0 0;
  padding: 10px 12px;
  gap: 14px;
  border: 1px solid #d4e1ee;
  border-radius: 9px;
}

.guided-standard-voltage legend {
  padding: 0 5px;
  color: #425a72;
  font-size: 8px;
  font-weight: 900;
}

.guided-standard-voltage label {
  align-items: center;
  flex-direction: row;
  gap: 5px;
}

.guided-standard-voltage input {
  width: auto;
}

.guided-standard-subhead {
  align-items: center;
  margin-top: 15px;
}

.guided-standard-subhead div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.guided-standard-subhead strong {
  color: #17324f;
  font-size: 9px;
}

.guided-standard-subhead span {
  color: #708398;
  font-size: 7px;
}

.guided-standard-references {
  display: grid;
  margin-top: 8px;
  gap: 8px;
}

.guided-standard-reference-row {
  display: grid;
  align-items: end;
  padding: 10px;
  gap: 8px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #d5e2ee;
  border-radius: 9px;
  grid-template-columns: 0.8fr 1.25fr 0.7fr 1.25fr 28px;
}

.guided-reference-remove {
  width: 28px;
  height: 28px;
  border: 1px solid #d8cfd2;
  border-radius: 7px;
  color: #9a4351;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}

.guided-reference-remove:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.controlled-grid {
  margin-top: 8px;
}

.guided-standard-notes {
  margin-top: 10px;
}

.guided-standard-preview {
  margin-top: 14px;
  padding: 13px;
  color: #22445f;
  background: #effaf5;
  border: 1px solid #bfe3d2;
  border-radius: 10px;
}

.guided-standard-preview[hidden] {
  display: none;
}

.guided-standard-preview > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.guided-standard-preview > div span {
  padding: 4px 7px;
  color: #08784d;
  background: #d9f3e6;
  border-radius: 999px;
  font-size: 7px;
  font-weight: 900;
}

.guided-standard-preview > div strong {
  font-size: 10px;
}

.guided-standard-preview ul {
  display: grid;
  margin: 10px 0 0;
  padding: 0;
  gap: 7px;
  list-style: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guided-standard-preview li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  background: #fff;
  border-radius: 7px;
  font-size: 7px;
}

.guided-standard-preview li span {
  color: #6a7f92;
}

.guided-standard-preview p {
  margin: 9px 0 0;
  color: #476a5b;
  font-size: 7px;
  line-height: 1.55;
}

.customer-standard-builder-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.customer-standard-builder-actions button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.customer-standard-status {
  margin-top: 12px;
  padding: 9px 12px;
  color: #54677d;
  background: #f5f8fb;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-size: 8px;
}

.customer-standard-status.success {
  color: #08784d;
  background: #f2fbf6;
  border-color: #ccebdc;
}

.customer-standard-status.error {
  color: #a5333c;
  background: #fff6f6;
  border-color: #f0d0d3;
}

.customer-standard-toolbar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 10px;
  gap: 9px;
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
}

.customer-standard-toolbar[hidden] {
  display: none;
}

.customer-standard-search,
.customer-standard-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #5b6f84;
  font-size: 7px;
  font-weight: 800;
}

.customer-standard-search {
  flex: 1 1 190px;
}

.customer-standard-filter {
  flex: 0 1 120px;
}

.customer-standard-search input,
.customer-standard-filter select {
  min-height: 31px;
  padding: 7px 9px;
  color: #17324f;
  background: #fff;
  border: 1px solid #cbd8e4;
  border-radius: 7px;
  font: inherit;
  font-size: 8px;
}

.customer-standard-search input:focus,
.customer-standard-filter select:focus {
  border-color: #0a6ce0;
  outline: 3px solid rgba(10, 108, 224, 0.1);
}

.customer-standard-latest {
  display: flex;
  align-items: center;
  min-height: 31px;
  gap: 6px;
  color: #405872;
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
}

.customer-standard-latest input {
  accent-color: #0a6ce0;
}

.customer-standard-filter-summary {
  margin-left: auto;
  color: #60758b;
  font-size: 8px;
  font-weight: 800;
}

.customer-standard-registry {
  display: grid;
  margin-top: 12px;
  gap: 10px;
}

.customer-standard-card {
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}

.customer-standard-card h4 {
  margin: 0;
  font-size: 10px;
}

.customer-standard-card p {
  margin: 7px 0 0;
  color: #617389;
  font-size: 8px;
  line-height: 1.55;
}

.customer-standard-card-meta {
  flex-wrap: wrap;
  margin-top: 9px;
  gap: 6px;
}

.customer-standard-card-meta span,
.customer-standard-state {
  padding: 4px 7px;
  color: #52677d;
  background: #edf3f8;
  border-radius: 999px;
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
}

.customer-standard-governance {
  display: grid;
  margin-top: 10px;
  padding-top: 9px;
  gap: 7px;
  border-top: 1px solid #e8eef4;
}

.customer-standard-governance-row {
  display: grid;
  align-items: start;
  gap: 8px;
  grid-template-columns: 52px minmax(0, 1fr);
}

.customer-standard-governance-row > span {
  color: #718397;
  font-size: 7px;
  font-weight: 800;
}

.customer-standard-governance-row > div {
  min-width: 0;
}

.customer-standard-governance-row strong {
  display: block;
  color: #29445f;
  font-size: 7px;
}

.customer-standard-governance-row p {
  margin: 3px 0 0;
  color: #60758a;
  overflow-wrap: anywhere;
  font-size: 7px;
}

.customer-standard-state.approved {
  color: #08784d;
  background: #dff5e9;
}

.customer-standard-state.retired {
  color: #7a6f75;
  background: #eee9ec;
}

.customer-standard-card-actions {
  margin-top: 10px;
}

.customer-standard-card-actions button {
  padding: 6px 9px;
  border: 1px solid #cbd7e3;
  border-radius: 7px;
  color: #234a70;
  background: #fff;
  font-size: 7px;
  font-weight: 800;
  cursor: pointer;
}

.customer-standard-decision-modal {
  width: min(520px, 100%);
}

.customer-standard-decision-boundary {
  display: grid;
  margin-bottom: 17px;
  padding: 11px 12px;
  gap: 4px;
  color: #315b4a;
  background: #f1faf6;
  border: 1px solid #cce8dc;
  border-radius: 9px;
}

.customer-standard-decision-boundary strong {
  font-size: 8px;
}

.customer-standard-decision-boundary span {
  font-size: 8px;
  line-height: 1.55;
}

.customer-standard-decision-modal form,
.customer-standard-decision-modal form label {
  display: flex;
  flex-direction: column;
}

.customer-standard-decision-modal form {
  gap: 7px;
}

.customer-standard-decision-modal form label {
  color: #405970;
  font-size: 9px;
  font-weight: 800;
}

.customer-standard-decision-modal textarea {
  width: 100%;
  padding: 10px 11px;
  color: #17324f;
  background: #fff;
  border: 1px solid #c9d7e5;
  border-radius: 9px;
  font: inherit;
  font-size: 10px;
  line-height: 1.55;
  resize: vertical;
}

.customer-standard-decision-modal textarea:focus {
  border-color: #0a6ce0;
  outline: 3px solid rgba(10, 108, 224, 0.12);
}

.customer-standard-decision-modal form small {
  color: #73859a;
  font-size: 8px;
  line-height: 1.55;
}

.customer-standard-decision-error {
  min-height: 16px;
  margin: 0;
  color: #a5333c;
  font-size: 8px;
}

.customer-standard-decision-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
  gap: 8px;
}

.customer-standard-comparison {
  margin-top: 14px;
  padding: 14px;
  background: #f4faf7;
  border: 1px solid #cde7da;
  border-radius: 10px;
}

.customer-standard-comparison[hidden] {
  display: none;
}

.customer-standard-comparison.review-required {
  background: #fff9ed;
  border-color: #ecd8a4;
}

.customer-standard-comparison-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.customer-standard-comparison-head h4 {
  margin: 4px 0 0;
  color: #17324f;
  font-size: 10px;
}

.customer-standard-comparison > p {
  margin: 10px 0 0;
  color: #596d82;
  font-size: 8px;
  line-height: 1.6;
}

.customer-standard-comparison-list {
  display: grid;
  margin-top: 10px;
  gap: 7px;
}

.customer-standard-comparison-item {
  display: grid;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid #dce7e2;
  border-radius: 8px;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 2fr) auto;
}

.customer-standard-comparison-item.review-required {
  border-color: #ead49f;
}

.customer-standard-comparison-item div {
  display: flex;
  flex-direction: column;
}

.customer-standard-comparison-item span {
  color: #6f8397;
  font-size: 7px;
}

.customer-standard-comparison-item strong {
  margin-top: 2px;
  color: #17324f;
  font-size: 8px;
}

.customer-standard-comparison-item p {
  margin: 0;
  color: #4f6276;
  font-size: 8px;
  line-height: 1.5;
}

.customer-standard-comparison-item em {
  padding: 4px 7px;
  color: #176847;
  background: #e4f6ed;
  border-radius: 999px;
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.customer-standard-comparison-item.review-required em {
  color: #825817;
  background: #fff0c6;
}

.customer-standard-empty {
  padding: 18px;
  color: #728397;
  background: #f8fafc;
  border: 1px dashed #cad6e2;
  border-radius: 10px;
  font-size: 8px;
  text-align: center;
}

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

  .answer-set-registry {
    max-height: 360px;
  }
}

@media (max-width: 820px) {
  .comparison-intro {
    align-items: stretch;
    flex-direction: column;
  }

  .comparison-guardrails,
  .comparison-kpis,
  .comparable-run-form {
    grid-template-columns: 1fr;
  }

  .comparison-guardrails article {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  }

  .comparison-kpis article {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .comparable-run-form .primary-button {
    width: 100%;
  }

  .version-bar-row {
    grid-template-columns: 1fr 44px;
  }

  .version-bar-label {
    grid-column: 1 / -1;
  }

  .comparison-version-table {
    min-width: 680px;
  }

  .customer-standard-heading,
  .customer-standard-card-head,
  .customer-standard-comparison-head,
  .customer-standard-builder-head,
  .guided-standard-subhead,
  .customer-standard-builder-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .customer-standard-builder-grid,
  .guided-standard-preview ul {
    grid-template-columns: 1fr;
  }

  .guided-standard-reference-row {
    grid-template-columns: 1fr;
  }

  .guided-reference-remove {
    justify-self: end;
  }

  .guided-standard-voltage {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .customer-standard-builder-actions button {
    width: 100%;
  }

  .customer-standard-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-standard-search,
  .customer-standard-filter {
    flex: none;
    width: 100%;
  }

  .customer-standard-filter-summary {
    margin-left: 0;
  }

  .customer-standard-toolbar > button {
    width: 100%;
  }

  .customer-standard-comparison-item {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .customer-standard-governance-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .customer-standard-decision-modal {
    padding: 24px 20px;
  }

  .customer-standard-decision-actions {
    flex-direction: column-reverse;
  }

  .customer-standard-decision-actions button {
    width: 100%;
  }

  .run-standard-evidence {
    align-items: flex-start;
    flex-direction: column;
  }

  .run-standard-evidence p {
    text-align: left;
  }
}
