:root {
  color-scheme: light;
  --bg: #eef2f1;
  --panel: #ffffff;
  --panel-soft: #f6f8f5;
  --ink: #17201d;
  --muted: #61706a;
  --line: #dce4de;
  --teal: #0f766e;
  --teal-dark: #0a4f49;
  --mint: #def7ec;
  --amber: #b7791f;
  --amber-soft: #fff2cf;
  --red: #b42318;
  --red-soft: #ffe2df;
  --blue: #315c9b;
  --dark: #12201d;
  --shadow: 0 18px 45px rgba(18, 32, 29, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), transparent 32%),
    linear-gradient(315deg, rgba(49, 92, 155, 0.1), transparent 28%),
    var(--bg);
  color: var(--ink);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

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

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid rgba(220, 228, 222, 0.78);
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--teal), var(--dark));
  box-shadow: 0 15px 34px rgba(15, 118, 110, 0.22);
  font-weight: 900;
}

.brand-name {
  font-weight: 900;
}

.brand-subtitle,
.panel-label,
.eyebrow,
small {
  color: var(--muted);
  font-size: 12px;
}

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

.nav-item {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  color: var(--ink);
  background: #eef5f1;
}

.nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: white;
  border: 1px solid var(--line);
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 900;
}

.sidebar-panel {
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.sidebar-panel strong,
.sidebar-panel p {
  display: block;
  margin: 8px 0 0;
}

.sidebar-panel p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.main-panel {
  min-width: 0;
  padding: 24px;
}

.topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  font-weight: 900;
}

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

h1 {
  margin-bottom: 0;
  font-size: 40px;
  line-height: 1;
}

h2 {
  font-size: 46px;
  line-height: 1.02;
}

h3 {
  font-size: 22px;
  line-height: 1.18;
  margin-bottom: 0;
}

h4 {
  margin-bottom: 8px;
  font-size: 15px;
}

.topbar-actions,
.result-actions,
.mini-actions,
.button-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-mini {
  min-height: 44px;
  min-width: 178px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.account-mini span,
.inline-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.account-mini strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  font-weight: 900;
  white-space: nowrap;
}

.primary-button {
  background: var(--teal);
  color: white;
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.22);
}

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

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.primary-button.small {
  min-height: 38px;
}

.primary-button.full {
  width: 100%;
  margin-top: 4px;
}

.secondary-button {
  background: var(--dark);
  color: white;
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line);
  color: var(--ink);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.copilot-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 18px;
  margin-bottom: 18px;
}

