:root {
  color-scheme: light;
  --bg: #eef3f5;
  --surface: #ffffff;
  --surface-strong: #f7fbfc;
  --ink: #16242a;
  --muted: #62727a;
  --line: #d9e4e8;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --blue: #2563eb;
  --amber: #d97706;
  --rose: #e11d48;
  --green: #15803d;
  --shadow: 0 18px 45px rgba(18, 40, 48, 0.11);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
}

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

button {
  cursor: pointer;
}

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

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px;
  color: #e8f8f6;
  background: #12343b;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(13, 148, 136, 0.22);
  color: #ffffff;
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: 0;
}

.brand p,
.side-note p {
  margin: 4px 0 0;
  color: #b8d4d2;
  line-height: 1.5;
}

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

.step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
}

.step span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #c8f5ef;
  font-weight: 800;
}

.step strong {
  display: block;
  font-size: 14px;
}

.step small {
  display: block;
  margin-top: 2px;
  color: #b8d4d2;
}

.step.is-active {
  border-color: rgba(45, 212, 191, 0.72);
  background: rgba(13, 148, 136, 0.23);
}

.step.is-active span {
  background: #2dd4bf;
  color: #12343b;
}

.side-note {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.workspace {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px;
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.topbar h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0;
}

.status-pill {
  min-width: 110px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill[data-mode="success"] {
  border-color: rgba(21, 128, 61, 0.34);
  background: #ecfdf3;
  color: var(--green);
}

.status-pill[data-mode="warning"] {
  border-color: rgba(217, 119, 6, 0.36);
  background: #fff7ed;
  color: var(--amber);
}

.screen {
  display: none;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.screen.is-active {
  display: block;
}

.screen-header {
  max-width: 760px;
  margin-bottom: 22px;
}

.screen-header h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.screen-header p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.url-form {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.url-form label,
.field span,
.issue-toolbar label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

abbr[title] {
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd9de;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.17);
}

.field-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.help-text a,
.notice-block a {
  color: var(--blue);
  font-weight: 800;
}

.notice-block {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius);
  background: #eff6ff;
}

.notice-block strong {
  display: block;
  margin-bottom: 6px;
}

.notice-block p {
  margin: 0 0 8px;
  color: #375466;
  line-height: 1.55;
}

.primary-action,
.secondary-action {
  min-height: 44px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 10px 16px;
  font-weight: 800;
}

.primary-action {
  background: var(--teal);
  color: #ffffff;
}

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

.secondary-action {
  background: #ffffff;
  border-color: #cbd9de;
  color: var(--ink);
}

.secondary-action:hover {
  background: #f2f7f8;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.scan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
  gap: 16px;
  margin-top: 16px;
}

.summary-block {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.block-title {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.block-title h4 {
  margin: 0;
  font-size: 16px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.dot-teal {
  background: var(--teal);
}

.dot-amber {
  background: var(--amber);
}

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

.metric {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  font-size: 22px;
}

.metric small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.detected-stack {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.55;
}

.stack-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.stack-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.stack-chip span {
  color: var(--muted);
  font-weight: 700;
}

.tech-stack-panel {
  margin-top: 16px;
}

.tech-stack-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.tech-stack-card {
  min-height: 106px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.tech-stack-card.is-inferred {
  border-style: dashed;
  border-color: rgba(217, 119, 6, 0.48);
  background: #fffbeb;
}

.tech-stack-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.tech-stack-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.tech-stack-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.35;
}

.likely-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  padding: 2px 6px;
  border: 1px solid rgba(217, 119, 6, 0.32);
  border-radius: 999px;
  background: #fff7ed;
  color: #92400e;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  vertical-align: 1px;
}

.stack-verdict {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.stack-verdict strong {
  display: block;
  margin-bottom: 5px;
}

.stack-verdict p {
  margin: 0;
  color: #375466;
  line-height: 1.55;
}

.stack-verdict.is-good {
  border-color: rgba(21, 128, 61, 0.34);
  background: #ecfdf3;
}

.stack-verdict.is-info {
  border-color: rgba(37, 99, 235, 0.22);
  background: #eff6ff;
}

.stack-verdict.is-warning {
  border-color: rgba(217, 119, 6, 0.34);
  background: #fff7ed;
}

.stack-verdict.is-danger {
  border-color: rgba(225, 29, 72, 0.3);
  background: #fff1f2;
}

.stack-recommendations {
  margin-top: 12px;
}

.stack-action-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.stack-action-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.stack-action-item span {
  display: inline-flex;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stack-action-item p {
  margin: 0;
  color: #334155;
  line-height: 1.45;
}

.stack-action-item.action-good span {
  background: #dcfce7;
  color: #166534;
}

.stack-action-item.action-tune span {
  background: #fef3c7;
  color: #92400e;
}

.stack-action-item.action-change span {
  background: #ffe4e6;
  color: #9f1239;
}

.section-note {
  margin: -6px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.detected-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.detected-list li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--muted);
  line-height: 1.45;
}

.detected-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.detected-card strong {
  display: block;
  color: var(--ink);
}

.detected-card small,
.detected-card em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
}

.audit-row-preview {
  display: block;
  margin-top: 6px;
  color: #375466;
  font-size: 12px;
  line-height: 1.45;
}

.lcp-thumb {
  display: grid;
  gap: 8px;
  max-width: 260px;
  margin: 12px 0 8px;
}

.lcp-thumb.is-hidden {
  display: none;
}

.lcp-thumb img {
  display: block;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.lcp-thumb figcaption {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.lcp-thumb-plan {
  max-width: 100%;
  margin-top: 12px;
}

.lcp-thumb-plan img {
  max-width: 220px;
}

.lcp-copy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.lcp-copy-row code {
  max-width: 100%;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: #375466;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.copy-mini {
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid #cbd9de;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.copy-mini.is-selected {
  border-color: rgba(13, 148, 136, 0.42);
  background: #ecfdf8;
  color: var(--teal-dark);
}

.image-confirmation {
  display: grid;
  gap: 8px;
  max-width: 560px;
  margin-top: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.image-confirmation.is-confirmed {
  border-color: rgba(13, 148, 136, 0.36);
  background: #ecfdf8;
}

.image-confirmation.is-caution {
  border-color: rgba(217, 119, 6, 0.34);
  background: #fff7ed;
}

.image-confirmation p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.image-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.image-confirm-help {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.image-confirm-help strong {
  font-size: 13px;
}

.lcp-non-image {
  margin: 12px 0 8px;
  padding: 10px;
  border: 1px solid rgba(217, 119, 6, 0.3);
  border-radius: var(--radius);
  background: #fff7ed;
}

.lcp-non-image strong,
.lcp-non-image p {
  display: block;
  margin: 0;
}

.lcp-non-image p {
  margin-top: 4px;
  color: #7c4a03;
  font-size: 12px;
  line-height: 1.4;
}

.severity-high {
  border-left: 4px solid var(--rose) !important;
}

.severity-medium {
  border-left: 4px solid var(--amber) !important;
}

.severity-low {
  border-left: 4px solid var(--teal) !important;
}

.detected-warning {
  border-left: 4px solid var(--amber) !important;
}

.mini-action,
.recipe-tag {
  min-height: 36px;
  border-radius: var(--radius);
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.mini-action {
  border: 1px solid transparent;
  background: var(--teal);
  color: #ffffff;
}

.recipe-tag {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #ffffff;
}

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

.setup-confirm-notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(13, 148, 136, 0.3);
  border-radius: var(--radius);
  background: #f0fdfa;
}

.setup-confirm-notice[hidden] {
  display: none;
}

.setup-confirm-notice strong {
  display: block;
  margin-bottom: 4px;
}

.setup-confirm-notice p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.field {
  display: grid;
  gap: 8px;
  align-content: start;
}

.check-field {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.check-field legend {
  padding: 0 5px;
  font-weight: 800;
}

.check-field label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
}

.check-field input {
  width: 18px;
  min-height: 18px;
}

.issue-toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.issue-toolbar .secondary-action {
  justify-self: start;
}

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

.issue-option {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  min-height: 116px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  text-align: left;
}

.issue-option.is-selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.13);
}

.radio-dot {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 2px solid #9eb3ba;
  border-radius: 999px;
}

.issue-option.is-selected .radio-dot {
  border-color: var(--teal);
  background: radial-gradient(circle, var(--teal) 0 42%, transparent 45%);
}

.issue-option strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
}

.issue-option small {
  color: var(--muted);
  line-height: 1.45;
}

.followup-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: var(--radius);
  background: #f0fdfa;
}

.advisor-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: var(--radius);
  background: #f8fffd;
}

.followup-intro {
  margin: -4px 0 14px;
  color: #375466;
  line-height: 1.55;
}

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

.followup-field {
  display: grid;
  gap: 8px;
  align-content: start;
}

.followup-field span {
  font-size: 14px;
  font-weight: 800;
}

.followup-field.full-width {
  grid-column: 1 / -1;
}

.screen-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

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

.report-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.report-section h4 {
  margin: 0 0 12px;
  font-size: 18px;
}

.report-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.plan-overview {
  border-color: rgba(13, 148, 136, 0.28);
  background: #f8fffd;
}

.plan-label {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.next-action {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(13, 148, 136, 0.26);
  border-radius: var(--radius);
  background: #ecfdf8;
}

.next-action span {
  display: block;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.next-action strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}

.next-action p {
  margin-top: 6px;
}

.compact-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.compact-meta-item {
  min-height: 68px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.compact-meta-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.compact-meta-item strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.action-plan-section {
  background: #ffffff;
}

.readiness-card {
  background: #ffffff;
}

.readiness-card h4 {
  margin-bottom: 10px;
}

.readiness-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.readiness-card li {
  line-height: 1.45;
}

.expectation-card {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(13, 148, 136, 0.24);
  border-radius: var(--radius);
  background: #f0fdfa;
}

.expectation-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
}

.outcome-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.outcome-chip {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.outcome-now {
  border-color: rgba(217, 119, 6, 0.35);
  background: #fff7ed;
  color: #7c4a03;
}

.outcome-goal {
  border-color: rgba(13, 148, 136, 0.35);
  background: #ecfdf8;
  color: var(--teal-dark);
}

.outcome-arrow {
  color: var(--muted);
  font-weight: 900;
}

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

.owner-flow {
  grid-template-columns: 1fr;
}

.action-card {
  min-height: 190px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.owner-card {
  min-height: 0;
  background: #ffffff;
}

.action-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.action-card-head div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.action-card-head span,
.action-card-head em {
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.action-card-head span {
  color: var(--teal-dark);
}

.action-card-head em {
  padding: 4px 7px;
  border: 1px solid rgba(13, 148, 136, 0.24);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  white-space: nowrap;
}

.risk-pill {
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.action-risk-safe {
  background: #dcfce7;
  color: #166534;
}

.action-risk-medium {
  background: #fef3c7;
  color: #92400e;
}

.action-risk-developer {
  background: #ffe4e6;
  color: #9f1239;
}

.action-card strong {
  display: block;
  min-height: 44px;
  line-height: 1.25;
}

.owner-card > strong {
  min-height: 0;
  font-size: 16px;
}

.action-why {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.action-card ul {
  display: grid;
  gap: 7px;
  padding-left: 18px;
  margin: 12px 0 0;
  color: var(--muted);
}

.action-card li {
  line-height: 1.45;
}

.owner-target-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.top-copy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.top-copy-actions .primary-action,
.top-copy-actions .secondary-action {
  min-height: 36px;
  padding: 8px 11px;
  font-size: 13px;
}

.retest-box {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

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

.retest-fields label {
  display: grid;
  gap: 6px;
}

.retest-fields span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.retest-fields input {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.retest-fields input[readonly] {
  background: #eef2f7;
  color: var(--muted);
}

.retest-status {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.retest-status strong,
.retest-status p {
  margin: 0;
}

.retest-status strong {
  display: block;
  min-height: 0;
  margin-bottom: 4px;
}

.retest-status p {
  color: var(--muted);
  line-height: 1.45;
}

.retest-status.is-good,
.retest-status.is-improved {
  border-color: rgba(13, 148, 136, 0.34);
  background: #ecfdf8;
}

.retest-status.is-warning {
  border-color: rgba(217, 119, 6, 0.34);
  background: #fff7ed;
}

.done-lines {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.done-card {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(13, 148, 136, 0.3);
  border-radius: var(--radius);
  background: #f8fffd;
}

.done-card h5 {
  margin: 0 0 10px;
  font-size: 15px;
}

.done-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.done-card li {
  line-height: 1.45;
}

.done-card p {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 800;
  line-height: 1.45;
}

.builder-priority {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.builder-start {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.builder-path,
.builder-unknown {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.builder-path.is-selected {
  border-color: rgba(13, 148, 136, 0.38);
  background: #f0fdfa;
}

.builder-path > strong,
.builder-unknown > strong {
  min-height: 0;
  margin-bottom: 8px;
  font-size: 13px;
}

.builder-path ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
}

.builder-path li {
  color: var(--muted);
}

.builder-unknown p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.45;
}

.builder-picker {
  min-height: 36px;
  max-width: 260px;
  background: #ffffff;
}

.inline-detail {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.inline-detail summary {
  padding: 10px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

.inline-detail-body,
.builder-picker-row,
.builder-alt-grid {
  padding: 0 10px 10px;
}

.builder-picker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
}

.builder-alt-grid {
  display: grid;
  gap: 8px;
}

.detail-panel {
  padding: 0;
}

.detail-panel summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.detail-panel summary::-webkit-details-marker {
  display: none;
}

.detail-panel summary::after {
  content: "+";
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--teal-dark);
  font-weight: 900;
}

.detail-panel[open] summary::after {
  content: "-";
}

.detail-panel summary strong,
.detail-panel summary small {
  display: block;
}

.detail-panel summary small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.detail-panel-body {
  padding: 0 18px 18px;
}

.detail-panel-body h5 {
  margin: 16px 0 10px;
  font-size: 14px;
}

.developer-warning {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(225, 29, 72, 0.22);
  border-radius: var(--radius);
  background: #fff1f2;
}

.developer-warning strong {
  display: block;
  margin-bottom: 4px;
  color: #9f1239;
}

.developer-warning p {
  margin: 0;
  color: #5f2633;
  line-height: 1.45;
}

.report-list {
  display: grid;
  gap: 8px;
  padding-left: 20px;
  margin: 0;
}

.report-list li {
  line-height: 1.55;
}

.code-block {
  overflow-x: auto;
  margin: 12px 0 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0f172a;
  color: #e5eef5;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre;
}

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

.audit-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

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

.audit-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

.audit-table th,
.audit-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.audit-table th {
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

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

.audit-table code {
  white-space: normal;
  word-break: break-word;
}

.meta-item {
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.meta-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.meta-item strong {
  display: block;
  margin-top: 5px;
}

.risk-low {
  color: var(--green);
}

.risk-medium {
  color: var(--amber);
}

.risk-high {
  color: var(--rose);
}

.source-link {
  color: var(--blue);
  font-weight: 800;
}

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

.recommendation-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.recommendation-item strong {
  display: block;
  margin-bottom: 5px;
}

.recommendation-item .rec-label {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.recommendation-item p {
  margin: 0 0 8px;
}

.rec-good {
  border-left: 4px solid var(--green);
}

.rec-info {
  border-left: 4px solid var(--blue);
}

.rec-warning {
  border-left: 4px solid var(--amber);
}

.rec-danger {
  border-left: 4px solid var(--rose);
}

.copy-fallback {
  display: none;
  min-height: 180px;
  margin-top: 16px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.copy-fallback.is-visible {
  display: block;
}

.customer-export {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.customer-export h4 {
  margin: 0 0 4px;
}

.customer-export p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.customer-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.copy-confirm {
  min-height: 18px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.customer-plan-preview {
  width: 100%;
  min-height: 320px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
}

.customer-plan-preview[hidden] {
  display: none;
}

.scan-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.42);
}

.scan-modal.is-visible {
  display: grid;
}

.scan-modal-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  width: min(520px, 100%);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.scan-modal-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 18px;
}

.scan-modal-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.scan-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #d9e4e8;
  border-top-color: var(--teal);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

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

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

  .sidebar {
    padding: 20px;
  }

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

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

  .side-note {
    display: none;
  }

  .scan-layout,
  .setup-grid,
  .issue-grid,
  .tech-stack-grid,
  .compact-meta-grid,
  .action-flow,
  .retest-fields,
  .followup-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .workspace {
    padding: 16px;
  }

  .topbar {
    flex-direction: column;
  }

  .topbar h2 {
    font-size: 24px;
  }

  .screen {
    padding: 16px;
  }

  .url-row,
  .metric-grid,
  .compact-meta-grid,
  .meta-grid,
  .audit-summary-grid,
  .detected-card,
  .retest-fields,
  .check-field,
  .stepper {
    grid-template-columns: 1fr;
  }

  .screen-actions {
    justify-content: stretch;
  }

  .screen-actions button,
  .url-row button {
    width: 100%;
  }
}
