/* style.css — English site base (sites-hq/templates/en). Palette and the one bold result card live in sites-hq/design/themes/<id>.css, appended by tools/apply-design.mjs. */
: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: var(--font-body, "Source Sans 3"), system-ui, -apple-system, "Segoe UI", Roboto, 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; overflow-wrap: break-word;
  -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; overflow-wrap: break-word; }
.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; overflow-wrap: break-word; }
.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; }

/* family-links: 꼬리말 4칸 */
@media (min-width: 820px) { .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }

/* design-v2 */
/* design-v2 · base — 조용한 틀. 입력·표·글은 담백하게 두고, 힘은 결과 카드(사이트별 서식) 한 곳에만 쓴다.
   sites-hq/tools/apply-design.mjs 가 각 사이트 style.css 끝의 design-v2 표시 사이에 넣는다. 여기서 고치고 다시 돌린다. */
:root { --radius: 14px; --radius-md: 12px; --radius-sm: 10px; --shadow: none; --shadow-lg: none; }

/* 첫 화면: 한 단어 색 강조·알약 라벨·점 장식을 걷어 낸다 */
.hero::before { display: none; }
.hero h1 .hl, .calc-hero h1 .hl { color: inherit; }
.eyebrow { display: block; background: none; border: 0; padding: 0; border-radius: 0; color: var(--text-2); font-weight: 600; font-size: 0.92rem; }
.eyebrow .dot { display: none; }
.calc-hero { padding: 44px 0 14px; }
.calc-hero h1 { font-size: clamp(2.05rem, 6.2vw, 3.1rem); line-height: 1.16; letter-spacing: -0.055em; margin: 10px 0 12px; }
.lead { max-width: 30em; }
.crumb { font-size: 0.88rem; }
.hero-split { display: grid; gap: 28px; align-items: end; }
@media (min-width: 900px) { .hero-split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 48px; } }
.hero-split .lead { margin-bottom: 0; }

/* 계산기 목록: 똑같은 카드 대신 줄로 나뉜 색인 */
.topic-grid { display: block; border-top: 1px solid var(--text); }
@media (min-width: 760px) { .topic-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 44px; } }
.topic { display: block; background: none; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; padding: 16px 2px 15px; box-shadow: none; transform: none; color: var(--text); }
.topic:hover { transform: none; box-shadow: none; border-color: var(--line-2); }
.topic .card-icon, .topic em { display: none; }
.topic strong { display: block; font-size: 1.1rem; letter-spacing: -0.03em; }
.topic .topic-desc { display: block; margin-top: 3px; font-size: 0.92rem; line-height: 1.55; }
.topic:hover strong, .topic:focus-visible strong { color: var(--brand-strong); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* 입력: 카드 안의 카드를 없애고 묶음만 남긴다 */
.calc-input.card { background: none; border: 0; box-shadow: none; padding: 0; border-radius: 0; }
.group { border-radius: var(--radius); border-color: var(--line-2); }
.chips input:checked + span { box-shadow: none; }
.btn-primary { box-shadow: none; }
.tabs button[aria-selected="true"] { box-shadow: 0 0 0 1px var(--line-2); }

/* 결과: 사이트별 서식이 덮어쓰기 전의 공통 바탕 — 서식의 ::before/::after 가 붙도록 늘 위치 지정 요소로 둔다 */
.calc-result { box-shadow: none; position: relative; }
@media (min-width: 940px) { .calc-result { position: sticky; } }
.calc > #result { margin-top: 0; }
.delta { background: none !important; padding: 0; border-radius: 0; font-weight: 700; font-size: 0.95rem; }
.delta.flat { color: var(--text-2); }

/* 설명 구역 */
.steps li { background: none; border: 0; border-top: 2px solid var(--text); border-radius: 0; padding: 14px 0 0; box-shadow: none; }
.steps li::before { width: auto; height: auto; background: none; border-radius: 0; color: var(--muted); font-size: 0.85rem; justify-content: start; margin-bottom: 4px; }
.formula { box-shadow: none; text-align: left; }
.faq { gap: 0; border-top: 1px solid var(--text); }
.faq dt { background: none; border: 0; border-radius: 0; padding: 16px 0 4px; margin: 0; }
.faq dt::before { display: none; }
.faq dd { background: none; border: 0; border-radius: 0; margin: 0; padding: 0 0 16px; border-bottom: 1px solid var(--line-2); }
.prose h2::before { display: none; }
.prose h1 + .muted { display: block; background: none; border: 0; padding: 0; border-radius: 0; }
.mock-card, .mock-float { box-shadow: 0 1px 0 var(--line-2); }
.table-wrap { border-radius: 10px; }

/* design-v2 · English overrides — Latin type wants far less negative tracking than Hangul, and numbers must never split. */
body { letter-spacing: 0; }
h1, h2, h3, .logo, .topic strong, .verdict-body strong { letter-spacing: -0.01em; }
.hero h1, .calc-hero h1, .prose h1 { letter-spacing: -0.02em; }
.calc-hero h1 { line-height: 1.1; }
.result-big { letter-spacing: -0.02em; }
.stat strong, .result-big, .delta { overflow-wrap: normal; }
.stat strong { white-space: nowrap; }

/* family-links-en: calculators and games stacked in one footer column */
.footer-family { display: grid; gap: 22px; align-content: start; }

/* design-v2 · Payoff Math — result card = one page of a mortgage payment coupon book: a navy band with the payment count,
   a boxed amount due in Source Serif 4, a write-in line for additional principal, a perforated tear line with punched notches,
   and the records stub you keep. Pages of the book show underneath. Everything else stays quiet. */
:root {
  --font-body: "Source Sans 3";
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --bg: #f3f4f7; --surface: #ffffff; --surface-2: #f7f8fb; --line: #e2e5ed; --line-2: #c9cedb;
  --text: #161b2e; --text-2: #434a61; --muted: #5b6277;
  --brand: #24305e; --brand-strong: #1a2347; --brand-ink: #ffffff; --brand-soft: #e7eaf4; --brand-line: #c3c9e0;
  /* coupon */
  --paper: #fffef9; --paper-ink: #1b2238; --paper-2: #525972; --paper-edge: #cdd1dc; --perf: #8f96ab;
  --band: #24305e; --band-ink: #ffffff; --write: #24305e; --logo: #24305e; --paper-ok: #06703f; --paper-bad: #b42318;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1220; --surface: #161a2b; --surface-2: #1b2033; --line: #262c42; --line-2: #363d58;
    --text: #e7e9f1; --text-2: #b8bdd0; --muted: #969cb2;
    --brand: #a9b8f0; --brand-strong: #c8d2f7; --brand-ink: #0f1220; --brand-soft: #1d2442; --brand-line: #34406e;
    /* the coupon stays paper-like but dimmed, so it doesn't glare on a dark page */
    --paper: #191e31; --paper-ink: #eceef5; --paper-2: #aab0c5; --paper-edge: #363d59; --perf: #646c8c;
    --band: #2d3b7a; --band-ink: #ffffff; --write: #c8d2f7; --logo: #2d3b7a; --paper-ok: #5bd69b; --paper-bad: #ff8b80;
  }
}

