.diagnostic-workbench-layer {
  --dwm-primary: #3567DB;
  --dwm-primary-hover: #2F5FC8;
  --dwm-page: #F5F7FA;
  --dwm-surface: #FFFFFF;
  --dwm-ink: #1F2D3D;
  --dwm-muted: #6B778C;
  --dwm-line: #E4E9F1;
  --dwm-success: #20A675;
  --dwm-warning: #D99032;
  --dwm-error: #D14C4C;
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  overflow-x: hidden;
  color: var(--dwm-ink);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.diagnostic-workbench-layer *,
.diagnostic-workbench-layer *::before,
.diagnostic-workbench-layer *::after { box-sizing: border-box; }
.diagnostic-workbench-layer button,
.diagnostic-workbench-layer input,
.diagnostic-workbench-layer select,
.diagnostic-workbench-layer textarea { font: inherit; }
.diagnostic-workbench-layer :where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--dwm-primary) 42%, transparent);
  outline-offset: 2px;
}

.dwm-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(31, 45, 61, .36);
  cursor: default;
}

.diagnostic-workbench {
  position: relative;
  width: min(1280px, 82vw);
  height: min(900px, calc(100vh - 64px));
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--dwm-line);
  border-radius: 10px;
  background: var(--dwm-surface);
  box-shadow: 0 24px 72px rgba(28, 45, 74, .20);
  animation: dwm-enter 200ms cubic-bezier(.2, .8, .2, 1);
}

@keyframes dwm-enter {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dwm-header {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 44px;
  align-items: center;
  gap: 16px;
  padding: 12px 16px 12px 20px;
  border-bottom: 1px solid var(--dwm-line);
  background: var(--dwm-surface);
}
.dwm-header__title { min-width: 0; display: flex; align-items: center; gap: 12px; }
.dwm-header__mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  color: var(--dwm-primary);
  background: color-mix(in srgb, var(--dwm-primary) 9%, white);
  font-size: 20px;
}
.dwm-header h1,
.dwm-header p,
.dwm-stage-head h2,
.dwm-result-panel h2,
.dwm-process h3 { margin: 0; }
.dwm-header h1 { margin-top: 2px; font-size: 18px; line-height: 1.35; }
.dwm-header p { margin-top: 2px; overflow: hidden; color: var(--dwm-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.dwm-kicker { color: var(--dwm-primary); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.dwm-header__status { display: grid; justify-items: end; gap: 2px; padding-right: 16px; border-right: 1px solid var(--dwm-line); }
.dwm-header__status span { color: var(--dwm-muted); font-size: 9px; letter-spacing: .08em; }
.dwm-header__status strong { font-size: 12px; }

.dwm-icon-button,
.dwm-mobile-tab,
.dwm-process__stage,
.dwm-process__history button { min-height: 44px; }
.dwm-icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--dwm-line);
  border-radius: 6px;
  color: var(--dwm-muted);
  background: var(--dwm-surface);
  cursor: pointer;
  font-size: 22px;
}
.dwm-icon-button:hover { color: var(--dwm-primary-hover); border-color: var(--dwm-primary); background: var(--dwm-page); }

.dwm-mobile-tabs { display: none; }
.dwm-workbench__body {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 240px minmax(560px, 1fr) 340px;
  overflow: hidden;
}

.dwm-process {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid var(--dwm-line);
  background: color-mix(in srgb, var(--dwm-page) 68%, white);
}
.dwm-process__heading { min-height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--dwm-line); }
.dwm-process__heading span { color: var(--dwm-muted); font-size: 11px; font-weight: 700; }
.dwm-process__heading strong { color: var(--dwm-primary); font-size: 12px; }
.dwm-process__stages { display: grid; gap: 4px; margin: 0; padding: 12px 10px; list-style: none; }
.dwm-process__stage {
  width: 100%;
  min-width: 44px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--dwm-muted);
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.dwm-process__stage > span:first-child { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--dwm-line); border-radius: 50%; background: white; font-size: 9px; font-weight: 800; }
.dwm-process__stage > span:last-child { min-width: 0; display: grid; gap: 3px; }
.dwm-process__stage strong { color: var(--dwm-ink); font-size: 12px; }
.dwm-process__stage small { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.dwm-process__stage:hover { border-color: var(--dwm-line); background: white; }
.dwm-process__stage.is-active { border-color: color-mix(in srgb, var(--dwm-primary) 28%, var(--dwm-line)); background: white; }
.dwm-process__stage.is-active > span:first-child { color: white; border-color: var(--dwm-primary); background: var(--dwm-primary); }
.dwm-process__stage.is-active strong { color: var(--dwm-primary); }
.dwm-question-index {
  display: grid;
  grid-template-columns: repeat(4, minmax(44px, 1fr));
  gap: 6px;
  padding: 4px 12px 14px;
}
.dwm-question-number {
  position: relative;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--dwm-line);
  border-radius: 6px;
  color: var(--dwm-muted);
  background: white;
  cursor: pointer;
  font-size: 10px;
}
.dwm-question-number.is-answered { color: var(--dwm-success); border-color: color-mix(in srgb, var(--dwm-success) 35%, var(--dwm-line)); background: color-mix(in srgb, var(--dwm-success) 7%, white); }
.dwm-question-number.is-current { color: white; border-color: var(--dwm-primary); background: var(--dwm-primary); }
.dwm-question-number.is-review::after { content: ""; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--dwm-warning); }
.dwm-process__history { margin-top: auto; padding: 14px 16px; border-top: 1px solid var(--dwm-line); background: white; }
.dwm-process__history > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dwm-process__history h3 { font-size: 11px; }
.dwm-process__history > div > span { color: var(--dwm-muted); font-size: 9px; }
.dwm-process__history ul { margin: 8px 0 0; padding: 0; list-style: none; }
.dwm-process__history button { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0; border: 0; color: var(--dwm-ink); background: transparent; cursor: pointer; font-size: 10px; }
.dwm-process__history button small,
.dwm-empty-copy { color: var(--dwm-muted); font-size: 9px; line-height: 1.6; }
.dwm-empty-copy { margin: 9px 0 0; }

