:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-soft: #f9faf7;
  --ink: #1a2520;
  --muted: #68736d;
  --line: #dfe5df;
  --green: #287b62;
  --green-strong: #0f5a45;
  --green-soft: #e8f4ee;
  --blue: #315f86;
  --blue-soft: #eaf2f8;
  --gold: #b8871a;
  --gold-soft: #fff5df;
  --coral: #bd6a5b;
  --coral-soft: #fff0ed;
  --violet-soft: #f1edf8;
  --qw1: #287b62;
  --qw1-soft: #e8f4ee;
  --qw2: #315f86;
  --qw2-soft: #eaf2f8;
  --qw3: #b8871a;
  --qw3-soft: #fff5df;
  --df: #506b61;
  --df-soft: #edf3ef;
  --baisheng: #bd6a5b;
  --baisheng-soft: #fff0ed;
  --third: #6b7f92;
  --third-soft: #eef3f6;
  --source: #bd6a5b;
  --source-soft: #fff0ed;
  --pmo: #6f7680;
  --pmo-soft: #f1f3f5;
  --shadow: 0 18px 45px rgba(33, 48, 39, 0.08);
  --sidebar: 284px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
}

body.auth-locked {
  overflow: hidden;
}

body.auth-locked .sidebar,
body.auth-locked .workspace,
body.auth-locked .sidebar-toggle {
  display: none;
}

button,
input,
select {
  font: inherit;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 16%, rgba(40, 123, 98, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(246, 247, 244, 0.96)),
    var(--bg);
}

body.auth-locked .auth-screen {
  display: grid;
}

.auth-card {
  width: min(430px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid rgba(210, 219, 212, 0.95);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(33, 48, 39, 0.13);
}

.auth-card h2 {
  margin: 2px 0 4px;
  font-size: 28px;
  line-height: 1.1;
}

.auth-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.form-field input,
.form-field select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.form-field input[type="file"] {
  height: auto;
  min-height: 44px;
  padding: 10px 12px;
}

.form-field input:focus,
.form-field select:focus {
  border-color: rgba(40, 123, 98, 0.55);
  box-shadow: 0 0 0 3px rgba(40, 123, 98, 0.12);
}

.primary-action {
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--green-strong);
  color: white;
  font-weight: 850;
  cursor: pointer;
}

.primary-action:hover {
  background: var(--green);
}

.auth-error {
  min-height: 18px;
  color: #a33d31 !important;
  font-size: 12px !important;
  font-weight: 800;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: rgba(255, 255, 255, 0.78);
  border-right: 1px solid rgba(199, 211, 203, 0.78);
  backdrop-filter: blur(24px);
  z-index: 10;
}

.sidebar-toggle {
  position: fixed;
  left: calc(var(--sidebar) - 56px);
  top: 18px;
  z-index: 42;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--green-strong);
  box-shadow: 0 10px 30px rgba(33, 48, 39, 0.1);
  cursor: pointer;
}

body.sidebar-collapsed .sidebar {
  transform: translateX(calc(-1 * var(--sidebar)));
}

body.sidebar-collapsed .workspace {
  margin-left: 0;
}

body.sidebar-collapsed .sidebar-toggle {
  left: 18px;
}

.sidebar,
.workspace,
.sidebar-toggle {
  transition:
    transform 220ms ease,
    margin-left 220ms ease,
    left 220ms ease;
}

.brand-block {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, var(--green-strong), #5aa780);
  font-weight: 800;
}

