@scope (.pig-dashboard) {

.pig-dashboard {
  --bg: #f6f7f2;
  --ink: #18201c;
  --muted: #637066;
  --line: #dfe4dc;
  --panel: #ffffff;
  --green: #2f7d57;
  --amber: #a56a18;
  --red: #b13a2e;
  --blue: #285f86;
}

* {
  box-sizing: border-box;
}

.pig-dashboard {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.dashboard-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: end;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 10px;
  font-size: 42px;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.subtitle {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.update-card,
.panel,
.metric-card,
.signal-strip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.update-card {
  padding: 18px;
}

.update-card span,
.update-card small,
.signal-strip span,
.metric-head span,
.panel-head span,
.cost-stack span,
.forecast-list small,
.source-grid small {
  color: var(--muted);
  font-size: 12px;
}

.update-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 20px;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 24px 0;
  overflow: hidden;
}

.signal-strip div {
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.signal-strip div:last-child {
  border-right: 0;
}

.signal-strip strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

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

.daily-board {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.daily-main,
.daily-side {
  min-height: 254px;
}

.daily-price-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.daily-price-row div,
.mini-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbf8;
}

.daily-price-row span,
.mini-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.daily-price-row strong,
.mini-grid strong {
  display: block;
  margin: 7px 0 5px;
  font-size: 24px;
  line-height: 1.1;
}

.daily-price-row small,
.mini-grid small,
.daily-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.trend-chart {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f2f4ef;
}

.trend-chart.empty {
  min-height: 120px;
  color: var(--muted);
}

.trend-chart svg {
  display: block;
  width: 100%;
  min-height: 206px;
}

.range-chart {
  margin-top: 12px;
}

.range-control {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 10px;
}

.range-pick {
  position: relative;
}

.range-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.range-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.range-option small {
  color: #8a928a;
  font-size: 11px;
  font-weight: 600;
}

.range-input:checked + .range-option {
  border-color: #2f6f8f;
  background: #eef6f7;
  color: #243129;
}

.range-panel {
  display: none;
}

.range-chart:has(.range-input[value="1m"]:checked) .range-panel-1m,
.range-chart:has(.range-input[value="6m"]:checked) .range-panel-6m,
.range-chart:has(.range-input[value="12m"]:checked) .range-panel-12m {
  display: block;
}

.trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

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

.trend-legend i {
  display: inline-block;
  width: 18px;
  height: 3px;
  border-radius: 999px;
}

.legend-price {
  background: #2f6f8f;
}

.legend-full {
  background: #b84a4a;
}

.legend-cash {
  background: #9bc9a6;
}

.axis-line {
  stroke: #aab2a6;
  stroke-width: 1;
}

.grid-line {
  stroke: #dbe0d6;
  stroke-width: 1;
}

.axis-label,
.cost-label,
.point-label,
.latest-label {
  fill: #5d655e;
  font-size: 12px;
}

.cost-label,
.latest-label {
  font-weight: 700;
}

.cash-label {
  fill: #4c7b57;
}

.cash-band {
  fill: rgba(127, 174, 130, 0.24);
}

.full-cost-line {
  stroke: #b84a4a;
  stroke-width: 2;
  stroke-dasharray: 6 5;
}

.cash-cost-line {
  stroke: #6aa56d;
  stroke-width: 1.8;
  stroke-dasharray: 5 5;
}

.price-line {
  fill: none;
  stroke: #2f6f8f;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.price-dot {
  fill: #f9fbf7;
  stroke: #2f6f8f;
  stroke-width: 2;
}

.price-dot.latest {
  fill: #2f6f8f;
}

.point-label {
  fill: #243129;
  font-weight: 700;
}

.trend-readout {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.trend-readout span {
  min-width: 0;
  padding: 6px 4px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
  text-align: center;
}

.trend-readout small,
.trend-readout strong {
  display: block;
}

.trend-readout small {
  color: var(--muted);
  font-size: 11px;
}

.trend-readout strong {
  margin-top: 3px;
  font-size: 12px;
}

.daily-note {
  margin: 10px 0 0;
}

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

.ratio-cell {
  grid-column: 1 / -1;
}

.price-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 10px 0 0;
}

.price-facts div {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.price-facts dt {
  color: var(--muted);
  font-size: 11px;
}

.price-facts dd {
  margin: 3px 0 0;
  font-size: 12px;
  font-weight: 700;
}

.restock-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--green);
  background: #fafbf8;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.restock-charts {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.restock-charts h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.restock-charts .trend-chart svg {
  min-height: 190px;
}

.restock-charts .trend-readout {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.supply-panel {
  margin-top: 18px;
}

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

.supply-grid div,
.flow-step,
.assumption-box > div {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbf8;
}

.supply-grid div {
  min-height: 118px;
  padding: 14px;
}

.supply-grid span,
.flow-step span,
.assumption-box h3 {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.supply-grid strong,
.flow-step strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 22px;
  line-height: 1.15;
}

.supply-grid small,
.flow-step small,
.assumption-box p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.flow-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.flow-step {
  position: relative;
  padding: 16px 14px 14px 46px;
}

.flow-step em {
  position: absolute;
  left: 14px;
  top: 16px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.assumption-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.assumption-box > div {
  padding: 14px;
}

.assumption-box h3 {
  margin: 0 0 8px;
}

.assumption-box p {
  margin: 0;
}

.cohort-visual {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f2f4ef;
}

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

.cohort-head h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

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

.cohort-head > strong {
  padding: 7px 10px;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
}

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

.projection-step {
  position: relative;
  min-height: 104px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.projection-step::after {
  content: ">";
  position: absolute;
  right: -10px;
  top: 42px;
  color: var(--muted);
  font-weight: 700;
}

.projection-step:last-child::after {
  content: "";
}

.projection-step span,
.timeline-step small,
.cohort-assumptions span,
.cohort-card span,
.cohort-card p,
.cohort-metrics span {
  color: var(--muted);
  font-size: 12px;
}

.projection-step strong {
  display: block;
  margin: 8px 0 5px;
  font-size: 20px;
  line-height: 1.15;
}

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

.projection-step.highlight {
  border-color: rgba(47, 125, 87, 0.35);
  background: #f5fbf7;
}

.timeline-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.timeline-step {
  padding: 12px;
  border-left: 3px solid var(--blue);
  background: #fff;
}

.timeline-step em {
  display: block;
  margin-bottom: 7px;
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.timeline-step strong,
.timeline-step small {
  display: block;
}

.timeline-step strong {
  margin-bottom: 5px;
  font-size: 14px;
}

.cohort-assumptions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.cohort-assumptions span {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  line-height: 1.5;
}

.supply-mapping {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(40, 95, 134, 0.24);
  border-radius: 6px;
  background: #f7fafc;
}

.supply-baseline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.supply-baseline div,
.supply-scenario-grid article {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.supply-baseline span,
.supply-baseline small,
.supply-history-head,
.supply-history-row small,
.supply-scenario-grid span,
.supply-scenario-grid small,
.supply-scenario-grid p {
  color: var(--muted);
  font-size: 12px;
}

.supply-baseline span,
.supply-baseline strong,
.supply-baseline small,
.supply-scenario-grid span,
.supply-scenario-grid strong,
.supply-scenario-grid small {
  display: block;
}

.supply-baseline strong {
  margin: 8px 0 5px;
  font-size: 22px;
  line-height: 1.15;
}

.supply-history-table {
  display: grid;
  gap: 7px;
  overflow-x: auto;
}

.supply-history-head,
.supply-history-row {
  display: grid;
  grid-template-columns: 92px 132px 72px 1fr;
  gap: 12px;
  align-items: center;
  min-width: 720px;
}

.supply-history-head {
  font-weight: 700;
}

.supply-history-row {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.supply-history-row em {
  font-style: normal;
  font-weight: 700;
}

.supply-scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.supply-scenario-grid strong {
  margin: 8px 0 6px;
  color: var(--blue);
  font-size: 24px;
  line-height: 1.15;
}

.supply-scenario-grid p {
  margin: 8px 0 0;
  line-height: 1.55;
}

.cohort-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.cohort-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbf8;
}

.cohort-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.cohort-card-head strong {
  font-size: 18px;
  white-space: nowrap;
}

.cohort-card-head span {
  text-align: right;
  line-height: 1.4;
}

.cohort-metrics {
  display: grid;
  gap: 9px;
  margin: 12px 0;
}

.cohort-metrics div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px;
  align-items: baseline;
}

.cohort-metrics strong {
  font-size: 13px;
  line-height: 1.35;
}

.cohort-card p {
  margin: 0;
  line-height: 1.55;
}

.offset-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(40, 95, 134, 0.24);
  border-radius: 6px;
  background: #f7fafc;
}

.offset-summary {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 14px;
}

.offset-summary h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.offset-summary p,
.offset-judgement {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.offset-summary > strong {
  padding: 7px 10px;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
}

.offset-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.offset-kpis div {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.offset-kpis span,
.offset-kpis small,
.offset-row small,
.offset-head {
  color: var(--muted);
  font-size: 12px;
}

.offset-kpis span,
.offset-kpis strong,
.offset-kpis small {
  display: block;
}

.offset-kpis strong {
  margin: 8px 0 5px;
  font-size: 24px;
  line-height: 1.1;
}

.offset-table {
  display: grid;
  gap: 7px;
  overflow-x: auto;
}

.offset-head,
.offset-row {
  display: grid;
  grid-template-columns: 86px 150px 134px 1fr;
  gap: 12px;
  align-items: center;
  min-width: 720px;
}

.offset-head {
  font-weight: 700;
}

.offset-row {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.offset-row strong {
  color: var(--blue);
}

.offset-row em {
  color: var(--green);
  font-style: normal;
  font-weight: 700;
}

.offset-judgement {
  margin-top: 12px;
  padding: 11px 12px;
  border-left: 3px solid var(--blue);
  background: #fff;
}

.metric-card {
  padding: 18px;
  min-height: 154px;
}

.metric-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.metric-head em {
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 26px;
  line-height: 1.1;
}

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

.tone-good {
  border-top: 4px solid var(--green);
}

.tone-warn {
  border-top: 4px solid var(--amber);
}

.tone-bad {
  border-top: 4px solid var(--red);
}

.tone-neutral {
  border-top: 4px solid var(--blue);
}

.sentiment-panel {
  margin-top: 18px;
}

.sentiment-summary {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 14px;
  align-items: stretch;
}

.sentiment-score,
.sentiment-summary p,
.sentiment-card,
.threshold-grid div {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbf8;
}

.sentiment-score {
  padding: 16px;
}

.sentiment-score span,
.sentiment-score small,
.sentiment-card-head span,
.sentiment-card p,
.threshold-grid span,
.threshold-grid small,
.evidence-head,
.evidence-row span,
.evidence-row small,
.sentiment-method {
  color: var(--muted);
  font-size: 12px;
}

.sentiment-score span,
.sentiment-score strong,
.sentiment-score small {
  display: block;
}

.sentiment-score strong {
  margin: 8px 0 4px;
  color: var(--red);
  font-size: 42px;
  line-height: 1;
}

.sentiment-summary p {
  margin: 0;
  padding: 16px;
  font-size: 13px;
  line-height: 1.7;
}

.sentiment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.sentiment-card {
  padding: 14px;
}

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

.sentiment-card-head strong {
  font-size: 15px;
}

.sentiment-bar {
  height: 8px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: #e7ece8;
  overflow: hidden;
}

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

.sentiment-card.tone-bad .sentiment-bar i {
  background: var(--red);
}

.sentiment-card.tone-good .sentiment-bar i {
  background: var(--green);
}

.sentiment-card.tone-neutral .sentiment-bar i {
  background: var(--blue);
}

.sentiment-card p {
  margin: 0;
  line-height: 1.55;
}

.threshold-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.threshold-grid div {
  padding: 14px;
}

.threshold-grid span,
.threshold-grid strong,
.threshold-grid small {
  display: block;
}

.threshold-grid strong {
  margin: 8px 0 6px;
  font-size: 22px;
}

.evidence-table {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  overflow-x: auto;
}

.evidence-head,
.evidence-row {
  display: grid;
  grid-template-columns: 110px 150px 1fr 110px 72px;
  gap: 12px;
  align-items: center;
  min-width: 860px;
}

.evidence-head {
  font-weight: 700;
}

.evidence-row {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.evidence-row strong,
.evidence-row em,
.evidence-row b {
  font-size: 12px;
}

.evidence-row em {
  color: var(--blue);
  font-style: normal;
}

.evidence-row b {
  color: var(--ink);
}

.sentiment-method {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--amber);
  background: #fff;
  line-height: 1.55;
}

.clearance-panel {
  margin-top: 18px;
}

.clearance-summary {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 14px;
  align-items: stretch;
}

.clearance-score,
.clearance-summary p,
.clearance-thresholds div,
.clearance-card,
.availability-grid div {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbf8;
}

.clearance-score {
  padding: 16px;
}

.clearance-score span,
.clearance-score small,
.clearance-thresholds span,
.clearance-thresholds small,
.clearance-card span,
.clearance-card small,
.clearance-card p,
.sample-head,
.sample-row span,
.sample-row small,
.availability-grid span,
.availability-grid small {
  color: var(--muted);
  font-size: 12px;
}

.clearance-score span,
.clearance-score strong,
.clearance-score small,
.clearance-thresholds span,
.clearance-thresholds strong,
.clearance-thresholds small,
.clearance-card span,
.clearance-card strong,
.clearance-card small,
.availability-grid span,
.availability-grid strong,
.availability-grid small {
  display: block;
}

.clearance-score strong {
  margin: 8px 0 4px;
  color: var(--amber);
  font-size: 42px;
  line-height: 1;
}

.clearance-summary p {
  margin: 0;
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.clearance-thresholds,
.availability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.clearance-thresholds div,
.availability-grid div {
  padding: 14px;
}

.clearance-thresholds strong,
.availability-grid strong {
  margin: 8px 0 6px;
  font-size: 18px;
  line-height: 1.25;
}

.clearance-columns {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 14px;
  margin-top: 16px;
}

.clearance-columns h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.clearance-card {
  padding: 14px;
  margin-bottom: 9px;
}

.clearance-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 6px;
}

.clearance-card strong {
  text-align: right;
  font-size: 18px;
}

.clearance-card p {
  margin: 8px 0 0;
  line-height: 1.55;
}

.sample-signal-table {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  overflow-x: auto;
}

.sample-head,
.sample-row {
  display: grid;
  grid-template-columns: 150px 128px 128px 1fr;
  gap: 12px;
  align-items: center;
  min-width: 820px;
}

.sample-head {
  font-weight: 700;
}

.sample-row {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.sample-row strong,
.sample-row em {
  font-size: 12px;
}

.sample-row em {
  color: var(--blue);
  font-style: normal;
  font-weight: 700;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

.panel {
  padding: 20px;
}

.wide {
  grid-row: span 2;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.monthly-table {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.monthly-head,
.monthly-row {
  display: grid;
  grid-template-columns: 74px 64px 64px 72px 64px 86px;
  gap: 10px;
  align-items: center;
  min-width: 640px;
  font-size: 13px;
}

.monthly-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.monthly-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.monthly-row strong {
  color: var(--green);
}

.monthly-row em {
  font-style: normal;
  font-weight: 700;
}

.gap-positive {
  color: var(--green);
}

.gap-negative {
  color: var(--red);
}

.monthly-bars {
  position: relative;
  grid-column: 1 / -1;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f2f4ef;
  overflow: hidden;
}

.monthly-bars i {
  position: absolute;
  left: 0;
  display: flex;
  align-items: center;
  min-width: 78px;
  height: 15px;
  padding-left: 6px;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.monthly-bars .wens {
  top: 20px;
  background: var(--blue);
}

.monthly-bars i:first-child {
  top: 4px;
}

.monthly-bars .cost-line {
  top: 0;
  width: 2px !important;
  min-width: 2px;
  height: 42px;
  padding-left: 0;
  background: var(--red);
  overflow: visible;
}

.monthly-bars .cost-line b {
  position: absolute;
  top: 2px;
  left: 5px;
  color: var(--red);
  font-weight: 700;
  white-space: nowrap;
}

.chart-readme {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #fafbf8;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

.legend i {
  display: inline-block;
  width: 18px;
  height: 7px;
  margin-right: 6px;
  background: var(--green);
}

.legend .peer {
  background: var(--blue);
}

.legend .cost {
  width: 2px;
  height: 13px;
  background: var(--red);
}

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

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

.profit-title.compact {
  margin-top: 16px;
}

.profit-title h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.profit-title p,
.profit-title span,
.profit-note,
.profit-forecast small,
.profit-forecast p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.profit-title p,
.profit-note,
.profit-forecast p {
  margin: 0;
}

.profit-title span {
  padding: 6px 9px;
  border: 1px solid rgba(40, 95, 134, 0.2);
  border-radius: 6px;
  background: #f6f8f4;
  white-space: nowrap;
}

.profit-table {
  display: grid;
  gap: 7px;
  overflow-x: auto;
}

.profit-head,
.profit-row {
  display: grid;
  grid-template-columns: 82px 104px 66px 62px 104px 104px;
  gap: 12px;
  align-items: center;
  min-width: 640px;
}

.profit-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.profit-row {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
}

.profit-row em {
  font-style: normal;
  font-weight: 700;
}

.profit-positive {
  color: var(--green);
}

.profit-negative {
  color: var(--red);
}

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

.profit-forecast-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbf8;
}

.profit-forecast span,
.profit-forecast strong,
.profit-forecast small {
  display: block;
}

.profit-forecast span {
  color: var(--muted);
  font-size: 12px;
}

.profit-forecast strong {
  margin: 6px 0;
  color: var(--blue);
  font-size: 18px;
  line-height: 1.2;
}

.profit-note {
  margin-top: 12px;
  padding-left: 10px;
  border-left: 3px solid var(--amber);
}

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

.cost-stack div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbf8;
}

.cost-stack strong {
  display: block;
  margin: 7px 0 4px;
  font-size: 28px;
}

.cost-stack .head-profit.negative {
  border-color: rgba(177, 58, 46, 0.35);
  background: #fff8f6;
}

.cost-stack .head-profit.negative strong {
  color: var(--red);
}

.cost-stack .head-profit.positive {
  border-color: rgba(47, 125, 87, 0.35);
  background: #f5fbf7;
}

.cost-stack .head-profit.positive strong {
  color: var(--green);
}

.cost-stack p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

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

.forecast-list li {
  padding-left: 14px;
  border-left: 3px solid var(--green);
}

.forecast-list strong,
.forecast-list span,
.forecast-list small {
  display: block;
}

.forecast-list span {
  margin: 5px 0;
  line-height: 1.5;
}

.watch-panel {
  margin-top: 16px;
}

.industry-brief-panel {
  margin-top: 16px;
}

.industry-conclusion {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-left: 3px solid var(--blue);
  background: #f5f8fb;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
}

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

.industry-news-card {
  display: grid;
  gap: 9px;
  min-height: 184px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.industry-news-card:hover {
  border-color: rgba(40, 95, 134, 0.45);
  background: #fbfdff;
}

.industry-news-meta,
.industry-news-card footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.industry-news-meta {
  color: var(--muted);
  font-size: 12px;
}

.industry-news-meta time {
  margin-left: auto;
}

.news-level {
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.news-level-官方 {
  background: #e5f1eb;
  color: var(--green);
}

.news-level-专业机构 {
  background: #e9f0f7;
  color: var(--blue);
}

.news-level-行业媒体 {
  background: #f5eee0;
  color: #8d5e10;
}

.industry-news-card h3,
.industry-news-card p {
  margin: 0;
}

.industry-news-card h3 {
  font-size: 15px;
  line-height: 1.45;
}

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

.industry-news-card footer {
  align-self: end;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.industry-news-card footer em {
  color: var(--blue);
  font-style: normal;
  font-weight: 700;
}

.industry-method {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.forward-data-panel {
  margin-top: 16px;
}

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

.forward-summary > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf8;
}

.forward-summary > div:first-child {
  border-left: 3px solid var(--red);
}

.forward-summary > div:last-child {
  border-left: 3px solid var(--green);
}

.forward-summary span,
.forward-summary p,
.forward-indicator small,
.forward-indicator footer {
  color: var(--muted);
  font-size: 12px;
}

.forward-summary strong,
.forward-summary p {
  display: block;
}

.forward-summary strong {
  margin: 6px 0;
  font-size: 17px;
}

.forward-summary p {
  margin: 0;
  line-height: 1.55;
}

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

.forward-indicator {
  display: grid;
  gap: 8px;
  min-height: 220px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.forward-indicator:hover {
  border-color: rgba(40, 95, 134, 0.45);
  background: #fbfdff;
}

.forward-card-head,
.forward-tags {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.forward-card-head > span {
  color: var(--muted);
  font-size: 12px;
}

.forward-card-head b,
.forward-tags span,
.forward-tags em {
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.confidence-高 {
  background: #e5f1eb;
  color: var(--green);
}

.confidence-中 {
  background: #e9f0f7;
  color: var(--blue);
}

.confidence-低 {
  background: #f5eee0;
  color: #8d5e10;
}

.forward-indicator > strong {
  color: var(--blue);
  font-size: 20px;
  line-height: 1.25;
}

.forward-tags {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.forward-tags span {
  background: #f1f3f0;
  color: var(--muted);
}

.forward-tags em {
  background: #e7f0f7;
  color: var(--blue);
}

.forward-indicator p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.forward-indicator footer {
  align-self: end;
  line-height: 1.5;
}

.forward-gaps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.forward-gaps > div {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #fafbf8;
}

.forward-gaps span {
  color: #8d5e10;
  font-size: 11px;
  font-weight: 700;
}

.forward-gaps strong {
  font-size: 13px;
}

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

.watch-summary {
  max-width: 980px;
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

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

.watch-group {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbf8;
  overflow: hidden;
}

.watch-group-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f2f4ef;
}

.watch-group-head strong {
  color: var(--blue);
  font-size: 16px;
}

.watch-group-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
}

.watch-items {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.watch-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(37, 49, 41, 0.08);
  border-radius: 6px;
  background: #ffffff;
}

.watch-item div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.watch-item span {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e6efe9;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.watch-item strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.watch-item p,
.watch-item small,
.watch-item em {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.watch-item p {
  color: var(--ink);
}

.watch-item em {
  font-style: normal;
}

.source-panel {
  margin-top: 16px;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.source-grid a {
  display: grid;
  gap: 6px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbf8;
}

.source-grid span {
  font-weight: 700;
}

@media (max-width: 920px) {
  .dashboard-shell {
    padding: 18px;
  }

  .topbar,
  .content-grid,
  .metric-grid,
  .daily-board,
  .sentiment-summary,
  .sentiment-grid,
  .threshold-grid,
  .clearance-summary,
  .clearance-thresholds,
  .clearance-columns,
  .availability-grid,
  .supply-grid,
  .flow-track,
  .projection-chain,
  .timeline-strip,
  .cohort-assumptions,
  .cohort-grid,
  .offset-kpis,
  .supply-baseline,
  .supply-scenario-grid,
  .assumption-box,
  .profit-forecast-grid,
  .watch-grid,
  .industry-news-grid,
  .forward-summary,
  .forward-indicator-grid,
  .forward-gaps,
  .source-grid {
    grid-template-columns: 1fr;
  }

  .watch-group-head,
  .watch-item div {
    display: grid;
  }

  .watch-group-head span {
    text-align: left;
  }

  .cohort-head,
  .offset-summary {
    display: grid;
  }

  .projection-step::after {
    content: "";
  }

  .daily-price-row,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .trend-chart {
    padding: 10px;
  }

  .trend-chart svg {
    min-height: 230px;
  }

  .trend-readout {
    grid-template-columns: repeat(2, 1fr);
  }

  .signal-strip {
    grid-template-columns: 1fr;
  }

  .signal-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  h1 {
    font-size: 34px;
  }
}

}
