/* calc.css — premium calculator */

.calc-wrap { display: grid; grid-template-columns: 380px 1fr; gap: clamp(20px, 3vw, 36px); align-items: start; }
@media (max-width: 900px) { .calc-wrap { grid-template-columns: 1fr; } }

.calc-form { padding: clamp(22px, 3vw, 32px); position: sticky; top: 90px; }
@media (max-width: 900px) { .calc-form { position: static; } }

.seg { display: flex; padding: .3rem; gap: .3rem; background: var(--bg-alt); border-radius: 999px; margin-bottom: 1.4rem; }
.seg button { flex: 1; border: 0; cursor: pointer; padding: .7rem; border-radius: 999px; font-weight: 700; font-family: var(--font-body); color: var(--ink-soft); background: transparent; transition: .25s; }
.seg button.active { color: #fff; box-shadow: var(--shadow-2); }
.seg button.active[data-v="pli"] { background: var(--grad-navy); }
.seg button.active[data-v="rpli"] { background: linear-gradient(135deg,#2f9e73,#1f7d59); }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 650; font-size: .9rem; margin-bottom: .4rem; color: var(--ink); }
.field input[type=date], .field input[type=number], .field select {
  width: 100%; padding: .8rem .9rem; border-radius: var(--r-sm); font-size: 1rem; font-family: var(--font-body);
  border: 1px solid var(--line); background: var(--glass-bg); color: var(--ink); transition: border .2s, box-shadow .2s;
}
.field input:focus, .field select:focus { border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(79,142,240,.18); outline: none; }
.field .hint { font-size: .8rem; color: var(--ink-muted); margin-top: .3rem; }
.field .err { font-size: .82rem; color: #c0392b; margin-top: .3rem; display: none; }
.field.invalid .err { display: block; }
.field.invalid input { border-color: #e0796b; }

.sum-row { display: flex; align-items: center; gap: .8rem; }
.sum-row input[type=range] { flex: 1; accent-color: var(--gold-500); }
.sum-out { font-family: var(--font-display); font-weight: 600; color: var(--navy-700); min-width: 8ch; text-align: right; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem .2rem; border-top: 1px solid var(--line); }
.toggle-row span { font-weight: 600; font-size: .92rem; }
.switch { position: relative; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--grey-200); border-radius: 999px; transition: .25s; cursor: pointer; }
.switch .slider::before { content:""; position:absolute; width:20px; height:20px; left:3px; top:3px; background:#fff; border-radius:50%; transition:.25s; box-shadow:0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + .slider { background: var(--emerald-500); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.cond-group { display: none; padding-top: .4rem; }
.cond-group.show { display: block; animation: pageEnter .35s ease both; }

/* Results */
.calc-results { min-height: 300px; }
.results-empty, .results-error { display: grid; place-items: center; text-align: center; min-height: 340px; padding: 30px; }
.results-empty svg, .results-error svg { width: 54px; height: 54px; color: var(--grey-400); margin-bottom: 1rem; }
.results-error { color: #c0392b; }

.summary-strip { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.2rem; }
.summary-pill { padding: .7rem 1.1rem; border-radius: var(--r-md); font-size: .9rem; }
.summary-pill b { display: block; font-family: var(--font-display); font-size: 1.25rem; color: var(--navy-700); }

.scheme-block { margin-bottom: 1.4rem; padding: clamp(18px,2.5vw,26px); }
.scheme-block__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.scheme-block__head h3 { margin: 0; }
.scheme-block__meta { display: inline-flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.scheme-block__head .bonus { font-size: .85rem; color: var(--gold-600); font-weight: 700; }
.btn--sm { padding: .45rem .9rem !important; font-size: .82rem !important; box-shadow: none; }

.rate-table { width: 100%; border-collapse: collapse; font-size: .9rem; overflow-x: auto; display: block; }
.rate-table thead th { text-align: right; padding: .6rem .7rem; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); border-bottom: 2px solid var(--line); white-space: nowrap; }
.rate-table thead th:first-child, .rate-table tbody td:first-child { text-align: left; }
.rate-table tbody td { padding: .7rem .7rem; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rate-table tbody tr:hover { background: rgba(79,142,240,.05); }
.rate-table .net { font-weight: 700; color: var(--navy-700); }
.rate-table .best td { background: rgba(207,162,74,.1); }

.freq-tabs { display: inline-flex; gap: .25rem; padding: .25rem; border-radius: 999px; background: var(--bg-alt); margin-bottom: 1rem; }
.freq-tabs button { border: 0; background: transparent; cursor: pointer; padding: .4rem .9rem; border-radius: 999px; font-weight: 600; font-size: .82rem; color: var(--ink-soft); }
.freq-tabs button.active { background: #fff; color: var(--navy-700); box-shadow: var(--shadow-1); }

.calc-loading { display: grid; gap: 1rem; }
.calc-loading .skeleton { height: 120px; }
