/* ==========================================================
   Adaptive Banking prototype - OCBC Innovation Challenge PS4
   Student concept. Synthetic data only.
   ========================================================== */
:root {
  --red: #e1251b;
  --red-dark: #b81c14;
  --red-tint: #fdecea;
  --ink: #1d1d1f;
  --ink-2: #4a4a4f;
  --ink-3: #75757c;
  --line: #e6e6ea;
  --bg: #f4f4f6;
  --card: #ffffff;
  --green: #0f7b45;
  --green-tint: #e6f4ec;
  --amber: #a15c00;
  --amber-tint: #fff4e0;
  --blue: #1d5fbf;
  --blue-tint: #e8f0fc;
  --focus: #1d5fbf;
  --radius: 14px;
  --scale: 1;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.06);
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, "Noto Sans SC", "Noto Sans Tamil", sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: #e9e9ee; }
body { min-height: 100vh; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Page chrome (outside the phone) ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 10px 20px;
  background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.topbar .brand { font-weight: 800; color: var(--red); letter-spacing: .5px; font-size: 18px; }
.topbar .title { font-weight: 600; font-size: 14px; }
.topbar .badge { font-size: 11px; background: var(--amber-tint); color: var(--amber); padding: 3px 8px; border-radius: 999px; font-weight: 600; }
.tabs { margin-left: auto; display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: 10px; }
.tabs button { border: 0; background: transparent; padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.tabs button[aria-selected="true"] { background: #fff; color: var(--red); box-shadow: var(--shadow); }

.stage { display: grid; grid-template-columns: 290px 420px minmax(300px, 1fr); gap: 20px; padding: 20px; align-items: start; max-width: 1400px; margin: 0 auto; }
.panel { background: #fff; border-radius: 16px; padding: 16px; box-shadow: var(--shadow); font-size: 13px; }
.panel h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-3); margin: 0 0 10px; }
.panel h3 { font-size: 14px; margin: 14px 0 6px; }
.panel + .panel { margin-top: 16px; }
.persona-btn { display: flex; width: 100%; text-align: left; gap: 10px; align-items: center; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px; margin-bottom: 8px; }
.persona-btn[aria-pressed="true"] { border-color: var(--red); background: var(--red-tint); }
.persona-btn .av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex: none; }
.persona-btn small { display: block; color: var(--ink-3); }
.note { background: var(--bg); border-radius: 10px; padding: 10px; color: var(--ink-2); font-size: 12px; line-height: 1.45; }
.ctl-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 12px; font-size: 12px; font-weight: 600; }
.chip-btn:hover { border-color: var(--ink-3); }
.chip-btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.log { max-height: 640px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.log-item { border-left: 3px solid var(--line); padding: 6px 10px; background: var(--bg); border-radius: 0 8px 8px 0; }
.log-item.you { border-color: var(--blue); }
.log-item.suggest { border-color: var(--green); }
.log-item.safety { border-color: var(--red); }
.log-item.event { border-color: var(--ink-3); }
.log-item .t { font-size: 11px; color: var(--ink-3); }
.log-item .w { font-weight: 600; }
.log-item .y { color: var(--ink-2); font-size: 12px; }

/* ---------- Phone ---------- */
.phone {
  width: 400px; height: 840px; background: #111; border-radius: 52px; padding: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.25);
  position: relative; margin: 0 auto;
}
.screen {
  width: 100%; height: 100%; background: var(--bg); border-radius: 42px; overflow: hidden; position: relative;
  display: flex; flex-direction: column; font-size: calc(15px * var(--scale));
}
.statusbar { height: 44px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; font-size: 13px; font-weight: 600; background: #fff; }
.statusbar.red { background: var(--red); color: #fff; }
.notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 120px; height: 30px; background: #111; border-radius: 0 0 18px 18px; z-index: 50; }
.concept { position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); opacity: .9; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--ink-3); background: rgba(255,255,255,.9); padding: 2px 8px; border-radius: 999px; pointer-events: none; z-index: 5; white-space: nowrap; }
.content { flex: 1; padding-bottom: 70px; overflow-y: auto; overflow-x: hidden; position: relative; scroll-behavior: smooth; }
.reduce-motion * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }

/* Bottom navigation */
.bottomnav { flex: none; height: 78px; background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 0 6px 14px; }
.bottomnav button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: calc(11px * var(--scale)); color: var(--ink-3); min-height: 48px; justify-content: center; }
.bottomnav button[aria-current="page"] { color: var(--red); font-weight: 700; }
.bottomnav .scan { width: 56px; height: 56px; border-radius: 50%; background: var(--red); color: #fff; margin: -24px auto 0; box-shadow: 0 6px 14px rgba(225,37,27,.35); }
.bottomnav .scan-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: calc(11px * var(--scale)); color: var(--ink-3); }

