:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --text: #172033;
  --muted: #667085;
  --line: #d5dde8;
  --teal: #08766d;
  --teal-soft: #e6f5f2;
  --blue: #2458d7;
  --blue-soft: #eaf0ff;
  --amber: #b45d00;
  --amber-soft: #fff4df;
  --red: #b42318;
  --red-soft: #fff0ed;
  --green: #16794c;
  --green-soft: #e9f7ef;
  --shadow: 0 14px 34px rgba(31, 41, 55, 0.08);
  --shadow-soft: 0 8px 20px rgba(31, 41, 55, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfcfe 0%, #f4f7fa 100%);
  padding: 24px 18px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--teal-soft);
  display: grid;
  place-items: center;
  color: var(--teal);
  flex: 0 0 auto;
}

.brand-mark svg,
.search-box svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.25;
}

h2 {
  margin-bottom: 0;
  font-size: 27px;
  line-height: 1.2;
}

h3 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.35;
}

.search-box {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.project-list {
  display: grid;
  gap: 10px;
}

.nav-summary {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf2f7;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nav-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.nav-summary strong {
  color: #344054;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.category-tree,
.search-results,
.leaf-projects {
  display: grid;
  gap: 9px;
}

.category-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  overflow: hidden;
}

.category-group summary {
  min-height: 40px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  color: #344054;
  font-size: 13px;
  font-weight: 850;
  list-style: none;
}

.category-group summary::-webkit-details-marker {
  display: none;
}

.category-group summary::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 160ms ease;
  flex: 0 0 auto;
}

.category-group[open] > summary::before {
  transform: rotate(45deg);
}

.category-group summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-group summary em {
  margin-left: auto;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  padding: 2px 7px;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.category-group.level-1 > summary {
  background: #e7f3f0;
  color: var(--teal);
}

.category-group.level-2 {
  background: #fbfcfd;
}

.category-group.level-2 > summary {
  min-height: 36px;
  color: #344054;
}

.category-group.level-3 > summary {
  min-height: 34px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.category-children {
  padding: 0 9px 10px 21px;
  display: grid;
  gap: 9px;
}

.category-project {
  padding: 11px 12px;
}

.project-item .project-path {
  margin-bottom: 7px;
  color: var(--blue);
  font-weight: 850;
}

.project-match {
  display: block;
  margin-top: 7px;
  border-radius: 8px;
  background: #edf7f5;
  color: var(--teal);
  padding: 5px 8px;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.35;
}

.nav-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  padding: 14px;
  font-size: 13px;
  line-height: 1.55;
}

.project-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  text-align: left;
  padding: 13px 14px;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.project-item:hover,
.project-item.active {
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 9px 22px rgba(15, 118, 110, 0.13);
  transform: translateY(-1px);
}

.project-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.25;
}

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

.project-item small {
  display: inline-flex;
  width: fit-content;
  margin-top: 7px;
  border-radius: 999px;
  background: #eef2f7;
  color: #344054;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.dashboard-entry {
  border-color: rgba(36, 88, 215, 0.2);
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
}

.dashboard-entry .project-path {
  color: var(--blue);
}

.workspace {
  min-width: 0;
  padding: 24px 28px 34px;
}

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

.status-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-strip span,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-strip .share-mode-tag {
  border-color: rgba(22, 121, 76, 0.28);
  background: var(--green-soft);
  color: var(--green);
}

.share-notice {
  margin-bottom: 14px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 18px;
  align-items: center;
}

.share-notice strong {
  display: block;
  margin-bottom: 7px;
  font-size: 17px;
}

.share-notice p:last-child {
  margin: 0;
  color: #344054;
  line-height: 1.65;
}

.share-note-grid {
  display: grid;
  gap: 8px;
}

.share-note-grid span {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: #344054;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.decision-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 144px;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.decision-copy h3 {
  margin-bottom: 8px;
  font-size: 23px;
}

.decision-copy p:last-child {
  margin-bottom: 0;
  color: #344054;
  line-height: 1.75;
}

.decision-score {
  min-height: 116px;
  border-radius: 8px;
  background: #113c43;
  color: #ffffff;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  text-align: center;
}

.decision-score span {
  font-size: 39px;
  font-weight: 800;
  line-height: 1;
}

.decision-score small {
  font-size: 13px;
  opacity: 0.86;
}

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

.metric-card {
  border: 1px solid var(--line);
  border-top: 3px solid rgba(8, 118, 109, 0.76);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px 15px;
  box-shadow: var(--shadow-soft);
}

.metric-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  margin-bottom: 7px;
  font-size: 21px;
  line-height: 1.2;
}

.metric-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.estimate-grid.compact {
  margin-top: 14px;
}

.estimate-card,
.formula-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 16px;
}

.estimate-card span,
.formula-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.estimate-card strong {
  display: block;
  font-size: 24px;
  line-height: 1.25;
}

