/* ============================================================
   SB-01 메인. 2026-08-18 시안 반영 — 라운드 카드 레이아웃.
   색·간격은 tokens.css 의 --wd-* 만 참조한다.
   ============================================================ */

/* ---------- ① 히어로 ---------- */
.hm-hero { padding-block: 20px 0; background: var(--wd-surface-white); }
.hm-hero__box {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 56px; align-items: center;
  padding: 76px 60px;
  border-radius: var(--wd-radius-xl);
  color: #fff;
  background:
    radial-gradient(760px 420px at 88% 8%, rgba(47, 185, 154, 0.34), transparent 60%),
    radial-gradient(620px 460px at 4% 108%, rgba(47, 185, 154, 0.20), transparent 62%),
    linear-gradient(120deg, #0b2b6b 0%, var(--wd-primary) 52%, #1c62c4 100%);
}
/* 배경 도트 — 장식은 이 한 겹까지만 (설계서 SB-07 '과하지 않게') */
.hm-hero__box::after {
  content: ""; position: absolute; right: -60px; bottom: -80px; width: 560px; height: 360px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.30) 1.4px, transparent 1.5px);
  background-size: 15px 15px;
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
  mask-image: radial-gradient(closest-side, #000, transparent);
  opacity: 0.55; pointer-events: none;
}
.hm-hero__col { position: relative; z-index: 1; min-width: 0; }

.hm-hero__title {
  font-size: clamp(30px, 4.2vw, 52px); font-weight: 800;
  letter-spacing: -0.045em; line-height: 1.16;
}
.hm-hero__desc {
  margin-top: 16px; font-size: 17px; line-height: 1.6;
  color: rgba(255, 255, 255, 0.80);
}

.hm-hero__search {
  margin-top: 32px; max-width: 520px;
  display: flex; align-items: center; gap: 8px;
  background: #fff; padding: 8px 8px 8px 10px;
  border-radius: var(--wd-radius-full);
  box-shadow: 0 18px 44px rgba(4, 14, 34, 0.30);
}
.hm-hero__search input {
  flex: 1 1 auto; min-width: 0; border: 0; outline: none;
  padding: 0 12px 0 16px; font-size: 16px; color: var(--wd-text-primary); background: transparent;
}
.hm-hero__search input::placeholder { color: var(--wd-text-muted); }
.hm-hero__search button {
  flex: 0 0 auto; width: 50px; height: 50px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--wd-radius-full);
  background: var(--wd-primary); color: #fff;
  transition: background var(--wd-dur-fast) var(--wd-ease);
}
.hm-hero__search button:hover { background: var(--wd-primary-hover); }
/* 포커스 표시는 입력칸 안쪽 사각형 대신 알약 전체에 링으로 준다 (접근성 유지) */
.hm-hero__search input:focus,
.hm-hero__search input:focus-visible { outline: none; box-shadow: none; }
.hm-hero__search:focus-within {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55), 0 18px 44px rgba(4, 14, 34, 0.30);
}

.hm-hero__keys {
  margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px;
}
.hm-hero__keys > span { color: rgba(255, 255, 255, 0.60); margin-right: 6px; }
.hm-hero__keys a {
  padding: 7px 15px; border-radius: var(--wd-radius-full);
  border: 1px solid rgba(255, 255, 255, 0.30); color: rgba(255, 255, 255, 0.90);
  transition: all var(--wd-dur-fast) var(--wd-ease);
}
.hm-hero__keys a:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.60); }

