/* ======================================================================
   법률 이자 계산기 · 2026-09-19 전면 개선
   법률 업무 앱 표준(헌법 §7 «법정기간 계산기 스타일»). 색은 홈페이지 「청람」과 같은 토큰.
   핵심 시각화 = 기간 타임라인(이율별 색 구간 · 변제 표시) + 주문 문구 상자.
   ====================================================================== */
:root {
    --ground: #f2f5f8;
    --card: #ffffff;
    --line: #d9e2ea;
    --line-strong: #c3d0dc;
    --ink: #10203a;
    --ink-soft: #44546a;
    --ink-light: #7b8899;
    --accent: #0b4a76;
    --accent-2: #2d7fc0;
    --accent-soft: #e3eef7;
    --accent-soft-2: #d3e4f3;
    --seal: #c8432f;
    --seal-soft: #fbe9e6;
    --amber: #9a6a0c;
    --amber-soft: #fdf3dc;
    --ok: #1f6f4a;
    --ok-soft: #e4f3ea;
    --r: 18px;
    --shadow: 0 1px 2px rgba(16, 32, 58, .04), 0 8px 24px rgba(16, 32, 58, .06);
    --font: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
    --serif: 'Noto Serif KR', 'Nanum Myeongjo', serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--ground);
    background-image: radial-gradient(1200px 420px at 50% -120px, #dfeaf5 0%, rgba(223, 234, 245, 0) 70%);
    background-repeat: no-repeat;
    line-height: 1.6;
    word-break: keep-all;
    overflow-wrap: anywhere;
}
a { color: inherit; }
button, input, select, output { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }

