/* style.css — 물타기 계산기(파트너스 글 검사기 틀에서 색만 바꿈). 모바일 우선, 밝은·어두운 화면 지원.
   글꼴은 Pretendard(jsDelivr, SIL OFL)를 각 페이지 <head> 에서 불러온다. 그 밖의 외부 라이브러리는 없다. */
:root {
  --bg: #f5f5fa; --surface: #ffffff; --surface-2: #f8f9fb; --line: #e6e9ee; --line-2: #d5dae1;
  --text: #191f28; --text-2: #4e5968; --muted: #8b95a1;
  --brand: #5b47e0; --brand-strong: #4532c2; --brand-ink: #ffffff; --brand-soft: #f0edff; --brand-line: #ddd6ff;
  --up: #e03a3e; --up-bg: #fff0f0; --down: #2f6fe8; --down-bg: #edf3ff;
  --danger: #d92d20; --danger-bg: #fff1f0; --warn: #b54708; --warn-bg: #fff6e6; --info: #2f5fe8; --info-bg: #edf2ff; --ok: #079455; --ok-bg: #e7f8ef;
  --radius: 20px; --radius-md: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .05);
  --shadow-lg: 0 2px 8px rgba(16, 24, 40, .06), 0 24px 56px rgba(16, 24, 40, .12);
  --wrap: 1080px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f17; --surface: #161a22; --surface-2: #1b2029; --line: #262c37; --line-2: #333a47;
    --text: #e9edf2; --text-2: #b7c0cc; --muted: #8893a2;
    --brand: #a796ff; --brand-strong: #c4b8ff; --brand-ink: #120d2b; --brand-soft: #221c42; --brand-line: #3a3170;
    --up: #ff8a8c; --up-bg: #3a1a1c; --down: #8fb4ff; --down-bg: #182540;
    --danger: #ff8b80; --danger-bg: #3a1b19; --warn: #f7b955; --warn-bg: #3a2b12; --info: #8fb0ff; --info-bg: #1a2440; --ok: #5bd69b; --ok-bg: #12301f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 16px rgba(0, 0, 0, .25);
    --shadow-lg: 0 2px 8px rgba(0, 0, 0, .4), 0 24px 56px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.7; letter-spacing: -0.005em; word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.3; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 10px; z-index: 100; background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: 10px; box-shadow: var(--shadow); }
.skip:focus { left: 16px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); font-size: 0.92rem; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── 머리말 ── */
.site-header {
  position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: -0.03em; font-size: 1.05rem; min-width: 0; }
