/* ═══════════════════════════════════════════════════════════════════════
   מחשבונים — תוספות ל-style.css בלבד (נטען דרך page_head 'head').
   משתמש רק בטוקנים הקיימים ב-:root של style.css.
   ═══════════════════════════════════════════════════════════════════════ */

/* hidden חייב לנצח את display של .alert/.field וכו' */
.calc [hidden] { display: none !important; }

/* מטרות מגע ≥44px בכל המחשבונים */
.calc .seg span { min-height: 44px; display: flex; align-items: center; }
.calc .tabs button { min-height: 44px; padding: 8px 16px; }
.calc input[type=range] { min-height: 44px; }
.calc .check-row label { min-height: 44px; }
.calc .seg { max-width: 100%; }

.calc .field-range { display: flex; align-items: center; gap: 12px; }
.calc .field-range input[type=range] { flex: 1; min-width: 0; }
.calc .field-range output { flex: 0 0 auto; min-width: 74px; text-align: center; font-weight: 800; background: var(--brand-soft); color: var(--brand-ink); border-radius: var(--radius-sm); padding: 6px 8px; }

/* פאנל תוצאה: תוספות */
.result .big-sub { color: rgba(255,255,255,.78); font-size: .92rem; margin: 2px 0 12px; }
.result .row strong { font-weight: 800; text-align: left; }
.result .row.total { border-top: 2px solid rgba(255,255,255,.35); margin-top: 4px; font-size: 1.04rem; }
.result .row.best { background: rgba(255,255,255,.09); border-radius: 8px; padding-inline: 8px; }
.result .row .lbl { min-width: 0; }
.result .alert { margin: 12px 0 0; font-size: .92rem; }
.result .sec-h { font-size: .9rem; font-weight: 700; color: rgba(255,255,255,.78); margin: 16px 0 2px; text-transform: none; }
.result .est { display: inline-block; font-size: .74rem; font-weight: 700; background: var(--accent); color: #1d2420; border-radius: 6px; padding: 0 6px; margin-inline-start: 4px; vertical-align: middle; }

/* מסלולי משכנתא / שורות דינמיות */
.track-list { display: grid; gap: 12px; }
.track { border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 14px; background: #fcfbf8; }
.track-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.track-h h3 { margin: 0; font-size: 1rem; }
.track-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.track-grid.cols-4 { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, .8fr); }
@media (max-width: 720px) { .track-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .track-grid.cols-4 > .field:first-child { grid-column: 1 / -1; } }
@media (max-width: 380px) { .track-grid, .track-grid.cols-4 { grid-template-columns: minmax(0, 1fr); } }
.btn-icon { background: transparent; border: 1.5px solid var(--line); color: var(--danger); border-radius: 10px; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font: 600 .9rem 'Heebo', sans-serif; padding: 0 10px; }
.btn-icon:hover { background: var(--danger-soft); }
.sum-line { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 2px 0; font-weight: 600; }

/* הצעות משכנתא */
.offer { border-top: 4px solid var(--line); }
.offer.is-best { border-top-color: var(--brand); }
.offer-name { font-weight: 800; }
.badge-best { background: var(--brand); color: #fff; border-radius: 6px; padding: 1px 8px; font-size: .8rem; font-weight: 700; }

/* לוח תשלומים (הצמדה) */
.sched-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 10px; align-items: end; }
.sched-row + .sched-row { margin-top: 10px; }

/* טבלאות */
table.data td.pos { color: var(--danger); }
table.data td.neg { color: var(--ok); }
table.data tr.hl td { background: var(--brand-soft); font-weight: 700; }
table.data tfoot td { font-weight: 800; background: #f6f4ee; }
.collapse-btn[aria-expanded="true"] .fa-chevron-down { transform: rotate(180deg); }
.collapse-btn .fa-chevron-down { transition: transform .15s; }

/* רשימת יישובים במחשבון יכולת */
.setl-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
@media (max-width: 620px) { .setl-list { grid-template-columns: minmax(0, 1fr); } }
.setl-list a { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); background: var(--surface); }
.setl-list a:hover { border-color: var(--brand); }
.setl-list .nm { font-weight: 700; display: block; }
.setl-list .rg { color: var(--muted); font-size: .84rem; display: block; }
.setl-list .pr { font-weight: 800; color: var(--brand-ink); white-space: nowrap; }

/* דף אינדקס */
.tool-card.featured { background: var(--brand-dark); color: #fff; padding: 24px; }
.tool-card.featured h3, .tool-card.featured:hover { color: #fff; }
.tool-card.featured p { color: rgba(255,255,255,.82); }
.tool-card.featured .ico { background: var(--accent); color: #1d2420; }
.tool-card .go { margin-top: 8px; font-weight: 700; color: var(--brand-ink); font-size: .92rem; }
.tool-card.featured .go { color: #f3d6ad; }

.prose-calc h2 { font-size: 1.2rem; margin-top: 1.3em; }
.prose-calc h2:first-child { margin-top: 0; }
.prose-calc ul { padding-inline-start: 1.3em; }
.prose-calc li { margin-bottom: .35em; }

/* .num ב-style.css הוא inline-block — על <td> זה שובר את פריסת הטבלה */
table.data td.num, table.data th.num { display: table-cell; text-align: right; }