/* App header */
.apphead { background: var(--red); color: #fff; padding: 8px 18px 18px; }
.apphead.plain { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); padding: 10px 14px; display: flex; align-items: center; gap: 8px; }
.apphead.plain h1 { font-size: calc(17px * var(--scale)); margin: 0; flex: 1; }
.iconbtn { border: 0; background: transparent; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.iconbtn:hover { background: rgba(0,0,0,.05); }
.apphead .row { display: flex; align-items: center; gap: 10px; }
.wordmark { font-weight: 800; letter-spacing: .6px; font-size: 20px; }
.greet { font-size: calc(20px * var(--scale)); font-weight: 700; margin: 12px 0 2px; }
.sub { opacity: .9; font-size: calc(13px * var(--scale)); }

.pad { padding: 14px 16px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.card h2 { font-size: calc(16px * var(--scale)); margin: 0 0 6px; }
.card h3 { font-size: calc(15px * var(--scale)); margin: 0 0 4px; }
.muted { color: var(--ink-3); }
.small { font-size: calc(12.5px * var(--scale)); }
.big { font-size: calc(26px * var(--scale)); font-weight: 800; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stack > * + * { margin-top: 10px; }

.acct { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 16px; margin: -6px 16px 12px; box-shadow: var(--shadow); position: relative; z-index: 1; }
.acct .label { font-size: calc(12.5px * var(--scale)); color: var(--ink-3); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 0; font-weight: 700; font-size: calc(15px * var(--scale)); }
.btn.primary { background: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-dark); }
.btn.secondary { background: #fff; color: var(--red); border: 1.5px solid var(--red); }
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.green { background: var(--green); color: #fff; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.linkbtn { border: 0; background: none; color: var(--red); font-weight: 700; padding: 8px 0; min-height: 44px; font-size: calc(14px * var(--scale)); }

/* Quick actions grid */
.qa { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.qa button { border: 0; background: #fff; border-radius: 14px; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: calc(11.5px * var(--scale)); font-weight: 600; min-height: 84px; box-shadow: var(--shadow); text-align: center; line-height: 1.2; }
.qa .ic { width: 38px; height: 38px; border-radius: 12px; background: var(--red-tint); color: var(--red); display: grid; place-items: center; }
.qa .lvl { font-size: calc(10px * var(--scale)); color: var(--ink-3); font-weight: 500; }

/* Adaptation chip ("why am I seeing this") */
.why { display: inline-flex; align-items: center; gap: 6px; background: var(--blue-tint); color: var(--blue); border-radius: 999px; padding: 4px 6px 4px 10px; font-size: calc(11.5px * var(--scale)); font-weight: 600; margin: 0 6px 6px 0; border: 0; }
.why .x { background: #fff; border-radius: 999px; width: 22px; height: 22px; display: inline-grid; place-items: center; font-weight: 700; }
.why { min-height: 36px; }

/* Banners */
.banner { border-radius: 12px; padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start; font-size: calc(13px * var(--scale)); margin-bottom: 12px; line-height: 1.4; }
.banner.safe { background: var(--green-tint); color: #0b5532; }
.banner.info { background: var(--blue-tint); color: #133f80; }
.banner.warn { background: var(--amber-tint); color: #6b3d00; }
.banner.danger { background: var(--red-tint); color: #8a120c; }
.banner.practice { background: #2b2b30; color: #fff; position: sticky; top: 0; z-index: 4; border-radius: 0; margin: 0; }
.banner b { display: block; }

/* Lists */
.list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 12px; }
.list > button, .list > div.li { width: 100%; border: 0; background: #fff; display: flex; align-items: center; gap: 12px; padding: 14px; text-align: left; border-bottom: 1px solid var(--line); min-height: 56px; }
.list > :last-child { border-bottom: 0; }
.list .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--red-tint); color: var(--red); display: grid; place-items: center; flex: none; }
.list .grow { flex: 1; min-width: 0; }
.list .t1 { font-weight: 600; }
.list .t2 { font-size: calc(12.5px * var(--scale)); color: var(--ink-3); }

/* Segmented control */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--bg); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; border-radius: 8px; padding: 8px 4px; font-size: calc(12px * var(--scale)); font-weight: 600; min-height: 40px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--red); box-shadow: var(--shadow); }

/* Toggle */
.toggle { position: relative; width: 50px; height: 30px; flex: none; }
.toggle input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 1; }
.toggle span { position: absolute; inset: 0; background: #c9c9cf; border-radius: 999px; transition: .2s; }
.toggle span::after { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.toggle input:checked + span { background: var(--green); }
.toggle input:checked + span::after { transform: translateX(20px); }
.toggle input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: calc(14px * var(--scale)); }
.field .hint { font-size: calc(12.5px * var(--scale)); color: var(--ink-3); margin-top: 6px; line-height: 1.4; }
.input { width: 100%; min-height: 50px; border: 1.5px solid #cfcfd6; border-radius: 12px; padding: 0 14px; background: #fff; font-size: calc(16px * var(--scale)); }
.input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(29,95,191,.25); }
.input.amount { font-size: calc(28px * var(--scale)); font-weight: 800; min-height: 64px; }
.err { color: #b3261e; font-size: calc(13px * var(--scale)); margin-top: 6px; font-weight: 600; display: flex; gap: 6px; }
.words { margin-top: 8px; background: var(--bg); border-radius: 10px; padding: 8px 10px; font-size: calc(13px * var(--scale)); color: var(--ink-2); }

/* Guided step */
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 6px 0 14px; }
.progress span { display: block; height: 100%; background: var(--red); transition: width .3s; }
.stepq { font-size: calc(21px * var(--scale)); font-weight: 800; margin: 4px 0 6px; line-height: 1.25; }
.explain { background: #fff; border: 1px dashed #c9c9cf; border-radius: 12px; padding: 10px 12px; font-size: calc(13px * var(--scale)); color: var(--ink-2); margin: 10px 0 14px; line-height: 1.45; }
.explain b { color: var(--ink); }
.simple-line { display: block; margin-top: 4px; color: var(--blue); font-weight: 600; }
.modebar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.modebar .lbl { font-size: calc(11.5px * var(--scale)); color: var(--ink-3); margin-right: 2px; }
.pill { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 10px; font-size: calc(12px * var(--scale)); font-weight: 600; min-height: 34px; display: inline-flex; align-items: center; gap: 4px; }
.pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.footer-actions { position: sticky; bottom: 0; background: linear-gradient(to top, var(--bg) 70%, rgba(244,244,246,0)); padding: 14px 16px 16px; display: flex; gap: 10px; }

/* Choice tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 12px; text-align: left; min-height: 56px; font-weight: 600; font-size: calc(14px * var(--scale)); }
.tile small { display: block; font-weight: 500; color: var(--ink-3); margin-top: 2px; }
.tile[aria-pressed="true"] { border-color: var(--red); background: var(--red-tint); }

/* Chat (onboarding + helper) */
.chat { display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 4px; }
.msg { max-width: 86%; padding: 10px 13px; border-radius: 16px; line-height: 1.45; font-size: calc(14.5px * var(--scale)); }
.msg.bot { background: #fff; border-top-left-radius: 4px; box-shadow: var(--shadow); align-self: flex-start; }
.msg.me { background: var(--red); color: #fff; border-top-right-radius: 4px; align-self: flex-end; }
.msg .speak { border: 0; background: var(--bg); border-radius: 999px; padding: 4px 10px; font-size: calc(11.5px * var(--scale)); font-weight: 600; margin-top: 6px; display: inline-flex; gap: 4px; align-items: center; min-height: 30px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 14px 14px; }
.choice { border: 1.5px solid var(--red); color: var(--red); background: #fff; border-radius: 999px; padding: 9px 14px; font-weight: 700; font-size: calc(14px * var(--scale)); min-height: 44px; }
.choice[aria-pressed="true"] { background: var(--red); color: #fff; }
.conf-row { background: #fff; border-radius: 12px; padding: 10px 12px; margin: 0 14px 8px; box-shadow: var(--shadow); }
.conf-row .name { font-weight: 700; margin-bottom: 6px; }

/* Bottom sheet (Helper) */
.sheet-wrap { position: absolute; inset: 0; background: rgba(0,0,0,.35); z-index: 30; display: flex; align-items: flex-end; }
.sheet { background: var(--bg); width: 100%; height: 82%; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; overflow: hidden; }
.sheet-head { background: #fff; padding: 12px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.sheet-head .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; flex: none; }
.sheet-body { flex: 1; overflow-y: auto; }
.sheet-input { background: #fff; border-top: 1px solid var(--line); padding: 10px; display: flex; gap: 8px; }
.sheet-input input { flex: 1; min-width: 0; min-height: 46px; border: 1.5px solid #cfcfd6; border-radius: 999px; padding: 0 16px; }
.ctx { margin: 10px 14px 0; font-size: calc(12px * var(--scale)); background: var(--blue-tint); color: #133f80; border-radius: 10px; padding: 8px 10px; }
.fab { position: absolute; right: 16px; bottom: 92px; z-index: 10; height: 52px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; padding: 0 16px 0 12px; display: flex; align-items: center; gap: 8px; font-weight: 700; box-shadow: 0 8px 18px rgba(0,0,0,.25); font-size: calc(14px * var(--scale)); }
.nudge { position: absolute; right: 16px; bottom: 152px; z-index: 11; width: 250px; background: #fff; border-radius: 14px; padding: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.2); font-size: calc(13px * var(--scale)); }

/* Modal (scam pause) */
.modal-wrap { position: absolute; inset: 0; z-index: 40; background: rgba(20,20,24,.55); display: flex; align-items: flex-end; }
.modal { background: #fff; width: 100%; max-height: 92%; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 18px 16px 20px; }
.modal h2 { margin: 8px 0 6px; font-size: calc(20px * var(--scale)); }
.shield { width: 52px; height: 52px; border-radius: 16px; background: var(--red-tint); color: var(--red); display: grid; place-items: center; }
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.q { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 10px; }
.q p { margin: 0 0 4px; font-weight: 600; }

/* Receipt */
.tick { width: 72px; height: 72px; border-radius: 50%; background: var(--green-tint); color: var(--green); display: grid; place-items: center; margin: 18px auto 10px; }
.kv { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); gap: 12px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--ink-3); }
.kv span:last-child { font-weight: 600; text-align: right; }
.teach { background: var(--blue-tint); border-radius: 12px; padding: 12px; color: #133f80; line-height: 1.5; font-size: calc(14px * var(--scale)); }

/* Scan */
.viewfinder { background: #111; height: 330px; position: relative; display: grid; place-items: center; }
.viewfinder .frame { width: 200px; height: 200px; border: 3px solid rgba(255,255,255,.9); border-radius: 22px; position: relative; display: grid; place-items: center; background: rgba(255,255,255,.04); }
.viewfinder .qr { background: #fff; padding: 10px; border-radius: 8px; }
.viewfinder .hint { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; color: #fff; font-size: calc(13px * var(--scale)); padding: 0 24px; }
.scanline { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--red); top: 50%; box-shadow: 0 0 12px var(--red); animation: scan 2s ease-in-out infinite; }
@keyframes scan { 0%,100% { top: 12%; } 50% { top: 88%; } }

/* Practice hub */
.scenario { display: flex; gap: 12px; align-items: flex-start; }
.scenario .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--red-tint); color: var(--red); display: grid; place-items: center; flex: none; }
.tag { display: inline-block; font-size: calc(11px * var(--scale)); font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--bg); color: var(--ink-2); margin-right: 4px; }
.tag.done { background: var(--green-tint); color: var(--green); }
.tag.rec { background: var(--red-tint); color: var(--red); }
.sms { background: #e9e9ee; border-radius: 16px; padding: 12px 14px; font-size: calc(14px * var(--scale)); line-height: 1.45; }
.sms .from { font-size: calc(12px * var(--scale)); color: var(--ink-3); margin-bottom: 4px; }

/* Confidence bars on home */
.confbar { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: calc(13px * var(--scale)); }
.dots { display: flex; gap: 4px; }
.dots i { width: 22px; height: 8px; border-radius: 999px; background: var(--line); display: block; }
.dots i.on { background: var(--green); }

/* High contrast */
.hc .screen { --ink: #000; --ink-2: #000; --ink-3: #2b2b2b; --line: #000; --bg: #fff; --card: #fff; --blue: #0033a0; --shadow: none; }
.hc .screen .card, .hc .screen .list, .hc .screen .qa button, .hc .screen .acct, .hc .screen .msg.bot, .hc .screen .conf-row { border: 2px solid #000; }
.hc .screen .muted, .hc .screen .t2 { color: #000; }
.hc .screen .why { background: #fff; border: 2px solid #0033a0; }

/* Dashboard + staff */
.wide { max-width: 1300px; margin: 0 auto; padding: 20px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.kpi .v { font-size: 26px; font-weight: 800; }
.kpi .l { font-size: 12px; color: var(--ink-3); }
.kpi .d { font-size: 12px; color: var(--green); font-weight: 600; margin-top: 2px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.dash-card { background: #fff; border-radius: 14px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; font-size: 13px; }
.dash-card h2 { font-size: 15px; margin: 0 0 4px; }
.dash-card .lead { color: var(--ink-3); margin: 0 0 12px; font-size: 12.5px; }
table.t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.t th, table.t td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.t th { color: var(--ink-3); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; }
.pass { color: var(--green); font-weight: 700; }
.fail { color: #b3261e; font-weight: 700; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); margin-bottom: 8px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.ticket { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.ticket.new { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-tint); }
.pchip { display: inline-block; background: var(--blue-tint); color: var(--blue); border-radius: 999px; padding: 3px 9px; font-size: 11.5px; font-weight: 600; margin: 0 4px 4px 0; }
.empty { text-align: center; color: var(--ink-3); padding: 30px 10px; }

@media (max-width: 1150px) {
  .stage { grid-template-columns: 1fr; }
  .stage > .side { order: 2; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid2, .grid3 { grid-template-columns: 1fr; }
}

/* ---------- Round 2 features ---------- */
.copilot-bar { background: #1f5f3f; color: #fff; display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: calc(12.5px * var(--scale)); flex: none; }
.copilot-msg { position: absolute; top: 96px; left: 12px; right: 12px; z-index: 44; background: #fff; border: 2px solid #1f5f3f; border-radius: 14px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow); font-size: calc(14px * var(--scale)); }
.mirror-wrap { height: 640px; overflow: hidden; margin-bottom: 8px; }
.mirror-phone { transform: scale(.75); transform-origin: top left; margin: 0; }
.mirror .sensitive { filter: blur(7px); }
.mirror .copilot-msg { display: none; }
.pointed-family { outline: 4px solid #1f8f5a !important; outline-offset: 3px; box-shadow: 0 0 0 10px rgba(31,143,90,.25) !important; animation: pulse 1.2s ease-in-out infinite; border-radius: 12px; }
.pointed { outline: 3px dashed var(--blue) !important; outline-offset: 3px; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(31,143,90,.35); } 50% { box-shadow: 0 0 0 14px rgba(31,143,90,.05); } }
.ghosthand { position: absolute; z-index: 48; left: 50%; top: 50%; pointer-events: none; transition: left .6s ease, top .6s ease; }
.ghost-hand { display: block; color: #111; filter: drop-shadow(0 3px 6px rgba(0,0,0,.35)); background: rgba(255,255,255,.85); border-radius: 50%; padding: 4px; transform: translate(-8px, -4px); transition: transform .15s; }
.ghosthand.tap .ghost-hand { transform: translate(-8px, 2px) scale(.88); }
.ghost-cap { position: absolute; left: -100px; top: 56px; width: 220px; background: #111; color: #fff; border-radius: 10px; padding: 6px 10px; font-size: calc(13px * var(--scale)); font-weight: 600; text-align: center; }

/* ---------- Merged build additions ---------- */
.accbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 0; }
.accbar .pill { min-height: 36px; }
.promise { margin: 8px 16px 0; padding: 8px 12px; border-radius: 10px; background: var(--green-tint); color: #0b5532; font-weight: 700; font-size: calc(13.5px*var(--scale)); display: flex; gap: 8px; align-items: center; }
.explain.tip { border-style: solid; }
.staff-ring { outline: 4px solid #2f6feb !important; outline-offset: 3px; box-shadow: 0 0 0 10px rgba(47,111,235,.22) !important; animation: pulse 1.2s ease-in-out infinite; border-radius: 12px; }
body.reduce-motion .staff-ring { animation: none; }
.phone.sp .screen { line-height: 1.75 !important; letter-spacing: .06em; word-spacing: .16em; }
.phone.sp .screen p, .phone.sp .screen .explain { margin-bottom: 1.2em; }
.four-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
@media (max-width: 1100px) { .four-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.four-card h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); margin: 14px 0 6px; }
.four-card ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.four-card .av { width: 38px; height: 38px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.kvs div { display: flex; flex-direction: column; margin-bottom: 6px; font-size: 13px; }
.kvs span { color: var(--ink-2); font-size: 11.5px; }
.mini-qa { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.mini-qa span { background: var(--red-tint); border-radius: 10px; padding: 8px; font-size: 12px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.mini-qa i { color: var(--red); font-style: normal; }
.same-band { background: #12304f; color: #fff; border-radius: 14px; padding: 18px 20px; }
.same-band h2 { margin: 0 0 12px; font-size: 18px; }
.same-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.same-grid b { display: block; margin-bottom: 4px; }
.same-grid span { font-size: 13px; opacity: .9; line-height: 1.45; }
.staff-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.ticket-btn { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; font: inherit; }
.ticket-btn b { display: block; }
.ticket-btn small { display: block; color: var(--ink-2); margin-top: 4px; }
.ticket-btn.on { border: 2px solid #2f6feb; }
.ticket-btn.urgent { border-left: 4px solid var(--red); }
.timeline { list-style: none; margin: 0 0 8px; padding: 0; font-size: 13px; }
.timeline li { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.timeline span { color: var(--ink-2); }
.staff-msg { padding: 8px 10px; border-radius: 10px; margin: 0 0 6px; font-size: 13px; max-width: 90%; background: var(--bg); }
.staff-msg.me { background: var(--red); color: #fff; margin-left: auto; }

.staff-en { margin-top: 4px; padding-top: 4px; border-top: 1px dashed rgba(0,0,0,.2); font-size: 12px; opacity: .85; }
.staff-msg.me .staff-en { border-top-color: rgba(255,255,255,.5); }
.verified { display: inline-flex; gap: 6px; align-items: center; background: var(--green-tint); color: #0b5532; border-radius: 999px; padding: 4px 10px; font-size: calc(12.5px*var(--scale)); font-weight: 700; }

/* ==========================================================
   OCBC-style shell (merged build 2: Adaptive Engine)
   ========================================================== */
:root { --slate: #3d505c; --slate-dark: #2c3c46; }
.btn.primary { background: var(--slate); }
.btn.primary:hover { background: var(--slate-dark); }
.btn.dark { background: var(--slate); }
.btn.secondary { color: var(--slate); border-color: #9aa6ad; }
.apphead.plain { border-bottom: 0; padding: 12px 14px 6px; }
.apphead.plain h1 { font-size: calc(19px * var(--scale)); font-weight: 800; }
.o-h2 { font-size: calc(17px * var(--scale)); font-weight: 800; margin: 18px 0 8px; }

/* Bottom tabs: Home, Plan, Pay & Transfer, Rewards, More */
.o-nav button { font-size: calc(10.5px * var(--scale)); }
.o-paynav { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink-3); min-height: 48px; justify-content: center; font-size: calc(10.5px * var(--scale)); }
.o-paynav-ic { width: 38px; height: 38px; border-radius: 50%; border: 1.6px solid currentColor; display: grid; place-items: center; }
.o-paynav[aria-current="page"] { color: #fff; font-weight: 700; }
.o-paynav[aria-current="page"] .o-paynav-ic { background: var(--red); border-color: var(--red); color: #fff; }
.o-paynav[aria-current="page"] { color: var(--red); }

/* Login (demo entry) */
.login { position: relative; min-height: 100%; padding: 6px 18px 18px; background: linear-gradient(#fff, #f3f3f5); overflow: hidden; }
.login-top { display: flex; justify-content: space-between; position: relative; z-index: 2; }
.login-arc { position: absolute; left: -360px; top: 40px; width: 420px; height: 560px; border-radius: 50%; background: var(--red); }
.login-hero { position: relative; z-index: 1; text-align: center; padding: 50px 0 34px 40px; }
.login-script { font-family: "Brush Script MT", "Segoe Script", cursive; font-size: calc(58px * var(--scale)); color: #333; line-height: 1; }
.login-line { font-size: calc(24px * var(--scale)); font-weight: 800; color: #3a3a3a; line-height: 1.25; }
.login-line span { color: var(--red); }
.login-sub { margin-top: 14px; font-size: calc(12px * var(--scale)); color: var(--ink-3); }
.login-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 6px; margin: 10px 0 16px; }
.lq { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: calc(13px * var(--scale)); color: var(--ink-2); }
.lq-ic { width: 52px; height: 52px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow); color: #333; }
.login-btn { position: relative; z-index: 1; min-height: 54px; font-size: calc(17px * var(--scale)); }
.login-adv { position: relative; z-index: 1; margin: 10px 2px 0; color: var(--ink-2); }

/* Home */
.o-top { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px 8px; background: #fff; }
.o-tokens { border: 1.5px solid #f2b8b4; border-radius: 999px; background: #fff; padding: 6px 12px; font-weight: 600; font-size: calc(13px * var(--scale)); display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.o-logout { border: 0; background: none; color: var(--blue); font-weight: 600; font-size: calc(15px * var(--scale)); padding: 8px 6px; min-height: 44px; }
.o-logout.white { color: #fff; }
.o-hero { position: relative; background: var(--red); color: #fff; min-height: 170px; padding: 22px 18px 70px; overflow: hidden; display: flex; }
.o-hero::after { content: ""; position: absolute; right: -60px; top: -40px; width: 230px; height: 300px; border-radius: 50%; background: #fbe3d6; }
.o-hero.calm { min-height: 120px; }
.o-hero.calm::after { display: none; }
.o-hero-txt { position: relative; z-index: 1; max-width: 62%; }
.o-welcome { font-size: calc(18px * var(--scale)); font-weight: 800; }
.o-hero-sub { font-size: calc(14px * var(--scale)); margin-top: 4px; line-height: 1.35; }
.o-hero-art { position: absolute; right: 26px; top: 30px; width: 88px; height: 110px; z-index: 1; border-radius: 44px 44px 10px 10px; background: radial-gradient(circle at 50% 70%, #ffcc33 0 10px, #e98b1d 11px 16px, transparent 17px), linear-gradient(#7a3b1f, #5a2a14); box-shadow: 0 0 0 6px rgba(255,255,255,.35); }
.o-sc { position: relative; z-index: 2; margin: -54px 12px 0; background: #fff; border-radius: 14px; box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr 1fr 1fr 1px 1fr; align-items: stretch; padding: 10px 4px; }
.o-sc-div { background: var(--line); margin: 6px 0; }
.sc { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 2px; min-height: 76px; font-size: calc(13px * var(--scale)); color: var(--ink); text-align: center; }
.sc-ic { color: var(--ink-2); }
.sc-ic.grey { width: 34px; height: 34px; border-radius: 50%; background: #ececef; display: grid; place-items: center; }
.sc .lvl { font-size: calc(10px * var(--scale)); color: var(--ink-3); line-height: 1.2; }
.o-tabs { display: flex; gap: 8px; align-items: center; padding: 14px 14px 6px; overflow: hidden; }
.o-eye { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #ececef; display: grid; place-items: center; flex: none; color: var(--ink-2); margin-right: 4px; }
.o-pill { border: 1px solid #9a9aa0; border-radius: 999px; padding: 6px 14px; font-size: calc(13px * var(--scale)); white-space: nowrap; }
.o-pill.on { background: var(--red); border-color: var(--red); color: #fff; }
.o-acct { background: #f8ecea; border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.o-acct .kv { border-top: 1px solid rgba(0,0,0,.08); }
.o-360 { width: 38px; height: 38px; border-radius: 50%; background: #fbd8c8; color: #8a3b17; font-weight: 800; font-size: 12px; display: grid; place-items: center; }
.promo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.promo-card { background: linear-gradient(135deg, #f6f1f4, #f9ece6); border-radius: 14px; padding: 12px; }
.promo-k { color: var(--ink-3); font-weight: 600; letter-spacing: .03em; }
.promo-t { font-weight: 700; margin: 4px 0; line-height: 1.3; }
.promo-l { color: var(--blue); font-size: calc(13px * var(--scale)); }
.phone.calm .promo { display: none !important; }

/* Pay & Transfer */
.o-pagehead { position: relative; background: linear-gradient(135deg, #efe6f3, #f6eef0); padding: 22px 18px 70px; min-height: 150px; }
.o-pagehead.plain { background: #fff; padding: 18px 18px 8px; min-height: 0; }
.o-pagehead h1 { font-size: calc(24px * var(--scale)); font-weight: 800; margin: 0; max-width: 60%; line-height: 1.2; }
.o-pagehead.plain h1 { max-width: none; }
.o-pagehead-art { position: absolute; right: 18px; top: 18px; width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle, #f7c948 0 18px, #3b58c4 19px 30px, #6a35a8 31px 46px); opacity: .9; }
.phone.calm .o-pagehead-art { display: none; }
.o-tiles { position: relative; z-index: 2; margin: -54px 12px 0; background: #fff; border-radius: 14px; box-shadow: var(--shadow); display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 12px 6px; }
.pt { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 5px; min-height: 78px; font-size: calc(14px * var(--scale)); color: var(--ink); padding: 4px 2px; }
.pt-ic { color: var(--ink-2); }
.pt .lvl { font-size: calc(10px * var(--scale)); color: var(--ink-3); }
.o-list { background: #fff; border-radius: 0; }
.o-list button { width: 100%; display: flex; justify-content: space-between; align-items: center; border: 0; border-bottom: 1px solid var(--line); background: #fff; padding: 16px 4px; min-height: 56px; font-size: calc(16px * var(--scale)); text-align: left; }

/* Plan and Rewards */
.pl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.pl-card { border: 0; background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 12px; text-align: left; display: flex; flex-direction: column; gap: 4px; min-height: 120px; }
.pl-k { font-weight: 700; color: var(--ink-3); letter-spacing: .03em; }
.pl-t { font-weight: 800; font-size: calc(15px * var(--scale)); line-height: 1.25; }
.pl-l { color: var(--blue); font-size: calc(13px * var(--scale)); margin-top: auto; }

/* More: red header */
.o-redhead { background: var(--red); color: #fff; display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding: 6px 12px 10px; }
.o-redhead-t { margin-right: auto; margin-left: 4px; font-weight: 700; font-size: calc(17px * var(--scale)); }

/* Review: OCBC layout and slide to pay */
.o-review { padding: 4px 2px 6px; }
.o-amt { font-size: calc(30px * var(--scale)); font-weight: 800; margin: 2px 0 10px; }
.o-amt span { font-size: calc(15px * var(--scale)); font-weight: 600; }
.o-bar { border-left: 3px solid var(--red); padding: 2px 0 2px 12px; margin-bottom: 6px; }
.footer-actions.col { flex-direction: column; align-items: stretch; }
.slide { flex: 1; position: relative; min-height: 56px; border: 0; border-radius: 999px; background: var(--slate); color: #fff; font-weight: 700; font-size: calc(16px * var(--scale)); padding: 0 16px 0 64px; touch-action: none; user-select: none; overflow: hidden; }
.slide .knob { position: absolute; left: 6px; top: 6px; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--slate); display: grid; place-items: center; font-size: 24px; line-height: 1; transition: transform .2s; }
.slide-t { pointer-events: none; }

/* Live Adaptation */
.banner.live { background: #eef6ff; border: 1.5px solid #8db6ee; color: #12325e; }
.banner.live svg { color: var(--blue); }
.more-ways { margin: 4px 0 8px; }
.more-ways summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: calc(14px * var(--scale)); min-height: 36px; display: flex; align-items: center; }
.eng-focus .btn, .eng-focus .tile, .eng-focus .input { min-height: 60px; font-size: calc(17px * var(--scale)); }
.eng-focus .stepq { font-size: calc(24px * var(--scale)); }
.eng-focus .explain { font-size: calc(16px * var(--scale)); }

/* Adaptive Engine tab */
.eng-wrap { display: grid; grid-template-columns: 320px minmax(400px, 1fr) 380px; gap: 18px; padding: 18px; max-width: 1500px; margin: 0 auto; align-items: start; }
.eng-in .seg { margin-bottom: 6px; }
.eng-in .seg button { font-size: 12px; }
.eng-in h3 small { color: var(--ink-3); font-weight: 500; }
.eng-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff; font-size: 12px; margin-right: 6px; }
.chip-btn.on { background: var(--red-tint); border-color: var(--red); color: var(--red-dark); }
.eng-out { position: sticky; top: 70px; }
.eng-out-head { font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; font-size: 12px; margin-bottom: 8px; text-align: center; }
.eng-stage { display: flex; justify-content: center; }
.eng-stage .phone { transform: scale(.86); transform-origin: top center; margin-bottom: -110px; }
.eng-reasons { margin: 0; padding-left: 20px; }
.eng-reasons li { margin-bottom: 8px; line-height: 1.35; padding: 6px 8px; border-radius: 8px; }
.eng-reasons li b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.eng-reasons li span { display: block; font-weight: 600; }
.eng-reasons li em { display: block; font-style: normal; color: var(--ink-2); }
.eng-reasons li.hl { background: #fff4d6; outline: 2px solid #f0c24b; }
.eng-code { background: #1f2933; color: #e6edf3; border-radius: 10px; padding: 10px; font-size: 11px; overflow: auto; max-height: 220px; white-space: pre-wrap; }

/* ATM */
.atm { width: 560px; }
.atm-screen { position: relative; background: #2b3038; border-radius: 18px; padding: 22px 46px; box-shadow: var(--shadow); }
.atm-keys { position: absolute; top: 70px; display: flex; flex-direction: column; gap: 34px; }
.atm-keys.left { left: 10px; } .atm-keys.right { right: 10px; }
.atm-keys span { width: 26px; height: 18px; background: #9aa3ad; border-radius: 4px; }
.atm-inner { background: #f7f7f9; border-radius: 6px; min-height: 360px; overflow: hidden; }
.atm-head { background: var(--red); color: #fff; padding: 10px 14px; display: flex; gap: 12px; align-items: center; font-weight: 700; }
.atm-brand { font-weight: 900; letter-spacing: .06em; }
.atm-body { padding: 14px 16px; font-size: 16px; }
.atm-body.big { font-size: 21px; }
.atm-sub { color: var(--ink-2); margin-bottom: 6px; }
.atm-q { font-weight: 800; font-size: 1.25em; margin-bottom: 8px; }
.atm-plain { color: #0b4f8a; margin-bottom: 8px; }
.atm-note { background: #e8f0fc; color: #12325e; padding: 6px 10px; border-radius: 6px; margin-bottom: 8px; font-weight: 600; }
.atm-choices { display: grid; gap: 10px; margin-top: 10px; }
.atm-choice { background: #fff; border: 2px solid var(--slate); border-radius: 8px; padding: 10px 14px; font-weight: 700; display: flex; justify-content: space-between; }
.atm-choice.call { margin-top: 10px; border-color: var(--red); color: var(--red-dark); }
.atm-foot { display: flex; justify-content: space-between; margin-top: 14px; font-size: .75em; color: var(--ink-3); gap: 10px; }
.atm-slot { display: flex; justify-content: space-around; margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.atm-slot span { background: #d7dade; border-radius: 6px; padding: 6px 18px; }

/* Hotline brief */
.hot { width: 560px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 16px; font-size: 14px; }
.hot-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.hot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hot-l { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 700; }
.hot-v { font-weight: 600; margin-top: 2px; }
.hot-say { background: var(--bg); border-radius: 10px; padding: 10px; margin-top: 4px; font-size: 15px; }
.footer-actions.col { background: var(--bg); box-shadow: 0 -6px 14px rgba(0,0,0,.06); padding-top: 10px; }
.slide { flex: none; width: 100%; }
.slide-t { white-space: nowrap; }
.o-hero-txt { max-width: 56%; }
.o-hero::after { right: -95px; }
.o-nav { grid-template-columns: 1fr 1fr 1.25fr 1fr 1fr; }
.o-paynav { line-height: 1.1; white-space: nowrap; font-size: calc(10px * var(--scale)); }
.o-paynav-ic { width: 34px; height: 34px; }
.login-script { font-family: "Segoe Script", "Brush Script MT", "Snell Roundhand", cursive; font-style: italic; font-weight: 300; }
.o-tabs { flex-wrap: wrap; } .o-pill { flex: none; }

/* ---------- PayNow Recent + payment history (build 2.1) ---------- */
.th-recent { margin: 0 0 14px; }
.th-recent-h { font-weight: 800; font-size: calc(15px*var(--scale)); margin: 0 0 8px; }
.th-recent-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.th-person { flex: none; width: 76px; display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; padding: 4px 0; cursor: pointer; color: inherit; font: inherit; }
.th-person:focus-visible { outline: 3px solid var(--focus, #1a73e8); border-radius: 12px; }
.th-pn { font-size: calc(13px*var(--scale)); font-weight: 700; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-pl { font-size: calc(12px*var(--scale)); color: var(--muted, #5f6b74); }
.th-wrap { position: absolute; inset: 0; z-index: 48; background: var(--bg, #f4f5f7); display: flex; flex-direction: column; }
.th-head { background: #fff; padding: 46px 10px 10px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.th-name { font-weight: 800; font-size: calc(17px*var(--scale)); }
.th-sum { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); font-size: calc(13px*var(--scale)); color: var(--muted, #5f6b74); }
.th-sum b { color: var(--ink, #1c2328); }
.th-body { flex: 1; overflow-y: auto; padding: 8px 12px 12px; display: flex; flex-direction: column; }
.th-day { align-self: center; font-size: calc(12px*var(--scale)); color: var(--muted, #5f6b74); background: #e6e8eb; border-radius: 999px; padding: 3px 10px; margin: 12px 0 6px; }
.th-msg { max-width: 72%; border-radius: 18px; padding: 10px 14px; margin: 4px 0; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.th-msg.out { align-self: flex-end; background: var(--slate, #3d505c); color: #fff; border-bottom-right-radius: 6px; }
.th-msg.in { align-self: flex-start; background: #fff; border-bottom-left-radius: 6px; }
.th-msg.pending { background: #fff4e0; color: var(--ink, #1c2328); border: 1.5px dashed var(--amber, #b26a00); }
.th-msg.undone { background: #eceef0; color: var(--muted, #5f6b74); }
.th-msg.undone .th-amt { text-decoration: line-through; }
.th-amt { font-weight: 800; font-size: calc(18px*var(--scale)); }
.th-note { font-size: calc(14px*var(--scale)); margin-top: 2px; }
.th-st { font-size: calc(12px*var(--scale)); opacity: .8; margin-top: 4px; }
.th-foot { background: #fff; border-top: 1px solid var(--line); padding: 10px 12px 14px; }
.th-again { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
[data-a="speakText"].speaking { background: var(--slate, #3d505c) !important; color: #fff !important; }

/* Text mode (payment flows): words only, no pictures or decorative icons */
.phone.txt #content .pad svg, .phone.txt #content .banner > svg, .phone.txt #content .explain > svg { display: none; }
.phone.txt #content .iconbtn svg, .phone.txt #content .modebar svg { display: inline; }
.phone.txt #content .tick, .phone.txt #content .viewfinder, .phone.txt #content .th-recent { display: none; }
.phone.txt #content .banner { gap: 0; }
.txt-card { box-shadow: none; border: 1px solid var(--line); line-height: 1.5; }
.txt-card.txt-danger { border: 2px solid var(--red); background: #fff5f5; }


/* ==========================================================
   Polish layer (build 2.1): closer to the OCBC app, cleaner
   and calmer. Visual only: every action, id and text is kept.
   ========================================================== */
:root {
  --red: #e1251b; --red-dark: #c01d14; --red-tint: #fdeeec;
  --ink: #1b1c1f; --ink-2: #44474e; --ink-3: #5c5f68; --line: #e8e8ec;
  --bg: #f5f5f7; --card: #ffffff;
  --slate: #3b4b55; --slate-dark: #2a3840;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(17, 20, 28, .05), 0 6px 18px rgba(17, 20, 28, .06);
  --shadow-lg: 0 2px 6px rgba(17, 20, 28, .06), 0 14px 34px rgba(17, 20, 28, .10);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans SC", "Noto Sans Tamil", sans-serif;
  -webkit-font-smoothing: antialiased;
}
html, body { background: #eceef2; }
body { font-feature-settings: "cv11", "ss01"; }

/* ---------- Page chrome ---------- */
.topbar { flex-wrap: wrap; row-gap: 8px; padding: 10px 24px; box-shadow: 0 1px 0 var(--line); border-bottom: 0; }
.topbar .brand { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; letter-spacing: .02em; }
.topbar .title { font-size: 14px; font-weight: 700; color: var(--ink); }
.topbar .badge { font-weight: 600; }
.tabs { padding: 4px; border-radius: 12px; background: #f1f2f5; flex-wrap: wrap; }
.tabs button { white-space: nowrap; padding: 9px 14px; border-radius: 9px; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--red); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.06); }
.stage { grid-template-columns: 300px 424px minmax(320px, 1fr); gap: 24px; padding: 24px; max-width: 1440px; }
.panel { border-radius: 18px; padding: 18px; box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,.03); }
.panel h2 { font-size: 11.5px; letter-spacing: .08em; font-weight: 700; }
.persona-btn { border-radius: 14px; padding: 10px 12px; transition: border-color .15s, background .15s; }
.persona-btn:hover { border-color: #c9cbd1; }
.persona-btn .av { box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.chip-btn { padding: 8px 13px; transition: border-color .15s; text-align: left; }
.note { border-radius: 12px; }
.log-item { border-radius: 0 10px 10px 0; }
.dash-card, .kpi { border-radius: 16px; border: 1px solid rgba(0,0,0,.03); }

/* ---------- Phone frame ---------- */
.phone { width: 404px; height: 846px; border-radius: 58px; padding: 11px; background: linear-gradient(145deg, #2a2c31, #0e0f12 45%, #1c1d21); box-shadow: 0 0 0 1.5px #3a3c42, 0 30px 70px rgba(15, 18, 25, .28), 0 8px 18px rgba(15, 18, 25, .18); }
.screen { border-radius: 47px; background: var(--bg); }
.notch { top: 22px; width: 112px; height: 32px; border-radius: 20px; background: #050505; }
.statusbar { height: 50px; padding: 6px 30px 0 34px; font-size: 14.5px; font-weight: 600; letter-spacing: .01em; }
.statusbar .sb-icons { display: inline-flex; align-items: center; gap: 5px; }
.statusbar svg { display: block; }
.content { padding-bottom: 96px; scrollbar-width: none; }
.content::-webkit-scrollbar { display: none; }
.concept { bottom: 4px; font-size: 9.5px; background: transparent; color: #6a6d75; padding: 0; letter-spacing: .01em; }

/* ---------- Bottom navigation (raised Pay & Transfer) ---------- */
.bottomnav { height: 84px; padding: 2px 6px 22px; border-top: 0; box-shadow: 0 -1px 0 var(--line), 0 -8px 24px rgba(17, 20, 28, .05); position: relative; z-index: 6; }
.bottomnav button { gap: 4px; color: #5c5f68; font-weight: 500; transition: color .15s; }
.bottomnav button svg { width: 24px; height: 24px; }
.bottomnav button[aria-current="page"] { color: var(--red); font-weight: 700; }
.o-paynav { color: var(--ink-2); font-weight: 600; gap: 4px; margin-top: -22px; }
.o-paynav .o-paynav-ic { width: 52px; height: 52px; border: 0; background: var(--red); color: #fff; box-shadow: 0 6px 14px rgba(225, 37, 27, .35), 0 0 0 5px #fff; }
.o-paynav .o-paynav-ic svg { width: 26px; height: 26px; }
.o-paynav[aria-current="page"] { color: var(--red); }
.o-paynav[aria-current="page"] .o-paynav-ic { background: var(--red-dark); }

/* ---------- Helper button ---------- */
.fab { right: 14px; height: 46px; padding: 0 16px 0 12px; border-radius: 999px; background: rgba(27, 28, 31, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 8px 20px rgba(17, 20, 28, .25); font-size: calc(13.5px * var(--scale)); gap: 7px; }
.fab svg { width: 18px; height: 18px; }
.fab:hover { background: #000; }
.nudge { border-radius: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }

/* ---------- Common pieces ---------- */
.card { border-radius: var(--radius); padding: 16px; border: 1px solid rgba(0,0,0,.02); }
.card h2 { font-weight: 800; letter-spacing: -.005em; }
.btn { border-radius: 14px; letter-spacing: .005em; transition: background .15s, transform .1s; }
.btn:active { transform: scale(.985); }
.btn.secondary { background: #fff; border-width: 1.5px; }
.linkbtn { color: var(--red); }
.list { border-radius: var(--radius); border: 1px solid rgba(0,0,0,.02); }
.list > button, .list > div.li { padding: 14px 16px; gap: 14px; transition: background .12s; }
.list > button:hover { background: #fafafb; }
.list .ic { width: 38px; height: 38px; border-radius: 12px; }
.list .t1 { font-weight: 600; color: var(--ink); }
.list > button > svg:last-child { color: #a3a6ae; flex: none; }
.banner { border-radius: 14px; padding: 12px 14px; }
.banner > svg { flex: none; margin-top: 1px; }
.seg { border-radius: 12px; background: #eeeff2; }
.seg button { border-radius: 9px; }
.seg button[aria-pressed="true"] { color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05); }
.input { border-radius: 14px; border-color: #d6d7dc; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--slate); box-shadow: 0 0 0 4px rgba(59, 75, 85, .14); }
.tile { border-radius: 14px; transition: border-color .15s, background .15s; }
.tile:hover { border-color: #c9cbd1; }
.toggle input:checked + span { background: var(--red); }
.o-h2 { font-size: calc(16px * var(--scale)); margin: 22px 2px 10px; letter-spacing: -.005em; }
.why { background: #eef3fb; }

/* ---------- Login ---------- */
.login { background: #fff; padding: 4px 20px 22px; }
.login-arc { left: -330px; top: 70px; width: 420px; height: 520px; background: radial-gradient(circle at 75% 40%, #ef3a2f, var(--red) 60%, #c81a11); }
.login-hero { padding: 54px 0 40px 46px; }
.login-script { font-size: calc(62px * var(--scale)); color: #2d2f33; }
.login-line { font-size: calc(25px * var(--scale)); color: #2d2f33; letter-spacing: -.01em; }
.login-sub { color: #80838b; }
.login-grid { gap: 18px 6px; margin: 12px 0 22px; }
.lq { color: var(--ink-2); font-weight: 500; }
.lq-ic { width: 54px; height: 54px; background: #fff; box-shadow: 0 0 0 1px #ececf0, 0 4px 12px rgba(17, 20, 28, .07); color: #2d2f33; transition: transform .12s; }
.lq:hover .lq-ic { transform: translateY(-1px); }
.login-btn { border-radius: 16px; min-height: 56px; box-shadow: 0 8px 18px rgba(42, 56, 64, .25); }

/* ---------- Home ---------- */
.o-top { padding: 4px 14px 10px; }
.o-tokens { border-color: #f3c3bf; padding: 7px 13px; font-weight: 700; color: var(--ink); }
.o-tokens svg { color: var(--red); }
.o-logout { color: #2463c9; }
.o-hero { min-height: 182px; padding: 22px 20px 74px; background: linear-gradient(120deg, #d81e14 0%, var(--red) 55%, #ea4a2f 100%); }
.o-hero::after { right: -70px; top: -60px; width: 250px; height: 320px; background: radial-gradient(circle at 40% 45%, #ffe9dc, #fbd9c6 70%); }
.o-hero-txt { max-width: 58%; }
.o-welcome { font-size: calc(21px * var(--scale)); letter-spacing: -.01em; }
.o-hero-sub { opacity: .95; }
.o-hero-art { right: 14px; top: 16px; width: 132px; height: 132px; background: none; border-radius: 0; box-shadow: none; }
.o-hero-art svg { width: 100%; height: 100%; display: block; }
.o-sc { margin: -58px 14px 0; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 12px 4px 10px; border: 1px solid rgba(0,0,0,.03); }
.sc { gap: 5px; font-weight: 600; font-size: calc(12.5px * var(--scale)); }
.sc-ic { width: 40px; height: 40px; border-radius: 13px; background: var(--red-tint); color: var(--red); display: grid; place-items: center; }
.sc-ic.grey { width: 40px; height: 40px; border-radius: 13px; background: #f0f1f3; color: var(--ink-2); }
.sc .lvl { font-weight: 500; color: #80838b; }
.o-tabs { flex-wrap: nowrap; overflow-x: auto; padding: 16px 16px 8px; gap: 8px; scrollbar-width: none; }
.o-tabs::-webkit-scrollbar { display: none; }
.o-eye { width: 36px; height: 36px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.o-pill { border-color: #d3d4d9; background: #fff; padding: 7px 15px; font-weight: 600; color: var(--ink-2); }
.o-pill.on { box-shadow: 0 4px 10px rgba(225, 37, 27, .25); }
.o-acct { background: #fff; border-radius: 18px; padding: 16px; box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,.02); position: relative; overflow: hidden; }
.o-acct::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--red); }
.o-acct .kv { border-top: 0; border-bottom: 0; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 0 0; }
.o-acct .kv + .kv { padding-top: 8px; }
.o-acct .kv span:first-child { font-size: calc(12.5px * var(--scale)); }
.o-acct .kv span:last-child { text-align: left; font-size: calc(26px * var(--scale)); font-weight: 800; letter-spacing: -.02em; }
.o-acct .kv + .kv span:last-child { font-size: calc(16px * var(--scale)); font-weight: 700; color: var(--ink-2); }
.o-360 { width: 42px; height: 42px; background: linear-gradient(135deg, #ffd9c4, #fbbfa3); color: #8a2f0f; }
.promo-row { gap: 10px; }
.promo-card { position: relative; overflow: hidden; border-radius: 16px; padding: 14px; background: linear-gradient(140deg, #fff 0%, #fff6f1 60%, #ffe8dc 100%); box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,.02); }
.promo-card::after { content: ""; position: absolute; right: -18px; bottom: -18px; width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle, rgba(225, 37, 27, .14), rgba(225, 37, 27, 0) 70%); }
.promo-k { font-size: calc(10.5px * var(--scale)); color: var(--red); letter-spacing: .06em; }
.promo-l { color: #2463c9; font-weight: 600; }
.confbar { row-gap: 8px; }
.dots i { width: 20px; height: 7px; }

/* ---------- Pay & Transfer ---------- */
.o-pagehead { background: linear-gradient(135deg, #f4ecf6 0%, #fbeee9 100%); padding: 24px 20px 74px; min-height: 160px; }
.o-pagehead h1 { font-size: calc(25px * var(--scale)); letter-spacing: -.015em; }
.o-pagehead-art { right: 14px; top: 10px; width: 128px; height: 128px; background: none; opacity: 1; border-radius: 0; }
.o-pagehead-art svg { width: 100%; height: 100%; display: block; }
.o-pagehead.plain { padding: 20px 20px 10px; }
.o-tiles { margin: -56px 14px 0; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 14px 6px 10px; border: 1px solid rgba(0,0,0,.03); }
.pt { font-weight: 600; font-size: calc(13.5px * var(--scale)); gap: 6px; }
.pt-ic { width: 42px; height: 42px; border-radius: 13px; background: var(--red-tint); color: var(--red); display: grid; place-items: center; }
.pt .lvl { color: #80838b; }
.o-list { border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 1px solid rgba(0,0,0,.02); }
.o-list button { padding: 16px; font-size: calc(15.5px * var(--scale)); font-weight: 500; }
.o-list button:last-child { border-bottom: 0; }
.o-list button svg { color: #a3a6ae; }

/* ---------- Plan and Rewards ---------- */
.pl-card { border-radius: 16px; padding: 14px; min-height: 132px; border: 1px solid rgba(0,0,0,.02); transition: transform .12s, box-shadow .15s; }
.pl-card:hover { box-shadow: var(--shadow-lg); }
.pl-k { color: var(--red); letter-spacing: .06em; font-size: calc(10.5px * var(--scale)); }
.pl-t { font-size: calc(15.5px * var(--scale)); }
.pl-l { color: #2463c9; font-weight: 600; }

/* ---------- More ---------- */
.o-redhead { padding: 8px 14px 14px; background: linear-gradient(120deg, #d81e14, var(--red)); }
.o-redhead-t { font-size: calc(20px * var(--scale)); font-weight: 800; }
.statusbar.red { background: #d81e14; }

/* ---------- Task screens ---------- */
.apphead.plain { padding: 8px 10px 8px 6px; gap: 4px; background: #fff; box-shadow: 0 1px 0 var(--line); }
.apphead.plain h1 { font-size: calc(17px * var(--scale)); font-weight: 800; line-height: 1.25; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.modebar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px; margin-bottom: 6px; padding-bottom: 2px; }
.modebar::-webkit-scrollbar { display: none; }
.modebar .lbl { flex: none; font-weight: 600; }
.pill { flex: none; background: #fff; border-color: #dcdde2; color: var(--ink-2); transition: background .15s, border-color .15s; }
.pill:hover { border-color: #b9bbc2; }
.pill[aria-pressed="true"] { background: var(--slate); border-color: var(--slate); color: #fff; }
.progress { height: 5px; background: #e6e7eb; margin: 8px 0 16px; }
.progress span { background: linear-gradient(90deg, #ef4a2f, var(--red)); border-radius: 999px; }
.stepq { font-size: calc(22px * var(--scale)); letter-spacing: -.015em; line-height: 1.22; margin: 6px 0 10px; }
.explain { background: #fff; border: 0; border-left: 4px solid #f0b4ae; border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; }
.explain.tip { border-left-color: #8fb3e8; }
.footer-actions { background: linear-gradient(to top, var(--bg) 78%, rgba(245, 245, 247, 0)); padding: 18px 16px 26px; }
.footer-actions.col { background: #fff; box-shadow: 0 -1px 0 var(--line), 0 -10px 24px rgba(17, 20, 28, .06); }
.o-amt { font-size: calc(34px * var(--scale)); letter-spacing: -.02em; }
.o-bar { border-left-width: 4px; border-radius: 2px; }
.slide { min-height: 58px; background: linear-gradient(90deg, var(--slate-dark), var(--slate)); box-shadow: 0 8px 18px rgba(42, 56, 64, .25); }
.slide .knob { width: 46px; height: 46px; color: var(--red); box-shadow: 0 2px 6px rgba(0,0,0,.25); font-weight: 700; }
.slide-t { background: linear-gradient(90deg, rgba(255,255,255,.75) 0%, #fff 45%, rgba(255,255,255,.75) 90%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 2.6s linear infinite; }
@keyframes shine { from { background-position: 200% 0; } to { background-position: 0 0; } }
.tick { width: 84px; height: 84px; box-shadow: 0 0 0 10px rgba(15, 123, 69, .08); animation: pop .35s ease-out; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.kv { padding: 11px 0; }
.teach { border-radius: 14px; }
.viewfinder { border-radius: 0 0 22px 22px; }

/* ---------- Helper sheet ---------- */
.sheet-wrap { background: rgba(15, 18, 25, .4); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.sheet { border-radius: 26px 26px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.18); animation: rise .25s ease-out; }
@keyframes rise { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-head { position: relative; padding: 18px 14px 12px; border-bottom: 0; box-shadow: 0 1px 0 var(--line); }
.sheet-head::before { content: ""; position: absolute; top: 7px; left: 50%; width: 38px; height: 5px; border-radius: 999px; background: #d4d5da; transform: translateX(-50%); }
.sheet-head .avatar { width: 40px; height: 40px; background: linear-gradient(135deg, #f04a2f, var(--red)); box-shadow: 0 4px 10px rgba(225, 37, 27, .3); }
.ctx { border-radius: 12px; }
.msg { border-radius: 18px; }
.msg.bot { border: 1px solid rgba(0,0,0,.03); }
.msg .pill { background: #fff; }
.sheet-input { padding: 10px 12px 14px; gap: 8px; }
.sheet-input input { background: #f5f5f7; border-color: transparent; }
.sheet-input input:focus { background: #fff; border-color: var(--slate); outline: none; }
.modal { border-radius: 26px 26px 0 0; animation: rise .25s ease-out; }
.choice { border-radius: 999px; }

/* ---------- High contrast keeps strong borders on the new pieces ---------- */
.hc .screen .o-acct, .hc .screen .o-sc, .hc .screen .o-tiles, .hc .screen .pl-card, .hc .screen .promo-card, .hc .screen .o-list, .hc .screen .explain, .hc .screen .pill { border: 2px solid #000; }
.hc .screen .o-acct::before { display: none; }
.hc .screen .sc-ic, .hc .screen .pt-ic { background: #fff; color: #000; border: 2px solid #000; }
.hc .screen .slide-t { color: #fff; background: none; animation: none; }
.reduce-motion .slide-t { animation: none !important; color: #fff; background: none; }
@media (prefers-reduced-motion: reduce) { .slide-t { animation: none; color: #fff; background: none; } .tick, .sheet, .modal { animation: none; } }
@media (max-width: 1150px) { .stage { grid-template-columns: 1fr; } }
.login-arc { left: -352px; top: 64px; width: 420px; height: 400px; }
.login-sub { padding: 0 6px 0 14px; }
.login-grid { margin-top: 26px; }
.o-hero-txt { max-width: calc(100% - 140px); }
.wide .btn, .staff-grid .btn { white-space: nowrap; }
.concept { background: rgba(255, 255, 255, .85); padding: 1px 8px; border-radius: 999px; }

/* ==========================================================
   Build 3: realism details
   ========================================================== */
.phone::before, .phone::after { content: ""; position: absolute; width: 4px; border-radius: 2px; background: linear-gradient(90deg, #1b1c20, #3a3c42); }
.phone::before { left: -4px; top: 168px; height: 92px; box-shadow: 0 -62px 0 -1px #2a2c31; }
.phone::after { right: -4px; top: 210px; height: 104px; }
.content.enter > * { animation: enterIn .22s ease-out both; }
@keyframes enterIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.screen .sc:active, .screen .pt:active, .screen .pl-card:active, .screen .lq:active, .screen .tile:active, .screen .list > button:active, .screen .o-list button:active { transform: scale(.97); }
.screen .sc, .screen .pt, .screen .pl-card, .screen .lq, .screen .tile { transition: transform .1s ease-out, box-shadow .15s, border-color .15s; }
.o-top .iconbtn[aria-label="Notifications"] { position: relative; }
.o-top .iconbtn[aria-label="Notifications"]::after { content: ""; position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #fff; }
.toast-n { background: rgba(255, 255, 255, .94) !important; color: var(--ink) !important; border: 0 !important; border-radius: 18px !important; box-shadow: 0 10px 30px rgba(17, 20, 28, .18) !important; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); animation: dropIn .28s cubic-bezier(.2, .9, .3, 1.2); }
.toast-n > svg { color: var(--red); }
@keyframes dropIn { from { transform: translateY(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
.faceid { position: absolute; inset: 0; z-index: 80; display: grid; place-items: center; pointer-events: none; animation: fadeAway 1.1s ease-in forwards; }
.faceid-box { width: 150px; height: 150px; border-radius: 34px; background: rgba(30, 31, 35, .78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-size: 15px; font-weight: 600; }
.faceid-box svg { animation: scanFace .9s ease-in-out; }
@keyframes scanFace { 0% { opacity: .4; transform: scale(.9); } 60% { opacity: 1; transform: scale(1.04); color: #fff; } 100% { transform: scale(1); color: #4cd964; } }
@keyframes fadeAway { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
.kv.tx { align-items: center; padding: 12px 0; }
.tx-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #f1f2f4; color: var(--ink-2); flex: none; }
.tx-av.in { background: #e6f4ec; color: #0b6b3a; }
.tx-m { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tx-w { font-weight: 600; color: var(--ink); }
.tx-d { font-size: calc(12.5px * var(--scale)); color: var(--ink-3); }
.tx-a { font-weight: 700; white-space: nowrap; }
.reduce-motion .content.enter > *, .reduce-motion .toast-n, .reduce-motion .faceid { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .content.enter > *, .toast-n { animation: none; } }

/* ==========================================================
   Build 3: machine learning
   ========================================================== */
.ml-plan { grid-column: 1 / -1; flex-direction: row !important; align-items: center; gap: 14px; min-height: 0 !important; margin: 0 0 12px; width: 100%; text-align: left; background: linear-gradient(135deg, #fff 0%, #fff4f2 100%); }
.pl-grid + .ml-plan { margin-top: 0; }
.ml-plan-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--red); color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 6px 14px rgba(225, 37, 27, .28); }
.ml-plan-txt { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.ml-plan > svg { color: #a3a6ae; flex: none; }
.ml-ta { min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.45; font: inherit; width: 100%; box-sizing: border-box; margin-top: 6px; }
.ml-verdict { margin-top: 14px; border-radius: 16px; padding: 14px; background: #fff; box-shadow: var(--shadow); border-left: 5px solid #8b8e96; }
.ml-verdict.bad { border-left-color: #c8102e; background: #fff6f5; }
.ml-verdict.warn { border-left-color: #b26a00; background: #fffaf0; }
.ml-verdict.ok { border-left-color: #0f7b45; background: #f3fbf6; }
.ml-v-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ml-v-pct { font-size: calc(30px * var(--scale)); font-weight: 800; letter-spacing: -.02em; min-width: 3ch; }
.ml-verdict .ml-v-pct, .wide .ml-verdict .ml-v-pct { font-size: 30px; }
.ml-v-t { font-weight: 800; }
.ml-verdict.bad .ml-v-pct, .ml-verdict.bad .ml-v-t { color: #a50e0e; }
.ml-verdict.ok .ml-v-pct, .ml-verdict.ok .ml-v-t { color: #0b6b3a; }
.ml-verdict.warn .ml-v-pct, .ml-verdict.warn .ml-v-t { color: #8a5200; }
.ml-g-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ml-g-num { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.ml-g-bar { position: relative; height: 8px; border-radius: 999px; background: #e9eaee; margin-top: 6px; }
.ml-g-bar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, #f2a39c, #d0342c); transition: width .3s; }
.ml-g-bar i { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); border-radius: 1px; }
.ml-toks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ml-tok { font-size: calc(12.5px * var(--scale)); padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.ml-tok.up { background: #fde7e5; color: #8d1309; }
.ml-tok.down { background: #e7effa; color: #1f4f91; }
.ml-how summary { cursor: pointer; font-weight: 700; }
.ml-live { background: var(--bg); border-radius: 12px; padding: 12px; margin-bottom: 6px; }
.ml-page { max-width: 1240px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.ml-hero { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; border-top: 4px solid var(--red); }
.ml-hero > div:first-child { flex: 1 1 520px; }
.ml-hero-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ml-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.ml-h1 { font-size: 26px; letter-spacing: -.02em; margin: 6px 0 8px; line-height: 1.2; text-wrap: balance; }
.ml-tabs { align-self: flex-start; display: inline-flex; flex-wrap: wrap; }
.ml-tabs button { padding: 9px 16px; white-space: nowrap; }
.ml-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); gap: 18px; }
.ml-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.ml-page .dash-card h2 { margin-top: 0; }
.ml-facts { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; margin-top: 10px; }
.ml-facts span { padding: 8px 12px; background: var(--bg); border-radius: 10px; }
.ml-facts b { display: inline-block; min-width: 150px; color: var(--ink-3); font-weight: 600; }
.ml-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 14px 0; }
.ml-kpi { background: var(--bg); border-radius: 12px; padding: 12px; }
.ml-kpi-l { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.ml-kpi-v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0; font-variant-numeric: tabular-nums; }
.ml-kpi-s { font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.ml-cm { border-collapse: separate; border-spacing: 4px; width: 100%; font-size: 13px; }
.ml-cm th { font-weight: 600; color: var(--ink-3); text-align: left; padding: 4px 6px; }
.ml-cm td { border-radius: 10px; padding: 12px; text-align: center; background: rgba(208, 52, 44, var(--a)); }
.ml-cm td.g { background: rgba(15, 123, 69, var(--a)); }
.ml-cm td b { display: block; font-size: 20px; color: var(--ink); }
.ml-cm td span { font-size: 12px; color: var(--ink-2); }
.ml-svg { width: 100%; height: auto; display: block; margin-top: 6px; overflow: visible; }
.ml-ax { font-size: 12px; fill: #5c5f68; font-family: inherit; }
.ml-val { font-size: 12px; fill: #1b1c1f; font-weight: 700; font-family: inherit; font-variant-numeric: tabular-nums; }
.ml-sl { display: grid; grid-template-columns: minmax(0, 1fr) 140px 52px; align-items: center; gap: 10px; font-size: 13.5px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ml-sl input { width: 100%; accent-color: var(--red); }
.ml-sl b { text-align: right; font-variant-numeric: tabular-nums; }
.ml-chk { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ml-chk input { width: 18px; height: 18px; accent-color: var(--red); }
.ml-play { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--bg); }
.hc .screen .ml-verdict, .hc .screen .ml-plan { border: 2px solid #000; }
.ml-roc { max-width: 340px; margin: 6px auto 0; }

/* Teammate's PayNow Recent and payment history, in the same style */
.th-head { padding-top: 60px; border-bottom: 0; box-shadow: 0 1px 0 var(--line); }
.th-sum { border-bottom: 0; box-shadow: 0 1px 0 var(--line); }
.th-recent { background: #fff; border-radius: 16px; padding: 12px 10px 8px; box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,.02); }
.th-recent-h { padding-left: 4px; }
.th-person { border-radius: 12px; transition: background .12s, transform .1s; }
.th-person:hover { background: #f6f6f8; }
.th-person:active { transform: scale(.96); }
.th-msg { border-radius: 20px; box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 12px rgba(17, 20, 28, .05); }
.th-msg.out { background: linear-gradient(135deg, var(--slate), var(--slate-dark)); }
.th-foot { border-top: 0; box-shadow: 0 -1px 0 var(--line), 0 -10px 24px rgba(17, 20, 28, .05); padding-bottom: 26px; }
.th-wrap { animation: rise .22s ease-out; }
.reduce-motion .th-wrap { animation: none; }
.txt-card { border-radius: 14px; }
.hc .screen .th-recent, .hc .screen .th-msg { border: 2px solid #000; }

/* ==========================================================
   Build 4: money insights, say it, one voice, live APIs, nicer inputs
   ========================================================== */
/* Inputs */
.screen .field .row:has(> .input.amount) { background: #fff; border-radius: 18px; padding: 10px 16px; box-shadow: var(--shadow); gap: 6px; align-items: baseline; border: 2px solid transparent; transition: border-color .15s; }
.screen .field .row:has(> .input.amount):focus-within { border-color: var(--slate); }
.screen .input.amount { border: 0 !important; box-shadow: none !important; background: transparent; font-size: calc(34px * var(--scale)); font-weight: 800; letter-spacing: -.02em; padding: 0; min-height: 52px; font-variant-numeric: tabular-nums; }
.screen .input.amount::placeholder { color: #c3c5cb; }
.screen select.input { appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2344474e' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 38px; }
.screen .tiles .tile[aria-pressed="true"] { border-color: var(--slate); background: #f3f6f8; box-shadow: 0 0 0 3px rgba(59, 75, 85, .14); }
.screen .words { font-size: calc(13.5px * var(--scale)); color: var(--ink-3); margin-top: 8px; }
.cam-btn { flex: none; width: 56px; padding: 0; display: grid; place-items: center; }

/* Home */
.o-safe { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 12px; padding: 11px 12px; border: 0; border-radius: 12px; background: #f3f8f5; color: var(--ink); font: inherit; font-size: calc(14px * var(--scale)); text-align: left; cursor: pointer; }
.o-safe > span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.o-safe b { margin-left: auto; color: #0b6b3a; font-size: calc(16px * var(--scale)); }
.o-safe .o-safe-d { color: var(--ink-3); font-size: calc(12.5px * var(--scale)); }
.o-safe > svg { color: #a3a6ae; flex: none; }
.o-acct .o-safe + .o-safe { margin-top: 6px; }
.fy { display: flex; align-items: center; gap: 12px; margin: 12px 0; padding: 12px 10px 12px 12px; border-radius: 18px; background: linear-gradient(135deg, #1f2a31, #3b4b55); color: #fff; box-shadow: 0 8px 22px rgba(31, 42, 49, .25); position: relative; animation: enterIn .3s ease-out both; }
.fy .grow { min-width: 0; }
.fy-ic { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.14); display: grid; place-items: center; flex: none; }
.fy-k { font-size: calc(11px * var(--scale)); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #ffc94a; display: flex; align-items: center; gap: 4px; }
.fy-t { font-weight: 800; font-size: calc(16px * var(--scale)); margin-top: 2px; }
.fy-w { font-size: calc(12.5px * var(--scale)); opacity: .78; }
.fy-go { flex: none; min-height: 40px; padding: 0 18px; border-radius: 999px; border: 0; background: #fff; color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }
.fy-x { position: absolute; top: 2px; right: 6px; width: 28px; height: 28px; border: 0; background: none; color: rgba(255,255,255,.6); font-size: 18px; cursor: pointer; line-height: 1; }
.banner.safe { padding: 10px 14px; align-items: center; }
.banner.safe b { font-weight: 600; }
button.promo-card { font: inherit; color: inherit; text-align: left; border: 0; cursor: pointer; display: block; width: 100%; }

/* Pay */
.o-say { position: relative; z-index: 2; margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: #fff; color: var(--ink); font: inherit; font-weight: 700; font-size: calc(13.5px * var(--scale)); box-shadow: 0 2px 8px rgba(17, 20, 28, .12); cursor: pointer; }
.o-say svg { color: var(--red); }
.fx-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 12px; border-radius: 999px; background: #f1f2f4; font-size: calc(12.5px * var(--scale)); font-weight: 600; color: var(--ink-2); }
.fx-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #b9bcc4; }
.fx-chip.live { background: #e9f6ef; color: #0b6b3a; }
.fx-chip.live .dot { background: #1baf7a; box-shadow: 0 0 0 0 rgba(27, 175, 122, .5); animation: livePulse 1.6s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(27, 175, 122, .5); } 100% { box-shadow: 0 0 0 8px rgba(27, 175, 122, 0); } }

/* Insights */
.ins-hero { background: linear-gradient(140deg, #0f5132 0%, #157a4b 60%, #1baf7a 100%); color: #fff; border-radius: 22px; padding: 18px; box-shadow: 0 10px 26px rgba(15, 81, 50, .25); }
.ins-k { font-size: calc(13px * var(--scale)); opacity: .9; font-weight: 600; }
.ins-v { font-size: calc(38px * var(--scale)); font-weight: 800; letter-spacing: -.025em; margin: 2px 0; font-variant-numeric: tabular-nums; }
.ins-sub { font-size: calc(13px * var(--scale)); opacity: .9; }
.ins-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.2); margin: 14px 0 10px; gap: 2px; }
.ins-bar span { display: block; height: 100%; }
.ins-leg { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: calc(12px * var(--scale)); }
.ins-leg span { display: inline-flex; align-items: center; gap: 6px; }
.ins-leg i, .ins-row i, .ins-dots i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.ins-cats { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.donut { width: 140px; height: 140px; flex: none; }
.dn-l { font-size: 10px; fill: #5c5f68; font-family: inherit; }
.dn-v { font-size: 17px; font-weight: 800; fill: #1b1c1f; font-family: inherit; }
.ins-legend { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 6px; }
.ins-row { display: flex; align-items: center; gap: 8px; font-size: calc(13.5px * var(--scale)); }
.ins-row b { font-variant-numeric: tabular-nums; }
.ins-ch { font-size: calc(11.5px * var(--scale)); font-weight: 700; color: var(--ink-3); min-width: 38px; text-align: right; }
.ins-ch.up { color: #a50e0e; }
.ins-ch.down { color: #0b6b3a; }
.ins-foot { margin-top: 8px; }
.ins-bill b { font-variant-numeric: tabular-nums; }
.ins-plan { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; border: 1px solid rgba(0,0,0,.02); }
.ins-plan .between svg { color: #a3a6ae; }
.ins-plan-row { display: flex; gap: 24px; margin: 8px 0 12px; }
.ins-plan-v { font-size: calc(22px * var(--scale)); font-weight: 800; letter-spacing: -.015em; }
.ins-stack { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; }
.ins-stack span { display: block; }
.ins-dots { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: calc(12px * var(--scale)); color: var(--ink-2); }
.ins-dots span { display: inline-flex; align-items: center; gap: 5px; }

/* ATM */
.atm-hero { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: #fff4e0; color: #5b3a00; margin-bottom: 14px; }
.atm-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.atm-row:last-child { border-bottom: 0; }
.atm-row .t1 { font-weight: 600; }
.atm-row .t2 { color: var(--ink-3); font-size: calc(13px * var(--scale)); }
.atm-km { font-weight: 700; color: var(--slate); white-space: nowrap; }
.skel { height: 64px; border-radius: 14px; margin-bottom: 8px; background: linear-gradient(90deg, #ececf0 0%, #f6f6f8 50%, #ececf0 100%); background-size: 200% 100%; animation: shine 1.2s linear infinite; }

/* Say it */
.say-wrap { position: absolute; inset: 0; z-index: 70; background: rgba(15, 18, 25, .45); display: flex; align-items: flex-end; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.say-sheet { position: relative; width: 100%; background: #fff; border-radius: 28px 28px 0 0; padding: 22px 18px 30px; display: flex; flex-direction: column; align-items: center; gap: 14px; animation: rise .25s ease-out; }
.say-k { font-weight: 800; font-size: calc(18px * var(--scale)); }
.say-x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #f1f2f4; font-size: 22px; cursor: pointer; line-height: 1; }
.say-mic { width: 88px; height: 88px; border-radius: 50%; border: 0; background: var(--red); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 26px rgba(225, 37, 27, .35); cursor: pointer; position: relative; }
.say-mic.on::before, .say-mic.on::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 3px solid rgba(225, 37, 27, .35); animation: ring 1.4s ease-out infinite; }
.say-mic.on::after { animation-delay: .7s; }
@keyframes ring { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.say-heard { min-height: 24px; text-align: center; font-size: calc(17px * var(--scale)); font-weight: 600; color: var(--ink); max-width: 100%; }
.say-reply { display: flex; gap: 10px; align-items: flex-start; width: 100%; background: #f5f5f7; border-radius: 16px; padding: 12px; font-size: calc(14.5px * var(--scale)); line-height: 1.45; }
.say-bot { width: 34px; height: 34px; border-radius: 50%; background: var(--red-tint); color: var(--red); display: grid; place-items: center; flex: none; }
.say-form { display: flex; gap: 8px; width: 100%; }
.say-form .input { flex: 1; }
.say-form .btn { flex: none; width: 54px; padding: 0; display: grid; place-items: center; }
.say-ex { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }

/* One voice: reading bar */
.vpill-host { position: absolute; left: 0; right: 0; top: 52px; z-index: 75; display: flex; justify-content: center; pointer-events: none; }
.vpill { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 28px); padding: 7px 8px 7px 14px; border-radius: 999px; background: rgba(27, 28, 31, .92); color: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.25); font-size: 13px; animation: dropIn .25s ease-out; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.vtxt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.vbars { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; flex: none; }
.vbars i { width: 3px; background: #ffc94a; border-radius: 2px; animation: vb .9s ease-in-out infinite; }
.vbars i:nth-child(2) { animation-delay: .15s; } .vbars i:nth-child(3) { animation-delay: .3s; } .vbars i:nth-child(4) { animation-delay: .45s; }
@keyframes vb { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.vstop { flex: none; display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: #fff; color: var(--ink); font: inherit; font-weight: 700; font-size: 12.5px; cursor: pointer; }

/* Camera */
.cam-wrap { position: absolute; inset: 0; z-index: 72; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cam-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-frame { position: relative; width: 230px; height: 230px; border-radius: 26px; box-shadow: 0 0 0 2000px rgba(0,0,0,.45); border: 3px solid #fff; }
.cam-t { position: relative; color: #fff; font-weight: 700; margin-top: 18px; }
.cam-x { position: absolute; bottom: 40px; left: 24px; right: 24px; }

.tag.ok { background: #e6f4ec; color: #0b6b3a; }
.reduce-motion .fy, .reduce-motion .say-sheet, .reduce-motion .vpill, .reduce-motion .vbars i, .reduce-motion .say-mic.on::before, .reduce-motion .say-mic.on::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .fy, .say-sheet, .vpill, .vbars i, .say-mic.on::before, .say-mic.on::after, .skel, .fx-chip.live .dot { animation: none; } }
.hc .screen .fy { background: #000; border: 2px solid #000; }
.hc .screen .ins-hero { background: #000; }
.hc .screen .o-safe { border: 2px solid #000; background: #fff; }
.tx-init { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; }
.tx-cat { display: grid; place-items: center; }
.tx-av:has(.tx-init) { background: none; }
.conf-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.conf-mini .cm { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: calc(13.5px * var(--scale)); padding: 6px 0; border-bottom: 1px solid var(--line); }
.ins-cats { flex-direction: column; align-items: stretch; }
.ins-cats .donut { align-self: center; width: 160px; height: 160px; }

/* ==========================================================
   App mode: the screen is just the app, demo tools in a drawer
   ========================================================== */
body.appmode.view-app:not(.presenter) .topbar { display: none; }
body.appmode.view-app:not(.tools-pinned) { background: radial-gradient(1200px 700px at 15% 0%, #fde3df 0%, rgba(253, 227, 223, 0) 60%), radial-gradient(900px 600px at 100% 100%, #e3e9f3 0%, rgba(227, 233, 243, 0) 60%), #eceef2; min-height: 100vh; }
body.appmode.view-app:not(.tools-pinned) .stage { display: flex; justify-content: center; align-items: center; min-height: 100vh; min-height: 100dvh; padding: 20px; max-width: none; box-sizing: border-box; }
body.appmode.view-app .stage > div:not(.side) { zoom: var(--fit, 1); }


/* Demo tools button */
#tools-btn { position: fixed; top: 16px; left: 16px; z-index: 900; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; border: 1px solid rgba(0,0,0,.06); background: rgba(255,255,255,.9); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 18px rgba(17, 20, 28, .12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform .12s, box-shadow .15s; }
#tools-btn:hover { box-shadow: 0 8px 24px rgba(17, 20, 28, .18); }
#tools-btn:active { transform: scale(.97); }
#tools-btn:focus-visible { outline: 3px solid #2F6FEB; outline-offset: 2px; }
body.appmode:not(.view-app) #tools-btn { top: 10px; left: auto; right: 16px; }

/* Drawer */
.tl-backdrop { position: fixed; inset: 0; z-index: 950; background: rgba(15, 18, 25, .35); opacity: 0; pointer-events: none; transition: opacity .2s; }
body.tools-open .tl-backdrop { opacity: 1; pointer-events: auto; }
#tools { position: fixed; top: 0; left: 0; bottom: 0; z-index: 960; width: min(420px, 92vw); overflow-y: auto; overscroll-behavior: contain; background: #f5f5f7; box-shadow: 10px 0 40px rgba(0,0,0,.18); transform: translateX(-104%); transition: transform .25s cubic-bezier(.2, .8, .2, 1); padding: 0 14px calc(24px + env(safe-area-inset-bottom, 0px)); box-sizing: border-box; }
body.tools-open #tools { transform: none; }
.tl-head { position: sticky; top: 0; z-index: 2; display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin: 0 -14px 12px; padding: calc(16px + env(safe-area-inset-top, 0px)) 14px 12px 18px; background: rgba(245, 245, 247, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.tl-k { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.tl-t { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.tl-s { font-size: 12px; color: var(--ink-3); line-height: 1.4; margin-top: 2px; }
.tl-x { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.1); color: var(--ink); }
.tl-views { display: flex; flex-direction: column; gap: 4px; background: #fff; border-radius: 16px; padding: 6px; box-shadow: var(--shadow); margin-bottom: 12px; }
.tl-views button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 10px 12px; border: 0; border-radius: 12px; background: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.tl-views button:hover { background: #f5f5f7; }
.tl-views button b { font-size: 14.5px; }
.tl-views button span { font-size: 12.5px; color: var(--ink-3); }
.tl-views button[aria-current="page"] { background: var(--red-tint); }
.tl-views button[aria-current="page"] b { color: var(--red); }
.tl-pin { display: flex; gap: 10px; align-items: center; font-size: 13px; font-weight: 600; padding: 10px 12px; background: #fff; border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 8px; cursor: pointer; }
.tl-pin input { width: 18px; height: 18px; accent-color: var(--red); }
.tl-tip { font-size: 12px; color: var(--ink-3); margin: 0 4px 12px; }
.tl-panels { display: flex; flex-direction: column; gap: 12px; }
.tl-panels .side { display: flex; flex-direction: column; gap: 12px; position: static; max-height: none; overflow: visible; }
.tl-panels .panel { margin: 0; }
.tl-viewbar { position: sticky; top: 0; z-index: 800; display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.tl-viewbar button { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 14px 0 8px; border-radius: 999px; border: 0; background: var(--red); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.tl-viewbar b { font-size: 15px; }
body.appmode:not(.view-app):not(.presenter) .topbar { display: none; }
body.appmode.presenter #tools-btn { top: auto; bottom: 16px; left: 16px; right: auto; }

/* Phones: the app is the whole screen */
@media (max-width: 600px), (max-height: 500px) and (pointer: coarse) {
  html:has(body.appmode.view-app), body.appmode.view-app { height: 100%; overflow: hidden; overscroll-behavior: none; background: var(--bg) !important; }
  body.appmode.view-app .stage { display: block !important; padding: 0 !important; margin: 0; min-height: 0 !important; }
  body.appmode.view-app .stage > div:not(.side) { zoom: 1; }
  body.appmode.view-app #cust-phone { width: min(100vw, 520px); margin: 0 auto; height: 100vh; height: 100dvh; border-radius: 0; padding: 0; box-shadow: none; background: var(--bg); }
  body.appmode.view-app { background: #e9ebef !important; }
  body.appmode.view-app #cust-phone::before, body.appmode.view-app #cust-phone::after, body.appmode.view-app #cust-phone .notch { display: none; }
  body.appmode.view-app #cust-phone .screen { border-radius: 0; }
  body.appmode.view-app #cust-phone .statusbar { height: env(safe-area-inset-top, 0px); min-height: 0; padding: 0; overflow: hidden; }
  body.appmode.view-app #cust-phone .statusbar > * { display: none; }
  body.appmode.view-app #cust-phone .bottomnav { padding-bottom: max(14px, env(safe-area-inset-bottom, 0px)); height: auto; min-height: 70px; }
  body.appmode.view-app #cust-phone .th-head { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
  body.appmode.view-app #cust-phone .vpill-host { top: calc(8px + env(safe-area-inset-top, 0px)); }
  body.appmode.view-app #cust-phone .concept { bottom: max(2px, calc(env(safe-area-inset-bottom, 0px) - 14px)); }
  body.appmode.view-app #cust-phone .footer-actions { padding-bottom: max(26px, calc(12px + env(safe-area-inset-bottom, 0px))); }
  /* A small handle on the left edge instead of a button over the app */
  body.appmode.view-app #tools-btn { top: 46%; left: 0; min-height: 64px; width: 16px; padding: 0; border-radius: 0 12px 12px 0; background: rgba(27, 28, 31, .28); border: 0; box-shadow: none; justify-content: center; }
  body.appmode.view-app #tools-btn svg, body.appmode.view-app #tools-btn span { display: none; }
  body.appmode.view-app #tools-btn::before { content: ""; width: 3px; height: 26px; border-radius: 2px; background: rgba(255,255,255,.9); }
  body.appmode:not(.view-app) #tools-btn span { display: none; }
  body.appmode:not(.view-app) #tools-btn { padding: 0 12px; }
  .wide, .ml-page { padding-left: 16px !important; padding-right: 16px !important; }
}
@media (prefers-reduced-motion: reduce) { #tools, .tl-backdrop { transition: none; } }
body.reduce-motion #tools, body.reduce-motion .tl-backdrop { transition: none; }


/* Build 4.2 (restored from 2.4): rows that scroll sideways at normal size wrap at larger text, so nothing is hidden off-screen */
.phone.big .modebar { flex-wrap: wrap; overflow-x: visible; }
.phone.big .modebar .pill { flex: 0 1 auto; }
.phone.big .o-tabs { flex-wrap: wrap; overflow-x: visible; }

.ml-honest { background: #fff8e6; border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; line-height: 1.45; }
.ml-steps { margin: 6px 0 0; padding-left: 20px; line-height: 1.55; font-size: 13.5px; }
.ml-steps li { margin-bottom: 6px; }

/* Build 4.2: Spotlight mode (demo only) outlines and labels each feature we added */
.spotlight [data-spot] { outline: 2px dashed #6d28d9; outline-offset: 2px; }
.spotlight .spot-rel { position: relative; }
.spotlight [data-spot]::after { content: attr(data-spot); position: absolute; top: 3px; right: 6px; z-index: 30; background: #6d28d9; color: #fff; font: 600 10.5px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; padding: 0 6px; border-radius: 6px; white-space: nowrap; pointer-events: none; letter-spacing: 0; text-transform: none; }
.reduce-motion .spotlight [data-spot] { transition: none; }

/* Flow screens: the sticky action bar sits at the very bottom, so no content shows under it or under the concept label */
#content:has(> .footer-actions) { padding-bottom: 0; }

/* Helper lives in the header on every screen (help in one place), so it never covers content */
.helper-btn { min-height: 44px; flex-shrink: 0; white-space: nowrap; }
.helper-btn.onred { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.55); color: #fff; }
.o-top .row { align-items: center; }

/* Selected choices are obvious at a glance: filled, with a tick (not colour alone) */
.screen .tiles .tile { position: relative; }
.screen .tiles .tile[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; box-shadow: none; padding-right: 34px; }
.screen .tiles .tile[aria-pressed="true"]::after { content: ""; position: absolute; right: 12px; top: 50%; width: 14px; height: 8px; margin-top: -6px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg); }
.seg button[aria-pressed="true"] { position: relative; }
.voice-bar { display: flex; align-items: center; gap: 10px; background: #eef4ff; color: #123a7a; border: 1px solid #c9dafc; border-radius: 14px; padding: 10px 12px; margin: 4px 0 10px; font-size: calc(13px * var(--scale)); font-weight: 600; }
.voice-bar .pill { min-height: 44px; background: #fff; }
.layout-link { min-height: 44px; padding: 0 4px; font-size: calc(13px * var(--scale)); display: inline-flex; align-items: center; gap: 5px; }
.step-line { margin-top: 2px; }
/* Presenter layout: leave room so the floating Demo tools button never covers the last demo control */
body.appmode.presenter .stage, body.appmode.presenter main.wide { padding-bottom: 84px; }
.choice.primary-choice { background: var(--red); color: #fff; border-color: var(--red); }

/* Contrast: text links in red use a darker red that passes 4.5:1 on the grey page */
.screen .linkbtn, .screen .layout-link { color: #c01d14; }
.helper-btn.onred { background: rgba(0,0,0,.22); border-color: rgba(255,255,255,.7); }
/* Touch targets: 44 px minimum for every control in the app (inline links inside sentences excepted) */
.screen .pill, .screen .speak, .screen .o-say, .screen .o-tokens, .screen .fy-go, .screen .seg button, .screen .choice { min-height: 44px; }
.screen .o-eye, .screen .fy-x { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.screen .linkbtn:not([style*="min-height:28px"]) { min-height: 44px; }
.screen .modebar .pill { min-height: 44px; }
.screen .pill { min-width: 44px; justify-content: center; }
.screen .linkbtn { padding-left: 8px; padding-right: 8px; }
.screen [data-a="showFull"], .screen .speak { min-height: 44px !important; }
.ml-cm td span { color: var(--ink); }