.logo:hover { color: var(--text); }
.logo-mark { width: 30px; height: 30px; flex: none; }
.logo-mark .lm-bg { fill: var(--brand); }
.logo-mark .lm-doc { fill: #fff; }
.logo-mark .lm-line { stroke: var(--brand); stroke-width: 3.6; stroke-linecap: round; fill: none; }
.logo-mark .lm-ok { fill: #12b76a; stroke: #fff; stroke-width: 3; }
.logo-mark .lm-tick { fill: none; stroke: #fff; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.logo-text { white-space: nowrap; }
.tag { font-size: 0.7rem; font-weight: 700; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; letter-spacing: 0; white-space: nowrap; }
.nav { display: flex; gap: 2px; }
.nav a { color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 0.94rem; padding: 8px 12px; border-radius: 10px; white-space: nowrap; }
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
@media (max-width: 600px) {
  .nav a.nav-optional { display: none; }
  .nav a { padding: 8px 10px; font-size: 0.9rem; }
  .logo { font-size: 0.98rem; gap: 7px; }
  .logo-mark { width: 26px; height: 26px; }
}
@media (max-width: 380px) { .nav a[href="/#tool"] { display: none; } }

/* ── 버튼 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2;
  border-radius: var(--radius-md); padding: 14px 22px; border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .08s ease, background-color .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn-primary:hover { background: var(--brand-strong); color: var(--brand-ink); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line-2); color: var(--text); }
.btn-sm { padding: 8px 13px; font-size: 0.9rem; border-radius: var(--radius-sm); font-weight: 600; }
.btn-block { width: 100%; }

/* ── 첫 화면 ── */
.hero { padding: 56px 0 28px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%);
}
.hero-grid { position: relative; display: grid; gap: 40px; align-items: center; }
@media (min-width: 940px) { .hero-grid { grid-template-columns: 1.08fr 0.92fr; } .hero { padding: 72px 0 40px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 700; color: var(--brand); background: var(--brand-soft); border: 1px solid var(--brand-line); padding: 6px 12px; border-radius: 999px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #12b76a; box-shadow: 0 0 0 4px color-mix(in srgb, #12b76a 22%, transparent); }
.hero h1 { font-size: clamp(2.05rem, 6vw, 3.35rem); line-height: 1.2; letter-spacing: -0.045em; margin: 18px 0 16px; font-weight: 800; }
.hero h1 .hl { color: var(--brand); }
.lead { font-size: clamp(1.03rem, 2.4vw, 1.16rem); color: var(--text-2); margin: 0 0 26px; max-width: 33em; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 20px; list-style: none; padding: 0; margin: 24px 0 0; color: var(--text-2); font-size: 0.93rem; font-weight: 600; }
.trust li { display: inline-flex; align-items: center; gap: 7px; }
.trust .icon { width: 18px; height: 18px; color: var(--ok); stroke-width: 2.4; }

/* 첫 화면 오른쪽 — 검사 결과 미리보기 그림 */
.mock { position: relative; display: none; }
@media (min-width: 720px) { .mock { display: block; } }
.mock-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 18px; transform: rotate(-1.2deg); }
.mock-top { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.mock-top i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.mock-top span { margin-left: 8px; font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.mock-post { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 0.9rem; color: var(--text-2); margin-bottom: 12px; line-height: 1.6; }
.mock-post b { color: var(--text); }
.mock-post mark { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); border-radius: 4px; padding: 0 3px; }
.mock-verdict { display: flex; align-items: center; gap: 8px; background: var(--danger-bg); color: var(--danger); font-weight: 800; border-radius: 12px; padding: 10px 12px; font-size: 0.95rem; margin-bottom: 10px; }
.mock-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-top: 1px dashed var(--line); font-size: 0.9rem; font-weight: 600; }
.mock-float {
  position: absolute; right: -6px; bottom: -18px; display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 14px; box-shadow: var(--shadow-lg); font-size: 0.86rem; font-weight: 700; transform: rotate(1.5deg);
}
.mock-float .icon { width: 17px; height: 17px; color: var(--ok); stroke-width: 2.4; }

/* ── 구역·카드 ── */
.section { padding: 28px 0; }
.section-head { margin: 0 0 18px; }
.section-head h2 { font-size: clamp(1.4rem, 3.4vw, 1.75rem); margin: 0 0 6px; font-weight: 800; }
.section-head p { margin: 0; color: var(--text-2); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h2, .card h3 { margin: 0 0 6px; font-size: 1.18rem; font-weight: 800; }
.card p { margin: 0 0 10px; }
.card-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }
.card-icon .icon { width: 22px; height: 22px; }
.card-icon.red { background: var(--danger-bg); color: var(--danger); }
.card-icon.amber { background: var(--warn-bg); color: var(--warn); }
.card-icon.green { background: var(--ok-bg); color: var(--ok); }
.grid-2, .grid-4, .grid-3 { display: grid; gap: 14px; }
@media (max-width: 539px) {
  .feature { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; padding: 18px; }
  .feature .card-icon { grid-row: span 2; margin: 0; }
}
@media (min-width: 540px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.feature p { color: var(--text-2); font-size: 0.95rem; margin: 0; }

/* ── 검사 도구 ── */
.tool { padding: 26px; border-radius: 24px; box-shadow: var(--shadow-lg); }
@media (max-width: 600px) { .tool { padding: 18px; border-radius: 20px; } }
.tool-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.tool-head h2 { font-size: 1.45rem; margin: 0; }
.tool-head p { margin: 0; color: var(--muted); font-size: 0.9rem; display: inline-flex; align-items: center; gap: 6px; }
.tool-head p .icon { width: 16px; height: 16px; color: var(--ok); }
.step { display: flex; align-items: center; gap: 10px; font-weight: 700; margin: 0 0 10px; padding: 0; }
.step-no { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-size: 0.8rem; font-weight: 800; flex: none; }
fieldset.chips-field { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.95rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); transition: all .12s ease; }
.chips label:hover span { border-color: var(--line-2); color: var(--text); }
.chips input:checked + span { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 28%, transparent); }
.chips input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 20px; font-size: 0.95rem; cursor: pointer; color: var(--text-2); }
.check input, .manual input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border: 1.5px solid var(--line-2); border-radius: 6px; background: var(--surface); margin: 3px 0 0; flex: none; cursor: pointer; display: grid; place-items: center; transition: all .12s ease; }
.check input:checked, .manual input:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::after, .manual input:checked::after { content: ""; width: 10px; height: 6px; border: 2.5px solid var(--brand-ink); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.editor { border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); margin-bottom: 14px; transition: border-color .12s ease, box-shadow .12s ease; }
.editor:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
textarea {
  display: block; width: 100%; min-height: 210px; resize: vertical; padding: 16px; border: 0; border-radius: 16px 16px 0 0;
  background: transparent; color: var(--text); font: inherit; line-height: 1.7;
}
textarea:focus { outline: none; }
textarea::placeholder { color: var(--muted); }
.editor-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-top: 1px solid var(--line); }
.grow { flex: 1; }
.counter { font-size: 0.88rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--danger); }

