/* 색·간격은 여기 변수만 바꾸면 전체에 반영됩니다. */
:root {
  --bg: #faf8f3;
  --surface: #ffffff;
  --surface-2: #f2efe7;
  --ink: #1b1f1d;
  --ink-2: #55605b;
  --line: #e2ddd0;
  --brand: #0f5c4c;
  --brand-ink: #ffffff;
  --brand-soft: #e3efe9;
  --good: #1a7f4e;
  --good-soft: #e2f3e9;
  --warn: #a8650a;
  --warn-soft: #fbefd6;
  --bad: #b3312a;
  --bad-soft: #fbe5e2;
  --info: #5b6670;
  --info-soft: #eceef0;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(20 30 25 / 6%), 0 8px 24px rgb(20 30 25 / 6%);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121614;
    --surface: #1a201d;
    --surface-2: #222a26;
    --ink: #edf0ed;
    --ink-2: #a3aea8;
    --line: #2e3833;
    --brand: #5cc4a6;
    --brand-ink: #0c1512;
    --brand-soft: #1d3029;
    --good: #5ecb8e;
    --good-soft: #17301f;
    --warn: #e8b458;
    --warn-soft: #33290f;
    --bad: #f08a80;
    --bad-soft: #3a1c19;
    --info: #9aa5ae;
    --info-soft: #262d31;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--font);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--brand-ink); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* 상단 */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; text-decoration: none; color: var(--brand); }
.brand span { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav a:not(.btn) { text-decoration: none; color: var(--ink-2); }
.nav a:not(.btn):hover { color: var(--ink); }
@media (max-width: 720px) { .nav a:not(.btn) { display: none; } }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 0 22px; border: 1px solid var(--brand); border-radius: 12px;
  background: var(--brand); color: var(--brand-ink); font: 600 16px/1 var(--font);
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); filter: none; }

/* 히어로 */
.hero { padding: 72px 0 56px; text-align: center; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--brand); margin-bottom: 12px; }
.hero h1 { font-size: clamp(30px, 5.4vw, 52px); line-height: 1.22; letter-spacing: -.02em; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--brand); }
.lead { max-width: 560px; margin: 18px auto 0; color: var(--ink-2); font-size: 18px; }
.check-form {
  display: flex; gap: 8px; max-width: 580px; margin: 32px auto 0; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.check-form:focus-within { border-color: var(--brand); }
.check-form input {
  flex: 1; min-width: 0; height: 48px; padding: 0 14px; border: 0; background: transparent;
  color: var(--ink); font: 500 17px/1 var(--font);
}
.check-form input:focus { outline: none; }
.check-form input::placeholder { color: color-mix(in srgb, var(--ink-2) 70%, transparent); }
@media (max-width: 480px) { .check-form { flex-direction: column; } .check-form .btn { width: 100%; } }
.form-error { max-width: 580px; margin: 12px auto 0; padding: 10px 14px; border-radius: 10px; background: var(--bad-soft); color: var(--bad); font-size: 15px; }
.form-error .btn { display: flex; width: fit-content; margin: 10px auto 2px; }
.inquiry { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.inquiry .wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .inquiry { grid-template-columns: 1fr; padding: 18px; } }
.inquiry label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.inquiry .req { font-size: 12px; font-weight: 500; color: var(--bad); margin-left: 4px; }
.inquiry input[type="text"], .inquiry textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font);
}
.inquiry textarea { resize: vertical; min-height: 120px; }
.inquiry input:focus, .inquiry textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.inquiry [aria-invalid="true"] { border-color: var(--bad); }
.inquiry .check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; cursor: pointer; margin: 0; }
.inquiry .check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.inquiry .fineprint { font-size: 13px; color: var(--ink-2); margin-top: 6px; padding-left: 30px; }
.field-error { font-size: 14px; color: var(--bad); margin-top: 6px; }
.inquiry .submit { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.form-note { font-size: 14px; color: var(--bad); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.inquiry-done { margin-top: 24px; padding: 28px 24px; border-radius: var(--radius); background: var(--good-soft); border: 1px solid transparent; }
.inquiry-done h3 { font-size: 19px; color: var(--good); }
.inquiry-done p { margin-top: 4px; color: var(--ink-2); }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: var(--brand-soft); border-color: transparent; }
.cta h2 { font-size: 20px; }
.cta p { color: var(--ink-2); margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 26px; }
.chips li { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink-2); background: var(--surface); }

