/* 상단 메뉴 "산업은행" (kdb.php) — 색은 style.css 토큰만 사용 */
.kdb-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 15px; }
.kdb-head .section-title { margin-bottom: 0; }
.kdb-search { display: flex; gap: 6px; flex-wrap: wrap; flex: 0 1 700px; justify-content: flex-end; }
.kdb-search select, .kdb-search input[type=text] {
    padding: 9px 10px; border: 1px solid var(--line-input); border-radius: 4px;
    font-size: 14px; font-family: inherit; background: var(--input-bg); color: var(--input-text);
}
.kdb-q { display: flex; gap: 6px; flex: 1 1 220px; min-width: 200px; }
.kdb-q input[type=text] { flex: 1; min-width: 0; }
.kdb-q button { flex-shrink: 0; padding: 9px 20px; border: none; border-radius: 4px; background: var(--primary); color: #fff; cursor: pointer; font-size: 14px; }
.kdb-q button:hover { background: var(--primary-dark); }

.kdb-list { background: var(--surface); border-radius: 8px; padding: 6px 20px; }
.kdb-item { display: flex; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.kdb-item:last-child { border-bottom: none; }
.kdb-main { flex: 1; min-width: 0; }
.kdb-main h3 { font-size: 17px; margin: 6px 0 6px; color: var(--text); }
.kdb-desc { font-size: 13.5px; color: var(--muted-2); line-height: 1.6; }
.kdb-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.kdb-tag { font-size: 11.5px; font-weight: bold; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--line); color: var(--text-3); }
.kdb-tag.who { border-color: var(--primary); color: var(--link); }
.kdb-tag.new { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-text); }
.kdb-meta { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin-top: 10px; font-size: 13px; }
.kdb-meta dt { color: var(--faint); }
.kdb-meta dd { color: var(--text-3); }

.kdb-rate { flex: 0 0 150px; display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 2px; }
.kdb-rate .lbl { font-size: 12px; color: var(--faint); }
.kdb-rate strong { font-size: 28px; line-height: 1.1; color: var(--link); font-variant-numeric: tabular-nums; }
.kdb-rate strong small { font-size: 15px; margin-left: 1px; }
.kdb-rate .cond { font-size: 12px; color: var(--muted-2); }
.kdb-rate .chg { font-size: 12px; font-weight: bold; }
.kdb-rate .chg.up { color: var(--danger-text); }
.kdb-rate .chg.down { color: var(--link); }

.kdb-note { margin-top: 16px; font-size: 12px; color: var(--faint); line-height: 1.7; }

@media (max-width: 768px) {
    .kdb-search { flex-basis: 100%; justify-content: flex-start; }
    .kdb-search select { flex: 1 1 30%; }
    .kdb-list { padding: 4px 14px; }
    .kdb-item { flex-direction: column; gap: 8px; }
    .kdb-rate { flex: none; flex-direction: row; align-items: baseline; gap: 8px; }
}

/* 기금대출: 오른쪽 칸은 대출기간 */
.kdb-rate.loan strong.term { font-size: 20px; color: var(--text); }
.kdb-desc b { color: var(--text-3); margin-right: 4px; }

/* 퇴직연금 금리표 */
.kdb-table-wrap { background: var(--surface); border-radius: 8px; padding: 6px 16px; overflow-x: auto; }
.kdb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.kdb-table th, .kdb-table td { padding: 11px 8px; border-bottom: 1px solid var(--line-soft); text-align: center; white-space: nowrap; }
.kdb-table tbody tr:last-child td { border-bottom: none; }
.kdb-table th { color: var(--muted); font-size: 13px; font-weight: bold; }
.kdb-table th a { color: inherit; }
.kdb-table th a:hover { color: var(--link); }
.kdb-table .left { text-align: left; }
.kdb-table td.name { white-space: normal; color: var(--text); min-width: 180px; }
.kdb-table td.term { color: var(--text-3); }
.kdb-table .num { font-variant-numeric: tabular-nums; text-align: right; color: var(--text-2); }
.kdb-table .num.on { background: var(--hover-bg); }
.kdb-table th.num.on a { color: var(--link); }
.kdb-table td.best { color: var(--link); font-weight: bold; }
.kdb-table .chg { display: block; font-size: 11px; font-weight: bold; }
.kdb-table .chg.up { color: var(--danger-text); }
.kdb-table .chg.down { color: var(--link); }
.kdb-table tbody tr:hover td { background: var(--hover-bg); }

@media (max-width: 768px) {
    /* 좁은 화면: 표를 줄마다 카드로 (형태별 금리를 2칸씩) */
    .kdb-table-wrap { padding: 4px 12px; }
    .kdb-table thead { display: none; }
    .kdb-table, .kdb-table tbody { display: block; }
    .kdb-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
    .kdb-table tbody tr:last-child { border-bottom: none; }
    .kdb-table td { border: none; padding: 2px 0; text-align: left; white-space: normal; }
    /* style.css 의 모바일 표 규칙(1·4번째 칸 숨김)이 여기에는 걸리지 않게 display 를 직접 지정 */
    .kdb-table td.name { display: block; grid-column: 1 / -1; font-weight: bold; min-width: 0; }
    .kdb-table td.term { display: block; grid-column: 1 / -1; font-size: 13px; }
    .kdb-table td.num { display: flex; justify-content: space-between; gap: 6px; text-align: right; }
    .kdb-table td.num::before { content: attr(data-label); color: var(--faint); font-weight: normal; font-size: 12px; }
    .kdb-table .chg { display: inline; margin-left: 4px; }
    .kdb-table tbody tr:hover td { background: none; }
}
