:root {
  --bg: #f4f6f7;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --ink: #172126;
  --muted: #67747b;
  --line: #dce2e5;
  --line-strong: #c6d0d5;
  --accent: #d05a2a;
  --accent-soft: #fff1ea;
  --blue: #2e6d91;
  --teal: #197f73;
  --green: #5b7c51;
  --gold: #a57819;
  --purple: #6c5aa4;
  --magenta: #a64e72;
  --radius: 6px;
  font-family: Inter, "Aptos", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 320px;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px;
  background: #192329;
  color: #f7fafb;
  border-bottom: 1px solid #2f3b42;
}

.brand-block {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #60717a;
  border-radius: 4px;
  color: #f29a70;
  font-size: 12px;
  font-weight: 800;
}

.brand-block h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 720;
}

.brand-block p {
  margin: 3px 0 0;
  color: #9eabb1;
  font-size: 11px;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #aeb9be;
  font-size: 12px;
  white-space: nowrap;
}

.topbar-meta strong {
  color: #edf3f5;
  font-variant-numeric: tabular-nums;
}

.topbar-refresh {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #45545c;
  border-radius: 4px;
  background: transparent;
  color: #c4cdd1;
  cursor: pointer;
}

.topbar-refresh:hover {
  border-color: #7d8b92;
  color: #ffffff;
}

.topbar-refresh:disabled {
  cursor: wait;
  opacity: 0.55;
}

.topbar-refresh svg {
  width: 14px;
  height: 14px;
}

.topbar-refresh.is-loading svg {
  animation: spin 900ms linear infinite;
}

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

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #72b788;
  box-shadow: 0 0 0 3px rgba(114, 183, 136, 0.12);
}

.workbench {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
}

