/* Fonts: Open Sans and Source Serif 4, both SIL Open Font License 1.1 (licenses in /assets/fonts). Served locally. */
@font-face { font-family: "Open Sans"; src: url("/assets/fonts/open-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/assets/fonts/open-sans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/assets/fonts/open-sans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/assets/fonts/open-sans-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/assets/fonts/source-serif-4-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/assets/fonts/source-serif-4-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/assets/fonts/source-serif-4-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
/* Stonevale Bank design system: one brand color (deep navy) with a restrained gold accent, white space, plain type. */
:root {
  --navy: #0e2340;
  --navy-2: #173459;
  --navy-3: #22487a;
  --gold: #c8a45d;
  --gold-dark: #9a7a3a;
  --ink: #15202e;
  --muted: #5a6677;
  --line: #dfe3ea;
  --line-2: #eef1f5;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --pos: #18794e;
  --neg: #b42318;
  --warn: #a15c07;
  --info: #1d4f91;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --font: "Open Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; }
a { color: var(--navy-3); }
a:hover { color: var(--navy); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; color: var(--navy); font-weight: 600; }
h1 { font-size: 1.65rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.num, .money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos { color: var(--pos); }
.neg { color: var(--ink); }
.right { text-align: right; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid #7aa7e6; outline-offset: 2px; }

/* ---------- buttons and forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; border: 1px solid transparent; border-radius: 8px; padding: .62em 1.15em; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); color: #fff; }
.btn-secondary { background: #fff; color: var(--navy); border-color: #c5ccd8; }
.btn-secondary:hover { background: var(--line-2); color: var(--navy); }
.btn-danger { background: #fff; color: var(--neg); border-color: #e7b3ae; }
.btn-danger:hover { background: #fdf1f0; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #d6b46f; color: var(--navy); }
.btn-link { background: none; border: 0; color: var(--navy-3); padding: 0; font-weight: 600; cursor: pointer; font: inherit; text-decoration: underline; }
.btn-sm { padding: .38em .8em; font-size: .87rem; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; }

.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; color: var(--ink); }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: .25rem; }
input[type=text], input[type=password], input[type=email], input[type=date], input[type=search], input[type=tel], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #b9c2cf; border-radius: 7px; padding: .6em .7em;
}
input:focus, select:focus, textarea:focus { border-color: var(--navy-3); outline: 2px solid rgba(34, 72, 122, .18); }
.input-money { position: relative; }
.input-money::before { content: "$"; position: absolute; left: .75em; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-money input { padding-left: 1.6em; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 4.2em; }
.pw-toggle { position: absolute; right: .5em; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--navy-3); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; padding: .3em; }
.check { display: flex; gap: .5rem; align-items: flex-start; font-size: .9rem; }
.check input { margin-top: .25em; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }

.notice { border-radius: 8px; padding: .75rem 1rem; margin: 0 0 1rem; font-size: .92rem; border: 1px solid; }
.notice-error { background: #fef3f2; border-color: #f4c7c3; color: #7a1a12; }
.notice-success { background: #effaf4; border-color: #b7e4cb; color: #0d4f31; }
.notice-info { background: #eff5fd; border-color: #c4d8f2; color: #173c6b; }
.notice-warn { background: #fffaeb; border-color: #f2d898; color: #6b3e04; }

/* ---------- cards, tables, badges ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem 1.4rem; margin-bottom: 1.25rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .8rem; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th { text-align: left; font-weight: 600; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: .55rem .6rem; border-bottom: 1px solid var(--line); }
table.data td { padding: .65rem .6rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover td { background: #f7f9fc; }
table.data th.right, table.data td.right { text-align: right; }
.table-wrap { overflow-x: auto; }
.badge { display: inline-block; font-size: .74rem; font-weight: 600; padding: .15em .55em; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.badge-ok { color: #0d4f31; background: #effaf4; border-color: #b7e4cb; }
.badge-warn { color: #6b3e04; background: #fffaeb; border-color: #f2d898; }
.badge-bad { color: #7a1a12; background: #fef3f2; border-color: #f4c7c3; }
.badge-neutral { color: #344054; background: #f2f4f7; border-color: #d0d5dd; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.2rem; margin: 0; font-size: .93rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.empty { color: var(--muted); padding: 1rem 0; }
.spinner { color: var(--muted); padding: 2rem 0; text-align: center; }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(9, 18, 33, .55); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 50; }
.modal { background: #fff; border-radius: 12px; max-width: 480px; width: 100%; padding: 1.5rem; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.modal h2 { margin-bottom: .6rem; }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: inherit; }
.brand img { width: 38px; height: 38px; display: block; }
.brand-name { font-family: "Source Serif 4", Georgia, serif; font-weight: 700; font-size: 1.3rem; letter-spacing: -.005em; }
.brand-name small { display: block; font-family: var(--font); font-weight: 500; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }

/* ---------- signed-in app shell (online banking) ---------- */
.topbar { background: var(--navy); color: #fff; }
.topbar-inner { max-width: 1160px; margin: 0 auto; padding: .7rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar .brand { color: #fff; }
.topbar-user { display: flex; align-items: center; gap: 1rem; font-size: .9rem; }
.topbar-user .btn-link { color: #fff; }
.mainnav { background: #fff; border-bottom: 1px solid var(--line); }
.mainnav-inner { max-width: 1160px; margin: 0 auto; padding: 0 1.25rem; display: flex; gap: .2rem; overflow-x: auto; }
.mainnav a { display: block; padding: .85rem .9rem; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem; border-bottom: 3px solid transparent; white-space: nowrap; }
.mainnav a:hover { color: var(--navy); background: var(--line-2); }
.mainnav a.active { color: var(--navy); border-bottom-color: var(--gold); }
.page { max-width: 1160px; margin: 0 auto; padding: 1.6rem 1.25rem 3rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.cols { display: grid; grid-template-columns: 2fr 1fr; gap: 1.25rem; align-items: start; }
.narrow { max-width: 620px; }

.acct-list { display: grid; gap: .8rem; }
.acct { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.acct:hover { border-color: #b9c6da; background: #fbfcfe; }
.acct-name { font-weight: 600; color: var(--navy); }
.acct-bal { font-size: 1.35rem; font-weight: 600; text-align: right; }
.acct-bal small { display: block; font-size: .75rem; font-weight: 500; color: var(--muted); }
.total-strip { display: flex; gap: 2rem; flex-wrap: wrap; padding: 1rem 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; }
.total-strip div small { display: block; color: var(--muted); font-size: .8rem; }
.total-strip div strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.quick { display: grid; gap: .6rem; }
.quick a { display: block; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--navy); font-weight: 600; background: #fff; }
.quick a:hover { background: var(--line-2); }
.review { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.2rem; margin-bottom: 1rem; }
.review .kv { font-size: 1rem; }
.receipt-ref { font-family: Consolas, "Courier New", monospace; letter-spacing: .03em; }

.bank-card { width: 320px; max-width: 100%; aspect-ratio: 1.586; border-radius: 14px; padding: 1.1rem 1.25rem; color: #fff; background: linear-gradient(135deg, #0e2340 0%, #22487a 100%); display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 8px 20px rgba(14, 35, 64, .25); position: relative; }
.bank-card.locked { filter: grayscale(.85); opacity: .75; }
.bank-card .bc-top { display: flex; justify-content: space-between; align-items: center; }
.bank-card .bc-top img { width: 34px; height: 34px; }
.bank-card .bc-num { font-size: 1.2rem; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.bank-card .bc-foot { display: flex; justify-content: space-between; font-size: .8rem; opacity: .9; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1.25rem; }

.signin-page { min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(180deg, var(--navy) 0, var(--navy) 260px, var(--bg) 260px); }
.signin-head { max-width: 1160px; width: 100%; margin: 0 auto; padding: 1.1rem 1.25rem; }
.signin-head .brand { color: #fff; }
.signin-box { max-width: 430px; width: calc(100% - 2rem); margin: 2rem auto; }
.signin-box .card { padding: 1.8rem; }
.signin-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .88rem; margin-top: 1rem; }
.secure-note { display: flex; gap: .5rem; align-items: center; font-size: .82rem; color: var(--muted); margin-top: 1rem; }

/* ---------- staff and admin shell ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #cfd8e6; display: flex; flex-direction: column; }
.sidebar .brand { color: #fff; padding: 1.1rem 1.1rem 1.2rem; }
.sidebar nav { display: flex; flex-direction: column; padding: 0 .6rem; gap: .1rem; }
.sidebar nav a { color: #cfd8e6; text-decoration: none; padding: .6rem .8rem; border-radius: 7px; font-weight: 500; font-size: .93rem; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar nav a.active { background: rgba(200, 164, 93, .16); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.sidebar .nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #8aa0bf; padding: 1rem .8rem .3rem; }
.sidebar-foot { margin-top: auto; padding: 1rem 1.1rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; }
.sidebar-foot .btn-link { color: #fff; }
.workspace { padding: 1.6rem 2rem 3rem; min-width: 0; }
.env-tag { display: inline-block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; background: rgba(200, 164, 93, .2); color: var(--gold); padding: .15em .5em; border-radius: 4px; margin-left: .2rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.stat small { display: block; color: var(--muted); font-size: .8rem; margin-bottom: .2rem; }
.stat strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; color: var(--navy); }
.stat.attention strong { color: var(--warn); }
.searchbar { display: flex; gap: .6rem; margin-bottom: 1rem; }
.searchbar input { max-width: 420px; }
.temp-cred { font-family: Consolas, "Courier New", monospace; font-size: 1.05rem; background: #f8fafc; border: 1px dashed #b9c2cf; border-radius: 8px; padding: .8rem 1rem; }

/* ---------- public website ---------- */
.utility { background: #08182e; color: #c9d4e3; font-size: .82rem; }
.utility-inner { max-width: 1160px; margin: 0 auto; padding: .4rem 1.25rem; display: flex; justify-content: flex-end; gap: 1.4rem; }
.utility a { color: #c9d4e3; text-decoration: none; }
.utility a:hover { color: #fff; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.site-header-inner { max-width: 1160px; margin: 0 auto; padding: .9rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-header .brand { color: var(--navy); }
.site-nav { display: flex; gap: 1.6rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav a:hover { color: var(--navy-3); }
.hero { background: linear-gradient(120deg, #0e2340 0%, #173459 60%, #22487a 100%); color: #fff; }
.hero-inner { max-width: 1160px; margin: 0 auto; padding: 3.2rem 1.25rem; display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem; align-items: center; }
.hero h1 { color: #fff; font-size: 2.3rem; font-weight: 600; margin-bottom: .6rem; }
.hero p { color: #d6dfec; font-size: 1.1rem; max-width: 34em; }
.hero .eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; margin-bottom: .8rem; }
.home-signin { background: #fff; color: var(--ink); border-radius: 12px; padding: 1.5rem; box-shadow: 0 14px 40px rgba(0, 0, 0, .25); }
.home-signin h2 { font-size: 1.15rem; }
.section { max-width: 1160px; margin: 0 auto; padding: 3rem 1.25rem; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { font-size: 1.6rem; }
.section .lead { color: var(--muted); max-width: 44em; margin-bottom: 1.8rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.2rem; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.tile h3 { margin-bottom: .4rem; }
.tile .rate { font-size: 1.6rem; font-weight: 600; color: var(--navy); margin: .4rem 0 0; font-variant-numeric: tabular-nums; }
.tile .rate-label { font-size: .8rem; color: var(--muted); margin-bottom: .8rem; }
.tile p { color: var(--muted); font-size: .93rem; flex: 1; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.4rem 2rem; }
.feature h3 { font-size: 1rem; margin-bottom: .25rem; }
.feature p { color: var(--muted); font-size: .93rem; margin: 0; }
.feature .icon { width: 36px; height: 36px; border-radius: 8px; background: #eef3fa; display: flex; align-items: center; justify-content: center; margin-bottom: .6rem; }
.feature .icon svg { width: 20px; height: 20px; stroke: var(--navy-3); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.site-footer { background: #08182e; color: #a9b7ca; font-size: .86rem; }
.site-footer-inner { max-width: 1160px; margin: 0 auto; padding: 2.4rem 1.25rem 1.6rem; }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 1.5rem; margin-bottom: 1.8rem; }
.site-footer h4 { color: #fff; font-size: .9rem; margin: 0 0 .6rem; }
.site-footer a { color: #a9b7ca; text-decoration: none; display: block; padding: .15rem 0; }
.site-footer a:hover { color: #fff; }
.site-footer .legal { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 1.2rem; font-size: .8rem; }
.site-footer .brand { color: #fff; margin-bottom: .8rem; }

/* ---------- printable statement ---------- */
.statement { max-width: 860px; margin: 1.5rem auto; background: #fff; padding: 2.2rem 2.4rem; border: 1px solid var(--line); }
.st-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--navy); padding-bottom: 1rem; margin-bottom: 1.2rem; }
.st-head .brand { color: var(--navy); }
.st-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; background: #f6f8fb; border-radius: 8px; padding: 1rem; margin: 1rem 0 1.4rem; }
.st-summary small { display: block; color: var(--muted); font-size: .78rem; }
.st-summary strong { font-variant-numeric: tabular-nums; }
.print-bar { max-width: 860px; margin: 1rem auto 0; display: flex; justify-content: flex-end; gap: .6rem; }
@media print {
  body { background: #fff; }
  .print-bar { display: none; }
  .statement { border: 0; margin: 0; padding: 0; max-width: none; }
}

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .cols, .hero-inner, .split, .footer-cols { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 1fr; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar-foot { margin-top: 0; }
  .workspace { padding: 1.2rem 1rem 2rem; }
  .site-nav { display: none; }
  .hero h1 { font-size: 1.8rem; }
  .st-summary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .topbar-user span { display: none; }
  .acct-bal { font-size: 1.1rem; }
  .utility-inner { justify-content: center; gap: 1rem; }
}
.btn-block { width: 100%; }
.acct-list + .card { margin-top: 1.25rem; }
.cols > *, .split > *, .hero-inner > * { min-width: 0; }
@media (max-width: 600px) { .hide-sm { display: none; } }

/* ---------- motion for the signed-in apps (disabled for reduced-motion users) ---------- */
@keyframes view-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.view-in > * { animation: view-rise .5s cubic-bezier(.22, .61, .36, 1) both; }
.view-in > *:nth-child(2) { animation-delay: .05s; }
.view-in > *:nth-child(3) { animation-delay: .1s; }
.view-in > *:nth-child(4) { animation-delay: .15s; }
.view-in > *:nth-child(n+5) { animation-delay: .2s; }
.acct, .stat, .quick a, .card { transition: transform .25s cubic-bezier(.22, .61, .36, 1), box-shadow .25s cubic-bezier(.22, .61, .36, 1), border-color .25s; }
.acct:hover, .stat:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(14, 35, 64, .10); }
.quick a:hover { transform: translateX(3px); }
.topbar { background: linear-gradient(100deg, #0a1a31, #173459); }
.sidebar { background: linear-gradient(180deg, #0e2340, #0a1a31); }
.btn-primary { transition: background .2s, transform .15s, box-shadow .2s; }
.btn-primary:hover { box-shadow: 0 8px 20px rgba(14, 35, 64, .25); }
.btn:active { transform: translateY(1px); }
.spinner { display: grid; gap: .8rem; padding: 1rem 0; color: transparent; }
.spinner::before, .spinner::after { content: ""; height: 90px; border-radius: 12px; background: linear-gradient(90deg, #e8ecf2 0%, #f5f7fa 50%, #e8ecf2 100%); background-size: 200% 100%; animation: shimmer-load 1.2s linear infinite; }
.spinner::after { height: 220px; }
@keyframes shimmer-load { to { background-position: -200% 0; } }
.modal-backdrop { animation: fade-in .2s ease both; }
.modal { animation: pop-in .25s cubic-bezier(.22, .61, .36, 1) both; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.bank-card { transition: transform .4s cubic-bezier(.22, .61, .36, 1), filter .4s, opacity .4s; }
.bank-card:hover { transform: rotate(-2deg) translateY(-4px); }
@media (prefers-reduced-motion: reduce) {
  .view-in > *, .modal, .modal-backdrop, .spinner::before, .spinner::after { animation: none !important; }
  .acct, .stat, .quick a, .card, .bank-card { transition: none !important; }
}

/* Installable app: banner, install guide, offline page */
[data-install] { display: none; }
.can-install [data-install] { display: inline-flex; }
.is-app [data-install], .app-installed [data-install], .is-app .install-banner { display: none !important; }
.install-banner { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; width: min(560px, calc(100% - 24px)); display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem .7rem .7rem; background: #0e2340; color: #fff; border: 1px solid rgba(200, 164, 93, .45); border-radius: 14px; box-shadow: 0 18px 40px rgba(10, 26, 49, .35); animation: banner-up .45s cubic-bezier(.22, .61, .36, 1) both; }
.install-banner img { border-radius: 10px; flex: none; }
.install-banner-text { flex: 1; display: grid; line-height: 1.3; min-width: 0; }
.install-banner-text strong { font-size: .97rem; }
.install-banner-text span { font-size: .84rem; color: #c9d3e3; }
.install-banner-close { background: none; border: 0; color: #c9d3e3; font-size: 1.5rem; line-height: 1; padding: .1rem .35rem; cursor: pointer; border-radius: 6px; }
.install-banner-close:hover { color: #fff; background: rgba(255, 255, 255, .08); }
@keyframes banner-up { from { opacity: 0; transform: translate(-50%, 24px); } }
.install-guide { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(10, 26, 49, .55); animation: fade-in .2s ease both; }
.install-guide-card { width: min(420px, 100%); background: #fff; border-radius: 16px; padding: 1.6rem 1.5rem 1.3rem; text-align: center; box-shadow: 0 24px 60px rgba(10, 26, 49, .35); animation: pop-in .25s cubic-bezier(.22, .61, .36, 1) both; }
.install-guide-card img { border-radius: 14px; box-shadow: var(--shadow); }
.install-guide-card h2 { font-size: 1.25rem; margin: .8rem 0 .6rem; }
.install-guide-card ol { text-align: left; margin: 0 0 1rem; padding-left: 1.3rem; display: grid; gap: .55rem; }
.share-ic { width: 1.15em; height: 1.15em; vertical-align: -.2em; fill: none; stroke: #1a73e8; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.offline-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(180deg, #0e2340, #0a1a31); }
.offline-box { width: min(440px, 100%); background: #fff; border-radius: 18px; padding: 2rem 1.6rem 1.4rem; text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
.offline-box img { border-radius: 18px; box-shadow: var(--shadow); }
.offline-box h1 { margin: 1rem 0 .5rem; font-size: 1.5rem; }
@media (prefers-reduced-motion: reduce) { .install-banner, .install-guide, .install-guide-card { animation: none !important; } }
.app-note { margin-top: .7rem; display: none; }
.can-install .app-note { display: block; }
.is-app .app-note, .app-installed .app-note { display: none; }
@media print { .install-banner, .install-guide { display: none !important; } }

/* Security center checklist */
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.check-list li { line-height: 1.45; }
.check-list .badge { min-width: 4.5rem; text-align: center; margin-right: .25rem; }

/* ---------- Checks drawn on the owner's design (positions in % of the 1899x828 artwork) ---------- */
.check-paper { position: relative; margin: 0; width: 100%; max-width: 860px; container-type: inline-size; border-radius: 6px; overflow: hidden; box-shadow: 0 6px 22px rgba(10, 26, 49, .16); background: #f8f8f6; }
.check-paper .ck-bg { display: block; width: 100%; height: auto; }
.check-paper .ck { position: absolute; color: #0b1f4d; font-family: "Source Serif 4", Georgia, serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.ck-number { right: 3.6%; top: 6%; font: 700 2.4cqw "Open Sans", Arial, sans-serif !important; }
.ck-header { left: 45.8%; top: 7.4%; font-size: 1.75cqw; }
.ck-header.personal .ck-name { font-weight: 700; font-size: 1.9cqw; }
.ck-date { left: 72.3%; top: 21.4%; width: 16%; text-align: center; font-size: 1.7cqw; }
.ck-year { left: 91.4%; top: 21.4%; width: 4.6%; text-align: center; font-size: 1.7cqw; }
.ck-payee { left: 13.8%; top: 39.4%; width: 61%; font-size: 2cqw; }
.ck-amount { left: 79.2%; top: 36.6%; width: 17%; height: 8.6%; display: flex; align-items: center; justify-content: center; font: 700 2.1cqw "Open Sans", Arial, sans-serif !important; }
.ck-words { left: 4.8%; top: 49%; width: 73.2%; font-size: 1.75cqw; }
.ck-memo { left: 10.8%; top: 69.4%; width: 31.4%; font-size: 1.65cqw; }
.ck-sign { left: 58.8%; top: 67%; width: 37.4%; text-align: center; font-size: 2.3cqw; font-style: italic; color: #13306e; }
.ck-micr { left: 4.6%; top: 84.2%; font: 2.5cqw "Consolas", "Courier New", monospace !important; letter-spacing: .12em; color: #0b1f4d; }
.ck-stamp { left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-14deg); font: 800 9cqw "Open Sans", Arial, sans-serif !important; letter-spacing: .12em; color: rgba(14, 35, 64, .16) !important; border: .5cqw solid rgba(14, 35, 64, .16); padding: 0 2cqw; border-radius: 1.5cqw; overflow: visible !important; }
.ck-stamp.void { color: rgba(179, 38, 30, .55) !important; border-color: rgba(179, 38, 30, .55); }
.modal:has(.check-modal) { max-width: min(920px, 96vw); width: 100%; }
.check-modal .kv { margin-top: 1rem; }
.check-preview { margin: 1rem 0; }

/* Print just the chosen check or receipt */
#print-area { display: none; }
@media print {
  body.printing > *:not(#print-area) { display: none !important; }
  body.printing #print-area { display: block; }
  body.printing .check-paper { box-shadow: none; max-width: 100%; border-radius: 0; }
}

/* Face ID button */
.faceid-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; margin-bottom: 1rem; }
.faceid-btn svg { flex: none; }

/* Profile button and menu (Online Banking top bar) */
.profile-menu { position: relative; }
.profile-btn { display: inline-flex; align-items: center; gap: .55rem; background: transparent; border: 1px solid rgba(255, 255, 255, .25); color: inherit; border-radius: 999px; padding: .25rem .7rem .25rem .25rem; cursor: pointer; font: inherit; }
.profile-btn:hover, .profile-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .1); }
.avatar { width: 2rem; height: 2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #c8a45d; color: #0a1a31; font-weight: 700; font-size: .85rem; }
.profile-pop { position: absolute; right: 0; top: calc(100% + .5rem); min-width: 15rem; background: #fff; color: #0e2340; border-radius: 12px; box-shadow: 0 12px 32px rgba(10, 26, 49, .22); padding: .5rem; z-index: 60; }
.profile-pop .who { padding: .6rem .75rem .7rem; border-bottom: 1px solid #e6e9ee; margin-bottom: .35rem; }
.profile-pop .who small { display: block; color: #5b6b80; }
.profile-pop a, .profile-pop button { display: block; width: 100%; text-align: left; padding: .6rem .75rem; border-radius: 8px; color: inherit; text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.profile-pop a:hover, .profile-pop button:hover, .profile-pop a:focus-visible, .profile-pop button:focus-visible { background: #f1f4f8; }
.profile-pop .sep { border-top: 1px solid #e6e9ee; margin: .35rem 0; }
@media (max-width: 640px) { .profile-btn .pname { display: none; } .profile-btn { padding: .2rem; } }

/* Holds on an account */
.hold-list { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .5rem; }
.hold-list li { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .6rem .8rem; border: 1px solid #f2d898; background: #fffaeb; border-radius: 10px; }
.bal-split { display: flex; gap: 1.5rem; flex-wrap: wrap; font-size: .9rem; color: #5b6b80; }
.bal-split strong { color: #0e2340; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.25rem; align-items: start; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid #eef1f5; }
.toggle-row:last-child { border-bottom: 0; }

/* Mobile check deposit: photo slots */
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.photo-pick { display: grid; gap: .5rem; }
.photo-slot { display: flex; align-items: center; justify-content: center; aspect-ratio: 2.3 / 1; border: 2px dashed #c9d2de; border-radius: 10px; background: #f6f8fb; color: #5b6b80; overflow: hidden; text-align: center; font-size: .9rem; padding: .25rem; }
.photo-slot img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.deposit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
@media (max-width: 640px) { .photo-grid { grid-template-columns: 1fr; } }
