/* ReBiz — 폐업 정리 내비게이터 v2
   톤: 차분한 신뢰 + 재기의 초록. 무겁지 않게, 그러나 가볍지도 않게. */

.rebiz-wrap { max-width: 880px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.rebiz-accent { color: #15803d; }

.rebiz-badge {
  display: inline-block; padding: .3rem .8rem; border-radius: 999px;
  background: #ecfdf5; color: #15803d; font-size: .8rem; font-weight: 700;
  letter-spacing: .02em;
}

.rebiz-hero { padding: 2.2rem 0 1.6rem; }
.rebiz-title { font-weight: 800; font-size: clamp(1.65rem, 4.5vw, 2.5rem); margin: .9rem 0 .6rem; line-height: 1.25; }
.rebiz-sub { color: #4b5563; margin-bottom: 1.4rem; }
.rebiz-tiny { font-size: .78rem; color: #9ca3af; }

.rebiz-btn-main { background: #15803d; color: #fff; font-weight: 700; border: none; }
.rebiz-btn-main:hover, .rebiz-btn-main:focus { background: #166534; color: #fff; }
.rebiz-btn-ghost { border: 1px solid #d1d5db; color: #374151; background: #fff; font-weight: 600; }
.rebiz-btn-ghost:hover { background: #f3f4f6; }

.rebiz-section { margin-top: 2.2rem; scroll-margin-top: 70px; }

.rebiz-card {
  border: 1px solid #e5e7eb; border-radius: 14px; padding: 1.1rem 1.2rem; background: #fff;
  display: block;
}
.rebiz-card-emoji { font-size: 1.5rem; margin-bottom: .4rem; }
a.rebiz-card-link { text-decoration: none; color: inherit; transition: border-color .12s ease, transform .12s ease; }
a.rebiz-card-link:hover { border-color: #15803d; transform: translateY(-2px); color: inherit; }

.rebiz-panel { border: 1px solid #d1fae5; background: #f8fffb; border-radius: 18px; padding: 1.6rem 1.4rem; }

/* ── sticky 점프 내비 ── */
.rebiz-jumpnav {
  position: sticky; top: 0; z-index: 100;
  display: flex; gap: .4rem; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: .55rem .2rem; margin-top: .8rem;
  background: rgba(255,255,255,.95); backdrop-filter: blur(6px);
  border-bottom: 1px solid #f3f4f6;
  scrollbar-width: none;
}
.rebiz-jumpnav::-webkit-scrollbar { display: none; }
.rebiz-jumpnav a {
  flex: 0 0 auto; white-space: nowrap;
  padding: .35rem .8rem; border-radius: 999px; font-size: .82rem; font-weight: 600;
  color: #374151; background: #f3f4f6; text-decoration: none;
}
.rebiz-jumpnav a:hover { background: #ecfdf5; color: #15803d; }
.rebiz-chip-count { font-weight: 700; color: #15803d; margin-left: .15rem; }

/* ── 한눈 요약 그리드 ── */
.rebiz-summary-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: .8rem;
}
.rebiz-summary-cell {
  display: flex; align-items: center; gap: .65rem;
  border: 1px solid #e5e7eb; border-radius: 12px; padding: .7rem .8rem;
  text-decoration: none; color: inherit; background: #fff;
  transition: border-color .12s ease;
}
.rebiz-summary-cell:hover { border-color: #15803d; color: inherit; }
.rebiz-summary-num {
  flex: 0 0 auto; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: #ecfdf5; color: #15803d; font-weight: 800; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
}
.rebiz-summary-cell strong { display: block; font-size: .88rem; line-height: 1.25; }
.rebiz-summary-cell span { display: block; font-size: .72rem; color: #6b7280; }

/* ── 선택 버튼 그룹 ── */
.rebiz-choice-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.rebiz-choice { margin: 0; }
.rebiz-choice input { position: absolute; opacity: 0; pointer-events: none; }
.rebiz-choice span {
  display: inline-block; padding: .5rem 1rem; border-radius: 10px;
  border: 1.5px solid #d1d5db; background: #fff; font-size: .9rem; cursor: pointer;
  transition: all .12s ease; user-select: none;
}
.rebiz-choice input:checked + span { border-color: #15803d; background: #ecfdf5; color: #14532d; font-weight: 700; }
.rebiz-choice input:focus-visible + span { outline: 2px solid #15803d; outline-offset: 2px; }

/* ── 절차 개요 ── */
.rebiz-steps { padding-left: 1.2rem; }
.rebiz-steps li { margin-bottom: .55rem; color: #374151; }
.rebiz-steps a { color: #15803d; font-weight: 600; text-decoration: none; }
.rebiz-steps a:hover { text-decoration: underline; }

.rebiz-guide-nav { display: flex; flex-wrap: wrap; gap: .4rem; }
.rebiz-guide-link {
  display: inline-block; margin: 0; padding: .45rem .85rem;
  border: 1px solid #e5e7eb; border-radius: 999px; font-size: .85rem;
  color: #374151; text-decoration: none; background: #fff;
}
.rebiz-guide-link:hover { border-color: #15803d; color: #15803d; }

/* ── 돈 문제 리스트 ── */
.rebiz-money-list { display: flex; flex-direction: column; gap: .55rem; }
.rebiz-money-row {
  display: flex; gap: .7rem; align-items: flex-start;
  border: 1px solid #e5e7eb; border-radius: 12px; padding: .8rem .9rem; background: #fff;
  font-size: .9rem; color: #374151;
}
.rebiz-money-tag {
  flex: 0 0 auto; font-size: .72rem; font-weight: 800; padding: .25rem .55rem; border-radius: 8px;
  margin-top: .1rem; white-space: nowrap;
}
.rebiz-money-tag.out { background: #fee2e2; color: #b91c1c; }
.rebiz-money-tag.in { background: #ecfdf5; color: #15803d; }

/* ── 플랜 페이지 ── */
.rebiz-plan-head { padding-top: 1.2rem; }
.rebiz-progress-box { border: 1px solid #e5e7eb; border-radius: 12px; padding: .9rem 1rem; background: #fff; }
.rebiz-progress { height: 12px; border-radius: 999px; background: #f3f4f6; }
.rebiz-progress .progress-bar { background: #15803d; border-radius: 999px; transition: width .35s ease; }
.rebiz-save-alert { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 12px; }

.rebiz-urgent-box { border: 1.5px solid #fca5a5; background: #fff7f7; border-radius: 12px; padding: .85rem 1rem; }
.rebiz-urgent-row {
  display: flex; justify-content: space-between; align-items: center; gap: .6rem;
  padding: .45rem 0; border-top: 1px dashed #fecaca;
  text-decoration: none; color: #374151; font-size: .88rem;
}
.rebiz-urgent-row:first-of-type { border-top: none; }
.rebiz-urgent-row:hover .rebiz-urgent-title { color: #b91c1c; }
.rebiz-urgent-title { font-weight: 600; }

.rebiz-group-title { padding-bottom: .4rem; border-bottom: 2px solid #ecfdf5; display: flex; justify-content: space-between; align-items: baseline; }
.rebiz-group-count { font-size: .82rem; color: #15803d; font-weight: 700; }

.rebiz-items { display: flex; flex-direction: column; gap: .7rem; margin-top: .8rem; }
.rebiz-item {
  display: flex; gap: .8rem; border: 1px solid #e5e7eb; border-radius: 14px;
  padding: .95rem 1rem; background: #fff; transition: opacity .15s ease;
  scroll-margin-top: 70px;
}
.rebiz-item.is-done { opacity: .55; background: #fafafa; }
.rebiz-item.is-done .rebiz-item-title { text-decoration: line-through; }
.rebiz-item-check .form-check-input { width: 1.45rem; height: 1.45rem; margin-top: .1rem; cursor: pointer; }
.rebiz-item-check .form-check-input:checked { background-color: #15803d; border-color: #15803d; }
.rebiz-item-body { flex: 1; min-width: 0; }
.rebiz-item-title { font-weight: 700; }
.rebiz-item-due { color: #6b7280; margin-top: .15rem; }
.rebiz-item-desc { color: #4b5563; margin-top: .3rem; }
.rebiz-item-penalty { color: #b45309; }
.rebiz-item-link { color: #15803d; font-weight: 600; text-decoration: none; }
.rebiz-item-link:hover { text-decoration: underline; }

.badge.rebiz-dday { background: #f3f4f6; color: #374151; font-weight: 600; }
.badge.rebiz-dday.soon { background: #fef3c7; color: #92400e; }
.badge.rebiz-dday.today { background: #fee2e2; color: #b91c1c; }
.badge.rebiz-dday.over { background: #fee2e2; color: #991b1b; }

/* ── 가이드 아티클 ── */
.rebiz-article p { color: #374151; line-height: 1.8; }
.rebiz-article h2 { scroll-margin-top: 70px; }
.rebiz-toc {
  display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .8rem;
  padding: .7rem .8rem; border: 1px solid #ecfdf5; background: #f8fffb; border-radius: 12px;
}
.rebiz-toc a {
  font-size: .82rem; font-weight: 600; color: #15803d; text-decoration: none;
  padding: .25rem .65rem; background: #fff; border: 1px solid #d1fae5; border-radius: 999px;
}
.rebiz-toc a:hover { background: #ecfdf5; }
.rebiz-cta-box { border: 1px solid #d1fae5; background: #f8fffb; border-radius: 14px; padding: 1.2rem; text-align: center; }

/* ── 댓글 ── */
.rebiz-comment-form { border: 1px solid #e5e7eb; border-radius: 12px; padding: .9rem; background: #fff; }
.rebiz-comment-list { display: flex; flex-direction: column; gap: .6rem; }
.rebiz-comment { border: 1px solid #f3f4f6; border-radius: 12px; padding: .75rem .9rem; background: #fff; }
.rebiz-comment-del summary { cursor: pointer; color: #9ca3af; list-style: none; }
.rebiz-comment-del summary::-webkit-details-marker { display: none; }
.rebiz-comment-del summary:hover { color: #b91c1c; }

/* ── 맨 위로 ── */
.rebiz-totop {
  position: fixed; right: 1rem; bottom: 1.2rem; z-index: 200;
  width: 2.7rem; height: 2.7rem; border-radius: 50%;
  border: none; background: #15803d; color: #fff; font-size: 1.1rem; font-weight: 800;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.rebiz-totop.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* ── 면책 ── */
.rebiz-disclaimer { margin-top: 2.5rem; border-top: 1px dashed #e5e7eb; padding-top: 1.2rem; }
.rebiz-disclaimer ul { padding-left: 1.1rem; }
.rebiz-disclaimer li { margin-bottom: .3rem; }

/* ── 모바일 ── */
@media (max-width: 767px) {
  .rebiz-wrap { padding: .9rem .85rem 4.5rem; }
  .rebiz-hero { padding: 1.6rem 0 1.2rem; }
  .rebiz-section { margin-top: 1.7rem; }
  .rebiz-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .rebiz-panel { padding: 1.2rem 1rem; border-radius: 14px; }
  .rebiz-card { padding: .9rem .95rem; }
  .rebiz-item { padding: .85rem .8rem; gap: .65rem; }
  .rebiz-money-row { font-size: .86rem; padding: .7rem .75rem; }
  .rebiz-btn-main.btn-lg { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .rebiz-progress .progress-bar, .rebiz-choice span, .rebiz-item,
  a.rebiz-card-link, .rebiz-totop { transition: none; }
}
