:root {
  --bg: #f6f7f4;
  --panel: #ffffff;
  --panel-2: #eef2ee;
  --ink: #202422;
  --muted: #68706a;
  --line: #d9dfda;
  --accent: #26796f;
  --accent-2: #a94f3b;
  --accent-3: #b48b2f;
  --soft: #e4efec;
  --danger: #a53d35;
  --shadow: 0 12px 24px rgba(40, 47, 44, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

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

.sidebar {
  background: #1f2b27;
  color: #f8faf7;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 52px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  font-weight: 750;
}

.brand-title {
  font-weight: 750;
}

.brand-subtitle,
.sidebar-meta {
  color: rgba(248, 250, 247, 0.68);
  font-size: 13px;
  line-height: 1.4;
}

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

.nav-item {
  border: 0;
  color: rgba(248, 250, 247, 0.74);
  background: transparent;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
}

.sidebar-meta {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(246, 247, 244, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

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

h1 {
  font-size: 26px;
  line-height: 1.15;
}

#pageSubtitle {
  color: var(--muted);
  margin-top: 4px;
  font-size: 14px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search,
.select,
.input {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 8px;
  min-height: 40px;
  padding: 0 12px;
  outline: none;
}

.search {
  width: min(360px, 32vw);
}

.search:focus,
.select:focus,
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(38, 121, 111, 0.14);
}

.button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  min-height: 40px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 650;
}

.button.secondary {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}

.button.warning {
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.button.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.track-selection-mode .top-actions {
  display: none;
}

.content {
  padding: 26px 28px 42px;
  display: grid;
  gap: 18px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  min-width: 0;
}

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

.panel h2 {
  font-size: 18px;
  line-height: 1.25;
}

.panel h3 {
  font-size: 15px;
  line-height: 1.3;
}

.muted {
  color: var(--muted);
}

.small-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.metric {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.metric-value {
  font-size: 28px;
  font-weight: 780;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.alert {
  border: 1px solid rgba(169, 79, 59, 0.38);
  background: #fff4ef;
  color: #5c2d24;
  border-radius: 8px;
  padding: 12px 14px;
  line-height: 1.45;
}

.readiness-panel {
  display: grid;
  gap: 16px;
}

.readiness-badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 760;
  white-space: nowrap;
}

.readiness-badge {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.readiness-badge.ready,
.status-pill.ready {
  background: #edf7f1;
  border-color: #b9dbc6;
  color: #205738;
}

.readiness-badge.warning {
  background: #fff7e6;
  border-color: #ecd39c;
  color: #6a4a10;
}

.readiness-badge.blocked,
.status-pill.blocked {
  background: #fff4ef;
  border-color: rgba(169, 79, 59, 0.38);
  color: #5c2d24;
}

.status-pill {
  min-height: 24px;
  padding: 0 9px;
  font-size: 12px;
}

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

.readiness-stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 12px;
  min-width: 0;
}

.readiness-stat strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.readiness-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.readiness-details h3 {
  margin-bottom: 10px;
}

.compact-table table {
  font-size: 13px;
}

.warning-list {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--ink);
  line-height: 1.45;
}

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.diagnostic-methodology-mode .main {
  background: #ffffff;
}

.diagnostic-methodology {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 56px;
  background: #ffffff;
}

.diagnostic-methodology h2 {
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
  color: #020617;
}

.diagnostic-methodology > p {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.55;
  color: #475569;
}

.diagnostic-methodology h3 {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 800;
  color: #020617;
  margin-top: 36px;
  margin-bottom: 10px;
}

.ecs-range-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.ecs-range-card {
  border-radius: 8px;
  padding: 12px 10px;
  text-align: center;
}

.ecs-critical {
  background: #fef2f2;
  color: #dc2626;
}

.ecs-moderate {
  background: #fffbeb;
  color: #d97706;
}

.ecs-compatible {
  background: #ecfdf5;
  color: #059669;
}

.ecs-high {
  background: #eff6ff;
  color: #2563eb;
}

.ecs-moderate-low {
  background: #fff7ed;
  color: #c2410c;
}

.ecs-range {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 800;
}

.ecs-label {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 800;
}

.ecs-official-card {
  text-align: left;
  min-height: 148px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.ecs-official-card p {
  color: inherit;
  font-size: 11px;
  line-height: 1.3;
  margin: 0;
  opacity: 0.86;
}

.methodology-note {
  font-size: 11px !important;
  line-height: 1.45 !important;
  font-style: italic;
  color: #64748b !important;
  margin-top: 10px !important;
}

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

.methodology-env-card {
  border: 1px solid #d9dee7;
  border-radius: 10px;
  background: #ffffff;
  padding: 16px 18px;
  min-height: 132px;
}

.environment-code-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  color: #475569;
  background: #f8fafc;
}

.methodology-env-card h3 {
  font-size: 13px;
  font-weight: 800;
  color: #020617;
  margin-top: 10px;
  margin-bottom: 0;
}

.methodology-env-card p {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.45;
  color: #475569;
}

.methodology-env-link {
  display: inline-block;
  margin-top: 10px;
  color: #17675f;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.methodology-env-link:hover {
  text-decoration: underline;
}

.methodology-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.methodology-continue {
  border: 0;
  border-radius: 8px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 800;
  background: #111827;
  color: #ffffff;
  cursor: pointer;
}

.methodology-continue:hover {
  background: #020617;
}

.methodology-continue.secondary {
  border: 1px solid #111827;
  background: #ffffff;
  color: #111827;
}

.methodology-continue.secondary:hover {
  background: #f8fafc;
}

.track-selection {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.track-kicker {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.track-selection h2 {
  font-size: 34px;
  line-height: 1.12;
  font-weight: 800;
  color: #111827;
  max-width: 720px;
}

.track-subtitle {
  color: #64748b;
  font-size: 16px;
  line-height: 1.55;
  max-width: 720px;
  margin-top: 12px;
}

.track-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 720px;
  margin-top: 28px;
}

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

.track-card {
  border: 1px solid #d9dee7;
  border-radius: 12px;
  background: white;
  padding: 24px 26px;
  display: block;
  text-align: left;
  color: #111827;
  cursor: pointer;
}

.motive-card {
  border: 1px solid #d9dee7;
  border-radius: 12px;
  background: white;
  padding: 22px;
  display: block;
  text-align: left;
  color: #111827;
  cursor: pointer;
  min-height: 230px;
}

.track-card:hover {
  border-color: #9ca3af;
}

.track-card.locked,
.track-card:disabled {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
}

.track-card.locked:hover,
.track-card:disabled:hover {
  border-color: #e2e8f0;
}

.motive-card:hover {
  border-color: #9ca3af;
}

.track-card:focus-visible {
  outline: 3px solid rgba(17, 24, 39, 0.18);
  outline-offset: 3px;
}

.motive-card:focus-visible,
.preservation-card:focus-visible {
  outline: 3px solid rgba(17, 24, 39, 0.18);
  outline-offset: 3px;
}

.track-card.selected {
  border-color: #111827;
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.08);
}

.motive-card.selected,
.preservation-card.selected {
  border-color: #111827;
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.08);
}

.track-label {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.track-title {
  display: block;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
}

.track-description {
  display: block;
  color: #64748b;
  font-size: 15px;
  line-height: 1.45;
  margin-top: 6px;
}

.track-code-block {
  display: block;
  margin-top: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.track-lock-block {
  display: block;
  margin-top: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.track-code-block span,
.track-lock-block span,
.target-code-share span,
.target-code-panel label span {
  display: block;
  color: #475569;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.track-code-block strong,
.target-code-share strong {
  display: block;
  margin-top: 6px;
  color: #020617;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: 0;
}

.track-code-block em {
  display: block;
  margin-top: 8px;
  color: #475569;
  font-size: 12px;
  font-style: normal;
  line-height: 1.4;
}

.track-lock-block em {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  line-height: 1.4;
}

.motive-demand,
.motive-guidance {
  display: block;
  line-height: 1.45;
}

.motive-demand {
  color: #17675f;
  font-size: 13px;
  font-weight: 850;
  margin-top: 8px;
}

.motive-guidance {
  color: #374151;
  font-size: 13px;
  margin-top: 16px;
}

.preservation-panel {
  border: 1px solid #d9dee7;
  border-radius: 12px;
  background: #f8fafc;
  margin-top: 18px;
  padding: 18px;
}

.preservation-panel h3 {
  color: #111827;
  font-size: 16px;
}

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

.preservation-card {
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  display: block;
  min-height: 132px;
  padding: 14px;
  text-align: left;
}

.preservation-title,
.preservation-description,
.preservation-demand {
  display: block;
}

.preservation-title {
  font-weight: 850;
  line-height: 1.25;
}

.preservation-description {
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
  margin-top: 6px;
}

.preservation-demand {
  color: #17675f;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  margin-top: 10px;
}

.motive-summary,
.motive-context {
  border: 1px solid #c8ddd5;
  border-radius: 8px;
  background: #eff7f3;
  color: #1f4d3a;
  line-height: 1.45;
}

.motive-summary {
  display: grid;
  gap: 4px;
  margin-top: 18px;
  padding: 13px 14px;
}

.motive-summary strong {
  font-size: 13px;
}

.motive-summary span,
.motive-context {
  font-size: 14px;
}

.motive-context {
  margin-top: 16px;
  max-width: 720px;
  padding: 12px 14px;
}

.track-steps {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.track-step {
  display: block;
}

.track-step-number {
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
}

.track-step-title {
  font-weight: 800;
  line-height: 1.25;
}

.track-step-meta {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.4;
  margin-top: 2px;
  white-space: nowrap;
}

.track-continue {
  border: 0;
  border-radius: 8px;
  padding: 14px 32px;
  font-weight: 700;
  font-size: 16px;
  margin-top: 24px;
  background: #111827;
  color: white;
  cursor: pointer;
}

.track-continue:disabled {
  background: #9ca3af;
  color: white;
  cursor: not-allowed;
}

.diagnostic-page-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
}

.reset-button {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
  cursor: pointer;
}

.framework-button {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
  cursor: pointer;
}

.pdf-button {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  cursor: pointer;
}

.pdf-print-frame {
  border: 0;
  bottom: 0;
  height: 0;
  position: fixed;
  right: 0;
  width: 0;
}

.deal-context-step {
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.step-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a94a6;
}

.page-title {
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
  color: #020617;
}

.question-group {
  margin-top: 28px;
}

.question-label {
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a94a6;
}

.deal-options {
  display: grid;
  gap: 8px;
}

.option-card {
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid #d8dee8;
  border-radius: 7px;
  background: #ffffff;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.option-card:hover {
  border-color: #9ca3af;
  cursor: pointer;
}

.option-card:focus-visible {
  outline: 3px solid rgba(17, 24, 39, 0.18);
  outline-offset: 3px;
}

.option-card[data-selected="true"] {
  border-color: #111827;
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.08);
}

.option-letter {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: #4f46e5;
}

.option-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #020617;
}

.option-description {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.35;
  color: #64748b;
}

.deal-continue {
  margin-top: 28px;
  border: 0;
  border-radius: 7px;
  padding: 13px 24px;
  font-size: 14px;
  font-weight: 800;
  background: #111827;
  color: white;
  cursor: pointer;
}

.deal-continue:disabled {
  background: #9ca3af;
  color: white;
  cursor: not-allowed;
}

.questionnaire-runner {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.runner-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a94a6;
}

.question-counter-row {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
}

.question-progress {
  height: 5px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  margin-top: 12px;
}

.question-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: #6259ff;
}

.question-text {
  margin-top: 44px;
  font-size: 23px;
  line-height: 1.45;
  font-weight: 800;
  color: #020617;
  max-width: 720px;
}

.answer-list {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.answer-card {
  width: 100%;
  padding: 18px 20px;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 18px;
  line-height: 1.45;
  color: #172033;
}

.answer-card:hover {
  border-color: #9ca3af;
  cursor: pointer;
}

.answer-card:focus-visible {
  outline: 3px solid rgba(98, 89, 255, 0.22);
  outline-offset: 3px;
}

.answer-card[data-selected="true"] {
  border-color: #111827;
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.08);
}

.answer-letter {
  flex: 0 0 auto;
  font-size: 17px;
  line-height: 1.45;
  font-weight: 800;
  color: #4f46e5;
}

.question-nav {
  margin-top: 42px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.preliminary-assessment {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.preliminary-assessment h2 {
  margin-top: 4px;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
  color: #020617;
}

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

.assessment-card,
.assessment-report,
.next-step-panel,
.target-link-panel {
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

.assessment-card h3,
.assessment-report h3,
.next-step-panel h3,
.target-link-panel h3 {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 800;
  color: #020617;
}

.assessment-card p,
.assessment-report p,
.next-step-panel p,
.target-link-panel p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #475569;
}

.assessment-signal {
  margin-top: 10px;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
  color: #111827;
}

.answer-trail {
  max-height: 88px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.muted-card {
  background: #f8fafc;
}

.assessment-report {
  margin-top: 16px;
}

.reconciliation-panel {
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #ffffff;
  margin-top: 16px;
  padding: 16px;
}

.reconciliation-panel .panel-header {
  margin-bottom: 12px;
}

.reconciliation-panel h3 {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 800;
  color: #020617;
}

.reconciliation-badge {
  border: 1px solid #d9dee7;
  border-radius: 999px;
  color: #111827;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.reconciliation-confirmed .reconciliation-badge {
  background: #edf7f1;
  border-color: #b9dbc6;
  color: #205738;
}

.reconciliation-warning .reconciliation-badge,
.reconciliation-pending .reconciliation-badge {
  background: #fff7e6;
  border-color: #ecd39c;
  color: #6a4a10;
}

.reconciliation-blocked .reconciliation-badge {
  background: #fff4ef;
  border-color: rgba(169, 79, 59, 0.38);
  color: #5c2d24;
}

.reconciliation-grid {
  display: grid;
  gap: 10px;
}

.reconciliation-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 180px;
  gap: 12px;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  padding: 11px 12px;
}

.reconciliation-row.ecs-input {
  background: #eff7f3;
  border-color: #c8ddd5;
}

.reconciliation-source {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.reconciliation-row strong {
  color: #111827;
  font-size: 14px;
  line-height: 1.35;
}

.reconciliation-row span:last-child {
  color: #475569;
  font-size: 13px;
  line-height: 1.35;
}

.reconciliation-finding {
  border-top: 1px solid #e5e7eb;
  margin-top: 14px;
  padding-top: 12px;
}

.reconciliation-finding strong {
  color: #111827;
  font-size: 14px;
}

.reconciliation-finding p {
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 7px;
}

.reconciliation-link-code-block {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  margin-top: 14px;
  padding: 14px;
}

.reconciliation-link-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reconciliation-link-code-header h4 {
  color: #020617;
  font-size: 15px;
  line-height: 1.3;
  margin: 0;
}

.reconciliation-link-code-header span {
  border: 1px solid #d9dee7;
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 9px;
  white-space: nowrap;
}

.target-invite-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  margin-top: 12px;
}

.invite-field-label {
  display: block;
  color: #475569;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.invite-code {
  display: block;
  margin-top: 8px;
  color: #020617;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0;
}

.target-email-send {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}

.target-email-send input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #020617;
  font-size: 15px;
  line-height: 1.3;
  margin-top: 7px;
  padding: 10px 12px;
}

.target-email-send input:focus {
  border-color: #111827;
  outline: 3px solid rgba(17, 24, 39, 0.12);
}

.target-email-message {
  color: #17675f;
  font-size: 13px;
  line-height: 1.45;
  margin-top: 10px;
}

.target-email-message.error {
  color: #b42318;
}

.final-ecs-panel {
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #ffffff;
  margin-top: 16px;
  padding: 16px;
}

.final-ecs-panel h3 {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 850;
  color: #020617;
}

.final-ecs-badge {
  border: 1px solid #d9dee7;
  border-radius: 999px;
  color: #111827;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.final-ecs-confirmed .final-ecs-badge {
  background: #edf7f1;
  border-color: #b9dbc6;
  color: #205738;
}

.final-ecs-warning .final-ecs-badge,
.final-ecs-pending .final-ecs-badge {
  background: #fff7e6;
  border-color: #ecd39c;
  color: #6a4a10;
}

.final-ecs-blocked .final-ecs-badge {
  background: #fff4ef;
  border-color: rgba(169, 79, 59, 0.38);
  color: #5c2d24;
}

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

.final-ecs-input-row {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  padding: 11px 12px;
  display: grid;
  gap: 5px;
}

.final-ecs-input-row span,
.final-ecs-score-grid span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.final-ecs-input-row strong {
  color: #111827;
  font-size: 14px;
  line-height: 1.35;
}

.final-ecs-input-row em,
.final-ecs-score-grid em {
  color: #475569;
  font-size: 13px;
  font-style: normal;
  line-height: 1.35;
}

.final-ecs-score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.final-ecs-score-grid > div {
  border: 1px solid #d7e5e1;
  border-radius: 8px;
  background: #f7fbfa;
  padding: 12px;
  display: grid;
  gap: 5px;
}

.final-ecs-score-grid strong {
  color: #020617;
  font-size: 22px;
  line-height: 1.1;
}

.final-ecs-hold {
  border: 1px solid rgba(169, 79, 59, 0.32);
  border-radius: 8px;
  background: #fff7f3;
  color: #5c2d24;
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 12px;
}

.final-ecs-rule-note,
.final-ecs-friction,
.final-ecs-drivers,
.final-ecs-valuation-meaning,
.final-ecs-protocol-panel,
.final-ecs-friction-timeline {
  border-top: 1px solid #e5e7eb;
  margin-top: 12px;
  padding-top: 12px;
}

.final-ecs-rule-note p,
.final-ecs-friction p,
.final-ecs-valuation-meaning p,
.final-ecs-protocol-panel p,
.final-ecs-friction-timeline p {
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 7px;
}

.final-ecs-rule-note p:first-child,
.final-ecs-friction p:first-child,
.final-ecs-valuation-meaning p:first-child,
.final-ecs-protocol-panel p:first-child,
.final-ecs-friction-timeline p:first-child {
  margin-top: 0;
}

.final-ecs-valuation-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.final-ecs-valuation-header span {
  color: #64748b;
  display: block;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.final-ecs-valuation-header strong {
  color: #020617;
  display: block;
  font-size: 17px;
  line-height: 1.25;
  margin-top: 4px;
}

.final-ecs-valuation-header em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.final-ecs-valuation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.final-ecs-valuation-card {
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #f8fafc;
  display: grid;
  gap: 5px;
  padding: 11px 12px;
}

.final-ecs-valuation-card span {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.final-ecs-valuation-card strong {
  color: #111827;
  font-size: 14px;
  line-height: 1.35;
}

.final-ecs-valuation-hold {
  border-top-color: rgba(169, 79, 59, 0.28);
}

.final-ecs-valuation-hold strong {
  color: #5c2d24;
  font-size: 14px;
}

.final-ecs-protocol-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.final-ecs-protocol-header span {
  color: #64748b;
  display: block;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.final-ecs-protocol-header strong {
  color: #020617;
  display: block;
  font-size: 17px;
  line-height: 1.25;
  margin-top: 4px;
}

.final-ecs-protocol-header em {
  border: 1px solid #d9dee7;
  border-radius: 999px;
  color: #334155;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  padding: 6px 10px;
  white-space: nowrap;
}

.protocol-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.protocol-selector-card {
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #f8fafc;
  display: grid;
  gap: 5px;
  padding: 11px 12px;
}

.protocol-selector-card.selected {
  background: #eff7f3;
  border-color: #b9dbc6;
  box-shadow: 0 0 0 2px rgba(33, 98, 62, 0.07);
}

.protocol-selector-card span {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.protocol-selector-card strong {
  color: #111827;
  font-size: 14px;
  line-height: 1.3;
}

.protocol-selector-card p {
  color: #475569;
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
}

.final-ecs-timeline-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.final-ecs-timeline-header span {
  color: #64748b;
  display: block;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.final-ecs-timeline-header strong {
  color: #020617;
  display: block;
  font-size: 17px;
  line-height: 1.25;
  margin-top: 4px;
}

.final-ecs-timeline-header em {
  border: 1px solid #d9dee7;
  border-radius: 999px;
  color: #334155;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  padding: 6px 10px;
  white-space: nowrap;
}

.friction-timeline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.friction-timeline-item {
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #f8fafc;
  display: grid;
  gap: 9px;
  padding: 12px;
}

.friction-timeline-item div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.friction-timeline-item span {
  border: 1px solid #c8ddd5;
  border-radius: 999px;
  background: #eff7f3;
  color: #205738;
  font-size: 11px;
  font-weight: 850;
  padding: 4px 8px;
}

.friction-timeline-item strong {
  color: #111827;
  font-size: 13px;
  line-height: 1.3;
  text-align: right;
}

.friction-timeline-item p {
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.client-output-panel {
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #ffffff;
  margin-top: 16px;
  padding: 16px;
}

.client-output-panel h3 {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 850;
  color: #020617;
}

.client-output-badge {
  border: 1px solid #d9dee7;
  border-radius: 999px;
  color: #111827;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.client-output-hold {
  background: #fff7f3;
  border-color: rgba(169, 79, 59, 0.32);
}

.client-output-hold .client-output-badge {
  background: #fff4ef;
  border-color: rgba(169, 79, 59, 0.38);
  color: #5c2d24;
}

.client-output-panel > p {
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}

.client-output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.client-output-blocks {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.client-output-block {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.client-output-block h4 {
  color: #020617;
  font-size: 14px;
  line-height: 1.3;
  margin: 0 0 8px;
}

.client-output-block p {
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
  margin: 7px 0 0;
}

.client-output-block p:first-of-type {
  margin-top: 0;
}

.deal-risk-panel {
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #ffffff;
  margin-top: 16px;
  padding: 16px;
}

.deal-risk-panel h3 {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 850;
  color: #020617;
}

.deal-risk-badge {
  border: 1px solid #d9dee7;
  border-radius: 999px;
  color: #111827;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.deal-risk-hold {
  background: #fff7f3;
  border-color: rgba(169, 79, 59, 0.32);
}

.deal-risk-hold .deal-risk-badge {
  background: #fff4ef;
  border-color: rgba(169, 79, 59, 0.38);
  color: #5c2d24;
}

.deal-risk-offer .deal-risk-badge {
  background: #fff7e6;
  border-color: #ecd39c;
  color: #6a4a10;
}

.deal-risk-controls {
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}

.deal-risk-controls label {
  display: grid;
  gap: 6px;
}

.deal-risk-controls label > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.deal-risk-controls input[type="number"] {
  border: 1px solid #d9dee7;
  border-radius: 7px;
  color: #111827;
  font-size: 14px;
  min-height: 38px;
  padding: 8px 10px;
}

.deal-risk-request {
  align-items: center;
  display: flex !important;
  gap: 9px !important;
  min-height: 38px;
}

.deal-risk-request input {
  width: 16px;
  height: 16px;
}

.deal-risk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.deal-risk-sections {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.deal-risk-section {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.deal-risk-section h4 {
  color: #020617;
  font-size: 14px;
  line-height: 1.3;
  margin: 0 0 8px;
}

.deal-risk-panel p,
.deal-risk-section p {
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
  margin: 7px 0 0;
}

.deal-risk-section p:first-of-type {
  margin-top: 0;
}

.deal-risk-disclaimer {
  border-top: 1px solid #e5e7eb;
  color: #64748b !important;
  font-style: italic;
  margin-top: 12px !important;
  padding-top: 12px;
}

.final-package-panel {
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

.final-package-panel h2 {
  color: #020617;
  font-size: 20px;
  line-height: 1.25;
  margin: 0;
}

.final-package-panel > p {
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
  margin: 12px 0 0;
}

.final-package-hold {
  background: #fff7f3;
  border-color: rgba(169, 79, 59, 0.32);
}

.final-package-badge {
  border: 1px solid #d9dee7;
  border-radius: 999px;
  color: #111827;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.final-package-hold .final-package-badge {
  background: #fff4ef;
  border-color: rgba(169, 79, 59, 0.38);
  color: #5c2d24;
}

.deliverable-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.final-package-meta,
.final-package-snapshot {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

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

.final-package-meta > div {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.final-package-meta strong {
  color: #020617;
  display: block;
  font-size: 15px;
  line-height: 1.3;
}

.final-package-meta span {
  color: #64748b;
  display: block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  margin-top: 4px;
  text-transform: uppercase;
}

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

.deliverable-card {
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.deliverable-card-header {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: 36px minmax(0, 1fr);
  margin-bottom: 10px;
}

.deliverable-card-header > span {
  align-items: center;
  border: 1px solid #bdd5ce;
  border-radius: 8px;
  background: #f3faf8;
  color: #155244;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.deliverable-card h3 {
  color: #020617;
  font-size: 15px;
  line-height: 1.3;
  margin: 0;
}

.deliverable-card em {
  color: #64748b;
  display: block;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
  margin-top: 3px;
}

.deliverable-card p {
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
  margin: 7px 0 0;
}

.deliverable-card p:first-of-type {
  margin-top: 0;
}

.deliverable-mini-list {
  border-top: 1px solid #e5e7eb;
  margin-top: 10px;
  padding-top: 10px;
}

.package-disclaimer {
  border-top: 1px solid #e5e7eb;
  color: #64748b !important;
  font-style: italic;
  margin-top: 10px !important;
  padding-top: 10px;
}

.final-package-sources {
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #ffffff;
  margin-top: 16px;
  padding: 14px;
}

.final-package-sources h3 {
  color: #020617;
  font-size: 15px;
  line-height: 1.3;
  margin: 0 0 10px;
}

.final-package-sources ul {
  display: grid;
  gap: 7px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.final-package-sources li {
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.final-package-sources strong {
  color: #111827;
  margin-right: 6px;
}

.final-ecs-drivers strong {
  color: #111827;
  font-size: 14px;
}

.final-ecs-drivers div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.final-ecs-drivers span {
  border: 1px solid #d9dee7;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 750;
  padding: 7px 10px;
}

.next-step-panel {
  margin-top: 16px;
  border-color: #b7d7d0;
  background: #f7fbfa;
}

.contact-team-block {
  margin-top: 14px;
  border-top: 1px solid #d7e5e1;
  padding-top: 12px;
}

.contact-team-block h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 800;
  color: #020617;
}

.contact-team-block a {
  display: inline-block;
  margin-top: 6px;
  color: #17675f;
  font-size: 15px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.target-link-panel {
  margin-top: 16px;
}

.target-code-share {
  margin-top: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.target-code-share p {
  margin-top: 8px;
}

.assessment-link {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  background: #f8fafc;
  border-radius: 6px;
  padding: 10px 12px;
}

.target-code-gate {
  max-width: 640px;
}

.target-code-panel {
  margin-top: 20px;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
}

.target-code-panel input {
  width: min(100%, 220px);
  margin-top: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #020617;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0;
  padding: 10px 12px;
}

.target-code-panel input:focus {
  border-color: #111827;
  outline: 3px solid rgba(17, 24, 39, 0.12);
}

.target-code-error {
  margin-top: 10px;
  color: #b42318;
  font-size: 14px;
  font-weight: 750;
}

body.target-respondent-mode .app-shell {
  grid-template-columns: 1fr;
  min-height: 100vh;
}

body.target-respondent-mode .sidebar,
body.target-respondent-mode .topbar {
  display: none;
}

body.target-respondent-mode .content {
  min-height: 100vh;
  padding: 32px 20px;
}

.target-receipt {
  max-width: 620px;
  margin: 12vh auto 0;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #ffffff;
  padding: 28px;
  text-align: center;
}

.target-receipt-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid #b9dbc6;
  border-radius: 999px;
  background: #edf7f1;
  color: #205738;
  font-size: 12px;
  font-weight: 850;
  padding: 0 12px;
  text-transform: uppercase;
}

.target-receipt h2 {
  color: #020617;
  font-size: 28px;
  line-height: 1.15;
  margin-top: 14px;
}

.target-receipt p {
  color: #475569;
  font-size: 16px;
  line-height: 1.55;
  margin-top: 12px;
}

.target-receipt-close {
  color: #111827 !important;
  font-weight: 850;
}

body[data-view="diagnostic"] #pageSubtitle {
  font-size: 16px;
}

body[data-view="diagnostic"] .diagnostic-methodology h2 {
  font-size: 30px;
}

body[data-view="diagnostic"] .diagnostic-methodology > p {
  font-size: 15px;
}

body[data-view="diagnostic"] .diagnostic-methodology h3 {
  font-size: 17px;
}

body[data-view="diagnostic"] .ecs-range {
  font-size: 18px;
}

body[data-view="diagnostic"] .ecs-label,
body[data-view="diagnostic"] .methodology-note,
body[data-view="diagnostic"] .methodology-env-card p,
body[data-view="diagnostic"] .methodology-env-link,
body[data-view="diagnostic"] .environment-code-pill {
  font-size: 13px !important;
}

body[data-view="diagnostic"] .methodology-env-card h3 {
  font-size: 15px;
}

body[data-view="diagnostic"] .methodology-continue,
body[data-view="diagnostic"] .track-continue,
body[data-view="diagnostic"] .deal-continue,
body[data-view="diagnostic"] .nav-button {
  font-size: 17px;
}

body[data-view="diagnostic"] .track-kicker,
body[data-view="diagnostic"] .track-label {
  font-size: 14px;
}

body[data-view="diagnostic"] .track-selection h2 {
  font-size: 36px;
}

body[data-view="diagnostic"] .track-subtitle,
body[data-view="diagnostic"] .track-description {
  font-size: 18px;
}

body[data-view="diagnostic"] .track-title {
  font-size: 26px;
}

body[data-view="diagnostic"] .track-step-title {
  font-size: 18px;
}

body[data-view="diagnostic"] .track-step-meta {
  font-size: 15px;
}

body[data-view="diagnostic"] .step-eyebrow,
body[data-view="diagnostic"] .question-label,
body[data-view="diagnostic"] .runner-label {
  font-size: 13px;
}

body[data-view="diagnostic"] .page-title {
  font-size: 24px;
}

body[data-view="diagnostic"] .option-letter {
  font-size: 14px;
}

body[data-view="diagnostic"] .option-title {
  font-size: 15px;
}

body[data-view="diagnostic"] .option-description {
  font-size: 13px;
}

body[data-view="diagnostic"] .question-counter-row {
  font-size: 16px;
}

body[data-view="diagnostic"] .question-text {
  font-size: 25px;
}

body[data-view="diagnostic"] .answer-card {
  font-size: 20px;
}

body[data-view="diagnostic"] .answer-letter {
  font-size: 19px;
}

body[data-view="diagnostic"] .preliminary-assessment h2 {
  font-size: 30px;
}

body[data-view="diagnostic"] .assessment-card h3,
body[data-view="diagnostic"] .assessment-report h3,
body[data-view="diagnostic"] .next-step-panel h3,
body[data-view="diagnostic"] .target-link-panel h3 {
  font-size: 18px;
}

body[data-view="diagnostic"] .assessment-card p,
body[data-view="diagnostic"] .assessment-report p,
body[data-view="diagnostic"] .next-step-panel p,
body[data-view="diagnostic"] .target-link-panel p {
  font-size: 16px;
}

body[data-view="diagnostic"] .assessment-signal {
  font-size: 20px;
}

body[data-view="diagnostic"] .contact-team-block h4,
body[data-view="diagnostic"] .contact-team-block a {
  font-size: 17px;
}

.nav-button {
  min-width: 86px;
  border-radius: 8px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 800;
  border: 1px solid #111827;
}

.back-button {
  background: #ffffff;
  border-color: #e5e7eb;
  color: #111827;
  cursor: pointer;
}

.back-button:disabled {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #cbd5e1;
  cursor: not-allowed;
}

.next-button {
  background: #111827;
  border-color: #111827;
  color: white;
  cursor: pointer;
}

.next-button:disabled {
  background: #9ca3af;
  border-color: #9ca3af;
  color: white;
  cursor: not-allowed;
}

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

.segmented button,
.chip {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 8px;
  min-height: 34px;
  padding: 0 10px;
  cursor: pointer;
}

.segmented button.active,
.chip.active {
  border-color: var(--accent);
  background: var(--soft);
  color: #174a43;
}

.env-code-button {
  display: grid;
  gap: 2px;
  align-content: center;
  min-width: 138px;
  min-height: 52px;
  text-align: left;
}

.env-code {
  font-weight: 800;
  line-height: 1.1;
}

.env-alias {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.env-code-button.active .env-alias {
  color: #2b625a;
}

body[data-view="environments"] .env-code-button .env-code {
  font-size: 18px;
}

body[data-view="environments"] .env-code-button .env-alias,
body[data-view="environments"] td,
body[data-view="environments"] th {
  font-size: 15px;
}

body[data-view="environments"] .tag {
  font-size: 14px;
}

body[data-view="environments"] .environment-diagnostic-button {
  font-size: 16px;
}

.environment-diagnostic-button {
  margin-top: 16px;
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  padding: 0 16px;
  background: #111827;
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.environment-diagnostic-button:hover {
  background: #020617;
}

.question-list {
  display: grid;
  gap: 14px;
}

.question {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
}

.question-title {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.question-id {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 36px;
  display: grid;
  place-items: center;
  font-weight: 750;
}

.options {
  display: grid;
  gap: 8px;
}

.option {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  cursor: pointer;
  background: #fff;
}

.option input {
  margin-top: 3px;
}

.option.selected {
  border-color: var(--accent);
  background: var(--soft);
}

.option-code {
  font-weight: 760;
}

.signal {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.result-grid {
  display: grid;
  gap: 8px;
}

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

.bar {
  height: 10px;
  background: #e5e9e6;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--accent);
}

.bar-fill.alt {
  background: var(--accent-3);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  background: var(--panel);
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.35;
}

th {
  background: var(--panel-2);
  font-weight: 740;
}

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

.path {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  color: #425049;
}

.type-layout,
.env-layout,
.diagnostic-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.resource-bars {
  display: grid;
  gap: 10px;
}

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

.text-block {
  line-height: 1.55;
  color: #38413d;
  white-space: pre-wrap;
}

.scroll-box {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.empty,
.loading {
  padding: 34px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    padding: 14px;
  }

  .nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-item {
    white-space: nowrap;
  }

  .sidebar-meta {
    display: none;
  }

  .topbar,
  .type-layout,
  .env-layout,
  .diagnostic-layout,
  .grid.cols-2,
  .grid.cols-3,
  .metric-grid,
  .readiness-grid,
  .final-package-meta,
  .deliverable-grid,
  .final-ecs-input-grid,
  .final-ecs-score-grid,
  .final-ecs-valuation-grid,
  .protocol-selector-grid,
  .friction-timeline-grid,
  .deal-risk-controls {
    grid-template-columns: 1fr;
  }

  .target-invite-grid,
  .target-email-send {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
    padding: 16px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .track-selection-mode .top-actions {
    display: none;
  }

  .search {
    width: 100%;
  }

  .content {
    padding: 16px;
  }

  .track-selection {
    padding: 32px 0 40px;
  }

  .diagnostic-methodology {
    padding: 32px 0 40px;
  }

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

  .deal-context-step {
    padding: 32px 0 40px;
  }

  .questionnaire-runner {
    padding: 32px 0 40px;
  }

  .preliminary-assessment {
    padding: 32px 0 40px;
  }

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

  .track-selection h2 {
    font-size: 28px;
  }

  .motive-grid,
  .preservation-grid {
    grid-template-columns: 1fr;
  }

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

}

@media (max-width: 620px) {
  .question-title,
  .option,
  .score-row,
  .resource-row,
  .question-nav,
  .reconciliation-row,
  .final-ecs-input-row {
    grid-template-columns: 1fr;
  }

  .question-text {
    font-size: 20px;
  }

  .question-nav {
    display: grid;
  }

  .diagnostic-page-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .metric-value {
    font-size: 24px;
  }

  .methodology-env-grid {
    grid-template-columns: 1fr;
  }

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

  .reconciliation-link-code-header {
    align-items: flex-start;
    flex-direction: column;
  }

table {
    min-width: 520px;
  }
}

body[data-mode="public"] .top-actions {
  display: none;
}
