/* ===========================================================================
   LendoraBD — bank stationery
   Palette from cheque security tint, bottle-green seal ink, stamp red.
   =========================================================================== */

:root {
  --paper:      #edf0ea;
  --paper-deep: #e2e7de;
  --leaf:       #ffffff;
  --tint:       #dde7df;
  --ink:        #16211c;
  --ink-2:      #4d5c54;
  --ink-3:      #7d8a83;
  --seal:       #1b5e43;
  --seal-deep:  #0f3a29;
  --seal-soft:  #e6f0ea;
  --stamp:      #8c2f39;
  --stamp-soft: #f6e9ea;
  --brass:      #a5813c;
  --rule:       rgba(22, 33, 28, .14);
  --rule-soft:  rgba(22, 33, 28, .07);

  --display: "Newsreader", Georgia, serif;
  --body:    "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --shadow-leaf: 0 1px 2px rgba(22,33,28,.06), 0 8px 24px -12px rgba(22,33,28,.22);
  --shadow-lift: 0 2px 4px rgba(22,33,28,.07), 0 18px 44px -20px rgba(22,33,28,.35);
  --radius: 3px;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

/* Faint ledger ruling across the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: repeating-linear-gradient(
    to bottom, transparent 0 31px, rgba(22,33,28,.028) 31px 32px);
}
body > * { position: relative; z-index: 1; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.14; margin: 0; letter-spacing: -.012em; }
p { margin: 0 0 1em; }
a { color: var(--seal); text-decoration-thickness: 1px; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 14px;
}

.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;
}

/* ------------------------------------------------------------------ topbar */
.topbar {
  border-bottom: 1px solid var(--rule);
  background: rgba(237,240,234,.9);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 40;
}
.topbar__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 62px;
}
.wordmark { display: flex; align-items: baseline; gap: 9px; text-decoration: none; color: var(--ink); }
.wordmark__name { font-family: var(--display); font-size: 25px; letter-spacing: -.02em; }
.wordmark__name b { font-weight: 600; }
.wordmark__tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-3);
}
.topbar__links { display: flex; align-items: center; gap: 20px; }
.topbar__links a { font-size: 14px; color: var(--ink-2); text-decoration: none; }
.topbar__links a:hover { color: var(--seal); }

/* -------------------------------------------------------------------- hero */
.hero { padding: 68px 0 56px; border-bottom: 1px solid var(--rule); }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center;
}
.hero h1 {
  font-size: clamp(33px, 4.4vw, 55px);
  max-width: 17ch;
  margin-bottom: 20px;
  text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--seal); }
.hero__lede { font-size: 17.5px; color: var(--ink-2); max-width: 46ch; margin-bottom: 28px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.hero__note {
  margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--rule);
  font-size: 13.5px; color: var(--ink-3); max-width: 44ch;
}

/* ------------------------------------------------- signature: cheque leaf */
.hero__visual { min-width: 0; }
.cheque-stack { position: relative; padding: 12px 0 10px; }
.cheque-stack::before,
.cheque-stack::after {
  content: ""; position: absolute; inset: 22px -7px 18px 12px;
  background: var(--leaf); border: 1px solid var(--rule);
  border-radius: var(--radius); box-shadow: var(--shadow-leaf);
}
.cheque-stack::before { transform: rotate(1.6deg) translateY(6px); }
.cheque-stack::after  { transform: rotate(-.9deg) translateY(3px); }

