/* bank.css · "Bank statement to QuickBooks" (section#bank on tools.html).
   Every rule is scoped under #bank. Shared look (cards, buttons, labels, fields, notes, drop zone) comes from tools.css;
   this file only adds what the tool needs. Colours are the page tokens, with the same values as fallbacks. */
#bank {
  --bk-ink: var(--ink, #1F1D1A);
  --bk-soft: var(--ink-soft, rgba(31, 29, 26, .74));
  --bk-faint: var(--ink-faint, rgba(31, 29, 26, .5));
  --bk-rule: var(--rule, rgba(31, 29, 26, .16));
  --bk-rule-strong: var(--rule-strong, rgba(31, 29, 26, .34));
  --bk-cream: var(--cream, #F7F4EC);
  --bk-clay: var(--clay, #C96F4E);
  --bk-clay-deep: var(--clay-deep, #A85538);
  --bk-wash: var(--clay-wash, rgba(201, 111, 78, .1));
  --bk-olive: var(--olive, #7C8363);
  --bk-sky: var(--sky, #9DB8CC);
  --bk-amber: var(--amber, #E9A03B);
  --bk-serif: var(--serif, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Noto Serif", Georgia, serif);
  --bk-sans: var(--sans, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
}
#bank .bk-vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#bank h4.label, #bank .bk-accepts, #bank .bk-accepts dt, #bank .bk-accepts dd, #bank .bk-figs, #bank .bk-figs dt, #bank .bk-figs dd { margin: 0; padding: 0; }
#bank .bk-work ul { margin: 0; padding: 0; list-style: none; }
#bank .bk-work p { margin: 0; }

/* ---------- start: drop zone, paste, what QuickBooks accepts ---------- */
#bank .bk-drop { padding-top: 44px; padding-bottom: 36px; }
#bank .bk-drop.is-over { border-color: var(--bk-clay-deep); border-style: solid; background-color: var(--bk-wash); }
#bank .bk-art { width: 168px; height: auto; overflow: visible; }
#bank .bk-art rect { fill: var(--bk-cream); stroke: var(--bk-ink); stroke-width: 1.1; }
#bank .bk-art path { fill: none; stroke: var(--bk-rule-strong); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
#bank .bk-art .bk-art-mess { stroke: var(--bk-clay); stroke-width: 1.6; }
#bank .bk-art .bk-art-arrow { stroke: var(--bk-clay-deep); stroke-width: 1.4; }
#bank .bk-art-out path { stroke: var(--bk-ink); stroke-width: .9; }
#bank .bk-art-out .bk-art-rows { stroke: var(--bk-rule-strong); }
#bank .bk-art-in { transform-box: fill-box; transform-origin: 50% 100%; transform: rotate(-4deg); transition: transform .4s; }
#bank .bk-drop.is-over .bk-art-in { transform: rotate(0deg) translateX(6px); }
#bank .bk-touch { display: none; }
#bank .bk-drop-btns { flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
#bank .bk-drop-btns .btn-primary { min-height: 46px; padding-inline: 26px; font-size: 15.5px; }
#bank .bk-private { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; font-size: 14px; color: var(--bk-soft); }
#bank .bk-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--bk-clay); box-shadow: 0 0 0 4px var(--bk-wash); }

#bank .bk-paste { margin-top: 16px; display: grid; gap: 10px; justify-items: start; }
#bank .bk-paste .field { width: 100%; }
#bank .bk-textarea {
  display: block; width: 100%; min-height: 150px; padding: 10px 12px; resize: vertical;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--bk-ink);
  background: var(--bk-cream); border: 1px solid var(--bk-rule-strong); border-radius: 2px; white-space: pre; overflow: auto;
}
#bank .bk-textarea:focus-visible, #bank .bk-select:focus-visible { outline: none; border-color: var(--bk-clay-deep); box-shadow: 0 0 0 3px var(--bk-wash); }

#bank .bk-accepts { margin-top: 22px; display: grid; grid-template-columns: 2.1fr 1.2fr 1.4fr .8fr; border-top: 1px solid var(--bk-rule); }
#bank .bk-accepts > div { padding: 12px 18px 2px 0; }
#bank .bk-accepts > div + div + div { padding-left: 18px; border-left: 1px solid var(--bk-rule); }
#bank .bk-accepts > .bk-accepts-title { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding: 12px 0 10px; border-bottom: 1px solid var(--bk-rule); }
#bank .bk-accepts-title dd { font-size: 13px; color: var(--bk-faint); }
#bank .bk-accepts dt:not(.label) { font-family: var(--bk-serif); font-size: 17px; line-height: 1.3; }
#bank .bk-accepts > div:not(.bk-accepts-title) dd { margin-top: 3px; font-size: 13.5px; line-height: 1.45; color: var(--bk-soft); }

/* ---------- the working ---------- */
#bank .bk-work { margin-top: 22px; display: grid; gap: 30px; min-width: 0; }
#bank .bk-work > * { min-width: 0; }
#bank .bk-sourcebar { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: -14px; }
#bank .bk-source { font-family: var(--bk-serif); font-size: 17px; color: var(--bk-soft); overflow-wrap: anywhere; min-width: 0; }
#bank .bk-sourcebar .btn { flex: none; }
#bank .bk-source b { font-weight: 700; color: var(--bk-ink); }
#bank .bk-block { display: grid; gap: 10px; }

/* checks */
#bank .bk-checks { display: grid; gap: 16px; }
#bank .bk-figs { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); column-gap: 18px; }
#bank .bk-fig { grid-column: span 3; padding: 10px 0 12px; border-top: 1px solid var(--bk-rule); min-width: 0; }
#bank .bk-fig-money { grid-column: span 5; }
#bank .bk-fig-net { border-top: 1.5px solid var(--bk-ink); }
#bank .bk-fig-v { font-family: var(--bk-serif); font-weight: 500; font-size: 25px; line-height: 1.2; letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; overflow-wrap: anywhere; }
#bank .bk-fig-date .bk-fig-v { font-size: 21px; padding-top: 3px; }
#bank .bk-fig-money .bk-fig-v { font-size: 32px; }

#bank .bk-verdicts { display: grid; gap: 8px; }
#bank .bk-verdicts li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 14.5px; line-height: 1.45; }
#bank .bk-ico { width: 18px; height: 18px; margin-top: 1px; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#bank .bk-ok .bk-ico { stroke: var(--bk-olive); }
#bank .bk-info .bk-ico { stroke: var(--bk-faint); }
#bank .bk-info { color: var(--bk-soft); }
#bank .bk-warn .bk-ico { stroke: var(--bk-clay-deep); }
#bank .bk-warn { padding: 9px 12px 9px 10px; margin-left: -10px; background: var(--bk-wash); border-left: 2px solid var(--bk-clay-deep); }

#bank .bk-skipped { font-size: 14px; }
#bank .bk-skipped summary { display: inline-block; cursor: pointer; padding: 6px 0; color: var(--bk-ink); text-decoration: underline; text-decoration-color: var(--bk-rule-strong); text-underline-offset: 4px; list-style: none; }
#bank .bk-skipped summary::-webkit-details-marker { display: none; }
#bank .bk-skipped summary::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 9px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-3px) rotate(45deg); }
#bank .bk-skipped[open] summary::after { transform: translateY(0) rotate(-135deg); }
#bank .bk-skipped summary:hover { color: var(--bk-clay-deep); }
#bank .bk-skipped ul { margin-top: 6px; border-top: 1px solid var(--bk-rule); }
#bank .bk-skipped li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 2px 18px; padding: 8px 0; border-bottom: 1px solid var(--bk-rule); }
#bank .bk-skipped li b { font-weight: 600; }
#bank .bk-skipped li span { color: var(--bk-soft); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

#bank .bk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding-top: 4px; }
#bank .bk-go { min-height: 50px; padding: 10px 28px; font-size: 16.5px; }
#bank .bk-actions .btn:not(.bk-go) { min-height: 50px; }
#bank .bk-status { flex: 1 1 240px; font-size: 13.5px; line-height: 1.4; color: var(--bk-soft); }
#bank .bk-status:empty { display: none; }
#bank .bk-actions-end { padding-top: 8px; }
#bank .bk-files:empty { display: none; }
#bank .bk-files { border-top: 1px solid var(--bk-rule); }

/* found facts */
#bank .bk-found { display: grid; gap: 3px; font-size: 14.5px; line-height: 1.5; color: var(--bk-soft); }
#bank .bk-found li { position: relative; padding-left: 16px; }
#bank .bk-found li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 1px; background: var(--bk-clay); }

/* tables */
#bank .bk-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--bk-rule); border-radius: 3px; background: var(--bk-cream); max-width: 100%; }
#bank .bk-scroll:focus-visible { outline: 2px solid var(--bk-clay-deep); outline-offset: 2px; }
#bank .bk-table { border-collapse: collapse; width: 100%; font-size: 13.5px; line-height: 1.35; font-variant-numeric: lining-nums tabular-nums; }
#bank .bk-table th, #bank .bk-table td { padding: 8px 12px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--bk-rule); font-weight: 400; }
#bank .bk-table tbody tr:last-child > * { border-bottom: 0; }
#bank .bk-table td { max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
#bank .bk-headrow th, #bank .bk-table-out thead th { font-size: 10.5px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--bk-soft); border-bottom: 1px solid var(--bk-rule-strong); }
#bank .bk-table-out thead th { color: var(--bk-clay-deep); }
#bank .bk-headrow .bk-nohead { color: var(--bk-faint); }
#bank .bk-maprow th { padding: 10px 6px 4px; border-bottom: 0; border-top: 3px solid transparent; }
#bank .bk-maprow th[data-role="date"] { border-top-color: var(--bk-sky); }
#bank .bk-maprow th[data-role="desc"] { border-top-color: var(--bk-olive); }
#bank .bk-maprow th[data-role="amount"], #bank .bk-maprow th[data-role="in"], #bank .bk-maprow th[data-role="out"] { border-top-color: var(--bk-clay); }
#bank .bk-maprow th[data-role="balance"] { border-top-color: var(--bk-amber); }
#bank .bk-table [data-role="ignore"] { color: var(--bk-faint); }
#bank .bk-table td[data-role="ignore"] { background: rgba(31, 29, 26, .028); }
#bank .bk-table .bk-line { width: 1%; color: var(--bk-faint); font-size: 12px; text-align: right; padding-right: 6px; }
#bank .bk-table tr.bk-skip td { color: var(--bk-faint); text-decoration: line-through; text-decoration-color: var(--bk-clay); }
#bank .bk-table tr.bk-skip .bk-line { color: var(--bk-clay-deep); }
#bank .bk-table .bk-num { text-align: right; }
#bank .bk-map { min-width: 124px; width: 100%; }

/* controls */
#bank .bk-select {
  display: block; width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px;
  font: 14.5px/1.3 var(--bk-sans); color: var(--bk-ink);
  background-color: var(--bk-cream); border: 1px solid var(--bk-rule-strong); border-radius: 2px;
}
#bank select.bk-select {
  -webkit-appearance: none; appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' fill='none' stroke='%231F1D1A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 10px 7px;
}
#bank .bk-options { display: grid; gap: 18px; }
#bank .bk-opt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 20px; align-items: end; }
#bank .bk-f-layout { grid-column: span 2; }
#bank .bk-ticks { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--bk-rule); }
#bank .bk-check { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; font-size: 14.5px; line-height: 1.4; min-height: 28px; }
#bank .bk-check input { flex: none; width: 19px; height: 19px; margin: 1px 0 0; accent-color: var(--bk-clay-deep); cursor: pointer; }
#bank .bk-check i { font-style: normal; color: var(--bk-faint); font-size: 13px; margin-left: 4px; }
#bank .bk-foot { margin-top: 22px; }

/* ---------- touch and narrow screens ---------- */
@media (hover: none) and (pointer: coarse) {
  #bank .bk-mouse { display: none; }
  #bank .bk-touch { display: inline; }
}
@media (max-width: 900px) {
  #bank .bk-accepts { grid-template-columns: 1fr 1fr; }
  #bank .bk-accepts > div:not(.bk-accepts-title) { padding: 12px 14px 10px 0; border-left: 0; border-bottom: 1px solid var(--bk-rule); }
  #bank .bk-accepts > div:nth-child(odd):not(.bk-accepts-title) { padding-left: 14px; border-left: 1px solid var(--bk-rule); }
  #bank .bk-opt-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  #bank .bk-drop { padding-top: 28px; padding-bottom: 26px; }
  #bank .bk-art { width: 132px; }
  #bank .bk-drop-btns { flex-direction: column; align-items: stretch; width: 100%; max-width: 340px; }
  #bank .bk-drop-btns .btn { min-height: 48px; width: 100%; }
  #bank .bk-accepts { grid-template-columns: 1fr; }
  #bank .bk-accepts > div:not(.bk-accepts-title), #bank .bk-accepts > div:nth-child(odd):not(.bk-accepts-title) { padding: 10px 0; border-left: 0; }
  #bank .bk-work { gap: 26px; }
  #bank .bk-figs { grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 12px; }
  #bank .bk-fig { grid-column: span 2; }
  #bank .bk-fig-date, #bank .bk-fig-money { grid-column: span 3; }
  #bank .bk-fig-net { grid-column: 1 / -1; }
  #bank .bk-fig .label { letter-spacing: .09em; }
  #bank .bk-fig-v { font-size: 22px; }
  #bank .bk-fig-date .bk-fig-v { font-size: 19px; }
  #bank .bk-fig-money .bk-fig-v { font-size: 24px; }
  #bank .bk-fig-net .bk-fig-v { font-size: 30px; }
  #bank .bk-actions { flex-direction: column; align-items: stretch; }
  #bank .bk-actions .btn { width: 100%; }
  #bank .bk-status { flex: none; }
  #bank .bk-skipped li { grid-template-columns: 1fr; }
  #bank .bk-opt-grid { grid-template-columns: 1fr 1fr; gap: 16px 12px; }
  #bank .bk-opt-grid > .field { grid-column: 1 / -1; }
  #bank .bk-opt-grid > .field:nth-last-child(-n+2) { grid-column: auto; }
  #bank .bk-f-layout .seg span { flex-direction: column; align-items: center; gap: 0; white-space: normal; text-align: center; min-height: 46px; }
  #bank .bk-select, #bank .bk-textarea { font-size: 16px; min-height: 44px; }   /* 16px stops phones zooming in on focus */
  #bank .bk-textarea { font-size: 16px; }
  #bank .bk-table th, #bank .bk-table td { padding: 8px 10px; }
  #bank .bk-table td { max-width: 220px; }
  #bank .bk-check { min-height: 44px; align-items: center; }
  #bank .bk-check input { width: 22px; height: 22px; margin: 0; }
  #bank .bk-skipped summary { padding: 12px 0; }
  #bank .bk-files .btn { min-height: 44px; }
  #bank .bk-check i { display: block; margin-left: 0; }
}
@media print {
  #bank .bk-start, #bank .bk-actions, #bank .bk-options { display: none; }
}
