:root {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  color: #24262b;
  background: #fff;
  font-synthesis: none;
  --muted: #8a9099;
  --line: #e9ebee;
  --surface: #f6f7f9
}

* {
  box-sizing: border-box
}

body {
  margin: 0
}

button,
input,
textarea,
select {
  font: inherit
}

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent
}

button {
  cursor: pointer
}

a {
  color: inherit;
  text-decoration: none
}

a:hover {
  text-decoration: underline
}

h1,
h2,
p {
  margin: 0
}

button:disabled {
  opacity: .45;
  cursor: wait
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #8db9ed;
  outline-offset: 4px
}

textarea:focus,
input:focus,
select:focus {
  outline: 2px solid #b3c9e6;
  outline-offset: 1px
}

button {
  border: 0;
  background: none;
  color: inherit
}

p {
  line-height: 1.8
}

.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #25282e;
  color: #fff;
  border: 1px solid #25282e;
  border-radius: 9px;
  padding: 11px 19px;
  font-size: 13px
}

.secondary {
  background: #fff;
  color: #666;
  border-color: #ddd
}

.primary:hover {
  background: #3b4049
}

.text-button {
  padding: 6px 0;
  color: #7d8794;
  font-size: 11px
}

.text-button:hover {
  color: #245c99
}

.muted {
  color: var(--muted);
  font-size: 13px
}

.tiny {
  font-size: 11px
}

.eyebrow {
  font-size: 9px;
  letter-spacing: 2px;
  color: #929aa5;
  font-weight: 600
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px
}

.brand:hover {
  text-decoration: none
}

.brand strong {
  font-size: 22px;
  letter-spacing: 3px;
  font-weight: 600
}

.brand small {
  display: block;
  font-size: 9px;
  color: #9aa0a9;
  margin-top: 4px;
  letter-spacing: .8px
}

.mark {
  display: flex;
  gap: 4px;
  height: 31px;
  align-items: center;
  transform: skewY(-12deg)
}

.mark i {
  display: block;
  width: 4px;
  height: 23px;
  background: #262a31;
  border-radius: 2px
}

.mark i:nth-child(2) {
  height: 30px
}

.mark i:nth-child(3) {
  height: 18px
}

.initial {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
  justify-content: center;
  color: #939aa5
}

.initial h1 {
  font-size: 24px;
  color: #454d58
}

.skip {
  position: fixed;
  z-index: 100;
  top: -50px;
  left: 20px;
  background: #fff;
  padding: 12px
}

.skip:focus {
  top: 10px
}

.login-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fcfcfd
}

.login-shell header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 7%;
  border-bottom: 1px solid #f0f1f3
}

.login-main {
  flex: 1;
  width: min(1060px, 100%);
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 365px;
  gap: 80px;
  align-items: center;
  padding: 65px 35px
}

.login-story h2 {
  font-size: 44px;
  line-height: 1.5;
  font-weight: 550;
  letter-spacing: -1.6px;
  margin: 26px 0
}

.login-story>p:last-child {
  font-size: 14px;
  color: #949da9;
  line-height: 2.2
}

.login-form {
  padding: 31px;
  background: #fff;
  border: 1px solid #eceef2;
  border-radius: 20px;
  box-shadow: 0 14px 60px #20305004
}

.login-form h1 {
  font-size: 28px;
  font-weight: 550;
  letter-spacing: -.7px;
  margin: 12px 0
}

.login-form>.muted {
  font-size: 12px;
  margin-bottom: 28px
}

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 11px;
  color: #7d8795;
  margin: 18px 0
}

.login-form input {
  width: 100%;
  padding: 12px;
  border: 1px solid #e1e5eb;
  border-radius: 8px;
  color: #34404f;
  font-size: 13px
}

.login-form>.primary {
  width: 100%;
  margin-top: 8px
}

.login-foot {
  font-size: 10px;
  color: #a3aab4;
  margin-top: 20px
}

.login-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 15px;
  font-size: 11px;
  color: #607c9d
}

.error {
  font-size: 12px;
  color: #ae4e43;
  margin: 12px 0
}

.error:empty {
  display: none
}

.login-shell footer {
  display: flex;
  justify-content: space-between;
  padding: 24px 7%;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: #a1a8b2;
  letter-spacing: .5px
}

.portal-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 225px minmax(0, 1fr);
  grid-template-rows: 80px 1fr
}

.portal-header {
  grid-column: 1/-1;
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fffffff2;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 25px
}

.account {
  font-size: 12px;
  color: #939ba8;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.admin-link {
  font-size: 11px;
  color: #496a92;
  border: 1px solid #e5eaf0;
  border-radius: 7px;
  padding: 9px 12px
}

.history-sidebar {
  position: sticky;
  top: 80px;
  height: calc(100vh - 80px);
  background: #f7f8fa;
  border-right: 1px solid var(--line);
  padding: 29px 17px;
  display: flex;
  flex-direction: column;
  min-height: 0
}

.new-conversation {
  flex-shrink: 0;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  background: #fff;
  border: 1px solid #e0e4eb;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 35px
}

.history-sidebar>.eyebrow {
  font-size: 8px;
  padding: 0 12px;
  margin-bottom: 15px
}

