:root {
  --bg: #f4efe7;
  --panel: rgba(255, 251, 245, 0.9);
  --ink: #1f2a2e;
  --muted: #6e7472;
  --line: #d7cdbf;
  --accent: #b34a2c;
  --accent-soft: #f2d5c3;
  --good: #237b4b;
  --shadow: 0 20px 60px rgba(59, 42, 31, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(179, 74, 44, 0.18), transparent 32%),
    radial-gradient(circle at right 20%, rgba(35, 123, 75, 0.14), transparent 28%),
    linear-gradient(180deg, #f7f1e7 0%, #f1e9dc 100%);
}

.shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.hero,
.grid {
  display: grid;
  gap: 20px;
}

.hero {
  grid-template-columns: 1.4fr 0.9fr;
  align-items: stretch;
  margin-bottom: 20px;
}

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

h1, h2 {
  margin: 0;
}

h1 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.04;
  max-width: 10ch;
}

.lead {
  max-width: 52rem;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 14px;
}

.hero-links {
  margin-top: 18px;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(179, 74, 44, 0.16);
  font-weight: 700;
}

.status-card,
.panel {
  background: var(--panel);
  border: 1px solid rgba(140, 116, 88, 0.12);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.status-card {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.status-item span,
.kpi span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.status-item strong,
.kpi strong {
  font-size: 28px;
}

.grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 20px;
}

.panel {
  padding: 22px;
}

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

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.kpi {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 245, 234, 0.9);
  border: 1px solid rgba(179, 74, 44, 0.12);
}

.query-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 12px;
  margin-top: 16px;
}

.strategy-form {
  grid-template-columns: minmax(0, 240px) auto;
}

.query-form label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

input,
button {
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  font: inherit;
}

input {
  background: #fffdf9;
  color: var(--ink);
}

button {
  align-self: end;
  background: linear-gradient(135deg, var(--accent), #d87046);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 700;
  min-width: 132px;
}

.summary {
  margin-top: 14px;
  line-height: 1.7;
}

.muted {
  color: var(--muted);
}

.chart-panel {
  overflow: hidden;
}

.chart {
  width: 100%;
  height: 260px;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,247,237,0.75));
  border-radius: 18px;
  border: 1px solid rgba(140, 116, 88, 0.12);
}

.chart-grid {
  stroke: rgba(91, 74, 58, 0.14);
  stroke-width: 1;
}

.chart-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-dot {
  fill: white;
  stroke: var(--accent);
  stroke-width: 2;
}

.table-wrap {
  overflow: auto;
}

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

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(140, 116, 88, 0.14);
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}

thead th {
  color: var(--muted);
  font-weight: 600;
  position: sticky;
  top: 0;
  background: rgba(255, 251, 245, 0.96);
}

.up {
  color: #bc3722;
}

.down {
  color: var(--good);
}

@media (max-width: 1080px) {
  .hero,
  .grid {
    grid-template-columns: 1fr;
  }

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

  button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 24px 14px 40px;
  }

  .query-form {
    grid-template-columns: 1fr;
  }

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