:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #dbe3ef;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --blue: #1d4ed8;
  --amber: #92400e;
  --red: #991b1b;
  --green: #166534;
  --shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button,
.file-action {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

button:active,
.file-action:active {
  transform: translateY(1px);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
.file-action:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.32);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
}

.topbar,
.hero-panel,
.radar-panel,
.list-card,
.detail-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

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

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--primary);
  flex: none;
}

.brand p,
.hero-panel p,
.section-head p,
.detail-head p,
.budget-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.brand h1 {
  margin: 2px 0 0;
  font-size: 24px;
}

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

.primary-button {
  background: var(--primary);
  color: #fff;
  padding: 0 16px;
}

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

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

.danger-button {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #991b1b;
  padding: 0 14px;
}

.danger-button:hover {
  background: #ffe4e6;
}

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

.secondary-button,
.ghost-button,
.file-action {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
}

.ghost-button:hover,
.secondary-button:hover,
.file-action:hover {
  background: var(--surface-soft);
}

.workspace {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.sidebar {
  background: #101827;
  border-radius: 8px;
  padding: 14px;
  min-height: calc(100vh - 120px);
  position: sticky;
  top: 20px;
}

.nav-item {
  width: 100%;
  margin-bottom: 8px;
  text-align: left;
  background: transparent;
  color: #cbd5e1;
  padding: 0 14px;
}

.nav-item.is-active,
.nav-item:hover {
  background: #1f2937;
  color: #fff;
}

.budget-box {
  margin-top: 24px;
  padding: 14px;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #dbeafe;
}

.budget-box span {
  display: block;
  color: #94a3b8;
  font-size: 13px;
}

.budget-box strong {
  display: block;
  margin: 8px 0;
  font-size: 22px;
}

.main-panel {
  display: grid;
  gap: 20px;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(420px, 1.4fr);
  gap: 20px;
  padding: 22px;
}

.hero-panel h2,
.radar-head h2,
.section-head h2,
.detail-head h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

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

label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 86px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}

.wide-field {
  grid-column: span 2;
}

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