.copilot-panel,
.result-preview,
.section-band,
.finder-panel,
.plan-panel,
.form-panel,
.result-panel,
.placeholder-view {
  border: 1px solid rgba(220, 228, 222, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.copilot-panel {
  min-height: 430px;
  padding: 34px;
  display: grid;
  align-content: space-between;
  gap: 26px;
}

.copilot-heading {
  max-width: 760px;
}

.copilot-heading p,
.panel-copy,
.placeholder-view p,
.result-preview p {
  color: var(--muted);
  line-height: 1.65;
}

.session-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.message {
  max-width: 82%;
  padding: 12px 13px;
  border-radius: 8px;
}

.message span {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 900;
}

.message p {
  margin-bottom: 0;
  line-height: 1.5;
}

.user-message {
  justify-self: end;
  background: var(--dark);
  color: white;
}

.user-message span {
  color: #d9e4df;
}

.ai-message {
  border: 1px solid #cce7dd;
  background: white;
}

.ai-message span {
  color: var(--teal-dark);
}

.ai-message.compact {
  max-width: 100%;
  background: var(--mint);
}

.tool-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.tool-pills span {
  margin: 0;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 900;
}

.router-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #cfe3dd;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(222, 247, 236, 0.42), rgba(255, 255, 255, 0.92)),
    white;
}

.router-head,
.router-grid {
  display: grid;
  gap: 8px;
}

.router-head {
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: center;
}

.router-head span,
.router-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.router-head strong {
  color: var(--teal-dark);
}

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

.router-grid div {
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.router-grid strong {
  display: block;
  margin-top: 8px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.copilot-input label,
.field label {
  display: block;
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 900;
}

.ask-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  padding: 0 14px;
  outline: none;
}

select {
  appearance: none;
}

textarea {
  min-height: 92px;
  padding: 12px 14px;
  resize: vertical;
}

.ask-bar input {
  border: 0;
  padding-left: 8px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.ask-bar input:focus {
  box-shadow: none;
}

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

.prompt-grid button {
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  font-weight: 900;
}

.result-preview {
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(222, 247, 236, 0.84), rgba(255, 255, 255, 0.92)),
    white;
}

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

.result-card-header h3 {
  margin-top: 12px;
}

.opportunity-score {
  width: 126px;
  min-width: 126px;
  height: 126px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(circle at center, white 57%, transparent 59%),
    conic-gradient(var(--teal) 87%, #dce4de 0);
}

.opportunity-score strong {
  color: var(--teal-dark);
  font-size: 36px;
  line-height: 1;
}

.opportunity-score span {
  width: 72px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.verdict-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.verdict-row strong {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, white 57%, transparent 59%),
    conic-gradient(var(--teal) 87%, #dce4de 0);
  color: var(--teal-dark);
  font-size: 34px;
}

.preview-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}

.preview-stats span,
.metric-card,
.score-card,
.watchlist-summary article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.preview-stats span {
  min-height: 74px;
  padding: 13px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.preview-stats strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
}

.confidence-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.confidence-stack div {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(220, 228, 222, 0.88);
}

.confidence-stack strong {
  font-size: 13px;
}

.confidence-stack span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.platform-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 18px;
  margin-bottom: 18px;
}

.platform-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(220, 228, 222, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.finder-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 242, 207, 0.42), rgba(255, 255, 255, 0.92)),
    white;
}

.plan-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.92);
}

.usage-grid,
.pricing-grid {
  display: grid;
  gap: 12px;
}

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

.usage-grid article,
.pricing-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.usage-grid article {
  padding: 15px;
}

.usage-grid span,
.pricing-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.usage-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

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

.pricing-grid article {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
}

.pricing-grid strong {
  font-size: 32px;
  line-height: 1;
}

.pricing-grid strong::after {
  content: "/mo";
  margin-left: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.pricing-grid small {
  min-height: 38px;
  line-height: 1.45;
}

.featured-plan {
  border-color: #aedcc8;
  background: var(--mint);
}

.finder-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(5, minmax(120px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.finder-form label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.finder-form input {
  margin-top: 8px;
}

.finder-results {
  display: grid;
  gap: 10px;
}

.finder-results article {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(5, minmax(90px, 0.55fr)) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.finder-results span,
.finder-results small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.finder-results .ghost-button {
  min-height: 36px;
  padding: 0 12px;
}

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

.auth-grid label,
.inline-tool-form label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.auth-grid input,
.inline-tool-form input,
.inline-tool-form select,
.inline-tool-form textarea {
  margin-top: 8px;
}

.workflow-list {
  display: grid;
  gap: 9px;
}

.service-health {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.workflow-list span,
.service-health span,
.history-list article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--muted);
  font-size: 13px;
}

.workflow-list strong {
  display: inline-block;
  min-width: 84px;
  color: var(--ink);
}

.service-health span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.service-health strong {
  color: var(--ink);
}

.service-health small {
  min-width: 82px;
  padding: 5px 8px;
  border-radius: 999px;
  text-align: center;
  color: #5f4620;
  background: #fff1c7;
  font-size: 11px;
  font-weight: 900;
}

.service-health .connected small {
  color: #0f5f46;
  background: #dff7ec;
}

.service-health .missing small {
  color: #883d22;
  background: #ffe2d6;
}

.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
}

.metric-card {
  padding: 18px;
}

.metric-card span,
.score-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric-card strong {
  display: block;
  margin: 10px 0 4px;
  font-size: 32px;
}

.section-band,
.form-panel,
.result-panel,
.placeholder-view {
  padding: 24px;
}

.compact-panel {
  align-self: start;
}

.action-stack {
  display: grid;
  gap: 10px;
}

.action-stack button {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfa;
  color: var(--ink);
  text-align: left;
}

.action-stack button:hover {
  border-color: #b9dacf;
  background: white;
}

.action-stack strong,
.action-stack span {
  display: block;
}

.action-stack strong {
  margin-bottom: 6px;
  font-size: 14px;
}

.action-stack span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.section-heading,
.result-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.opportunity-table {
  display: grid;
  gap: 8px;
}

.table-row {
  display: grid;
  grid-template-columns: 1.35fr 120px 80px 1.5fr;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.table-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.badge {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.maybe {
  background: var(--amber-soft);
  color: var(--amber);
}

.buy {
  background: var(--mint);
  color: var(--teal-dark);
}

.pass {
  background: var(--red-soft);
  color: var(--red);
}

.analysis-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.38fr) minmax(0, 0.62fr);
  gap: 18px;
}

.analysis-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

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

.analysis-status,
.error-panel {
  border-radius: 8px;
  padding: 14px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.checkbox-row input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--teal);
}

.analysis-status {
  border: 1px solid #b9dacf;
  background: #edf8f3;
}

.status-line,
.confidence-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-line span,
.confidence-line span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.progress-track {
  height: 8px;
  margin: 12px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #d8e8e3;
}

.progress-track i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width 240ms ease;
}