.estimate-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.formula-card strong {
  display: block;
  color: #344054;
  font-size: 15px;
  line-height: 1.55;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.status-badge.good {
  background: var(--green-soft);
  color: var(--green);
}

.status-badge.risk {
  background: var(--red-soft);
  color: var(--red);
}

.status-badge.warning {
  background: var(--amber-soft);
  color: var(--amber);
}

.score-hero {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 8px;
  background: var(--teal-soft);
  padding: 18px;
}

.score-hero div {
  min-height: 120px;
  border-radius: 8px;
  background: var(--teal);
  color: #ffffff;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
}

.score-hero span {
  font-size: 13px;
  font-weight: 800;
  opacity: 0.86;
}

.score-hero strong {
  font-size: 42px;
  line-height: 1;
}

.score-hero p {
  margin: 0;
  color: #344054;
  line-height: 1.75;
}

.analysis-nav {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  margin-bottom: 12px;
  padding: 10px;
  box-shadow: var(--shadow-soft);
}

.tab-groups {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.tab-group {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f4f6f9;
  color: #344054;
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.tab-group.active {
  border-color: rgba(8, 118, 109, 0.26);
  background: var(--teal-soft);
  color: var(--teal);
}

.tabbar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.tab {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  padding: 9px 13px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.tab.active {
  border-color: rgba(37, 99, 235, 0.35);
  background: var(--blue-soft);
  color: var(--blue);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  gap: 14px;
  align-items: start;
}

.content-grid.wide-focus {
  grid-template-columns: 1fr;
}

.content-grid.wide-focus .side-panel {
  display: none;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.main-panel {
  padding: 18px;
  min-height: 520px;
  min-width: 0;
  overflow: hidden;
}

.side-panel {
  padding: 16px;
  position: sticky;
  top: 20px;
}

.panel-head {
  margin-bottom: 16px;
}

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

.section-title p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.bi-command-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.95fr);
  gap: 14px;
}

.bi-command-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.bi-command-card.primary {
  border-color: rgba(8, 118, 109, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #f4fbf9 100%);
}

.bi-command-card h4 {
  margin: 0 0 9px;
  font-size: 21px;
  line-height: 1.35;
}

.bi-command-card p:last-child {
  margin-bottom: 0;
}

.bi-mini-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 15px;
}

.bi-mini-kpi {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  padding: 10px;
}

.bi-mini-kpi span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.bi-mini-kpi strong {
  display: block;
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bi-status-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.bi-status-list span {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 9px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.bi-status-list b {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 16px;
}

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

.bi-module-card {
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 7px;
  align-content: start;
  box-shadow: var(--shadow-soft);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.bi-module-card:hover {
  border-color: rgba(36, 88, 215, 0.38);
  box-shadow: 0 12px 26px rgba(36, 88, 215, 0.11);
  transform: translateY(-1px);
}

.bi-module-card span {
  width: fit-content;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 850;
}

.bi-module-card strong {
  font-size: 16px;
  line-height: 1.3;
}

.bi-module-card em {
  color: var(--teal);
  font-size: 19px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
}

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

.first-principles-card {
  border: 1px solid rgba(8, 118, 109, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%);
  padding: 16px;
  display: grid;
  gap: 14px;
  box-shadow: var(--shadow-soft);
}

.first-principles-card.compact .fp-hero h3 {
  font-size: 19px;
}

.fp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 14px;
  align-items: stretch;
}

.fp-hero h3 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.35;
}

.fp-hero p:last-child {
  margin-bottom: 0;
  color: #344054;
  line-height: 1.65;
}

.fp-score {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--amber-soft);
  color: var(--amber);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  text-align: center;
  padding: 12px;
}

.fp-score.good {
  background: var(--green-soft);
  color: var(--green);
}

.fp-score.risk {
  background: var(--red-soft);
  color: var(--red);
}

.fp-score strong {
  color: var(--text);
  font-size: 34px;
  line-height: 1;
}

.fp-score span {
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.fp-kpi-grid,
.fp-gate-grid,
.fp-question-grid,
.fp-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.fp-kpi,
.fp-gate-card,
.fp-question-card,
.fp-evidence-item,
.fp-portfolio-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.fp-gate-card {
  display: grid;
  gap: 10px;
  background: #fffaf0;
  border-color: rgba(180, 83, 9, 0.22);
}

.fp-gate-card.good {
  background: #eefaf6;
  border-color: rgba(22, 163, 74, 0.24);
}

.fp-gate-card.risk {
  background: #fff1f2;
  border-color: rgba(220, 38, 38, 0.24);
}

.fp-gate-card div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.fp-gate-card span {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.fp-gate-card strong {
  border-radius: 999px;
  background: rgba(180, 83, 9, 0.12);
  color: var(--amber);
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 6px 8px;
}

.fp-gate-card.good strong {
  background: rgba(22, 163, 74, 0.12);
  color: var(--green);
}

.fp-gate-card.risk strong {
  background: rgba(220, 38, 38, 0.12);
  color: var(--red);
}

.fp-gate-card p,
.fp-gate-card small {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.55;
}

.fp-gate-card small {
  color: var(--muted);
}

.fp-kpi span,
.fp-question-card span,
.fp-evidence-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.fp-kpi strong,
.fp-evidence-item strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}

.fp-evidence-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.fp-evidence-item {
  background: var(--surface-soft);
}

.fp-evidence-item strong {
  margin-bottom: 6px;
}

.fp-evidence-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.fp-question-card p {
  margin: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.6;
}

.fp-decision-table {
  min-width: 720px;
}

.fp-decision-table td:first-child {
  width: 140px;
}

.fp-decision-table td:first-child p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.v1-plan-card {
  border: 1px solid rgba(36, 88, 215, 0.18);
  border-radius: 8px;
  background: #fbfcff;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.v1-plan-card.locked {
  border-color: rgba(180, 83, 9, 0.24);
  background: #fffaf0;
}

.v1-plan-card.compact .section-title {
  margin-bottom: 0;
}

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

.v1-spec {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 11px;
}

.v1-spec span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.v1-spec strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.fp-representative-block {
  display: grid;
  gap: 10px;
}

.section-title.compact {
  margin-bottom: 0;
}

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

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

.fp-product-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: inherit;
  display: grid;
  gap: 8px;
  padding: 10px;
  text-decoration: none;
}

.fp-product-card img,
.fp-product-fallback {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2f5f8;
  object-fit: cover;
}

.fp-product-fallback {
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 850;
}

.fp-product-card strong {
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fp-product-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.fp-portfolio-panel {
  display: grid;
  gap: 14px;
}

.fp-portfolio-card {
  min-height: 150px;
  color: inherit;
  cursor: pointer;
  text-align: left;
  display: grid;
  gap: 8px;
  align-content: start;
  box-shadow: var(--shadow-soft);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.fp-portfolio-card:hover {
  border-color: rgba(8, 118, 109, 0.36);
  box-shadow: 0 12px 26px rgba(8, 118, 109, 0.12);
  transform: translateY(-1px);
}

.fp-portfolio-card strong {
  font-size: 17px;
  line-height: 1.25;
}

.fp-portfolio-card em {
  color: var(--teal);
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
}

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

.fp-portfolio-card small {
  color: #344054;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.5;
}

.final-decision-panel {
  display: grid;
  gap: 14px;
  border-color: rgba(17, 60, 67, 0.2);
  background: #fbfdfd;
}

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

.decision-family-column {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.decision-family-column h4 {
  margin: 0 0 5px;
  color: var(--text);
  font-size: 16px;
}

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

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

.decision-family-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: var(--surface-soft);
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 6px;
  padding: 10px;
  text-align: left;
}

.decision-family-card.good {
  border-left-color: var(--green);
}

.decision-family-card.risk {
  border-left-color: var(--red);
}

.decision-family-card span {
  width: fit-content;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
}

.decision-family-card.good span {
  background: var(--green-soft);
  color: var(--green);
}

.decision-family-card.risk span {
  background: var(--red-soft);
  color: var(--red);
}

.decision-family-card strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.3;
}

.decision-family-card em {
  color: var(--teal);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.35;
}

.decision-family-card small {
  color: #344054;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.45;
}

.v1-mini-grid {
  display: grid;
  gap: 6px;
}

.v1-mini-grid small {
  border-top: 1px solid rgba(213, 221, 232, 0.8);
  padding-top: 6px;
}

.v1-mini-grid b {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.fp-portfolio-table {
  min-width: 1640px;
}

.family-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.family-category-links .link-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 4px 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.3;
}

.portfolio-dashboard {
  gap: 16px;
}

.portfolio-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: stretch;
  border: 1px solid rgba(8, 118, 109, 0.2);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #eef8f6 100%);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.portfolio-hero h3 {
  margin-bottom: 9px;
  font-size: 23px;
}

.portfolio-hero p:last-child {
  margin-bottom: 0;
  color: #344054;
  line-height: 1.75;
}

.portfolio-hero-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.portfolio-hero-stats span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 13px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.portfolio-hero-stats b {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 21px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

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

.portfolio-focus-card,
.link-button,
.portfolio-progress-row button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.portfolio-focus-card {
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  display: grid;
  gap: 7px;
  box-shadow: var(--shadow-soft);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.portfolio-focus-card:hover {
  border-color: rgba(8, 118, 109, 0.36);
  box-shadow: 0 12px 26px rgba(8, 118, 109, 0.12);
  transform: translateY(-1px);
}

.portfolio-focus-card span {
  width: fit-content;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
}

.portfolio-focus-card strong {
  font-size: 17px;
  line-height: 1.25;
}

.portfolio-focus-card em {
  color: var(--teal);
  font-size: 20px;
  font-style: normal;
  font-weight: 900;
}

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

.portfolio-two-col {
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
}

.portfolio-section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.portfolio-table {
  min-width: 720px;
}

.portfolio-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.link-button {
  color: var(--blue);
  font-weight: 900;
}

.link-button:hover,
.portfolio-progress-row button:hover {
  text-decoration: underline;
}

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

.portfolio-track-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
}

.portfolio-track-card div:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.portfolio-track-card span,
.portfolio-track-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.portfolio-track-card strong {
  color: var(--teal);
  font-size: 18px;
  white-space: nowrap;
}

.portfolio-track-card p {
  min-height: 42px;
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.55;
}

.portfolio-track-card small {
  display: block;
  margin-top: 8px;
}

.war-room-status-grid,
.war-command-grid,
.price-battle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.war-room-status-card,
.war-command-card,
.price-battle-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
}

.war-room-status-card {
  border-top: 3px solid var(--blue);
}

.war-room-status-card.good,
.war-command-card.good {
  border-color: rgba(22, 121, 76, 0.3);
  border-top-color: var(--green);
  background: var(--green-soft);
}

.war-room-status-card.warning,
.war-command-card.warning {
  border-color: rgba(180, 93, 0, 0.28);
  border-top-color: var(--amber);
  background: var(--amber-soft);
}

.war-room-status-card.risk,
.war-command-card.risk {
  border-color: rgba(180, 35, 24, 0.28);
  border-top-color: var(--red);
  background: var(--red-soft);
}

.war-room-status-card span,
.price-battle-card span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.war-room-status-card strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 26px;
  line-height: 1.1;
}

.war-room-status-card p,
.price-battle-card p,
.price-battle-card small {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.55;
}

.war-command-card {
  border-top: 3px solid var(--blue);
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 8px;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.war-command-card:hover {
  border-color: rgba(8, 118, 109, 0.36);
  box-shadow: 0 12px 26px rgba(8, 118, 109, 0.12);
  transform: translateY(-1px);
}

.war-command-card span {
  width: fit-content;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
}

.war-command-card strong {
  font-size: 17px;
  line-height: 1.25;
}

.war-command-card em {
  color: var(--teal);
  font-size: 14px;
  font-style: normal;
  font-weight: 900;
}

.war-command-card p,
.war-command-card small {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.55;
}

.price-battle-card div:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.price-battle-card strong {
  color: var(--teal);
  font-size: 16px;
  white-space: nowrap;
}

.price-battle-card small {
  display: block;
  margin-top: 8px;
}

.war-room-table {
  min-width: 1080px;
}

.war-priority-table {
  min-width: 980px;
}

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

.portfolio-progress-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 150px 70px;
  gap: 10px;
  align-items: center;
}

.portfolio-progress-row button {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.portfolio-progress-row .mini-progress {
  width: 100%;
  margin: 0;
}

.portfolio-progress-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.portfolio-alert {
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: var(--amber-soft);
  padding: 12px;
}

.portfolio-alert.risk {
  border-left-color: var(--red);
  background: var(--red-soft);
}

.portfolio-alert strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 14px;
}

.portfolio-alert p {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.55;
}

.demand-dashboard {
  gap: 16px;
}

.demand-hero {
  background: linear-gradient(135deg, #ffffff 0%, #eef8f6 100%);
}

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

.demand-cluster-card,
.demand-product-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
}

.demand-cluster-card {
  border-top: 3px solid var(--blue);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.demand-cluster-card:hover,
.demand-cluster-card.active {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.demand-cluster-card.active {
  outline: 2px solid rgba(37, 99, 235, 0.18);
  outline-offset: 2px;
}

.demand-cluster-card.good {
  border-color: rgba(22, 121, 76, 0.28);
  border-top-color: var(--green);
  background: var(--green-soft);
}

.demand-cluster-card.risk {
  border-color: rgba(180, 35, 24, 0.25);
  border-top-color: var(--red);
  background: var(--red-soft);
}

.scene-cluster-card {
  border-top-color: #64748b;
  background: #f8fafc;
}

.scene-cluster-card.good {
  border-color: rgba(37, 99, 235, 0.26);
  border-top-color: var(--blue);
  background: var(--blue-soft);
}

.scene-cluster-card.risk {
  border-color: rgba(180, 35, 24, 0.25);
  border-top-color: var(--red);
  background: var(--red-soft);
}

.scene-detail-panel {
  border-color: rgba(37, 99, 235, 0.2);
  background: #fbfdff;
}

.demand-cluster-card div:first-child {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.demand-cluster-card span,
.demand-product-card span {
  width: fit-content;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
}

.demand-cluster-card strong {
  color: var(--text);
  font-size: 17px;
  line-height: 1.28;
}

.demand-cluster-card p,
.demand-cluster-card small {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.55;
}

.demand-cluster-card small {
  display: block;
  margin-top: 8px;
}

.demand-detail-panel {
  border-color: rgba(8, 118, 109, 0.22);
  background: #fbfefd;
}

.demand-detail-panel.muted {
  background: var(--surface);
}

.demand-detail-panel .section-title p:last-child {
  margin: 6px 0 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
}

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

.subdemand-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: inherit;
  cursor: pointer;
  padding: 13px;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.subdemand-card:hover,
.subdemand-card.active {
  border-color: rgba(8, 118, 109, 0.36);
  box-shadow: 0 12px 24px rgba(8, 118, 109, 0.1);
  transform: translateY(-1px);
}

.subdemand-card.active {
  background: var(--teal-soft);
  outline: 2px solid rgba(8, 118, 109, 0.16);
  outline-offset: 2px;
}

.subdemand-card div {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.subdemand-card span {
  width: fit-content;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 850;
}

.subdemand-card strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}

.subdemand-card p,
.subdemand-card small {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.5;
}

.subdemand-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.subdemand-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(8, 118, 109, 0.18);
  border-radius: 8px;
  background: #f2fbf8;
  padding: 10px 12px;
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}

.subdemand-filter-bar strong {
  color: var(--teal);
}

.subdemand-hint {
  border: 1px dashed rgba(8, 118, 109, 0.24);
  border-radius: 8px;
  background: #f8fdfb;
  color: #344054;
  padding: 11px 12px;
  font-size: 13px;
  line-height: 1.5;
}

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

.demand-detail-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 8px;
  padding: 13px;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.demand-detail-card:hover {
  border-color: rgba(8, 118, 109, 0.36);
  box-shadow: 0 12px 24px rgba(8, 118, 109, 0.1);
  transform: translateY(-1px);
}

.demand-detail-card strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.3;
}

.demand-detail-card em {
  color: var(--teal);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.demand-detail-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

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

.demand-product-card {
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 8px;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.demand-product-card:hover {
  border-color: rgba(8, 118, 109, 0.36);
  box-shadow: 0 12px 26px rgba(8, 118, 109, 0.12);
  transform: translateY(-1px);
}

.demand-product-card strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.3;
}

.demand-product-card em {
  color: var(--teal);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.demand-attribution-table {
  min-width: 1020px;
}

.collection-command-center {
  display: grid;
  gap: 14px;
}

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

.collection-lane-card {
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 13px;
}

.collection-lane-card.risk {
  border-top-color: var(--red);
  background: var(--red-soft);
}

.collection-lane-card.warning {
  border-top-color: var(--amber);
  background: var(--amber-soft);
}

.collection-lane-card.good {
  border-top-color: var(--green);
  background: var(--green-soft);
}

.collection-lane-card span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.collection-lane-card strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 23px;
  line-height: 1.15;
}

.collection-lane-card p {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.55;
}

.collection-queue-table {
  min-width: 1040px;
}

.queue-progress {
  min-width: 160px;
}

.queue-progress .mini-progress {
  width: 100%;
}

.keyword-pill-row {
  max-width: 360px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.keyword-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: #eef2f7;
  color: #344054;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.keyword-pill small {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

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

.field-quality-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.field-quality-card div:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.field-quality-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.field-quality-card strong {
  color: var(--teal);
  font-size: 17px;
}

.field-quality-card p {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.5;
}

.dedupe-panel {
  display: grid;
  gap: 14px;
}

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

.dedupe-card {
  border: 1px solid var(--line);
  border-top: 3px solid var(--teal);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 13px;
}

.dedupe-card span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.dedupe-card strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.dedupe-card p {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.55;
}

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

.analysis-pipeline span {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  padding: 10px 12px;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.4;
}

.dedupe-table {
  min-width: 1080px;
}

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

.collection-flow-step {
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 13px;
}

.collection-flow-step b {
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 13px;
}

.collection-flow-step strong {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
}

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

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

.matrix-wrap {
  position: relative;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(102, 112, 133, 0.22) calc(50% - 1px), rgba(102, 112, 133, 0.22) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(0deg, transparent calc(50% - 1px), rgba(102, 112, 133, 0.22) calc(50% - 1px), rgba(102, 112, 133, 0.22) calc(50% + 1px), transparent calc(50% + 1px)),
    var(--surface-soft);
  overflow: hidden;
}

.matrix-wrap::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px dashed rgba(102, 112, 133, 0.26);
  border-radius: 8px;
  pointer-events: none;
}

.matrix-axis,
.matrix-quadrant {
  position: absolute;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  pointer-events: none;
}

.matrix-axis.y {
  top: 18px;
  left: 18px;
}

.matrix-axis.x {
  right: 18px;
  bottom: 16px;
}

.matrix-quadrant {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  padding: 7px 10px;
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.07);
}

.matrix-quadrant.top-left {
  top: 22px;
  left: 22px;
  color: var(--green);
}

.matrix-quadrant.top-right {
  top: 22px;
  right: 22px;
  color: var(--amber);
}

.matrix-quadrant.bottom-left {
  bottom: 22px;
  left: 22px;
  color: var(--blue);
}

.matrix-quadrant.bottom-right {
  right: 22px;
  bottom: 22px;
  color: var(--red);
}

.matrix-point {
  position: absolute;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(180, 83, 9, 0.44);
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.18);
  transform: translate(-50%, 50%);
  z-index: 2;
}

.matrix-point.good {
  border-color: rgba(22, 121, 76, 0.36);
  background: var(--green-soft);
  color: var(--green);
}

.matrix-point.risk {
  border-color: rgba(180, 35, 24, 0.3);
  background: var(--red-soft);
  color: var(--red);
}

.matrix-point span {
  width: 100%;
  text-align: center;
  font-size: 13px;
  font-weight: 950;
}

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

.matrix-legend-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
}

.matrix-legend-item b,
.matrix-id {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  font-weight: 950;
}

.matrix-legend-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matrix-legend-item span {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.plan-card h4 {
  min-height: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.plan-card p {
  margin: 0;
}

.info-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 16px;
}

.info-box.dense {
  background: #ffffff;
  padding: 14px;
}

.info-box h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

.info-box p,
.info-box li {
  color: #344054;
  line-height: 1.65;
}

.info-box p:last-child,
.info-box ul:last-child {
  margin-bottom: 0;
}

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

.attempt-grid span {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
  color: #344054;
  font-size: 13px;
  line-height: 1.45;
}

.attempt-grid strong {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.filter-panel,
.type-ranking {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 16px;
}

.filter-panel {
  position: relative;
  z-index: 5;
}

.filter-panel input,
.filter-panel select,
.filter-panel button {
  position: relative;
  z-index: 6;
}

body.filter-safe-mode #tabContent a[href],
body.filter-safe-mode #tabContent [data-open-analysis] {
  pointer-events: none;
}

body.filter-safe-mode [data-competitor-filter-panel],
body.filter-safe-mode [data-competitor-filter-panel] * {
  pointer-events: auto;
}

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

.filter-head h4 {
  margin: 0;
  font-size: 16px;
}

.ghost-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  padding: 7px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.ghost-button:hover {
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--blue);
}

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

.filter-grid label {
  display: grid;
  gap: 7px;
}

.filter-grid label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.filter-grid select,
.filter-grid input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 10px;
  outline: 0;
}

