:root {
  --bg: #f7f7f2;
  --ink: #1b1b1b;
  --muted: #5c5c5c;
  --accent: #2f3a2f;
  --card: #ffffff;
  --border: #e5e5dc;
}

body {
  margin: 0;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Microsoft YaHei", serif;
  background: var(--bg);
  color: var(--ink);
}

.container {
  max-width: 920px;
  margin: 40px auto 80px;
  padding: 0 20px;
}

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

.brand {
  font-size: 28px;
  margin: 0;
}

.tagline {
  color: var(--muted);
  margin-top: 6px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

label {
  font-size: 14px;
  color: var(--muted);
}

input, select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 16px;
}

button {
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e7e9df;
  color: var(--muted);
  font-size: 12px;
}

.badge-plain {
  background: #eef0e6;
  color: var(--muted);
}

.badge-good {
  background: #e1efe2;
  color: #1f6b3a;
}

.badge-mid {
  background: #f2eddc;
  color: #7a5b1e;
}

.badge-warn {
  background: #f5e7e7;
  color: #a1392f;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.value {
  font-size: 20px;
  margin-top: 6px;
}

.score-big {
  font-size: 44px;
  font-weight: 600;
  margin-top: 6px;
}

.score-anchor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list {
  padding-left: 18px;
}

.list li {
  margin-bottom: 6px;
}

.phase-block {
  margin-top: 10px;
}

.phase-name {
  font-size: 24px;
  font-weight: 600;
}

.phase-reason,
.phase-suggest {
  margin-top: 6px;
  color: var(--muted);
}

.breakdown-table {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.breakdown-table.spaced {
  margin-top: 18px;
}

.table-row {
  display: grid;
  grid-template-columns: 1.2fr 0.6fr 0.6fr 0.6fr;
  gap: 12px;
  font-size: 14px;
}

.table-row.header {
  color: var(--muted);
  font-weight: 600;
}

.bar-row {
  margin-top: -6px;
  margin-bottom: 6px;
}

.bar {
  height: 8px;
  background: #eceee5;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: #2f3a2f;
}

.bar-fill.bar-trend {
  background: #2f3a2f;
}

.bar-fill.bar-volume {
  background: #3b4a3b;
}

.bar-fill.bar-structure {
  background: #4a5a4a;
}

.rule-matrix {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.rule-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #fbfbf6;
}

.rule-item.muted {
  color: #7f7f7f;
  border-color: #e0e0d6;
  background: #f3f3ee;
}

.rule-title {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.rule-status {
  font-size: 12px;
  color: var(--muted);
  background: #eef0e6;
  padding: 2px 8px;
  border-radius: 999px;
}

.rule-detail {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

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

.chart-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.analysis-list {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.analysis-item {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fbfbf6;
}

.analysis-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.analysis-content {
  color: var(--muted);
  font-size: 14px;
}

.strategy-grid {
  margin-top: 12px;
  display: grid;
  gap: 16px;
}

.strategy-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: #fbfbf6;
}

.strategy-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.strategy-title {
  font-weight: 600;
  font-size: 16px;
}

.strategy-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.details {
  border: none;
}

.details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
}

.details summary::-webkit-details-marker {
  display: none;
}

.details summary::after {
  content: "展开";
  color: var(--muted);
  font-size: 12px;
  margin-left: 8px;
}

.details[open] summary::after {
  content: "收起";
}

.details-body {
  margin-top: 16px;
}

@media (max-width: 600px) {
  .table-row {
    grid-template-columns: 1fr;
  }

  .bar-row {
    margin-top: 4px;
  }

  .rule-matrix {
    grid-template-columns: 1fr;
  }
}

.warning {
  color: #a1392f;
}

.disclaimer {
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
}

.beian-center {
  text-align: center;
  margin-top: 8px;
}

.beian-link {
  color: var(--muted);
  text-decoration: none;
}

.beian-link:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .header {
    flex-direction: column;
  }
}