.filter-panel {
  min-width: 0;
  padding: 20px 16px 24px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.search-row {
  height: 38px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
  padding-left: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.search-row > svg {
  width: 16px;
  height: 16px;
  color: #7d898f;
}

.search-row input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.icon-button {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.icon-button svg {
  width: 15px;
  height: 15px;
}

.icon-button:hover {
  color: var(--accent);
}

.filter-group {
  margin-top: 24px;
}

.filter-group h2,
.filter-heading h2 {
  margin: 0 0 10px;
  color: #516067;
  font-size: 11px;
  line-height: 1;
  font-weight: 750;
  text-transform: uppercase;
}

.filter-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.filter-heading span {
  color: #8d989d;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef2f4;
}

.market-segmented {
  grid-template-columns: repeat(3, 1fr);
}

.segmented button,
.status-filter button,
.relation-filter button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.segmented button {
  min-height: 28px;
  padding: 0 5px;
  border-radius: 4px;
  color: #67747b;
  font-size: 11px;
}

.segmented button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(23, 33, 38, 0.09);
  font-weight: 700;
}

.sector-filters {
  display: grid;
  gap: 3px;
}

.sector-button {
  width: 100%;
  min-height: 30px;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #526067;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
}

.sector-button:hover {
  background: #f3f6f7;
}

.sector-button.is-active {
  border-color: #d6dde1;
  background: #edf2f4;
  color: var(--ink);
  font-weight: 650;
}

.sector-swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.sector-button em {
  color: #8d989d;
  font-size: 10px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.status-filter {
  display: grid;
  gap: 4px;
}

.status-filter button {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-radius: 4px;
  color: #617078;
  text-align: left;
  font-size: 12px;
}

.status-filter button em {
  margin-left: auto;
  color: #8d989d;
  font-size: 10px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.status-filter button:hover,
.status-filter button.is-active {
  background: #edf2f4;
  color: var(--ink);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

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

.status-dot.core {
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(208, 90, 42, 0.12);
}

.status-dot.caution {
  background: var(--gold);
  box-shadow: 0 0 0 2px rgba(165, 120, 25, 0.12);
}

.status-dot.pending {
  border: 1px solid #a6b0b5;
  background: transparent;
}

.source-block {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.source-block span {
  color: #8a969b;
  font-size: 10px;
  text-transform: uppercase;
}

.source-block p {
  margin: 5px 0 0;
  color: #66737a;
  font-size: 11px;
  line-height: 1.55;
}

.main-panel {
  min-width: 0;
  padding: 22px 26px 18px;
}

.summary-strip {
  min-height: 68px;
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.summary-item {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px;
  border-right: 1px solid var(--line);
}

.summary-item:last-child {
  border-right: 0;
}

.summary-item span {
  color: #738087;
  font-size: 11px;
}

.summary-item strong {
  color: #26343a;
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.summary-item.accent strong {
  color: var(--accent);
}

.summary-item:nth-child(3) strong {
  color: var(--teal);
}

.view-bar {
  height: 58px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-strong);
}

.view-tabs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 100%;
}

.view-tabs button {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #6f7c82;
  font-size: 12px;
  cursor: pointer;
}

.view-tabs button svg {
  width: 16px;
  height: 16px;
}

.view-tabs button:hover,
.view-tabs button.is-active {
  color: var(--ink);
}

.view-tabs button.is-active {
  border-bottom-color: var(--accent);
  font-weight: 700;
}

.visible-label {
  padding-bottom: 17px;
  color: #7c898f;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.visible-label strong {
  color: var(--ink);
}

.content-view {
  display: none;
}

.content-view.is-active {
  display: block;
}

.graph-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  min-height: 620px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.graph-pane {
  min-width: 0;
  padding: 14px 16px 12px;
}

.graph-toolbar {
  min-height: 36px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.relation-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.relation-filter button {
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #78858b;
  font-size: 10px;
}

.relation-filter button:hover,
.relation-filter button.is-active {
  border-color: var(--line);
  background: #f1f4f5;
  color: var(--ink);
}

.network-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1120 / 650;
  min-height: 450px;
  border: 1px solid var(--line);
  background: #fbfcfc;
  overflow: hidden;
}

#networkGraph {
  display: block;
  width: 100%;
  height: 100%;
}

.layer-band {
  fill: #fbfcfc;
  stroke: #e5eaec;
  stroke-width: 1;
}

.layer-band.middle {
  fill: #f7faf9;
}

.layer-title {
  fill: #647179;
  font-size: 13px;
  font-weight: 750;
}

.layer-count {
  fill: #9ba5aa;
  font-size: 10px;
  font-weight: 600;
}

.relation-line {
  fill: none;
  stroke-width: 1.5;
  opacity: 0.32;
  transition: opacity 120ms ease, stroke-width 120ms ease;
}

.relation-line.chain {
  stroke: #c56336;
}

.relation-line.capex {
  stroke: #3d7796;
  stroke-dasharray: 7 4;
}

.relation-line.power {
  stroke: #5f8357;
  stroke-dasharray: 2 4;
}

.relation-line.theme {
  stroke: #8a7c9e;
  stroke-dasharray: 5 5;
}

.relation-line.mapping {
  stroke: #9b7422;
  stroke-dasharray: 3 3;
}

.relation-line.is-connected {
  opacity: 0.92;
  stroke-width: 2.4;
}

.relation-line.is-dimmed {
  opacity: 0.06;
}

.stock-node {
  cursor: pointer;
  outline: none;
}

.stock-node rect {
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 1;
  transition: stroke 120ms ease, stroke-width 120ms ease, opacity 120ms ease;
}

.stock-node text {
  fill: #ffffff;
  font-weight: 750;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.stock-node .node-ticker {
  font-size: 10px;
}

.stock-node .node-change {
  fill: rgba(255, 255, 255, 0.86);
  font-size: 8px;
  font-weight: 650;
}

.stock-node:hover rect,
.stock-node:focus rect,
.stock-node.is-selected rect {
  stroke: #172126;
  stroke-width: 2.2;
}

.stock-node.is-related rect {
  stroke: #52656d;
  stroke-width: 1.8;
}

.stock-node.is-dimmed {
  opacity: 0.18;
}

.analyzed-ring {
  fill: #ffffff;
  stroke: #197f73;
  stroke-width: 2;
}

.core-ring {
  fill: #ffffff;
  stroke: #d05a2a;
  stroke-width: 2;
}

.caution-ring {
  fill: #ffffff;
  stroke: #9b7422;
  stroke-width: 2;
}

.graph-tooltip {
  position: absolute;
  z-index: 4;
  max-width: 220px;
  padding: 8px 10px;
  border: 1px solid #26343a;
  border-radius: 4px;
  background: #192329;
  color: #f4f8f9;
  font-size: 11px;
  line-height: 1.4;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(25, 35, 41, 0.16);
}

.graph-tooltip strong {
  display: block;
  margin-bottom: 2px;
  color: #ffffff;
}

.relationship-legend {
  min-height: 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding-top: 10px;
  color: #77848a;
  font-size: 10px;
}

.relationship-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.line-sample {
  width: 25px;
  height: 0;
  border-top: 2px solid;
}

.line-sample.chain {
  border-color: #c56336;
}

.line-sample.capex {
  border-color: #3d7796;
  border-top-style: dashed;
}

.line-sample.power {
  border-color: #5f8357;
  border-top-style: dotted;
}

.line-sample.theme {
  border-color: #8a7c9e;
  border-top-style: dashed;
}

.line-sample.mapping {
  border-color: #9b7422;
  border-top-style: dashed;
}

.detail-panel {
  min-width: 0;
  padding: 25px 22px;
  border-left: 1px solid var(--line);
  background: #f8fafb;
}

.detail-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #7a878d;
  font-size: 10px;
  text-transform: uppercase;
}

.detail-title {
  margin: 16px 0 0;
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
}

.detail-company {
  margin: 7px 0 0;
  color: #6f7c82;
  font-size: 12px;
}

.detail-role {
  margin: 20px 0 0;
  font-size: 17px;
  line-height: 1.45;
  font-weight: 700;
}

.live-quote {
  margin-top: 20px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.live-quote strong {
  font-size: 27px;
  font-variant-numeric: tabular-nums;
}

.live-quote span {
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.quote-up {
  color: #16755f;
}

.quote-down {
  color: #bd4d31;
}

.quote-flat {
  color: #718087;
}

.quote-missing {
  color: #8e999e;
  font-size: 11px;
}

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

.detail-section h3 {
  margin: 0 0 9px;
  color: #758187;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-section p {
  margin: 0;
  color: #33434a;
  font-size: 12px;
  line-height: 1.65;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px 12px;
}

.meta-grid div {
  min-width: 0;
}

.meta-grid span {
  display: block;
  color: #8a959a;
  font-size: 9px;
  text-transform: uppercase;
}

.meta-grid strong {
  display: block;
  margin-top: 3px;
  color: #304047;
  font-size: 11px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.detail-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  font-size: 10px;
  font-weight: 700;
}

.detail-status.analyzed {
  background: #e4f2ef;
  color: #176f65;
}

.detail-status.pending {
  background: #edf1f3;
  color: #6f7b81;
}

.detail-status.core {
  background: var(--accent-soft);
  color: #a44822;
}

.detail-status.caution {
  background: #f7f0db;
  color: #846417;
}

.related-list {
  display: grid;
  gap: 5px;
}

.related-item,
.peer-button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.related-item:hover,
.peer-button:hover {
  border-color: var(--line-strong);
  background: #f2f6f7;
}

.related-item strong,
.peer-button strong {
  font-size: 11px;
}

.related-item span,
.peer-button span {
  color: #7b878d;
  font-size: 9px;
  text-align: right;
}

.peer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.empty-state {
  display: grid;
  min-height: 480px;
  place-items: center;
  color: #7f8b91;
  font-size: 12px;
  text-align: center;
}

.table-wrap {
  max-height: 650px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f0f4f5;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid #e5eaec;
  text-align: left;
  vertical-align: top;
  font-size: 11px;
  line-height: 1.45;
}

th {
  color: #69767d;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

th:nth-child(1) { width: 72px; }
th:nth-child(2) { width: 142px; }
th:nth-child(3) { width: 58px; }
th:nth-child(4) { width: 66px; }
th:nth-child(5) { width: 128px; }
th:nth-child(6) { width: 82px; }
th:nth-child(7) { width: 76px; }
th:nth-child(8) { width: 166px; }
th:nth-child(9) { width: 215px; }
th:nth-child(10) { width: 90px; }
th:nth-child(11) { width: 54px; }

th button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-transform: inherit;
}

th button svg {
  width: 11px;
  height: 11px;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: #f8fafb;
}

.ticker-cell {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.layer-tag,
.status-tag,
.market-tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 10px;
  font-size: 9px;
  white-space: nowrap;
}

.layer-tag.upstream {
  background: #fff0e7;
  color: #a84b23;
}

.layer-tag.midstream {
  background: #e7f2f1;
  color: #196f66;
}

.layer-tag.downstream {
  background: #e9eef5;
  color: #45617a;
}

.status-tag.analyzed {
  background: #e4f2ef;
  color: #176f65;
}

.status-tag.pending {
  background: #eef2f3;
  color: #6f7b81;
}

.status-tag.core {
  background: var(--accent-soft);
  color: #a44822;
}

.status-tag.caution {
  background: #f7f0db;
  color: #846417;
}

.market-tag.us-share {
  background: #e9eef5;
  color: #45617a;
}

.market-tag.a-share {
  background: #f9e8e2;
  color: #a44822;
}

.relation-count {
  color: var(--accent);
  font-weight: 800;
}

.price-cell,
.change-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.price-cell {
  font-weight: 700;
}

.chain-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.chain-column {
  min-width: 0;
  background: var(--surface);
}

.chain-header {
  min-height: 62px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 2px solid;
}

.chain-header h2 {
  margin: 0;
  font-size: 18px;
}

.chain-header span {
  color: #7b878d;
  font-size: 10px;
}

.chain-header.upstream { border-color: #d76737; }
.chain-header.midstream { border-color: #278376; }
.chain-header.downstream { border-color: #51718d; }

.sector-section {
  padding: 15px 18px 17px;
  border-bottom: 1px solid var(--line);
}

.sector-section h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
  color: #5e6c72;
  font-size: 10px;
  text-transform: uppercase;
}

.sector-section h3 span {
  color: #9aa4a9;
  font-size: 9px;
  font-weight: 500;
}

.stock-row {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border: 0;
  border-top: 1px solid #edf0f1;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.stock-row:first-of-type {
  border-top: 0;
}

.stock-row:hover strong {
  color: var(--accent);
}

.stock-row strong {
  font-size: 11px;
}

.stock-row div {
  min-width: 0;
}

.stock-row p {
  margin: 0;
  overflow: hidden;
  color: #657279;
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-mini {
  display: inline-flex;
  margin-right: 5px;
  padding: 1px 4px;
  border-radius: 3px;
  background: #edf1f3;
  color: #6a777d;
  font-size: 8px;
  font-weight: 700;
}

.stock-row .row-status {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c4cdd1;
}

.stock-row .row-quote {
  text-align: right;
  font-size: 9px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stock-row .row-status.analyzed {
  background: var(--teal);
}

.page-footer {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 2px 0;
  color: #7c898f;
  font-size: 10px;
}

.page-footer p {
  margin: 0;
}

.page-footer span {
  white-space: nowrap;
  font-weight: 700;
}

@media (max-width: 1120px) {
  .workbench {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .main-panel {
    padding: 18px 18px 14px;
  }

  .graph-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
  }

  .detail-panel {
    padding: 22px 16px;
  }

  .network-stage {
    min-height: 410px;
  }
}

@media (max-width: 860px) {
  .topbar {
    height: auto;
    min-height: 68px;
    padding: 13px 16px;
  }

  .topbar-meta span:not(.live-dot) {
    display: none;
  }

  .workbench {
    display: block;
  }

  .filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(220px, 1fr) minmax(220px, 1fr);
    gap: 14px;
    padding: 14px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
  }

  .filter-group,
  .source-block {
    margin-top: 0;
  }

  .sector-group,
  .source-block {
    display: none;
  }

  .main-panel {
    padding: 14px 14px 10px;
  }

  .summary-strip {
    grid-template-columns: repeat(4, minmax(100px, 1fr));
    overflow-x: auto;
  }

  .summary-item {
    padding: 16px 14px;
  }

  .graph-layout {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

  .chain-column {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .brand-block h1 {
    font-size: 16px;
  }

  .brand-block p,
  .topbar-meta .live-dot {
    display: none;
  }

  .filter-panel {
    grid-template-columns: minmax(250px, 1fr);
  }

  .filter-panel > .filter-group {
    display: none;
  }

  .filter-panel > .market-group {
    display: block;
  }

  .summary-strip {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .summary-item:nth-child(2) {
    border-right: 0;
  }

  .summary-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .view-bar {
    height: auto;
    min-height: 58px;
    align-items: center;
  }

  .view-tabs {
    gap: 0;
  }

  .view-tabs button {
    width: 42px;
    justify-content: center;
    padding: 0;
  }

  .view-tabs button span {
    display: none;
  }

  .visible-label {
    padding-bottom: 0;
  }

  .graph-pane {
    padding: 10px 0;
  }

  .graph-toolbar {
    padding: 0 8px 8px;
    justify-content: flex-start;
  }

  .relation-filter {
    justify-content: flex-start;
  }

  .network-stage {
    height: 441px;
    min-height: 441px;
    border-right: 0;
    border-left: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
  }

  #networkGraph {
    width: 760px;
    min-width: 760px;
    height: 441px;
    max-width: none;
  }

  .relationship-legend {
    padding: 10px 8px 0;
  }

  .detail-panel {
    padding: 22px 16px;
  }

  .table-wrap {
    max-height: 620px;
  }

  table {
    min-width: 1140px;
  }

  .page-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