.filter-grid select:focus,
.filter-grid input:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-search {
  grid-column: span 2;
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-line {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 13px;
}

.rank-line-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rank-line-head strong {
  font-size: 14px;
}

.rank-line-head span {
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.rank-bar {
  height: 8px;
  margin: 10px 0;
  border-radius: 999px;
  background: #edf1f5;
  overflow: hidden;
}

.rank-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

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

.muted-text {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.segment-board-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  display: grid;
  gap: 14px;
}

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

.segment-board-summary span {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.segment-board-summary b {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 16px;
}

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

.dimension-guide span {
  display: grid;
  gap: 5px;
  align-content: start;
}

.dimension-guide b {
  margin-bottom: 0;
}

.dimension-guide em {
  color: var(--teal);
  font-style: normal;
  font-size: 13px;
  font-weight: 850;
}

.dimension-guide small {
  color: #344054;
  font-size: 12px;
  line-height: 1.45;
}

.segment-board-alert {
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: var(--amber-soft);
  color: #7a3e05;
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.55;
}

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

.segment-map-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.segment-map-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.segment-map-card-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.segment-map-card-head strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.segment-map-card-head em {
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  padding: 5px 9px;
  font-style: normal;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.segment-map-card-head p {
  margin: 0;
  margin-top: 6px;
  color: #344054;
  font-size: 12px;
  line-height: 1.5;
}

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

.segment-kpi-grid span {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.segment-kpi-grid b {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-size: 12px;
}

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

.segment-signal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 13px;
  display: grid;
  gap: 8px;
}

.segment-signal-card div:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.segment-signal-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.segment-signal-card strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 18px;
}

.segment-signal-card em {
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  padding: 5px 9px;
  font-style: normal;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.segment-signal-card p,
.segment-signal-card small {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.5;
}

.segment-signal-card small {
  color: var(--muted);
}

.segment-verdict {
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
}

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

.segment-product-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px;
  text-decoration: none;
  color: var(--text);
}

.segment-product-card strong,
.segment-product-card span,
.segment-product-card small {
  display: block;
}

.segment-product-card strong {
  font-size: 13px;
  line-height: 1.35;
}

.segment-product-card span,
.segment-product-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.segment-product-card:hover strong {
  color: var(--blue);
}

.collection-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 14px;
  align-items: stretch;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 8px;
  background: var(--teal-soft);
  padding: 18px;
}

.collection-hero h4 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.3;
}

.collection-hero p:last-child {
  margin-bottom: 0;
  color: #344054;
  line-height: 1.65;
}

.progress-card {
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.progress-card span {
  color: var(--teal);
  font-size: 36px;
  font-weight: 850;
  line-height: 1;
}

.progress-card small,
.mini-progress + small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.mini-progress {
  width: 150px;
  height: 8px;
  margin-bottom: 7px;
  border-radius: 999px;
  background: #edf1f5;
  overflow: hidden;
}

.mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

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

.flow-step {
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
}

.flow-step strong,
.flow-step span {
  display: block;
}

.flow-step strong {
  margin-bottom: 8px;
  font-size: 14px;
}

.flow-step span {
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.flow-step p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  position: relative;
  z-index: 1;
}

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

.matrix-table td strong,
.matrix-table td span,
.matrix-table td small {
  display: block;
  white-space: nowrap;
}

.matrix-table td span {
  margin-top: 4px;
  color: #344054;
  font-size: 12px;
  font-weight: 850;
}

.matrix-table td small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.segment-matrix-table {
  min-width: 980px;
}

.segment-matrix-table td:last-child {
  min-width: 320px;
}

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

th {
  background: #eef3f8;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

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

.product-thumb {
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2f5f8;
  display: block;
  overflow: hidden;
}

.product-thumb.small {
  width: 54px;
  height: 54px;
}

.product-thumb.missing {
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 850;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.single-review-product {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.single-review-product .product-thumb {
  width: 86px;
  height: 86px;
}

.single-review-product h4 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.45;
}

.single-review-product p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

.review-summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 8px;
  min-height: 132px;
}

.review-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.review-summary-card strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
}

.review-summary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #eef2f7;
  color: #344054;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.mini-tag.good {
  background: var(--green-soft);
  color: var(--green);
}

.mini-tag.risk {
  background: var(--red-soft);
  color: var(--red);
}

.mini-tag.focus {
  background: var(--blue-soft);
  color: var(--blue);
}

.mini-tag.muted {
  background: #eef2f7;
  color: var(--muted);
}

.signal-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 150px;
}