/* 홈 섹션 */
.band { padding: 64px 0; border-top: 1px solid var(--line); }
.band.alt { background: var(--surface-2); }
.band h2 { font-size: clamp(24px, 3.4vw, 32px); line-height: 1.3; letter-spacing: -.015em; }
.band .sub { color: var(--ink-2); margin-top: 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 28px; counter-reset: card; }
.cards li { counter-increment: card; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.cards li::before { content: counter(card, decimal-leading-zero); display: block; font: 600 13px/1 var(--mono); color: var(--brand); margin-bottom: 10px; }
.cards h3, .steps h3 { font-size: 17px; }
.cards p, .steps p { margin-top: 6px; color: var(--ink-2); font-size: 15px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-top: 28px; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 14px;
  border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-weight: 700;
}
.strengths { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 28px 0; }
@media (min-width: 640px) { .strengths { grid-template-columns: repeat(2, 1fr); } }
.strengths li { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: var(--radius); }
.strengths .tag { font-size: 13px; font-weight: 600; color: var(--brand); margin-bottom: 8px; }
.strengths h3 { font-size: 19px; line-height: 1.35; }
.strengths li > p:last-child { margin-top: 8px; color: var(--ink-2); font-size: 15px; }
#faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
#faq details:first-of-type { margin-top: 20px; border-top: 1px solid var(--line); }
#faq summary { padding: 16px 0; font-weight: 600; font-size: 17px; cursor: pointer; }
#faq details p { padding: 0 0 18px; color: var(--ink-2); }

.foot { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--ink-2); font-size: 14px; }
.foot .fine { margin-top: 6px; font-size: 13px; opacity: .8; }