.dwm-workbench__main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: var(--dwm-surface);
}
.dwm-stage-head { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--dwm-line); }
.dwm-stage-head h2 { margin-top: 3px; font-size: 16px; }
.dwm-stage-head > span { color: var(--dwm-muted); font-size: 10px; }
.dwm-stage-content { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px; background: var(--dwm-page); }
.dwm-stage-empty { min-height: 100%; display: grid; place-content: center; justify-items: center; padding: 32px; border: 1px dashed var(--dwm-line); border-radius: 8px; background: white; text-align: center; }
.dwm-stage-empty strong { font-size: 15px; }
.dwm-stage-empty p { max-width: 420px; margin: 8px 0 0; color: var(--dwm-muted); font-size: 12px; line-height: 1.7; }
.dwm-assessment-error-banner { position: absolute; z-index: 3; top: 84px; left: 50%; width: min(560px, calc(100% - 32px)); min-height: 56px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--dwm-error) 35%, var(--dwm-line)); border-radius: 6px; color: var(--dwm-error); background: white; box-shadow: 0 8px 24px rgba(28, 45, 74, .14); transform: translateX(-50%); }
.dwm-assessment-error-banner strong { font-size: 11px; }
.dwm-assessment-error-banner p { margin: 3px 0 0; font-size: 10px; line-height: 1.45; }
.dwm-assessment-error-banner button { min-height: 44px; padding: 0 12px; border: 1px solid currentColor; border-radius: 6px; color: inherit; background: white; cursor: pointer; font-size: 10px; font-weight: 700; }