.brand-block h1 {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.search-box {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.search-box span {
  color: var(--muted);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

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

.nav-link {
  display: block;
  padding: 11px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
}

.nav-link.active,
.nav-link:hover {
  color: var(--green-strong);
  background: var(--green-soft);
}

.sidebar-status {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.sidebar-status p,
.sidebar-status span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.sidebar-status strong {
  display: block;
  margin: 5px 0;
  font-size: 15px;
}

.user-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.user-bar span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.user-bar strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-bar button,
.secondary-action,
.danger-action {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.user-bar button:hover,
.secondary-action:hover {
  background: var(--green-soft);
}

.danger-action {
  color: #a33d31;
}

.danger-action:hover {
  background: var(--coral-soft);
}

.workspace {
  margin-left: var(--sidebar);
  padding: 28px 34px 52px;
}

.panel {
  max-width: 1360px;
  margin: 0 auto;
  padding: 28px 0 42px;
  border-bottom: 1px solid rgba(210, 219, 212, 0.8);
}

.hero-panel {
  padding-top: 10px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.head-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.fullscreen-btn {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--green-strong);
  box-shadow: 0 8px 24px rgba(33, 48, 39, 0.08);
  cursor: pointer;
  font-size: 19px;
  line-height: 1;
}

.fullscreen-btn:hover,
.sidebar-toggle:hover {
  background: var(--green-soft);
}

body.panel-fullscreen {
  overflow: hidden;
}

.panel.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 35;
  max-width: none;
  margin: 0;
  padding: 30px 34px 50px;
  overflow: auto;
  border: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 247, 244, 0.98)),
    var(--bg);
}

.panel.is-fullscreen .section-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0 0 14px;
  background: linear-gradient(180deg, rgba(246, 247, 244, 0.98), rgba(246, 247, 244, 0.82));
  backdrop-filter: blur(18px);
}

.panel.is-fullscreen .fullscreen-btn {
  background: var(--green-strong);
  color: white;
}

body.panel-fullscreen .sidebar,
body.panel-fullscreen .sidebar-toggle {
  display: none;
}

.section-head h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
}