/* ── 머리 ─────────────────────────────── */
.top {
    position: sticky; top: 0; z-index: 30;
    background: rgba(255, 255, 255, .86);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
}
.top-in {
    max-width: 1120px; margin: 0 auto; padding: 10px 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-seal {
    width: 36px; height: 36px; border-radius: 9px; flex: none;
    display: grid; place-items: center;
    background: var(--ink); color: #fff;
    font-family: var(--serif); font-weight: 900; font-size: 20px; line-height: 1;
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.2; }
.brand-txt b { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.brand-txt small { font-size: 12px; color: var(--ink-light); }
.head-tools { display: flex; gap: 8px; }
.tool-btn {
    width: 38px; height: 38px; border-radius: 50%;
    display: grid; place-items: center; cursor: pointer;
    background: #fff; border: 1px solid var(--line-strong); color: var(--ink-soft);
    transition: border-color .15s, color .15s, transform .15s;
}
.tool-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.tool-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── 본문 틀 · 히어로(법정기간·양육비 계산기와 같은 틀) ── */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px 40px; }

.hero {
    padding: 30px 0 18px;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px;
    grid-template-areas: "txt char" "facts facts" "note note";
}
.hero-txt { grid-area: txt; min-width: 0; }
.hero .facts { grid-area: facts; }
.hero .notice-line { grid-area: note; }
.hero-char { grid-area: char; align-self: end; position: relative; width: 104px; }
.hero-char img { display: block; width: 100%; height: auto; animation: charIn .6s ease both .1s; }
.hero-bubble { display: none; }
@keyframes charIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (min-width: 760px) {
    .hero { grid-template-areas: "txt char" "facts char" "note char"; padding-bottom: 0; }
    .hero-char { width: 206px; margin: -8px 24px -36px 0; }   /* 허리 아래가 카드 뒤로 숨는다 */
    .hero-bubble {
        position: absolute; right: calc(100% + 4px); top: 30px; width: 208px; margin: 0;
        background: #fff; border: 1px solid var(--line-strong); border-radius: 16px; padding: 11px 13px;
        font-size: 13px; line-height: 1.55; color: var(--ink-soft); box-shadow: var(--shadow);
        animation: charIn .6s ease both .35s;
    }
    .hero-bubble b { color: var(--accent); }
    .hero-bubble::after {
        content: ''; position: absolute; right: -8px; top: 26px; width: 14px; height: 14px; background: #fff;
        border-right: 1px solid var(--line-strong); border-top: 1px solid var(--line-strong); transform: rotate(45deg);
    }
    .board { position: relative; z-index: 1; }
}
/* 말풍선은 본문이 최대 폭(1120px)일 때만. 폴드 안쪽·태블릿 폭에서는 제목·설명을 가린다(법정기간 계산기 2026-09-19 조변 실기기) */
@media (min-width: 1120px) { .hero-bubble { display: block; } }
.eyebrow { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--accent); }
.hero h1 {
    margin: 0; font-family: var(--serif); font-weight: 900;
    font-size: clamp(30px, 6.4vw, 46px); line-height: 1.18; letter-spacing: -.02em;
}
.hero h1 span { color: var(--accent); }
.lead { margin: 12px 0 0; font-size: clamp(15px, 2.4vw, 17px); color: var(--ink-soft); max-width: 640px; }
.facts { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li {
    font-size: 13px; color: var(--ink-soft); background: #fff;
    border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
}
.facts b { color: var(--accent); font-weight: 800; }
.notice-line {
    display: flex; align-items: flex-start; gap: 8px;
    margin: 14px 0 0; padding: 9px 12px; font-size: 13px; color: var(--ink-soft);
    background: rgba(0, 0, 0, .035); border: 1px solid rgba(0, 0, 0, .09); border-radius: 10px;
    max-width: 640px;
}
.notice-line svg { width: 15px; height: 15px; flex: none; margin-top: 3px; fill: none; stroke: currentColor; stroke-width: 2; opacity: .5; }

/* ── 보드: 폰은 한 줄, 넓으면 입력 | 결과 ── */
.board { display: grid; gap: 16px; margin-top: 8px; }
.inputs { display: grid; gap: 16px; min-width: 0; align-content: start; }
@media (min-width: 980px) {
    .board { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 22px; }
    .inputs.stick { position: sticky; top: 76px; }   /* 화면에 다 들어올 때만(script.js fitSticky) */
}

.card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
    box-shadow: var(--shadow); padding: 20px; min-width: 0;
    scroll-margin-top: 72px;
}
.step h2 {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 12px; font-size: 18px; font-weight: 800; letter-spacing: -.01em;
}
.no {
    width: 26px; height: 26px; border-radius: 50%; flex: none;
    display: grid; place-items: center; font-size: 14px; font-weight: 800;
    background: var(--accent); color: #fff;
}
.step-lead { margin: -4px 0 12px 36px; font-size: 13.5px; color: var(--ink-light); line-height: 1.55; }

/* ① 계산 종류 */
.modes { display: grid; gap: 8px; }
@media (min-width: 560px) { .modes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mode {
    text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-width: 0;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
    transition: border-color .15s, background .15s, transform .15s;
}
.mode:hover { border-color: var(--accent-2); transform: translateY(-1px); }
.mode b { font-size: 15px; font-weight: 800; line-height: 1.3; }
.mode small { font-size: 12.5px; color: var(--ink-light); }
.mode[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }

/* ② 입력 */
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; font-weight: 700; color: var(--ink); margin-top: 12px; min-width: 0; }
.field:first-of-type { margin-top: 0; }
.field em { font-style: normal; font-weight: 600; font-size: 12px; color: var(--ink-light); }
.field input[type="date"], .field input[type="number"], .row input {
    font-size: 16px; font-weight: 700; color: var(--ink); width: 100%; min-width: 0;
    border: 1px solid var(--line-strong); border-radius: 11px; padding: 9px 11px; background: #fff; min-height: 44px;
}
.field input:focus, .row input:focus { outline: 0; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(45, 127, 192, .15); }
.money-box {
    display: flex; align-items: center; gap: 6px;
    border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 14px; background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.money-box:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(45, 127, 192, .15); }