.conversation-history {
  display: block;
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain
}

.conversation-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px;
  font-size: 11px;
  color: #8a93a1;
  line-height: 1.7;
  border-radius: 7px
}

.conversation-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.conversation-item:hover {
  background: #eef0f4
}

.conversation-item.active {
  background: #eaf0f7;
  color: #43658c
}

.sidebar-caption {
  border-top: 1px solid #e5e8ed;
  padding: 21px 12px 0;
  font-size: 10px;
  color: #8f99a7
}

.sidebar-caption p {
  font-size: 9px;
  color: #a9b0bc;
  margin-top: 8px
}

.chat-main {
  min-width: 0;
  padding: 0 48px;
  max-width: 1120px;
  width: 100%;
  margin: auto;
  align-self: start
}

.knowledge-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 24px 0;
  font-size: 10px;
  color: #929dab;
  min-height: 65px
}

.knowledge-bar small {
  margin-left: auto;
  font-size: 9px;
  color: #afb5be
}

.status-dot {
  height: 5px;
  width: 5px;
  border-radius: 50%;
  background: #80a58e
}

.turns {
  width: min(100%, 790px);
  margin: auto;
  min-height: calc(100vh - 330px)
}

.chat-welcome {
  text-align: center;
  padding: 90px 0 55px
}

.chat-welcome h1 {
  font-size: 43px;
  font-weight: 560;
  line-height: 1.4;
  letter-spacing: -1.8px;
  margin: 22px 0
}

.chat-welcome>p:last-of-type {
  color: #9ba4b0;
  font-size: 13px;
  line-height: 2
}

.suggestions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 34px
}

.suggestion {
  border: 1px solid #e5e9ef;
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 10px;
  color: #8c98a9
}

.suggestion:hover {
  background: #f8fafd;
  color: #45668c
}

.composer-dock {
  position: sticky;
  bottom: 0;
  padding: 22px 0 16px;
  background: linear-gradient(#ffffff00, #fff 16px);
  width: min(100%, 790px);
  margin: auto;
  z-index: 5
}

.composer {
  background: #fff;
  border: 1px solid #dae0e8;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 5px 35px #2a3c5006
}

.composer textarea {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  resize: vertical;
  min-height: 53px;
  max-height: 200px;
  font-size: 14px;
  line-height: 1.8;
  color: #465267
}

.composer textarea:focus {
  outline: 0
}

.composer textarea::placeholder {
  color: #acb4c0
}

.composer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px
}

.composer select {
  border: 0;
  background: #f5f7fa;
  border-radius: 6px;
  padding: 7px 10px;
  color: #7b8ba0;
  font-size: 10px;
  max-width: 180px
}

.send {
  padding: 8px 14px;
  font-size: 11px;
  min-width: 78px
}

.send span {
  font-size: 17px
}

.composer-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 9px;
  color: #aab2be;
  line-height: 1.8
}

.composer-status {
  font-size: 11px;
  color: #8a7661;
  padding: 8px 2px 0
}

.composer-status:empty {
  display: none
}

.turn {
  padding: 24px 0 32px;
  scroll-margin-top: 100px
}

.question-bubble {
  background: #f3f5f8;
  border-radius: 14px 14px 3px 14px;
  padding: 15px 19px;
  max-width: 82%;
  margin-left: auto;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #4d5c70
}

.answer-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #67768b;
  font-size: 12px;
  margin: 30px 0 17px
}

.mini-mark {
  background: #edf1f6;
  border-radius: 7px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #7d91ab
}

.answer {
  font-size: 14px;
  line-height: 2.1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #424f62
}

.warning {
  color: #a38559
}

.answer h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: #252a32;
}

.notice {
  font-size: 11px;
  line-height: 1.8;
  background: #fbf8f1;
  border-radius: 8px;
  padding: 12px 15px;
  margin-top: 18px;
  color: #a08a66
}

.sources,
.diagnostic {
  margin-top: 20px;
  border: 1px solid #e9edf2;
  border-radius: 9px;
  font-size: 11px;
  color: #8391a3;
  overflow: hidden
}

.sources summary,
.diagnostic summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #fafbfd
}

.sources summary::after,
.diagnostic summary::after {
  content: '＋';
  color: #9ca8b8
}

.sources[open] summary::after,
.diagnostic[open] summary::after {
  content: '−'
}

.diagnostic summary span {
  margin-left: auto;
  font-size: 10px;
  color: #a0adbd
}

.source {
  padding: 15px 18px;
  border-top: 1px solid #edf0f5
}

.source a {
  color: #527aa5;
  font-size: 11px
}

.source p {
  font-size: 11px;
  line-height: 1.9;
  color: #8f99a7;
  margin-top: 10px;
  white-space: pre-wrap;
  max-height: 180px;
  overflow: auto
}

.diagnostic-body {
  padding: 18px
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 20px
}

.metrics dt {
  font-size: 9px;
  color: #acb4bf;
  margin-bottom: 10px
}

.metrics dd {
  font-size: 11px;
  color: #6c7e95;
  margin: 0;
  overflow-wrap: anywhere
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px
}

.code-head strong {
  font-size: 10px;
  font-weight: 500;
  color: #8b9aaf
}

