:root {
  --bg: #f4efe3;
  --bg-deep: #ece4d2;
  --card: #fffdf7;
  --ink: #182338;
  --ink-soft: #4b5670;
  --ink-faint: #7c869c;
  --line: rgba(24, 35, 56, 0.10);
  --gold: #a9762e;
  --up: #1f7a4d;
  --down: #b3382a;
  --accent-line: #a9762e;
  --font-kr: "PretendardVariable", "Pretendard", -apple-system, sans-serif;
  --font-display: "Space Grotesk", var(--font-kr);
}

body.up { --accent-line: #1f7a4d; }
body.down { --accent-line: #b3382a; }
body.flat { --accent-line: #a9762e; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-kr);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- topbar ---- */
.topbar {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-soft);
}
.topbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 24px;
  flex-wrap: wrap;
}
.topbar__brand-mini {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}

/* ---- hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1100px 500px at 15% -10%, rgba(169,118,46,0.10), transparent 60%),
    linear-gradient(180deg, var(--bg-deep), var(--bg) 70%);
  border-bottom: 1px solid var(--line);
  padding-top: 8px;
}
.hero__chart {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
}
.hero__grid line {
  stroke: var(--line);
  stroke-width: 1;
}
.hero__line {
  stroke: var(--accent-line);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: draw-line 1.6s ease-out 0.15s forwards;
}
.hero__area { opacity: 0; animation: fade-in 1s ease-out 0.8s forwards; }

@keyframes draw-line { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .hero__line { animation: none; stroke-dashoffset: 0; }
  .hero__area { animation: none; opacity: 1; }
}

.hero__body {
  position: relative;
  padding: 44px 24px 40px;
  opacity: 0;
  transform: translateY(10px);
  animation: rise-in 0.7s ease-out 0.05s forwards;
}
@keyframes rise-in { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .hero__body { animation: none; opacity: 1; transform: none; }
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: 0.03em;
  margin: 0;
  color: var(--ink);
}
.hero__eyebrow {
  margin: 4px 0 28px;
  font-size: 14px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.score {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.score__dial {
  --pct: 50;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  flex: none;
  background: conic-gradient(var(--accent-line) calc(var(--pct) * 1%), var(--line) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
.score__dial-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px var(--line);
}
.score__num {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
}
.score__arrow {
  font-size: 18px;
  color: var(--accent-line);
  margin-top: 4px;
}
.score__text { flex: 1; min-width: 240px; }
.score__verdict {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 6px;
}
.score__summary {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
}
.score__meters { display: flex; gap: 20px; flex-wrap: wrap; }
.meter { display: flex; flex-direction: column; gap: 4px; width: 160px; }
.meter__label { font-size: 12px; color: var(--ink-faint); }
.meter__bar {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.meter__bar span {
  display: block;
  height: 100%;
  background: var(--down);
  border-radius: 3px;
}
.meter__bar--conf span { background: var(--gold); }

.reasons {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.reasons li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.reasons li::before { content: "· "; color: var(--accent-line); font-weight: 700; }

.caution {
  margin: 18px 0 0;
  font-size: 12.5px;
  color: var(--ink-faint);
}

/* ---- market strip ---- */
.strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 24px;
  padding-bottom: 8px;
}
.strip__card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.strip__label { font-size: 12px; color: var(--ink-faint); }
.strip__price { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.strip__chg { font-size: 13px; color: var(--ink-soft); }
.strip__chg.up { color: var(--up); }
.strip__chg.down { color: var(--down); }

/* ---- news ---- */
.news { padding: 32px 24px 12px; }
.news__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 12px;
  letter-spacing: 0.02em;
}
.news__empty { color: var(--ink-faint); font-size: 13.5px; }
.news__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.news__list li { border-bottom: 1px solid var(--line); }
.news__list a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 2px;
  text-decoration: none;
  color: var(--ink);
  flex-wrap: wrap;
}
.news__list a:hover .news__headline { color: var(--gold); }
.news__source {
  font-size: 11px;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  flex: none;
}
.news__headline { flex: 1; min-width: 200px; font-size: 14px; }
.news__time { font-size: 12px; color: var(--ink-faint); flex: none; }

/* ---- footer ---- */
.footer {
  padding: 20px 24px 40px;
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.6;
}
.footer p { margin: 0 0 4px; }

/* ---- mobile ---- */
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero__body { padding: 32px 16px 30px; }
  .score { gap: 20px; }
  .score__dial { width: 112px; height: 112px; }
  .score__num { font-size: 30px; }
  .strip { grid-template-columns: 1fr; }
  .news { padding: 26px 16px 8px; }
  .footer { padding: 16px 16px 32px; }
}
