:root {
  --navy: #4e2a84;   /* SCB purple */
  --navy-2: #5f3aa0;
  --gold: #ffb81c;   /* SCB gold */
  --bg: #f7f6f2;
  --ink: #22262e;
  --line: #e5e2d9;
  --om-user: #14213d;
  --om-bot: #f1f2f6;
  --radius: 14px;
  font-family: "Avenir Next", "Segoe UI", Roboto, "Noto Sans Thai", "Thonburi", sans-serif;
}
* { box-sizing: border-box; margin: 0; }
body { background: var(--bg); color: var(--ink); }

/* ── bank site ─────────────────────────── */
.demo-banner { background: #1c1f26; color: #ffb81c; font-size: 11px; text-align: center; padding: 4px 10px; letter-spacing: 0.4px; }
.brand-x { color: var(--gold); }
.site-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 28px; background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10; }
.brand { font-size: 19px; font-weight: 700; letter-spacing: 0.3px; }
.brand-mark { color: var(--gold); margin-right: 6px; }
.brand-th { font-weight: 400; opacity: 0.65; font-size: 14px; margin-left: 8px; }
.site-nav a { color: #cfd6e4; text-decoration: none; margin-left: 22px; font-size: 14.5px; padding-bottom: 4px; }
.site-nav a.active { color: #fff; border-bottom: 2px solid var(--gold); }
main { max-width: 1080px; margin: 0 auto; padding: 34px 24px 120px; }
.sec { display: none; }
.sec.active { display: block; animation: fadein 0.35s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }
.hero { background: linear-gradient(120deg, var(--navy), var(--navy-2) 60%, #2c4272); color: #fff; border-radius: 20px; padding: 54px 44px; margin-bottom: 26px; }
.hero h1 { font-size: 34px; margin-bottom: 10px; }
.hero p { opacity: 0.85; margin-bottom: 22px; }
.cta { background: var(--gold); border: 0; color: var(--navy); font-weight: 700; font-size: 15px; padding: 12px 22px; border-radius: 10px; cursor: pointer; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 18px; }

/* ── demo guide (home) ─────────────────── */
.guide { margin-top: 30px; }
.guide-eyebrow { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 8px; }
.guide-lede { font-size: 15px; color: var(--ink); max-width: 720px; line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chip { font-size: 12.5px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; color: var(--navy); font-weight: 600; }
.chip.star { border-color: #ecd9a0; background: #fffaf0; color: #7a5c00; }
.beats { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 12px; padding: 14px 18px; font-size: 13px; color: #555c69; margin: 14px 0; }
.beats b { display: block; color: var(--navy); font-size: 13.5px; }
.beats > span:not(.beat-arrow) { flex: 1; min-width: 180px; }
.beat-arrow { color: var(--gold); font-weight: 700; font-size: 16px; }
.guide-link { color: var(--navy); font-weight: 600; font-size: 13.5px; }
.personas .persona-card h3 { font-size: 17px; }
.p-th { color: #98a0ad; font-weight: 400; font-size: 13px; }
.p-seg { font-size: 12px; color: var(--gold); font-weight: 600; letter-spacing: 0.03em; margin: 2px 0 10px; }
.p-try { font-size: 12.5px; color: #666d7a; }
.p-say { font-size: 14.5px; background: #f4f1fa; border-left: 3px solid var(--navy); border-radius: 8px; padding: 8px 12px; margin: 6px 0; color: var(--ink); }
.p-watch { font-size: 12.5px; color: #666d7a; }
.journeys { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin-top: 14px; }
.j { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; font-size: 12.5px; color: #555c69; line-height: 1.5; }
.j b { display: block; color: var(--navy); font-size: 13.5px; margin-bottom: 2px; }
.hood .card p { font-size: 13px; }
.arch { font-family: "SF Mono", Menlo, monospace; font-size: 12px; line-height: 1.8; background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 12px; padding: 14px 18px; overflow-x: auto; white-space: pre; color: #666d7a; margin: 14px 0; }
.arch b { color: var(--navy); font-weight: 700; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin-bottom: 8px; color: var(--navy); font-size: 16px; }
.card p { font-size: 14px; color: #555c69; line-height: 1.55; }
h2 { color: var(--navy); margin-bottom: 6px; }

/* ── widget shell ──────────────────────── */
#om-fab { position: fixed; right: 26px; bottom: 26px; width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--navy); color: var(--gold); font-size: 24px; cursor: pointer; box-shadow: 0 10px 28px rgba(20, 33, 61, 0.35); z-index: 50; transition: transform 0.15s; }
#om-fab:hover { transform: scale(1.07); }
#om-panel { position: fixed; right: 26px; bottom: 26px; width: 400px; max-width: calc(100vw - 32px); height: 620px; max-height: calc(100vh - 60px); background: #fff; border-radius: 18px; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28); display: flex; flex-direction: column; overflow: hidden; z-index: 60; }
#om-panel.hidden, #om-fab.hidden, #om-voicebar.hidden { display: none; }
.om-head { background: var(--navy); color: #fff; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; }
.om-title { font-weight: 700; font-size: 16px; }
.om-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #6ee7a0; margin-left: 4px; }
.om-sub { font-size: 11.5px; opacity: 0.7; margin-top: 2px; }
.om-actions { display: flex; gap: 6px; align-items: center; }
.om-actions button { background: rgba(255, 255, 255, 0.12); border: 0; color: #fff; border-radius: 8px; padding: 6px 9px; cursor: pointer; font-size: 14px; }
.om-actions button:disabled { opacity: 0.35; cursor: default; }
#om-subject, #om-engine { background: rgba(255, 255, 255, 0.12); color: #fff; border: 0; border-radius: 8px; padding: 5px 6px; font-size: 11.5px; max-width: 120px; }
#om-subject option, #om-engine option { color: var(--ink); }
#om-engine.hidden { display: none; }

/* voice bar */
#om-voicebar { display: flex; align-items: center; gap: 10px; background: #10321f; color: #d9f7e5; padding: 9px 14px; font-size: 13px; }
.om-pulse { width: 10px; height: 10px; border-radius: 50%; background: #34d399; animation: pulse 1.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); } 70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
#om-hangup { margin-left: auto; background: #b91c1c; color: #fff; border: 0; border-radius: 7px; padding: 5px 12px; cursor: pointer; }

/* messages */
#om-msgs { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; background: #fafaf8; }
.om-bubble { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.om-bubble.user { align-self: flex-end; background: var(--om-user); color: #fff; border-bottom-right-radius: 4px; }
.om-bubble.bot { align-self: flex-start; background: var(--om-bot); color: var(--ink); border-bottom-left-radius: 4px; }
.om-bubble.status { align-self: flex-start; background: transparent; color: #8a8f9c; font-style: italic; font-size: 13px; padding: 2px 6px; }
.om-bubble.draft { opacity: 0.75; }
.om-bubble.draft .cursor { color: var(--gold); animation: pulse 1s infinite; font-style: normal; }
.om-bubble.caption { font-size: 13px; opacity: 0.92; }
.om-bubble .voice-tag { opacity: 0.6; font-size: 11px; display: block; margin-bottom: 3px; }
.om-bubble b { font-weight: 700; }
.om-bubble ul { margin: 6px 0 2px 18px; }

/* surface bubbles */
.om-surface { align-self: stretch; background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 12px; padding: 13px 14px; font-size: 13.5px; }
.om-surface h4 { color: var(--navy); font-size: 14px; margin-bottom: 8px; }
.om-surface .row { display: flex; justify-content: space-between; align-items: center; margin: 7px 0; gap: 10px; }
.om-surface label { color: #666d7a; font-size: 12.5px; flex-shrink: 0; }
.om-surface input[type="range"] { flex: 1; accent-color: var(--navy); }
.om-surface input[type="text"] { flex: 1; border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; font-size: 13px; background: #fffbea; }
.om-surface .big { font-size: 20px; font-weight: 700; color: var(--navy); text-align: center; margin: 10px 0 4px; }
.om-surface .fine { font-size: 11px; color: #98a0ad; text-align: center; }
.om-surface .submit { width: 100%; margin-top: 10px; background: var(--navy); color: #fff; border: 0; border-radius: 9px; padding: 10px; font-weight: 700; cursor: pointer; }
.om-surface .submit:disabled { background: #9aa3b5; cursor: default; }
.om-surface .human-note { font-size: 11px; color: #b07d10; margin-top: 6px; text-align: center; }

/* wealth surfaces */
.pf-aum { font-size: 20px; font-weight: 700; color: var(--navy); margin: 2px 0 6px; font-variant-numeric: tabular-nums; }
.pf-aum span { font-size: 11px; color: #98a0ad; font-weight: 400; margin-left: 4px; }
.pf-legend { display: flex; gap: 12px; align-items: center; font-size: 11.5px; color: #666d7a; margin-bottom: 8px; }
.pf-chip { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; }
.pf-chip.cur, .pf-bar.cur { background: #b49ae0; }
.pf-chip.prop, .pf-bar.prop { background: #6b3fb5; }
.pf-row { margin: 9px 0; }
.pf-label { font-size: 12.5px; color: var(--ink); margin-bottom: 3px; display: flex; justify-content: space-between; }
.pf-delta { color: #666d7a; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.pf-track { display: grid; grid-template-columns: 30px 1fr 36px; align-items: center; gap: 6px; margin: 2px 0; }
.pf-tag { font-size: 9.5px; color: #666d7a; text-transform: uppercase; letter-spacing: 0.05em; }
.pf-cell { display: block; background: #f1eef8; border-radius: 4px; height: 10px; overflow: hidden; }
.pf-track b { font-size: 11.5px; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.pf-bar { display: block; height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; }
.il-tenor { font-size: 11px; background: #efecf5; color: var(--navy); border-radius: 999px; padding: 2px 9px; font-weight: 600; margin-left: 6px; }
.il-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 6px 0; }
.il-table th { text-align: left; color: #98a0ad; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; padding: 4px 6px 4px 0; }
.il-table td { padding: 6px 6px 6px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.il-table td:last-child { font-weight: 600; color: var(--navy); }
.il-benefits { margin: 6px 0 0 18px; font-size: 12.5px; color: #555c69; }
.il-benefits li { margin: 3px 0; }

/* checklist */
.ck-progress { float: right; font-size: 12px; color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }
.ck-item { display: flex; gap: 9px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ck-item:last-of-type { border-bottom: 0; }
.ck-ico { flex-shrink: 0; width: 20px; text-align: center; }
.ck-body small { display: block; color: #98a0ad; font-size: 11.5px; margin-top: 1px; }
.ck-done .ck-body { color: #666d7a; }
.ck-attention .ck-body { color: #b45309; }

/* link card + declarative card */
.lk-th { font-weight: 400; color: #98a0ad; font-size: 12px; margin-left: 4px; }
.lk-note { font-size: 13px; color: #555c69; margin: 4px 0 8px; }
.lk-open { display: block; text-align: center; background: var(--navy); color: #fff; text-decoration: none; border-radius: 9px; padding: 10px; font-weight: 700; font-size: 13.5px; margin-top: 6px; }
.lk-open:hover { background: var(--navy-2); }
.lk-host { text-align: center; font-size: 11px; color: #98a0ad; margin-top: 5px; }
.cv-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.cv-kv span { color: #666d7a; }
.cv-kv b { font-variant-numeric: tabular-nums; text-align: right; }
.cv-track { grid-template-columns: 1fr 64px; }
.cv-steps { margin: 6px 0 2px 20px; font-size: 13.5px; }
.cv-steps li { margin: 6px 0; line-height: 1.5; }
.cv-text { font-size: 13.5px; line-height: 1.55; }

/* input row */
.om-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.om-input input[type="text"], .om-input input:not([type]) { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; font-size: 14px; outline: none; }
.om-input input:focus { border-color: var(--navy); }
.om-input { gap: 6px; }
.om-input button { border: 0; background: var(--navy); color: #fff; border-radius: 10px; width: 38px; height: 40px; font-size: 15px; cursor: pointer; flex-shrink: 0; }
.om-input button.om-tool { background: #efecf5; color: var(--navy); }
.om-input button.om-tool:hover { background: #e3ddf0; }
#om-voice.live { background: #b91c1c !important; color: #fff; animation: pulse 1.2s infinite; }
#om-voice svg { vertical-align: middle; }

/* toasts */
#om-toasts { position: fixed; left: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 70; }
.om-toast { background: #1c1f26; color: #e8eaf0; border-left: 3px solid var(--gold); border-radius: 10px; padding: 10px 14px; font-size: 12.5px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); animation: fadein 0.25s ease; max-width: 340px; }
.om-toast .t-type { color: var(--gold); font-weight: 700; margin-right: 6px; text-transform: uppercase; font-size: 11px; }