.stats-grid div {
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.stats-grid strong {
  display: block;
  color: var(--primary);
  font-size: 32px;
}

.stats-grid span {
  color: var(--muted);
}

.radar-panel {
  padding: 18px;
}

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

.panel-kicker {
  margin: 0 0 4px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}

.identity-rule {
  width: min(260px, 100%);
  padding: 12px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
}

.identity-rule span,
.identity-rule p {
  color: #9a3412;
}

.identity-rule span {
  display: block;
  font-size: 13px;
  font-weight: 800;
}

.identity-rule strong {
  display: block;
  margin: 4px 0;
  color: #7c2d12;
  font-size: 20px;
}

.identity-rule p {
  margin: 0;
  line-height: 1.45;
}

.discovery-radar {
  display: grid;
  gap: 12px;
}

.radar-metrics,
.radar-stage-track {
  display: grid;
  gap: 8px;
}

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

.radar-metric,
.radar-stage,
.radar-column,
.radar-footer > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.radar-metric {
  min-height: 70px;
  padding: 12px;
}

.radar-metric strong {
  display: block;
  color: var(--primary);
  font-size: 26px;
}

.radar-metric span {
  color: var(--muted);
  font-size: 13px;
}

.radar-stage-track {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.radar-stage {
  min-height: 116px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 8px;
  padding: 12px;
  background: #fff;
}

.radar-stage div {
  display: grid;
  gap: 3px;
}

.radar-stage span,
.radar-stage p,
.radar-row small,
.radar-column-head span {
  color: var(--muted);
  font-size: 13px;
}

.radar-stage strong {
  font-size: 15px;
  line-height: 1.25;
}

.radar-stage b {
  color: var(--blue);
  font-size: 24px;
}

.radar-stage p {
  margin: 0;
  line-height: 1.45;
}

.radar-body,
.radar-footer {
  display: grid;
  gap: 12px;
}

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

.radar-footer {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.radar-column,
.radar-footer > div {
  padding: 12px;
  background: #fff;
}

.radar-column-strong {
  border-color: #fed7aa;
  background: #fffaf5;
}

.radar-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.radar-column h3,
.radar-footer h3 {
  margin: 0;
  font-size: 16px;
}

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

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

.radar-row {
  width: 100%;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.radar-row:hover {
  border-color: rgba(15, 118, 110, 0.45);
  background: #f0fdfa;
}

.radar-row.pending:hover {
  border-color: #fdba74;
  background: #fff7ed;
}

.radar-row.small {
  min-height: 56px;
}

.radar-row span:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.radar-row strong,
.radar-row small {
  overflow-wrap: anywhere;
}

.radar-progress,
.queue-count,
.identity-missing {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.radar-progress {
  width: 70px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  background: linear-gradient(90deg, #ccfbf1 var(--progress), #f8fafc 0);
  color: var(--primary-dark);
}

.queue-count {
  min-width: 36px;
  padding: 0 10px;
  background: #dbeafe;
  color: #1e40af;
}

.identity-missing {
  min-width: 46px;
  padding: 0 10px;
  background: #ffedd5;
  color: #9a3412;
}

.radar-empty {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}

.radar-footer ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.radar-footer li {
  margin-bottom: 6px;
  color: #475569;
  line-height: 1.55;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.85fr) minmax(460px, 1.15fr);
  gap: 20px;
  align-items: start;
}

.list-card,
.detail-card {
  padding: 18px;
}

.section-head,
.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.search-box {
  width: min(360px, 100%);
}

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

.catalog-trail {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.trail-button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: #475569;
  font-size: 13px;
}

.trail-button::after {
  content: "/";
  margin-left: 8px;
  color: #94a3b8;
}

.trail-button:last-child::after {
  content: "";
  margin-left: 0;
}

.trail-button.is-current {
  border-color: rgba(15, 118, 110, 0.45);
  background: #ecfeff;
  color: var(--primary-dark);
}

.catalog-node {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 28px;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.catalog-node:hover {
  border-color: rgba(15, 118, 110, 0.45);
  background: #f0fdfa;
}

.node-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.node-main strong {
  font-size: 17px;
}

.node-main span {
  color: var(--muted);
  font-size: 13px;
}

.node-count {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.node-arrow {
  color: var(--primary);
  font-size: 24px;
  line-height: 1;
  text-align: right;
}

.catalog-products-title,
.search-mode-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.catalog-products-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  padding: 8px 2px 2px;
  font-weight: 700;
  color: #334155;
}

.catalog-products-title span {
  color: var(--muted);
  font-weight: 600;
}

.search-mode-note {
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e40af;
}

.competitor-card {
  width: 100%;
  min-height: 116px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  text-align: left;
}

.competitor-card.is-active {
  border-color: rgba(15, 118, 110, 0.55);
  background: #ecfeff;
}

.card-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.card-title strong {
  font-size: 17px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-path,
.detail-path {
  margin: 0 0 10px;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
}

.card-path {
  padding-left: 10px;
  border-left: 3px solid rgba(15, 118, 110, 0.35);
}

.detail-path {
  max-width: 780px;
  margin-top: 8px;
  color: var(--muted);
}

.status-pill,
.confidence-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.status-待收集,
.confidence-低 {
  background: #fee2e2;
  color: var(--red);
}

.status-已收集,
.confidence-高 {
  background: #dcfce7;
  color: var(--green);
}

.status-需复核,
.confidence-中 {
  background: #fef3c7;
  color: var(--amber);
}

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

.dossier-grid div {
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.dossier-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.dossier-grid strong {
  font-size: 16px;
  line-height: 1.35;
}

.detail-section {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}

.detail-section h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.detail-section p {
  color: #334155;
  line-height: 1.7;
}

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

.profile-card {
  min-height: 112px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid #94a3b8;
  border-radius: 8px;
  background: #fff;
}

.profile-card span,
.hint-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.profile-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 16px;
  line-height: 1.35;
}

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

.profile-ready {
  border-left-color: #16a34a;
}

.profile-watch {
  border-left-color: #d97706;
}

.profile-pending {
  border-left-color: #dc2626;
}

.procurement-panel {
  display: grid;
  gap: 12px;
}

.procurement-summary {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #f0f9ff;
}

.procurement-summary p {
  margin: 0;
  color: #0f172a;
}

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

.procurement-metric {
  min-height: 68px;
  padding: 10px;
  border: 1px solid rgba(14, 116, 144, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.procurement-metric strong {
  display: block;
  color: #0e7490;
  font-size: 24px;
}

.procurement-metric span {
  color: #475569;
  font-size: 13px;
}

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

.procurement-hints > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.procurement-records {
  display: grid;
  gap: 10px;
}

.procurement-empty,
.procurement-record {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.procurement-empty strong {
  display: block;
  margin-bottom: 4px;
}

.procurement-empty p,
.procurement-record p,
.procurement-next li {
  color: #475569;
  line-height: 1.6;
}

.procurement-record-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.procurement-record-head div {
  display: grid;
  gap: 4px;
}

.procurement-record-head span {
  color: var(--muted);
  font-size: 13px;
}

.procurement-record a {
  color: var(--blue);
}

.procurement-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.procurement-ready {
  background: #dcfce7;
  color: var(--green);
}

.procurement-watch {
  background: #fef3c7;
  color: var(--amber);
}

.procurement-pending {
  background: #fee2e2;
  color: var(--red);
}

.procurement-risk {
  background: #f3e8ff;
  color: #7e22ce;
}

.procurement-next {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
}

.procurement-next summary,
.query-plan-shell summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: #334155;
  font-weight: 800;
  cursor: pointer;
}

.procurement-next ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.query-plan-shell {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  margin-top: 16px;
}

.query-plan-shell .query-plan {
  margin-top: 8px;
}

.asset-library {
  display: grid;
  gap: 12px;
}

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

.asset-metric {
  min-height: 68px;
  padding: 10px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: #f0fdfa;
}

.asset-metric strong {
  display: block;
  color: var(--primary-dark);
  font-size: 24px;
}

.asset-metric span {
  color: #475569;
  font-size: 13px;
}

.asset-records {
  display: grid;
  gap: 10px;
}

.asset-empty,
.asset-record {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.asset-record-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.asset-record-head div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.asset-record-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.asset-type,
.asset-review {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.asset-web {
  background: #dbeafe;
  color: #1e40af;
}

.asset-file {
  background: #dcfce7;
  color: var(--green);
}

.asset-video {
  background: #fef3c7;
  color: var(--amber);
}

.asset-image {
  background: #fae8ff;
  color: #86198f;
}

.asset-text {
  background: #e2e8f0;
  color: #334155;
}

.asset-review {
  background: var(--surface-soft);
  color: #475569;
}

.asset-record p,
.asset-empty p {
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.asset-record blockquote {
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 3px solid rgba(15, 118, 110, 0.42);
  background: var(--surface-soft);
  color: #334155;
  line-height: 1.6;
}

.asset-record a {
  color: var(--blue);
}

.source-list,
.query-plan {
  display: grid;
  gap: 10px;
}

.source-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.source-form label:not(.wide-source-field) {
  grid-column: span 2;
}

.wide-source-field {
  grid-column: span 3;
}

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

.source-form button {
  grid-column: span 2;
  align-self: end;
  justify-content: center;
}

.source-item,
.query-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.source-item a {
  color: var(--blue);
}

.source-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.source-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.icon-danger {
  min-height: 30px;
  border: 1px solid #fecaca;
  background: #fff;
  color: #991b1b;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 13px;
}

.icon-danger:hover {
  background: #fff1f2;
}

.manual-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 6px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 12px;
  vertical-align: middle;
}

.source-item p,
.query-item p {
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.empty-state {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  box-shadow: var(--shadow);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1080px) {
  .workspace,
  .content-grid,
  .hero-panel,
  .radar-body,
  .radar-footer {
    grid-template-columns: 1fr;
  }

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

  .sidebar {
    position: static;
    min-height: auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .budget-box {
    grid-column: 1 / -1;
    margin-top: 6px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 12px;
  }

  .topbar,
  .topbar-actions,
  .radar-head,
  .section-head,
  .detail-head {
    align-items: stretch;
    flex-direction: column;
  }

  .add-form,
  .stats-grid,
  .radar-metrics,
  .radar-stage-track,
  .dossier-grid,
  .sidebar,
  .source-form {
    grid-template-columns: 1fr 1fr;
  }

  .wide-field,
  .wide-source-field {
    grid-column: span 2;
  }

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

  .source-form label:not(.wide-source-field),
  .source-form button {
    grid-column: span 2;
  }

  .search-box {
    width: 100%;
  }

  .catalog-node {
    grid-template-columns: 1fr;
  }

  .node-count {
    width: fit-content;
  }

  .node-arrow {
    display: none;
  }

  .profile-grid,
  .procurement-metrics,
  .procurement-hints,
  .asset-metrics,
  .radar-list.compact {
    grid-template-columns: 1fr;
  }

  .asset-record-head,
  .asset-record-head div {
    grid-template-columns: 1fr;
  }
}