/* ───────── 결과 화면 ───────── */
#report { padding: 40px 0 72px; }
.report-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.report-head h1 { font-size: clamp(26px, 4.4vw, 40px); line-height: 1.2; letter-spacing: -.02em; }
.report-head .meta { color: var(--ink-2); font-size: 14px; margin-top: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions .btn { min-height: 42px; padding: 0 16px; font-size: 14px; }

.progress { margin-top: 24px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.progress p { font-weight: 600; }
.progress ul { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 12px; }
.progress li { padding: 3px 10px; border-radius: 999px; font-size: 13px; background: var(--surface-2); color: var(--ink-2); }
.progress li.done { background: var(--good-soft); color: var(--good); }
.progress li.now { background: var(--brand-soft); color: var(--brand); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .progress li.now { animation: none; } html { scroll-behavior: auto; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-top: 16px; }
.score-row { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
@media (max-width: 640px) { .score-row { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.dial { position: relative; width: 148px; height: 148px; }
.dial svg { transform: rotate(-90deg); }
.dial .track { stroke: var(--surface-2); }
.dial .value { stroke: var(--tone); stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.dial .num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.dial .num b { font-size: 44px; font-weight: 800; letter-spacing: -.03em; }
.dial .num span { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.grade { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 8px; border-radius: 12px; background: var(--tone-soft); color: var(--tone); font-weight: 800; font-size: 20px; }
.verdict strong { font-size: 22px; }
.tally { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (max-width: 640px) { .verdict, .tally { justify-content: center; } }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--tone-soft); color: var(--tone); white-space: nowrap; }
.t-good { --tone: var(--good); --tone-soft: var(--good-soft); }
.t-warn { --tone: var(--warn); --tone-soft: var(--warn-soft); }
.t-bad { --tone: var(--bad); --tone-soft: var(--bad-soft); }
.t-info { --tone: var(--info); --tone-soft: var(--info-soft); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.kpis b { display: block; font-size: 24px; letter-spacing: -.02em; }
.kpis span { font-size: 13px; color: var(--ink-2); }

.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.two .panel h2, .top5 h2 { font-size: 18px; }
.plain li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.plain li:last-child { border-bottom: 0; padding-bottom: 0; }
.plain strong { color: var(--ink); }
.top5 .count { float: right; font-size: 13px; color: var(--ink-2); }
.top5 ol { counter-reset: fix; margin-top: 6px; }
.top5 li { counter-increment: fix; position: relative; padding: 16px 0 16px 44px; border-bottom: 1px solid var(--line); }
.top5 li:last-child { border-bottom: 0; padding-bottom: 0; }
.top5 li::before { content: counter(fix); position: absolute; left: 0; top: 16px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); font-weight: 700; font-size: 14px; }
.top5 h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 16px; }
.top5 h3 a { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.top5 p { font-size: 15px; color: var(--ink-2); margin-top: 4px; }
.top5 p.fix { color: var(--ink); }

.toc { position: sticky; top: 60px; z-index: 4; display: flex; gap: 6px; overflow-x: auto; margin: 16px -20px 0; padding: 10px 20px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); scrollbar-width: none; }
.toc a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; text-decoration: none; white-space: nowrap; }
.toc a i { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }

.sec { scroll-margin-top: 120px; }
.sec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.sec-head .no { font: 600 12px/1 var(--mono); color: var(--ink-2); letter-spacing: .06em; }
.sec-head h2 { font-size: 22px; margin-top: 6px; letter-spacing: -.01em; }
.sec-head .score { flex: none; padding: 6px 12px; border-radius: 10px; background: var(--tone-soft); color: var(--tone); font-weight: 800; font-size: 18px; }
.sec > .summary { color: var(--ink-2); margin-top: 8px; }
.items { margin-top: 16px; border-top: 1px solid var(--line); }
.items details, .items .row { border-bottom: 1px solid var(--line); }
.items summary, .items .row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 13px 0; }
.items summary { cursor: pointer; list-style: none; }
.items summary::-webkit-details-marker { display: none; }
.items .label { font-weight: 600; }
.items .value { font: 500 13px/1.4 var(--mono); color: var(--ink-2); text-align: right; max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.items .body { padding: 0 0 16px; color: var(--ink-2); font-size: 15px; }
.items .fix { margin-top: 8px; padding: 10px 14px; border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: 0 8px 8px 0; color: var(--ink); }
.items .folded > summary { grid-template-columns: 1fr; color: var(--ink-2); font-size: 14px; }
.items .folded .row { padding-left: 4px; }
.items .folded .row .msg { grid-column: 2 / -1; font-size: 14px; color: var(--ink-2); margin-top: -8px; padding-bottom: 4px; }
@media (max-width: 560px) { .items summary, .items .row { grid-template-columns: auto 1fr; } .items .value { grid-column: 2; text-align: left; } }

.extra { margin-top: 20px; }
.extra h3 { font-size: 15px; margin-bottom: 10px; }
.facts { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 6px 16px; font-size: 14px; }
.facts dt { color: var(--ink-2); }
.facts dd { font-family: var(--mono); font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stats div { padding: 14px; border-radius: 10px; background: var(--surface-2); }
.stats b { display: block; font-size: 20px; }
.stats span { font-size: 13px; color: var(--ink-2); }
.excerpt { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.outline li { font-size: 14px; padding: 2px 0; color: var(--ink-2); }
.outline li b { font: 600 11px/1 var(--mono); color: var(--brand); margin-right: 8px; }
.previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.previews figure { margin: 0; }
.previews figcaption { font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.share-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.share-card .img { aspect-ratio: 1200 / 630; display: grid; place-items: center; background: var(--line); color: var(--ink-2); font-size: 13px; }
.share-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.share-card .txt { padding: 12px 14px; font-size: 14px; }
.share-card .txt b { display: block; }
.share-card .txt span { color: var(--ink-2); font-size: 13px; }
.serp { padding: 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.serp .u { font-size: 12px; color: var(--ink-2); }
.serp b { display: block; font-size: 18px; font-weight: 500; color: #1a55c4; margin: 2px 0; }
@media (prefers-color-scheme: dark) { .serp b { color: #8ab4f8; } }
.bots { width: 100%; border-collapse: collapse; font-size: 14px; }
.bots th, .bots td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.bots th { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.bots code { font: 12px var(--mono); color: var(--ink-2); }
.scroll-x { overflow-x: auto; }
.code { position: relative; }
.code pre { margin: 0; padding: 16px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); overflow-x: auto; font: 13px/1.6 var(--mono); white-space: pre; }
.code button { position: absolute; top: 8px; right: 8px; min-height: 30px; padding: 0 12px; font-size: 12px; border-radius: 8px; }

@media print {
  .top, .actions, .toc, .foot, .progress, .code button { display: none !important; }
  body { background: #fff; }
  .panel { break-inside: avoid; box-shadow: none; }
  details > *:not(summary) { display: block !important; }
}