.money-box input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; text-align: right;
    font-size: 22px; font-weight: 800; padding: 10px 0; color: var(--ink); font-variant-numeric: tabular-nums;
}
.money-box input::placeholder { font-weight: 500; font-size: 17px; color: #a9b4c1; }
.money-box i { font-style: normal; font-size: 16px; font-weight: 700; color: var(--ink-soft); }
.money-hint { min-height: 1.2em; margin: 6px 2px 0; font-size: 13px; color: var(--accent); font-weight: 700; }
.dates { display: grid; gap: 0 10px; }
@media (min-width: 440px) { .dates { grid-template-columns: 1fr 1fr; } }
.dates .field:first-of-type { margin-top: 12px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
    cursor: pointer; border: 1px solid var(--line-strong); background: #fff; color: var(--ink-soft);
    font-size: 14px; font-weight: 700; padding: 7px 13px; border-radius: 999px; transition: all .15s;
}
.seg button:hover { border-color: var(--accent); color: var(--accent); }
.seg button[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink); cursor: pointer; margin-top: 14px; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.check small, .radio small { display: block; font-size: 12.5px; color: var(--ink-light); margin-top: 2px; line-height: 1.5; font-weight: 500; }
.radio { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink); cursor: pointer; margin-top: 10px; font-weight: 700; }
.radio input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.sub-label { margin: 16px 0 6px; font-size: 13.5px; font-weight: 700; }