/* 결과 */
#result { margin-top: 20px; }
.verdict { display: flex; align-items: flex-start; gap: 12px; border-radius: 16px; padding: 16px 18px; }
.verdict > .icon { width: 26px; height: 26px; margin-top: 1px; stroke-width: 2.2; }
.verdict-body { flex: 1; min-width: 0; }
.verdict-body strong { display: block; font-size: 1.08rem; font-weight: 800; letter-spacing: -0.02em; }
.verdict-body span { display: block; font-size: 0.92rem; opacity: 0.9; margin-top: 2px; }
.verdict-counts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.verdict.danger { background: var(--danger-bg); color: var(--danger); }
.verdict.warn { background: var(--warn-bg); color: var(--warn); }
.verdict.ok { background: var(--ok-bg); color: var(--ok); }
.findings { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.finding { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: 14px; padding: 14px 16px; }
.finding.danger { border-left-color: var(--danger); }
.finding.warn { border-left-color: var(--warn); }
.finding.info { border-left-color: var(--info); }
.finding .head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.finding .title { font-weight: 700; }
.badge { display: inline-flex; align-items: center; font-size: 0.74rem; font-weight: 800; border-radius: 999px; padding: 3px 9px; white-space: nowrap; letter-spacing: 0; }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.plain { background: var(--surface); color: inherit; border: 1px solid currentColor; opacity: 0.85; }
.finding .match { margin: 10px 0 0; padding: 8px 12px; background: var(--surface-2); border-radius: 10px; font-size: 0.93rem; color: var(--text-2); }
.finding .detail { margin: 8px 0 0; color: var(--text-2); }
.finding .src { margin: 8px 0 0; font-size: 0.84rem; color: var(--muted); }

/* 권장 문구·직접 확인 */
.quote { position: relative; background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 14px; padding: 16px 18px; font-weight: 700; color: var(--text); margin: 12px 0 12px; }
.copy-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.manual { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 4px; }
.manual label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 10px 8px; border-radius: 12px; }
.manual label:hover { background: var(--surface-2); }
.manual .why { display: block; color: var(--muted); font-size: 0.88rem; margin-top: 2px; }
.manual input:checked + span > span:first-child { text-decoration: line-through; text-decoration-color: var(--muted); color: var(--text-2); }

