:root {
  color-scheme: light;
  --page: #f3f5f2;
  --surface: #ffffff;
  --surface-soft: #f8faf8;
  --ink: #1e2c26;
  --ink-soft: #42534b;
  --muted: #53635a;
  --muted-light: #5b695f;
  --line: #dce4de;
  --line-strong: #c6d2c9;
  --green: #277858;
  --green-dark: #1e6247;
  --green-soft: #e2f0e7;
  --blue: #3b6f83;
  --blue-soft: #e4f0f3;
  --amber: #a86a13;
  --amber-soft: #fbefd8;
  --red: #ae4039;
  --red-dark: #852d29;
  --red-soft: #f8e4e1;
  --shadow: 0 8px 24px rgb(28 45 35 / 6%);
  --radius: 8px;
  --focus: #1a72aa;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

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

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

::selection {
  background: #cce5d5;
  color: #14251c;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 62px;
  align-items: center;
  gap: 28px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 96%);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  background: #e5f0e8;
  color: var(--green-dark);
}

.brand-mark svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
}

.brand-divider {
  width: 1px;
  height: 18px;
  background: var(--line-strong);
}

.brand-section {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.top-nav {
  display: flex;
  height: 62px;
  align-items: stretch;
  gap: 4px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  min-width: 80px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link.is-active {
  color: var(--green-dark);
  font-weight: 700;
}

.nav-link.is-active::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--green);
  content: "";
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.prototype-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.prototype-label span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d29a33;
  box-shadow: 0 0 0 3px #f7ecd4;
}

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button svg,
.text-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.button:hover {
  border-color: #8fa69a;
  background: #f5f8f5;
  color: var(--ink);
}

.button-quiet {
  box-shadow: 0 1px 1px rgb(20 35 27 / 3%);
}

.page-shell {
  width: min(100% - 56px, 1480px);
  margin: 0 auto;
  padding: 28px 0 24px;
}