.rows { display: grid; gap: 8px; margin-top: 12px; }
/* 빼기 버튼은 줄 머리 오른쪽에 — 폰에서 날짜 칸이 잘리지 않게 두 칸이 폭을 다 나눠 쓴다 */
.row {
    position: relative;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: end;
    padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfd;
}
.row:not(.range) { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.row input { padding: 9px 9px; }
.row input[type="date"] { padding-right: 5px; }
.row input[type="date"]::-webkit-calendar-picker-indicator { margin-left: 2px; padding: 0; }
@media (max-width: 379px) { .row.range { grid-template-columns: minmax(0, 1fr); } }
.row .rlabel { grid-column: 1 / -1; font-size: 12.5px; font-weight: 800; color: var(--accent); margin-bottom: -2px; min-height: 26px; line-height: 26px; padding-right: 44px; }
.row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ink-soft); min-width: 0; }
.row .rate-line { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row .rate-line input { width: 92px; flex: none; }
.row .rate-line span { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.row-del {
    position: absolute; top: 8px; right: 8px;
    width: 34px; height: 30px; border-radius: 9px; border: 1px solid var(--line-strong); background: #fff;
    display: grid; place-items: center; cursor: pointer; color: var(--ink-light);
}
.row-del:hover { border-color: var(--seal); color: var(--seal); }
.row-del svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.row-del:disabled { visibility: hidden; }
.rate-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.row .rate-chips { margin-top: 0; }
.rate-chips button {
    cursor: pointer; border: 1px solid var(--line-strong); background: #fff; color: var(--ink-soft);
    font-size: 12.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px;
}
.rate-chips button:hover { border-color: var(--accent); color: var(--accent); }
.add-row {
    margin-top: 10px; width: 100%; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
    border: 1.5px dashed var(--line-strong); background: #fff; color: var(--accent);
    font-size: 14.5px; font-weight: 800; padding: 10px; border-radius: 12px;
}
.add-row:hover { border-color: var(--accent); background: var(--accent-soft); }
.add-row svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.more { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.more summary { cursor: pointer; font-size: 13.5px; font-weight: 800; color: var(--accent); list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: ' +'; }
.more[open] summary::after { content: ' −'; }

/* 주문 문구 */
.order { margin-top: 16px; padding: 14px; border-radius: 14px; background: #fbf8ef; border: 1px solid #eadfbf; }
.order-label { margin: 0 0 6px; font-size: 13px; font-weight: 800; color: var(--amber); }
.order-label span { font-weight: 600; color: var(--ink-light); }
.order-txt { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 15.5px; line-height: 1.75; color: var(--ink); word-break: keep-all; }
.act.small { margin-top: 10px; padding: 7px 11px; font-size: 13px; }

/* 기간 타임라인 — 날짜를 넣기 전에도 틀이 보인다 */
.tlbox { margin-top: 18px; }
.result .tlbox:nth-child(2) { margin-top: 0; }
.tl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tl-title { margin: 0; font-size: 15px; font-weight: 800; }
.tl-lg { font-size: 12px; color: var(--ink-light); font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.tl-lg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.tl { position: relative; display: flex; height: 40px; border-radius: 10px; overflow: hidden; background: #eef2f6; gap: 2px; }
.tl .seg-b { min-width: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap; font-size: 12px; font-weight: 800; color: #fff; }
.tl .seg-b.tiny { font-size: 0; }
.tl .seg-b.r-low { background: #6fa3cf; }
.tl .seg-b.r-mid { background: #2d7fc0; }
.tl .seg-b.r-high { background: var(--accent); }
.tl .seg-b.r-max { background: var(--seal); }
.tl.empty { background: repeating-linear-gradient(90deg, #eef2f6 0 18px, #e4eaf0 18px 20px); }
.tl-marks { position: relative; height: 18px; margin-top: 4px; font-size: 11px; color: var(--ink-light); font-weight: 700; font-variant-numeric: tabular-nums; }
.tl-marks span { position: absolute; top: 0; white-space: nowrap; transform: translateX(-50%); }
.tl-marks span:first-child { transform: none; }
.tl-marks span:last-child { transform: translateX(-100%); }
.tl-pay { position: absolute; top: -1px; width: 0; height: 42px; border-left: 2px dashed #fff; }
.tl-pay::after { content: ''; position: absolute; top: -6px; left: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); border: 2px solid #fff; }
.tl-rows { display: grid; gap: 6px; margin-top: 10px; }
.tl-row {
    display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 4px 10px; align-items: center;
    padding: 8px 10px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font-size: 13px; color: var(--ink-soft);
}
.tl-row i { width: 10px; height: 10px; border-radius: 3px; }
.tl-row b { color: var(--ink); font-weight: 800; }
.tl-row .amt { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-row.pay { background: var(--ok-soft); border-color: #cbe7d6; }
.tl-row.pay i { background: var(--ok); border-radius: 50%; }
.tl-row small { grid-column: 2 / -1; font-size: 12px; color: var(--ink-light); }
.i-low { background: #6fa3cf; } .i-mid { background: #2d7fc0; } .i-high { background: var(--accent); } .i-max { background: var(--seal); }

/* ── 결과 ─────────────────────────── */
.result { padding: 22px; }
.empty { margin: 0 0 16px; font-size: 14px; color: var(--ink-light); line-height: 1.55; }
.empty b { color: var(--ink-soft); font-size: 15px; }
.linklike { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 700; text-decoration: underline; cursor: pointer; font-size: inherit; }

.out { animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.out-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kicker { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.badge { font-size: 12px; font-weight: 800; color: var(--accent); border: 1.5px solid var(--accent); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.badge.paper { color: var(--ink-soft); border-color: var(--ink-light); }

.big {
    margin: 6px 0 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px;
    font-size: clamp(36px, 9vw, 50px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1;
    font-variant-numeric: tabular-nums; color: var(--ink);
}
.big .won { font-size: .5em; font-weight: 800; margin-left: -4px; }
.big small { font-size: .38em; font-weight: 700; color: var(--ink-soft); letter-spacing: 0; margin-right: 4px; }
.big-sub { margin: 8px 0 0; font-size: 14px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 6px; }
.big-sub .chip { background: #f3f6f9; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.big-sub .chip b { color: var(--ink); font-variant-numeric: tabular-nums; }
.big-sub .save { color: var(--ok); background: var(--ok-soft); border-color: #cbe7d6; font-weight: 700; }

/* 계산 과정 */
.path { list-style: none; margin: 20px 0 0; padding: 0; position: relative; }
.path::before { content: ''; position: absolute; left: 11px; top: 12px; bottom: 12px; width: 2px; background: var(--line); }
.path li { position: relative; padding: 0 0 12px 34px; font-size: 14px; color: var(--ink-soft); }
.path li:last-child { padding-bottom: 0; }
.path li > b:first-child { display: block; color: var(--ink); font-size: 14.5px; font-weight: 800; }
.path li::before {
    content: attr(data-n); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%;
    display: grid; place-items: center; font-size: 12px; font-weight: 800;
    background: #fff; border: 2px solid var(--line-strong); color: var(--ink-soft);
}
.path li.end::before { background: var(--accent); border-color: var(--accent); color: #fff; }
.path .calc { display: block; font-variant-numeric: tabular-nums; }
.path .calc b { color: var(--ink); }
.path .dim { color: var(--ink-light); font-size: 13px; }
.path .nw { white-space: nowrap; }

.note {
    margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.6;
    background: #f6f9fc; border: 1px solid var(--line); color: var(--ink-soft);
}
.note b { color: var(--ink); }
.note.warn { background: var(--amber-soft); border-color: #f0dca8; color: #6b4a07; }
.note.warn b { color: #4d3505; }
.note.law { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: none; border: 0; padding: 0; margin-top: 14px; }
.law-chip { font-size: 12.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 2px 8px; }

.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.act {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
    border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
    font-size: 14px; font-weight: 700; padding: 9px 13px; border-radius: 11px;
    transition: border-color .15s, color .15s;
}
.act:hover { border-color: var(--accent); color: var(--accent); }
.act svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 조변 버튼 — 결과 화면에 하나만(헌법 §5) */
.cta {
    display: flex; align-items: center; gap: 12px; margin-top: 18px; text-decoration: none;
    background: linear-gradient(135deg, #10203a 0%, #163257 100%); color: #fff;
    border-radius: 16px; padding: 12px 14px; transition: transform .15s, box-shadow .15s;
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(16, 32, 58, .22); }
.cta img { width: 56px; height: 56px; border-radius: 50%; flex: none; background: #dce8f4; object-fit: cover; border: 2px solid rgba(255, 255, 255, .7); }
.cta-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.45; }
.cta-txt b { font-size: 15px; font-weight: 800; }
.cta-txt span { font-size: 13px; color: #c9d6e6; }
.cta-go {
    flex: none; font-size: 13px; font-weight: 800; color: var(--ink); background: #fff;
    border-radius: 999px; padding: 7px 12px; white-space: nowrap;
}
@media (max-width: 440px) {
    .cta { flex-wrap: wrap; }
    .cta-go { margin-left: 68px; width: calc(100% - 68px); text-align: center; }
}

/* ── 참고 표(= 계산 데이터) · 법정기간 계산기와 같은 행 모양 ── */
.ref, .rules, .faq { margin-top: 40px; }
.ref h2, .rules h2, .faq h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.ref-lead { margin: 0 0 10px; color: var(--ink-soft); font-size: 14.5px; }
.ref-lead b { color: var(--ink); }
.ref h3 { margin: 24px 0 8px; font-size: 16px; font-weight: 800; color: var(--accent); }
.ref h3 em { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--ink-light); margin-left: 4px; }
.table { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tr {
    display: grid; grid-template-columns: 1.2fr .7fr 1.6fr 1.2fr; gap: 10px; align-items: center;
    width: 100%; text-align: left; border: 0; background: none; padding: 11px 14px; font-size: 14px;
    border-top: 1px solid var(--line); color: var(--ink-soft);
}
.tr.t3 { grid-template-columns: 1.3fr 1.4fr 1.2fr; }
.tr:first-child { border-top: 0; }
button.tr { cursor: pointer; transition: background .12s; }
button.tr:hover { background: #f6f9fc; }
.tr span:first-child { color: var(--ink); font-weight: 700; }
.tr span:nth-child(2) { color: var(--accent); font-weight: 800; }
.tr em { font-style: normal; font-weight: 600; font-size: 12px; color: var(--ink-light); margin-left: 2px; }
.tr span:nth-child(4), .tr.t3 span:nth-child(3) { font-size: 12.5px; color: var(--ink-light); }
.tr.th { background: #f6f9fc; font-size: 12px; font-weight: 800; color: var(--ink-light); padding-top: 8px; padding-bottom: 8px; }
.tr.th span { color: var(--ink-light) !important; font-weight: 800 !important; font-size: 12px !important; }
.tr.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
@media (max-width: 720px) {
    .tr { grid-template-columns: 1fr auto; gap: 2px 10px; }
    .tr span:nth-child(3), .tr span:nth-child(4) { grid-column: 1 / -1; }
    .tr span:nth-child(3) { font-size: 13px; }
    .tr.t3 { grid-template-columns: 1fr auto; }
    .tr.th { display: none; }
    .table > .tr:nth-child(2) { border-top: 0; }
}
.ref-note { margin: 8px 2px 0; font-size: 13px; color: var(--ink-light); line-height: 1.6; }
.ref-note b { color: var(--ink-soft); }

.rules ol { margin: 10px 0 0; padding: 0; list-style: none; counter-reset: r; display: grid; gap: 8px; }
.rules li {
    counter-increment: r; position: relative; padding: 12px 14px 12px 48px; font-size: 14.5px; color: var(--ink-soft);
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
}
.rules li::before {
    content: counter(r); position: absolute; left: 14px; top: 12px; width: 24px; height: 24px; border-radius: 50%;
    display: grid; place-items: center; font-size: 13px; font-weight: 800; background: var(--ink); color: #fff;
}
.rules li b { color: var(--ink); }
.rules-foot { margin: 8px 2px 0; font-size: 13px; color: var(--ink-light); }

.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-top: 8px; }
.faq summary { cursor: pointer; padding: 13px 16px; font-weight: 700; font-size: 15px; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-weight: 800; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0; padding: 0 16px 14px; font-size: 14.5px; color: var(--ink-soft); }

/* ── 바닥 ─────────────────────────── */
.foot { margin-top: 48px; background: var(--ink); color: #c9d6e6; }
.foot-in { max-width: 1120px; margin: 0 auto; padding: 26px 20px 30px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot-links a { color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.foot-note { margin: 14px 0 0; font-size: 13px; line-height: 1.7; max-width: 760px; }
.foot-note a { color: #fff; }
.foot-copy { margin: 10px 0 0; font-size: 12px; color: #8fa1b8; }
.foot-copy span { font-family: var(--serif); font-weight: 900; }

.toast {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(10px);
    max-width: min(88vw, 420px); text-align: center; background: rgba(16, 32, 58, .95); color: #fff;
    font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: 999px; z-index: 100;
    opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%); }

@media (max-width: 480px) {
    .wrap { padding: 0 16px 32px; }
    .top-in { padding: 9px 16px; }
    .card { padding: 16px; }
    .result { padding: 18px 16px; }
    .hero { padding-top: 22px; }
    .step-lead { margin-left: 0; }
    .act { padding: 9px 11px; font-size: 13.5px; }
    .order-txt { font-size: 14.5px; }
    .tl { height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
    /* 바닥글: 남색 띠·링크 줄은 빼고 참고용 안내와 사무소 표기만 작게(2026-09-19 인쇄 점검 · 이자 계산기는 끝줄 하나로 빈 2쪽이 생겼다) */
    .foot { margin-top: 14px; background: none !important; color: #555 !important; break-inside: avoid; }
    .foot-in { max-width: none; padding: 8px 20px 0; border-top: 1px solid #ccc; }
    .foot-links { display: none !important; }
    .foot-note { margin: 0; max-width: none; font-size: 8.5pt; line-height: 1.5; }
    .foot-note a { color: inherit; }
    .foot-copy { margin: 3px 0 0; font-size: 8pt; color: #777 !important; }
    .top, .hero, .inputs, .ref, .rules, .faq, .acts, .cta, .toast { display: none !important; }
    body { background: #fff; }
    .board { display: block; }
    .card { box-shadow: none; border: 0; }
    .tl .seg-b, .tl-row i { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .order .act { display: none; }
}
