/* Phone first. This is used from an iPhone, standing up, one thumb.
   Rules that follow from that:
   - one column, always; no layout that reflows into columns
   - every tappable thing is at least 48px tall and full width
   - nothing depends on hover; there is no hover on a phone
   - no small text in tables; the review card replaces the table entirely
   - 16px minimum on inputs, or iOS zooms the page when you focus them */

:root {
  --ink: #14171a;
  --muted: #5b6570;
  --line: #d9dee3;
  --bg: #f6f7f9;
  --card: #ffffff;
  --navy: #1f3864;
  --green: #0b7a3d;
  --red: #b3261e;
  --amber: #8a5a00;
  --tap: 52px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  padding-bottom: 96px;              /* clear of the bottom nav */
}

.wrap { max-width: 720px; margin: 0 auto; padding: 16px; }

h1 { font-size: 22px; margin: 0 0 4px; color: var(--navy); }
h2 { font-size: 17px; margin: 24px 0 8px; color: var(--navy); }
p.sub { color: var(--muted); margin: 0 0 16px; font-size: 15px; }

/* ---------------------------------------------------------------- cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin: 0 0 12px;
}
.card.bad   { border-left: 6px solid var(--red); }
.card.good  { border-left: 6px solid var(--green); }
.card.warn  { border-left: 6px solid var(--amber); }

/* -------------------------------------------------------------- numbers */
.headline { font-size: 34px; font-weight: 700; letter-spacing: -0.5px; margin: 2px 0; }
.headline.neg { color: var(--red); }
.label { font-size: 13px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }

.rows { display: grid; gap: 10px; }
.row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line);
  font-size: 16px;
}
.row:last-child { border-bottom: 0; }
.row .n { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

/* -------------------------------------------------------------- buttons */
.btn {
  display: block; width: 100%; min-height: var(--tap);
  font-size: 18px; font-weight: 600;
  border: 1px solid var(--navy); border-radius: 12px;
  background: var(--navy); color: #fff;
  padding: 14px 16px; margin: 0 0 10px;
  text-align: center; text-decoration: none;
  -webkit-appearance: none; cursor: pointer;
}
.btn.ghost { background: #fff; color: var(--navy); }
.btn.big { min-height: 68px; font-size: 21px; }
.btn:active { transform: translateY(1px); }

/* The three review buttons. Stacked full width - a phone thumb is not
   accurate enough for three side-by-side targets. */
.choices { display: grid; gap: 10px; margin-top: 14px; }
.choices .btn { margin: 0; }
.b-business { background: var(--navy); border-color: var(--navy); }
.b-personal { background: #6a3d9a; border-color: #6a3d9a; }
.b-transfer { background: #4a5560; border-color: #4a5560; }
.choices kbd {
  font: inherit; opacity: 0.65; margin-left: 8px; font-size: 15px;
}

/* ---------------------------------------------------------------- forms */
label { display: block; font-size: 15px; color: var(--muted); margin: 0 0 6px; }
input[type=password], input[type=text] {
  width: 100%; min-height: var(--tap);
  font-size: 17px;                     /* >=16px or iOS zooms on focus */
  padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink);
  -webkit-appearance: none;
}
input[type=file] { width: 100%; font-size: 16px; padding: 14px 0; }

.switch {
  display: flex; align-items: center; gap: 12px;
  min-height: var(--tap); font-size: 16px; color: var(--ink);
}
.switch input { width: 28px; height: 28px; }

/* ----------------------------------------------------------------- misc */
.err {
  background: #fdecea; border: 1px solid #f4c7c3; color: var(--red);
  border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; font-size: 16px;
}
.pill {
  display: inline-block; font-size: 13px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; background: #eef1f4; color: var(--muted);
}
.pill.ok   { background: #e6f4ea; color: var(--green); }
.pill.bad  { background: #fdecea; color: var(--red); }

.desc { font-size: 16px; word-break: break-word; }
.meta { font-size: 14px; color: var(--muted); }

.check-line {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 15px; font-variant-numeric: tabular-nums;
  padding: 6px 0; border-bottom: 1px dashed var(--line);
}
.check-line:last-child { border-bottom: 0; }
.check-line .bad { color: var(--red); font-weight: 700; }

/* ------------------------------------------------------------ bottom nav */
nav.tabs {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
nav.tabs a {
  flex: 1; text-align: center; padding: 12px 4px 14px;
  font-size: 12px; color: var(--muted); text-decoration: none;
}
nav.tabs a.on { color: var(--navy); font-weight: 700; }
nav.tabs a b { display: block; font-size: 19px; line-height: 1.3; }

.htmx-request .spin { display: inline; }
.spin { display: none; }
