/* Bank accounts (/banks/), on top of tools9.css. Rename this file (banks11.css) whenever it changes: Cloudflare keeps static files. */
.bank-back { margin: 0 0 8px; font-size: .9rem; }
.bank-bank { margin: 0 0 2px; color: var(--soft); font-size: .85rem; font-weight: 600; }
.bank-small { margin: 6px 0 0; color: var(--soft); font-size: .85rem; }
.bank-disclaimer { margin: 24px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--wash); color: var(--soft); font-size: .85rem; }
.bank-closed { display: inline-block; margin: 4px 0; padding: 2px 8px; border-radius: 6px; background: #fdecea; color: #9b1c1c; font-size: .8rem; font-weight: 800; }
.bank-stale { margin: 8px 0; padding: 6px 10px; border-radius: 8px; background: #fff4d6; color: #5c3b00; font-size: .88rem; }
.bank-checked { margin: 4px 0 10px; color: var(--soft); font-size: .88rem; }
.bank-note { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: .92rem; }

/* Search, filters and the estimate's inputs */
.bank-find { margin: 0 0 12px; }
.bank-box { margin: 10px 0 0; border: 1px solid var(--line); border-radius: 12px; }
.bank-box > summary { min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 14px; font-weight: 700; cursor: pointer; list-style: none; }
.bank-box > summary::-webkit-details-marker { display: none; }
/* A chevron on every folding box, turning when it opens, so it reads as something to tap */
.bank-box > summary::after { content: ''; flex: none; width: 9px; height: 9px; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.bank-box[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.bank-box > summary:hover { background: var(--wash); border-radius: 12px; }
.bank-box > summary:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 12px; }
@media (prefers-reduced-motion: reduce) { .bank-box > summary::after { transition: none; } }
.bank-invite { color: var(--link); }
.bank-start { flex: none; margin-left: auto; padding: 6px 12px; border-radius: 999px; background: var(--link); color: #fff; font-size: .85rem; }
.bank-box[open] > summary { border-bottom: 1px solid var(--line); }
.bank-box > :not(summary) { margin-left: 14px; margin-right: 14px; }
.bank-box > :last-child { margin-bottom: 14px; }
.bank-selects, .bank-calc { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px 14px; margin-top: 12px; }
.bank-selects label, .bank-calc label { display: grid; gap: 4px; font-size: .88rem; font-weight: 600; color: var(--soft); }
.bank-selects select, .bank-calc input[type="number"], .bank-money { min-height: 44px; padding: 0 10px; border: 1px solid #c5ccd3; border-radius: 8px; background: #fff; font: inherit; color: var(--ink); }
.bank-money { display: flex; align-items: center; gap: 4px; }
.bank-money input { flex: 1; min-width: 0; min-height: 40px; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); }
.bank-money:focus-within, .bank-selects select:focus, .bank-calc input[type="number"]:focus { outline: 2px solid var(--link); outline-offset: 1px; }
label.bank-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: .95rem; font-weight: 500; color: var(--ink); }
.bank-check input, .bank-pick input { width: 20px; height: 20px; accent-color: var(--link); }
.bank-buttons { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.bank-show { min-height: 48px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--ink); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }

/* The list */
.bank-list { display: grid; gap: 12px; margin-top: 8px; }
.bank-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.bank-name { margin: 0; font-size: 1.15rem; }
.bank-name a { text-decoration: none; }
.bank-name a:hover { text-decoration: underline; }
.bank-summary { margin: 4px 0 0; font-size: .92rem; }
.bank-card .bank-summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }  /* the full text is on the account page */
.bank-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.bank-tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-weight: 700; text-decoration: none; }
.bank-tabs a:hover { background: var(--wash); }
.bank-tabs a[aria-current="page"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.bank-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: 8px 12px; margin: 10px 0 0; }
.bank-dl dt { color: var(--soft); font-size: .78rem; font-weight: 600; }
.bank-dl dd { margin: 0; font-weight: 700; }
.bank-estimate { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: #e7f5ee; color: #0b5c3f; font-size: .92rem; }
.bank-pick { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 6px; font-weight: 700; cursor: pointer; }

/* One account */
.bank-acts { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 12px; }
.bank-add, .bank-go { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.bank-add[aria-pressed="true"] { background: var(--ink); color: #fff; }
.bank-group { margin-top: 6px; }
.bank-facts { margin: 0; }
.bank-facts > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 4px 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.bank-facts dt { color: var(--soft); font-size: .9rem; }
.bank-facts dd { margin: 0; font-size: .95rem; }
.bank-lines { margin: 0; padding-left: 1.1em; }
.bank-lines li + li { margin-top: 4px; }
.bank-src { margin: 8px 0 0; color: var(--soft); font-size: .8rem; overflow-wrap: anywhere; }
.bank-term { display: inline; }
.bank-term > summary { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 1px solid #c5ccd3; border-radius: 50%; font-size: .75rem; font-weight: 800; color: var(--link); cursor: pointer; list-style: none; vertical-align: middle; }
.bank-term > summary::-webkit-details-marker { display: none; }
.bank-term > summary::after { content: ''; position: absolute; inset: -10px; }  /* a 44px tap area around the small circle */
.bank-term[open] p { display: block; margin: 6px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--wash); color: var(--ink); font-size: .85rem; font-weight: 400; }
.bank-words dt { margin-top: 10px; font-weight: 700; }
.bank-words dd { margin: 2px 0 0; font-size: .92rem; }

/* Side by side. Phones: each row is its label, then the accounts' answers stacked, each with its name */
.bank-num { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .72rem; font-weight: 800; vertical-align: 1px; }
/* The names stay on screen while scrolling, under the site header (64px); on phones as three compact columns */
.bank-cmp-head { position: sticky; top: 64px; z-index: 3; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 6px; margin: 8px 0; padding: 6px 0; background: #fff; border-bottom: 1px solid var(--line); }
.bank-cmp-head > span { display: none; }
.bank-cmp-head > div { display: flex; gap: 6px; align-items: flex-start; min-width: 0; }
.bank-cmp-head small { display: block; color: var(--soft); font-size: .72rem; font-weight: 600; }
.bank-cmp-head a { display: block; font-size: .85rem; font-weight: 800; line-height: 1.25; text-decoration: none; overflow-wrap: anywhere; }
.bank-cmp-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.bank-cmp-row.is-diff { background: #fbf7ea; }
/* Two rules, no :has(): a browser that does not know a selector drops the whole rule, and hiding must never depend on it */
.bank-cmp.only-diff .bank-cmp-row:not(.is-diff) { display: none; }
.bank-cmp.only-diff .bank-cmp-group.no-diff { display: none; }  /* banks5.js marks sections where every row is the same */
.bank-cmp.only-diff .bank-cmp-row.is-diff { background: none; }  /* every row shown differs, so no shading */
.bank-diff { margin-top: 10px; }
.bank-fold > summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--link); font-weight: 700; cursor: pointer; }
.bank-words-fold { margin: 8px 0 0; font-size: .9rem; }
.bank-words-fold > summary { min-height: 44px; display: flex; align-items: center; color: var(--link); font-weight: 700; cursor: pointer; }
/* Key figures: a real table, short values, so it fits a phone without scrolling sideways */
.bank-key { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .9rem; }
.bank-key th, .bank-key td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.bank-key thead th { font-size: .8rem; line-height: 1.25; }
.bank-key tbody th { width: 30%; color: var(--soft); font-weight: 600; }
.bank-key td { font-weight: 700; }
.bank-cmp-label { margin-bottom: 4px; font-size: .88rem; font-weight: 700; color: var(--soft); }
.bank-cmp-cell { padding: 3px 0; font-size: .92rem; }
.bank-cmp-name { display: block; font-size: .78rem; font-weight: 700; color: var(--soft); }
@media (min-width: 720px) {
  .bank-cmp-head, .bank-cmp-row { display: grid; grid-template-columns: 9.5rem repeat(var(--cols), minmax(0, 1fr)); gap: 12px; }
  .bank-cmp-head > span { display: block; }
  .bank-key tbody th { width: 9.5rem; }
  .bank-cmp-row { padding: 10px 6px; }
  .bank-cmp-label { margin: 0; }
  .bank-cmp-cell { padding: 0; }
  .bank-cmp-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* The compare tray, fixed at the bottom; above the phone tab bar */
.bank-tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -4px 16px rgba(21, 33, 44, .12); }
.bank-tray[hidden] { display: none; }
.bank-tray-text { flex-basis: 100%; margin: 0; font-size: .85rem; color: var(--soft); }
.bank-tray-list { display: flex; gap: 6px; flex: 1; min-width: 0; margin: 0; padding: 0; list-style: none; overflow-x: auto; }
.bank-tray-list li { display: inline-flex; flex: none; align-items: center; gap: 2px; max-width: 13rem; padding: 2px 2px 2px 10px; border-radius: 999px; background: var(--wash); font-size: .82rem; font-weight: 600; }
.bank-tray-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bank-tray-list button { min-width: 32px; min-height: 32px; border: 0; background: transparent; color: var(--soft); font-size: 1.1rem; cursor: pointer; }
.bank-tray-go { min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.bank-tray-go:disabled { background: #c5ccd3; cursor: default; }
body:has(.bank-tray:not([hidden])) .bus-credit { margin-bottom: 120px; }
@media (max-width: 720px), (display-mode: standalone) { .bank-tray { bottom: calc(60px + env(safe-area-inset-bottom)); padding-bottom: 10px; } }  /* above the phone tab bar (app1.css) */
.bank-add[hidden] { display: none; }
/* The back-to-top button (site15.css) sits where the tray's Compare button is: lift it above the open tray */
body:has(.bank-tray:not([hidden])) .go-top-btn { bottom: calc(var(--bank-tray, 100px) + 12px + env(safe-area-inset-bottom)); }
@media (max-width: 720px), (display-mode: standalone) { body:has(.bank-tray:not([hidden])) .go-top-btn { bottom: calc(var(--bank-tray, 100px) + 72px + env(safe-area-inset-bottom)); } }
/* Archived accounts: the notice, what to look at instead, and the old details folded */
.bank-archived { margin: 10px 0; padding: 12px 14px; border: 1px solid #f3c4c0; border-radius: 10px; background: #fdecea; color: #5f1414; font-size: .95rem; }
.bank-archived p { margin: 0; }
.bank-archived a { color: #5f1414; font-weight: 700; }
.bank-instead { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bank-instead li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.bank-instead a { font-weight: 800; text-decoration: none; }
.bank-instead small { display: block; margin-top: 2px; color: var(--soft); font-size: .85rem; }
.bank-was .bus-label { margin-top: 14px; }
.bank-add .icon { margin-right: 6px; }
/* The estimate a reader asked for: highlighted, and where the page opens after Estimate (clear of the sticky header and names) */
.bank-hit, .bank-key tr.bank-hit th, .bank-key tr.bank-hit td { background: #e7f5ee; color: #0b5c3f; }
.bank-facts > div.bank-hit { padding-left: 10px; padding-right: 10px; border-radius: 8px; }
.bank-facts > div.bank-hit dt, .bank-facts > div.bank-hit dd { color: #0b5c3f; font-weight: 700; }
#your-estimate { scroll-margin-top: 80px; }
#key-figures { scroll-margin-top: 150px; }
/* Your results: every estimate in one place, under the form, where the page opens after Show accounts */
.bank-results { margin: 14px 0 6px; padding: 14px; border: 1px solid #b9e2cc; border-radius: 12px; background: #f3faf6; scroll-margin-top: 80px; }
.bank-results .bus-label { margin-top: 0; }
.bank-ranked { display: grid; gap: 8px; margin: 10px 0 0; padding-left: 1.4em; }
.bank-ranked li { padding: 4px 0; }
.bank-ranked a { font-weight: 800; text-decoration: none; }
.bank-ranked-fig { display: block; color: #0b5c3f; }
.bank-ranked small { display: block; color: var(--soft); font-size: .85rem; }
.bank-ranked .bank-ranked-fig small { display: inline; }
.bank-change { flex: none; margin-left: auto; padding-left: 10px; color: var(--link); font-size: .9rem; }
/* The Start or Change label already sits on the right: the chevron follows it */
.bank-box > summary:has(.bank-start)::after, .bank-box > summary:has(.bank-change)::after { margin-left: 0; }
/* The reader's estimate, straight under the calculator */
.bank-est { margin-top: 14px; }
.bank-est .bank-box { margin-top: 0; }
.bank-result { margin: 10px 0 6px; padding: 14px; border: 1px solid #b9e2cc; border-radius: 12px; background: #f3faf6; color: var(--ink); scroll-margin-top: 80px; }
.bank-result p { margin: 0 0 6px; }
.bank-result-fig { font-size: 1.15rem; color: #0b5c3f; }
.bank-result-fig b { font-size: 1.6rem; }
.bank-result-sub { color: var(--soft); font-size: .92rem; }
.bank-result-h { margin-top: 10px !important; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
/* Until the cookie notice (base.html) is accepted, the tray sits above it instead of under it */
.has-cookie-note .bank-tray { bottom: calc(100px + env(safe-area-inset-bottom)); }
@media (max-width: 720px), (display-mode: standalone) { .has-cookie-note .bank-tray { bottom: calc(140px + env(safe-area-inset-bottom)); } }