.cheque {
  position: relative;
  z-index: 2;
  background:
    repeating-linear-gradient(115deg, rgba(27,94,67,.05) 0 1px, transparent 1px 7px),
    linear-gradient(158deg, var(--leaf) 0%, var(--tint) 130%);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: 20px 22px 16px 34px;
  font-family: var(--mono);
  container-type: inline-size;
}
/* perforated left edge */
.cheque::before {
  content: ""; position: absolute; left: 13px; top: 12px; bottom: 12px; width: 3px;
  background-image: radial-gradient(circle, var(--rule) 1.4px, transparent 1.5px);
  background-size: 3px 8px;
}
.cheque__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.cheque__bank { font-family: var(--display); font-size: 19px; letter-spacing: -.01em; color: var(--seal-deep); }
.cheque__bank span { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-top: 2px; }
.cheque__date { text-align: right; }
.cheque__date-label { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 4px; }
.cheque__boxes { display: flex; gap: 2px; }
.cheque__boxes i {
  font-style: normal; font-size: 12.5px; width: 17px; height: 22px;
  border: 1px solid var(--rule); display: grid; place-items: center;
  background: rgba(255,255,255,.65); color: var(--ink);
}
.cheque__row { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 13px; }
.cheque__label { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; padding-bottom: 3px; }
.cheque__line {
  flex: 1; border-bottom: 1px solid var(--rule); min-height: 26px;
  display: flex; align-items: flex-end; padding-bottom: 3px;
  font-size: 14px; color: var(--ink);
}
.cheque__words { font-family: var(--display); font-style: italic; font-size: 15.5px; letter-spacing: 0; }
.cheque__amount {
  border: 1px solid var(--rule); background: rgba(255,255,255,.7);
  padding: 5px 12px; font-size: 17px; font-weight: 600; letter-spacing: -.01em;
  min-width: 132px; text-align: right;
}
.cheque__foot {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: 18px; padding-top: 12px; border-top: 1px dashed var(--rule);
}
.cheque__micr { font-size: 12px; letter-spacing: .18em; color: var(--ink-2); }
.cheque__sign { text-align: right; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); border-top: 1px solid var(--ink-3); padding-top: 4px; min-width: 120px; }

.cheque-caption {
  margin-top: 22px; font-size: 13px; color: var(--ink-3); text-align: center;
  font-family: var(--mono); letter-spacing: .04em;
}

/* ------------------------------------------------------------------ facts */
.facts { border-bottom: 1px solid var(--rule); background: var(--paper-deep); }
.facts__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 26px 24px 26px 0; border-right: 1px solid var(--rule); }
.fact:last-child { border-right: 0; }
.fact:not(:first-child) { padding-left: 24px; }
.fact__k { font-family: var(--mono); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 7px; }
.fact__v { font-family: var(--display); font-size: 25px; color: var(--seal-deep); line-height: 1.1; }
.fact__v small { font-size: 14px; color: var(--ink-2); font-family: var(--body); }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--body); font-size: 15px; font-weight: 600; letter-spacing: .005em;
  padding: 12px 22px; border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: background .16s, color .16s, border-color .16s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--seal); color: #fff; }
