/* Demo Bank · secured by Kyrios ID. Phone first; one column up to 640px. */
:root {
  color-scheme: light;
  --ink: #0e1b2c;
  --ink-2: #3c4a5d;
  --muted: #66758a;
  --line: #e3e8ef;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --brand: #12305a;
  --brand-2: #1d4d8c;
  --accent: #0b8a6b;
  --accent-2: #087259;
  --gem: #2bd4a4;
  --ok: #067647;
  --ok-bg: #ecfdf3;
  --bad: #b42318;
  --bad-bg: #fef3f2;
  --warn: #93370d;
  --warn-bg: #fffaeb;
  --info-bg: #eef4ff;
  --focus: #2e6be6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 6px 20px rgba(16, 24, 40, 0.06);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* .btn sets display, which would beat the hidden attribute */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--brand-2); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.test-banner {
  background: var(--bad);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  text-align: center;
  letter-spacing: 0.01em;
}

/* ---------- header */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 750; font-size: 18px; letter-spacing: -0.01em; }
.brand-sub { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.brand-sub b { color: var(--accent-2); font-weight: 650; }
.topnav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.topnav a, .topnav button {
  font: inherit; font-size: 14px; color: var(--ink-2); text-decoration: none; background: none; border: 0;
  padding: 8px 10px; border-radius: 10px; cursor: pointer; white-space: nowrap;
}
@media (max-width: 430px) {
  .topnav a.nav-account { display: none; }  /* the logo leads to the account */
  .topnav a, .topnav button { padding: 8px 7px; font-size: 13.5px; }
}
.topnav a:hover, .topnav button:hover { background: var(--bg); }

/* ---------- layout */
main.container { width: 100%; max-width: 640px; margin: 0 auto; padding: 20px 16px 28px; flex: 1; overflow-wrap: anywhere; }
h1 { font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; margin: 8px 0 6px; }
h2 { font-size: 18px; margin: 28px 0 10px; letter-spacing: -0.01em; }
.lead { color: var(--ink-2); margin: 0 0 20px; font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin: 14px 0;
}

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; width: 100%;
  font: inherit; font-weight: 650; font-size: 16.5px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: background 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #0c2448; }
.btn-confirm { background: var(--accent); color: #fff; }
.btn-confirm:hover { background: var(--accent-2); }
.btn-secondary { background: var(--surface); color: var(--brand); border-color: #c9d3e1; }
.btn-secondary:hover { background: #f7f9fc; }
.btn-ghost { background: none; color: var(--ink-2); min-height: 44px; font-weight: 550; }
.btn-ghost:hover { background: #e9edf3; }
.btn svg { width: 22px; height: 22px; flex: none; }
.stack { display: grid; gap: 10px; margin-top: 16px; }

/* ---------- forms */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.field input {
  font: inherit; font-size: 17px; min-height: 50px; padding: 10px 14px; border-radius: 11px;
  border: 1px solid #c9d3e1; background: #fff; color: var(--ink); width: 100%;
}
.field input:focus { border-color: var(--focus); outline: 3px solid rgba(46, 107, 230, 0.18); }
.field .hint { font-size: 13px; color: var(--muted); }
.field.invalid input { border-color: var(--bad); }
.amount-input { position: relative; }
.amount-input input { padding-right: 64px; font-size: 22px; font-weight: 650; }
.amount-input span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 18px; }
.chip {
  font: inherit; font-size: 14px; padding: 8px 12px; border-radius: 999px; border: 1px solid #c9d3e1;
  background: #fff; color: var(--ink-2); cursor: pointer;
}
.chip:hover { border-color: var(--brand-2); color: var(--brand); }

/* ---------- status messages */
.status { border-radius: 12px; padding: 12px 14px; margin: 14px 0 0; font-size: 15px; display: none; }
.status.show { display: block; }
.status.info { background: var(--info-bg); color: var(--brand); }
.status.ok { background: var(--ok-bg); color: var(--ok); }
.status.bad { background: var(--bad-bg); color: var(--bad); }
.status .code { display: block; font-family: var(--mono); font-size: 12px; opacity: 0.8; margin-top: 2px; }
.notice { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; margin: 14px 0; }
.notice.info { background: var(--info-bg); color: var(--brand); }

/* ---------- landing */
.hero { text-align: left; padding: 8px 0 4px; }
.hero-art { display: flex; justify-content: center; margin: 8px 0 18px; }
.hero-art svg { width: 132px; height: 132px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.steps li::before {
  counter-increment: step; content: counter(step);
  width: 34px; height: 34px; border-radius: 50%; background: #e6edf7; color: var(--brand);
  display: grid; place-items: center; font-weight: 700;
}
.steps b { display: block; }
.steps span { color: var(--ink-2); font-size: 15px; }

/* ---------- account */
.balance-card {
  background: linear-gradient(135deg, var(--brand) 0%, #1b437a 60%, #1f5a8f 100%);
  color: #fff; border: 0; padding: 22px 20px; position: relative; overflow: hidden;
}
.balance-card::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
  border: 18px solid rgba(255, 255, 255, 0.07);
}
.balance-card .label { font-size: 14px; opacity: 0.85; }
.balance-card .balance { font-size: 34px; font-weight: 750; letter-spacing: -0.02em; margin: 2px 0 10px; }
.balance-card .iban { font-family: var(--mono); font-size: 13.5px; opacity: 0.9; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .who { font-weight: 600; }
.list .what { font-size: 13.5px; color: var(--muted); }
.list .amt { margin-left: auto; font-weight: 650; white-space: nowrap; }
.list .amt.in { color: var(--ok); }
.list a.row-link { text-decoration: none; color: inherit; display: flex; gap: 12px; align-items: center; width: 100%; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: #e6edf7; color: var(--brand);
  display: grid; place-items: center; font-weight: 700; flex: none; font-size: 14px;
}

/* ---------- confirm + receipt */
.confirm-card { padding: 0; overflow: hidden; }
.confirm-top { padding: 20px 18px 16px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.confirm-top .label { color: var(--muted); font-size: 14px; }
.amount-hero { font-size: 40px; font-weight: 780; letter-spacing: -0.025em; line-height: 1.1; margin-top: 4px; }
.amount-hero .cur { font-size: 22px; font-weight: 650; color: var(--ink-2); margin-left: 6px; }
.kv { display: grid; grid-template-columns: 104px 1fr; gap: 10px 12px; padding: 16px 18px; margin: 0; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.kv dd.mono { font-family: var(--mono); font-weight: 550; font-size: 15px; }
.payee-name { font-size: 19px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; padding: 4px 10px; border-radius: 999px; }
.status-pill.executed { background: var(--ok-bg); color: var(--ok); }
.status-pill.pending { background: var(--info-bg); color: var(--brand); }
.status-pill.cancelled, .status-pill.blocked, .status-pill.rejected { background: var(--bad-bg); color: var(--bad); }
.result-icon { width: 64px; height: 64px; margin: 6px 0 4px; }

.signed-box { background: #0f1a2b; color: #dbe7ff; border-radius: 12px; padding: 14px; margin: 10px 0; }
.signed-box h3 { margin: 0 0 8px; font-size: 14px; color: #9fb4d9; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.signed-box pre, pre.code {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.55; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere;
}
.signed-box .hash { font-family: var(--mono); font-size: 12px; color: #7ee2c0; overflow-wrap: anywhere; }
.checks { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.checks li { padding-left: 26px; position: relative; font-size: 14.5px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 17px; height: 17px; border-radius: 50%;
  background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/13px no-repeat;
}
details.disclose { margin: 14px 0; }
details.disclose summary { cursor: pointer; font-weight: 650; color: var(--brand); padding: 6px 0; }

/* ---------- devices / security tables */
.device { display: grid; gap: 4px; }
.device .name { font-weight: 650; }
.mono { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.tag { display: inline-block; font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 999px; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.tag.info { background: var(--info-bg); color: var(--brand); }
.tag.test { background: var(--bad); color: #fff; }

/* ---------- event list (demo panel + security page) */
.events { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.event { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 10px 12px; min-width: 0; }
.event-head { display: flex; gap: 8px; align-items: baseline; }
.event-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.event-title { font-size: 14.5px; font-weight: 600; }
.event .tag { margin-left: auto; flex: none; }
.event details summary { font-size: 13px; color: var(--brand-2); cursor: pointer; margin-top: 4px; }
.event pre { background: #0f1a2b; color: #dbe7ff; border-radius: 8px; padding: 10px; font-size: 12px; margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.event .kvs { display: grid; gap: 6px; margin-top: 6px; }
.event .kvs div { font-size: 12.5px; }
.event .kvs b { display: block; color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- demo panel */
.panel-toggle {
  /* In the page flow on phones and tablets, so it can never cover the confirm button. */
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: calc(100% - 32px); max-width: 608px; margin: 0 auto 4px; min-height: 48px;
  background: #0f1a2b; color: #fff; border: 0; border-radius: 12px; padding: 11px 16px;
  font: inherit; font-weight: 650; font-size: 14.5px; cursor: pointer;
}
@media (min-width: 1200px) {
  /* Wide screens have room beside the 640 px column: float it. */
  .panel-toggle {
    position: fixed; right: 20px; bottom: 20px; z-index: 20; width: auto; margin: 0;
    border-radius: 999px; box-shadow: 0 8px 24px rgba(15, 26, 43, 0.3);
  }
}
.panel-toggle .count { background: var(--gem); color: #04291f; border-radius: 999px; font-size: 12px; padding: 1px 7px; }
.demo-panel {
  position: fixed; z-index: 30; background: var(--bg); box-shadow: -10px 0 40px rgba(15, 26, 43, 0.25);
  display: flex; flex-direction: column;
  left: 0; right: 0; bottom: 0; height: 78vh; border-radius: 18px 18px 0 0;
}
.demo-panel[hidden] { display: none; }
.demo-panel header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fff; border-radius: 18px 18px 0 0; }
.demo-panel header h2 { margin: 0; font-size: 16px; }
.demo-panel header p { margin: 0; font-size: 12.5px; color: var(--muted); }
.demo-panel header button { margin-left: auto; font: inherit; border: 0; background: var(--bg); border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.demo-panel .panel-body { overflow-y: auto; padding: 12px 16px 24px; flex: 1; overflow-wrap: anywhere; }
@media (min-width: 900px) {
  .demo-panel { left: auto; top: 0; height: auto; width: 460px; border-radius: 0; }
  .demo-panel header { border-radius: 0; }
}

footer.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 14px 16px 28px; }
footer.foot a { color: var(--muted); }

@media (min-width: 560px) {
  .btn { width: auto; }
  .stack .btn, .actions .btn { width: 100%; }
  h1 { font-size: 30px; }
}

.mt-0 { margin-top: 0; }
.card.list-card { padding-top: 4px; padding-bottom: 4px; }
.problem { color: var(--bad); }

/* ---------- Verification of Payee + confirm button */
.vop { display: inline-block; font-size: 13.5px; font-weight: 650; padding: 3px 10px; border-radius: 999px; }
.vop-match { background: var(--ok-bg); color: var(--ok); }
.vop-close_match { background: var(--warn-bg); color: var(--warn); }
.vop-no_match { background: var(--bad-bg); color: var(--bad); }
.vop-not_checked { background: #eef1f5; color: var(--ink-2); }
.vop-note { display: block; font-weight: 500; font-size: 14px; margin-top: 4px; color: var(--warn); }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.btn-tall { min-height: 60px; padding: 10px 18px; line-height: 1.3; text-align: left; }
.pin-note { margin: 2px 4px 0; text-align: center; }

/* ---------- narrow phones: labels above values, so IBANs fit on one line */
@media (max-width: 480px) {
  .kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .kv dt { margin-top: 10px; font-size: 13px; }
  .kv dt:first-child { margin-top: 0; }
  .kv dd.mono { font-size: 15.5px; }
}
pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- lab timing page */
.field select {
  font: inherit; font-size: 17px; min-height: 50px; padding: 10px 14px; border-radius: 11px;
  border: 1px solid #c9d3e1; background: #fff; color: var(--ink); width: 100%;
}
.lab-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14.5px; }
.lab-table th, .lab-table td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); }
.lab-table th { color: var(--muted); font-weight: 600; font-size: 13px; }
.lab-table tr.bad td { color: var(--bad); }
.lab-table td:last-child, .lab-table th:last-child { text-align: right; white-space: nowrap; }
#lab-history-list li { gap: 10px; }
#lab-history-list .chip { margin-left: auto; flex: none; }

/* ---------- rings: activation, PIN help, lost and remove */
.btn-small { min-height: 42px; padding: 0 14px; font-size: 14.5px; width: auto; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: #912018; }
.ring { display: grid; gap: 4px; }
.ring .name { font-weight: 650; }
.ring-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ring-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ring-tech { margin-top: 4px; }
.ring-tech summary { font-size: 13px; color: var(--brand-2); cursor: pointer; }
.ring-tech span { display: block; margin-top: 4px; }
.confirm-panel { background: var(--bad-bg); color: var(--bad); border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.confirm-panel p { margin: 0; font-size: 14.5px; }
.confirm-panel .ring-actions { margin-top: 8px; }
.pin-ways { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.pin-ways li { padding-left: 26px; position: relative; font-size: 14.5px; color: var(--ink-2); }
.pin-ways li b { color: var(--ink); }
.pin-ways li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%;
}
.pin-ways li.works::before { background: var(--ok); }
.pin-ways li.later::before { background: #c4cdd9; }
.pin-help p { margin: 0; font-size: 15px; color: var(--ink-2); }
.waiting .name { font-weight: 650; }

/* ---------- second confirmation in the bank's app: waiting, pairing, and the app itself */
.app-wait { border-color: #b8cdf0; background: var(--info-bg); }
.app-wait p { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; }
.app-wait-head { display: flex; align-items: center; gap: 10px; color: var(--brand); }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--brand-2); flex: none; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.8); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.app-pairing { display: grid; gap: 8px; margin-top: 8px; }
.pair-panel p { margin: 6px 0; font-size: 15px; }
.code-big { font-size: 26px; font-weight: 700; letter-spacing: 0.08em; color: var(--brand); padding: 6px 0; }
.pair-qr { display: block; width: 200px; height: 200px; margin: 2px 0 6px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.app-device .ring-head { margin-top: 4px; }
.app-topbar .app-sim-tag { margin-left: auto; }
.approval-body { padding: 0 18px 16px; }
.approval-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.approval-actions .btn { width: 100%; }
.approval .confirm-panel .btn { width: auto; }

/* ---------- disclosure policy */
.policy p, .policy li { font-size: 15.5px; color: var(--ink-2); }
.policy ul { padding-left: 20px; margin: 6px 0 0; }
.policy h2 { margin-top: 22px; }
