:root {
  color-scheme: light;
  --ink: #172033;
  --ink-strong: #0b1020;
  --navy: #0b1020;
  --navy-soft: #141b30;
  --blue: #3154f5;
  --blue-deep: #2444d8;
  --blue-soft: #eef1ff;
  --lime: #7085e8;
  --orange: #ff806f;
  --canvas: #f4f6fb;
  --surface: #ffffff;
  --surface-soft: #f8f9fc;
  --line: #dfe4ee;
  --line-strong: #c8d0de;
  --muted: #687386;
  --success: #1b8c63;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 18px 50px rgba(18, 27, 50, 0.1);
  --shadow-blue: 0 20px 50px rgba(49, 84, 245, 0.2);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 24px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --body: Inter, "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font: 14px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}

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

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

::selection { background: var(--lime); color: var(--ink-strong); }

.page-glow {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 82% 8%, rgba(49, 84, 245, 0.08), transparent 24rem);
}

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

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 34px 22px 24px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 22%),
    var(--navy);
  color: #fff;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: auto -82px -90px auto;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(112, 133, 232, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(112, 133, 232, 0.025), 0 0 0 84px rgba(112, 133, 232, 0.02);
  pointer-events: none;
}

.brand-lockup { position: relative; z-index: 1; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(3, 7px);
  gap: 3px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s;
}

.brand:hover .brand-mark { border-color: #bfc9d9; }

.brand-mark i { width: 7px; height: 7px; border-radius: 2px; background: #fff; }
.brand-mark i:nth-child(2),
.brand-mark i:nth-child(4),
.brand-mark i:nth-child(8) { background: var(--lime); }

.brand-word {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.055em;
}

.brand-lockup > small {
  display: block;
  margin: 14px 0 40px 56px;
  color: #8995ad;
  font: 500 9px/1.45 var(--mono);
  letter-spacing: 0.1em;
}

.sidebar nav {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.sidebar nav a {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 0 14px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #9ca8bf;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  transition: color 0.25s, background 0.25s, border-color 0.25s, transform 0.25s;
}

.sidebar nav a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(112, 133, 232, 0.09), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s;
}

.sidebar nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.045); }
.sidebar nav a.active { color: #fff; border-color: rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.075); }
.sidebar nav a.active::before { opacity: 1; }
.sidebar nav a.active .nav-index { color: var(--lime); }

.sidebar nav a i {
  position: relative;
  color: var(--lime);
  font-size: 15px;
  font-style: normal;
  opacity: 0;
  transform: translate(-5px, 5px);
  transition: opacity 0.25s, transform 0.25s;
}

.sidebar nav a:hover i,
.sidebar nav a.active i { opacity: 1; transform: none; }

.nav-index {
  position: relative;
  color: #5f6c84;
  font: 500 9px var(--mono);
  transition: color 0.25s;
}

.sidebar-foot {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.service {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b6c0d2;
  font: 500 10px var(--mono);
}

.service::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #52d29b;
  box-shadow: 0 0 0 4px rgba(82, 210, 155, 0.1);
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: #8c98ae;
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
  transition: color 0.2s, gap 0.2s;
}

.back:hover { color: #fff; gap: 11px; }

main {
  width: min(100%, 1540px);
  height: 100vh;
  margin: 0 auto;
  padding: 0 clamp(24px, 4.5vw, 78px) 88px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.workspace-header {
  min-height: 156px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.label {
  display: block;
  color: var(--blue);
  font: 600 10px var(--mono);
  letter-spacing: 0.12em;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  display: inline-block;
  margin-right: 9px;
  border-radius: 99px;
  vertical-align: middle;
  background: currentColor;
}

h1,
h2,
h3 { font-family: var(--body); font-weight: 780; letter-spacing: -0.052em; }
h1 { margin: 7px 0 0; font-size: clamp(32px, 3.25vw, 50px); line-height: 1.12; color: var(--ink-strong); }
h2 { margin: 8px 0 0; font-size: clamp(24px, 2.2vw, 31px); line-height: 1.25; color: var(--ink-strong); }

.top-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font: 500 10px var(--mono);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.top-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(49, 84, 245, 0.1);
}

.intro {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  margin: 28px 0 34px;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.intro::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 128, 111, 0.1);
}

.intro b { color: var(--ink-strong); }
.intro span { min-width: 0; }

.workspace-section { transform-origin: top center; }
.workspace-section.is-visible { animation: section-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

.section-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.94fr) minmax(430px, 1.06fr);
  gap: 22px;
  margin: 0 0 56px;
}

.section-grid.reverse { grid-template-columns: minmax(430px, 1.06fr) minmax(360px, 0.94fr); }

.card,
.result-section,
.asset-management {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.card { padding: 30px; }

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(360px circle at var(--pointer-x, 50%) var(--pointer-y, 0%), rgba(49, 84, 245, 0.075), transparent 62%);
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }

.input-card {
  background:
    linear-gradient(145deg, rgba(238, 241, 255, 0.95), rgba(255, 255, 255, 0.9) 55%),
    var(--surface);
}

.review-card { background: rgba(255, 255, 255, 0.92); }
.card p { margin: 8px 0 20px; color: #566174; }
.muted { color: var(--muted) !important; font-size: 12px; }

label {
  display: grid;
  gap: 8px;
  margin: 17px 0;
  color: #354057;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.015em;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: 0;
  padding: 11px 13px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-strong);
  font: 13px/1.7 var(--body);
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

input:hover,
textarea:hover,
select:hover { border-color: #aeb8c9; }

input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(49, 84, 245, 0.11), 0 8px 22px rgba(49, 84, 245, 0.07);
}

textarea { min-height: 116px; }

button {
  position: relative;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 9px 14px;
  overflow: hidden;
  background: #fff;
  color: var(--ink-strong);
  font: 700 12px var(--body);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.25s, transform 0.25s;
}

button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); box-shadow: none; }
button:active:not(:disabled) { transform: translateY(0); box-shadow: none; }
button:focus-visible { outline: 3px solid rgba(49, 84, 245, 0.2); outline-offset: 2px; }

button.primary {
  border-color: var(--blue);
  background: linear-gradient(135deg, var(--blue), #4566ff);
  color: #fff;
  box-shadow: 0 10px 24px rgba(49, 84, 245, 0.22);
}

button.primary::before {
  content: "";
  position: absolute;
  inset: -1px auto -1px -45%;
  width: 34%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-18deg);
  transition: left 0.55s ease;
}

