:root {
  --ink: #1a1d29;
  --muted: #5c6370;
  --line: #e3e5ea;
  --soft: #f2f1f0;
  --brand: #3b5bdb;
  --brand-dark: #2f4bc0;
  --brand-soft: #e8ecfb;
  --ok: #2b8a3e;
  --ok-soft: #ebfbee;
  --warn: #a35f00;
  --warn-soft: #fff4e0;
  --radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: #fff; line-height: 1.5; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
p a:not(.btn), li a:not(.btn) { text-decoration: underline; text-underline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.inline { display: inline; margin: 0; }
[hidden] { display: none !important; }

/* Header */
.top { border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; font-size: .9rem; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; }
.top-end { display: flex; align-items: center; gap: 22px; }
.nav { display: flex; align-items: center; gap: 20px; font-size: .95rem; white-space: nowrap; }
.regions { display: flex; align-items: center; gap: 2px; }
.regions a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 6px; }
.regions a:hover { background: var(--soft); text-decoration: none; }
.regions a[aria-current="true"] { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }
.flag { width: 24px; height: 16px; display: block; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(26, 29, 41, .28); }
.linklike { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; }
.linklike:hover { text-decoration: underline; }

/* Buttons */
.btn { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: 6px; padding: 10px 18px; font: inherit; font-weight: 500; cursor: pointer; text-align: center; }
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn-lg { padding: 13px 24px; font-size: 1.05rem; }
.btn-xl { padding: 18px 32px; font-size: 1.45rem; border-radius: 6px; box-shadow: 0 2px 6px rgba(59, 91, 219, .25); }
.btn-ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn[disabled] { opacity: .6; cursor: wait; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .875rem; cursor: pointer; color: var(--ink); }
.chip:hover { border-color: var(--brand); color: var(--brand); }

/* Hero + drop zone */
.hero { padding: 40px 0 8px; }
.hero h1 { font-size: 2rem; font-weight: 700; }
.hero-tight { padding-bottom: 0; }
.lede { font-size: 1.15rem; color: #3d4250; margin: 0 0 24px; max-width: 46em; }
.drop { background: var(--soft); border: 2px dashed transparent; border-radius: 10px; min-height: 250px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 32px 20px; transition: border-color .15s, background .15s; }
.drop.is-over { border-color: var(--brand); background: var(--brand-soft); }
.drop-hint { color: var(--muted); margin: 14px 0 0; }
.region-switch { color: var(--muted); font-size: .9rem; margin: 12px 0 0; }
.tally { display: flex; align-items: center; justify-content: center; gap: .5rem; margin: 16px 0 0; color: var(--muted); font-size: 1.05rem; }
.tally-num { display: inline-flex; align-items: flex-end; color: var(--ink); font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.tally-digit { display: block; width: 1ch; height: 1em; overflow: hidden; }
.tally-reel { display: flex; flex-direction: column; transition: transform .6s cubic-bezier(.16, .84, .32, 1); }
.tally-reel span, .tally-sep { display: block; height: 1em; line-height: 1; text-align: center; }
.tally-sep { width: .32em; }
.drop-busy { width: min(420px, 100%); }
.drop-file { font-weight: 600; margin: 12px 0 10px; overflow-wrap: anywhere; }
.drop-step { color: var(--muted); margin: 10px 0 0; }
.drop-error p { color: #a61e4d; font-weight: 500; max-width: 34em; margin: 0 auto 14px; }
.bar { height: 6px; background: #dcdde3; border-radius: 3px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .3s; }
.spinner { width: 36px; height: 36px; margin: 0 auto; border: 4px solid #d6dbf5; border-top-color: var(--brand); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Features */
/* Bank logo carousel: two identical lists scroll left by half the track for a seamless loop. */
.banks { padding: 28px 0 0; text-align: center; }
.banks-title { font-size: .95rem; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.banks-window { overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.banks-track { display: flex; width: max-content; animation: banks-scroll 70s linear infinite; }
.banks-window:hover .banks-track, .banks-window:focus-within .banks-track { animation-play-state: paused; }
.banks-list { display: flex; align-items: center; gap: 48px; margin: 0; padding: 0 48px 0 0; list-style: none; }
.banks-list a { display: flex; align-items: center; height: 56px; }
.banks-list img { display: block; filter: grayscale(1); opacity: .75; transition: filter .2s, opacity .2s; }
.banks-list a:hover img, .banks-list a:focus-visible img { filter: none; opacity: 1; }
.banks-note { font-size: .8rem; color: var(--muted); margin: 10px 0 0; }
@keyframes banks-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .tally-reel { transition: none; }
  .banks-window { -webkit-mask-image: none; mask-image: none; }
  .banks-track { animation: none; width: auto; justify-content: center; }
  .banks-list { flex-wrap: wrap; justify-content: center; gap: 12px 36px; padding: 0; }
  .banks-list[aria-hidden] { display: none; }
}

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 40px 0 16px; text-align: center; }
.feature svg { width: 48px; height: 48px; }
.feature h2 { font-size: 1.25rem; margin: 8px 0 6px; }
.feature p { margin: 0; color: #3d4250; font-size: .92rem; }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 32px 0; }
.plan { border: 1px solid #cfd2d9; border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; min-height: 230px; }
.plan-featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.plan h3 { font-size: 1.15rem; }
.plan-sub { color: #3d4250; margin: 0 0 10px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 16px; font-size: .92rem; }
.plan li { padding-left: 22px; position: relative; margin: 4px 0; }
.plan li::before { content: "✓"; position: absolute; left: 2px; color: #12b886; font-weight: 700; }
.plan-foot { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; }
.plan-price { font-size: 1.6rem; font-weight: 700; }
.plan-price small { font-size: .9rem; font-weight: 500; color: var(--muted); }

.more { background: var(--brand-soft); border-radius: var(--radius); padding: 24px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 8px 0 40px; }
.more h2 { font-size: 1.3rem; }
.more p { margin: 0; }

/* Panels / forms */
.panel { padding: 36px 0 12px; }
.panel.narrow { max-width: 440px; margin: 0 auto; }
.stack { display: grid; gap: 14px; margin: 18px 0 10px; }
.stack label { display: grid; gap: 5px; font-weight: 500; font-size: .95rem; }
.stack label.check-line { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--muted); font-size: .875rem; }
input[type=email], input[type=password] { font: inherit; padding: 10px 12px; border: 1px solid #c4c8d0; border-radius: 6px; width: 100%; }
input:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.form-error { color: #a61e4d; margin: 0; font-size: .92rem; }
.flash { padding: 12px 16px; border-radius: 6px; margin: 18px 0 0; }
.flash.ok { background: var(--ok-soft); color: #1b5e2b; }
.flash.err { background: #fff0f3; color: #a61e4d; }
.prose { max-width: 720px; }
.prose h2 { font-size: 1.2rem; margin-top: 1.6rem; }
.faq { max-width: 720px; padding-bottom: 40px; }
.faq h3 { font-size: 1.05rem; margin-top: 1.2rem; }
.faq p { margin: 0; color: #3d4250; }
.allowance { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 16px; }
.allowance .big { font-size: 2rem; font-weight: 700; }
.allowance ul { margin: 6px 0 16px; padding-left: 20px; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Result */
.result { padding: 28px 0 40px; }
.result-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.result-head h1 { font-size: 1.7rem; }
.meta { color: var(--muted); margin: 0; }
.dl { text-align: right; }
.dl-alt { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; margin-top: 10px; }
.dl-note { color: var(--muted); font-size: .85rem; margin: 8px 0 0; }
.check { border-radius: var(--radius); padding: 14px 18px; margin: 20px 0 14px; }
.check-ok { background: var(--ok-soft); color: #1b5e2b; }
.check-ok strong::before { content: "✓ "; }
.check-warn { background: var(--warn-soft); color: #6b3d00; }
.check-info { background: var(--soft); color: #3d4250; }
.mode { display: flex; gap: 16px; align-items: center; font-size: .92rem; color: var(--muted); margin: 0 0 12px; flex-wrap: wrap; }
.mode label { color: var(--ink); cursor: pointer; }
.table-wrap { position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.tx th, .tx td, .sum th, .sum td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tx th, .sum th { background: #f8f9fb; font-weight: 600; font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cat { color: var(--muted); font-size: .85rem; }
.cat.review { color: var(--warn); }
tr.break td { background: #fff4e0; }
tr.ghost td { filter: blur(4px); user-select: none; color: var(--muted); }
.table-more { position: absolute; left: 0; right: 0; bottom: 0; height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 22px; background: linear-gradient(rgba(255,255,255,0), #fff 62%); }
.table-more p { margin: 0 0 10px; }
.summary { margin-top: 28px; }
.summary h2 { font-size: 1.2rem; }
.sum { border: 1px solid var(--line); }
.blur { filter: blur(5px); user-select: none; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(20, 24, 40, .55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 20; }
.modal-box { background: #fff; border-radius: 12px; padding: 28px; width: min(420px, 100%); position: relative; max-height: 100%; overflow-y: auto; }
.modal-wide { width: min(600px, 100%); }
.modal-x { position: absolute; top: 10px; right: 12px; background: none; border: 0; font-size: 1.6rem; color: var(--muted); cursor: pointer; line-height: 1; }
.pay-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0 10px; }
.pay-options:has(> .pay-option[hidden]) { grid-template-columns: 1fr; }
.pay-option { display: grid; gap: 4px; text-align: left; border: 1px solid #cfd2d9; border-radius: var(--radius); padding: 16px; background: #fff; font: inherit; cursor: pointer; }
.pay-option:hover { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.pay-price { font-size: 1.5rem; font-weight: 700; }
.pay-price small { font-size: .85rem; color: var(--muted); font-weight: 500; }
.pay-name { font-weight: 600; }
.pay-desc { color: var(--muted); font-size: .88rem; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 18px 0 26px; font-size: .85rem; }
.foot-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot-banks { margin-top: 10px; color: var(--muted); font-size: .8rem; }
.foot-banks a { color: var(--muted); }
.foot-region { margin: 14px 0 0; }
.foot-region a { display: inline-block; padding: 4px 0; }

@media (max-width: 760px) {
  .hero h1 { font-size: 1.6rem; }
  .tally-num { font-size: 1.35rem; }
  .btn-xl { font-size: 1.15rem; padding: 15px 22px; }
  .features, .plans, .pay-options { grid-template-columns: 1fr; }
  .more { flex-direction: column; align-items: flex-start; }
  .dl { text-align: left; width: 100%; }
  .dl-alt { justify-content: flex-start; }
  .top-end { gap: 6px; }
  .nav { gap: 10px; font-size: .85rem; }
  .regions a { width: 36px; height: 36px; }
  .brand span { display: none; }
  .tx td:nth-child(6), .tx th:nth-child(6) { display: none; }
}