/* 히어로 대표 지표 카드 */
.hm-hero__col--card { display: flex; justify-content: flex-end; }
.hm-hero__card {
  display: block; width: 100%; padding: 26px 26px 20px;
  border-radius: var(--wd-radius-lg);
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  color: #fff;
  transition: all var(--wd-dur) var(--wd-ease);
}
.hm-hero__card:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-3px); }
.hm-hero__card-title { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.hm-hero__card-sub { margin-top: 4px; font-size: 12.5px; color: rgba(255, 255, 255, 0.66); }
.hm-hero__card-value { margin-top: 14px; display: flex; align-items: baseline; gap: 4px; }
.hm-hero__card-value b {
  font-family: var(--wd-font-num); font-size: 46px; font-weight: 700;
  line-height: 1; letter-spacing: -0.03em; color: var(--wd-secondary);
}
.hm-hero__card-value span { font-size: 15px; color: rgba(255, 255, 255, 0.80); }
.hm-hero__card-chart { margin-top: 10px; }
.hm-hero__card-foot {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px;
  font-size: 11.5px; color: rgba(255, 255, 255, 0.62);
}
.hm-hero__card-foot b { font-weight: 400; color: rgba(255, 255, 255, 0.35); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 1080px) {
  .hm-hero__box { grid-template-columns: 1fr; gap: 36px; padding: 52px 36px; }
  .hm-hero__col--card { justify-content: stretch; }
}
@media (max-width: 640px) {
  .hm-hero { padding-block: 12px 0; }
  .hm-hero__box { padding: 40px 22px; border-radius: var(--wd-radius-lg); }
  .hm-hero__search { padding: 6px; }
  .hm-hero__search button { width: 44px; height: 44px; }
}

/* ---------- ② 지금 주목할 데이터 ---------- */
.hm-kpi { background: var(--wd-surface-white); padding-block: 72px 8px; }
.hm-kpi .wd-sec-head { margin-bottom: 28px; }
.hm-kpi .wd-sec-desc { margin-top: 8px; font-size: 14.5px; }
.hm-kpi__link { display: block; }
.hm-kpi__link .dv-mini {
  height: 100%; display: flex; flex-direction: column;
  padding: 24px 22px 18px;
  border-radius: var(--wd-radius-lg);
  border: 1px solid var(--kpi-line);
  background: var(--kpi-soft);
  box-shadow: none;
}
.hm-kpi__link:hover .dv-mini { border-color: var(--kpi); transform: translateY(-3px); box-shadow: var(--wd-shadow-card); }

.hm-kpi__link.is-c1 { --kpi: var(--wd-kpi-1); --kpi-soft: var(--wd-kpi-1-soft); --kpi-line: var(--wd-kpi-1-line); }
.hm-kpi__link.is-c2 { --kpi: var(--wd-kpi-2); --kpi-soft: var(--wd-kpi-2-soft); --kpi-line: var(--wd-kpi-2-line); }
.hm-kpi__link.is-c3 { --kpi: var(--wd-kpi-3); --kpi-soft: var(--wd-kpi-3-soft); --kpi-line: var(--wd-kpi-3-line); }
.hm-kpi__link.is-c4 { --kpi: var(--wd-kpi-4); --kpi-soft: var(--wd-kpi-4-soft); --kpi-line: var(--wd-kpi-4-line); }

.hm-kpi .dv-mini__cat { font-size: 12px; font-weight: 700; color: var(--kpi); }
.hm-kpi .dv-mini__title { margin-top: 6px; font-size: 15.5px; font-weight: 700; color: var(--wd-text-primary); }
.hm-kpi .dv-mini__value { margin-top: 14px; flex-wrap: wrap; row-gap: 6px; }
.hm-kpi .dv-mini__value b {
  font-family: var(--wd-font-num);
  font-size: clamp(30px, 3.2vw, 38px); line-height: 1.05; color: var(--kpi);
}
.hm-kpi .dv-mini__value span { font-family: var(--wd-font-num); font-size: 12px; }
/* 최신값이 시계열 최저/최고일 때만 켜지는 강조 — 데이터 영역이라 pop 액센트 허용 */
.hm-kpi .dv-mini.is-extreme .dv-mini__value b { color: var(--wd-pop); }
.hm-kpi__flag,
.hm-kpi__delta {
  display: inline-block;
  font-family: var(--wd-font-num); font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em;
  padding: 3px 7px; border-radius: var(--wd-radius-full); vertical-align: 3px;
}
.hm-kpi__flag { color: var(--wd-pop); background: var(--wd-pop-soft); border: 1px solid var(--wd-pop-line); }
.hm-kpi__delta.is-down { color: var(--wd-pop); background: var(--wd-pop-soft); }
.hm-kpi__delta.is-up { color: var(--wd-primary); background: var(--wd-primary-100); }

.hm-kpi .dv-mini__chart { flex: 1 1 auto; min-height: 80px; margin-top: 12px; }
.hm-kpi .dv-mini__foot-row {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--kpi-line);
  font-size: 11.5px; line-height: 1.6; color: var(--wd-text-tertiary);
}
.hm-kpi .dv-mini__src { background: none; border: 0; padding: 0; margin: 0; }
.hm-kpi .dv-mini__src b { font-weight: 400; color: var(--wd-text-disabled); }
.hm-kpi .dv-mini__upd { color: var(--wd-text-muted); }