button.primary:hover:not(:disabled) { border-color: var(--blue-deep); background: linear-gradient(135deg, var(--blue-deep), var(--blue)); color: #fff; box-shadow: var(--shadow-blue); }
button.primary:hover:not(:disabled)::before { left: 115%; }
button.secondary { background: rgba(255, 255, 255, 0.9); }
button:disabled { opacity: 0.42; cursor: not-allowed; box-shadow: none; }
button.is-busy { cursor: progress; }
button.is-busy::after { content: ""; display: inline-block; width: 10px; height: 10px; margin-left: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -1px; animation: spin 0.7s linear infinite; }

.actions { display: flex; gap: 10px; margin: 20px 0; }
.empty { min-height: 78px; padding: 17px; border: 1px dashed #c9d1df; border-radius: 13px; background: rgba(248, 249, 252, 0.72); color: var(--muted); font-size: 12px; }

.module,
.candidate { padding: 15px 0; border-top: 1px solid var(--line); animation: item-in 0.35s ease both; }
.module:first-child,
.candidate:first-child { margin-top: 13px; }
.module b,
.candidate b { display: block; color: var(--ink-strong); font-size: 13px; }
.module .muted,
.candidate .muted { display: block; margin-top: 4px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.tag { display: inline-block; padding: 4px 7px; border-radius: 999px; background: #edf0f5; color: #4d586a; font: 500 9px var(--mono); font-style: normal; }
.tag.warn { background: #fff0d9; color: #9a5a00; }
.tag.evidence { max-width: 100%; overflow: hidden; background: #e8f6ff; color: #24668f; text-overflow: ellipsis; white-space: nowrap; }

.result-section { margin-top: 8px; padding: 32px; background: rgba(255, 255, 255, 0.85); }
.section-title { margin-bottom: 20px; }
.wide { min-height: 115px; background: #fff; }
.solution { display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 15px; }
.solution-box { padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); animation: item-in 0.42s ease both; }
.solution-box h3 { margin: 0 0 9px; color: var(--ink-strong); font-size: 18px; }
.solution-box p { margin: 10px 0; }
.question { padding: 12px 0; border-top: 1px solid var(--line); color: #2d384c; font-size: 12px; }
.priority { display: inline-block; margin-right: 7px; padding: 3px 6px; border-radius: 5px; background: var(--orange); color: #fff; font: 600 9px var(--mono); }

.toast {
  position: fixed;
  z-index: 100;
  right: 26px;
  bottom: 26px;
  max-width: min(390px, calc(100vw - 40px));
  padding: 14px 17px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  box-shadow: 0 18px 50px rgba(11, 16, 32, 0.28);
  transform: translateY(24px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s;
}

.toast::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(112, 133, 232, 0.1); }
.toast.show { transform: none; opacity: 1; }
.hidden { display: none !important; }

/* Source intake */
.library-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.library-heading p { max-width: 315px; }
.asset-count { margin-top: 12px; padding: 5px 7px; border-radius: 6px; background: var(--ink-strong); color: #fff; font: 10px var(--mono); white-space: nowrap; }
.compact { min-height: 36px; margin: 0; padding: 7px 10px; font-size: 10px; }
.review-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.review-actions span { color: var(--muted); font-size: 11px; }
.trace-details { margin-top: 17px; padding-top: 11px; border-top: 1px solid var(--line); }
.trace-details summary { color: var(--blue); font: 500 10px var(--mono); cursor: pointer; }
.trace-details pre { max-height: 330px; overflow: auto; margin: 10px 0 0; padding: 13px; border-radius: 10px; background: var(--navy); color: #d9e5f7; font: 10px/1.65 var(--mono); white-space: pre-wrap; word-break: break-word; }

.source-types { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 10px; }
.source-type { min-height: 34px; border-color: var(--line); border-radius: 999px; padding: 6px 10px; color: #596579; background: rgba(255, 255, 255, 0.7); font: 500 10px var(--mono); box-shadow: none; }
.source-type:hover:not(:disabled) { transform: none; background: #fff; }
.source-type.active { border-color: var(--ink-strong); background: var(--ink-strong); color: #fff; box-shadow: 0 8px 18px rgba(11, 16, 32, 0.14); }
.source-type:disabled { border-color: #e1e5ec; color: #a2abba; background: #f1f3f6; cursor: not-allowed; opacity: 1; }
.source-hint { margin-bottom: 14px; padding: 11px 12px; border: 1px solid #dfe4ff; border-left: 3px solid var(--blue); border-radius: 9px; background: rgba(238, 241, 255, 0.75); color: #536079; font-size: 11px; line-height: 1.65; }
.repository-access-note { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 12px; color: #637083; font-size: 10px; line-height: 1.5; }
.repository-access-note span { padding: 3px 6px; border: 1px solid #d7dde7; border-radius: 5px; background: #fbfcfe; }
.repository-access-note span:first-child { border-color: #bbdec2; background: #eff9f0; color: #35733a; }
/* 附件文件上传控件 */
label.file-upload { display: flex; flex-direction: column; gap: 6px; }
label.file-upload input[type="file"] {
  padding: 8px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--ink-strong);
  font: 400 12px var(--sans);
  cursor: pointer;
}
label.file-upload input[type="file"]:hover { border-color: var(--blue); background: var(--blue-soft); }
.file-upload-hint, .link-hint { display: block; color: #8894a8; font: 400 10px var(--mono); line-height: 1.5; }
.intake-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 15px 0; }
.confidence { padding: 4px 8px; border-radius: 999px; background: #edf1ff; color: #4059c7; font: 500 9px var(--mono); }
.source-manifest { margin: 15px 0 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.75); }
.manifest-title { padding: 9px 11px; border-bottom: 1px solid var(--line); background: rgba(248, 249, 252, 0.8); color: #758197; font: 500 9px var(--mono); letter-spacing: 0.08em; }
.source-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 10px 11px; border-top: 1px solid #edf0f5; }
.source-row:first-of-type { border-top: 0; }
.source-row b { display: block; font-size: 11px; line-height: 1.35; }
.source-row small { display: block; margin-top: 2px; overflow: hidden; color: #7e899a; font: 9px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.source-level { padding: 4px 5px; border-radius: 5px; font: 600 9px var(--mono); }
.source-level.l1 { background: #fff0df; color: #9d5500; }
.source-level.l2 { background: #e7f2ff; color: #145f9b; }
.source-level.l3 { background: #edf1ff; color: #4059c7; }
.remove-source { min-height: 28px; border: 0; padding: 2px 6px; color: #8a95a6; background: transparent; font: 18px/1 var(--body); box-shadow: none; }
.remove-source:hover:not(:disabled) { color: #cb432f; transform: none; box-shadow: none; }
.draft-mark { color: #98a2b1; font: 9px var(--mono); }
.split-meta { margin: 13px 0 5px; padding: 13px; border: 1px solid #dfe4ff; border-radius: 11px; background: var(--blue-soft); font-size: 11px; }
.split-meta b,
.split-meta span,
.split-meta small { display: block; }
.split-meta small { margin-top: 6px; color: #9a5a00; }

/* Capability module management */
.asset-management { margin: 0 0 56px; padding: 31px; background: rgba(255, 255, 255, 0.88); }
.asset-management::after { content: ""; position: absolute; top: -50px; right: -40px; width: 180px; height: 180px; border-radius: 50%; background: rgba(112, 133, 232, 0.08); filter: blur(5px); pointer-events: none; }
.asset-management > * { position: relative; z-index: 1; }
.asset-management-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding-bottom: 23px; border-bottom: 1px solid var(--line); }
.asset-management-head h2 { margin-top: 6px; }
.asset-management-head p { max-width: 650px; margin: 9px 0 0; }
.asset-metrics { display: flex; flex-shrink: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--line); box-shadow: var(--shadow-sm); }
.asset-metrics div { min-width: 92px; padding: 12px 14px; background: #fff; }
.asset-metrics b { display: block; color: var(--ink-strong); font: 600 19px var(--mono); letter-spacing: -0.06em; }
.asset-metrics span { display: block; color: var(--muted); font-size: 9px; }
.asset-toolbar { display: flex; align-items: end; gap: 11px; margin: 20px 0; }
.asset-toolbar label { margin: 0; }
.asset-toolbar label span { color: var(--muted); font: 500 9px var(--mono); letter-spacing: 0.08em; }
.asset-search { flex: 1; }
.asset-search input,
.asset-filter select { height: 39px; padding: 8px 11px; background: #fff; font: 12px var(--body); }
.asset-filter { width: 180px; }
.asset-manager-body { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(290px, 0.82fr); gap: 20px; align-items: start; }
.module-list { min-height: 330px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.module-row { width: 100%; display: grid; grid-template-columns: 14px minmax(0, 1fr) 22px; gap: 11px; align-items: center; min-height: 82px; padding: 13px 14px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); text-align: left; box-shadow: none; }
.module-row:last-child { border-bottom: 0; }
.module-row:hover:not(:disabled) { border-color: var(--line); background: #f7f8fc; color: var(--ink); transform: none; box-shadow: none; }
.module-row.selected { background: var(--blue-soft); color: var(--ink); box-shadow: inset 4px 0 0 var(--blue); }
.module-row-id { color: var(--blue); font: 600 10px var(--mono); }
.module-row-copy { min-width: 0; }
.module-row-copy b,
.module-row-copy small { display: block; }
.module-row-copy b { color: var(--ink-strong); font-size: 13px; font-weight: 600; line-height: 1.45; }
.module-row-copy small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-overflow: ellipsis; }
.module-row-copy .tags { margin-top: 6px; flex-wrap: wrap; }
.module-row-copy .tags .tag { flex-shrink: 0; white-space: nowrap; }
.muted-tag { background: #edf0f5; color: #647084; }
.module-row-arrow { color: var(--blue); font-size: 17px; transition: transform 0.2s; }
.module-row:hover .module-row-arrow,
.module-row.selected .module-row-arrow { color: var(--blue-deep); }
.module-detail { position: sticky; top: 18px; min-height: 330px; padding: 21px; overflow: hidden; border: 1px solid #202a42; border-radius: 16px; background: linear-gradient(150deg, #151d31, var(--navy)); color: #f8fbff; box-shadow: 0 22px 45px rgba(11, 16, 32, 0.18); }
.module-detail::before { content: ""; position: absolute; top: -70px; right: -70px; width: 170px; height: 170px; border: 1px solid rgba(112, 133, 232, 0.16); border-radius: 50%; box-shadow: 0 0 0 34px rgba(112, 133, 232, 0.025); }
.module-detail > * { position: relative; }
.module-detail.detail-enter > * { animation: item-in 0.38s ease both; }
.module-detail.empty { display: flex; align-items: center; background: #f4f6fa; color: var(--muted); border-color: var(--line); box-shadow: none; font-size: 12px; }
.module-detail.empty::before { display: none; }
.detail-kicker { color: var(--lime); font: 600 10px var(--mono); }
.module-detail h3 { margin: 8px 0 6px; font-size: 20px; line-height: 1.3; letter-spacing: -0.045em; }
.module-detail p { margin: 0 0 16px; color: #c9d3e2; font-size: 11px; line-height: 1.7; }
.detail-row { padding: 10px 0; border-top: 1px solid #303a50; }
.detail-row > span { display: block; margin-bottom: 6px; color: #93a1b8; font: 500 9px var(--mono); }
.detail-row div { display: flex; flex-wrap: wrap; gap: 5px; }
.detail-row i { padding: 4px 6px; border-radius: 5px; background: #263147; color: #e9f1ff; font-size: 10px; font-style: normal; }
.detail-row.attention i { background: #443a22; color: #ffe59d; }
.detail-row.risk i { background: #44292d; color: #ffc6bf; }
.detail-source { margin-top: 15px; color: #8f9cb1; font-size: 10px; }
.module-pagination { display: flex; justify-content: space-between; align-items: center; min-height: 32px; margin-top: 11px; color: var(--muted); font: 10px var(--mono); }
.module-pagination div { display: flex; align-items: center; gap: 9px; }
.module-pagination button { min-height: 29px; padding: 4px 8px; font: 10px var(--mono); }
.module-pagination b { color: var(--ink-strong); font-weight: 500; }

.assemble-section { margin: 0 0 56px; }
.assemble-section .card { max-width: 940px; }
.assemble-section #demandResult { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.assemble-section #demandResult:not(.empty) { min-height: 0; padding: 0; border: 0; background: transparent; }
.assemble-section #demandResult .candidate { min-height: 96px; margin: 0; padding: 17px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.assemble-section #demandResult .candidate:first-child { margin-top: 0; }
.assemble-section #demandResult .candidate > b { margin-bottom: 10px; }
.assemble-section #demandResult .tags { margin-top: 0; align-content: flex-start; }
.assemble-section #demandResult .tag { padding: 6px 10px; font: 600 11px/1.35 var(--body); }

/* Result section: internal vs customer version tab switcher */
.result-tabs { display: flex; flex-wrap: wrap; align-items: center; align-self: start; gap: 8px; margin-bottom: 12px; }
.result-tabs button { min-height: 34px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font: 600 12px var(--body); cursor: pointer; }
.result-tabs button.active { border-color: var(--blue); background: var(--blue); color: #fff; }
.result-body { min-height: 0; }
.result-body > #customerResult,
.result-body > #solutionResult { display: none; }
.result-body > #customerResult:not(.hidden),
.result-body > #solutionResult:not(.hidden) { display: flex; flex-direction: column; }

.recall-box { grid-column: 1 / -1; }
.recall-box .recall-row { padding: 15px 0; }
.recall-head { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 16px; align-items: center; }
.recall-head b { min-width: 0; line-height: 1.55; }
.recall-score { justify-self: end; color: #738096; font: 500 11px/1.4 var(--mono); white-space: nowrap; }
.recall-row .tags:empty { display: none; }

/* Desktop workbench density: each route uses one viewport whenever content allows. */
@media (min-width: 801px) {
  main { padding-top: 24px; padding-bottom: 24px; }
  .workspace-header { min-height: 112px; }
  .workspace-header h1 { font-size: clamp(30px, 2.7vw, 42px); }
  .section-grid { gap: 16px; margin-bottom: 20px; }
  .card { padding: 22px; }
  .card > p { margin: 6px 0 14px; line-height: 1.6; }
  label { gap: 6px; margin: 12px 0; }
  input,
  select { padding-block: 8px; }
  #sourceText { height: 132px; min-height: 100px; }
  #demandText { height: 176px; min-height: 130px; }
  .source-types { margin: 13px 0 8px; }
  .source-hint { margin-bottom: 10px; padding: 8px 10px; line-height: 1.5; }
  .intake-actions { margin: 10px 0; }
  .source-manifest { margin: 10px 0 12px; }
  .actions { margin: 14px 0; }
  .assemble-section { margin-bottom: 20px; }
  .assemble-section .card { max-width: none; }
  .assemble-section #demandResult .candidate { min-height: 82px; padding: 13px 15px; }

  .asset-management { margin-bottom: 20px; padding: 22px; }
  .asset-management-head { gap: 20px; padding-bottom: 15px; }
  .asset-management-head p { margin-top: 5px; line-height: 1.55; }
  .asset-toolbar { margin: 14px 0; }
  .asset-manager-body { gap: 15px; }
  .module-list,
  .module-detail { min-height: 300px; }
  .module-row { min-height: 62px; padding: 9px 12px; }
  .module-row-copy .tags { margin-top: 4px; }
  .module-detail { padding: 17px; }
  .detail-row { padding: 7px 0; }

  .result-section { margin-top: 0; padding: 22px; }
  .section-title { margin-bottom: 14px; }
  .solution { gap: 12px; }
  .solution-box { padding: 16px; }
  .solution-box h3 { margin-bottom: 6px; font-size: 16px; }
  .solution-box p { margin: 7px 0; line-height: 1.55; }
  .question { padding: 8px 0; }
  .recall-box { display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; }
  .recall-box > h3,
  .recall-box > p,
  .recall-box > details { grid-column: 1 / -1; }
  .recall-box .recall-row { margin: 0; padding: 9px 0; }
  .recall-head { grid-template-columns: minmax(0, 1fr) 70px; gap: 10px; }
}

/* Workbench cover: the slogan belongs to the home route only. */
.workbench-home {
  min-height: calc(100vh - 48px);
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: clamp(44px, 6vw, 88px);
  align-items: center;
}
.workbench-home-copy { max-width: 650px; }
.workbench-home-copy h1 { margin-top: 16px; font-size: clamp(44px, 4.4vw, 68px); line-height: 1.08; }
.workbench-home-copy > p { max-width: 590px; margin: 24px 0 0; color: var(--muted); font-size: 15px; line-height: 1.85; }
.workbench-home-actions { display: flex; gap: 10px; margin-top: 30px; }
.workbench-home-actions button { min-width: 142px; }
.workbench-home-visual {
  min-height: 520px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(rgba(222,228,239,.62) 1px, transparent 1px),
    linear-gradient(90deg,rgba(222,228,239,.62) 1px,transparent 1px),
    linear-gradient(145deg,#fff,#eef2f8);
  background-size: 34px 34px, 34px 34px, auto;
  box-shadow: 0 22px 58px rgba(20,32,55,.1);
}
.workbench-home-visual::before {
  content: "";
  position: absolute;
  inset: 18% 20%;
  border: 1px solid #c8d3e3;
  border-radius: 50%;
}
.home-visual-core {
  position: absolute;
  z-index: 2;
  inset: 31% 30%;
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
  border: 1px solid #d3dae6;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  box-shadow: 0 14px 38px rgba(49,84,245,.1);
}
.home-visual-core span { color: var(--blue); font: 700 9px var(--mono); letter-spacing: .13em; }
.home-visual-core strong { color: var(--ink-strong); font-size: 17px; line-height: 1.5; }
.home-flow-card {
  position: absolute;
  z-index: 3;
  width: 148px;
  min-height: 66px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 32px minmax(0,1fr);
  gap: 9px;
  align-items: center;
  border: 1px solid #d8e0eb;
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 9px 24px rgba(20,32,55,.08);
}
.home-flow-card:nth-of-type(2) { top: 9%; left: 50%; transform: translateX(-50%); }
.home-flow-card:nth-of-type(3) { top: 50%; right: 5%; transform: translateY(-50%); }
.home-flow-card:nth-of-type(4) { bottom: 9%; left: 50%; transform: translateX(-50%); }
.home-flow-card:nth-of-type(5) { top: 50%; left: 5%; transform: translateY(-50%); }
.home-flow-card i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--blue); font: 700 15px/1 var(--body); font-style: normal; }
.home-flow-card b,
.home-flow-card span { display: block; }
.home-flow-card b { color: var(--ink-strong); font-size: 12px; }
.home-flow-card span { margin-top: 2px; color: var(--muted); font-size: 9px; }

@media (max-width: 800px) {
  main { padding-top: 18px; }
  .sidebar nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .workbench-home { min-height: 0; grid-template-columns: 1fr; gap: 36px; padding: 36px 0 48px; }
  .workbench-home-copy h1 { font-size: clamp(38px, 11vw, 54px); }
  .workbench-home-actions { align-items: stretch; flex-direction: column; }
  .workbench-home-visual { min-height: 390px; border-radius: 21px; }
  .home-flow-card { width: 112px; min-height: 56px; padding: 8px; grid-template-columns: 25px minmax(0,1fr); gap: 6px; }
  .home-flow-card i { width: 25px; height: 25px; border-radius: 7px; font-size: 12px; }
  .home-flow-card:nth-of-type(3) { right: 2%; }
  .home-flow-card:nth-of-type(5) { left: 2%; }
  .home-visual-core { inset: 32% 27%; }
  .home-visual-core strong { font-size: 13px; }
}

@keyframes section-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes item-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (hover: hover) and (pointer: fine) {
  .card { transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.32s, border-color 0.32s; }
  .card:hover { border-color: #cfd6e3; box-shadow: var(--shadow-md); }
}

@media (max-width: 1120px) {
  .shell { grid-template-columns: 245px minmax(0, 1fr); }
  .sidebar { padding-inline: 17px; }
  .section-grid,
  .section-grid.reverse { grid-template-columns: 1fr; }
  .asset-management-head { align-items: flex-start; flex-direction: column; }
  .asset-metrics { width: 100%; }
  .asset-metrics div { flex: 1; }
}

@media (max-width: 800px) {
  .shell { display: block; }
  .sidebar { position: sticky; height: auto; padding: 13px 16px 11px; overflow: visible; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
  .sidebar::before,
  .brand-lockup > small,
  .sidebar-foot { display: none; }
  .brand-mark { grid-template-columns: repeat(3, 5px); gap: 2px; padding: 7px; border-radius: 9px; }
  .brand-mark i { width: 5px; height: 5px; }
  .brand-word { font-size: 21px; }
  .sidebar nav { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-top: 11px; }
  .sidebar nav a { display: flex; justify-content: center; min-height: 38px; padding: 0 6px; border-radius: 9px; text-align: center; font-size: 10px; }
  .sidebar nav a i,
  .nav-index { display: none; }
  .sidebar nav a:hover { transform: none; }
  main { padding: 0 17px 60px; }
  .workspace-header { min-height: 126px; }
  .workspace-header h1 { font-size: clamp(28px, 8vw, 38px); }
  .top-status { display: none; }
  .intro { grid-template-columns: auto minmax(0, 1fr); margin: 20px 0 24px; }
  .intro span { grid-column: 2; }
  .section-grid,
  .section-grid.reverse,
  .solution { grid-template-columns: 1fr; }
  .card,
  .result-section,
  .asset-management { padding: 21px; border-radius: 18px; }
  .asset-toolbar { align-items: stretch; flex-direction: column; }
  .asset-search,
  .asset-filter { width: 100%; }
  .asset-manager-body { grid-template-columns: 1fr; }
  .module-detail { position: static; }
  .module-row { grid-template-columns: 56px minmax(0, 1fr) 18px; }
  .assemble-section #demandResult { grid-template-columns: 1fr; }
  .intake-actions,
  .review-actions { align-items: flex-start; flex-direction: column; }
  .actions { flex-direction: column; }
  .actions button { width: 100%; }
  .toast { right: 16px; bottom: 16px; }
}

@media (max-width: 520px) {
  .sidebar nav a { font-size: 9px; }
  .source-types { display: grid; grid-template-columns: repeat(2, 1fr); }
  .source-type { width: 100%; }
  .asset-metrics div { min-width: 0; padding: 10px; }
  .asset-metrics b { font-size: 16px; }
  .module-row-copy .tags { display: none; }
}

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

/* Unified light theme: aligned with the Mosaic brand lockup */
:root {
  --navy: #ffffff;
  --navy-soft: #f3f5f9;
  --lime: #7085e8;
  --canvas: #f6f7fa;
  --surface-soft: #f7f8fb;
  --shadow-md: 0 14px 36px rgba(18, 27, 50, 0.08);
  --shadow-blue: 0 12px 28px rgba(49, 84, 245, 0.18);
}

::selection { background: #dce4ff; color: var(--ink-strong); }
.page-glow { background: radial-gradient(circle at 82% 8%, rgba(49,84,245,.07), transparent 25rem); }
.sidebar { border-right: 1px solid var(--line); background: rgba(255,255,255,.92); color: var(--ink); }
.sidebar::before { display: none; }
.brand { color: var(--ink-strong); }
.brand-mark { border-color: var(--line); background: #fff; box-shadow: none; transform: none; transition: border-color .2s ease; }
.brand:hover .brand-mark { transform: none; border-color: #bfc9d9; }
.brand-mark i { background: var(--blue); }
.brand-mark i:nth-child(2),
.brand-mark i:nth-child(4),
.brand-mark i:nth-child(8) { background: #7a8ff7; }
.brand-lockup > small { color: #7b8699; }
.sidebar nav a { color: #657084; transition: color .2s ease, background .2s ease, border-color .2s ease; }
.sidebar nav a::before { display: none; }
.sidebar nav a:hover { color: var(--ink-strong); background: #f4f6fa; transform: none; }
.sidebar nav a.active { color: var(--ink-strong); border-color: #d9e0eb; background: #eef1ff; }
.sidebar nav a.active .nav-index,
.sidebar nav a i { color: var(--blue); }
.sidebar nav a i { transform: none; transition: opacity .2s ease; }
.nav-index { color: #8a95a7; }
.sidebar-foot { border-color: var(--line); }
.service { color: #687386; }
.service::before { background: #7085e8; box-shadow: 0 0 0 4px rgba(112,133,232,.1); }
.back { color: #687386; transition: color .2s ease; }
.back:hover { color: var(--blue); gap: 8px; }

.workspace-section.is-visible,
.module,
.candidate,
.solution-box,
.module-detail.detail-enter > * { animation: none; }
.card::before { display: none; }
.card,
.result-section,
.asset-management { box-shadow: 0 1px 2px rgba(16,24,40,.03), 0 10px 30px rgba(16,24,40,.04); }
button { transition: color .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease; }
button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); transform: none; box-shadow: none; }
button:active:not(:disabled) { transform: none; box-shadow: none; }
button.primary { background: var(--blue); box-shadow: 0 8px 20px rgba(49,84,245,.16); }
button.primary::before { display: none; }
button.primary:hover:not(:disabled) { border-color: var(--blue-deep); background: var(--blue-deep); box-shadow: 0 10px 24px rgba(49,84,245,.18); }

.toast { border-color: var(--line); color: var(--ink); background: #fff; box-shadow: 0 14px 38px rgba(18,27,50,.12); transform: none; transition: opacity .2s ease; }
.toast::before { background: var(--blue); box-shadow: none; }
.trace-details pre { color: #344057; background: #f3f5f9; border: 1px solid var(--line); }
.source-type.active { border-color: var(--blue); background: var(--blue); box-shadow: none; }
.asset-management::after { display: none; }
.module-row-arrow { transition: color .2s ease; }
.module-row:hover .module-row-arrow,
.module-row.selected .module-row-arrow { transform: none; }
.module-detail { border-color: var(--line); color: var(--ink); background: #f7f8fb; box-shadow: none; }
.module-detail::before { display: none; }
.detail-kicker { color: var(--blue); }
.module-detail h3 { color: var(--ink-strong); }
.module-detail p { color: var(--muted); }
.detail-row { border-color: var(--line); }
.detail-row > span { color: #768196; }
.detail-row i { color: #435067; background: #e9edf4; }
.detail-row.attention i { color: #865800; background: #fff2dc; }
.detail-row.risk i { color: #a1473d; background: #fff0ed; }
.detail-source { color: #7c8799; }

@media (hover: hover) and (pointer: fine) {
  .card { transition: border-color .2s ease, box-shadow .2s ease; }
  .card:hover { transform: none; border-color: #cfd6e3; box-shadow: 0 10px 30px rgba(16,24,40,.055); }
}

@media (max-width: 800px) {
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
  .sidebar nav a:hover { transform: none; }
}

/* Final alignment refinement after decorative arrows were removed */
.sidebar nav a { grid-template-columns: 28px minmax(0, 1fr); }
.sidebar nav a > span:last-child { line-height: 1.45; }
.back { margin-top: 18px; }
.workspace-header > div:first-child { max-width: 900px; }
.workspace-header h1 { text-wrap: balance; }
.intro { align-items: start; }
.intro b,
.intro span { line-height: 1.65; }
.card > p,
.asset-management-head p { max-width: 720px; line-height: 1.75; }
.module-row { grid-template-columns: 70px minmax(0, 1fr); }
.module-row-copy b { line-height: 1.45; }
.module-row-copy small { line-height: 1.6; }
.actions button,
.review-actions button { min-width: 132px; }

@media (max-width: 800px) {
  .sidebar nav a { display: flex; }
  .module-row { grid-template-columns: 56px minmax(0, 1fr); }
}

/* Customer profile and multi-solution views from the latest master workflow */
.customer-profile { margin: 6px 0 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.profile-head { padding: 18px 18px 6px; }
.profile-head h3 { margin: 7px 0 10px; font-size: 20px; line-height: 1.35; }
.profile-head .tags { margin-bottom: 4px; }
.profile-summary { max-height: 118px; margin: 8px 18px 16px; padding: 11px 13px; overflow: auto; border-left: 3px solid var(--blue); border-radius: 7px; color: #536079; background: var(--blue-soft); font-size: 11px; line-height: 1.7; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border-top: 1px solid var(--line); background: var(--line); }
.profile-block { min-width: 0; background: #fff; }
.profile-block summary { display: flex; align-items: center; gap: 7px; padding: 12px 14px; color: #354057; cursor: pointer; font-size: 11px; font-weight: 700; list-style: none; user-select: none; }
.profile-block summary::-webkit-details-marker { display: none; }
.profile-block summary::before { content: "+"; width: 16px; color: var(--blue); font-size: 13px; }
.profile-block[open] summary::before { content: "−"; }
.profile-block summary b { margin-left: auto; padding: 2px 6px; border-radius: 5px; color: #596579; background: #eef1f5; font: 10px var(--mono); }
.profile-block ul { max-height: 186px; margin: 0; padding: 2px 14px 13px 31px; overflow: auto; }
.profile-block li { margin: 5px 0; color: #4d586b; font-size: 11px; line-height: 1.6; }
.profile-block.pain summary b { color: #9a5a00; background: #fff2d7; }
.profile-block.risk summary b { color: #a1473d; background: #fff0ed; }
.profile-block.opportunity summary b { color: #4059c7; background: #edf1ff; }
.profile-block.modules ul { display: flex; flex-wrap: wrap; gap: 5px; padding: 2px 14px 13px; list-style: none; }
.profile-module { margin: 0 !important; padding: 4px 7px; border-radius: 5px; color: var(--blue); background: var(--blue-soft); font: 10px var(--mono); }
.profile-priority { display: inline-block; margin-right: 6px; padding: 2px 5px; border-radius: 4px; color: #5a6572; background: #eef2f7; font: 9px var(--mono); font-style: normal; }
.profile-priority.p0 { color: #fff; background: var(--orange); }
.profile-priority.p1 { color: #8a5b00; background: #ffe9b8; }
.solution-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.solution-tabs button { min-height: 36px; padding: 7px 11px; color: #596579; background: #fff; font: 700 10px var(--mono); }
.solution-tabs button.active { border-color: var(--blue); color: #fff; background: var(--blue); }
.tag.gap { color: #b03a24; background: #ffe5e1; font-weight: 700; }

/* 能力解构 - 可编辑草稿卡片 */
.draft-card { padding: 16px 18px; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); }
.draft-card:first-child { margin-top: 13px; }
.draft-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.draft-title-group { flex: 1; min-width: 0; padding: 10px 12px 9px; border: 1px solid #dce4ff; border-left: 4px solid var(--blue); border-radius: 8px; background: linear-gradient(90deg, #f2f5ff 0%, #fbfcff 74%); }
.draft-title-label { display: block; margin-bottom: 3px; color: var(--blue); font: 700 9px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.draft-title { padding: 1px 3px; border: 1px dashed transparent; border-radius: 4px; color: var(--ink-strong); font: 700 15px var(--sans); line-height: 1.45; outline: none; }
.draft-title:hover { border-color: #becaf2; background: rgba(255, 255, 255, .75); }
.draft-title:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 2px rgba(45, 91, 255, .12); }
.draft-remove { width: 26px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.draft-remove:hover { color: #b03a24; border-color: #b03a24; background: #ffe5e1; }
.draft-field { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; color: #596579; font: 500 10px var(--mono); }
.draft-field.inline { flex: 1; }
.draft-field input,
.draft-field textarea,
.draft-field select { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; color: var(--ink-strong); font: 400 12px var(--sans); resize: vertical; }
.draft-field input:focus,
.draft-field textarea:focus,
.draft-field select:focus { outline: none; border-color: var(--blue); background: #fff; }
.draft-field textarea { min-height: 44px; }
.draft-row { display: flex; gap: 10px; flex-wrap: wrap; }
.draft-foot { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* 仓库扫描三步流程 - 预览卡片 */
.repository-preview { margin-top: 14px; padding: 16px 18px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--surface-soft); }
.repository-preview.hidden { display: none; }
.repo-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-bottom: 4px; }
.repo-head b { padding: 3px 8px; border-radius: 6px; color: #fff; background: var(--navy); font: 700 10px var(--mono); }
.repo-head span { color: var(--ink-strong); font: 700 13px var(--sans); }
.repo-desc { margin: 8px 0 12px; color: var(--muted); font: 400 12px var(--sans); line-height: 1.6; }
.repo-files { max-height: 240px; padding: 4px 0; overflow: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; border-radius: 8px; }
.repo-file { display: flex; align-items: center; gap: 10px; padding: 7px 12px; color: var(--ink-strong); font: 400 12px var(--sans); cursor: pointer; }
.repo-file:hover { background: var(--blue-soft); }
.repo-file input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--blue); cursor: pointer; }
.repo-file code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #2c3750; font: 400 11px var(--mono); }
.repo-file .source-level { margin-left: auto; font-size: 9px; }
.repo-empty { padding: 16px; color: var(--muted); text-align: center; font: 400 12px var(--sans); }
.repo-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; color: var(--muted); font: 500 11px var(--mono); }
.repo-foot small { color: #8894a8; font: 400 10px var(--mono); }
.intake-actions button.hidden { display: none; }

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

/* Alignment corrections for workbench chrome and module library */
.brand-lockup > small { margin: 13px 0 38px; padding-left: 2px; }
.brand-lockup { margin-bottom: 52px; }
.sidebar-foot { display: grid; gap: 14px; padding: 20px 2px 0; }
.sidebar-foot .service,
.sidebar-foot .back { margin: 0; }

.intro { grid-template-columns: minmax(0, 1fr); gap: 4px; align-items: start; padding: 15px 18px; }
.intro::before { display: none; }
.intro b { font-size: 12px; line-height: 1.5; }
.intro span { max-width: 920px; line-height: 1.65; }

.asset-toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) 230px auto; gap: 12px; align-items: end; }
.asset-search,
.asset-filter { width: auto; min-width: 0; }
.asset-filter { position: relative; }
.asset-filter select { appearance: none; padding-right: 38px; }
.asset-filter::after { content: ""; position: absolute; right: 15px; bottom: 16px; width: 7px; height: 7px; border-right: 1.5px solid #667187; border-bottom: 1.5px solid #667187; transform: rotate(45deg); pointer-events: none; }
.asset-toolbar .compact { min-width: 98px; height: 39px; white-space: nowrap; }

.select-field { position: relative; }
.select-field select { appearance: none; padding-right: 44px; }
.select-field::after {
  content: "";
  position: absolute;
  right: 17px;
  bottom: 19px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #667187;
  border-bottom: 1.5px solid #667187;
  transform: rotate(45deg);
  pointer-events: none;
}

.module-row { grid-template-columns: 112px minmax(0, 1fr); }
.module-row-id { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.4; }
.module-row-copy { padding-left: 2px; }

@media (max-width: 800px) {
  .shell { height: auto; min-height: 100vh; overflow: visible; }
  main { height: auto; overflow: visible; scrollbar-gutter: auto; }
  .brand-lockup { margin-bottom: 0; }
  .brand-lockup > small { margin-bottom: 0; }
  .sidebar-foot { display: none; }
  .intro { grid-template-columns: 1fr; }
  .intro span { grid-column: auto; }
  .asset-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .asset-toolbar .compact { width: 100%; }
  .module-row { grid-template-columns: 86px minmax(0, 1fr); }
}

/* Fixed work canvas: every 00–04 route occupies the same right-hand viewport. */
@media (min-width: 801px) {
  main {
    height: 100vh;
    padding: 24px clamp(24px, 4.5vw, 78px);
    overflow: hidden;
    scrollbar-gutter: auto;
  }

  .workspace-section {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 2px 6px 22px 2px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .section-grid.workspace-section {
    align-content: start;
    grid-auto-rows: max-content;
  }

  .asset-management.workspace-section,
  .result-section.workspace-section {
    padding: 22px 26px 22px 22px;
  }
}

/* Dashboard home — clear, compact and driven by the demo's current data. */
.workbench-home {
  display: block;
  min-height: 0;
  font-family: Inter, "SF Pro Text", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

.dashboard-head {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 8px 2px 20px;
  border-bottom: 1px solid var(--line);
}

.dashboard-head h1 {
  margin-top: 7px;
  font-size: clamp(32px, 3vw, 46px);
  line-height: 1.05;
}

.dashboard-head p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.dashboard-head-actions button { min-width: 132px; }
.dashboard-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #536079;
  background: #fff;
  font-size: 11px;
  font-weight: 650;
}

.dashboard-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(27,140,99,.1);
}

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

.dashboard-metric {
  min-width: 0;
  min-height: 116px;
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 12px;
  align-content: center;
  padding: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.metric-icon {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--metric-color, var(--blue));
  background: var(--metric-bg, var(--blue-soft));
  font: 750 16px/1 var(--body);
}

.dashboard-metric div { min-width: 0; line-height: 1; }
.dashboard-metric small { display: block; margin-bottom: 8px; color: #69758a; font-size: 10px; font-weight: 650; }
.dashboard-metric strong { color: var(--ink-strong); font-size: 25px; letter-spacing: -.04em; }
.dashboard-metric em { margin-left: 4px; color: #7a8597; font-size: 10px; font-style: normal; }
.dashboard-metric p { grid-column: 2; margin: 8px 0 0; overflow: hidden; color: #8a95a7; font-size: 9px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.metric-violet { --metric-color:#6956d9; --metric-bg:#f1efff; }
.metric-cyan { --metric-color:#287d9d; --metric-bg:#eaf7fb; }
.metric-orange { --metric-color:#b85a42; --metric-bg:#fff0ec; }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  grid-template-areas:
    "progress project"
    "assets tasks";
  gap: 12px;
}

.dashboard-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow-sm);
}

.dashboard-progress { grid-area: progress; }
.dashboard-project { grid-area: project; }
.dashboard-assets { grid-area: assets; }
.dashboard-tasks { grid-area: tasks; }
.panel-heading { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel-heading small { display: block; color: var(--blue); font: 650 9px var(--mono); letter-spacing: .12em; }
.panel-heading h2 { margin: 4px 0 0; font-size: 19px; letter-spacing: -.035em; }
.panel-heading > span { flex: 0 0 auto; color: #7c8799; font: 550 9px var(--mono); }
.panel-heading button { min-height: 30px; padding: 5px 9px; border-color: transparent; color: var(--blue); background: var(--blue-soft); font-size: 9px; }

.progress-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.progress-track::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: var(--line);
}

.progress-step {
  min-width: 0;
  min-height: 94px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 0 4px;
  border: 0;
  text-align: left;
  background: transparent;
  box-shadow: none;
}

.progress-step:hover:not(:disabled) { border-color: transparent; background: transparent; }
.progress-step > i {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border: 1px solid #d6ddea;
  border-radius: 10px;
  color: #8a95a7;
  background: #fff;
  font: 650 9px var(--mono);
  font-style: normal;
}

.progress-step.done > i { border-color: var(--blue); color: #fff; background: var(--blue); }
.progress-step.active > i { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 4px rgba(49,84,245,.07); }
.progress-step span { min-width: 0; padding-top: 7px; }
.progress-step b,
.progress-step small { display: block; }
.progress-step b { overflow: hidden; color: var(--ink-strong); font-size: 11px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.progress-step small { margin-top: 11px; color: #8a95a7; font-size: 9px; line-height: 1.45; }

.status-pill { padding: 3px 7px; border-radius: 999px; color: #326c5a !important; background: #eaf7f1; }
.dashboard-project h3 { margin: 18px 0 6px; color: var(--ink-strong); font-size: 15px; }
.dashboard-project > p { min-height: 40px; margin: 0; color: #6f7b8e; font-size: 10px; line-height: 1.7; }
.project-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.project-tags i { padding: 3px 7px; border-radius: 6px; color: #536079; background: #f0f3f7; font-size: 9px; font-style: normal; }
.project-evidence { display: grid; grid-template-columns: auto minmax(60px,1fr) auto; align-items: center; gap: 9px; margin-top: 15px; color: #7c8799; font-size: 9px; }
.project-evidence > b { height: 5px; overflow: hidden; border-radius: 99px; background: #edf0f5; }
.project-evidence > b i { display: block; width: 72%; height: 100%; border-radius: inherit; background: var(--blue); }
.project-evidence strong { color: var(--blue); font: 650 9px var(--mono); }

.asset-chart { display: grid; gap: 11px; margin-top: 17px; }
.asset-chart > div { display: grid; grid-template-columns: 80px minmax(0,1fr) 34px; align-items: center; gap: 10px; }
.asset-chart span { color: #5e697c; font-size: 10px; }
.asset-chart b { height: 7px; overflow: hidden; border-radius: 99px; background: #eef1f5; }
.asset-chart b i { display: block; width: var(--value); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3154f5, #758af8); }
.asset-chart strong { color: #566176; font: 600 9px var(--mono); text-align: right; }

.dashboard-tasks .panel-heading > b { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--blue); background: var(--blue-soft); font: 700 10px var(--mono); }
.dashboard-tasks ul { margin: 12px 0 0; padding: 0; list-style: none; }
.dashboard-tasks li { min-width: 0; display: grid; grid-template-columns: 22px minmax(0,1fr) auto; align-items: center; gap: 7px; padding: 9px 0; border-top: 1px solid #edf0f5; }
.dashboard-tasks li > i { color: #8b96a8; font: 550 8px var(--mono); font-style: normal; }
.dashboard-tasks li > span { overflow: hidden; color: #485468; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-tasks li > em { padding: 2px 5px; border-radius: 4px; color: #8d5b1a; background: #fff2df; font-size: 8px; font-style: normal; }

@media (max-width: 1180px) and (min-width: 801px) {
  .dashboard-metrics { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "progress progress" "project tasks" "assets assets"; }
  .dashboard-metric { min-height: 96px; }
}

@media (max-width: 800px) {
  .workspace-section { height: auto; overflow: visible; }
  .workbench-home { padding: 24px 0 48px; }
  .dashboard-head { align-items: flex-start; flex-direction: column; gap: 18px; }
  .dashboard-head-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .dashboard-metrics { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; grid-template-areas: "progress" "project" "assets" "tasks"; }
  .progress-track { grid-template-columns: 1fr 1fr; }
  .progress-track::before { display: none; }
}

@media (max-width: 520px) {
  .dashboard-metrics { grid-template-columns: 1fr; }
  .progress-track { grid-template-columns: 1fr; }
}

/* Module library: keep the page frame still and scroll only its two data panes. */
@media (min-width: 801px) {
  .asset-management.workspace-section {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 0;
    overflow: hidden;
  }

  .asset-management-head,
  .asset-toolbar { flex: 0 0 auto; }

  .asset-manager-body {
    min-height: 0;
    height: 100%;
    align-items: stretch;
    overflow: hidden;
  }

  .module-list,
  .module-detail {
    height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cbd3e1 transparent;
  }

  .module-detail { position: static; top: auto; }

  .module-list::-webkit-scrollbar,
  .module-detail::-webkit-scrollbar { width: 7px; }

  .module-list::-webkit-scrollbar-thumb,
  .module-detail::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 99px;
    background: #cbd3e1;
    background-clip: padding-box;
  }

  .module-list::-webkit-scrollbar-track,
  .module-detail::-webkit-scrollbar-track { background: transparent; }

}

/* Dashboard rhythm: a limited icon set and stable card proportions. */
@media (min-width: 1181px) {
  .dashboard-grid { grid-template-rows: minmax(178px, auto) minmax(152px, auto); }
  .dashboard-panel { height: 100%; }
}

.dashboard-metric,
.dashboard-panel { isolation: isolate; }

.dashboard-metric::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -24px;
  right: -24px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--metric-bg, var(--blue-soft));
  opacity: .52;
}

/* Home stays in one desktop viewport; only the 01–04 work areas may scroll. */
@media (min-width: 801px) {
  .workbench-home.workspace-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 0;
    align-items: stretch;
    align-content: start;
    overflow: hidden;
  }

  .workbench-home.workspace-section > * { min-width: 0; width: 100%; }

  .dashboard-head { min-height: 96px; padding-top: 4px; padding-bottom: 16px; }
  .dashboard-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 14px 0 12px;
  }

  .dashboard-metric { min-height: 102px; }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    grid-template-areas: "progress project" "assets tasks";
    grid-template-rows: 210px 184px;
  }

  .dashboard-panel { height: 100%; overflow: hidden; }
  .dashboard-progress { display: grid; grid-template-rows: auto minmax(0, 1fr); }
  .dashboard-progress .progress-track { width: 100%; margin-top: 0; align-self: center; }
  .dashboard-project h3 { margin-top: 13px; }
  .dashboard-project > p { min-height: 0; }
  .dashboard-project .project-evidence { margin-top: 11px; }
  .dashboard-assets .asset-chart { margin-top: 13px; gap: 9px; }
  .dashboard-tasks li { padding-block: 7px; }
}

/* Four restrained CSS icons share one visual language. */
.metric-icon { position: relative; }
.metric-icon::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: .22;
}

.icon-material::before {
  content: "";
  width: 14px;
  height: 17px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, currentColor 3px 4px);
  opacity: .82;
}

.icon-modules::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 1.5px;
  background: currentColor;
  box-shadow: 8px 0 currentColor, 0 8px currentColor, 8px 8px currentColor;
  transform: translate(-4px, -4px);
  opacity: .8;
}

.icon-scenes::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 1.7px solid currentColor;
  border-radius: 3px;
  transform: rotate(45deg);
  opacity: .8;
}

.icon-question::before {
  content: "?";
  font: 750 16px/1 var(--body);
  opacity: .84;
}

@media (max-height: 820px) and (min-width: 801px) {
  .dashboard-head { min-height: 82px; }
  .dashboard-head h1 { font-size: 34px; }
  .dashboard-head p { margin-top: 6px; }
  .dashboard-metrics { margin-top: 10px; }
  .dashboard-metric { min-height: 90px; padding-block: 12px; }
  .dashboard-grid { grid-template-rows: 184px 176px; }
  .dashboard-panel { padding: 16px; }
  .dashboard-project h3 { margin-top: 9px; }
  .project-tags { margin-top: 8px; }
  .dashboard-project .project-evidence { margin-top: 8px; }
}

/* Final desktop canvas model: the route never scrolls, only its content panes do. */
@media (min-width: 801px) {
  .workspace-section {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .section-grid.workspace-section {
    align-content: stretch;
    grid-auto-rows: minmax(0, 1fr);
  }

  .section-grid.workspace-section > .card,
  .assemble-section.workspace-section > .card {
    height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cbd3e1 transparent;
  }

  .assemble-section.workspace-section { margin: 0; }
  .assemble-section.workspace-section > .card { max-width: none; }

  .result-section.workspace-section {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .result-section.workspace-section .result-body {
    min-height: 0;
    overflow: hidden;
  }

  .result-section.workspace-section #customerResult,
  .result-section.workspace-section #solutionResult {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cbd3e1 transparent;
  }

  .section-grid.workspace-section > .card::-webkit-scrollbar,
  .assemble-section.workspace-section > .card::-webkit-scrollbar,
  .result-section.workspace-section #solutionResult::-webkit-scrollbar { width: 7px; }

  .section-grid.workspace-section > .card::-webkit-scrollbar-thumb,
  .assemble-section.workspace-section > .card::-webkit-scrollbar-thumb,
  .result-section.workspace-section #solutionResult::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 99px;
    background: #cbd3e1;
    background-clip: padding-box;
  }

  .workbench-home.workspace-section {
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .dashboard-grid {
    height: 100%;
    min-height: 0;
    grid-template-rows: minmax(0, 1.24fr) minmax(0, .9fr);
  }

  .dashboard-progress,
  .dashboard-assets { display: grid; grid-template-rows: auto minmax(0, 1fr); }
  .dashboard-progress .progress-track,
  .dashboard-assets .asset-chart { align-self: center; }

  .dashboard-project { display: flex; flex-direction: column; }
  .dashboard-project .project-evidence { margin-top: auto; }

  .dashboard-tasks { display: grid; grid-template-rows: auto minmax(0, 1fr); }
  .dashboard-tasks ul { min-height: 0; display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); }
}

/* Remove the four pale corner circles requested in the dashboard metric cards. */
.dashboard-metric::after { display: none; }

/* Three annotated refinements: tighter navigation, centered metrics, rebuilt flow. */
@media (min-width: 801px) {
  .brand-lockup { margin-bottom: 32px; }
  .sidebar nav { gap: 4px; }
  .sidebar nav a {
    min-height: 46px;
    padding-inline: 12px;
    border-radius: 11px;
  }

  .dashboard-metric {
    grid-template-rows: auto auto;
    align-content: center;
    align-items: center;
  }

  .dashboard-metric .metric-icon {
    grid-row: 1 / 3;
    align-self: center;
    justify-self: center;
  }

  .dashboard-metric div,
  .dashboard-metric p { align-self: center; }

  .dashboard-progress .progress-track {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: center;
    padding: 16px 0 4px;
  }

  .dashboard-progress .progress-track::before {
    top: 50%;
    left: 7%;
    right: 7%;
    transform: translateY(-50%);
    background: #dbe1ec;
  }

  .dashboard-progress .progress-step {
    min-height: 106px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 13px;
    border: 1px solid #e0e5ee;
    border-radius: 14px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 7px 18px rgba(16,24,40,.045);
  }

  .dashboard-progress .progress-step:hover:not(:disabled) {
    border-color: #cfd7e6;
    background: #fff;
  }

  .dashboard-progress .progress-step.done {
    border-color: #d7dfff;
    background: #f8f9ff;
  }

  .dashboard-progress .progress-step.active {
    border-color: #bfcaff;
    background: var(--blue-soft);
  }

  .dashboard-progress .progress-step > i {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .dashboard-progress .progress-step span { padding-top: 0; }
  .dashboard-progress .progress-step b {
    line-height: 1.45;
    text-overflow: clip;
    white-space: normal;
  }
  .dashboard-progress .progress-step small { margin-top: 5px; line-height: 1.5; }
}

/* Rebuilt first dashboard row: compact project visual + progress visualization. */
@media (min-width: 801px) {
  .dashboard-progress {
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .flow-overview {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    margin-top: 14px;
    padding: 13px 15px;
    border: 1px solid #e3e7ef;
    border-radius: 14px;
    background: #f8f9fc;
  }

  .flow-score { padding-right: 16px; border-right: 1px solid #dde3ed; }
  .flow-score strong,
  .flow-score span { display: block; }
  .flow-score strong { color: var(--ink-strong); font-size: 25px; line-height: 1; letter-spacing: -.05em; }
  .flow-score span { margin-top: 6px; color: #7a8597; font-size: 9px; }
  .flow-visual { min-width: 0; }
  .flow-visual > div { height: 7px; overflow: hidden; border-radius: 99px; background: #e8ebf2; }
  .flow-visual > div i { display: block; width: 50%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3154f5, #7186f8); }
  .flow-visual p { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 7px 0 0; }
  .flow-visual p b { color: #425069; font-size: 9px; }
  .flow-visual p span { overflow: hidden; color: #8a95a7; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

  .dashboard-progress .progress-track {
    align-self: end;
    min-height: 78px;
    gap: 0;
    padding: 10px 0 0;
  }

  .dashboard-progress .progress-track::before {
    top: 28px;
    left: 10%;
    right: 10%;
    transform: none;
  }

  .dashboard-progress .progress-step,
  .dashboard-progress .progress-step:hover:not(:disabled),
  .dashboard-progress .progress-step.done,
  .dashboard-progress .progress-step.active {
    min-height: 76px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 38px auto;
    justify-items: center;
    align-items: start;
    gap: 7px;
    padding: 0 7px;
    border: 0;
    border-radius: 0;
    text-align: center;
    background: transparent;
    box-shadow: none;
  }

  .dashboard-progress .progress-step > i {
    width: 38px;
    height: 38px;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 0 6px #fff;
  }

  .dashboard-progress .progress-step.active > i { box-shadow: 0 0 0 6px #fff, 0 0 0 9px rgba(49,84,245,.07); }
  .dashboard-progress .progress-step span { min-width: 0; }
  .dashboard-progress .progress-step b { font-size: 10px; line-height: 1.35; }
  .dashboard-progress .progress-step small { margin-top: 2px; font-size: 8px; line-height: 1.35; }

  .dashboard-project { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
  .project-overview {
    min-height: 0;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 17px;
    align-items: center;
    margin-top: 12px;
  }

  .project-ring {
    width: 92px;
    height: 92px;
    position: relative;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--blue) 0 72%, #e9edf4 72% 100%);
  }

  .project-ring::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 1px #edf0f5;
  }

  .project-ring span { position: relative; z-index: 1; text-align: center; }
  .project-ring b,
  .project-ring small { display: block; }
  .project-ring b { color: var(--ink-strong); font-size: 19px; line-height: 1; }
  .project-ring small { margin-top: 5px; color: #8290a4; font-size: 8px; }
  .project-copy { min-width: 0; }
  .project-copy h3 { margin: 0 0 7px; color: var(--ink-strong); font-size: 13px; line-height: 1.45; }
  .project-copy > p { margin: 0; color: #778397; font-size: 9px; line-height: 1.65; }
  .project-copy .project-tags { margin-top: 9px; }
  .project-level {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding-top: 11px;
    border-top: 1px solid #edf0f5;
    color: #7c8799;
    font-size: 8px;
  }
  .project-level strong { padding: 3px 7px; border-radius: 6px; color: var(--blue); background: var(--blue-soft); font: 650 9px var(--mono); }
  .project-level small { overflow: hidden; color: #929cad; font-size: 8px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-width: 1050px) and (min-width: 801px) {
  .project-overview { grid-template-columns: 78px minmax(0, 1fr); gap: 11px; }
  .project-ring { width: 74px; height: 74px; }
  .project-ring::before { inset: 7px; }
  .project-ring b { font-size: 16px; }
}

/* Simplified metrics and active flow marker from the latest annotations. */
@media (min-width: 801px) {
  .dashboard-metric {
    grid-template-rows: auto;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 14px;
    padding-inline: 20px;
  }

  .dashboard-metric .metric-icon {
    grid-row: 1;
    width: 46px;
    height: 46px;
    border-radius: 13px;
  }

  .dashboard-metric div { align-self: center; }
  .dashboard-metric small { margin-bottom: 9px; }
  .dashboard-metric strong { font-size: 27px; }

  .dashboard-progress .progress-step > i,
  .dashboard-progress .progress-step.active > i {
    box-shadow: none;
  }
}

/* Quiet hover feedback on the dashboard; no floating or scaling motion. */
@media (hover: hover) and (pointer: fine) {
  .dashboard-metric,
  .dashboard-panel {
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
  }

  .dashboard-metric:hover,
  .dashboard-panel:hover {
    border-color: #e0e4eb;
    background: #f8f9fb;
    box-shadow: 0 6px 18px rgba(16,24,40,.04);
  }

  .dashboard-project .project-ring::before { transition: background-color .18s ease; }
  .dashboard-project:hover .project-ring::before { background: #f8f9fb; }
}

/* Let both material cards use more of the available viewport height. */
@media (min-width: 801px) {
  #asset.workspace-section { padding-bottom: 2px; }
}

/* Responsive layout contract: one predictable composition per viewport size. */
.workspace-section,
.workspace-section > *,
.dashboard-grid > *,
.section-grid > *,
.solution > *,
.asset-manager-body > * { min-width: 0; }

.solution-box,
.candidate,
.module-row-copy,
.project-copy { overflow-wrap: anywhere; }

@media (min-width: 1181px) {
  .shell { grid-template-columns: clamp(232px, 13.7vw, 280px) minmax(0, 1fr); }
  main { padding-inline: clamp(26px, 3.7vw, 64px); }

  .dashboard-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1.42fr) minmax(300px, .68fr);
    grid-template-areas: "progress project" "assets tasks";
  }
}

/* Laptop and compact desktop: retain the full dashboard without creating extra rows. */
@media (min-width: 801px) and (max-width: 1180px) {
  .shell { grid-template-columns: clamp(196px, 22vw, 232px) minmax(0, 1fr); }
  .sidebar { padding: 24px 14px 20px; }
  .brand-lockup { margin-bottom: 22px; }
  .brand { gap: 10px; }
  .brand-word { font-size: 23px; }
  .sidebar nav a { min-height: 43px; padding-inline: 10px; }

  main { padding: 18px clamp(16px, 2.4vw, 28px); }
  .workspace-section { padding: 0 4px 8px 0; }

  .dashboard-head { min-height: 80px; gap: 18px; padding-block: 0 12px; }
  .dashboard-head h1 { font-size: clamp(29px, 3.4vw, 37px); }
  .dashboard-head p { max-width: 540px; margin-top: 6px; font-size: 10px; }
  .dashboard-head-actions { gap: 8px; }
  .dashboard-live { min-height: 34px; padding-inline: 10px; font-size: 9px; }
  .dashboard-head-actions button { min-width: 112px; min-height: 36px; padding-inline: 10px; }

  .dashboard-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 9px 0 8px;
  }
  .dashboard-metric {
    min-height: 76px;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px;
    padding: 10px;
  }
  .dashboard-metric .metric-icon { width: 34px; height: 34px; border-radius: 10px; }
  .dashboard-metric small { margin-bottom: 6px; font-size: 8px; white-space: nowrap; }
  .dashboard-metric strong { font-size: 22px; }
  .dashboard-metric em { font-size: 8px; }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.28fr) minmax(240px, .72fr);
    grid-template-areas: "progress project" "assets tasks";
    grid-template-rows: minmax(0, 1.16fr) minmax(0, .84fr);
    gap: 8px;
  }
  .dashboard-panel { padding: 13px; border-radius: 14px; }
  .panel-heading h2 { font-size: 16px; }
  .flow-overview { grid-template-columns: 72px minmax(0, 1fr); gap: 11px; margin-top: 8px; padding: 9px 11px; }
  .flow-score { padding-right: 10px; }
  .flow-score strong { font-size: 21px; }
  .flow-visual p span { max-width: 58%; }
  .dashboard-progress .progress-track { min-height: 64px; padding-top: 6px; }
  .dashboard-progress .progress-track::before { top: 23px; }
  .dashboard-progress .progress-step,
  .dashboard-progress .progress-step:hover:not(:disabled),
  .dashboard-progress .progress-step.done,
  .dashboard-progress .progress-step.active {
    min-height: 62px;
    grid-template-rows: 32px auto;
    gap: 4px;
    padding-inline: 3px;
  }
  .dashboard-progress .progress-step > i { width: 32px; height: 32px; }
  .dashboard-progress .progress-step b { font-size: 9px; }
  .dashboard-progress .progress-step small { font-size: 7px; }

  .project-overview { grid-template-columns: 66px minmax(0, 1fr); gap: 9px; margin-top: 7px; }
  .project-ring { width: 64px; height: 64px; }
  .project-ring::before { inset: 6px; }
  .project-ring b { font-size: 15px; }
  .project-ring small { font-size: 7px; }
  .project-copy h3 { font-size: 11px; }
  .project-copy > p { font-size: 8px; line-height: 1.5; }
  .project-copy .project-tags { margin-top: 5px; }
  .project-tags i { padding: 2px 5px; font-size: 7px; }
  .project-level { padding-top: 7px; }

  .asset-chart { gap: 7px; margin-top: 9px; }
  .asset-chart > div { grid-template-columns: 68px minmax(0, 1fr) 28px; gap: 7px; }
  .dashboard-tasks ul { margin-top: 6px; }
  .dashboard-tasks li { padding-block: 5px; }

  .section-grid,
  .section-grid.reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .section-grid.workspace-section { gap: 10px; }
  .section-grid.workspace-section > .card { padding: 17px; }
  .card h2 { font-size: clamp(21px, 2.5vw, 27px); }
  .source-types { gap: 5px; }
  .source-type { padding-inline: 8px; font-size: 9px; }

  .asset-management.workspace-section,
  .result-section.workspace-section { padding: 17px; }
  .asset-management-head { gap: 12px; }
  .asset-management-head p { max-width: 520px; }
  .asset-metrics div { min-width: 72px; padding: 9px 10px; }
  .asset-toolbar { grid-template-columns: minmax(180px, 1fr) minmax(150px, 190px) auto; gap: 8px; }
  .asset-manager-body { grid-template-columns: minmax(0, 1.12fr) minmax(240px, .88fr); gap: 10px; }

  .solution { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .solution-box { padding: 13px; }
}

/* Short screens keep the frame fixed and make only dense content areas scroll. */
@media (min-width: 801px) and (max-height: 700px) {
  main { padding-block: 12px; }
  .dashboard-head { min-height: 66px; }
  .dashboard-head h1 { font-size: 28px; }
  .dashboard-metrics { margin-block: 7px; }
  .dashboard-metric { min-height: 68px; }
  .dashboard-panel { padding: 11px; }
  .flow-overview { margin-top: 6px; padding-block: 7px; }
  .dashboard-progress .progress-track { min-height: 56px; }
}

/* Tablet and phone: five routes remain on one row; content reflows without overflow. */
@media (max-width: 800px) {
  .shell { min-width: 0; }
  .sidebar { padding: 10px 12px 9px; }
  .brand-lockup { display: flex; justify-content: center; }
  .sidebar nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    margin-top: 8px;
  }
  .sidebar nav a {
    min-width: 0;
    min-height: 42px;
    padding: 5px 4px;
    line-height: 1.25;
    white-space: normal;
  }

  main { width: 100%; padding: 14px clamp(12px, 4vw, 22px) 40px; }
  .workspace-section { width: 100%; padding: 0; }
  .dashboard-head { gap: 13px; padding: 4px 0 15px; }
  .dashboard-head h1 { font-size: clamp(30px, 9vw, 40px); }
  .dashboard-head-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .dashboard-head-actions > * { width: 100%; justify-content: center; }
  .dashboard-metrics { gap: 8px; margin: 12px 0; }
  .dashboard-metric { min-height: 88px; padding: 12px; }
  .dashboard-grid { gap: 10px; }
  .dashboard-panel { padding: 16px; }
  .flow-overview { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; margin-top: 12px; padding: 11px; }
  .flow-score { padding-right: 11px; border-right: 1px solid #dde3ed; }
  .flow-score strong,
  .flow-score span { display: block; }
  .flow-score strong { font-size: 22px; }
  .flow-score span { margin-top: 4px; color: #7a8597; font-size: 8px; }
  .flow-visual p { display: block; margin: 7px 0 0; }
  .flow-visual p b,
  .flow-visual p span { display: block; font-size: 8px; }
  .flow-visual p span { margin-top: 3px; }

  .progress-track { gap: 8px; }
  .progress-step { min-height: 78px; padding: 9px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
  .progress-step span { padding-top: 2px; }
  .progress-step small { margin-top: 5px; }

  .project-overview { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 14px; align-items: center; margin-top: 12px; }
  .project-ring { width: 82px; height: 82px; position: relative; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--blue) 0 72%, #e9edf4 72% 100%); }
  .project-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
  .project-ring span { position: relative; text-align: center; }
  .project-ring b,
  .project-ring small { display: block; }
  .project-ring small { color: #8290a4; font-size: 7px; }
  .project-level { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 8px; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid #edf0f5; }

  .asset-management-head { gap: 14px; }
  .asset-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .asset-metrics div { min-width: 0; }
  .module-list,
  .module-detail { min-height: 260px; }
  .solution-box { padding: 15px; }
}

@media (max-width: 520px) {
  .brand-word { font-size: 19px; }
  .sidebar nav a { min-height: 46px; font-size: 8px; }
  .dashboard-head-actions { grid-template-columns: 1fr; }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-metric { min-height: 82px; grid-template-columns: 36px minmax(0, 1fr); gap: 9px; padding: 10px; }
  .dashboard-metric .metric-icon { width: 34px; height: 34px; }
  .dashboard-metric strong { font-size: 22px; }
  .progress-track { grid-template-columns: 1fr 1fr; }
  .project-overview { grid-template-columns: 72px minmax(0, 1fr); }
  .project-ring { width: 68px; height: 68px; }
  .asset-chart > div { grid-template-columns: 72px minmax(0, 1fr) 30px; gap: 7px; }
  .asset-metrics { grid-template-columns: 1fr; }
  .module-row { grid-template-columns: 72px minmax(0, 1fr); padding-inline: 10px; }
  .module-row-id { font-size: 8px; }
  .assemble-section #demandResult { grid-template-columns: 1fr; }
}

/* Capability library: cards turn the dense asset list into a scannable gallery. */
@media (min-width: 801px) {
  .asset-manager-body { grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); }

  .module-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 12px;
    padding: 12px;
    border: 0;
    border-radius: 16px;
    background: #f4f6fb;
  }

  .module-row {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    min-height: 156px;
    padding: 15px 16px 13px;
    overflow: hidden;
    border: 1px solid #e0e5ef;
    border-radius: 13px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
  }

  .module-row::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    opacity: 0;
    background: var(--blue);
    transition: opacity .18s ease;
  }

  .module-row:last-child { border-bottom: 1px solid #e0e5ef; }
  .module-row:hover:not(:disabled) {
    border-color: #c9d3ec;
    background: #fff;
    box-shadow: 0 8px 20px rgba(25, 42, 85, .08);
  }
  .module-row.selected {
    border-color: #9fafee;
    background: #f9faff;
    box-shadow: 0 9px 22px rgba(49, 84, 245, .11);
  }
  .module-row.selected::before { opacity: 1; }

  .module-row-copy { display: flex; flex: 1; flex-direction: column; padding-left: 0; }
  .module-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
  .module-card-meta i { padding: 3px 6px; border-radius: 5px; color: #3154d8; background: #eef2ff; font: 600 9px/1.3 var(--mono); font-style: normal; letter-spacing: .03em; }
  .module-card-meta em { overflow: hidden; color: #98a3b5; font: 500 9px/1.3 var(--mono); font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
  .module-row-copy b { padding-right: 24px; font-size: 14px; line-height: 1.42; }
  .module-row-copy small { min-height: 34px; margin-top: 5px; font-size: 11px; line-height: 1.55; }
  .module-row-copy .tags { min-height: 24px; margin-top: auto; padding-top: 10px; overflow: hidden; flex-wrap: nowrap; }
  .module-row-copy .tag { overflow: hidden; max-width: 46%; text-overflow: ellipsis; white-space: nowrap; }
  .module-card-arrow { position: absolute; top: 38px; right: 16px; color: #9ba7bd; font: 500 17px/1 var(--mono); transition: color .18s ease, transform .18s ease; }
  .module-row:hover .module-card-arrow,
  .module-row.selected .module-card-arrow { color: var(--blue); transform: translate(2px, -2px); }
}

@media (max-width: 800px) {
  .module-list { display: grid; gap: 9px; padding: 9px; background: #f4f6fb; }
  .module-row { position: relative; display: block; min-height: 124px; padding: 13px 40px 12px 13px; border: 1px solid #e0e5ef; border-radius: 12px; background: #fff; }
  .module-row + .module-row { border-top: 1px solid #e0e5ef; }
  .module-row.selected { border-color: #9fafee; box-shadow: inset 3px 0 0 var(--blue); }
  .module-row-copy { padding-left: 0; }
  .module-card-meta { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
  .module-card-meta i { color: #3154d8; font: 600 9px var(--mono); font-style: normal; }
  .module-card-meta em { color: #98a3b5; font: 500 9px var(--mono); font-style: normal; }
  .module-card-arrow { position: absolute; top: 41px; right: 14px; color: var(--blue); font-size: 16px; }
}

/* Semantic navigation icons replace step numbers. */
.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  position: relative;
  display: grid;
  place-items: center;
  color: #929cab;
  background: transparent;
  transition: color .18s ease;
}

.sidebar nav a:hover .nav-icon,
.sidebar nav a.active .nav-icon { color: var(--blue); }
.nav-icon::before,
.nav-icon::after { content: ""; position: absolute; }
.nav-icon-home::before { width: 8px; height: 8px; border: 1.25px solid currentColor; border-radius: 2px; }
.nav-icon-material::before { width: 8px; height: 11px; border: 1.25px solid currentColor; border-radius: 1.5px; background: repeating-linear-gradient(to bottom, transparent 0 2.5px, currentColor 2.5px 3.5px); }
.nav-icon-library::before { width: 3px; height: 3px; border-radius: .75px; background: currentColor; box-shadow: 5px 0 currentColor, 0 5px currentColor, 5px 5px currentColor; transform: translate(-2.5px,-2.5px); }
.nav-icon-compose::before { width: 7px; height: 7px; border: 1.2px solid currentColor; border-radius: 1.5px; transform: rotate(45deg); }
.nav-icon-compose::after { display: none; }
.nav-icon-result::before { width: 9px; height: 6px; border-left: 1.4px solid currentColor; border-bottom: 1.4px solid currentColor; transform: translateY(-2px) rotate(-45deg); }

/* Four independent capabilities with a live, data-driven workspace distribution. */
.dashboard-progress { grid-template-rows: auto auto minmax(0, 1fr) !important; }

.workspace-distribution {
  min-width: 0;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  margin-top: 11px;
  padding: 11px 13px;
  border: 1px solid #e3e7ef;
  border-radius: 13px;
  background: #f8f9fc;
}

.distribution-copy { padding-right: 13px; border-right: 1px solid #dfe4ed; }
.distribution-copy strong,
.distribution-copy span { display: block; }
.distribution-copy strong { color: var(--ink-strong); font-size: 23px; line-height: 1; letter-spacing: -.05em; }
.distribution-copy span { margin-top: 5px; color: #7b8798; font-size: 8px; }
.distribution-visual { min-width: 0; }
.distribution-bar { height: 9px; display: flex; gap: 2px; overflow: hidden; border-radius: 99px; background: #e8ebf2; }
.distribution-bar i { width: var(--share, 0%); min-width: 0; height: 100%; transition: width .28s ease; }
.dist-material { background: #5f78f6; }
.dist-module { background: #8b78e8; }
.dist-demand { background: #67b7d2; }
.dist-solution { background: #ef9b86; }
.distribution-visual p { margin: 7px 0 0; overflow: hidden; color: #7a8699; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.capability-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 68px;
  gap: 8px;
  align-content: center;
  align-items: stretch;
  margin-top: 9px;
}

.capability-card {
  min-width: 0;
  height: 68px;
  min-height: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  grid-template-rows: 1fr;
  gap: 9px;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid #e2e7ef;
  border-radius: 12px;
  text-align: left;
  background: #fff;
  box-shadow: none;
}
.capability-card:hover:not(:disabled) { border-color: #d4dbe7; color: inherit; background: #f8f9fb; }
.capability-card > i { grid-column: 1; grid-row: 1; width: 32px; height: 32px; position: relative; display: grid; place-items: center; border-radius: 9px; color: var(--cap-color); background: var(--cap-bg); font-style: normal; }
.capability-card > i::before,
.capability-card > i::after { content: ""; position: absolute; }
.capability-card span { min-width: 0; grid-column: 2; grid-row: 1; align-self: center; }
.capability-card b,
.capability-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.capability-card b { color: var(--ink-strong); font-size: 9px; line-height: 1.3; }
.capability-card small { margin-top: 3px; color: #8a95a6; font-size: 7px; line-height: 1.3; }
.capability-card > strong { grid-column: 3; grid-row: 1; align-self: center; justify-self: end; color: var(--cap-color); font: 650 8px var(--mono); white-space: nowrap; }
.capability-material { --cap-color:#4967e8; --cap-bg:#edf1ff; }
.capability-library { --cap-color:#735fd2; --cap-bg:#f1efff; }
.capability-compose { --cap-color:#287d9d; --cap-bg:#eaf7fb; }
.capability-result { --cap-color:#b85a42; --cap-bg:#fff0ec; }
.capability-material > i::before { width: 10px; height: 13px; border: 1.3px solid currentColor; border-radius: 2px; background: repeating-linear-gradient(to bottom, transparent 0 3px, currentColor 3px 4px); }
.capability-library > i::before { width: 4px; height: 4px; border-radius: 1px; background: currentColor; box-shadow: 7px 0 currentColor, 0 7px currentColor, 7px 7px currentColor; transform: translate(-3.5px,-3.5px); }
.capability-compose > i::before { width: 9px; height: 9px; border: 1.3px solid currentColor; border-radius: 2px; transform: translate(-2px,-2px) rotate(45deg); }
.capability-compose > i::after { width: 9px; height: 9px; border: 1.3px solid currentColor; border-radius: 2px; transform: translate(3px,3px) rotate(45deg); opacity: .55; }
.capability-result > i::before { width: 11px; height: 7px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(-45deg); }

.project-ring { background: conic-gradient(var(--blue) 0 var(--project-score, 72%), #e9edf4 var(--project-score, 72%) 100%) !important; }

@media (min-width: 801px) and (max-width: 1180px) {
  .workspace-distribution { grid-template-columns: 72px minmax(0, 1fr); gap: 10px; margin-top: 7px; padding: 8px 10px; }
  .distribution-copy { padding-right: 9px; }
  .distribution-copy strong { font-size: 19px; }
  .capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 54px; gap: 6px; margin-top: 6px; }
  .capability-card { height: 54px; grid-template-columns: 27px minmax(0, 1fr) auto; gap: 7px; padding: 6px 9px; }
  .capability-card > i { width: 27px; height: 27px; border-radius: 7px; }
  .capability-card b { font-size: 8.5px; }
  .capability-card small { font-size: 7px; }
  .capability-card > strong { font-size: 7.5px; }
}

@media (max-width: 800px) {
  .nav-icon { width: 18px; height: 18px; flex: 0 0 18px; }
  .sidebar nav a { flex-direction: column; gap: 3px; }
  .workspace-distribution { grid-template-columns: 72px minmax(0, 1fr); }
  .capability-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 62px; }
  .capability-card { height: 62px; }
}

@media (max-width: 420px) {
  .sidebar nav a > span:last-child { display: none; }
  .sidebar nav a { min-height: 38px; }
  .capability-grid { grid-template-columns: 1fr; grid-auto-rows: 58px; }
  .capability-card { height: 58px; }
}

/* Compact evidence profile replaces the previous project summary card. */
.dashboard-evidence-profile {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.evidence-profile-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 12px;
}

.evidence-grade {
  width: 68px;
  height: 68px;
  display: grid;
  place-content: center;
  gap: 2px;
  border-radius: 16px;
  color: var(--blue);
  text-align: center;
  background: #f0f3ff;
}
.evidence-grade strong { font-size: 22px; line-height: 1; }
.evidence-grade span { color: #8994a6; font-size: 7px; }
.evidence-profile-copy { min-width: 0; }
.dashboard-evidence-profile .evidence-profile-copy h3 { margin: 0; font-size: 13px; line-height: 1.35; }
.evidence-profile-copy p { margin: 5px 0 8px; color: #778397; font-size: 8px; line-height: 1.55; }
.evidence-source-types { display: flex; flex-wrap: wrap; gap: 4px; }
.evidence-source-types i {
  max-width: 100%;
  overflow: hidden;
  padding: 3px 6px;
  border-radius: 6px;
  color: #63708a;
  font-size: 7px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #f1f3f7;
}

.evidence-confidence {
  min-width: 0;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e6e9ef;
}
.evidence-confidence > div { display: flex; align-items: center; justify-content: space-between; color: #7a8698; font-size: 7px; }
.evidence-confidence > div strong { color: var(--ink-strong); font-size: 9px; }
.evidence-confidence > b { height: 6px; display: block; overflow: hidden; margin-top: 6px; border-radius: 99px; background: #eceff4; }
.evidence-confidence > b i { width: var(--value, 72%); height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, #355af3, #7087f7); transition: width .28s ease; }
.evidence-confidence > small { display: block; margin-top: 5px; color: #8994a6; font-size: 7px; text-align: right; }

@media (min-width: 801px) and (max-width: 1180px) {
  .evidence-profile-main { grid-template-columns: 52px minmax(0, 1fr); gap: 9px; margin-top: 7px; }
  .evidence-grade { width: 52px; height: 52px; border-radius: 12px; }
  .evidence-grade strong { font-size: 18px; }
  .dashboard-evidence-profile .evidence-profile-copy h3 { font-size: 10px; }
  .evidence-profile-copy p { margin: 3px 0 5px; font-size: 6.5px; }
  .evidence-confidence { margin-top: 6px; padding-top: 6px; }
}

@media (max-width: 800px) {
  .evidence-profile-main { grid-template-columns: 58px minmax(0, 1fr); }
  .evidence-grade { width: 58px; height: 58px; }
}

/* Self-contained solution brief preview from the existing remote branch. */
.solution-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.solution-tabs button { border-color: #cfd6df; padding: 7px 10px; color: #576271; font: 700 11px var(--mono); }
.solution-tabs button.active { border-color: var(--blue); color: #fff; background: var(--blue); }
.tabs-spacer { flex: 1; min-width: 8px; }
.tag.gap { color: #c0311a; font-weight: 700; background: #ffe1dc; }
.report-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; min-width: 0; margin-bottom: 12px; padding: 10px 13px; border-left: 3px solid var(--blue); background: var(--blue-soft); }
.report-meta b { flex: 0 0 auto; font: 500 21px var(--mono); letter-spacing: 0; }
.report-meta > span { padding: 2px 6px; color: #fff; background: var(--ink); font: 10px var(--mono); }
.report-meta .tags { flex: 1 1 460px; min-width: 0; margin: 0; align-items: center; }
.report-meta .tag { max-width: 100%; white-space: nowrap; }
.report-meta small { width: 100%; min-width: 0; color: #5a6b8c; font: 10px/1.6 var(--mono); overflow-wrap: anywhere; }
.report-frame { border: 1px solid var(--line-strong); background: #fff; }
.report-frame iframe { width: 100%; height: 78vh; display: block; border: 0; }
#solutionResult:not(.empty) > .muted:last-child { margin: 9px 0 0; }

@media (max-width: 900px) {
  .report-frame iframe { height: 64vh; }
}
