
:root {
  --page-bg: #ffffff;
  --paper: #ffffff;
  --ink: #222225;
  --muted: #5e6470;
  --line: #151515;
  --line-soft: #e5e5e5;
  --blue: #4569ff;
  --blue-dark: #2847d8;
  --lime: #d9ff6f;
  --mint: #9fe8dc;
  --orange: #ff7a3d;
  --pink: #ff6bb5;
  --purple: #7b4dff;
  --green: #00a862;
  --yellow: #ffd447;
  --red: #ff3d55;
  --brown: #9a5b2f;
}
* { box-sizing: border-box; }
html, body { background: var(--page-bg); }
body {
  margin: 0;
  color: var(--ink);
  font-family: ui-rounded, "Arial Rounded MT Bold", "Nunito", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0;
}
body::before {
  content: "限时数据日报 · 市场投放表现 · 刷新后查看最新生成结果";
  position: sticky;
  top: 0;
  z-index: 20;
  display: block;
  width: 100%;
  padding: 8px 16px;
  color: #1e3333;
  background: var(--mint);
  border-bottom: 2px solid var(--line);
  text-align: center;
  font-weight: 900;
  font-size: 13px;
}
.page {
  width: 100%;
  min-height: 100vh;
  padding: 0 0 56px;
  background: #fff;
}
.site-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 18px 26px;
  border-bottom: 2px solid var(--line-soft);
  background: #fff;
}
.brand {
  color: var(--blue);
  text-decoration: none;
  font-size: clamp(20px, 2.5vw, 30px);
  line-height: .92;
  font-weight: 1000;
  letter-spacing: -.05em;
  max-width: 120px;
}
.header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.generated { color: var(--muted); font-size: 11px; font-weight: 700; }
.top-nav { display: flex; gap: 26px; flex-wrap: wrap; justify-content: flex-end; }
.top-nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 3px solid transparent;
  font-size: 15px;
  font-weight: 850;
}
.top-nav a.active,
.top-nav a:hover { color: var(--blue); border-color: var(--blue); }
h1 { margin: 0; font-size: clamp(30px, 4.5vw, 56px); line-height: 1.05; }
h2 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  line-height: .98;
  font-weight: 1000;
  letter-spacing: -.04em;
}
.muted, .section-head p { color: var(--muted); margin: 8px 0 0; }
.report-summary {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0;
  padding: 0;
  border-bottom: 3px solid var(--line);
  background: var(--blue);
}
.report-summary::before {
  content: "";
  min-height: 320px;
  background:
    radial-gradient(circle at 22% 35%, var(--lime) 0 10%, transparent 10.5%),
    radial-gradient(circle at 62% 68%, var(--mint) 0 13%, transparent 13.5%),
    linear-gradient(90deg, transparent 0 20%, #111 20% 29%, transparent 29% 44%, #111 44% 53%, transparent 53%),
    repeating-linear-gradient(0deg, #fff 0 24px, #111 24px 44px);
  border-right: 3px solid var(--line);
}
.report-summary::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 22px;
  width: 96px;
  height: 68px;
  background:
    radial-gradient(circle at 50% 50%, #1f4aa8 0 15px, transparent 16px),
    linear-gradient(32deg, transparent 0 38%, #ffdf00 39% 61%, transparent 62%),
    linear-gradient(-32deg, transparent 0 38%, #ffdf00 39% 61%, transparent 62%),
    #009b3a;
  border: 3px solid var(--line);
}
.summary-date {
  position: absolute;
  right: 7%;
  top: 74px;
  width: min(440px, 42%);
  color: #fff;
  font-size: clamp(30px, 4.1vw, 50px);
  font-weight: 1000;
  line-height: .98;
  letter-spacing: -.05em;
}
.summary-major {
  grid-column: 2;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-self: end;
  padding: 210px 58px 58px;
}
.summary-major span { color: rgba(255,255,255,.88); font-weight: 900; }
.summary-stat {
  position: relative;
  min-height: 110px;
  padding: 16px;
  border: 3px solid #fff;
  border-radius: 22px;
  background: rgba(255,255,255,.13);
}
.summary-stat span { font-size: 12px; }
.summary-stat .metric-value { margin-top: 12px; padding-right: 58px; padding-bottom: 17px; }
.summary-stat strong {
  display: block;
  color: #fff;
  font-size: clamp(25px, 3.1vw, 38px);
  letter-spacing: -.04em;
  line-height: .95;
}
.panel, .kpi-card, .mini-stat-row > div {
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 24px;
  box-shadow: 8px 8px 0 rgba(0,0,0,.10);
}
.panel {
  width: min(1120px, calc(100% - 40px));
  margin: 24px auto;
  padding: 28px 32px;
  overflow: hidden;
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 20px;
}
.section-head p { font-size: 12px; font-weight: 700; }
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 12px;
  line-height: 1;
  font-weight: 1000;
  text-decoration: none;
  box-shadow: 3px 3px 0 rgba(0,0,0,.16);
}
.download-button:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 rgba(0,0,0,.18); }
.status-note {
  width: min(1120px, calc(100% - 40px));
  margin: 20px auto;
  padding: 9px 14px;
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--lime);
  font-size: 11px;
  font-weight: 800;
}
.status-note .section-head { margin: 0 0 2px; padding: 0; border: 0; display: flex; justify-content: flex-start; align-items: baseline; }
.status-note h2 { font-size: 13px; letter-spacing: 0; }
.status-note .section-head p,
.status-note .muted { font-size: 11px; line-height: 1.35; margin: 0; color: #384025; }
.status-line { margin: 3px 0; line-height: 1.45; font-size: 11px; }
.status-text { display: inline; font-weight: 850; }
.status-text.ok { color: #006b45; }
.status-text.bad { color: var(--red); }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.action-chip { border: 2px solid currentColor; border-radius: 999px; padding: 7px 11px; font-size: 11px; font-weight: 900; }
.action-chip { color: var(--chip); background: color-mix(in srgb, var(--chip) 14%, white); }
.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.kpi-grid.is-stale { opacity: .48; filter: grayscale(.35); }
.kpi-card { position: relative; display: block; padding: 16px 18px; min-height: 96px; overflow: hidden; }
.kpi-card:nth-child(4n+1) { background: #ecffb5; }
.kpi-card:nth-child(4n+2) { background: #dff7ff; }
.kpi-card:nth-child(4n+3) { background: #ffe1ef; }
.kpi-card:nth-child(4n) { background: #fff1b8; }
.kpi-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 900; }
.metric-value { position: relative; display: inline-block; margin-top: 12px; padding-right: 52px; padding-bottom: 15px; }
.kpi-card .metric-value { display: block; width: 100%; min-height: 48px; margin-top: 10px; padding: 0 0 18px; }
.kpi-card strong { display: block; color: var(--ink); font-size: clamp(20px, 2vw, 27px); line-height: .95; font-weight: 1000; letter-spacing: -.03em; overflow-wrap: anywhere; }
.delta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: auto;
  padding: 0;
  border-radius: 0;
  font-style: normal;
  font-size: 11px;
  font-weight: 1000;
  line-height: 1;
  background: transparent;
}
.metric-value .delta,
.summary-stat .delta { position: absolute; right: 0; bottom: 0; }
.kpi-card .metric-value .delta { right: 0; bottom: 1px; max-width: 100%; white-space: nowrap; }
.delta-good { color: var(--green); }
.delta-bad { color: var(--red); }
.delta-cost { color: var(--brown); }
.delta-flat { color: var(--muted); }
.kpi-delta-good { color: #00a862; }
.kpi-delta-bad { color: #e0002a; }
.kpi-delta-cost { color: var(--brown); }
.kpi-delta-flat { color: var(--muted); }
.summary-delta-good { color: #39ff14; text-shadow: 0 0 7px rgba(57,255,20,.35); }
.summary-delta-bad { color: #ff8a00; text-shadow: 0 0 7px rgba(255,138,0,.30); }
.summary-delta-cost { color: #eaff00; text-shadow: 0 0 7px rgba(234,255,0,.36); }
.summary-delta-flat { color: rgba(255,255,255,.78); }
.up { color: var(--green); } .down { color: var(--red); } .flat { color: var(--muted); }
.mini-stat-row {
  width: min(1120px, calc(100% - 40px));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px auto;
}
.mini-stat-row > div { position: relative; padding: 20px; background: var(--blue); color: #fff; }
.mini-stat-row > div:nth-child(2) { background: var(--orange); color: var(--ink); }
.mini-stat-row strong { display: block; font-size: 40px; color: inherit; font-weight: 1000; line-height: .9; }
.mini-stat-row span { color: inherit; font-weight: 900; }
.chart {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 18px;
  margin: 8px 0 18px;
}
.plotly-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  touch-action: pan-x pan-y;
  display: block;
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 18px;
  margin: 8px 0 18px;
}
.plotly-chart {
  width: 980px;
  min-width: 980px;
  height: 480px;
  min-height: 480px;
  display: block;
  background: #fff;
}
.plotly-chart .main-svg { border-radius: 15px; }
.plotly-chart .textpoint { paint-order: stroke; stroke: #fff; stroke-width: 4px; font-weight: 900; }
.panel > .chart:first-of-type { margin-top: 4px; }
.small-chart { background: #fff; }
.chart text { fill: #424242; font-size: 11px; }
.small-chart text { fill: #424242; }
.chart .chart-title { fill: var(--ink); font-size: 14px; font-weight: 1000; }
.grid-line { stroke: rgba(0,0,0,.12); stroke-width: 1; }
.axis { stroke: rgba(0,0,0,.55); stroke-width: 1.2; }
.bars rect { fill: var(--blue); stroke: var(--line); }
.cost-line { fill: none; stroke: var(--blue); stroke-width: 3; opacity: .95; }
.net-line { fill: none; stroke: var(--green); stroke-width: 3; }
.cost-dot { fill: var(--blue); }
.net-dot { fill: var(--green); }
.legend { font-size: 18px !important; font-weight: 1000; paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.legend-cost { fill: var(--blue); }
.legend-net { fill: var(--green); }
.scatter circle { opacity: .82; stroke: var(--line); stroke-width: 1.5; }
.point-label { fill: #111 !important; font-size: 10px !important; font-weight: 900; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.threshold-line { stroke: var(--pink); stroke-width: 2; stroke-dasharray: 6 5; opacity: .95; }
.threshold-label { fill: #c12f84 !important; font-size: 11px !important; font-weight: 900; }
.alert-chart circle { opacity: .86; stroke: var(--line); stroke-width: 1.5; }
.alert-details { display: grid; gap: 14px; margin-top: 16px; }
.alert-group { border-top: 3px solid var(--line); padding-top: 12px; }
.alert-group h3 { margin: 0 0 8px; font-size: 16px; font-weight: 1000; }
.alert-group ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.alert-group li { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 18px; font-size: 11px; line-height: 1.45; }
.alert-group li span { font-weight: 900; color: var(--ink); }
.alert-group li em { font-style: normal; color: var(--muted); }
.alert-group li small { display: block; margin-top: 3px; color: var(--ink); font-size: 11px; font-weight: 850; }
.level-强预警 h3 { color: var(--red); }
.level-预警 h3 { color: #ce6d00; }
.level-关注 h3 { color: #967400; }
.level-强预警 li span { color: var(--red); }
.level-预警 li span { color: #ce6d00; }
.level-关注 li span { color: #967400; }
.action-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.action-charts .chart { margin-bottom: 8px; }
.logic-list { margin: 8px 0 0; padding-left: 0; list-style: none; color: var(--muted); font-size: 11px; line-height: 1.9; }
.logic-list strong { color: var(--ink); }
.logic-badge {
  display: inline;
  min-width: 0;
  margin-right: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  text-align: left;
  line-height: 1.2;
}
.logic-increase { color: #00a862; }
.logic-down { color: #ce6d00; }
.logic-stop { color: var(--red); }
.logic-new { color: var(--blue); }
.logic-restart { color: var(--purple); }
.logic-tail { color: #7a7d00; }
.logic-line { color: #c12f84; }
.dimension-head { justify-content: space-between; align-items: center; }
.dimension-filter { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 800; }
.dimension-block { display: none; }
.dimension-block.active { display: block; }
.dimension-panel table { font-size: 12px; }
.dimension-panel th,
.dimension-panel td { padding: 7px 8px; }
.table-wrap {
  width: 100%;
  max-height: 520px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  overscroll-behavior: contain;
  border-radius: 12px;
  border: 3px solid var(--line);
  position: relative;
}
table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 860px; background: #fff; color: var(--ink); font-family: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; }
th, td { padding: 10px 12px; border-bottom: 2px solid #efefef; border-right: 2px solid #efefef; text-align: right; white-space: nowrap; }
th:first-child, td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 98px;
  text-align: left;
  background: #fff;
  box-shadow: 2px 0 0 #efefef;
}
th { color: var(--ink); font-weight: 950; background: var(--lime); position: sticky; top: 0; z-index: 3; box-shadow: 0 2px 0 var(--line); }
th:first-child { z-index: 5; background: var(--lime); box-shadow: 2px 2px 0 var(--line); }
tr:hover td { background: #f4f7ff; }
tr:hover td:first-child { background: #f4f7ff; }
details { margin: 12px 0 16px; border: 3px solid var(--line); border-radius: 18px; padding: 12px 14px; background: #fff; }
summary { cursor: pointer; color: var(--ink); font-weight: 950; }
.detail-panel {
  width: min(1120px, calc(100% - 40px));
  margin: 24px auto;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 24px;
  box-shadow: 8px 8px 0 rgba(0,0,0,.10);
}
.detail-summary { display: flex; align-items: baseline; gap: 16px; padding: 24px 34px; list-style: none; }
.detail-summary .download-button { margin-left: auto; }
.detail-summary::-webkit-details-marker { display: none; }
.detail-summary span { font-size: 26px; line-height: .98; font-weight: 1000; letter-spacing: -.04em; }
.detail-summary em { font-size: 11px; color: var(--muted); font-style: normal; font-weight: 700; }
.detail-controls { display: flex; flex-wrap: wrap; gap: 12px; padding: 0 34px 14px; }
.detail-table-wrap { display: block; margin: 0 34px 30px; width: calc(100% - 68px); max-width: 100%; min-width: 0; }
.detail-table-wrap table { min-width: 1680px; }
.detail-panel table { font-size: 11px; }
.detail-panel th,
.detail-panel td { padding: 6px 7px; }
.department-detail-panel { overflow: visible; min-width: 0; max-width: calc(100% - 40px); }
.machine-detail-block {
  margin: 18px 0 26px;
  padding: 0;
  overflow: visible;
  min-width: 0;
  max-width: 100%;
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 18px;
}
.machine-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  column-gap: 20px;
  row-gap: 10px;
  flex-wrap: wrap;
  padding: 18px 18px;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -.03em;
  font-weight: 1000;
  color: var(--blue);
}
.machine-detail-content {
  padding: 0 14px 14px;
  min-width: 0;
  max-width: 100%;
}
.machine-detail-content > .detail-table-wrap,
.channel-detail .detail-table-wrap {
  margin: 0 0 16px;
  width: 100%;
}
.channel-detail-list { display: grid; gap: 10px; margin-top: 14px; min-width: 0; max-width: 100%; }
.channel-detail {
  margin: 0;
  padding: 0;
  min-width: 0;
  max-width: 100%;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.channel-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  column-gap: 18px;
  row-gap: 9px;
  flex-wrap: wrap;
  padding: 16px 16px;
  font-weight: 1000;
  color: var(--blue);
}
.summary-metrics {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
  margin-right: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: 0;
}
.summary-metrics b {
  color: var(--ink);
  font-weight: 950;
}
.machine-summary .download-button,
.channel-summary .download-button {
  min-height: 28px;
  padding: 6px 14px;
  font-size: 11px;
  box-shadow: 2px 2px 0 rgba(0,0,0,.14);
}
.channel-detail[open] { padding-bottom: 12px; }
.channel-detail[open] .detail-table-wrap {
  margin: 0 12px 0;
  width: calc(100% - 24px);
  max-width: calc(100% - 24px);
  overflow-x: auto;
  overflow-y: auto;
}
.channel-card-list {
  display: grid;
  gap: 10px;
  margin: 0 12px;
}
.channel-day-card {
  padding: 10px;
  border: 2px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
}
.channel-day-card h4 {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.2;
}
.channel-day-card h4 span { color: var(--muted); font-size: 11px; font-weight: 850; }
.channel-day-card dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 7px;
  margin: 0;
}
.channel-metric {
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid #eeeeee;
  border-radius: 9px;
  background: #fafafa;
}
.channel-metric dt {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}
.channel-metric dd {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.filter-label { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); margin-bottom: 12px; font-weight: 800; }
select { color: var(--ink); background: #fff; border: 3px solid var(--line); border-radius: 999px; padding: 8px 12px; font-weight: 850; }
.empty { color: var(--muted); padding: 28px; border: 3px dashed var(--line); border-radius: 18px; text-align: center; }
@media (max-width: 760px) {
  body::before { position: static; }
  .site-header { display: block; padding: 16px; }
  .brand { font-size: 30px; max-width: none; }
  .header-right { align-items: stretch; margin-top: 18px; }
  .top-nav { overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; gap: 18px; }
  .top-nav a { flex: 0 0 auto; }
  .report-summary { display: block; padding: 220px 18px 24px; }
  .report-summary::before { position: absolute; inset: 0 auto auto 0; width: 100%; height: 200px; min-height: 0; border-right: 0; border-bottom: 3px solid var(--line); }
  .summary-date { position: relative; top: auto; right: auto; width: auto; color: #fff; font-size: 36px; margin-bottom: 18px; }
  .summary-major { grid-template-columns: 1fr; padding: 0; }
  .panel, .mini-stat-row, .detail-panel { width: calc(100% - 24px); }
  .mini-stat-row, .action-charts { grid-template-columns: 1fr; }
  .section-head { display: block; }
  h2 { font-size: 24px; }
  .summary-date { font-size: 32px; }
  .plotly-scroll { max-height: none; }
  .kpi-card { min-height: 92px; padding: 14px 15px; }
  .kpi-card strong { font-size: clamp(19px, 5vw, 24px); }
  table { min-width: 760px; }
  .alert-group li { grid-template-columns: 1fr; gap: 3px; }
}