.page-heading {
  display: flex;
  min-height: 96px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumb strong {
  color: var(--ink-soft);
  font-weight: 600;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 5px;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.3;
}

.heading-subtitle {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.task-selector {
  width: min(390px, 39%);
  flex: 0 1 390px;
}

.task-selector-label,
.overview-label,
.metric-field legend,
.app-field legend {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.task-selector-value {
  display: flex;
  min-height: 41px;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.task-icon {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 5px;
  background: #eff3ef;
  color: var(--green-dark);
}

.task-icon svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.demo-tag {
  margin-left: auto;
  padding: 3px 7px;
  border: 1px solid #e6d4aa;
  border-radius: 999px;
  background: #fbf4e5;
  color: #805713;
  font-size: 12px;
  font-weight: 700;
}

.overview-line {
  display: grid;
  grid-template-columns: minmax(260px, 1.05fr) 2fr;
  align-items: center;
  gap: 24px;
  min-height: 71px;
  padding: 13px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.overview-label {
  margin-bottom: 3px;
}

.overview-context p {
  max-width: 570px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.overview-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 20px;
}

.overview-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.overview-stat strong {
  color: var(--ink);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.overview-stat.is-alert strong {
  color: var(--red);
}

.controls {
  display: flex;
  min-height: 74px;
  align-items: flex-end;
  gap: 24px;
  padding: 16px 0 11px;
  border-bottom: 1px solid var(--line);
}

.metric-field,
.app-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.segmented-control {
  display: inline-flex;
  min-height: 36px;
  align-items: stretch;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #e9eeea;
}

.segment {
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.segment:hover {
  color: var(--ink);
}

.segment.is-selected {
  background: var(--surface);
  color: var(--green-dark);
  box-shadow: 0 1px 4px rgb(32 51 39 / 14%);
}

.app-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.app-filter {
  position: relative;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.app-filter:hover {
  border-color: #9aada0;
}

.app-filter input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--green);
}

.app-filter-name {
  white-space: nowrap;
}

.check-control {
  position: relative;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.check-control input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.check-box {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #9caaa1;
  border-radius: 4px;
  background: var(--surface);
  color: #fff;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.check-control input:checked + .check-box {
  border-color: var(--green);
  background: var(--green);
}

.check-control input:checked + .check-box::after {
  width: 8px;
  height: 4px;
  transform: translateY(-1px) rotate(-45deg);
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  content: "";
}

.check-control input:focus-visible + .check-box {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.reset-button {
  min-height: 36px;
  white-space: nowrap;
}

.legend-row {
  display: flex;
  min-height: 47px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 12px;
}

.legend-explainer {
  color: var(--ink-soft);
}

.legend-scale,
.legend-item {
  display: inline-flex;
  align-items: center;
}

.legend-scale {
  flex-wrap: wrap;
  gap: 13px;
}

.legend-item {
  gap: 5px;
  white-space: nowrap;
}

.legend-item b {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.legend-swatch {
  width: 11px;
  height: 11px;
  border: 1px solid rgb(34 48 40 / 10%);
  border-radius: 3px;
}

.tone-low {
  background: #cde8da;
}

.tone-mid {
  background: #f5e4bb;
}

.tone-high {
  background: #edc984;
}

.tone-critical {
  background: #e89a91;
}

.legend-note {
  color: var(--muted-light);
}

.workspace-section {
  margin-top: 16px;
  padding: 18px 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(24 42 31 / 3%);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.section-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.section-index {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 5px;
  background: #e5f0e8;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
}

.section-index-warm {
  background: #fbefd8;
  color: #8b5b12;
}

.section-index-green {
  background: #e1eee6;
  color: #286445;
}

.section-heading h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.section-heading p {
  margin: 5px 0 0 31px;
  color: var(--muted);
  font-size: 12px;
}

.section-tools {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-top: 1px;
}

.step-count {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.text-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--green-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.text-button:hover {
  background: #edf4ef;
}

.alignment-note {
  margin: -3px 0 12px 31px;
  padding: 9px 12px;
  border: 1px solid #d8e6dc;
  border-radius: 6px;
  background: #f3f8f4;
  color: var(--ink-soft);
  font-size: 12px;
}

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

.flow-lane {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #fafbfa;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.flow-lane:hover {
  border-color: #e2e9e3;
  background: #f8faf8;
}

.flow-app {
  display: flex;
  align-items: center;
  gap: 9px;
}

.app-mark {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--app-border);
  border-radius: 7px;
  background: var(--app-soft);
  color: var(--app-ink);
  font-size: 12px;
  font-weight: 700;
}

.app-identity {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.app-identity strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-identity span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.flow-sequence {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.flow-step {
  display: grid;
  min-height: 43px;
  max-width: 224px;
  min-width: 116px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 5px 8px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.flow-step:hover {
  transform: translateY(-1px);
  border-color: #9eb2a4;
}

.flow-step.is-selected {
  border-color: var(--green);
  background: #f1f7f2;
  box-shadow: inset 0 0 0 1px var(--green);
}

.step-number {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 5px;
  background: #edf1ee;
  color: var(--ink-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.flow-step-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.flow-step-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-step-copy span {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.flow-connector {
  display: inline-flex;
  width: 16px;
  height: 20px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: #84938a;
}

.flow-connector svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.comparison-section {
  padding-bottom: 14px;
}

.matrix-reading {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
}

.matrix-reading strong {
  color: var(--red);
  font-weight: 700;
}

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

.matrix-wrap {
  min-width: 0;
}

.matrix-grid {
  display: grid;
  grid-template-columns: minmax(135px, 0.82fr) repeat(var(--app-count, 3), minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--line);
}

.matrix-cell {
  min-width: 0;
  background: var(--surface);
}

.matrix-row {
  display: contents;
}

.matrix-header {
  min-height: 65px;
  padding: 10px 11px;
  background: #f2f5f2;
}

.matrix-header:first-child {
  display: flex;
  align-items: flex-end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.matrix-app-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.matrix-app-header .app-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.matrix-app-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.matrix-app-copy strong {
  color: var(--ink);
  font-size: 12px;
}

.matrix-app-copy span {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.matrix-stage {
  min-height: 70px;
  padding: 11px 12px;
  background: #f8faf8;
}

.matrix-stage strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.matrix-stage span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.heat-cell {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 70px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  align-items: center;
  gap: 3px 7px;
  padding: 9px 10px;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  text-align: left;
  transition: filter 130ms ease, box-shadow 130ms ease;
}

.heat-cell:hover {
  z-index: 1;
  filter: saturate(1.12);
  box-shadow: inset 0 0 0 2px rgb(39 83 57 / 38%);
}

.heat-cell.is-selected {
  z-index: 2;
  box-shadow: inset 0 0 0 2px var(--green-dark);
}

.heat-cell.severity-low {
  background-color: #e0f1e7;
}

.heat-cell.severity-mid {
  background-color: #f8f0dc;
}

.heat-cell.severity-high {
  background-color: #f8e4c1;
}

.heat-cell.severity-critical {
  background-color: #f5d8d4;
}

.heat-main {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heat-step {
  margin-right: 5px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.heat-score {
  grid-row: span 2;
  color: var(--ink);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
}

.severity-critical .heat-score {
  color: var(--red-dark);
}

.heat-status {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.severity-critical .heat-status {
  color: var(--red-dark);
}

.heat-status-mark {
  display: inline-grid;
  width: 13px;
  height: 13px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.empty-cell {
  display: flex;
  min-height: 70px;
  align-items: center;
  gap: 7px;
  padding: 10px;
  background: #f5f7f5;
  color: var(--muted);
  font-size: 12px;
}

.empty-mark {
  display: grid;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px dashed #aab7ae;
  border-radius: 50%;
  color: #5c6c62;
  font-size: 12px;
  font-weight: 700;
}

.filter-empty {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  color: var(--muted);
  text-align: center;
}

.inspector {
  position: sticky;
  top: 78px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfb;
}

.inspector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  background: #f5f8f5;
}

.inspector-head h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
}

.inspector-index {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.inspector-content {
  display: grid;
  gap: 11px;
  padding: 12px;
}

.selected-step-title {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.selected-step-title .app-mark {
  width: 30px;
  height: 30px;
}

.selected-step-name {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.selected-step-name span {
  color: var(--muted);
  font-size: 12px;
}

.selected-step-name strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
}

.selected-score {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 6px;
  background: #f4e5e2;
}

.selected-score.score-low {
  background: #e6f1e9;
}

.selected-score.score-mid {
  background: #f8f1df;
}

.selected-score.score-high {
  background: #f8e8d0;
}

.selected-score strong {
  color: var(--red-dark);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.selected-score.score-low strong {
  color: var(--green-dark);
}

.selected-score.score-mid strong {
  color: #815a17;
}

.selected-score.score-high strong {
  color: #8a5412;
}

.selected-score span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.screen-schematic {
  position: relative;
  width: 100%;
  min-height: 108px;
  overflow: hidden;
  padding: 7px 10px;
  border: 1px solid #c9d4cc;
  border-radius: 7px;
  background: #eef2ef;
}

.screen-caption {
  position: absolute;
  top: 7px;
  right: 8px;
  color: #58695e;
  font-size: 12px;
}

.screen-surface {
  width: min(100%, 210px);
  min-height: 80px;
  margin: 10px auto 0;
  padding: 7px;
  border: 1px solid #d6ddd8;
  border-radius: 6px;
  background: white;
}

.screen-topline {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 7px;
}

.screen-avatar {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--app-mark-color, #507b61);
}

.screen-search {
  height: 14px;
  flex: 1;
  padding: 1px 5px;
  border-radius: 999px;
  background: #eef1ef;
  color: #6a776f;
  font-size: 7px;
}

.screen-tabs {
  display: flex;
  gap: 5px;
  padding-bottom: 5px;
  border-bottom: 1px solid #e6eae7;
}

.screen-tab {
  padding: 2px 4px;
  border-radius: 3px;
  color: #65736a;
  font-size: 7px;
}

.screen-tab.is-focus {
  background: var(--app-soft, #e6f0e8);
  color: var(--app-ink, #28583d);
  font-weight: 700;
}

.screen-lines {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.screen-lines span {
  display: block;
  height: 4px;
  border-radius: 3px;
  background: #e6ebe7;
}

.screen-lines span:nth-child(1) {
  width: 88%;
}

.screen-lines span:nth-child(2) {
  width: 62%;
}

.screen-lines span:nth-child(3) {
  width: 76%;
}

.evidence-caption {
  margin: -7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.metric-breakdown {
  display: grid;
  gap: 7px;
}

.metric-line {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 25px;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.metric-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ede9;
}

.metric-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--fill-color, var(--green));
}

.metric-line strong {
  color: var(--ink-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.reason-block {
  padding: 9px 10px;
  border: 1px solid #e2e8e3;
  border-radius: 6px;
  background: #fff;
}

.reason-block strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink-soft);
  font-size: 12px;
}

.reason-block p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.inspector-nav {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 1px;
}

.step-nav-button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
}

.step-nav-button:hover:not(:disabled) {
  border-color: #96ab9c;
  color: var(--green-dark);
}

.step-nav-button:disabled {
  color: #98a39b;
  cursor: not-allowed;
}

.step-nav-button svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.matrix-footnote {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 12px;
}

.footnote-mark {
  display: grid;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #9aa99f;
  border-radius: 50%;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 700;
}

.insights-section {
  margin-top: 16px;
}

.insight-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 18px;
}

.hotspot-panel,
.profile-panel {
  min-width: 0;
}

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

.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.panel-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.panel-heading > span {
  color: var(--muted);
  font-size: 12px;
}

.hotspot-list {
  display: grid;
  gap: 7px;
}

.hotspot-item {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid #e7ece8;
  border-radius: 6px;
  background: #fcfdfc;
}

.hotspot-rank {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 5px;
  background: #f6e6e3;
  color: var(--red-dark);
  font-size: 12px;
  font-weight: 700;
}

.hotspot-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.hotspot-copy strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hotspot-copy span {
  color: var(--muted);
  font-size: 12px;
}

.hotspot-score {
  min-width: 35px;
  color: var(--red-dark);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
}

.profile-legend {
  display: flex;
  gap: 14px;
  margin: -3px 0 8px;
  color: var(--muted);
  font-size: 12px;
}

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

.profile-key {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.key-cognitive {
  background: #427c61;
}

.key-execution {
  background: #86ad95;
}

.profile-chart {
  display: grid;
  gap: 10px;
}

.profile-row {
  display: grid;
  grid-template-columns: 65px minmax(0, 1fr) 62px;
  align-items: center;
  gap: 10px;
}

.profile-app {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.profile-app .app-mark {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  font-size: 9px;
}

.stacked-bar {
  display: flex;
  height: 14px;
  overflow: hidden;
  border-radius: 4px;
  background: #edf1ee;
}

.stacked-bar span {
  display: block;
  height: 100%;
}

.stack-cognitive {
  background: #427c61;
}

.stack-execution {
  background: #86ad95;
}

.profile-values {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.profile-values strong {
  color: var(--ink);
  font-weight: 700;
}

.profile-empty,
.hotspot-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
}

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 10px 2px;
  color: var(--muted-light);
  font-size: 12px;
}

.is-flash {
  animation: selection-flash 600ms ease-out;
}

@keyframes selection-flash {
  0% { box-shadow: inset 0 0 0 2px var(--green-dark); }
  100% { box-shadow: inset 0 0 0 0 transparent; }
}

@media (max-width: 1160px) {
  .topbar {
    gap: 16px;
    padding: 0 20px;
  }

  .top-nav {
    gap: 0;
  }

  .nav-link {
    min-width: 68px;
    padding: 0 8px;
    font-size: 12px;
  }

  .prototype-label {
    display: none;
  }

  .page-shell {
    width: min(100% - 40px, 1480px);
  }

  .controls {
    gap: 15px;
  }

  .comparison-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 12px;
  }

  .matrix-grid {
    grid-template-columns: minmax(118px, 0.78fr) repeat(3, minmax(0, 1fr));
  }

  .matrix-stage,
  .heat-cell {
    padding-right: 7px;
    padding-left: 7px;
  }
}

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    gap: 0 18px;
    padding: 0 16px;
  }

  .brand {
    min-height: 56px;
  }

  .top-nav {
    order: 3;
    width: 100%;
    height: 42px;
    border-top: 1px solid #edf0ed;
  }

  .nav-link {
    min-width: 0;
    justify-content: flex-start;
    padding: 0 11px;
  }

  .top-actions {
    margin-left: auto;
  }

  .page-shell {
    width: min(100% - 32px, 1480px);
    padding-top: 20px;
  }

  .page-heading {
    align-items: flex-start;
  }

  .task-selector {
    width: 36%;
  }

  .overview-line {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .overview-stats {
    justify-content: flex-start;
  }

  .controls {
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px 20px;
  }

  .check-control {
    margin-left: 0;
  }

  .reset-button {
    margin-left: auto;
  }

  .comparison-layout {
    grid-template-columns: 1fr;
  }

  .inspector {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
  }

  .inspector-content {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .inspector-content > .selected-step-title,
  .inspector-content > .selected-score,
  .inspector-content > .inspector-nav {
    grid-column: 1 / -1;
  }

  .inspector-content > .screen-schematic,
  .inspector-content > .evidence-caption {
    grid-column: 1;
  }

  .inspector-content > .metric-breakdown,
  .inspector-content > .reason-block {
    grid-column: 2;
  }

  .inspector-content > .metric-breakdown {
    grid-row: 3;
  }

  .inspector-content > .reason-block {
    grid-row: 4;
  }
}

@media (max-width: 660px) {
  body {
    font-size: 14px;
  }

  .topbar {
    position: relative;
    min-height: 98px;
    padding: 0 14px;
  }

  .brand {
    gap: 8px;
  }

  .brand-name {
    font-size: 14px;
  }

  .brand-section {
    font-size: 12px;
  }

  .top-actions {
    gap: 0;
  }

  .top-actions .button {
    min-height: 36px;
    padding: 0 9px;
    font-size: 12px;
  }

  .top-nav {
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .nav-link {
    min-height: 41px;
    flex: 0 0 auto;
  }

  .page-shell {
    width: min(100% - 24px, 1480px);
    padding-top: 17px;
  }

  .page-heading {
    display: grid;
    gap: 13px;
    margin-bottom: 13px;
  }

  h1 {
    max-width: 100%;
    font-size: 21px;
  }

  .heading-subtitle {
    max-width: 42ch;
    font-size: 12px;
  }

  .task-selector {
    width: 100%;
  }

  .overview-line {
    gap: 12px;
    padding: 12px;
  }

  .overview-context p {
    font-size: 12px;
  }

  .overview-stats {
    justify-content: space-between;
    gap: 6px 10px;
  }

  .overview-stat {
    gap: 4px;
    font-size: 12px;
  }

  .overview-stat strong {
    font-size: 15px;
  }

  .controls {
    align-items: flex-start;
    gap: 12px;
    padding-top: 14px;
  }

  .metric-field,
  .app-field {
    width: 100%;
  }

  .metric-field legend,
  .app-field legend {
    margin-bottom: 6px;
  }

  .segmented-control {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .segment {
    padding: 0 5px;
    font-size: 12px;
  }

  .app-toggles {
    gap: 6px;
  }

  .app-filter {
    min-height: 44px;
    padding: 0 9px;
  }

  .check-control {
    min-height: 44px;
  }

  .reset-button {
    min-height: 44px;
    margin-left: auto;
  }

  .legend-row {
    justify-content: flex-start;
    padding: 9px 0 2px;
  }

  .legend-explainer {
    flex-basis: 100%;
  }

  .legend-scale {
    gap: 8px 11px;
  }

  .legend-note {
    flex-basis: 100%;
  }

  .workspace-section {
    margin-top: 12px;
    padding: 14px 12px;
  }

  .section-heading {
    gap: 10px;
    margin-bottom: 12px;
  }

  .section-heading p {
    max-width: 42ch;
    margin-left: 31px;
    font-size: 12px;
  }

  .section-heading h2 {
    font-size: 15px;
  }

  .section-tools {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
  }

  .step-count {
    font-size: 12px;
  }

  .text-button {
    min-height: 40px;
    font-size: 12px;
  }

  .alignment-note {
    margin-left: 0;
  }

  .flow-board {
    gap: 9px;
  }

  .flow-lane {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    padding: 9px;
    border-color: #e6ebe7;
    background: #fbfcfb;
  }

  .flow-app {
    gap: 7px;
  }

  .flow-app .app-mark {
    width: 28px;
    height: 28px;
  }

  .app-identity {
    display: flex;
    align-items: baseline;
    gap: 7px;
  }

  .app-identity strong {
    font-size: 12px;
  }

  .app-identity span {
    font-size: 12px;
  }

  .flow-sequence {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    padding-left: 11px;
    border-left: 1px solid var(--line-strong);
  }

  .flow-step {
    width: 100%;
    max-width: none;
    min-height: 42px;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .flow-step-copy strong {
    white-space: normal;
  }

  .flow-step-copy span {
    font-size: 12px;
  }

  .flow-connector {
    display: none;
  }

  .matrix-reading {
    max-width: 100px;
    font-size: 12px;
    text-align: right;
  }

  .matrix-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .matrix-header {
    display: none;
  }

  .matrix-stage {
    min-height: 0;
    padding: 9px 10px 7px;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
  }

  .matrix-stage strong {
    display: inline;
    margin: 0 7px 0 0;
  }

  .matrix-stage span {
    display: inline;
    font-size: 12px;
  }

  .heat-cell,
  .empty-cell {
    min-height: 54px;
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }

  .heat-cell:last-child,
  .empty-cell:last-child {
    border-bottom: 1px solid var(--line);
    border-radius: 0 0 6px 6px;
  }

  .heat-cell::before,
  .empty-cell::before {
    display: inline-flex;
    width: 76px;
    flex: 0 0 auto;
    align-items: center;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
    content: attr(data-app-name);
  }

  .heat-cell {
    grid-template-columns: 76px minmax(0, 1fr) auto;
    gap: 4px 8px;
    padding: 7px 9px;
  }

  .heat-cell .heat-main {
    grid-column: 2;
    grid-row: 1;
    font-size: 12px;
  }

  .heat-cell .heat-status {
    grid-column: 2;
    grid-row: 2;
  }

  .heat-cell .heat-score {
    grid-column: 3;
    grid-row: 1 / span 2;
    font-size: 17px;
  }

  .empty-cell {
    min-height: 48px;
    padding: 7px 9px;
    border-top: 1px solid var(--line);
    background: #f4f7f4;
    font-size: 12px;
  }

  .empty-cell::before {
    content: attr(data-app-name);
  }

  .comparison-layout {
    gap: 12px;
  }

  .inspector-content {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .inspector-content > * {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  .screen-schematic {
    min-height: 112px;
  }

  .inspector-nav {
    grid-column: 1 !important;
  }

  .matrix-footnote {
    font-size: 12px;
  }

  .insight-layout {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .hotspot-panel {
    padding: 0 0 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .profile-row {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 4px 8px;
  }

  .profile-app {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .stacked-bar,
  .profile-values {
    grid-column: 2;
  }

  .profile-values {
    text-align: left;
    white-space: normal;
  }

  .page-footer {
    flex-direction: column;
    gap: 4px;
  }
}

@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;
  }
}