.signal-chip {
  display: inline-grid;
  gap: 2px;
  border-radius: 8px;
  border: 1px solid #d9e2ec;
  background: #f8fafc;
  color: #344054;
  padding: 6px 8px;
  line-height: 1.2;
}

.signal-chip strong {
  font-size: 12px;
  font-weight: 850;
}

.signal-chip small {
  color: inherit;
  font-size: 10px;
  font-weight: 800;
  opacity: 0.82;
}

.signal-chip.keyword {
  border-color: var(--keyword-border);
  background: var(--keyword-bg);
  color: var(--keyword-text);
}

.signal-chip.keyword strong {
  color: var(--keyword-text);
}

.signal-chip.keyword small {
  color: var(--keyword-text);
  opacity: 0.72;
}

.signal-chip.keyword.repeat {
  box-shadow: inset 0 -3px 0 rgba(15, 23, 42, 0.08);
}

.signal-chip.keyword.cluster {
  box-shadow: inset 0 -3px 0 rgba(217, 119, 6, 0.18);
}

.signal-chip.keyword.unique {
  box-shadow: inset 0 -3px 0 rgba(124, 58, 237, 0.18);
}

.signal-chip.muted {
  border-color: #e5e7eb;
  background: #f8fafc;
  color: var(--muted);
}