.btn--primary:hover { background: var(--seal-deep); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { border-color: var(--seal); color: var(--seal); }
.btn--quiet { background: transparent; color: var(--ink-2); padding: 8px 12px; font-weight: 500; font-size: 14px; }
.btn--quiet:hover { color: var(--seal); }
.btn--danger { background: transparent; color: var(--stamp); border-color: rgba(140,47,57,.3); }
.btn--danger:hover { background: var(--stamp-soft); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--sm { padding: 7px 14px; font-size: 13.5px; }

/* ------------------------------------------------------------------ steps */
.apply { padding: 60px 0 80px; }
.apply__head { max-width: 60ch; margin-bottom: 40px; }
.apply__head h2 { font-size: clamp(28px, 3.6vw, 40px); margin-bottom: 12px; }
.apply__head p { color: var(--ink-2); font-size: 16.5px; }

.shell { display: grid; grid-template-columns: 232px 1fr; gap: 40px; align-items: start; }

.rail { position: sticky; top: 86px; }
.rail__list { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.rail__btn {
  display: flex; gap: 12px; align-items: baseline; width: 100%; text-align: left;
  background: none; border: 0; border-left: 2px solid transparent; margin-left: -1px;
  padding: 10px 10px 10px 16px; cursor: pointer; color: var(--ink-3);
  font-family: var(--body); font-size: 14.5px; line-height: 1.35;
  transition: color .15s, border-color .15s;
}
.rail__btn:hover { color: var(--ink); }
.rail__btn[aria-current="true"] { color: var(--ink); border-left-color: var(--seal); font-weight: 600; }
.rail__btn.is-done .rail__n::after { content: "✓"; color: var(--seal); }
.rail__n { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--ink-3); min-width: 18px; }
.rail__btn[aria-current="true"] .rail__n { color: var(--seal); }
.rail__btn.is-done .rail__n { font-size: 0; }

.rail__save {
  margin-top: 22px; padding: 14px 16px; border: 1px solid var(--rule);
  border-radius: var(--radius); background: var(--leaf); font-size: 13px; color: var(--ink-2);
}
.rail__save b { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--ink); letter-spacing: .04em; margin-bottom: 3px; }
.rail__save em { font-style: normal; color: var(--ink-3); font-size: 12px; }

/* ------------------------------------------------------------------ panel */
.panel { display: none; }
.panel.is-active { display: block; animation: rise .3s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.panel__head { margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.panel__head h3 { font-size: 27px; margin-bottom: 6px; }
.panel__head p { color: var(--ink-2); font-size: 15px; margin: 0; max-width: 60ch; }

fieldset { border: 0; margin: 0 0 30px; padding: 0; }
legend {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); padding: 0 0 12px;
  border-bottom: 1px solid var(--rule-soft); width: 100%; margin-bottom: 18px;
}

.grid { display: grid; gap: 16px 18px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 13.5px; font-weight: 600; color: var(--ink); letter-spacing: .005em; }
.field .hint { font-size: 12.5px; color: var(--ink-3); }
.req { color: var(--stamp); font-weight: 400; }

input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=date], input[type=password], input[type=search], select, textarea {
  font-family: var(--body); font-size: 15px; color: var(--ink);
  background: var(--leaf); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 10px 12px; width: 100%; transition: border-color .15s, box-shadow .15s;
}
input[type=date] { font-family: var(--mono); font-size: 14px; }
textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: rgba(22,33,28,.26); }
input:focus, select:focus, textarea:focus {
  outline: 0; border-color: var(--seal); box-shadow: 0 0 0 3px rgba(27,94,67,.12);
}
input.is-bad, select.is-bad { border-color: var(--stamp); background: var(--stamp-soft); }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%234d5c54' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
.err { font-size: 12.5px; color: var(--stamp); display: none; }
.err.is-on { display: block; }

.money-wrap { position: relative; }
.money-wrap input { padding-left: 30px; font-family: var(--mono); font-size: 15px; }
.money-wrap::before {
  content: "৳"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--ink-3); font-size: 15px; pointer-events: none;
}
.money-said { font-family: var(--display); font-style: italic; font-size: 14px; color: var(--seal); min-height: 20px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; cursor: pointer; }
.check input { margin: 3px 0 0; accent-color: var(--seal); width: 16px; height: 16px; flex: none; }
.check span { color: var(--ink-2); }

