/* ePayRecon — one stylesheet for the marketing pages and the app.
 * Colours: the InfoTilt / AnaPlexus palette. Blue = primary, orange = calls to action, red = warnings and the logo accent. */

:root, [data-theme="light"] {
  --brand-blue: #205fe2; --brand-navy: #0a33a6; --brand-orange: #fd6714; --brand-red: #d41b29;
  --brand-stripe: linear-gradient(90deg, #205fe2 0%, #fd6714 55%, #d41b29 100%);
  --bg: #f3f5fa; --surface: #ffffff; --surface-2: #f7f9fd; --text: #141b2d; --muted: #5d6b82;
  --line: #d3dae8; --accent: #205fe2; --accent-soft: #e6eefc; --link: #1a52cc;
  --cta: #fd6714; --cta-hover: #e55a0c; --cta-text: #ffffff;
  --ok: #067647; --ok-soft: #dcf5e7; --warn: #b54708; --warn-soft: #fff1e0; --bad: #b8141f; --bad-soft: #fde5e7;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  color-scheme: light;
}
[data-theme="dark"] {
  --brand-blue: #4f86f0; --brand-navy: #8fb0ff; --brand-orange: #ff8a3d; --brand-red: #ff5a5f;
  --brand-stripe: linear-gradient(90deg, #4f86f0 0%, #ff8a3d 55%, #ff5a5f 100%);
  --bg: #0f1420; --surface: #171e2d; --surface-2: #1c2436; --text: #e3e9f4; --muted: #8e9ab0;
  --line: #2b3549; --accent: #3b78f0; --accent-soft: #1d2b4a; --link: #82a9ff;
  --cta: #fd6714; --cta-hover: #ff7a2e; --cta-text: #ffffff;
  --ok: #4ade80; --ok-soft: #12321f; --warn: #ffb066; --warn-soft: #3a2614; --bad: #ff6b6b; --bad-soft: #3d1a1f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
/* without JavaScript the device setting still applies (theme.js sets data-theme as soon as it runs) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-blue: #4f86f0; --brand-navy: #8fb0ff; --brand-orange: #ff8a3d; --brand-red: #ff5a5f;
    --brand-stripe: linear-gradient(90deg, #4f86f0 0%, #ff8a3d 55%, #ff5a5f 100%);
    --bg: #0f1420; --surface: #171e2d; --surface-2: #1c2436; --text: #e3e9f4; --muted: #8e9ab0;
    --line: #2b3549; --accent: #3b78f0; --accent-soft: #1d2b4a; --link: #82a9ff;
    --cta: #fd6714; --cta-hover: #ff7a2e; --cta-text: #ffffff;
    --ok: #4ade80; --ok-soft: #12321f; --warn: #ffb066; --warn-soft: #3a2614; --bad: #ff6b6b; --bad-soft: #3d1a1f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--link); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 28px; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 28px 0 10px; }
h3 { font-size: 16px; margin: 18px 0 6px; }
code, .mono { font-family: ui-monospace, "SF Mono", Consolas, Menlo, monospace; font-size: .92em; }
.muted { color: var(--muted); } .small { font-size: 13px; } .nowrap { white-space: nowrap; } .right { text-align: right; }
.dark-only { display: none !important; }
[data-theme="dark"] .light-only { display: none !important; } [data-theme="dark"] .dark-only { display: block !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 12px; top: 8px; z-index: 50; background: var(--surface); padding: 6px 10px; border-radius: 6px; }

/* ---------- header / footer ---------- */
.site-head { display: flex; align-items: center; gap: 14px; padding: 12px 22px; background: var(--surface); border-bottom: 1px solid var(--line); position: relative; }
.brand-link { display: inline-flex; align-items: center; text-decoration: none; }
.brand-link img { height: 50px; width: auto; display: block; }
@media (max-width: 560px) { .brand-link img { height: 40px; } }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.spacer { flex: 1; }
.brand-stripe { height: 3px; background: var(--brand-stripe); }
.theme-toggle { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 15px; }
.site-foot { border-top: 1px solid var(--line); background: var(--surface); margin-top: 56px; }
.site-foot .inner { max-width: 1120px; margin: 0 auto; padding: 26px 22px; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; color: var(--muted); font-size: 14px; }
.site-foot a { color: var(--muted); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.menu-toggle { display: none; }

/* ---------- buttons, forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 14px/1 inherit; font-family: inherit; padding: 10px 16px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer; min-height: 40px; white-space: nowrap; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.cta { background: var(--cta); border-color: var(--cta); color: var(--cta-text); }
.btn.cta:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: var(--surface); }
.btn.danger.solid { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.small { padding: 6px 10px; min-height: 32px; font-size: 13px; }
.btn.big { padding: 14px 22px; font-size: 16px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.link-btn { background: none; border: 0; color: var(--link); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }
form.inline { display: inline; }
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 5px; }
label.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 500; }
label.check input { margin-top: 3px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=number], input[type=tel], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; min-height: 40px; }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.hint { color: var(--muted); font-size: 13px; margin-top: 4px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- notices ---------- */
.note { border-radius: 10px; padding: 11px 14px; margin: 0 0 16px; border: 1px solid var(--line); background: var(--surface); }
.note.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.note.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.note.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.note.info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }

/* ---------- cards, tables ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 0 0 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: var(--text); display: block; }
.stat b { display: block; font-size: 24px; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 13px; }
.stat.alert b { color: var(--bad); } .stat.go b { color: var(--accent); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
table.list { border-collapse: collapse; width: 100%; font-size: 14px; }
table.list th, table.list td { text-align: left; padding: 9px 11px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
table.list tr:last-child td { border-bottom: 0; }
table.list tfoot th { font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--text); border-top: 2px solid var(--line); position: static; }
table[data-sortable] thead th { cursor: pointer; user-select: none; }
table[data-sortable] thead th[aria-sort=ascending]::after { content: " ▲"; } table[data-sortable] thead th[aria-sort=descending]::after { content: " ▼"; }
td.bad { color: var(--bad); font-weight: 700; }
table.list td.act, table.list th.act { text-align: right; white-space: nowrap; }
table.list td.num, table.list th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.chip.high, .chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.medium, .chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.low, .chip.bad, .chip.unmatched { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.blue { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip.ai { background: var(--warn-soft); color: var(--warn); border-color: transparent; font-weight: 600; }
tr.warn-row td { color: var(--warn); }
.acct { font-family: ui-monospace, Consolas, monospace; font-weight: 600; letter-spacing: .02em; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }

/* ---------- marketing ---------- */
.wide { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding: 56px 0 30px; }
.hero h1 { font-size: 44px; line-height: 1.08; margin: 0 0 16px; letter-spacing: -.02em; }
.hero .lede { font-size: 18px; color: var(--muted); margin: 0 0 24px; max-width: 34em; }
.accent-orange { color: var(--brand-orange); }
.hero-art { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; }
.mini-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 8px; background: var(--surface-2); font-size: 14px; }
.mini-row .who { font-weight: 600; } .mini-row .amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.mini-row .to { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.section { padding: 36px 0; }
.section-title { font-size: 30px; margin: 0 0 8px; text-align: center; }
.section-sub { text-align: center; color: var(--muted); max-width: 44em; margin: 0 auto 28px; font-size: 16px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.feature h3 { margin: 10px 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); }
.icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.icon.o { background: color-mix(in srgb, var(--brand-orange) 16%, var(--surface)); color: var(--brand-orange); }
.icon.r { background: color-mix(in srgb, var(--brand-red) 14%, var(--surface)); color: var(--brand-red); }
.privacy-band { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 30px; position: relative; overflow: hidden; }
.privacy-band::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--brand-stripe); }
.promises { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 26px; }
.promises li { padding-left: 30px; position: relative; font-weight: 500; }
.promises li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); font-size: 13px; display: grid; place-items: center; font-weight: 800; }
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.steps > div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; position: relative; }
.steps > div::before { counter-increment: s; content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; margin-bottom: 10px; }
.cta-band { text-align: center; padding: 40px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.prose { max-width: 760px; margin: 0 auto; padding: 36px 22px; }
.prose h1 { font-size: 32px; } .prose h2 { font-size: 21px; margin-top: 30px; }
.prose li { margin: 4px 0; }
.price { font-size: 42px; font-weight: 800; }
.plan { text-align: center; max-width: 460px; margin: 0 auto; }
.plan ul { text-align: left; }
.faq dt { font-weight: 700; margin-top: 16px; } .faq dd { margin: 4px 0 0; color: var(--muted); }

/* ---------- auth pages ---------- */
.auth { max-width: 440px; margin: 40px auto; padding: 0 16px; }
.auth .card { padding: 26px; }
.auth h1 { font-size: 24px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 14px 0 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- app shell ---------- */
.app-head { display: flex; align-items: center; gap: 8px 10px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.app-head .brand-link img { height: 31px; width: auto; }
/* app top bar: the mark alone plus the name in the site font (the full glowing lockup is for the public header) */
.app-brand { gap: 7px; }
.brand-word { font-weight: 800; font-size: 21px; letter-spacing: -0.3px; line-height: 1; white-space: nowrap; }
.brand-word .bw-a { color: #e8541a; }
.brand-word .bw-b { color: #0b6fe0; }
:root[data-theme="dark"] .brand-word .bw-a { color: #ff7a3d; }
:root[data-theme="dark"] .brand-word .bw-b { color: #4d9bff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-word .bw-a { color: #ff7a3d; } :root:not([data-theme="light"]) .brand-word .bw-b { color: #4d9bff; } }
@media (max-width: 560px) { .brand-word { display: none; } }
.org-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-nav { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
@media (max-width: 1360px) { .app-head .org-pill { display: none; } }
.badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 99px; background: var(--brand-red); color: #fff; font-size: 11px; line-height: 18px; text-align: center; margin-left: 4px; font-weight: 700; }
details.menu { position: relative; }
details.menu > summary { list-style: none; cursor: pointer; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); font-size: 14px; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu .menu-body { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 220px; z-index: 30; }
details.menu .menu-body a, details.menu .menu-body button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
details.menu .menu-body a:hover, details.menu .menu-body button:hover { background: var(--surface-2); }
details.menu .menu-body hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
main.app { max-width: 1280px; margin: 0 auto; padding: 22px 18px 40px; }
.page-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.toolbar input[type=search] { max-width: 280px; }
.toolbar select, .toolbar input[type=date], .toolbar input[type=number] { width: auto; min-width: 0; }
.ai-switch { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; }
.ai-switch .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.ai-switch.on .dot { background: var(--ok); }

/* ---------- import ---------- */
.drop { border: 2px dashed var(--line); border-radius: 14px; padding: 30px; text-align: center; background: var(--surface); cursor: pointer; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.map-table select { min-width: 150px; font-size: 13px; padding: 5px 7px; min-height: 32px; }
.preview td { font-size: 13px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stepper { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; padding: 0; list-style: none; }
.stepper li { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.stepper li.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.stepper li.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }

/* ---------- review ---------- */
.review-table tr.sel td { background: var(--accent-soft); }
.review-table tr.focus td { box-shadow: inset 0 0 0 9999px color-mix(in srgb, var(--accent) 8%, transparent); }
.review-table tr.focus td:first-child { box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 9999px color-mix(in srgb, var(--accent) 8%, transparent); }
.review-table td.payer b { display: block; }
.review-table td .memo { color: var(--muted); font-size: 12.5px; max-width: 340px; overflow-wrap: anywhere; }
.match-cell { min-width: 250px; }
.match-cell .reason { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.picker { position: relative; }
.picker input { min-height: 34px; padding: 6px 9px; font-size: 13.5px; }
.picker .opts { position: absolute; left: 0; right: 0; top: calc(100% + 3px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); max-height: 260px; overflow-y: auto; z-index: 40; }
.picker .opt { padding: 7px 10px; cursor: pointer; font-size: 13.5px; display: flex; justify-content: space-between; gap: 8px; }
.picker .opt.on, .picker .opt:hover { background: var(--accent-soft); }
.picker .opt small { color: var(--muted); }
.kbd { display: inline-block; font: 600 11px ui-monospace, monospace; padding: 1px 5px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); }
.bulkbar { position: sticky; bottom: 12px; z-index: 20; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 12px; box-shadow: var(--shadow); margin-top: 12px; }
.bulkbar .picker { min-width: 260px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 100; box-shadow: var(--shadow); font-size: 14px; display: flex; gap: 12px; align-items: center; }
.toast button { background: none; border: 0; color: var(--brand-orange); font-weight: 700; cursor: pointer; font: inherit; }
dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); padding: 22px; max-width: 520px; width: calc(100% - 32px); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(10, 15, 25, .45); }
.split-row { display: grid; grid-template-columns: 1fr 120px 32px; gap: 8px; margin-bottom: 8px; align-items: center; }

/* ---------- print ---------- */
@media print {
  .site-head, .app-head, .brand-stripe, .site-foot, .no-print, .toolbar, .bulkbar { display: none !important; }
  body { background: #fff; color: #000; font-size: 12px; }
  main.app { padding: 0; max-width: none; }
  .table-wrap, .card { border: 0; box-shadow: none; }
  table.list th { background: #eee; color: #000; }
  .notice-page { page-break-after: always; border: 0; }
  .print-head[hidden] { display: block !important; margin-bottom: 10px; }
  table.list tfoot th { background: #eee; }
  a { color: #000; text-decoration: none; }
}
.notice-page { background: #fff; color: #141b2d; max-width: 720px; margin: 0 auto 24px; padding: 36px 40px; border: 1px solid var(--line); border-radius: 12px; position: relative; }
.notice-page::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, #205fe2 0%, #fd6714 55%, #d41b29 100%); border-radius: 12px 12px 0 0; }
.notice-page .big-acct { font: 800 34px ui-monospace, Consolas, monospace; color: #0a33a6; letter-spacing: .03em; border: 2px dashed #205fe2; border-radius: 12px; padding: 12px 20px; display: inline-block; margin: 6px 0 12px; }
.notice-page table { border-collapse: collapse; } .notice-page td { padding: 4px 14px 4px 0; vertical-align: top; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero h1 { font-size: 34px; }
  .grid3, .steps { grid-template-columns: 1fr 1fr; }
  .promises { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-head { flex-wrap: wrap; padding: 10px 16px; }
  .grid2, .grid3, .steps { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .wide, .prose { padding-left: 16px; padding-right: 16px; }
  main.app { padding: 16px 12px 32px; }
  .hide-sm { display: none; }
  .notice-page { padding: 24px 18px; }
  .split-row { grid-template-columns: 1fr 96px 32px; }
}
/* AI progress */
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.ai-notice { margin-bottom: 14px; }

/* contact page */
.contact-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; margin-bottom: 40px; }
.contact-side { border-top: 4px solid var(--cta); }
.err { color: var(--bad); margin-top: 4px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-page { padding-top: 32px; }
/* dashboard: the numbers that matter for the type */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 0 0 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); }
.kpi span { color: var(--muted); font-size: 13px; } .kpi b { font-size: 22px; letter-spacing: -.01em; } .kpi small { color: var(--muted); font-size: 12px; }
.kpi.ok { border-left-color: var(--ok); } .kpi.warn { border-left-color: var(--cta); } .kpi.bad { border-left-color: var(--brand-red); }
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 22px; margin: 0; }
.summary div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding: 4px 0; } .summary dt { color: var(--muted); } .summary dd { margin: 0; font-weight: 600; text-align: right; }
/* "Who it's for" pages */
.section-title { text-align: center; margin: 0 0 18px; font-size: 26px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature-grid .feature h3 { margin: 10px 0 4px; } .feature-grid .feature p { margin: 0; color: var(--muted); }
.steps .step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-blue); color: #fff; font-weight: 700; }
.report-pills { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.report-pills li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.faq { display: grid; gap: 10px; max-width: 820px; margin: 0 auto; } .faq summary { cursor: pointer; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .feature-grid { grid-template-columns: 1fr; } }


/* Viewers: the site's export and download features are off; printing the page is discouraged too (on-screen data can
   still be photographed or captured - this covers the site's own features, see Help > Roles). */
@media print {
  body.app[data-role="viewer"] > * { display: none !important; }
  body.app[data-role="viewer"]::before { content: "Printing is not available with view-only access. Ask an Admin if you need a copy."; display: block; padding: 40px; font: 16px/1.5 sans-serif; color: #000; }
}
.note.ai-note { background: var(--warn-soft); border-color: transparent; }
.issues .issues-overview { font-size: 15px; margin: 10px 0 12px; }
.issues-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.issues-list li { border-top: 1px solid var(--line); padding-top: 10px; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

/* Help center */
.help-home .lead { font-size: 18px; color: var(--muted); }
.help-search { position: relative; max-width: 640px; margin: 18px 0; }
.help-search input { font-size: 17px; padding: 12px 14px; }
.help-results { list-style: none; margin: 6px 0 0; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.help-results li { padding: 8px; border-bottom: 1px solid var(--line); } .help-results li:last-child { border-bottom: 0; }
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 22px 0; }
.help-cards > .card + .card { margin-top: 0; }
.help-card h2 { font-size: 17px; margin: 0 0 8px; } .help-card ul { margin: 0; padding-left: 18px; } .help-card li { margin: 3px 0; }
.help-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.help-side { position: sticky; top: 16px; font-size: 14px; max-height: calc(100vh - 32px); overflow: auto; }
.help-side summary { font-weight: 700; cursor: pointer; padding: 4px 0; } .help-side ul { list-style: none; padding-left: 10px; margin: 2px 0 8px; }
.help-side li { margin: 2px 0; } .help-side a[aria-current] { font-weight: 700; color: var(--text); }
.help-body { max-width: 760px; } .help-body h2 { margin-top: 28px; } .help-body figure { margin: 16px 0; }
.help-body figure img, .help-body img { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; }
.help-body ol.help-steps li { margin: 6px 0; }
.help-pn { display: flex; justify-content: space-between; gap: 12px; margin: 28px 0 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.help-menu summary { min-width: 34px; text-align: center; font-weight: 700; }
@media (max-width: 860px) { .help-layout { grid-template-columns: 1fr; } .help-side { position: static; max-height: none; } }

.help-wrap { max-width: 1120px; margin: 0 auto; padding: 28px 22px 48px; }
@media (max-width: 560px) { .help-wrap { padding: 18px 16px 36px; } }
/* OCR progress (scanned statements) */
progress[data-ocr-progress] { display: block; width: 100%; max-width: 420px; height: 8px; margin-top: 6px; accent-color: var(--brand, #205fe2); }
progress[data-ocr-progress][hidden] { display: none; }

/* ---------- dropdown menus (app top bar, public header) ---------- */
.nav-group { position: relative; display: inline-flex; align-items: center; }
.nav-top { color: var(--text); text-decoration: none; padding: 7px 9px; border-radius: 8px; font-weight: 500; font-size: 14.5px; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.nav-top.has-menu { padding-right: 3px; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.nav-top:hover, .nav-caret:hover { background: var(--surface-2); }
.nav-top.on, .nav-top[aria-current] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-top.on + .nav-caret { background: var(--accent-soft); color: var(--accent); }
.nav-caret { background: none; border: 0; color: var(--muted); font: inherit; font-size: 12px; padding: 9px 7px; border-radius: 0 8px 8px 0; cursor: pointer; line-height: 1; }
.nav-caret[aria-expanded="true"] { color: var(--accent); background: var(--accent-soft); }
.nav-menu { position: absolute; left: 0; top: calc(100% + 4px); min-width: 230px; z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px;
  visibility: hidden; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s, visibility 0s linear .12s; }
.nav-menu.right { left: auto; right: 0; }
.nav-menu.is-open, .nav-group:focus-within .nav-menu { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
@media (hover: hover) { .nav-group:hover .nav-menu { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; } }
.nav-menu a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; white-space: nowrap; }
.nav-menu a:hover, .nav-menu a:focus-visible { background: var(--accent-soft); color: var(--accent); }
.nav-top:focus-visible, .nav-caret:focus-visible, .nav-menu a:focus-visible, details.menu > summary:focus-visible, details.menu .menu-body a:focus-visible, details.menu .menu-body button:focus-visible,
.mnav > summary:focus-visible, .mnav a:focus-visible, .mnav summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .nav-menu { transition: none; } }
.site-nav { align-items: center; }
.site-nav .nav-top { font-size: 15px; padding: 7px 10px; }
.site-nav .nav-top.has-menu { padding-right: 3px; }
.app-head .cta-link { min-height: 34px; padding: 8px 13px; }
/* the phone menu: an accordion of the same groups (plain <details>, no JavaScript needed) */
.mnav { display: none; position: relative; }
.mnav > summary { list-style: none; cursor: pointer; padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; font-weight: 600; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.mnav > summary::-webkit-details-marker, .mnav .acc > summary::-webkit-details-marker { display: none; }
.mnav-body { position: absolute; right: 0; top: calc(100% + 6px); width: min(330px, calc(100vw - 24px)); max-height: calc(100vh - 90px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; z-index: 50; display: flex; flex-direction: column; gap: 2px; }
.mnav .acc-top, .mnav .acc > summary { display: flex; justify-content: space-between; align-items: center; padding: 10px 10px; border-radius: 8px; font-weight: 600; color: var(--text); text-decoration: none; cursor: pointer; list-style: none; }
.mnav .acc > summary::after { content: "▾"; color: var(--muted); font-size: 12px; }
.mnav .acc[open] > summary::after { content: "▴"; }
.mnav .acc-top.on, .mnav .acc[open] > summary { color: var(--accent); }
.mnav .acc a { display: block; padding: 8px 10px 8px 22px; color: var(--text); text-decoration: none; border-radius: 8px; font-size: 14.5px; }
.mnav .acc a:hover, .mnav .acc-top:hover, .mnav .acc > summary:hover { background: var(--surface-2); }
.mnav-body > .btn { margin-top: 6px; }
@media (max-width: 1100px) {
  .app-head .app-nav, .app-head .cta-link, .app-head .user-menu, .app-head .help-menu { display: none; }
  .app-head .mnav { display: block; }
}
@media (max-width: 860px) {
  .site-head .site-nav, .site-head .head-btn { display: none; }
  .site-head .mnav { display: block; }
}
