:root {
  --bg: #f3f5f7; --surface: #fff; --surface-2: #eaeef2;
  --ink: #1c2530; --ink-2: #4a5766; --ink-3: #77828f; --line: #d7dde3;
  --seal: #b83a2e; --seal-soft: #f6e7e4;
  --open: #2e7d4f; --open-soft: #e3f0e8;
  --check: #a06a00; --check-soft: #f5ecd8;
  --closed: #6b7684; --closed-soft: #e8ebee;
  --always: #2a5fa8; --always-soft: #e2ecf7;
  --shadow: 0 1px 3px rgba(28,37,48,.08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14181d; --surface: #1d232a; --surface-2: #242b33;
    --ink: #e8ecf0; --ink-2: #aab4bf; --ink-3: #7d8794; --line: #323b45;
    --seal: #e06a5c; --seal-soft: #3a2522; --open: #5cb385; --open-soft: #1f3328;
    --check: #d4a942; --check-soft: #362d18; --closed: #8b95a2; --closed-soft: #2a3038;
    --always: #6fa3d8; --always-soft: #1d2b3d; --shadow: 0 1px 3px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  --bg: #14181d; --surface: #1d232a; --surface-2: #242b33;
  --ink: #e8ecf0; --ink-2: #aab4bf; --ink-3: #7d8794; --line: #323b45;
  --seal: #e06a5c; --seal-soft: #3a2522; --open: #5cb385; --open-soft: #1f3328;
  --check: #d4a942; --check-soft: #362d18; --closed: #8b95a2; --closed-soft: #2a3038;
  --always: #6fa3d8; --always-soft: #1d2b3d; --shadow: 0 1px 3px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.65;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Malgun Gothic", sans-serif; }
.wrap { max-width: 1020px; margin: 0 auto; padding: 0 20px; }
a { color: var(--always); }
button, .btn { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }

/* 공통 내비 */
.nav { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav-in { max-width: 1020px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 18px; }
.brand { font-weight: 800; font-size: 17px; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand b { color: var(--seal); }
.nav-links { display: flex; gap: 16px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 600; padding: 8px 2px; }
.nav-links a:hover { color: var(--seal); }
.nav-cta { background: var(--seal); color: #fff !important; border-radius: 8px; padding: 9px 16px !important; }
@media (max-width: 720px) { .nav-links a:not(.nav-cta) { display: none; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  border-radius: 10px; font-weight: 700; border: none; min-height: 48px; padding: 12px 26px; font-size: 16px; }
.btn-primary { background: var(--seal); color: #fff; }
.btn-primary:hover { opacity: .92; }
.btn-ghost { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--seal); color: var(--seal); }

/* 히어로 */
.hero { padding: 64px 0 48px; text-align: left; }
.hero h1 { font-size: clamp(28px, 5vw, 42px); font-weight: 800; letter-spacing: -.02em; line-height: 1.3; margin: 0 0 14px; text-wrap: balance; }
.hero h1 b { color: var(--seal); }
.hero p.sub { font-size: 17px; color: var(--ink-2); max-width: 56ch; margin: 0 0 26px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; font-size: 13.5px; color: var(--ink-3); }
.trust b { color: var(--ink-2); }

section.sec { padding: 44px 0; border-top: 1px solid var(--line); }
section.sec > .wrap > h2 { font-size: 24px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 8px; }
section.sec > .wrap > p.lead { color: var(--ink-2); margin: 0 0 24px; max-width: 62ch; }

.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.c { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; box-shadow: var(--shadow); }
.c .n { width: 30px; height: 30px; border-radius: 50%; background: var(--seal-soft); color: var(--seal); font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.c h3 { margin: 0 0 6px; font-size: 16.5px; }
.c p { margin: 0; font-size: 14.5px; color: var(--ink-2); }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; border-radius: 5px; padding: 3px 9px; }
.b-ok { background: var(--open-soft); color: var(--open); }
.b-cond { background: var(--check-soft); color: var(--check); }
.b-no { background: var(--closed-soft); color: var(--closed); }

/* FAQ */
details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
details.faq summary { font-weight: 700; cursor: pointer; font-size: 15.5px; }
details.faq p { color: var(--ink-2); font-size: 14.5px; margin: 10px 0 0; }

/* 진단 폼 */
.diag-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 26px; box-shadow: var(--shadow); max-width: 640px; margin: 30px auto; }
.progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-bottom: 22px; }
.progress i { display: block; height: 100%; background: var(--seal); border-radius: 3px; transition: width .3s; }
.q { margin-bottom: 18px; }
.q label.t { display: block; font-weight: 700; font-size: 15px; margin-bottom: 7px; }
.q .hint { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.q select, .q input[type=number], .q input[type=text] { width: 100%; min-height: 48px; padding: 10px 12px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-family: inherit; }
.opts { display: grid; gap: 8px; }
.opts.cols2 { grid-template-columns: 1fr 1fr; }
.opt { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; cursor: pointer; background: var(--surface); font-size: 15px; min-height: 48px; }
.opt:has(input:checked) { border-color: var(--seal); background: var(--seal-soft); font-weight: 700; }
.opt input { accent-color: var(--seal); width: 18px; height: 18px; }
.diag-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; }
.step-label { font-size: 12.5px; font-weight: 700; color: var(--seal); letter-spacing: .08em; margin-bottom: 6px; }

/* 결과 */
.r-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 14px; }
.r-card.top3 { border-color: var(--seal); }
.r-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.r-head h3 { margin: 0; font-size: 17px; }
.r-meta { font-size: 13px; color: var(--ink-3); }
.r-money { font-weight: 800; color: var(--seal); font-size: 15.5px; }
.r-sec { margin-top: 12px; }
.r-sec .k { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--seal); }
.r-sec ul { margin: 4px 0 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); }
.r-sec li { margin: 3px 0; }
.reco { font-size: 12.5px; font-weight: 700; }
.notice { background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px; padding: 14px 18px; font-size: 13px; color: var(--ink-3); margin: 26px 0; }

/* 모바일 하단 고정 CTA */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line); display: none; }
.sticky-cta .btn { width: 100%; }
@media (max-width: 720px) { .sticky-cta { display: block; } body.has-sticky { padding-bottom: 84px; } }