/* ---------------------------------------------------------- repeat blocks */
.repeat { display: flex; flex-direction: column; gap: 14px; }
.rrow {
  display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 12px; align-items: end;
  padding: 14px 16px; background: var(--leaf); border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.rrow__n {
  position: absolute; margin-left: -30px; font-family: var(--mono); font-size: 11px;
  color: var(--ink-3); padding-top: 26px;
}
.rrow__x {
  background: none; border: 1px solid var(--rule); border-radius: var(--radius);
  color: var(--ink-3); width: 38px; height: 38px; cursor: pointer; font-size: 17px; line-height: 1;
}
.rrow__x:hover { border-color: var(--stamp); color: var(--stamp); background: var(--stamp-soft); }
.add-btn {
  align-self: start; background: none; border: 1px dashed var(--rule); color: var(--seal);
  font-family: var(--body); font-size: 14px; font-weight: 600; padding: 9px 16px;
  border-radius: var(--radius); cursor: pointer;
}
.add-btn:hover { border-color: var(--seal); background: var(--seal-soft); }
.empty-note { font-size: 13.5px; color: var(--ink-3); font-style: italic; }

/* ---------------------------------------------------------------- uploads */
.docs { display: flex; flex-direction: column; gap: 14px; }
.doc {
  border: 1px solid var(--rule); border-radius: var(--radius); background: var(--leaf);
  padding: 16px 18px;
}
.doc__top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.doc__name { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.doc__desc { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.pill {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 2px; border: 1px solid;
}
.pill--req { color: var(--stamp); border-color: rgba(140,47,57,.28); background: var(--stamp-soft); }
.pill--opt { color: var(--ink-3); border-color: var(--rule); }
.pill--ok  { color: var(--seal); border-color: rgba(27,94,67,.3); background: var(--seal-soft); }

.drop {
  margin-top: 14px; border: 1px dashed var(--rule); border-radius: var(--radius);
  padding: 16px; text-align: center; font-size: 13.5px; color: var(--ink-3);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.is-over { border-color: var(--seal); background: var(--seal-soft); color: var(--seal); }
.drop b { color: var(--seal); }

.filelist { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.filelist li {
  display: flex; align-items: center; gap: 11px; font-size: 13.5px;
  padding: 8px 11px; background: var(--paper); border: 1px solid var(--rule-soft); border-radius: 2px;
}
.filelist .fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist .fs { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.filelist .fx { background: none; border: 0; color: var(--ink-3); cursor: pointer; font-size: 15px; padding: 0 3px; }
.filelist .fx:hover { color: var(--stamp); }
.filelist .bar { height: 2px; background: var(--seal); border-radius: 2px; transition: width .2s; }

/* ------------------------------------------------ cheque schedule (rows) */
.sched { display: flex; flex-direction: column; gap: 8px; }

.crow {
  display: grid;
  grid-template-columns: 70px 1fr 1.15fr 1fr 1fr .95fr .8fr 108px;
  gap: 10px; align-items: end;
  background: var(--leaf); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 11px 14px 11px 12px;
  position: relative;
}
.crow::before {
  content: ""; position: absolute; left: 5px; top: 9px; bottom: 9px; width: 3px;
  background-image: radial-gradient(circle, var(--rule) 1.2px, transparent 1.3px);
  background-size: 3px 7px;
}
.crow--security {
  background: linear-gradient(180deg, var(--seal-soft), var(--leaf) 70%);
  border-color: rgba(27,94,67,.32);
}
.crow__n {
  font-family: var(--mono); font-size: 10px; line-height: 1.35;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
  padding-bottom: 9px;
}
.crow__n span { color: var(--ink); font-size: 12px; letter-spacing: .04em; }
.crow--security .crow__n { color: var(--seal); }
.crow--security .crow__n span { color: var(--seal-deep); }

.crow__f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.crow__f label,
.crow__img label { font-size: 10.5px; color: var(--ink-3); font-weight: 500; letter-spacing: .02em; }
.crow input { padding: 7px 8px; font-size: 13px; }
.crow input[type=date] { font-size: 12px; padding: 7px 5px; }
.crow input[readonly] { background: var(--paper); color: var(--ink-3); }
.crow [data-key="no"] { font-family: var(--mono); }
.crow .money-wrap input { font-family: var(--mono); padding-left: 22px; }
.crow .money-wrap::before { font-size: 12.5px; left: 8px; }

.crow__img { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.crow__up {
  background: none; border: 1px dashed var(--rule); border-radius: var(--radius);
  color: var(--seal); font-family: var(--body); font-size: 12.5px; font-weight: 600;
  padding: 7px 10px; cursor: pointer; white-space: nowrap;
}
.crow__up:hover { border-color: var(--seal); background: var(--seal-soft); }
.crow__file {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.paylist { display: flex; flex-direction: column; gap: 8px; }

/* --------------------------------------------------------- document groups */
.docgroup { margin-bottom: 30px; }
.docgroup__hd { margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--rule-soft); }
.docgroup__hd h4 {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: 5px;
}
.docgroup__hd p { font-size: 13.5px; color: var(--ink-2); margin: 0; max-width: 62ch; }
.docgroup[data-stage="2"] .doc { background: var(--paper); }
.pill--later { color: var(--brass); border-color: rgba(165,129,60,.42); background: #faf4e9; }

/* ---------------------------------------------------------------- review */
.review { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--leaf); overflow: hidden; }
.review__sec { border-bottom: 1px solid var(--rule-soft); padding: 18px 22px; }
.review__sec:last-child { border-bottom: 0; }
.review__sec h4 {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 500; margin-bottom: 12px;
}
.review__sec h4 button { float: right; }
.dl { display: grid; grid-template-columns: 190px 1fr; gap: 7px 20px; font-size: 14.5px; margin: 0; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; color: var(--ink); }
.dl dd.missing { color: var(--stamp); font-style: italic; }

.gate {
  margin-top: 22px; padding: 18px 20px; border: 1px solid; border-radius: var(--radius);
  font-size: 14.5px;
}
.gate--bad { border-color: rgba(140,47,57,.3); background: var(--stamp-soft); color: #6d242c; }
.gate--ok  { border-color: rgba(27,94,67,.3); background: var(--seal-soft); color: var(--seal-deep); }
.gate ul { margin: 8px 0 0; padding-left: 20px; }
.gate li { margin-bottom: 3px; }

.actions {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--rule);
}
.actions .spacer { flex: 1; }

/* -------------------------------------------------------------- resume/ok */
.sheet {
  max-width: 640px; margin: 60px auto; background: var(--leaf);
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 40px; box-shadow: var(--shadow-leaf);
}
.sheet h2 { font-size: 30px; margin-bottom: 10px; }
.sheet p { color: var(--ink-2); }

.stamped {
  display: inline-block; border: 2.5px solid var(--stamp); color: var(--stamp);
  font-family: var(--mono); font-size: 15px; letter-spacing: .18em; text-transform: uppercase;
  padding: 9px 18px; border-radius: 3px; transform: rotate(-3.2deg);
  opacity: .88; margin: 6px 0 22px;
}
.refbox {
  font-family: var(--mono); font-size: 22px; letter-spacing: .1em; color: var(--seal-deep);
  background: var(--seal-soft); border: 1px solid rgba(27,94,67,.25); border-radius: var(--radius);
  padding: 15px 20px; text-align: center; margin: 20px 0;
}

/* ------------------------------------------------------------------ toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  background: var(--ink); color: var(--paper); font-size: 14px;
  padding: 11px 20px; border-radius: var(--radius); box-shadow: var(--shadow-lift);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 90;
  max-width: min(92vw, 520px);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.is-bad { background: var(--stamp); }

/* ----------------------------------------------------------------- footer */
.footer { border-top: 1px solid var(--rule); background: var(--paper-deep); padding: 40px 0 46px; margin-top: 20px; }
.footer__grid { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: flex-start; }
.footer p { font-size: 13.5px; color: var(--ink-3); max-width: 46ch; margin: 10px 0 0; }
.footer a { color: var(--ink-2); font-size: 13.5px; text-decoration: none; display: block; margin-bottom: 6px; }
.footer a:hover { color: var(--seal); }
.footer h5 { font-family: var(--mono); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; font-weight: 500; }

/* ----------------------------------------------------------------- mobile */
@media (max-width: 1080px) {
  .crow { grid-template-columns: 64px repeat(3, 1fr) 110px; row-gap: 12px; }
  .crow__n { grid-column: 1 / -1; padding-bottom: 0; }
}

@media (max-width: 940px) {
  .hero { padding: 48px 0 44px; }
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .hero h1 { max-width: 20ch; }
  .hero__lede, .hero__note { max-width: none; }
  .shell { grid-template-columns: 1fr; gap: 22px; }

  /* All seven steps visible as a grid — no sideways scrolling on a phone. */
  .rail { position: static; }
  .rail__list {
    display: grid; grid-template-columns: 1fr 1fr; gap: 7px;
    border-left: 0; border-bottom: 0; overflow: visible;
  }
  .rail__list li { display: flex; }
  .rail__btn {
    width: 100%; margin-left: 0; padding: 10px 12px;
    border: 1px solid var(--rule); border-left: 1px solid var(--rule);
    border-radius: var(--radius); background: var(--leaf);
    white-space: normal; font-size: 13.5px; line-height: 1.3;
    align-items: center; gap: 9px;
  }
  .rail__btn[aria-current="true"] {
    border-color: var(--seal); background: var(--seal-soft); color: var(--seal-deep);
  }
  .rail__btn.is-done { border-color: rgba(27,94,67,.28); }
  .rail__btn.is-done .rail__n::after { font-size: 13px; }
  .rail__n { min-width: 16px; }
  .rail__save { margin-top: 14px; }
  .facts__grid { grid-template-columns: repeat(2, 1fr); }
  .fact { border-bottom: 1px solid var(--rule); padding-right: 18px; }
  .fact:nth-child(2n) { border-right: 0; }
  .fact:not(:first-child) { padding-left: 18px; }
  .fact:nth-child(2n+1) { padding-left: 0; }
}

@media (max-width: 720px) {
  .wrap { width: min(100% - 32px, var(--wrap)); }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .span-2, .span-all { grid-column: auto; }
  .rrow { grid-template-columns: 1fr; gap: 10px; }
  .rrow__x { width: 100%; height: 36px; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dt { font-size: 12.5px; }
  .dl dd { margin-bottom: 11px; }
  .panel__head h3 { font-size: 23px; }
  .apply { padding: 40px 0 60px; }
  .apply__head h2 { font-size: 26px; }
  .actions { gap: 9px; }
  .actions .btn { flex: 1 1 auto; }
  .actions .spacer { display: none; }

  /* Cheque rows become stacked cards, two fields per line */
  .crow { grid-template-columns: 1fr 1fr; padding: 12px 14px; gap: 11px; }
  .crow::before { display: none; }
  .crow__n { grid-column: 1 / -1; font-size: 11px; padding-bottom: 2px;
             border-bottom: 1px solid var(--rule-soft); padding-bottom: 8px; }
  .crow__n br { display: none; }
  .crow__n span { margin-left: 5px; }
  .crow__img { grid-column: 1 / -1; }
  .crow__up { padding: 9px 10px; }
}

@media (max-width: 560px) {
  .hero { padding: 34px 0 32px; }
  .hero h1 { font-size: clamp(29px, 8.6vw, 38px); max-width: none; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }
  .facts__grid { grid-template-columns: 1fr; }
  .fact { border-right: 0; padding: 18px 0; }
  .fact:not(:first-child) { padding-left: 0; }
  .fact:last-child { border-bottom: 0; }
  .cheque { padding: 15px 13px 13px 26px; }
  .cheque__row { flex-wrap: wrap; gap: 6px; }
  .cheque__amount { min-width: 100px; font-size: 15px; }
  .cheque__words { font-size: 13.5px; }
  .cheque__boxes i { width: 14px; height: 19px; font-size: 11px; }
  .cheque-stack::before, .cheque-stack::after { display: none; }
  .sheet { padding: 24px 20px; margin: 26px auto; }
  .topbar__links { gap: 13px; }
  .topbar__links a { font-size: 13px; }
  /* keep the bar on one line — the same links are in the footer */
  .topbar__links a.hide-sm { display: none; }
  .wordmark__name { font-size: 21px; }
  .wordmark__tag { display: none; }
  .doc { padding: 14px; }
  .drop { padding: 14px 10px; font-size: 12.5px; }
  .review__sec { padding: 15px 16px; }
  .crow { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------------------ print */
@media print {
  .topbar, .rail, .actions, .hero__cta, .footer, .drop, .add-btn, .rrow__x { display: none !important; }
  body { background: #fff; font-size: 12px; }
  body::before { display: none; }
  .panel { display: block !important; page-break-inside: avoid; }
  .shell { grid-template-columns: 1fr; }
}

/* ==================================================== passport photo ==== */
.ppwrap { display: grid; grid-template-columns: 132px 1fr; gap: 20px; align-items: start; }

.ppframe {
  width: 132px; aspect-ratio: 35 / 45;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--leaf) repeating-linear-gradient(
    45deg, transparent 0 6px, rgba(22,33,28,.025) 6px 12px);
  display: grid; place-items: center; overflow: hidden; position: relative;
}
.ppframe img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ppframe__empty {
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); text-align: center; line-height: 1.6;
}
.ppframe.is-set { border-color: rgba(27,94,67,.35); }

.ppside__t { font-size: 14px; font-weight: 600; margin: 0 0 5px; }
.ppside__d { font-size: 13px; color: var(--ink-2); margin: 0 0 12px; max-width: 52ch; line-height: 1.5; }
.ppside__btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------- cropper -- */
.cropper {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(22,33,28,.62); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px;
}
.cropper[hidden] { display: none; }
.cropper__card {
  background: var(--paper); border-radius: var(--radius);
  box-shadow: var(--shadow-lift); padding: 26px;
  width: min(100%, 420px); max-height: 92vh; overflow: auto;
}
.cropper__card h3 { font-size: 22px; margin-bottom: 6px; }
.cropper__card > p { font-size: 13.5px; color: var(--ink-2); margin-bottom: 18px; }

.cropper__stage {
  position: relative; width: 252px; aspect-ratio: 35 / 45; margin: 0 auto 18px;
  border-radius: var(--radius); overflow: hidden; background: var(--ink);
  touch-action: none; cursor: grab;
}
.cropper__stage:active { cursor: grabbing; }
.cropper__stage canvas { display: block; width: 100%; height: 100%; }
.cropper__mask {
  position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
  background:
    linear-gradient(to right,  rgba(255,255,255,.22) 0 1px, transparent 1px) 50% 0 / 33.33% 100% repeat-x,
    linear-gradient(to bottom, rgba(255,255,255,.22) 0 1px, transparent 1px) 0 50% / 100% 33.33% repeat-y;
}

.cropper__zoom { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.cropper__zoom span {
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3);
}
.cropper__zoom input { flex: 1; accent-color: var(--seal); }

.cropper__btns { display: flex; align-items: center; gap: 10px; }
.cropper__btns .spacer { flex: 1; }

@media (max-width: 560px) {
  .ppwrap { grid-template-columns: 106px 1fr; gap: 14px; }
  .ppframe { width: 106px; }
  .cropper__card { padding: 20px 18px; }
  .cropper__stage { width: 100%; max-width: 240px; }
}

/* ---------------------------------------------------------------------------
   Visually-hidden form controls.
   These must come after the base input rules: `input[type=text]` and friends
   set width:100% and beat a bare `.sr-only` on specificity, which left the
   honeypot field stretching the page wider than the viewport.
   --------------------------------------------------------------------------- */
input.sr-only, select.sr-only, textarea.sr-only {
  width: 1px; height: 1px; min-width: 0; padding: 0; border: 0;
  position: absolute; overflow: hidden; clip: rect(0 0 0 0);
}

/* --------------------------------------------- titled record uploads ---- */
.doc__title { margin-top: 14px; gap: 5px; }
.doc__title label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.doc__title input { font-size: 14px; }

/* file rows can carry a title above the filename */
.filelist .fn b { display: block; font-weight: 600; font-size: 13.5px; color: var(--ink); }
.filelist .fn em {
  display: block; font-style: normal; font-size: 11.5px; color: var(--ink-3);
  font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