.distribution-cell {
  display: grid;
  gap: 6px;
  min-width: 140px;
}

.distribution-cell strong {
  font-size: 13px;
}

.distribution-cell p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.distribution-badge {
  justify-self: start;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 850;
}

.distribution-badge.repeat {
  background: #e0f2fe;
  color: #075985;
}

.distribution-badge.cluster {
  background: #fff7ed;
  color: #9a3412;
}

.distribution-badge.unique {
  background: #f5f3ff;
  color: #6d28d9;
}

.mini-meter {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.mini-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0ea5e9;
}

.tag-row.compact {
  gap: 6px;
}

.review-compare-table {
  min-width: 1180px;
}

.review-compare-table td {
  vertical-align: top;
}

.review-compare-table td p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.review-compare-product {
  min-width: 280px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.review-compare-product span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.review-compare-product strong {
  display: block;
  line-height: 1.45;
}

.review-detail-list {
  display: grid;
  gap: 12px;
}

.review-detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.review-detail-card summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
}

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

.review-detail-card summary span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-weight: 850;
  font-size: 12px;
}

.review-detail-card summary strong {
  line-height: 1.45;
}

.review-detail-card summary em {
  grid-column: 2;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.review-detail-card[open] summary {
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.review-detail-card > .single-review-product,
.review-detail-card > .table-wrap {
  margin: 14px;
}

.product-cell {
  max-width: 360px;
  display: grid;
  gap: 8px;
}

.product-cell strong {
  line-height: 1.45;
}

.sample-table {
  min-width: 1360px;
}

.table-toolbar {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.table-toolbar h4 {
  margin: 0;
  font-size: 16px;
}

.table-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-align: right;
}

.sales-cell {
  min-width: 132px;
  display: grid;
  gap: 3px;
}

.sales-cell strong {
  color: #18202f;
  font-size: 14px;
  font-weight: 850;
}

.sales-cell small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.sales-cell.muted strong {
  color: #667085;
}

.category-cell {
  min-width: 180px;
  display: grid;
  gap: 6px;
  align-content: start;
}

.category-cell.wide {
  min-width: 260px;
}

.category-cell strong {
  font-size: 13px;
  line-height: 1.35;
}

.category-cell small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.product-link {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.product-link:hover {
  text-decoration: underline;
}

.type-chip {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  background: #eef2f7;
  color: #344054;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.empty-cell {
  color: var(--muted);
  text-align: center;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  border-radius: 999px;
  background: #eef2f7;
  color: #344054;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

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

.source-card {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
  text-decoration: none;
}

.source-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.source-card strong {
  color: var(--text);
  font-size: 16px;
}

.source-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.score-row {
  display: grid;
  gap: 8px;
}

.score-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.score-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.score-track {
  height: 9px;
  border-radius: 999px;
  background: #edf1f5;
  overflow: hidden;
}

.score-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.score-row.risk .score-fill {
  background: var(--amber);
}

.note-block {
  margin-top: 18px;
  border-radius: 8px;
  background: var(--amber-soft);
  color: #7a3e05;
  padding: 13px;
  font-size: 13px;
  line-height: 1.6;
}

.callout {
  border-left: 4px solid var(--teal);
  background: var(--teal-soft);
  border-radius: 8px;
  padding: 15px 16px;
  line-height: 1.75;
}

.callout.warning {
  border-left-color: var(--amber);
  background: var(--amber-soft);
}

.callout.danger {
  border-left-color: var(--red);
  background: var(--red-soft);
}

.scope-notice {
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  background: var(--blue-soft);
  padding: 12px 14px;
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
}

.scope-notice strong {
  color: var(--blue);
  font-size: 14px;
}

.scope-notice span,
.scope-notice em {
  color: #344054;
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
}

.stack {
  display: grid;
  gap: 14px;
}

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

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

  .project-list {
    grid-template-columns: 1fr;
  }

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

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

  .bi-command-grid,
  .bi-module-grid,
  .bi-mini-kpi-grid,
  .fp-hero,
  .fp-gate-grid,
  .fp-kpi-grid,
  .fp-question-grid,
  .fp-evidence-row,
  .fp-portfolio-grid,
  .fp-product-grid,
  .v1-spec-grid,
  .portfolio-hero,
  .portfolio-focus-grid,
  .demand-cluster-grid,
  .subdemand-grid,
  .demand-detail-grid,
  .demand-product-grid,
  .decision-family-grid,
  .portfolio-track-grid,
  .portfolio-two-col,
  .collection-lane-grid,
  .field-quality-grid,
  .dedupe-insight-grid,
  .analysis-pipeline,
  .collection-flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-hero {
    grid-template-columns: 1fr;
  }

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

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

  .collection-hero,
  .segment-signal-grid,
  .flow-grid {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: flex;
    flex-direction: column;
  }

  .workspace {
    order: 1;
  }

  .sidebar {
    order: 2;
    border-top: 1px solid var(--line);
    border-bottom: 0;
  }

  .workspace {
    padding: 20px 16px 28px;
  }

  .sidebar {
    padding: 18px 16px;
  }

  .topbar,
  .share-notice,
  .decision-band,
  .score-hero,
  .collection-hero {
    display: grid;
    grid-template-columns: 1fr;
  }

  .status-strip {
    justify-content: flex-start;
  }

  .subdemand-filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .metric-grid,
  .estimate-grid,
  .formula-grid,
  .filter-grid,
  .source-grid,
  .tab-groups,
  .matrix-legend,
  .bi-command-grid,
  .bi-module-grid,
  .bi-mini-kpi-grid,
  .fp-hero,
  .fp-gate-grid,
  .fp-kpi-grid,
  .fp-question-grid,
  .fp-evidence-row,
  .fp-portfolio-grid,
  .fp-product-grid,
  .v1-spec-grid,
  .portfolio-hero,
  .portfolio-hero-stats,
  .portfolio-focus-grid,
  .demand-cluster-grid,
  .subdemand-grid,
  .demand-detail-grid,
  .demand-product-grid,
  .decision-family-grid,
  .portfolio-track-grid,
  .portfolio-progress-grid,
  .portfolio-two-col,
  .collection-lane-grid,
  .field-quality-grid,
  .dedupe-insight-grid,
  .segment-map-grid,
  .segment-signal-grid,
  .segment-kpi-grid,
  .segment-board-summary,
  .analysis-pipeline,
  .collection-flow-grid,
  .two-col,
  .project-list {
    grid-template-columns: 1fr;
  }

  .portfolio-progress-row {
    grid-template-columns: 1fr;
  }

  .portfolio-progress-row small {
    text-align: left;
  }

  .filter-head,
  .rank-line-head,
  .table-toolbar {
    display: grid;
  }

  .filter-search {
    grid-column: span 1;
  }

  .table-toolbar span {
    text-align: left;
  }

  .matrix-wrap {
    min-height: 520px;
  }

  .matrix-quadrant {
    font-size: 11px;
  }

  .matrix-point {
    width: 36px;
    height: 36px;
  }

  .matrix-point span {
    font-size: 12px;
  }

  h2 {
    font-size: 24px;
  }

  .decision-copy h3 {
    font-size: 22px;
  }
}