.status-pill {
  flex: 0 0 auto;
  max-width: 360px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.overview-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.metric-strip {
  display: grid;
  gap: 10px;
}

.admin-console {
  display: grid;
  gap: 18px;
}

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

.admin-panel,
.user-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.admin-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.admin-panel h3,
.user-list h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.admin-panel p,
.user-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.permission-toggle {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(249, 250, 247, 0.78);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.permission-toggle input {
  width: 34px;
  height: 20px;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #cbd5cf;
  position: relative;
  cursor: pointer;
}

.permission-toggle input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: white;
  box-shadow: 0 2px 6px rgba(33, 48, 39, 0.22);
  transition: transform 160ms ease;
}

.permission-toggle input:checked {
  background: var(--green);
}

.permission-toggle input:checked::after {
  transform: translateX(14px);
}

.permission-toggle input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.admin-message {
  min-height: 18px;
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 850;
}

.user-list {
  display: grid;
  gap: 12px;
}

.user-row {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.user-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.user-row-head h4 {
  margin: 0;
  font-size: 18px;
}

.user-row-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.user-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.document-library {
  display: grid;
  gap: 18px;
}

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

.doc-summary article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.doc-summary span,
.doc-folder-head span,
.doc-file-card span,
.folder-admin-row span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.doc-summary strong {
  display: block;
  margin: 4px 0;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.1;
}

.doc-summary p,
.doc-folder-head p,
.doc-file-card p,
.empty-copy {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.document-tree {
  display: grid;
  gap: 14px;
}

.doc-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.doc-toolbar button {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.doc-toolbar button:hover {
  background: var(--green-soft);
}

.doc-folder {
  display: block;
  margin-left: calc(var(--depth, 0) * 18px);
  border: 1px solid rgba(210, 219, 212, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  overflow: hidden;
}

.doc-folder-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.doc-folder-head::-webkit-details-marker {
  display: none;
}

.doc-folder-head::before {
  content: "›";
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-strong);
  font-size: 18px;
  font-weight: 850;
  line-height: 1;
  transition: transform 0.18s ease;
}

.doc-folder[open] > .doc-folder-head::before {
  transform: rotate(90deg);
}

.doc-folder-title {
  min-width: 0;
}

.doc-folder-head h3 {
  margin: 2px 0 3px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.doc-folder-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.doc-folder-meta b,
.doc-folder-meta em {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green-strong);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.doc-folder-meta em {
  background: rgba(246, 247, 243, 0.92);
  color: var(--muted);
}

.doc-folder-body {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px 48px;
}

.doc-folder[open] > .doc-folder-body {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.doc-file-list {
  display: grid;
  gap: 8px;
}

.doc-file-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(210, 219, 212, 0.82);
  border-radius: 8px;
  background: rgba(249, 250, 247, 0.82);
}

.doc-file-card h4 {
  margin: 2px 0 3px;
  font-size: 15px;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.download-action {
  display: grid;
  place-items: center;
  min-width: 72px;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--green-strong);
  color: white;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.download-action:hover {
  background: var(--green);
}

.empty-state {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.empty-state h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.doc-admin-section {
  display: grid;
  gap: 14px;
  padding-top: 4px;
}

.compact-head {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

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

.folder-admin-list {
  display: grid;
  gap: 8px;
}

.folder-admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(210, 219, 212, 0.84);
  border-radius: 8px;
  background: rgba(249, 250, 247, 0.78);
}

.folder-admin-row strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.metric-card,
.glass-card,
.module-profile,
.step-card,
.info-block,
.interface-card,
.id-card,
.boundary-item,
.timeline-item,
.risk-card,
.source-card,
.asset-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 14px;
}

.metric-card p,
.metric-card span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.metric-card strong {
  display: block;
  margin: 5px 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.15;
}

.audit-status-strip {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

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

.audit-status-card,
.handoff-card,
.module-addon,
.governance-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.audit-status-card {
  min-height: 116px;
  padding: 14px 15px;
}

.audit-status-card span,
.baseline-item span,
.addon-item span,
.governance-item span {
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 900;
}

.audit-status-card strong {
  display: block;
  margin: 5px 0;
  font-size: 20px;
  line-height: 1.2;
}

.audit-status-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.baseline-panel {
  display: grid;
  grid-template-columns: minmax(230px, 0.82fr) minmax(0, 1.12fr) minmax(280px, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(210, 219, 212, 0.85);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(232, 244, 238, 0.62), rgba(255, 255, 255, 0.9)),
    white;
}

.baseline-summary h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
}

.baseline-summary p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.legend-grid,
.baseline-list {
  display: grid;
  gap: 8px;
}

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

.legend-item,
.baseline-item {
  padding: 10px;
  border: 1px solid rgba(210, 219, 212, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.legend-item b {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.legend-item span,
.baseline-item em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.baseline-item strong {
  display: block;
  margin: 4px 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.architecture-shell {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.chart-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 10px;
  align-items: flex-start;
}

.chart-toolbar h3 {
  margin: 0;
  font-size: 19px;
}

.segmented-control {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.segmented-control button {
  border: 0;
  border-radius: 7px;
  padding: 8px 11px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.segmented-control button.selected {
  color: var(--green-strong);
  background: white;
  box-shadow: 0 1px 8px rgba(26, 37, 32, 0.08);
}

.architecture-graph,
.interface-map {
  width: 100%;
  overflow: hidden;
}

.architecture-graph svg,
.interface-map svg {
  display: block;
  width: 100%;
  height: auto;
}

.graph-node rect,
.small-node rect {
  fill: var(--blue-soft);
  stroke: #91b6d3;
  stroke-width: 2;
}

.output-node rect,
.small-node.warm rect {
  fill: var(--gold-soft);
  stroke: var(--gold);
}

.df-node rect:first-child,
.small-node.accent rect {
  fill: var(--green-soft);
  stroke: var(--green);
  stroke-width: 2;
}

.df-node rect:not(:first-child) {
  fill: rgba(255, 255, 255, 0.72);
  stroke: #9bd0bb;
}

svg text {
  fill: var(--ink);
  font-size: 18px;
  font-weight: 600;
}

svg .node-title {
  font-size: 20px;
  font-weight: 800;
}

.flow-line {
  fill: none;
  stroke: var(--green);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 10 12;
  animation: dash-flow 1.8s linear infinite;
}

.flow-line.outbound {
  stroke: var(--gold);
}

.muted-line {
  opacity: 0.14;
  animation-play-state: paused;
}

.line-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.muted-label {
  opacity: 0.2;
}

@keyframes dash-flow {
  to {
    stroke-dashoffset: -44;
  }
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.handoff-section {
  margin-top: 18px;
  padding: 18px;
  border-top: 1px solid var(--line);
}

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

.handoff-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

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

.handoff-meta div {
  padding: 9px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.handoff-meta span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.handoff-meta b {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.handoff-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.glass-card {
  padding: 18px;
}

.glass-card h3,
.module-profile h3,
.source-card h4 {
  margin: 0 0 8px;
}

.glass-card p,
.module-profile p,
.info-block li,
.interface-card p,
.risk-card p,
.source-card p {
  color: var(--muted);
}

.module-layout {
  display: grid;
  gap: 18px;
}

.module-layout > * {
  min-width: 0;
}

.module-profile {
  padding: 18px 20px;
  background:
    linear-gradient(135deg, rgba(232, 244, 238, 0.86), rgba(255, 255, 255, 0.92)),
    white;
}

.module-profile h3 {
  font-size: 16px;
  line-height: 1.45;
}

.owner-line {
  display: grid;
  gap: 4px;
  margin: 10px 0;
  padding: 10px 0 0;
  border-top: 1px solid rgba(210, 219, 212, 0.9);
}

.owner-line span,
.compact-section > span,
.mini-columns span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.chip.soft {
  background: var(--green-soft);
  color: var(--green-strong);
}

.chip.warm {
  background: var(--gold-soft);
  color: #835d08;
}

.module-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  align-items: stretch;
  gap: 10px;
}

.step-card {
  position: relative;
  padding: 18px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-code {
  width: 42px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--green);
  font-weight: 900;
}

.step-card h4,
.info-block h4,
.interface-card h4,
.id-card h4,
.boundary-item h4,
.timeline-item h4,
.risk-card h4 {
  margin: 0;
  font-size: 17px;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.step-connector {
  align-self: center;
  height: 4px;
  min-width: 30px;
  border-top: 3px dashed var(--green);
  animation: connector-flow 1.8s linear infinite;
}

@keyframes connector-flow {
  to {
    border-color: var(--gold);
  }
}

.mini-columns {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.mini-columns > div {
  display: grid;
  gap: 6px;
}

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

.info-block {
  padding: 18px;
}

.clean-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.clean-list li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
}

.clean-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.interface-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.interface-map {
  position: sticky;
  top: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.interface-map svg text {
  font-size: 17px;
}

.boundary-callout rect {
  fill: var(--surface-soft);
  stroke: var(--line);
}

.boundary-callout text {
  font-size: 15px;
  fill: var(--muted);
}

.interface-count {
  padding: 0 16px 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.interface-cards {
  display: grid;
  gap: 12px;
}

.interface-card {
  padding: 18px;
}

.card-topline {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-topline span {
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 900;
}

.card-topline strong {
  font-size: 20px;
}

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

.contract-grid div {
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.contract-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.contract-grid b {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.35;
}

.compact-section {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.risk-line {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--coral);
  font-size: 13px;
  font-weight: 700;
}

.id-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.subhead {
  margin: 0 0 12px;
  font-size: 20px;
}

.subcopy {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.governance-panel {
  display: grid;
  grid-template-columns: minmax(210px, 0.45fr) minmax(0, 1.55fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 18px;
  padding: 18px;
}

.governance-panel h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

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

.governance-item {
  padding: 12px;
  border: 1px solid rgba(210, 219, 212, 0.84);
  border-radius: 8px;
  background: var(--surface-soft);
}

.governance-item p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.governance-item:nth-child(n + 4) span {
  color: var(--coral);
}

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

.id-card {
  padding: 14px;
  min-height: 178px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.id-card span {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.id-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.id-card small {
  margin-top: auto;
  color: var(--ink);
  font-weight: 800;
}

.id-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.boundary-item {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.boundary-item p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.boundary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.timeline-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
}

.timeline-rail {
  position: relative;
  display: grid;
  gap: 12px;
}

.timeline-rail::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 8px;
  bottom: 8px;
  border-left: 2px dashed rgba(40, 123, 98, 0.34);
}

.timeline-item {
  position: relative;
  padding: 16px 16px 16px 48px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 22px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid white;
  background: var(--green);
  box-shadow: 0 0 0 1px var(--green);
}

.timeline-item.next::before {
  background: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.timeline-item.target::before {
  background: var(--coral);
  box-shadow: 0 0 0 1px var(--coral);
}

.timeline-item span,
.risk-card span,
.source-card span {
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 900;
}

.timeline-item p {
  margin: 6px 0 0;
  color: var(--muted);
}

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

.risk-board h3 {
  margin: 0 0 2px;
  font-size: 20px;
}

.risk-card {
  padding: 15px;
  border-left: 4px solid var(--gold);
}

.risk-card.high {
  border-left-color: var(--coral);
  background: linear-gradient(90deg, var(--coral-soft), rgba(255, 255, 255, 0.92));
}

.risk-card.medium {
  background: linear-gradient(90deg, var(--gold-soft), rgba(255, 255, 255, 0.92));
}

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

.source-card {
  padding: 16px;
}

.source-card code {
  display: block;
  margin-top: 12px;
  padding: 9px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.asset-card {
  margin: 0;
  overflow: hidden;
}

.asset-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: white;
}

.asset-card figcaption {
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.is-hidden {
  display: none !important;
}

.panel {
  display: none;
  min-height: calc(100vh - 56px);
  border-bottom: 0;
}

.panel.active-page,
.panel.is-fullscreen {
  display: block;
}

.overview-grid,
.interface-layout,
.id-layout,
.timeline-grid {
  grid-template-columns: 1fr;
}

.metric-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.architecture-shell,
.interface-map {
  position: static;
}

.architecture-graph,
.interface-map {
  min-height: 420px;
}

.command-grid,
.module-info-grid {
  grid-template-columns: 1fr;
}

.module-hero {
  display: grid;
  gap: 12px;
}

.module-hero > div:first-child {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
}

.module-hero > div:first-child .eyebrow {
  margin: 0;
}

.module-hero h3 {
  max-width: none;
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.45;
}

.module-cadence {
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  border: 1px solid rgba(40, 123, 98, 0.18);
  border-radius: 8px;
  background: rgba(232, 244, 238, 0.72);
}

.module-cadence span {
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 900;
}

.module-cadence strong {
  font-size: 14px;
  line-height: 1.45;
}

.process-board {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.sequence-board {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.sequence-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-top: 18px;
}

.sequence-group-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(210, 219, 212, 0.92);
  border-radius: 8px;
  background: rgba(251, 252, 250, 0.86);
}

.sequence-group-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 2px 2px 12px;
}

.sequence-group-head > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--qw1-soft);
  color: var(--qw1);
  font-size: 13px;
  font-weight: 900;
}

.sequence-group-head h4 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.sequence-group-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.board-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.board-head h3 {
  margin: 0;
  font-size: 23px;
}

.lane-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.process-stack {
  position: relative;
  display: grid;
  gap: 8px;
  padding-top: 16px;
}

.process-step {
  display: grid;
  grid-template-columns: 64px minmax(220px, 0.9fr) minmax(260px, 1fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid rgba(210, 219, 212, 0.95);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(249, 250, 247, 0.96), rgba(255, 255, 255, 0.96));
}

.process-index {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  align-self: center;
  border-radius: 8px;
  color: white;
  background: var(--green);
  font-weight: 900;
}

.process-main,
.process-data,
.process-interface {
  padding: 12px;
  border-radius: 8px;
  background: white;
}

.process-main {
  background: var(--green-soft);
}

.process-data {
  background: var(--blue-soft);
}

.process-interface {
  background: var(--gold-soft);
}

.process-main span,
.process-data span,
.process-interface span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.process-main h4 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.process-data p,
.process-interface p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.process-interface strong {
  display: block;
  margin-top: 7px;
  color: #835d08;
  font-size: 13px;
}

.vertical-flow-line {
  width: 3px;
  height: 22px;
  margin-left: 35px;
  border-left: 3px dashed var(--green);
  animation: connector-flow 1.8s linear infinite;
}

.module-section-stack {
  display: grid;
  gap: 12px;
}

.module-addon {
  padding: 18px;
}

.addon-summary {
  max-width: 920px;
  margin: 14px 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

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

.addon-item {
  padding: 13px;
  border: 1px solid rgba(210, 219, 212, 0.84);
  border-radius: 8px;
  background: var(--surface-soft);
}

.addon-item strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.addon-table {
  overflow-x: auto;
  border: 1px solid rgba(210, 219, 212, 0.9);
  border-radius: 8px;
  background: white;
}

.addon-row {
  display: grid;
  min-width: 860px;
}

.addon-row.cols-4 {
  grid-template-columns: 1fr 1fr 0.85fr 1.5fr;
}

.addon-row.cols-6 {
  min-width: 1180px;
  grid-template-columns: 1.22fr 1.08fr 0.9fr 1fr 1.05fr 0.9fr;
}

.addon-row span {
  min-width: 0;
  padding: 11px 10px;
  border-top: 1px solid rgba(210, 219, 212, 0.72);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.addon-row span + span {
  border-left: 1px solid rgba(210, 219, 212, 0.72);
}

.addon-head span {
  border-top: 0;
  background: var(--df-soft);
  color: var(--green-strong);
  font-weight: 900;
}

.wide-block {
  padding: 18px 20px;
}

.interface-cards {
  grid-template-columns: 1fr;
}

.interface-card {
  display: grid;
  gap: 12px;
}

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

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

.timeline-grid {
  gap: 22px;
}

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

.risk-board h3 {
  grid-column: 1 / -1;
}

.layer-band rect,
.interface-lane rect {
  fill: rgba(255, 255, 255, 0.84);
  stroke: var(--line);
}

.layer-band.df-band rect {
  fill: var(--green-soft);
  stroke: rgba(40, 123, 98, 0.36);
}

.layer-band.output-band rect {
  fill: var(--gold-soft);
  stroke: rgba(184, 135, 26, 0.42);
}

.layer-band text,
.interface-lane text {
  font-size: 21px;
  font-weight: 850;
}

svg .small-svg {
  fill: var(--muted);
  font-size: 15px;
  font-weight: 650;
}

.df-pipeline rect {
  fill: rgba(255, 255, 255, 0.78);
  stroke: #9bd0bb;
}

.mini-svg-card rect {
  fill: var(--blue-soft);
  stroke: #91b6d3;
}

.mini-svg-card.warm rect {
  fill: rgba(255, 255, 255, 0.62);
  stroke: rgba(184, 135, 26, 0.58);
}

.mini-svg-card text {
  font-size: 16px;
}

.architecture-graph,
.interface-map,
.workflow-canvas,
.sequence-canvas {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.architecture-map,
.workflow-map,
.interface-contract-map,
.sequence-map {
  min-width: 1060px;
}

.workflow-map {
  min-width: 1060px;
}

.sequence-map {
  min-width: 1060px;
}

.sequence-map.sequence-compact-map {
  width: 100%;
  min-width: 0;
}

.architecture-bg,
.workflow-bg,
.contract-bg,
.sequence-bg {
  fill: #fbfcfa;
  stroke: rgba(210, 219, 212, 0.9);
}

.architecture-orbit {
  fill: none;
  stroke: rgba(104, 115, 109, 0.16);
  stroke-width: 1.5;
  stroke-dasharray: 4 10;
}

.architecture-guide {
  fill: none;
  stroke: rgba(104, 115, 109, 0.12);
  stroke-width: 1.4;
  stroke-dasharray: 4 12;
}

.flow-line,
.workflow-link,
.sequence-message {
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 7 10;
  animation: dash-flow 1.8s linear infinite;
}

.workflow-link {
  stroke-width: 2.4;
}

.sequence-message {
  stroke-width: 2.3;
}

.hub-spoke,
.sequence-lifeline,
.contract-guide {
  fill: none;
  stroke-width: 1.5;
  stroke-dasharray: 4 10;
}

.contract-guide {
  stroke: rgba(104, 115, 109, 0.2);
}

.flow-line.module-qw1,
.workflow-link.module-qw1,
.sequence-message.module-qw1,
.sequence-lifeline.module-qw1,
.hub-spoke.module-qw1 {
  stroke: var(--qw1);
}

.flow-line.module-qw2,
.workflow-link.module-qw2,
.sequence-message.module-qw2,
.sequence-lifeline.module-qw2,
.hub-spoke.module-qw2 {
  stroke: var(--qw2);
}

.flow-line.module-qw3,
.workflow-link.module-qw3,
.sequence-message.module-qw3,
.sequence-lifeline.module-qw3,
.hub-spoke.module-qw3 {
  stroke: var(--qw3);
}

.flow-line.module-df,
.workflow-link.module-df,
.sequence-message.module-df,
.sequence-lifeline.module-df,
.hub-spoke.module-df {
  stroke: var(--df);
}

.flow-line.module-baisheng {
  stroke: var(--baisheng);
}

.flow-line.module-third {
  stroke: var(--third);
}

.flow-line.module-source {
  stroke: var(--source);
}

.flow-line.module-pmo {
  stroke: var(--pmo);
}

.hub-spoke {
  opacity: 0.22;
  animation: none;
}

.sequence-lifeline {
  opacity: 0.3;
  animation: none;
}

.svg-info-node,
.svg-hub-node,
.workflow-hub,
.svg-step-node,
.interface-hub,
.contract-node,
.sequence-participant,
.sequence-label,
.svg-line-label,
.contract-note {
  box-sizing: border-box;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

.svg-info-node,
.contract-node {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 15px 16px;
  border: 1px solid rgba(210, 219, 212, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(33, 48, 39, 0.08);
}

.svg-info-node span,
.contract-node span,
.workflow-hub span,
.interface-hub span,
.sequence-participant span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.svg-info-node strong,
.contract-node strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.svg-info-node small,
.contract-node small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.tone-green {
  border-color: rgba(40, 123, 98, 0.32);
  background: linear-gradient(180deg, rgba(232, 244, 238, 0.92), rgba(255, 255, 255, 0.94));
}

.tone-blue {
  border-color: rgba(49, 95, 134, 0.3);
  background: linear-gradient(180deg, rgba(234, 242, 248, 0.94), rgba(255, 255, 255, 0.95));
}

.tone-gold {
  border-color: rgba(184, 135, 26, 0.34);
  background: linear-gradient(180deg, rgba(255, 245, 223, 0.94), rgba(255, 255, 255, 0.95));
}

.tone-coral {
  border-color: rgba(189, 106, 91, 0.34);
  background: linear-gradient(180deg, rgba(255, 240, 237, 0.94), rgba(255, 255, 255, 0.95));
}

.tone-third {
  border-color: rgba(107, 127, 146, 0.34);
  background: linear-gradient(180deg, rgba(238, 243, 246, 0.94), rgba(255, 255, 255, 0.95));
}

.tone-muted {
  border-color: rgba(111, 118, 128, 0.3);
  background: linear-gradient(180deg, rgba(241, 243, 245, 0.94), rgba(255, 255, 255, 0.95));
}

.svg-hub-node,
.workflow-hub,
.interface-hub {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px;
  border: 1px solid rgba(80, 107, 97, 0.24);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 44px rgba(33, 48, 39, 0.12);
  text-align: center;
}

.svg-hub-node strong,
.workflow-hub strong,
.interface-hub strong {
  max-width: 100%;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.22;
}

.svg-hub-node p,
.workflow-hub p,
.interface-hub p {
  max-width: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}

.hub-chips,
.workflow-hub div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.hub-chips em,
.workflow-hub em {
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--df-soft);
  color: var(--df);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.svg-step-node {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  overflow: visible;
  border: 1px solid rgba(210, 219, 212, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(33, 48, 39, 0.08);
}

.svg-step-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.svg-step-top b {
  color: var(--green-strong);
  font-size: 13px;
}

.svg-step-top span,
.svg-step-node small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.svg-step-node h4 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.svg-step-node p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.svg-step-node small {
  margin-top: auto;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.svg-line-label,
.contract-note {
  display: grid;
  place-items: center;
  padding: 0 10px;
  border: 1px solid rgba(210, 219, 212, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(33, 48, 39, 0.08);
}

.contract-note {
  color: var(--ink);
}

.sequence-participant {
  display: grid;
  place-items: center;
  padding: 0 14px;
  border: 1px solid rgba(210, 219, 212, 0.95);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 24px rgba(33, 48, 39, 0.07);
  text-align: center;
}

.sequence-participant.module-qw1 {
  border-color: rgba(40, 123, 98, 0.28);
  background: var(--qw1-soft);
}

.sequence-participant.module-qw2 {
  border-color: rgba(49, 95, 134, 0.28);
  background: var(--qw2-soft);
}

.sequence-participant.module-qw3 {
  border-color: rgba(184, 135, 26, 0.32);
  background: var(--qw3-soft);
}

.sequence-participant.module-df {
  border-color: rgba(80, 107, 97, 0.3);
  background: var(--df-soft);
}

.sequence-label {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(210, 219, 212, 0.95);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 22px rgba(33, 48, 39, 0.08);
}

.sequence-label b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--green-strong);
  font-size: 11px;
  line-height: 1;
}

.sequence-label div {
  min-width: 0;
}

.sequence-label strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.24;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sequence-label .sequence-meta {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sequence-id-grid {
  display: grid;
  gap: 3px;
  margin-top: 5px;
}

.sequence-id-grid span {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 5px;
  align-items: start;
  min-width: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.sequence-id-grid em {
  padding: 2px 4px;
  border-radius: 6px;
  background: var(--df-soft);
  color: var(--green-strong);
  font-style: normal;
  font-size: 9px;
  font-weight: 900;
  text-align: center;
  line-height: 1.15;
}

.interface-lane.source-lane rect {
  fill: var(--blue-soft);
}

.interface-lane.df-lane rect {
  fill: var(--green-soft);
}

.interface-lane.output-lane rect {
  fill: var(--gold-soft);
}

@media (max-width: 1180px) {
  :root {
    --sidebar: 248px;
  }

  .workspace {
    padding: 24px;
  }

  .overview-grid,
  .interface-layout,
  .id-layout,
  .admin-grid,
  .doc-admin-grid,
  .baseline-panel,
  .governance-panel,
  .timeline-grid {
    grid-template-columns: 1fr;
  }

  .metric-strip,
  .doc-summary,
  .audit-status-row,
  .handoff-grid,
  .addon-grid,
  .source-grid,
  .id-grid,
  .risk-board,
  .governance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process-step {
    grid-template-columns: 52px 1fr;
  }

  .process-data,
  .process-interface {
    grid-column: 2;
  }

  .sequence-group-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-toggle {
    right: 16px;
    left: auto;
    top: 16px;
  }

  body.sidebar-collapsed .sidebar {
    display: none;
  }

  body.sidebar-collapsed .workspace {
    margin-left: 0;
    padding-top: 92px;
  }

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

  .nav-link {
    text-align: center;
    font-size: 13px;
    padding: 9px 6px;
  }

  .workspace {
    margin-left: 0;
    padding: 18px;
  }

  .section-head,
  .chart-toolbar,
  .head-actions {
    display: grid;
    justify-content: stretch;
  }

  .fullscreen-btn {
    justify-self: end;
  }

  .section-head h2 {
    font-size: 28px;
  }

  .metric-strip,
  .audit-status-row,
  .handoff-grid,
  .handoff-meta,
  .addon-grid,
  .command-grid,
  .module-info-grid,
  .source-grid,
  .module-flow,
  .admin-grid,
  .permission-grid,
  .doc-summary,
  .doc-admin-grid,
  .id-grid,
  .contract-grid,
  .legend-grid,
  .governance-grid,
  .risk-board {
    grid-template-columns: 1fr;
  }

  .board-head {
    display: grid;
  }

  .lane-legend {
    justify-content: flex-start;
  }

  .process-step {
    grid-template-columns: 1fr;
  }

  .process-data,
  .process-interface {
    grid-column: auto;
  }

  .vertical-flow-line {
    margin-left: 22px;
  }

  .step-card {
    min-height: auto;
  }

  .step-connector {
    width: 3px;
    height: 28px;
    border-top: 0;
    border-left: 3px dashed var(--green);
  }

  .doc-folder {
    margin-left: 0;
  }

  .doc-folder-head {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: flex-start;
  }

  .doc-folder-meta {
    grid-column: 2;
    justify-content: flex-start;
  }

  .doc-folder-body {
    padding-left: 14px;
  }

  .doc-toolbar {
    justify-content: stretch;
  }

  .doc-toolbar button {
    flex: 1 1 140px;
  }

  .doc-file-card,
  .folder-admin-row {
    grid-template-columns: 1fr;
  }

  .download-action,
  .folder-admin-row button {
    justify-self: start;
  }
}