/* ---------- ③ 새로 나온 자료 · ④ 새소식 ---------- */
.hm-latest { background: var(--wd-surface-white); }
.hm-latest__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px;
}
.hm-latest__head .wd-sec-title { font-size: clamp(24px, 2.6vw, 32px); }
.hm-latest__more { font-size: 13.5px; font-weight: 600; color: var(--wd-text-tertiary); white-space: nowrap; }
.hm-latest__more:hover { color: var(--wd-primary); }

.hm-latest__grid { display: grid; grid-template-columns: 1.34fr 1fr; gap: 24px; align-items: start; }
.hm-latest__box {
  padding: 8px 26px; border: 1px solid var(--wd-border-light);
  border-radius: var(--wd-radius-lg); background: var(--wd-surface-white);
  box-shadow: 0 6px 20px rgba(10, 26, 58, 0.04);
}
.hm-latest__box--news { padding: 22px 26px 8px; background: var(--wd-surface-light); border-color: var(--wd-border-light); }

.hm-latest__list li + li,
.hm-news__list li + li { border-top: 1px solid var(--wd-border-light); }
.hm-latest__list a,
.hm-latest__list .is-row-disabled {
  /* [분류 · 제목 · 유형 · 날짜 · 화살표] — 메인은 유형을 숨겨 4칸으로 쓴다 */
  display: grid; grid-template-columns: 74px 1fr auto auto 22px; align-items: center; gap: 16px;
  padding: 16px 4px; transition: background var(--wd-dur-fast) var(--wd-ease);
}
.hm-latest__list a:hover { background: var(--wd-primary-50); }
.hm-latest__list .is-row-disabled { color: var(--wd-text-muted); cursor: default; }
.hm-latest__cat {
  font-size: 12px; font-weight: 700; padding: 5px 0; text-align: center;
  border-radius: var(--wd-radius-full);
  color: var(--wd-tint-blue-ink); background: var(--wd-tint-blue);
}
.hm-latest__cat.is-mint { color: var(--wd-tint-mint-ink); background: var(--wd-tint-mint); }
.hm-latest__cat.is-blue { color: var(--wd-tint-blue-ink); background: var(--wd-tint-blue); }
.hm-latest__cat.is-amber { color: var(--wd-tint-amber-ink); background: var(--wd-tint-amber); }
.hm-latest__cat.is-violet { color: var(--wd-tint-violet-ink); background: var(--wd-tint-violet); }
.is-row-disabled .hm-latest__cat { color: var(--wd-text-muted); background: var(--wd-surface-subtle); }
.hm-latest__title { font-size: 15.5px; font-weight: 600; letter-spacing: -0.02em; }
.hm-latest__date { font-family: var(--wd-font-secondary); font-size: 12.5px; color: var(--wd-text-muted); }
.hm-latest__go { font-size: 15px; color: var(--wd-text-disabled); text-align: right; transition: all var(--wd-dur-fast) var(--wd-ease); }
.hm-latest__list a:hover .hm-latest__go,
.hm-news__list a:hover .hm-latest__go { color: var(--wd-primary); transform: translateX(2px); }
/* 시안 기준 목록은 [분류 · 제목 · 날짜] 3요소다. 자료 유형은 상세·목록 화면에서 본다. */
.hm-latest .hm-latest__type { display: none; }