.logo-mark .lm-bg { fill: var(--logo); }
.logo-mark .lm-fg { fill: none; stroke: #fff; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }

/* display face only where it carries meaning: headings and money */
.calc-hero h1, .prose h1, .section-head h2, .prose h2, .result-big, .formula { font-family: var(--font-display); }
.calc-hero h1, .prose h1 { font-weight: 700; letter-spacing: -0.015em; }
.section-head h2, .prose h2 { font-weight: 700; letter-spacing: -0.005em; }
.formula { font-weight: 600; font-size: 1.12rem; }
.formula small { font-family: var(--font); }

/* inputs */
.input .pre { color: var(--muted); font-weight: 600; margin-right: 4px; }
.unit-select { border: 0; background: transparent; font: inherit; font-size: 0.9rem; font-weight: 600; color: var(--text-2); min-height: 44px; padding: 0 2px 0 6px; cursor: pointer; max-width: 46%; }
.unit-select.select-full { width: 100%; max-width: none; padding: 0; font-size: 1.05rem; color: var(--text); }
.unit-select:focus-visible { outline: 2px solid var(--brand); outline-offset: 0; }
.input input[type="month"] { font-size: 1rem; min-height: 22px; }
.field-legend { font-size: 0.84rem; font-weight: 600; color: var(--text-2); padding: 0; margin: 0 0 6px; }
.term-field { margin: 14px 0 0; }
.chips span { padding: 10px 16px; }
.check { margin: 12px 0 0; }
.check input { margin-top: 2px; }
@media (max-width: 520px) { .fields { grid-template-columns: 1fr; } }
.hint a { color: var(--text-2); }

/* result column: the coupon is the card, so the column itself has no frame */
.calc-result { background: none; border: 0; padding: 0; border-radius: 0; }
.calc-result .note { margin: 18px 2px 0; font-size: 0.86rem; line-height: 1.6; color: var(--muted); }
.calc-result .note a { color: var(--text-2); }

/* ── the coupon ── */
.coupon {
  position: relative; background: var(--paper); color: var(--paper-ink); border: 1px solid var(--paper-edge); border-radius: 4px;
  /* the next pages of the book, peeking out underneath */
  box-shadow: 0 5px 0 -2px var(--paper), 0 5px 0 -1px var(--paper-edge), 0 10px 0 -4px var(--paper), 0 10px 0 -3px var(--paper-edge);
  margin-bottom: 10px;
}
.coupon-face { padding: 0 20px 16px; }
.coupon .coupon-band {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px;
  margin: 0 -20px 16px; padding: 10px 20px; background: var(--band); color: var(--band-ink); border-radius: 3px 3px 0 0;
  font-weight: 700; font-size: 0.92rem; line-height: 1.4;
}
.coupon-count { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.coupon-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 1px; background: var(--paper-edge); border: 1px solid var(--paper-edge); margin: 0 0 16px; }
.coupon-fields div { background: var(--paper); padding: 6px 10px 7px; min-width: 0; }
.coupon-fields dt { font-size: 0.78rem; font-weight: 600; color: var(--paper-2); line-height: 1.4; }
.coupon-fields dd { margin: 0; font-weight: 700; font-size: 0.97rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.coupon .result-label { color: var(--paper-2); font-size: 0.86rem; font-weight: 600; margin: 0; }
.coupon .result-big {
  display: inline-block; margin: 4px 0 14px; padding: 2px 14px 4px; border: 2px solid var(--paper-ink); border-radius: 2px;
  font-weight: 700; font-size: clamp(2.05rem, 8.4vw, 2.7rem); line-height: 1.2; letter-spacing: -0.01em; color: var(--paper-ink); white-space: nowrap;
}
.coupon-write { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; font-size: 0.88rem; font-weight: 600; color: var(--paper-2); }
.coupon-write > span:first-child { white-space: nowrap; }
.coupon-write .blank {
  flex: 1; min-width: 70px; min-height: 1.7em; border-bottom: 1.5px solid var(--paper-2); padding: 0 4px;
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--write); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.coupon .coupon-note { margin: 0; font-size: 0.9rem; line-height: 1.55; color: var(--paper-2); }
.coupon-note strong { color: var(--paper-ink); }

/* tear line: dashes between two punched half-circle notches (the notch arc is drawn only on the side inside the paper) */
.coupon-perf { position: relative; height: 0; margin: 4px 16px; border-top: 2px dashed var(--perf); }
.coupon-perf::before, .coupon-perf::after {
  content: ""; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--paper-edge);
}
/* only the half inside the paper is painted (plus 1px to cover the card's own edge line) */
.coupon-perf::before { left: -28.5px; clip-path: inset(0 0 0 calc(50% - 1px)); }
.coupon-perf::after { right: -28.5px; clip-path: inset(0 calc(50% - 1px) 0 0); }

.coupon-stub { padding: 12px 20px 14px; }
.coupon .stub-title { margin: 0 0 4px; font-size: 0.8rem; font-weight: 600; color: var(--paper-2); }
.stub-rows { margin: 0; }
.stub-rows div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 14px; padding: 6px 0; border-bottom: 1px dotted var(--paper-edge); }
.stub-rows div:last-child { border-bottom: 0; }
.stub-rows dt { font-size: 0.92rem; color: var(--paper-2); }
.stub-rows dd { margin: 0 0 0 auto; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stub-rows .total { border-top: 1.5px solid var(--paper-ink); border-bottom: 0; margin-top: -1px; }
.stub-rows .total dt { color: var(--paper-ink); font-weight: 700; }
.stub-rows .total dd { font-family: var(--font-display); font-size: 1.12rem; }
.stub-rows .gap { margin-top: 12px; border-top: 1px solid var(--paper-edge); }
.stub-rows .good dd { color: var(--paper-ok); }
.stub-rows .bad dd { color: var(--paper-bad); }

.coupon-blank .coupon-face { padding-bottom: 22px; }
.coupon .coupon-fix { margin: 4px 0 0; padding-left: 12px; border-left: 3px solid var(--warn); font-weight: 600; color: var(--paper-ink); }
.coupon .coupon-warn { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid var(--warn); background: var(--warn-bg); color: var(--paper-ink); font-size: 0.92rem; font-weight: 600; }

/* coupons inside article pages */
.prose .coupon { margin: 22px 0 30px; max-width: 470px; }

/* ── tables ── */
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-wrap td { white-space: nowrap; }
tr.hl td { background: var(--brand-soft); font-weight: 700; }
.amort td { padding: 4px 14px; vertical-align: middle; }
.amort tr.yr td { font-weight: 600; }
.amort tr.mo td { padding-top: 7px; padding-bottom: 7px; font-size: 0.88rem; color: var(--text-2); background: var(--surface-2); }
.amort tr.mo td:first-child { padding-left: 34px; }
.yr-btn {
  display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--brand); white-space: nowrap;
}
.yr-btn::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s ease; }
.yr-btn[aria-expanded="true"]::before { transform: rotate(45deg); }
.schedule-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px 16px; }
.schedule-head p { max-width: 46em; }
.btn-sm { min-height: 44px; }

/* explanation blocks */
.explain > p, .explain .plain-list, .src-line { max-width: 46em; }
.sub-head { margin-top: 40px; }
.plain-list { padding-left: 1.2em; margin: 0 0 12px; }
.plain-list li { margin: 0 0 8px; }
.src-line { font-size: 0.9rem; color: var(--text-2); margin: 12px 0 0; }
.src-line a, .prose .src a { color: var(--text-2); }
.steps { margin-top: 18px; }

/* mortgage amount pages */
.amount-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; margin: 28px 0 0; padding-top: 14px; border-top: 1px solid var(--line-2); }
.amount-nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.amount-list { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0 !important; list-style: none; }
.amount-list li { margin: 0; }
.amount-list li::marker { content: ""; }
.amount-list a { display: inline-flex; min-height: 44px; align-items: center; }

@media (max-width: 600px) { .nav a { padding: 8px 8px; } }
/* /design-v2 */