.diagnostic pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 380px;
  overflow: auto;
  background: #f6f8fb;
  padding: 16px;
  border-radius: 8px;
  color: #74859b;
  font-size: 10px;
  line-height: 1.8
}

.turn-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  color: #b1bac6;
  font-size: 9px
}

.feedback-dialog {
  width: min(500px, calc(100% - 32px));
  border: 1px solid #dde3eb;
  border-radius: 17px;
  padding: 28px;
  color: #434f60;
  box-shadow: 0 25px 90px #15233525
}

.feedback-dialog::backdrop {
  background: #29354644;
  backdrop-filter: blur(4px)
}

.feedback-dialog h2 {
  font-size: 20px;
  font-weight: 550;
  margin-bottom: 15px
}

.feedback-dialog textarea {
  width: 100%;
  border: 1px solid #dfe5ee;
  border-radius: 9px;
  padding: 14px;
  font-size: 13px;
  line-height: 1.8;
  margin-top: 20px;
  resize: vertical
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px
}

@media(max-width:900px) {
  .portal-shell {
    grid-template-columns: 185px minmax(0, 1fr)
  }

  .chat-main {
    padding: 0 28px
  }

  .portal-header {
    padding: 0 24px
  }

  .header-actions {
    gap: 15px
  }

  .account {
    max-width: 90px
  }

  .chat-welcome {
    padding-top: 60px
  }

  .chat-welcome h1 {
    font-size: 35px
  }

  .suggestions {
    flex-direction: column
  }

  .login-main {
    gap: 45px;
    grid-template-columns: 1fr 340px
  }

  .login-story h2 {
    font-size: 35px
  }

  .metrics {
    grid-template-columns: 1fr 1fr
  }
}

@media(max-width:650px) {
  .portal-shell {
    display: block
  }

  .portal-header {
    height: 72px;
    padding: 0 20px
  }

  .brand strong {
    font-size: 19px
  }

  .brand small {
    font-size: 8px
  }

  .header-actions {
    gap: 12px
  }

  .account {
    display: none
  }

  .header-actions>.text-button {
    font-size: 10px
  }

  .admin-link {
    font-size: 10px;
    padding: 7px
  }

  .history-sidebar {
    position: static;
    display: block;
    height: auto;
    padding: 13px 20px;
    background: #fafbfc
  }

  .history-sidebar>.eyebrow,
  .sidebar-caption {
    display: none
  }

  .chat-main {
    padding: 0 20px
  }

  .knowledge-bar {
    font-size: 9px;
    min-height: 60px;
    padding: 18px 0
  }

  .knowledge-bar>span:nth-child(2) {
    max-width: 65%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
  }

  .knowledge-bar small {
    font-size: 8px
  }

  .chat-welcome {
    padding: 38px 0
  }

  .chat-welcome h1 {
    font-size: 35px;
    margin: 22px 0
  }

  .chat-welcome>p:last-of-type {
    font-size: 12px
  }

  .suggestions {
    gap: 8px
  }

  .suggestion {
    font-size: 10px;
    padding: 11px
  }

  .turns {
    min-height: calc(100vh - 385px)
  }

  .composer {
    padding: 15px
  }

  .composer textarea {
    font-size: 13px
  }

  .composer-foot {
    font-size: 8px
  }

  .question-bubble {
    max-width: 90%;
    font-size: 13px
  }

  .answer {
    font-size: 13px
  }

  .diagnostic summary {
    font-size: 10px;
    gap: 8px
  }

  .diagnostic summary span {
    font-size: 8px
  }

  .login-shell header {
    padding: 25px
  }

  .login-main {
    display: block;
    padding: 45px 25px
  }

  .login-story {
    display: none
  }

  .login-form {
    max-width: 380px;
    margin: auto
  }

  .login-shell footer {
    padding: 20px 25px;
    font-size: 8px
  }

  .login-shell footer span {
    display: none
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important
  }
}