/* 표 */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; margin: 12px 0; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.93rem; }
th, td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
tr:last-child > * { border-bottom: 0; }
thead th { background: var(--surface-2); font-size: 0.85rem; color: var(--text-2); font-weight: 700; }
tbody th { text-align: center; width: 56px; }
.grade { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; font-weight: 800; }
.grade.a { background: var(--danger-bg); color: var(--danger); }
.grade.b { background: var(--warn-bg); color: var(--warn); }
.grade.c { background: var(--danger); color: var(--surface); }
table.compact { min-width: 0; }
table.compact td:first-child { white-space: nowrap; font-weight: 700; }

/* 자주 걸리는 다섯 가지 */
.reasons { list-style: none; counter-reset: r; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 820px) { .reasons { grid-template-columns: 1fr 1fr; } .reasons li:last-child { grid-column: 1 / -1; } }
.reasons li { counter-increment: r; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 18px 62px; box-shadow: var(--shadow); color: var(--text-2); }
.reasons li::before { content: counter(r); position: absolute; left: 18px; top: 18px; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.reasons strong { display: block; color: var(--text); margin-bottom: 2px; }

/* 주제 카드 */
.topic-grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .topic-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .topic-grid { grid-template-columns: repeat(3, 1fr); } }
.topic { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease; }
.topic:hover { transform: translateY(-2px); border-color: var(--brand-line); box-shadow: var(--shadow-lg); color: var(--text); }
.topic .card-icon { margin-bottom: 8px; }
.topic strong { font-size: 1.05rem; letter-spacing: -0.02em; }
.topic .topic-desc { color: var(--text-2); font-size: 0.92rem; }
.topic em { margin-top: auto; padding-top: 8px; font-style: normal; font-weight: 700; font-size: 0.9rem; color: var(--brand); }