.hm-news__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding-bottom: 14px; margin-bottom: 2px;
}
.hm-news__title-head { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; }
.hm-news__list a {
  display: grid; grid-template-columns: 1fr 22px; align-items: center; gap: 12px;
  padding: 15px 2px; transition: color var(--wd-dur-fast) var(--wd-ease);
}
.hm-news__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hm-news__date { font-family: var(--wd-font-secondary); font-size: 12.5px; color: var(--wd-text-muted); }
.hm-news__title { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.hm-news__list a:hover .hm-news__title { color: var(--wd-primary); }

@media (max-width: 1080px) { .hm-latest__grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .hm-latest__box { padding-inline: 18px; }
  .hm-latest__list a, .hm-latest__list .is-row-disabled {
    grid-template-columns: 66px 1fr 20px; grid-template-areas: 'cat title go' 'meta meta go';
    row-gap: 6px; gap: 12px;
  }
  .hm-latest__cat { grid-area: cat; align-self: start; }
  .hm-latest__title { grid-area: title; }
  /* 유형·날짜는 같은 줄의 좌·우 끝 */
  .hm-latest__type { grid-area: meta; justify-self: start; }
  .hm-latest__date { grid-area: meta; justify-self: end; }
  .hm-latest__go { grid-area: go; }
}

/* ---------- ⑤ 주제별로 살펴보기 ---------- */
.hm-short { background: var(--wd-surface-white); padding-bottom: calc(var(--wd-sec-y) + 8px); }
.hm-short .wd-sec-head { margin-bottom: 24px; }
.hm-short__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.hm-short__card {
  display: flex; flex-direction: column; gap: 8px;
  min-height: 232px; padding: 26px 20px 20px;
  border: 1px solid var(--wd-border-light); border-radius: var(--wd-radius-lg);
  background: linear-gradient(180deg, var(--tint) 0%, var(--wd-surface-white) 78%);
  transition: all var(--wd-dur) var(--wd-ease);
}
a.hm-short__card:hover { border-color: var(--tint-ink); box-shadow: var(--wd-shadow-card); transform: translateY(-3px); }
.hm-short__card.is-t1 { --tint: var(--wd-tint-mint);   --tint-ink: var(--wd-tint-mint-ink); }
.hm-short__card.is-t2 { --tint: var(--wd-tint-blue);   --tint-ink: var(--wd-tint-blue-ink); }
.hm-short__card.is-t3 { --tint: var(--wd-tint-amber);  --tint-ink: var(--wd-tint-amber-ink); }
.hm-short__card.is-t4 { --tint: var(--wd-tint-violet); --tint-ink: var(--wd-tint-violet-ink); }
.hm-short__card.is-t5 { --tint: var(--wd-tint-sky);    --tint-ink: var(--wd-tint-sky-ink); }
.hm-short__card.is-t6 { --tint: var(--wd-tint-rose);   --tint-ink: var(--wd-tint-rose-ink); }

.hm-short__icon { display: block; margin-bottom: 10px; color: var(--tint-ink); }
.hm-short__label { font-size: 17px; font-weight: 700; letter-spacing: -0.03em; color: var(--wd-text-primary); }
.hm-short__desc { font-size: 13px; line-height: 1.6; color: var(--wd-text-tertiary); }
.hm-short__go {
  margin-top: auto; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--wd-border-default); border-radius: var(--wd-radius-full);
  color: var(--wd-text-secondary); background: var(--wd-surface-white);
  transition: all var(--wd-dur-fast) var(--wd-ease);
}
a.hm-short__card:hover .hm-short__go { border-color: var(--tint-ink); color: var(--tint-ink); }
.hm-short__card.is-off { opacity: 0.62; }
.hm-short__card.is-off .hm-short__go {
  width: auto; padding: 0 10px; font-size: 11.5px; font-weight: 600; color: var(--wd-text-muted);
}

@media (max-width: 1080px) { .hm-short__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) {
  .hm-short__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hm-short__card { min-height: 200px; padding: 20px 16px 16px; }
}