/* Guest welcome — editorial composition inspired by Apple Pay US, with original branding and content. */
.welcome-shell { --welcome-blue: #0071e3; color: #1d1d1f; background: #fff; min-height: 100svh; display: flex; flex-direction: column; isolation: isolate; overflow: clip; -webkit-font-smoothing: antialiased; }
.welcome-shell a:hover { text-decoration: none; }
.welcome-nav { width: calc(100% - 80px); max-width: 1280px; min-height: 76px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.welcome-partners { display: flex; align-items: center; gap: 12px; min-height: 58px; flex-shrink: 0; }
.welcome-partners img { display: block; height: auto; object-fit: contain; }
.welcome-ultimate { width: 88px; }
.welcome-unionpay { width: 52px; }
.welcome-times { color: #86868b; font-size: 16px; font-weight: 300; line-height: 1; }
.welcome-nav-login { min-height: 36px; padding: 7px 19px; border-radius: 100px; font-size: 14px; flex-shrink: 0; background: #1d1d1f; color: #fff; transition: background .2s; }
.welcome-nav-login:hover { background: #424245; }
.welcome-main { background: #fff; }
.welcome-hero { background: #f5f5f7; padding: 65px 40px 64px; text-align: center; }
.welcome-hero h1 { margin: 0 auto; font-size: clamp(60px, 6.1vw, 84px); line-height: 1.16; font-weight: 600; letter-spacing: -3px; color: #1d1d1f; }
.welcome-hero h1 > span { display: block; }
.welcome-title-color { color: var(--welcome-blue); }
.welcome-search { display: flex; align-items: center; gap: 12px; width: min(530px, 100%); min-height: 68px; padding: 8px 9px 8px 24px; margin: 30px auto 52px; border: 1px solid #d2d2d7; border-radius: 40px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.welcome-search:focus-within { border-color: var(--welcome-blue); box-shadow: 0 0 0 3px #0071e31a; }
.welcome-question { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0 !important; padding: 9px 0; resize: none; background: transparent; color: #1d1d1f; font-size: 21px; line-height: 1.5; height: 50px; }
.welcome-question::placeholder { color: #6e6e73; }
.welcome-ask { display: flex; justify-content: center; align-items: center; width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; background: var(--welcome-blue); color: #fff; transition: background .2s; }
.welcome-ask span { font-size: 28px; line-height: 1; }
.welcome-ask:hover { background: #0077ed; }
.welcome-hero-visual { width: min(1120px, 100%); height: clamp(370px, 34vw, 470px); margin: 0 auto; overflow: hidden; border-radius: 30px; background: #172126; }
.welcome-art { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 16%; }
.welcome-section-inner { width: min(1120px, 100%); margin: 0 auto; }
.welcome-scenarios { padding: 104px 40px 110px; }
.welcome-scenarios h2 { font-size: clamp(36px, 3.4vw, 48px); line-height: 1.2; font-weight: 600; letter-spacing: -1.6px; margin-bottom: 40px; }
.welcome-scenario-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.welcome-scenario { position: relative; min-height: 330px; padding: 29px 28px 31px; background: #f5f5f7; border-radius: 28px; text-align: left; display: flex; flex-direction: column; align-items: flex-start; transition: background .2s, transform .2s; }
.welcome-scenario:hover { background: #eeeef1; transform: translateY(-3px); }
.welcome-scenario-label { font-size: 18px; font-weight: 600; line-height: 1.4; margin-bottom: 12px; }
.welcome-scenario-question { font-size: clamp(25px, 2.2vw, 32px); line-height: 1.3; font-weight: 600; letter-spacing: -1px; }
.welcome-scenario-question > span { color: var(--welcome-blue); }
.welcome-scenario svg { width: 78px; height: 78px; color: #2878e9; margin-top: auto; }
.welcome-scenario-arrow { position: absolute; right: 24px; bottom: 28px; width: 32px; height: 32px; border-radius: 50%; color: #6e6e73; background: #e8e8ed; display: grid; place-items: center; font-size: 22px; }
.welcome-proof { background: #f5f5f7; padding: 95px 40px 104px; }
.welcome-proof-heading { text-align: center; margin: 0 auto 57px; }
.welcome-proof h2 { font-size: clamp(48px, 5vw, 72px); font-weight: 600; line-height: 1.16; letter-spacing: -2.5px; }
.welcome-proof h2 span { color: var(--welcome-blue); }
.welcome-proof-inner { width: min(1120px, 100%); margin: 0 auto; display: grid; grid-template-columns: 1.7fr 1fr; min-height: 440px; border-radius: 30px; overflow: hidden; background: #fff; }
.welcome-proof-art { width: 100%; height: 100%; min-height: 440px; display: block; object-fit: cover; object-position: center; }
.welcome-proof-copy { padding: 40px 38px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.welcome-proof-copy svg { color: var(--welcome-blue); width: 65px; height: 65px; margin-bottom: 25px; }
.welcome-proof-copy h3 { margin: 0; font-size: 36px; font-weight: 600; line-height: 1.3; letter-spacing: -1.2px; }
.welcome-proof-copy p { color: #6e6e73; font-size: 21px; font-weight: 500; line-height: 1.6; margin-top: 20px; }
.welcome-footer { width: calc(100% - 64px); max-width: 1280px; margin: 0 auto; min-height: 76px; padding: 22px 0; display: flex; justify-content: center; align-items: center; gap: 10px 22px; flex-wrap: wrap; color: #6e6e73; font-size: 12px; line-height: 1.7; }
.welcome-footer a { display: inline-flex; gap: 6px; align-items: center; }
.welcome-footer img { object-fit: contain; flex-shrink: 0; }
.welcome-footer a:hover { color: #1d1d1f; text-decoration: underline; }
body:has(.welcome-dialog[open]) { overflow: hidden; }
.welcome-dialog { width: min(440px, calc(100% - 32px)); max-height: calc(100svh - 32px); position: fixed; overflow: auto; margin: auto; border: 0; padding: 62px 42px 44px; border-radius: 28px; color: #1d1d1f; background: #fff; box-shadow: 0 20px 90px #0000001c; }
.welcome-dialog::backdrop { background: #00000030; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.welcome-login-form { text-align: center; }
.welcome-close { position: absolute; top: 17px; left: 17px; display: grid; place-items: center; padding: 0; width: 29px; height: 29px; border-radius: 50%; color: #6e6e73; background: #e8e8ed; font-size: 25px; font-weight: 300; line-height: 1; transition: background .2s; }
.welcome-close:hover { background: #dcdce1; }
.welcome-login-brand { display: flex; justify-content: center; align-items: center; gap: 13px; height: 46px; margin: 0 auto 24px; }
.welcome-login-brand img { display: block; height: auto; object-fit: contain; }
.welcome-login-brand .welcome-ultimate { width: 80px; }
.welcome-login-brand .welcome-unionpay { width: 46px; }
.welcome-login-form h2 { font-size: 30px; line-height: 1.2; font-weight: 600; letter-spacing: -.8px; margin: 0 0 32px; }
.welcome-login-fields { border: 1px solid #86868b; border-radius: 12px; overflow: visible; }
.welcome-login-fields input { display: block; position: relative; width: 100%; height: 57px; min-height: 57px; padding: 16px; margin: 0; border: 0; background: #fff; color: #1d1d1f; font-size: 17px; line-height: 1.4; border-radius: 0; }
.welcome-login-fields input:first-child { border-radius: 11px 11px 0 0; }
.welcome-login-fields input:last-child { border-top: 1px solid #d2d2d7; border-radius: 0 0 11px 11px; }
.welcome-login-fields input:focus { outline: 2px solid #0071e3; outline-offset: -1px; z-index: 1; }
.welcome-login-fields input::placeholder { color: #6e6e73; opacity: 1; }
.welcome-error { text-align: left; font-size: 15px; color: #b3261e; margin: 14px 2px 0; line-height: 1.5; }
.welcome-error:empty { display: none; }
.welcome-submit { width: 100%; min-height: 50px; padding: 12px 20px; border-radius: 100px; background: #0071e3; color: #fff; font-size: 17px; font-weight: 400; margin-top: 25px; transition: background .2s; }
.welcome-submit:hover { background: #0077ed; }
.welcome-submit:disabled { opacity: .6; }
.welcome-sync { display: block; min-height: 44px; margin: 12px auto -8px; padding: 10px 8px; color: #0066cc; font-size: 15px; line-height: 1.5; }
.welcome-sync:hover { text-decoration: underline; }
.welcome-sync-notice { margin: 14px 0 -5px; color: #6e6e73; font-size: 14px; line-height: 1.5; }
.welcome-sync-notice:empty { display: none; }

@media (max-width: 900px) {
 .welcome-scenario { padding: 26px 23px; min-height: 300px; }
 .welcome-scenario-question { font-size: 26px; }
 .welcome-proof-inner { grid-template-columns: 1.4fr 1fr; }
 .welcome-proof-copy { padding: 30px; }
 .welcome-proof-copy h3 { font-size: 30px; }
 .welcome-proof-copy p { font-size: 20px; }
}
@media (max-width: 760px) {
 .welcome-nav { width: calc(100% - 40px); min-height: 72px; gap: 16px; }
 .welcome-partners { gap: 12px; }
 .welcome-ultimate { width: 82px; }
 .welcome-unionpay { width: 45px; }
 .welcome-times { font-size: 15px; }
 .welcome-nav-login { padding: 7px 16px; }
 .welcome-hero { padding: 54px 20px 32px; }
 .welcome-hero h1 { font-size: clamp(48px, 10vw, 68px); letter-spacing: -2px; line-height: 1.18; }
 .welcome-search { min-height: 64px; margin: 28px auto 37px; padding: 7px 8px 7px 20px; }
 .welcome-question { font-size: 19px; height: 47px; }
 .welcome-ask { width: 44px; height: 44px; }
 .welcome-hero-visual { height: 360px; border-radius: 23px; }
 .welcome-art { object-position: 66% 20%; }
 .welcome-scenarios { padding: 68px 0 70px; }
 .welcome-scenarios h2 { padding-inline: 24px; font-size: 34px; letter-spacing: -1.2px; margin-bottom: 28px; }
 .welcome-scenarios h2 > span { display: block; }
 .welcome-scenario-grid { display: flex; gap: 15px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 24px 15px; scrollbar-width: thin; scrollbar-color: #d2d2d7 transparent; }
 .welcome-scenario { flex: 0 0 min(280px, 80vw); min-height: 310px; padding: 28px; scroll-snap-align: center; }
 .welcome-scenario-label { font-size: 18px; }
 .welcome-scenario-question { font-size: 30px; }
 .welcome-scenario svg { width: 74px; height: 74px; }
 .welcome-proof { padding: 68px 20px 45px; }
 .welcome-proof-heading { margin-bottom: 34px; }
 .welcome-proof h2 { font-size: clamp(40px, 9vw, 58px); letter-spacing: -1.6px; line-height: 1.2; }
 .welcome-proof-inner { grid-template-columns: 1fr; border-radius: 24px; }
 .welcome-proof-art { height: 330px; min-height: 0; object-position: center; }
 .welcome-proof-copy { padding: 34px 28px 40px; }
 .welcome-proof-copy svg { width: 55px; height: 55px; margin-bottom: 20px; }
 .welcome-proof-copy h3 { font-size: 32px; }
 .welcome-proof-copy p { font-size: 21px; line-height: 1.65; margin-top: 17px; }
 .welcome-footer { width: calc(100% - 40px); gap: 5px 16px; padding: 20px 0; min-height: 100px; }
 .welcome-footer > span { flex-basis: 100%; text-align: center; }
 .welcome-dialog { padding: 58px 28px 34px; border-radius: 25px; }
}
@media (max-width: 360px) {
 .welcome-partners { gap: 10px; }
 .welcome-ultimate { width: 78px; }
 .welcome-unionpay { width: 43px; }
 .welcome-nav { gap: 10px; }
 .welcome-nav-login { padding-inline: 14px; }
 .welcome-hero { padding-top: 45px; }
 .welcome-hero h1 { font-size: 45px; }
 .welcome-hero-visual { height: 320px; }
 .welcome-scenarios h2 { font-size: 29px; }
 .welcome-proof h2 { font-size: 37px; }
 .welcome-proof-art { height: 290px; }
 .welcome-proof-copy { padding-inline: 25px; }
}
@media (prefers-reduced-motion: reduce) { .welcome-shell * { transition: none !important; scroll-behavior: auto !important; } }

.partner-brand { display: inline-flex; flex-shrink: 0; align-items: center; gap: 12px; padding: 0; text-decoration: none; }
.partner-brand:hover { text-decoration: none; }
.partner-brand img { display: block; height: auto; object-fit: contain; flex-shrink: 0; }
.partner-brand .partner-ultimate { width: 88px; }
.partner-brand .partner-unionpay { width: 52px; }
.partner-times { color: #86868b; font-size: 16px; font-weight: 300; line-height: 1; }
@media (max-width: 760px) {
 .partner-brand { gap: 10px; }
 .partner-brand .partner-ultimate { width: 82px; }
 .partner-brand .partner-unionpay { width: 45px; }
}

/* Shared visual language with the published Apple Pay inspired welcome. */
.portal-shell { color: #1d1d1f; grid-template-columns: 248px minmax(0,1fr); grid-template-rows: 76px 1fr; background: #fff; }
.portal-header { padding: 0 32px; background: #ffffffeb; border-color: #e8e8ed; backdrop-filter: blur(18px); }
.header-actions { gap: 20px; }
.account { color: #6e6e73; font-size: 14px; }
.admin-link { border: 0; border-radius: 100px; background: #f5f5f7; color: #1d1d1f; font-size: 14px; padding: 9px 18px; }
.admin-link:hover { background: #e8e8ed; }
.portal-shell .text-button { color: #0066cc; font-size: 14px; padding: 9px 0; }
.history-sidebar { top: 76px; height: calc(100svh - 76px); padding: 24px 16px; background: #f5f5f7; border-color: #e8e8ed; }
.new-conversation { padding: 12px 18px; min-height: 46px; border: 0; border-radius: 100px; background: #0071e3; color: #fff; font-size: 15px; margin-bottom: 30px; }
.new-conversation:hover { background: #0077ed; }
.history-sidebar > .eyebrow { font-size: 14px; font-weight: 400; color: #6e6e73; letter-spacing: 0; margin-bottom: 12px; }
.conversation-item { font-size: 14px; line-height: 1.6; padding: 13px 12px; color: #515154; border-radius: 12px; }
.conversation-item:hover { background: #e8e8ed; }
.conversation-item.active { background: #e2edfc; color: #0066cc; }
.chat-main { padding: 0 44px; max-width: 1120px; margin: 0 auto; min-height: calc(100svh - 76px); display: flex; flex-direction: column; }
.knowledge-bar { display: block; align-self: flex-start; padding: 22px 0 12px; min-height: 50px; color: #6e6e73; font-size: 14px; max-width: 100%; }
.knowledge-bar summary { display: flex; align-items: center; gap: 9px; list-style: none; cursor: pointer; }
.knowledge-bar summary::after { content: '⌄'; color: #86868b; margin-left: 2px; }
.knowledge-bar p { color: #515154; font-size: 14px; padding: 10px 0 0; overflow-wrap: anywhere; }
.status-dot { width: 6px; height: 6px; background: #248a3d; flex-shrink: 0; }
.turns { flex: 1; min-height: 0; width: min(100%, 800px); }
.chat-welcome { padding: clamp(58px, 10vh, 100px) 0 60px; }
.chat-welcome > .eyebrow { display: none; }
.chat-welcome h1 { font-size: clamp(40px, 4.2vw, 60px); line-height: 1.22; font-weight: 600; letter-spacing: -2px; margin: 0 0 42px; }
.chat-welcome h1 > span { color: #0071e3; }
.suggestions { gap: 12px; margin: 0 auto; max-width: 740px; }
.suggestion { flex: 1 1 170px; padding: 22px 15px; border: 0; border-radius: 20px; background: #f5f5f7; color: #515154; font-size: 16px; line-height: 1.5; }
.suggestion:hover { background: #eaf2fd; color: #0066cc; }
.composer-dock { width: min(100%,800px); background: linear-gradient(#ffffff00,#fff 24px); padding: 24px 0 26px; }
.composer { border: 1px solid #d2d2d7; padding: 20px; border-radius: 26px; box-shadow: none; }
.composer:focus-within { border-color: #0071e3; box-shadow: 0 0 0 3px #0071e30f; }
.composer textarea { color: #1d1d1f; font-size: 18px; line-height: 1.7; min-height: 65px; }
.composer textarea::placeholder { color: #86868b; }
.composer select { font-size: 14px; border-radius: 100px; padding: 9px 14px; color: #515154; background: #f5f5f7; }
.portal-shell .primary, .feedback-dialog .primary { background: #0071e3; border-color: #0071e3; color: #fff; border-radius: 100px; font-size: 15px; }
.portal-shell .primary:hover, .feedback-dialog .primary:hover { background: #0077ed; }
.portal-shell .send { min-height: 42px; min-width: 86px; padding: 9px 17px; }
.composer-status { color: #6e6e73; font-size: 15px; line-height: 1.6; }
.workspace-notice { margin-top: 16px; }
.turn { padding: 25px 0 40px; }
.question-bubble { background: #f5f5f7; color: #1d1d1f; font-size: 17px; line-height: 1.8; padding: 16px 23px; border-radius: 24px; }
.answer-label { gap: 15px; margin: 32px 0 20px; }
.answer-label .partner-brand { gap: 8px; }
.answer-label .partner-ultimate { width: 68px; }
.answer-label .partner-unionpay { width: 38px; }
.answer-label .partner-times { font-size: 14px; }
.answer-label small { font-size: 14px; }
.answer { color: #1d1d1f; font-size: 17px; line-height: 1.9; }
.answer h3 { color: #1d1d1f; font-size: 22px; line-height: 1.5; margin-bottom: 16px; }
.notice { font-size: 15px; line-height: 1.7; color: #7b5714; background: #fff7e5; border-radius: 15px; padding: 16px 18px; }
.sources, .diagnostic { border-color: #e8e8ed; border-radius: 18px; color: #515154; font-size: 15px; }
.sources summary, .diagnostic summary { background: #f5f5f7; padding: 17px 19px; color: #515154; }
.diagnostic summary span { font-size: 14px; color: #6e6e73; }
.source, .diagnostic-body { padding: 20px; }
.source > a { color: #0066cc; font-size: 15px; }
.source p { color: #515154; font-size: 15px; line-height: 1.8; }
.source .warning { font-size: 14px; color: #7b5714; }
.metrics { gap: 14px; }
.metrics dt, .metrics dd, .code-head strong { font-size: 14px; color: #6e6e73; }
.metrics dd { color: #1d1d1f; }
.diagnostic pre { color: #515154; background: #f5f5f7; border-radius: 12px; font-size: 14px; }
.turn-foot { color: #6e6e73; font-size: 14px; }
.feedback-dialog { color: #1d1d1f; border: 0; border-radius: 28px; padding: 32px; box-shadow: 0 20px 90px #0000001c; }
.feedback-dialog::backdrop { background: #00000030; backdrop-filter: blur(10px); }
.feedback-dialog h2 { font-size: 26px; }
.feedback-dialog .muted { font-size: 15px; color: #6e6e73; }
.feedback-dialog textarea { border-color: #86868b; border-radius: 12px; font-size: 17px; line-height: 1.6; padding: 16px; }
.feedback-dialog textarea:focus { outline: 2px solid #0071e3; outline-offset: 0; }
.feedback-dialog .secondary { border-radius: 100px; font-size: 15px; color: #515154; }
.feedback-dialog .error { color: #b3261e; font-size: 15px; }
.history-toggle, .history-backdrop { display: none; }
@media (max-width: 1000px) {
 .portal-shell { grid-template-columns: 220px minmax(0,1fr); }
 .chat-main { padding-inline: 28px; }
 .header-actions { gap: 15px; }
 .suggestion { flex-basis: 100%; padding: 15px 19px; text-align: left; }
 .chat-welcome { padding-top: 60px; }
}
@media (max-width: 760px) {
 .portal-shell { grid-template-columns: minmax(0,1fr); grid-template-rows: 72px 1fr; }
 .portal-header { padding: 0 20px; gap: 15px; }
 .header-actions { gap: 12px; }
 .header-actions .account { display: none; }
 .admin-link { font-size: 14px; padding: 7px 11px; }
 .header-actions .text-button { font-size: 14px; }
 .history-toggle { display: inline-flex; font-size: 14px; color: #515154; padding: 8px 0; }
 .history-sidebar { display: none; position: fixed; top: 72px; left: 0; width: 276px; max-width: calc(100vw - 42px); height: calc(100svh - 72px); z-index: 21; }
 .history-open .history-sidebar { display: flex; }
 .history-open .history-backdrop { display: block; position: fixed; inset: 72px 0 0; z-index: 20; background: #00000025; }
 .chat-main { padding: 0 22px; min-height: calc(100svh - 72px); }
 .knowledge-bar { padding-top: 20px; }
 .chat-welcome { padding: 45px 0 36px; }
 .chat-welcome h1 { font-size: 42px; letter-spacing: -1.5px; margin-bottom: 32px; }
 .suggestions { gap: 10px; }
 .suggestion { padding: 17px 19px; border-radius: 17px; font-size: 16px; }
 .composer-dock { padding: 18px 0 22px; }
 .composer { border-radius: 23px; padding: 17px; }
 .composer textarea { font-size: 17px; }
 .composer select { max-width: 165px; }
 .question-bubble { max-width: 94%; padding: 15px 18px; }
 .sources summary, .diagnostic summary { flex-wrap: wrap; gap: 8px; }
 .metrics { grid-template-columns: 1fr 1fr; }
 .feedback-dialog { padding: 28px 24px; }
}
@media (max-width: 420px) {
 .portal-header { padding-inline: 16px; }
 .header-actions { gap: 9px; }
 .portal-header .partner-brand { gap: 7px; }
 .portal-header .partner-ultimate { width: 76px; }
 .portal-header .partner-unionpay { width: 42px; }
 .portal-header .partner-times { font-size: 14px; }
 .admin-link { padding-inline: 9px; }
 .chat-main { padding-inline: 18px; }
}
@media (max-width: 360px) {
 .portal-header { flex-wrap: wrap; padding-block: 12px; }
 .portal-shell { grid-template-rows: 108px 1fr; }
 .header-actions { width: 100%; justify-content: flex-end; gap: 18px; }
 .portal-header .partner-brand { margin-right: auto; }
 .chat-main { min-height: calc(100svh - 108px); }
 .history-sidebar { top: 108px; height: calc(100svh - 108px); }
 .history-open .history-backdrop { top: 108px; }
 .chat-welcome h1 { font-size: 37px; }
}
@media (prefers-reduced-motion: reduce) { .portal-shell * { transition: none !important; scroll-behavior: auto !important; } }

/* Restored V1: a single assistant mark, preserving the page brand. */
.answer-label{display:flex;align-items:center;gap:9px;min-height:32px}
.assistant-icon{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;color:#356bd5;background:#edf3ff;flex:0 0 30px}
.assistant-icon svg{display:block;width:21px;height:21px}
.assistant-name{font-size:14px;font-weight:600;color:#5d626c}
.answer-mode-label{font-size:13px;color:#737985;line-height:1.5}

/* Conversation layout: content first, compact empty input, client-only motion. */
.chat-main{padding-top:18px}
.chat-welcome{padding:clamp(46px,9vh,90px) 0 38px}
.chat-welcome h1{font-size:clamp(36px,4vw,52px);margin-bottom:30px;letter-spacing:-1.7px}
.chat-welcome .intelligence-title{color:#6d57d9;background:linear-gradient(105deg,#2086ee 2%,#7767e8 29%,#b756c6 54%,#e65d8e 75%,#e98456 99%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;display:inline-block;padding-bottom:.12em}
.question-categories{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0;max-width:760px}
.question-category{display:flex;align-items:center;justify-content:center;gap:10px;min-height:76px;padding:19px 15px;border:1px solid #e9ebf1;border-radius:18px;color:#566379;background:#f8f9fc;font-size:16px;font-weight:500;transition:background .15s,border-color .15s,color .15s,transform .15s}
.question-category svg{height:23px;width:23px;flex:0 0 23px;color:#6581b4}
.question-category:hover{background:#f0f4fc;color:#285faa;border-color:#dce5f5;transform:translateY(-2px)}
.question-category:focus-visible{outline:3px solid #9ac6ff;outline-offset:3px}
.question-category[aria-pressed=true]{color:#235fae;background:#edf3fe;border-color:#cfdff8}
.composer-dock{padding:16px 0 20px;background:linear-gradient(#ffffff00,#fff 16px)}
.composer{display:flex;align-items:flex-end;gap:14px;padding:11px 13px 11px 18px;border-radius:23px;min-height:65px}
.composer textarea{width:100%;flex:1;resize:none;min-height:30px;height:30px;max-height:152px;overflow-y:hidden;align-self:center;padding:4px 0;font-size:17px;line-height:28px;box-sizing:border-box}
.composer textarea:focus{outline:none;box-shadow:none}
.portal-shell .send{width:40px;min-width:40px;height:40px;min-height:40px;border-radius:50%;padding:10px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px}
.send svg{width:21px;height:21px}
.composer:focus-within{box-shadow:0 0 0 3px #0071e30a}
@media(max-width:760px){.chat-main{padding-top:16px}.chat-welcome{padding-top:40px}.chat-welcome h1{font-size:38px;margin-bottom:26px}.question-categories{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.question-category{font-size:16px;min-height:68px;padding:17px 13px;border-radius:16px}.composer{padding:10px 11px 10px 15px;gap:10px;min-height:61px;border-radius:22px}.composer-dock{padding:13px 0 16px}.composer textarea{font-size:16px;line-height:27px;min-height:29px}.portal-shell .send{width:38px;height:38px;min-width:38px;min-height:38px;flex-basis:38px}}
@media(max-width:390px){.question-category{gap:8px;padding-inline:10px}.question-categories{gap:8px}.question-category svg{width:21px;height:21px}}

/* Center the complete welcome group in the space above the composer. */
.chat-main:has(>.turns>.chat-welcome){padding-top:0}
.turns:has(>.chat-welcome){display:flex;flex-direction:column;justify-content:center}
.turns>.chat-welcome{width:100%;padding:32px 0}
.chat-welcome .question-categories{margin-inline:auto}