footer.site { border-top: 1px solid var(--line); margin-top: 40px; padding: 26px 0 40px; font-size: 13px; color: var(--ink-3); }
footer.site .links { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }
footer.site a { color: var(--ink-2); text-decoration: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .progress i { transition: none; } }

/* 큰 글씨 모드 (어르신 접근성) */
body.big { font-size: 18.5px; }
body.big .r-head h3 { font-size: 20px; }
body.big .btn { font-size: 17px; }
.font-toggle { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  border-radius: 8px; padding: 7px 12px; font-size: 13.5px; font-weight: 700; min-height: 40px; }
.font-toggle[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* 쉬운 설명 박스 */
.easy { background: var(--surface-2); border-radius: 8px; padding: 10px 14px; font-size: 14.5px; margin-top: 10px; }
.easy b { color: var(--seal); }
.mtype { display: inline-block; font-size: 12.5px; font-weight: 800; border-radius: 5px; padding: 3px 9px; background: var(--seal-soft); color: var(--seal); }

/* 연계 로드맵 */
.road { counter-reset: rd; display: flex; flex-direction: column; gap: 0; }
.rstep { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }
.rstep:last-child { padding-bottom: 0; }
.rstep::before { counter-increment: rd; content: counter(rd); flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--seal); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; z-index: 1; }
.rstep:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--line); }
.rstep .rt { font-weight: 800; font-size: 15.5px; }
.rstep .rd { font-size: 14px; color: var(--ink-2); }
