/* 주택연금 누적수령액 비교기 전용 스타일 */

.hp-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.hp-card-head .db-card__title {
  margin-bottom: 0;
}

.hp-text-btn {
  background: none;
  border: 0;
  padding: 6px 4px;
  font-size: 13px;
  font-weight: 800;
  color: var(--sub);
  text-decoration: underline;
  cursor: pointer;
}

.hp-text-btn:hover {
  color: var(--brand);
}

/* 예시 프리셋 영역 */
.hp-preset-box {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-control);
  padding: 12px;
  margin-bottom: 16px;
}

.hp-preset-sub {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.hp-preset-sub__label {
  font-size: 13px;
  font-weight: 800;
  color: var(--sub);
  margin-right: 2px;
}

.hp-preset-note {
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--sub);
  line-height: 1.45;
}

.hp-preset-note.is-custom {
  color: var(--brand-deep);
  font-weight: 800;
}

.hp-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: none;
}

.hp-chip:hover {
  background: var(--brand-soft);
  border-color: var(--brand-mid);
}

.hp-chip.is-active {
  background: var(--brand);
  border-color: var(--brand-deep);
  color: var(--on-brand);
}

/* 초기증액형 입력 묶음 */
.hp-fieldset {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-control);
  padding: 14px 12px 12px;
  margin-top: 6px;
  background: #FCFAF6;
}

.hp-fieldset__legend {
  padding: 0 8px;
  font-size: 14px;
  font-weight: 900;
  color: var(--brand-deep);
}

.hp-quick-months {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.hp-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 520px) {
  .hp-two-col {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.hp-submit-row {
  margin-top: 16px;
}

/* 핵심 결론 히어로 카드 (어두운 네이비 바탕: 흰색·주황 텍스트 고대비) */
.hp-hero {
  padding: 20px 16px;
}

.hp-hero__eyebrow {
  display: inline-block;
  background: rgba(255, 255, 255, 0.14);
  color: var(--on-brand);
  font-size: 13px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 8px;
}

.hp-hero__main {
  margin-top: 10px;
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.hp-hero__main.is-neutral {
  color: var(--on-brand);
}

.hp-hero__sub {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--on-brand);
  line-height: 1.5;
}

.hp-verify-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 500px) {
  .hp-verify-grid {
    grid-template-columns: 1fr;
  }
}

.hp-verify-box {
  background: var(--brand-deep);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 12px 13px;
}

.hp-verify-box.is-crossover {
  border-color: var(--accent);
  background: rgba(255, 138, 31, 0.14);
}

.hp-verify-box__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.hp-verify-box__month {
  font-size: 14px;
  font-weight: 900;
  color: var(--on-brand);
}

.hp-verify-box__badge {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--brand-deep);
  white-space: nowrap;
  flex-shrink: 0;
}

.hp-verify-box.is-crossover .hp-verify-box__badge {
  background: var(--accent);
  color: var(--brand-deep);
}

.hp-verify-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--brand-soft);
  margin-top: 4px;
}

.hp-verify-row strong {
  color: var(--on-brand);
  font-weight: 800;
}

.hp-verify-diff {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed rgba(255, 255, 255, 0.25);
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
}

/* 범례 & SVG 차트 */
.hp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.hp-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hp-swatch {
  display: inline-block;
  width: 14px;
  height: 4px;
  border-radius: 2px;
}

.hp-swatch--flat {
  background: var(--brand);
}

.hp-swatch--early {
  background: var(--accent);
}

.hp-swatch--cross {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
}

.hp-chart-wrap {
  width: 100%;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 8px 6px 4px;
}

.hp-chart {
  width: 100%;
  height: auto;
  display: block;
}

/* 개월 수 탐색기 */
.hp-explorer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1.5px solid var(--line);
}

.hp-explorer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hp-month-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hp-month-num {
  width: 82px;
  min-height: 40px;
  padding: 6px 8px;
  border: 1.5px solid #CFC9BE;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 900;
  text-align: right;
  background: var(--surface);
}

.hp-month-unit {
  font-size: 14px;
  font-weight: 800;
  color: var(--sub);
}

.hp-range {
  width: 100%;
  margin: 12px 0 4px;
  accent-color: var(--brand);
  height: 28px;
  cursor: pointer;
}

.hp-inspect-box {
  margin-top: 12px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.hp-inspect-box__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.hp-inspect-box__time {
  font-size: 15px;
  font-weight: 900;
  color: var(--brand-deep);
}

.hp-winner-badge {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.hp-winner-badge.is-flat {
  background: var(--ok);
  color: var(--on-brand);
}

.hp-winner-badge.is-early {
  background: var(--accent);
  color: var(--brand-deep);
}

.hp-winner-badge.is-tie {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.hp-inspect-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 420px) {
  .hp-inspect-pair {
    grid-template-columns: 1fr;
  }
}

.hp-inspect-col {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.hp-inspect-col__name {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--sub);
}

.hp-inspect-col__val {
  display: block;
  margin-top: 3px;
  font-size: 17px;
  font-weight: 900;
  color: var(--brand-deep);
}

.hp-inspect-col__short {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--sub);
}

.hp-inspect-box__diff {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

/* 주요 시점 비교표 */
.hp-table-scroll {
  width: 100%;
  overflow-x: auto;
}

.hp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.hp-table th,
.hp-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: middle;
}

.hp-table th:first-child,
.hp-table td:first-child {
  text-align: left;
}

.hp-table thead th {
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 900;
  border-bottom: 2px solid var(--brand);
}

.hp-table tr.is-crossover td {
  background: var(--accent-soft);
  font-weight: 800;
}

.hp-table tr.is-before td {
  background: #F4F7FC;
}

.hp-row-tag {
  display: inline-block;
  margin-top: 3px;
  margin-right: 4px;
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.hp-row-tag--cross {
  background: var(--accent);
  color: var(--brand-deep);
}

.hp-row-sub {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--sub);
}

.hp-diff-flat {
  color: var(--ok);
  font-weight: 800;
}

.hp-diff-early {
  color: var(--brand-deep);
  font-weight: 800;
}

@media (max-width: 520px) {
  .hp-table thead {
    display: none;
  }

  .hp-table,
  .hp-table tbody,
  .hp-table tr,
  .hp-table td {
    display: block;
    width: 100%;
  }

  .hp-table tr {
    border: 1.5px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: var(--surface);
  }

  .hp-table tr.is-crossover {
    border-color: var(--accent);
    background: var(--accent-soft);
  }

  .hp-table tr.is-before {
    border-color: var(--brand-mid);
    background: #F4F7FC;
  }

  .hp-table td {
    border-bottom: 0;
    padding: 4px 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    text-align: right;
    background: transparent !important;
  }

  .hp-table td:first-child {
    display: block;
    padding-bottom: 7px;
    margin-bottom: 5px;
    border-bottom: 1px dashed var(--line);
  }

  .hp-table td::before {
    content: attr(data-label);
    font-size: 12.5px;
    font-weight: 800;
    color: var(--sub);
    text-align: left;
    flex-shrink: 0;
  }

  .hp-table td:first-child::before {
    content: none;
  }
}

.hp-notice-p {
  margin-top: 8px;
}

.hp-links {
  margin-top: 14px;
}