.dwm-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.dwm-questionnaire { min-height: 100%; }
.dwm-question-card { min-height: 100%; display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--dwm-line); border-radius: 8px; background: white; }
.dwm-question-card__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--dwm-line); }
.dwm-question-card__head > strong { color: var(--dwm-muted); font-size: 11px; white-space: nowrap; }
.dwm-question-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.dwm-question-meta span { min-height: 26px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: 6px; color: var(--dwm-primary); background: color-mix(in srgb, var(--dwm-primary) 8%, white); font-size: 10px; font-weight: 700; }
.dwm-question-meta span + span { color: var(--dwm-muted); background: var(--dwm-page); }
.dwm-question-card h3 { margin: 22px 0 18px; font-size: 17px; line-height: 1.65; }
.dwm-question-options { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.dwm-question-option { min-height: 52px; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--dwm-line); border-radius: 6px; background: white; cursor: pointer; font-size: 12px; line-height: 1.55; transition: border-color 180ms ease, background-color 180ms ease; }
.dwm-question-option:hover { border-color: color-mix(in srgb, var(--dwm-primary) 48%, var(--dwm-line)); }
.dwm-question-option.is-selected { border-color: var(--dwm-primary); background: color-mix(in srgb, var(--dwm-primary) 5%, white); }
.dwm-question-option input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.dwm-question-option__mark { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid #AAB4C3; border-radius: 50%; }
.dwm-question-option.is-selected .dwm-question-option__mark { border: 5px solid var(--dwm-primary); }
.dwm-question-option:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--dwm-primary) 42%, transparent); outline-offset: 2px; }
.dwm-question-card__actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 22px; }
.dwm-button,
.dwm-save-retry,
.dwm-result-retake { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 14px; border: 1px solid var(--dwm-line); border-radius: 6px; color: var(--dwm-ink); background: white; cursor: pointer; font-size: 11px; font-weight: 700; }
.dwm-button:disabled { cursor: not-allowed; opacity: .45; }
.dwm-button--primary { margin-left: auto; color: white; border-color: var(--dwm-primary); background: var(--dwm-primary); }
.dwm-button--primary:hover:not(:disabled) { border-color: var(--dwm-primary-hover); background: var(--dwm-primary-hover); }
.dwm-button--review.is-active { color: var(--dwm-warning); border-color: color-mix(in srgb, var(--dwm-warning) 42%, var(--dwm-line)); background: color-mix(in srgb, var(--dwm-warning) 7%, white); }
.dwm-questionnaire__summary { margin: 12px 0 0; color: var(--dwm-muted); font-size: 10px; text-align: right; }
.dwm-questionnaire__message { min-height: 48px; display: flex; align-items: center; gap: 9px; margin-top: 14px; padding: 10px 12px; border: 1px solid var(--dwm-line); border-radius: 6px; color: var(--dwm-muted); background: white; font-size: 11px; }
.dwm-questionnaire__message p { margin: 3px 0 0; }
.dwm-questionnaire__message .dwm-button { margin-left: auto; flex: 0 0 auto; }
.dwm-questionnaire__message.is-warning { color: #8A5A16; border-color: color-mix(in srgb, var(--dwm-warning) 35%, var(--dwm-line)); background: color-mix(in srgb, var(--dwm-warning) 7%, white); }
.dwm-questionnaire__message.is-error { color: var(--dwm-error); }
.dwm-questionnaire__loading { min-height: 100%; display: grid; align-content: center; gap: 12px; padding: 28px; border: 1px solid var(--dwm-line); border-radius: 8px; background: white; }
.dwm-questionnaire__loading span { height: 52px; border-radius: 6px; background: linear-gradient(90deg, var(--dwm-page), #EEF2F7, var(--dwm-page)); background-size: 200% 100%; animation: dwm-skeleton 1.4s ease infinite; }
.dwm-questionnaire__loading strong { color: var(--dwm-muted); font-size: 11px; text-align: center; }
@keyframes dwm-skeleton { to { background-position: -200% 0; } }

.dwm-agent-conversation {
  position: static;
  top: auto;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--dwm-surface);
  box-shadow: none;
}
.diagnostic-workbench .dwm-agent-conversation .ri-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.diagnostic-workbench .dwm-agent-conversation .ri-agent-dock__head { min-height: 64px; grid-row: 1; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; color: white; background: var(--dwm-ink); }
.diagnostic-workbench .dwm-agent-conversation .ri-agent-dock__head > div { min-width: 0; display: flex; align-items: center; gap: 10px; }
.diagnostic-workbench .dwm-agent-conversation .ri-agent-mark { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid color-mix(in srgb, var(--dwm-primary) 48%, white); border-radius: 6px; color: white; background: color-mix(in srgb, var(--dwm-primary) 36%, transparent); }
.diagnostic-workbench .dwm-agent-conversation .ri-agent-dock__head h2 { margin: 0; font-size: 14px; }
.diagnostic-workbench .dwm-agent-conversation .ri-agent-dock__head p { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; color: color-mix(in srgb, white 66%, transparent); font-size: 10px; }
.diagnostic-workbench .dwm-agent-conversation .ri-agent-dock__head p i { width: 6px; height: 6px; border-radius: 50%; background: var(--dwm-success); }
.diagnostic-workbench .dwm-agent-conversation .ri-conversation-tools { grid-row: 2; padding: 10px 14px; border-bottom: 1px solid var(--dwm-line); background: color-mix(in srgb, var(--dwm-page) 65%, white); }
.diagnostic-workbench .dwm-agent-conversation .ri-conversation-tools > label { display: block; margin-bottom: 5px; color: var(--dwm-muted); font-size: 10px; font-weight: 700; }
.diagnostic-workbench .dwm-agent-conversation .ri-conversation-tools > div { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 7px; }
.diagnostic-workbench .dwm-agent-conversation .ri-input { width: 100%; min-width: 0; min-height: 44px; padding: 0 10px; border: 1px solid var(--dwm-line); border-radius: 6px; color: var(--dwm-ink); background: white; font-size: 11px; }
.diagnostic-workbench .dwm-agent-conversation .ri-icon-button { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 1px solid var(--dwm-line); border-radius: 6px; color: var(--dwm-muted); background: white; cursor: pointer; }
.diagnostic-workbench .dwm-agent-conversation .ri-icon-button:hover { color: var(--dwm-primary); border-color: color-mix(in srgb, var(--dwm-primary) 35%, var(--dwm-line)); }
.diagnostic-workbench .dwm-agent-conversation .ri-icon-button:disabled { opacity: .4; pointer-events: none; }
.diagnostic-workbench .dwm-agent-conversation .ri-reconnect { grid-row: 3; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; color: var(--dwm-error); border-bottom: 1px solid color-mix(in srgb, var(--dwm-error) 22%, var(--dwm-line)); background: color-mix(in srgb, var(--dwm-error) 6%, white); font-size: 10px; }
.diagnostic-workbench .dwm-agent-conversation .ri-reconnect p { margin: 0; line-height: 1.45; }
.diagnostic-workbench .dwm-agent-conversation .ri-reconnect strong { display: block; }
.diagnostic-workbench .dwm-agent-conversation .ri-reconnect button { min-width: 44px; min-height: 44px; border: 0; color: var(--dwm-error); background: transparent; cursor: pointer; font-weight: 700; white-space: nowrap; }
.diagnostic-workbench .dwm-agent-conversation .ri-message-log { min-height: 0; grid-row: 4; display: grid; align-content: start; gap: 12px; padding: 16px 14px; overflow-y: auto; overscroll-behavior: contain; }
.diagnostic-workbench .dwm-agent-conversation .ri-agent-empty { align-self: center; display: grid; justify-items: center; padding: 32px 18px; text-align: center; }
.diagnostic-workbench .dwm-agent-conversation .ri-agent-empty > span { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 12px; border: 1px solid color-mix(in srgb, var(--dwm-primary) 28%, var(--dwm-line)); border-radius: 50%; color: var(--dwm-primary); background: color-mix(in srgb, var(--dwm-primary) 6%, white); font-size: 20px; }
.diagnostic-workbench .dwm-agent-conversation .ri-agent-empty strong { font-size: 13px; }
.diagnostic-workbench .dwm-agent-conversation .ri-agent-empty p { margin: 7px 0 0; color: var(--dwm-muted); font-size: 11px; line-height: 1.65; }
.diagnostic-workbench .dwm-agent-conversation .ri-message { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; align-items: start; }
.diagnostic-workbench .dwm-agent-conversation .ri-message > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; color: var(--dwm-primary); background: color-mix(in srgb, var(--dwm-primary) 8%, white); font-size: 9px; font-weight: 700; }
.diagnostic-workbench .dwm-agent-conversation .ri-message > div { min-width: 0; padding: 9px 11px; border: 1px solid var(--dwm-line); border-radius: 4px 6px 6px 6px; color: var(--dwm-ink); background: white; font-size: 11px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.diagnostic-workbench .dwm-agent-conversation .ri-message.is-user { grid-template-columns: minmax(0, 1fr) 34px; }
.diagnostic-workbench .dwm-agent-conversation .ri-message.is-user > span { grid-column: 2; grid-row: 1; color: var(--dwm-primary); background: #E5EDFF; }
.diagnostic-workbench .dwm-agent-conversation .ri-message.is-user > div {
  grid-column: 1;
  grid-row: 1;
  color: var(--dwm-ink);
  border-color: #C9D8FA;
  border-radius: 6px 4px 6px 6px;
  background: #EEF4FF;
}
.diagnostic-workbench .dwm-agent-conversation .ri-typing { grid-column: 2; width: 18px; height: 3px; margin: -4px 0 0 11px; border-radius: 3px; background: var(--dwm-primary); animation: dwm-agent-typing 1s ease-in-out infinite alternate; }
@keyframes dwm-agent-typing { to { width: 36px; opacity: .35; } }
.diagnostic-workbench .dwm-agent-conversation .ri-agent-composer { grid-row: 5; padding: 11px 14px; border-top: 1px solid var(--dwm-line); background: color-mix(in srgb, var(--dwm-page) 56%, white); }
.diagnostic-workbench .dwm-agent-conversation .ri-agent-composer textarea { min-height: 72px; padding: 10px 11px; resize: vertical; line-height: 1.5; }
.diagnostic-workbench .dwm-agent-conversation .ri-agent-composer__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.diagnostic-workbench .dwm-agent-conversation .ri-agent-composer__foot > span { color: var(--dwm-muted); font-size: 9px; }
.diagnostic-workbench .dwm-agent-conversation .ri-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; border: 1px solid var(--dwm-line); border-radius: 6px; color: var(--dwm-ink); background: white; cursor: pointer; font-size: 10px; font-weight: 700; }
.diagnostic-workbench .dwm-agent-conversation .ri-button--primary { color: white; border-color: var(--dwm-primary); background: var(--dwm-primary); }
.diagnostic-workbench .dwm-agent-conversation .ri-button:disabled { opacity: .45; pointer-events: none; }
.diagnostic-workbench .dwm-agent-conversation .ri-agent-dock__foot { min-height: 48px; grid-row: 6; display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--dwm-line); }
.diagnostic-workbench .dwm-agent-conversation .ri-agent-dock__foot button { min-height: 48px; border: 0; color: var(--dwm-muted); background: white; cursor: pointer; font-size: 10px; }
.diagnostic-workbench .dwm-agent-conversation .ri-agent-dock__foot button:hover { color: var(--dwm-primary); background: var(--dwm-page); }
.diagnostic-workbench .dwm-agent-conversation .ri-agent-dock__foot button:disabled { opacity: .45; cursor: not-allowed; }

.dwm-report-stage { height: 100%; min-height: 0; padding: 18px; overflow-y: auto; overscroll-behavior: contain; background: var(--dwm-page); }
.dwm-report-stage__empty { min-height: 100%; display: grid; place-content: center; justify-items: center; padding: 32px; color: var(--dwm-muted); text-align: center; }
.dwm-report-stage__empty i { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 12px; border: 1px solid color-mix(in srgb, var(--dwm-primary) 28%, var(--dwm-line)); border-radius: 50%; color: var(--dwm-primary); background: white; font-size: 22px; }
.dwm-report-stage__empty strong { color: var(--dwm-ink); font-size: 14px; }
.dwm-report-stage__empty p { max-width: 360px; margin: 8px 0 0; font-size: 11px; line-height: 1.7; }
.dwm-report-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 18px; border: 1px solid var(--dwm-line); border-radius: 8px; background: #fff; }
.dwm-report-hero h3 { margin: 4px 0 0; font-size: 18px; }
.dwm-report-hero p { margin: 8px 0 0; color: var(--dwm-muted); font-size: 10px; line-height: 1.6; }
.dwm-report-score { min-width: 112px; display: grid; grid-template-columns: auto auto; align-items: baseline; justify-content: end; color: var(--dwm-primary); font-variant-numeric: tabular-nums; }
.dwm-report-score strong { font-size: 38px; line-height: 1; }
.dwm-report-score > span { font-size: 11px; }
.dwm-report-score small { grid-column: 1 / -1; margin-top: 7px; color: var(--dwm-warning); font-size: 9px; text-align: right; }
.dwm-report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.dwm-report-card { min-width: 0; padding: 14px; border: 1px solid var(--dwm-line); border-radius: 8px; background: #fff; }
.dwm-report-card > header { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.dwm-report-card > header i { color: var(--dwm-primary); font-size: 16px; }
.dwm-report-card.is-gap > header i { color: var(--dwm-warning); }
.dwm-report-card ul { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.dwm-report-card li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px solid var(--dwm-line); color: var(--dwm-muted); font-size: 10px; }
.dwm-report-card li strong { color: var(--dwm-ink); font-size: 10px; }
.dwm-report-card.is-strength li strong { color: var(--dwm-success); }
.dwm-report-card.is-gap li strong { color: var(--dwm-warning); }
.dwm-report-card > p { margin: 12px 0 0; color: var(--dwm-muted); font-size: 10px; line-height: 1.6; }
.dwm-training-actions { margin-top: 12px; padding: 16px; border: 1px solid var(--dwm-line); border-radius: 8px; background: #fff; }
.dwm-training-actions > header { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.dwm-training-actions h4 { margin: 3px 0 0; font-size: 14px; }
.dwm-training-actions > header > span { color: var(--dwm-muted); font-size: 9px; }
.dwm-training-actions ol { display: grid; gap: 9px; margin: 14px 0 0; padding: 0; list-style: none; }
.dwm-training-actions li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 11px; border: 1px solid var(--dwm-line); border-radius: 6px; background: color-mix(in srgb, var(--dwm-page) 55%, white); }
.dwm-training-actions__index { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; color: var(--dwm-primary); background: color-mix(in srgb, var(--dwm-primary) 9%, white); font-size: 9px; font-weight: 800; }
.dwm-training-actions li strong { font-size: 11px; }
.dwm-training-actions li p { margin: 4px 0; color: var(--dwm-muted); font-size: 10px; line-height: 1.55; }
.dwm-training-actions li small { color: var(--dwm-warning); font-size: 8px; }

.dwm-result-panel {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-left: 1px solid var(--dwm-line);
  background: var(--dwm-surface);
}
.dwm-result-panel__head { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--dwm-line); }
.dwm-result-panel h2 { margin-top: 3px; font-size: 15px; }
.dwm-source-badge { min-height: 26px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 6px; color: var(--dwm-primary); background: color-mix(in srgb, var(--dwm-primary) 9%, white); font-size: 9px; font-weight: 700; }
.dwm-result-empty { min-height: calc(100% - 64px); display: grid; place-content: center; justify-items: center; padding: 28px; text-align: center; }
.dwm-result-empty__mark { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 14px; border: 1px solid color-mix(in srgb, var(--dwm-primary) 28%, var(--dwm-line)); border-radius: 50%; color: var(--dwm-primary); background: color-mix(in srgb, var(--dwm-primary) 6%, white); font-size: 22px; }
.dwm-result-empty strong { font-size: 14px; }
.dwm-result-empty p { margin: 8px 0 0; color: var(--dwm-muted); font-size: 11px; line-height: 1.7; }
.dwm-result-score { padding: 20px 16px; border-bottom: 1px solid var(--dwm-line); }
.dwm-result-score > span { color: var(--dwm-muted); font-size: 10px; }
.dwm-result-score > strong { display: block; margin-top: 8px; color: var(--dwm-primary); font-size: 36px; line-height: 1; }
.dwm-result-score small { margin-left: 3px; color: var(--dwm-muted); font-size: 10px; }
.dwm-result-score p { margin: 10px 0 0; color: var(--dwm-muted); font-size: 9px; line-height: 1.6; }
.dwm-result-radar { min-height: 250px; padding: 12px 10px 6px; border-bottom: 1px solid var(--dwm-line); }
.dwm-result-radar > div { min-height: 220px; }
.dwm-result-radar > p { margin: 0 6px 8px; color: var(--dwm-muted); font-size: 9px; line-height: 1.5; }
.dwm-source-legend { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 0; padding: 0 6px; list-style: none; color: var(--dwm-muted); font-size: 8px; }
.dwm-source-legend li { display: inline-flex; align-items: center; gap: 4px; }
.dwm-source-legend li::before { width: 12px; height: 3px; border-radius: 999px; background: currentColor; content: ''; }
.dwm-source-legend .is-target { color: #2F7FF7; }
.dwm-source-legend .is-preliminary { color: #3567DB; }
.dwm-source-legend .is-preliminary::before { background: repeating-linear-gradient(90deg, #3567DB 0 3px, transparent 3px 5px); }
.dwm-source-legend .is-profile { color: var(--dwm-warning); }
.dwm-source-legend .is-training { color: var(--dwm-success); }
.dwm-result-dimensions { display: grid; gap: 12px; padding: 18px 16px; border-bottom: 1px solid var(--dwm-line); }
.dwm-result-dimensions > div { display: grid; grid-template-columns: 76px minmax(0, 1fr) 28px; align-items: center; gap: 8px; font-size: 10px; }
.dwm-result-dimensions strong { text-align: right; }
.dwm-result-meter { height: 6px; overflow: hidden; border-radius: 999px; background: var(--dwm-line); }
.dwm-result-meter i { display: block; height: 100%; border-radius: inherit; background: var(--dwm-primary); }
.dwm-result-table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: right; font-size: 8px; }
.dwm-result-table th,
.dwm-result-table td { padding: 6px 2px; border-bottom: 1px solid var(--dwm-line); font-variant-numeric: tabular-nums; }
.dwm-result-table th:first-child { width: 31%; text-align: left; }
.dwm-result-table thead th { color: var(--dwm-muted); font-weight: 600; line-height: 1.35; }
.dwm-profile-inference-note { margin: 0; padding: 9px 10px; border-radius: 6px; color: var(--dwm-warning); background: color-mix(in srgb, var(--dwm-warning) 7%, white); font-size: 9px; line-height: 1.5; }
.dwm-evidence-unavailable { margin: 0; padding: 9px 10px; border-radius: 6px; color: var(--dwm-muted); background: var(--dwm-page); font-size: 9px; line-height: 1.5; }
.dwm-result-confidence { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; color: var(--dwm-muted); font-size: 10px; }
.dwm-result-confidence strong { color: var(--dwm-warning); font-size: 11px; }
.dwm-result-retake { width: calc(100% - 32px); margin: 0 16px 16px; color: var(--dwm-primary); border-color: color-mix(in srgb, var(--dwm-primary) 35%, var(--dwm-line)); }
.dwm-result-recovery { margin: 0 16px 16px; padding: 12px; border: 1px solid color-mix(in srgb, var(--dwm-error) 35%, var(--dwm-line)); border-radius: 6px; color: var(--dwm-error); background: color-mix(in srgb, var(--dwm-error) 5%, white); }
.dwm-result-recovery strong { font-size: 11px; }
.dwm-result-recovery p { margin: 4px 0 10px; font-size: 10px; line-height: 1.5; }
.dwm-result-recovery button { min-height: 44px; padding: 0 12px; border: 1px solid currentColor; border-radius: 6px; color: inherit; background: white; cursor: pointer; font-size: 10px; font-weight: 700; }

.dwm-footer { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 16px 6px 252px; border-top: 1px solid var(--dwm-line); background: white; }
.dwm-footer > span { display: inline-flex; align-items: center; gap: 6px; color: var(--dwm-muted); font-size: 10px; }
.dwm-footer > span i { color: var(--dwm-success); font-size: 15px; }
.dwm-save-retry { margin-left: auto; padding-inline: 10px; color: var(--dwm-error); border-color: color-mix(in srgb, var(--dwm-error) 35%, var(--dwm-line)); }

@media (min-width: 1200px) and (max-width: 1279px) {
  .diagnostic-workbench { width: calc(100vw - 48px); }
  .dwm-workbench__body { grid-template-columns: 220px minmax(500px, 1fr) 300px; }
}

@media (max-width: 1199px) {
  .diagnostic-workbench { width: min(1000px, 92vw); height: min(860px, 90vh); }
  .dwm-workbench__body {
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .dwm-process { grid-column: 1 / -1; display: block; overflow: visible; border-right: 0; border-bottom: 1px solid var(--dwm-line); }
  .dwm-process__heading,
  .dwm-process__history,
  .dwm-question-index { display: none; }
  .dwm-process__stages { grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 8px 12px; }
  .dwm-process__stage { grid-template-columns: 24px minmax(0, 1fr); padding: 5px 7px; }
  .dwm-process__stage > span:first-child { width: 24px; height: 24px; }
  .dwm-process__stage small { display: none; }
  .dwm-footer { padding-left: 16px; }
}

@media (max-width: 767px) {
  .diagnostic-workbench-layer { place-items: stretch; }
  .diagnostic-workbench {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .dwm-backdrop { display: none; }
  .dwm-header { min-height: 64px; grid-template-columns: minmax(0, 1fr) 44px; padding: 10px 12px; }
  .dwm-header__mark,
  .dwm-header__status { display: none; }
  .dwm-header h1 { font-size: 16px; }
  .dwm-mobile-tabs { min-height: 48px; display: grid; grid-template-columns: repeat(3, 1fr); padding: 0 12px; border-bottom: 1px solid var(--dwm-line); background: white; }
  .dwm-mobile-tab { position: relative; min-width: 44px; padding: 0 8px; border: 0; color: var(--dwm-muted); background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
  .dwm-mobile-tab::after { content: ""; position: absolute; right: 14px; bottom: -1px; left: 14px; height: 3px; border-radius: 3px 3px 0 0; background: var(--dwm-primary); transform: scaleX(0); }
  .dwm-mobile-tab.is-active { color: var(--dwm-primary); }
  .dwm-mobile-tab.is-active::after { transform: scaleX(1); }
  .dwm-workbench__body { display: block; min-height: 0; overflow: hidden; }
  .dwm-process { display: none; }
  .dwm-workbench__main,
  .dwm-result-panel { height: 100%; border-left: 0; }
  .diagnostic-workbench.is-mobile-report .dwm-workbench__main { display: none; }
  .diagnostic-workbench:not(.is-mobile-report) .dwm-result-panel { display: none; }
  .dwm-stage-head,
  .dwm-result-panel__head { min-height: 58px; }
  .dwm-stage-head { padding-inline: 16px; }
  .dwm-stage-head > span { display: none; }
  .dwm-stage-content { padding: 12px; }
  .dwm-assessment-error-banner { top: 120px; }
  .dwm-question-card { padding: 16px; }
  .dwm-question-card h3 { margin-block: 18px 14px; font-size: 15px; }
  .dwm-question-card__actions { flex-wrap: wrap; }
  .dwm-button--review { order: 3; width: 100%; }
  .dwm-report-stage { padding: 12px; }
  .dwm-report-hero { grid-template-columns: 1fr; }
  .dwm-report-score { justify-content: start; }
  .dwm-report-score small { text-align: left; }
  .dwm-report-grid { grid-template-columns: 1fr; }
  .dwm-footer { min-height: 60px; padding: 8px 12px; }
}

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