:root {
  color: #1f2933;
  background: #edf2f7;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; }

.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.topbar, .headline, .metrics, .split {
  display: flex;
  gap: 24px;
}

.topbar {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.eyebrow, .label {
  color: #486581;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 6px;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 28px; }
h2 { font-size: 28px; margin-bottom: 10px; }
h3 { font-size: 16px; margin-bottom: 16px; }

.api-control { display: flex; gap: 8px; }
input {
  width: 280px;
  border: 1px solid #9fb3c8;
  border-radius: 4px;
  padding: 10px;
  font: inherit;
}
button {
  border: 0;
  border-radius: 4px;
  background: #0f609b;
  color: #fff;
  cursor: pointer;
  font: inherit;
  padding: 10px 16px;
}

.status, .headline, .metrics article, .split > div, .etf-strategy, .analysis {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

.status { padding: 16px; color: #486581; }
.hidden { display: none; }
.headline { align-items: center; justify-content: space-between; padding: 28px; margin-bottom: 18px; }
.headline p { color: #486581; margin-bottom: 0; }
.score { color: #0f609b; font-size: 52px; font-weight: 700; white-space: nowrap; }
.score small { color: #486581; font-size: 16px; font-weight: 400; }

.metrics { margin-bottom: 18px; }
.metrics article { flex: 1; padding: 18px; }
.metrics p { color: #627d98; font-size: 13px; margin-bottom: 10px; }
.metrics strong { font-size: 20px; }
.split { align-items: stretch; margin-bottom: 18px; }
.split > div { flex: 1; padding: 22px; }

.etf-strategy { display: grid; gap: 12px 24px; grid-template-columns: 1fr auto; margin-bottom: 18px; padding: 22px; }
.etf-strategy h3 { margin-bottom: 6px; }
.etf-strategy p { color: #486581; margin-bottom: 0; }
.etf-amount { color: #0f609b; text-align: right; }
.etf-amount span { color: #627d98; display: block; font-size: 13px; margin-bottom: 4px; }
.etf-amount strong { font-size: 24px; }
.etf-strategy > p { grid-column: 1 / -1; }

.factor-row { display: grid; gap: 8px; grid-template-columns: 48px 1fr 44px; align-items: center; margin-bottom: 14px; }
.bar { background: #d9e2ec; height: 8px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: #0f609b; }

dl { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin: 0; }
dt { color: #627d98; }
dd { font-weight: 700; margin: 0; }
.analysis { line-height: 1.75; padding: 22px; white-space: pre-line; }

@media (max-width: 720px) {
  .topbar, .headline, .metrics, .split { flex-direction: column; }
  .api-control, input { width: 100%; }
  .score { font-size: 42px; }
  .etf-strategy { grid-template-columns: 1fr; }
  .etf-amount { text-align: left; }
}