.analysis-status p,
.error-panel p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.error-panel {
  display: grid;
  gap: 10px;
  border: 1px solid #f0b8b2;
  background: var(--red-soft);
}

.error-panel[hidden],
.analysis-status[hidden] {
  display: none;
}

.result-topline strong {
  font-size: 34px;
}

.confidence-line {
  margin: -6px 0 18px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

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

.score-card {
  padding: 14px;
  background: #fbfcfa;
}

.score-card strong {
  display: block;
  margin: 8px 0 10px;
  font-size: 25px;
}

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

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.bar.warning i {
  background: var(--amber);
}

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

.insight-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: white;
}

.insight-card p {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
}

.detail-list {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.detail-list ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.detail-list dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.detail-list dl div {
  display: grid;
  grid-template-columns: minmax(110px, 0.42fr) minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.detail-list dl div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.detail-list dt {
  color: var(--ink);
  font-weight: 800;
}

.detail-list dd {
  min-width: 0;
  margin: 0;
}

.detail-list span {
  display: inline-block;
  margin: 0 8px 4px 0;
}

.warning-card {
  background: var(--amber-soft);
  border-color: #efd792;
}

.action-note {
  margin: 12px 0 0;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
}

.placeholder-view {
  min-height: 520px;
  display: grid;
  align-content: start;
  gap: 20px;
}

.compare-board,
.alert-stack,
.watchlist-grid,
.history-list {
  display: grid;
  gap: 12px;
}

.inline-tool-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.compare-item,
.alert-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 16px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 110px minmax(180px, 0.7fr);
  align-items: center;
  gap: 16px;
}

.compare-item span {
  font-weight: 900;
  color: var(--muted);
}

.compare-item em {
  font-style: normal;
  font-weight: 900;
  color: var(--teal-dark);
}

.compare-item.winner {
  background: var(--mint);
  border-color: #aedcc8;
}

.compare-item.muted {
  background: #f5f2ef;
}

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

.watchlist-summary article {
  padding: 16px;
  background: #fbfcfa;
}

.watchlist-summary span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.watchlist-summary strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.empty-watchlist {
  display: grid;
  gap: 4px;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.empty-watchlist[hidden] {
  display: none;
}

.empty-watchlist span {
  color: var(--muted);
}

.watchlist-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.watchlist-media {
  overflow: hidden;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.watchlist-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.watchlist-media span {
  display: grid;
  height: 100%;
  min-height: 118px;
  place-items: center;
  color: var(--teal-dark);
  font-weight: 900;
}

.watchlist-body {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.watchlist-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.asin-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.watchlist-title-row h3 {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.watchlist-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(96px, 1fr));
  gap: 8px;
}

.watchlist-stats span {
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcfa;
  font-size: 12px;
  font-weight: 800;
}

.watchlist-stats strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 18px;
}

.watchlist-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.watchlist-reasons span {
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel-soft);
  font-size: 12px;
  font-weight: 800;
}

.watchlist-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.watchlist-footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.watchlist-footer .ghost-button {
  min-height: 36px;
  padding: 0 12px;
}

.validation-lab {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.validation-lab .section-heading input {
  max-width: 220px;
}

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

.validation-panel {
  display: grid;
  align-content: start;
  gap: 13px;
  min-height: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.checkbox-stack,
.validation-fields {
  display: grid;
  gap: 9px;
}

.checkbox-stack label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.checkbox-stack input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--teal);
}

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

.validation-fields label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.validation-fields input {
  margin-top: 7px;
}

.validation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.validation-output {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.validation-output span,
.validation-output p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.validation-output dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.validation-output dl div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.validation-output dl div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.validation-output dt {
  color: var(--ink);
  font-weight: 900;
}

.validation-output dd {
  min-width: 0;
  margin: 0;
  color: var(--muted);
}

.alert-item {
  grid-template-columns: 180px minmax(0, 1fr);
}

.alert-item.good {
  border-left: 5px solid var(--teal);
}

.alert-item.caution {
  border-left: 5px solid var(--red);
}

.alert-item.neutral {
  border-left: 5px solid var(--blue);
}

.alert-item span {
  color: var(--muted);
}

.alert-rule-item {
  border-left: 5px solid var(--blue);
}

.history-chart {
  height: 260px;
  display: grid;
  grid-template-columns: repeat(4, minmax(60px, 1fr));
  gap: 14px;
  align-items: end;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.history-chart span {
  min-height: 74px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--teal), var(--blue));
  color: white;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12px;
  font-weight: 900;
}

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

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-list {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .sidebar-panel {
    display: none;
  }

  .copilot-workspace,
  .dashboard-bottom-grid,
  .analysis-layout,
  .platform-grid,
  .finder-form,
  .finder-results article,
  .usage-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .metric-strip,
  .score-grid,
  .watchlist-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .watchlist-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .watchlist-stats {
    grid-template-columns: repeat(3, minmax(96px, 1fr));
  }

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

@media (max-width: 720px) {
  .main-panel {
    padding: 16px;
  }

  .topbar,
  .section-heading,
  .result-topline,
  .confidence-line,
  .result-actions,
  .watchlist-title-row,
  .watchlist-footer,
  .mini-actions,
  .verdict-row {
    align-items: stretch;
    flex-direction: column;
  }

  .result-card-header {
    flex-direction: column;
  }

  .opportunity-score {
    width: 116px;
    min-width: 116px;
    height: 116px;
  }

  .message {
    max-width: 100%;
  }

  .topbar-actions,
  .mini-actions,
  .button-row {
    width: 100%;
  }

  .topbar-actions button,
  .result-actions button,
  .mini-actions button,
  .button-row button {
    width: 100%;
  }

  .account-mini {
    width: 100%;
  }

  h1 {
    font-size: 31px;
  }

  h2 {
    font-size: 34px;
    line-height: 1.06;
  }

  .copilot-panel,
  .result-preview,
  .section-band,
  .finder-panel,
  .plan-panel,
  .form-panel,
  .result-panel,
  .placeholder-view {
    padding: 18px;
  }

  .ask-bar,
  .confidence-stack div,
  .router-head,
  .router-grid,
  .table-row,
    .score-grid,
    .field-grid,
    .insight-grid,
    .watchlist-summary,
    .watchlist-stats,
    .prompt-grid,
    .preview-stats,
    .metric-strip,
    .auth-grid {
    grid-template-columns: 1fr;
  }

  .compare-item,
  .alert-item {
    grid-template-columns: 1fr;
  }

  .watchlist-card {
    grid-template-columns: 1fr;
  }

  .watchlist-media {
    max-height: 240px;
  }

  .watchlist-footer div {
    justify-content: stretch;
  }

  .watchlist-footer .ghost-button {
    width: 100%;
  }

  .validation-lab .section-heading input,
  .validation-actions .ghost-button {
    max-width: none;
    width: 100%;
  }

  .validation-fields,
  .validation-output dl div {
    grid-template-columns: 1fr;
  }

  .detail-list dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .table-head {
    display: none;
  }
}
