/* 생활 계산기 페이지 — styles.css 토큰을 그대로 씁니다. 모바일 첫 화면에 입력폼이 보이도록 머리말을 짧게 둡니다. */
.calc-head { margin-top: 18px; }
.calc-head h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -0.04em; }
.calc-head p { margin-top: 6px; color: var(--muted); }
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 18px; }
.calc-form, .calc-result-wrap { padding: clamp(18px, 3vw, 28px); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.calc-result-wrap { position: sticky; top: 76px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span:first-child { color: var(--ink-2); font-size: .9rem; font-weight: 700; }
.field small, .calc-form .help { color: var(--faint); font-size: .8rem; }
.field input, .field select { width: 100%; height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); outline: none; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 1.02rem; font-weight: 600; }
.field input:focus, .field select:focus { border-color: var(--primary); background: var(--surface); }
.money-input { position: relative; display: block; }
.money-input input { padding-right: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.money-input em { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); color: var(--muted); font-style: normal; font-size: .9rem; pointer-events: none; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 12px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 14px; }
.presets button, .tabs button, .calc-ghost { padding: 6px 12px; border: 0; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; }
.presets button:hover { background: var(--primary-soft); color: var(--primary); }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; padding: 4px; border-radius: 14px; background: var(--bg-soft); }
.tabs button { flex: 1; padding: 10px; border-radius: 10px; background: transparent; font-size: .92rem; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.advanced { margin: 4px 0 14px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); }
.advanced summary { color: var(--primary); font-size: .9rem; font-weight: 700; cursor: pointer; }
.advanced[open] summary { margin-bottom: 12px; }
.loan-rows { margin: 0 0 12px; padding: 12px 14px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.loan-rows legend { padding: 0 6px; color: var(--ink-2); font-size: .88rem; font-weight: 800; }
.calc-actions { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.calc-submit { flex: 1; height: 52px; border: 0; border-radius: 14px; background: var(--primary); color: #fff; font: inherit; font-size: 1.05rem; font-weight: 800; cursor: pointer; }
.calc-submit:hover { background: var(--primary-strong); }
.calc-ghost { height: 52px; padding: 0 16px; border-radius: 14px; }
.result-hero { padding: 18px 20px; border-radius: 16px; background: var(--primary-soft); }
.result-hero p { color: var(--primary); font-size: .88rem; font-weight: 800; }
.result-hero strong { display: block; margin-top: 4px; color: var(--ink); font-size: clamp(1.8rem, 4.5vw, 2.4rem); font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.result-hero span { display: block; margin-top: 4px; color: var(--ink-2); font-size: .88rem; }
.result-rows { margin: 14px 0 0; }
.result-rows div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: .94rem; }
.result-rows dt { color: var(--muted); }
.result-rows dd { margin: 0; color: var(--ink); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.result-rows .total dt, .result-rows .total dd { color: var(--primary); font-weight: 800; }
.result-rows small, .calc-table small { color: var(--faint); font-weight: 500; }
.result-warn { padding: 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-weight: 700; }
.bad { color: var(--urgent); }
.calc-next { display: grid; gap: 6px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.calc-next p { color: var(--muted); font-size: .84rem; font-weight: 700; }
.calc-next a { padding: 11px 14px; border-radius: 12px; background: var(--surface-2); color: var(--ink); font-weight: 700; text-decoration: none; }
.calc-next a:hover { background: var(--primary-soft); color: var(--primary); }
.calc-table-wrap { overflow-x: auto; margin-top: 14px; }
.calc-table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.calc-table th, .calc-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.calc-table th:first-child { text-align: left; }
.calc-table thead th { color: var(--muted); font-size: .82rem; font-weight: 700; }
.calc-table tbody th { color: var(--ink-2); font-weight: 700; white-space: normal; }
.calc-table .best { color: var(--ok); font-weight: 800; }
.calc-table .total th, .calc-table .total td { color: var(--primary); font-weight: 800; }
.schedule { margin-top: 12px; }
.schedule summary { color: var(--primary); font-weight: 700; cursor: pointer; }
.schedule .calc-table-wrap { max-height: 420px; overflow: auto; }
.calc-doc p + p { margin-top: 10px; }
.calc-doc .note, .calc-result-wrap .note { margin-top: 10px; color: var(--faint); font-size: .84rem; }
.faq details { padding: 14px 0; border-bottom: 1px solid var(--line); }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin-top: 8px; color: var(--ink-2); }
.source-list { padding-left: 18px; }
.source-list li + li { margin-top: 6px; }
.linkish { padding: 0; border: 0; background: none; color: var(--primary); font: inherit; font-weight: 700; cursor: pointer; }
.calc-cards strong span { margin-right: 4px; }
@media (max-width: 860px) {
  .calc-grid { grid-template-columns: 1fr; }
  .calc-result-wrap { position: static; }
}
/* 출처: 본문보다 작게, 카드 없이 */
.calc-sources { margin: 28px 4px 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--faint); font-size: .76rem; line-height: 1.55; }
.calc-sources h2 { margin: 0 0 6px; color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: 0; }
.calc-sources ul { margin: 0; padding-left: 16px; }
.calc-sources li + li { margin-top: 2px; }
.calc-sources a { color: var(--muted); }
.calc-sources .note { margin-top: 8px; font-size: .74rem; }
.calc-sources table { width: 100%; border-collapse: collapse; }
.calc-sources th, .calc-sources td { padding: 4px 6px; border-bottom: 1px solid var(--line); font-weight: 500; text-align: left; }
.fx-swap { width: 100%; height: 40px; margin: -4px 0 12px; }