/* ── 글 페이지 ── */
.prose { max-width: 760px; margin: 0 auto; padding: 28px 20px 56px; }
.crumb { margin: 8px 0 0; font-size: 0.9rem; color: var(--muted); }
.crumb a { color: var(--text-2); text-decoration: none; font-weight: 600; }
.crumb a:hover { color: var(--brand); }
.prose h1 { font-size: clamp(1.85rem, 5.4vw, 2.6rem); line-height: 1.25; letter-spacing: -0.04em; margin: 12px 0 12px; font-weight: 800; }
.prose h1 + .muted { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.9rem; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 0 0 8px; }
.prose h2 { font-size: clamp(1.22rem, 3vw, 1.42rem); margin: 48px 0 14px; font-weight: 800; padding-top: 4px; }
.prose h2::before { content: ""; display: block; width: 28px; height: 4px; border-radius: 4px; background: var(--brand); margin-bottom: 12px; }
.prose .card h2::before, .prose .summary h2::before { display: none; }
.prose p, .prose li { margin: 0 0 12px; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li::marker { color: var(--brand); }
.prose strong { font-weight: 700; }
.prose .src { font-size: 0.85rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 14px 0 0; line-height: 1.8; }
.prose .src a { color: var(--text-2); }
.prose .src a:hover { color: var(--brand); }
.prose code { font-size: 0.88em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; word-break: break-all; }
.summary { background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: var(--radius); padding: 20px 22px 10px; margin: 20px 0 12px; }
.summary > strong:first-child { display: flex; align-items: center; gap: 8px; color: var(--brand); font-weight: 800; margin-bottom: 10px; }
.summary > strong:first-child::before { content: ""; width: 20px; height: 20px; flex: none; background: currentColor; -webkit-mask: var(--i-bolt) center / contain no-repeat; mask: var(--i-bolt) center / contain no-repeat; }
.summary ul { margin: 0; }
.summary li { margin-bottom: 10px; }
:root { --i-bolt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 2 4 14h7l-1 8 9-12h-7z'/%3E%3C/svg%3E"); }
.example { margin: 0 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow); }
.example figcaption { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 800; border-radius: 999px; padding: 3px 10px; margin-bottom: 12px; }
.example.good figcaption { background: var(--ok-bg); color: var(--ok); }
.example.bad figcaption { background: var(--danger-bg); color: var(--danger); }
.example.good figcaption::before { content: "✓"; }
.example.bad figcaption::before { content: "✕"; }
.example pre { margin: 0; white-space: pre-wrap; font: inherit; font-size: 0.95rem; line-height: 1.7; color: var(--text); padding-left: 52px; position: relative; min-height: 40px; }
.example pre::before { content: ""; position: absolute; left: 0; top: 2px; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-line), var(--brand)); }
.faq { margin: 0; display: grid; gap: 10px; }
.faq dt { font-weight: 700; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; padding: 14px 16px 4px 50px; position: relative; margin-top: 4px; }
.faq dt::before { content: "Q"; position: absolute; left: 16px; top: 13px; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-size: 0.8rem; font-weight: 800; }
.faq dd { margin: -10px 0 0; background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; padding: 4px 16px 14px 50px; color: var(--text-2); }
.prose .card.soft {
  margin-top: 40px; border: 0; color: #fff; border-radius: 22px; padding: 26px;
  background: radial-gradient(120% 140% at 100% 0%, #8f7dff 0%, transparent 55%), linear-gradient(135deg, #5b47e0, #3d2bb0);
  box-shadow: 0 18px 40px color-mix(in srgb, #5b47e0 30%, transparent);
}
.prose .card.soft h2 { color: #fff; margin: 0 0 8px; font-size: 1.3rem; }
.prose .card.soft p { color: rgba(255, 255, 255, .88); }
.prose .card.soft a { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: #3d2bb0; font-weight: 800; text-decoration: none; padding: 11px 18px; border-radius: 12px; margin-top: 4px; }
.prose .card.soft a:hover { background: #eef2ff; }
.topics { list-style: none; padding: 0 !important; margin: 0 0 10px; display: grid; gap: 10px; }
@media (min-width: 640px) { .prose .topics { grid-template-columns: 1fr 1fr; } }
.topics li { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; color: var(--text-2); font-size: 0.93rem; transition: border-color .12s ease, transform .12s ease; }
.topics li:hover { border-color: var(--brand-line); transform: translateY(-1px); }
.topics li::marker { content: ""; }
.topics a { font-weight: 700; text-decoration: none; color: var(--text); font-size: 1rem; }
.topics a::after { content: " →"; color: var(--brand); }
.summary .topics { grid-template-columns: 1fr; }
.summary .topics li { background: var(--surface); }

/* ── 꼬리말 ── */
.site-footer { margin-top: 48px; border-top: 1px solid var(--line); background: var(--surface); }
.footer-grid { display: grid; gap: 28px; padding-top: 36px; padding-bottom: 24px; }
@media (min-width: 820px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer-about p { color: var(--muted); font-size: 0.88rem; margin: 12px 0 0; max-width: 36em; }
.footer-links { display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; }
.footer-links strong { font-size: 0.85rem; color: var(--text); margin-bottom: 4px; }
.footer-links a { color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--brand); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 16px; padding-bottom: 28px; color: var(--muted); font-size: 0.84rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ── 물타기 계산기 ── */
.calc-hero { padding: 36px 0 10px; position: relative; }
.calc-hero h1 { font-size: clamp(2rem, 6vw, 2.9rem); line-height: 1.2; letter-spacing: -0.045em; margin: 14px 0 10px; font-weight: 800; }
.calc-hero h1 .hl { color: var(--brand); }
.calc-hero .lead { margin-bottom: 0; }
.calc { display: grid; gap: 16px; align-items: start; }
@media (min-width: 940px) { .calc { grid-template-columns: 1.12fr 0.88fr; } .calc-result { position: sticky; top: 84px; } }
.calc-input { padding: 22px; border-radius: 24px; }
@media (max-width: 600px) { .calc-input { padding: 16px; border-radius: 20px; } }
.tabs { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 16px; }
.tabs button { flex: 1; border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--text-2); padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tabs button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.group { border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 0 0 12px; background: var(--surface); }
.group-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 0.98rem; margin: 0 0 12px; }
.group-title small { font-weight: 600; color: var(--muted); font-size: 0.82rem; }
.fields { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.field { min-width: 0; }
.field label { display: block; font-size: 0.84rem; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); padding: 0 12px; transition: border-color .12s ease, box-shadow .12s ease, background-color .12s ease; }
.input:focus-within { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.input input { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; font: inherit; font-size: 1.05rem; font-weight: 600; padding: 11px 0; color: var(--text); font-variant-numeric: tabular-nums; }
.input input:focus { outline: none; }
.input input::placeholder { color: var(--muted); font-weight: 500; }
.input .unit { color: var(--muted); font-size: 0.88rem; font-weight: 600; margin-left: 6px; white-space: nowrap; }
.buy-row { display: grid; grid-template-columns: 1fr 1fr 1fr 44px; gap: 8px; align-items: end; padding: 12px 0 0; margin-top: 12px; border-top: 1px dashed var(--line); }
.buy-row:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.buy-row .row-no { grid-column: 1 / -1; font-size: 0.8rem; font-weight: 800; color: var(--brand); margin-bottom: -2px; }
@media (max-width: 560px) { .buy-row { grid-template-columns: 1fr 1fr; } .buy-row .field-amount { grid-column: 1 / 2; } .buy-row .remove { justify-self: end; } }
.remove { width: 44px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.remove:hover { color: var(--up); border-color: var(--line-2); }
.remove .icon { width: 18px; height: 18px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.settings { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
.settings .chips span { padding: 7px 14px; font-size: 0.9rem; }
details.more { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 12px; }
details.more summary { cursor: pointer; font-weight: 700; color: var(--text-2); font-size: 0.92rem; }
details.more .fields { margin-top: 12px; }
.hint { font-size: 0.82rem; color: var(--muted); margin: 8px 0 0; }

.calc-result { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: var(--shadow-lg); }
.result-label { font-size: 0.9rem; font-weight: 700; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.result-big { font-size: clamp(2.1rem, 6.5vw, 2.7rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.15; margin: 6px 0 8px; font-variant-numeric: tabular-nums; word-break: break-all; }
.result-big small { font-size: 0.5em; font-weight: 700; color: var(--text-2); margin-left: 4px; letter-spacing: 0; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 0.92rem; padding: 4px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.delta.down { color: var(--down); background: var(--down-bg); }
.delta.up { color: var(--up); background: var(--up-bg); }
.delta.flat { color: var(--text-2); background: var(--surface-2); }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.stat span { display: block; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.stat strong { display: block; font-size: 1.06rem; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; word-break: break-all; }
.stat.up strong { color: var(--up); }
.stat.down strong { color: var(--down); }
.stat.wide { grid-column: 1 / -1; }
.compare { margin-top: 16px; display: grid; gap: 8px; }
.compare-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 14px; padding: 12px 14px; font-size: 0.94rem; }
.compare-row b { font-variant-numeric: tabular-nums; }
.compare-row .arrow { color: var(--brand); font-weight: 800; }
.empty { text-align: center; color: var(--muted); padding: 26px 8px 18px; }
.empty .icon { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--brand); display: block; }
.warn-box { background: var(--warn-bg); color: var(--warn); border-radius: 14px; padding: 12px 14px; font-weight: 600; font-size: 0.93rem; margin-top: 12px; }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.note { font-size: 0.8rem; color: var(--muted); margin: 14px 0 0; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); color: var(--text-2); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-weight: 800; margin-bottom: 10px; }
.steps strong { display: block; color: var(--text); margin-bottom: 2px; }
.formula { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; font-weight: 700; text-align: center; font-size: 1.02rem; margin: 12px 0; box-shadow: var(--shadow); }
.formula small { display: block; font-weight: 500; color: var(--muted); font-size: 0.85rem; margin-top: 6px; }
.logo-mark .lm-drop { fill: #fff; }
.logo-mark .lm-wave { fill: none; stroke: var(--brand); stroke-width: 3.2; stroke-linecap: round; }
