:root {
  color-scheme: light;
  --bg: #eef6fd;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --line: #cfe1f2;
  --line-soft: rgba(34, 102, 168, 0.14);
  --ink: #0b294d;
  --text: #18344f;
  --muted: #657b91;
  --blue: #216bd9;
  --blue-deep: #0b4e9d;
  --cyan: #16a4d4;
  --red: #ff4f56;
  --amber: #bf7b12;
  --shadow: 0 20px 60px rgba(39, 90, 150, 0.12);
  --sidebar-w: 292px;
  --radius: 18px;
  --font-bump: 0px;
  --display-font-bump: 0px;
  --rem-font-bump: 0px;
  --mobile-fs-xs: calc(.75rem + var(--rem-font-bump));
  --mobile-fs-sm: calc(.875rem + var(--rem-font-bump));
  --mobile-fs-md: calc(1rem + var(--rem-font-bump));
  --mobile-fs-lg: calc(1.125rem + var(--rem-font-bump));
  --mobile-fs-xl: calc(1.25rem + var(--rem-font-bump));
  --mobile-fs-2xl: calc(1.5rem + var(--rem-font-bump));
  --mobile-fs-display: calc(2.25rem + var(--rem-font-bump));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: auto;
  text-size-adjust: auto;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  font-size: calc(1rem + var(--rem-font-bump));
  overflow-wrap: anywhere;
}

body.finance-page {
  overflow: auto;
}

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

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

.composer-disclaimer {
  min-width: 0;
}

.site-icp-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 6px max(14px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  text-align: center;
  color: rgba(88, 109, 132, 0.92);
  font-size: calc(11px + var(--font-bump));
  line-height: 1.35;
  font-weight: 650;
  background: rgba(247, 251, 255, 0.92);
  border-top: 1px solid rgba(196, 218, 238, 0.78);
  box-shadow: 0 -8px 22px rgba(42, 92, 142, 0.06);
  backdrop-filter: blur(12px);
}

.site-icp-footer a {
  color: #2a6fb5;
  text-decoration: none;
  white-space: nowrap;
}

.site-icp-footer a:hover {
  color: #0d4f91;
  text-decoration: underline;
}

.finance-page .site-icp-footer {
  margin-top: 18px;
  border-radius: 0 0 16px 16px;
}

.app-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  background:
    radial-gradient(circle at 76% 18%, rgba(60, 156, 237, .18), transparent 30rem),
    linear-gradient(180deg, #f9fcff 0%, #eef6fd 55%, #eaf4fb 100%);
}

.sidebar {
  position: relative;
  height: 100vh;
  height: 100svh;
  padding: 24px 24px 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(249,252,255,.96));
  border-right: 1px solid var(--line);
  box-shadow: 16px 0 42px rgba(49, 92, 141, .08);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(104, 139, 174, .34) transparent;
  z-index: 20;
}

.sidebar::-webkit-scrollbar {
  width: 7px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(104, 139, 174, .28);
  border-radius: 999px;
}

.sidebar-toggle {
  position: absolute;
  top: 20px;
  right: 18px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.sidebar-toggle span {
  display: block;
  width: 16px;
  height: 16px;
  border-left: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
  transform: rotate(45deg);
  position: absolute;
  top: 10px;
}

.sidebar-toggle span:first-child {
  left: 10px;
}

.sidebar-toggle span:last-child {
  left: 18px;
}

.brand-card {
  margin-top: 44px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  box-shadow: 0 16px 40px rgba(31, 87, 148, .08);
  display: grid;
  grid-template-columns: minmax(96px, 1fr) auto 68px;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  overflow: hidden;
}

.brand-logo {
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.brand-link,
.hero-brand-link {
  display: grid;
  place-items: center;
  min-width: 0;
}

.brand-link:focus-visible,
.hero-brand-link:focus-visible {
  outline: 3px solid rgba(33, 107, 217, .24);
  outline-offset: 3px;
  border-radius: 10px;
}

.syz-logo {
  height: 42px;
  justify-self: stretch;
  min-width: 0;
}

.qsy-logo {
  height: 60px;
  width: 68px;
}

.brand-cross {
  color: #8297ab;
  font-size: calc(18px + var(--font-bump));
  font-weight: 900;
}

.assistant-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.assistant-logo,
.voice-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: block;
  object-fit: cover;
  box-shadow: 0 14px 24px rgba(34, 106, 216, .22);
}

.assistant-logo {
  background: #fff;
}

.assistant-name {
  color: var(--ink);
  font-size: calc(24px + var(--font-bump));
  line-height: 1.05;
  font-weight: 950;
}

.assistant-desc {
  margin-top: 4px;
  color: var(--muted);
  font-size: calc(14px + var(--font-bump));
  font-weight: 720;
}

.side-section {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.side-title {
  display: block;
  margin: 0 0 10px;
  color: var(--ink);
  font-size: calc(15px + var(--font-bump));
  font-weight: 900;
}

.select,
.quick-list button,
.history-item,
.ghost-button {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.88);
  color: var(--ink);
  font-weight: 800;
}

.select {
  padding: 0 14px;
  font-size: calc(18px + var(--font-bump));
}

.quick-list {
  display: grid;
  gap: 8px;
}

.quick-list button,
.history-item,
.ghost-button {
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.quick-list button:hover,
.history-item:hover,
.ghost-button:hover {
  transform: translateY(-1px);
  border-color: #9ec4e9;
  background: #fff;
}

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.history-head .side-title {
  margin: 0;
}

.mini-button {
  min-width: 54px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: calc(12px + var(--font-bump));
  font-weight: 900;
}

.history-list {
  display: grid;
  gap: 8px;
  max-height: 190px;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 6px;
  align-items: stretch;
}

.history-row .history-item {
  min-width: 0;
}

.history-delete {
  min-width: 42px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .88);
  color: #7b4752;
  cursor: pointer;
  font-size: calc(20px + var(--font-bump));
  font-weight: 700;
  line-height: 1;
}

.history-delete:hover,
.history-delete:focus-visible {
  border-color: #d79aa7;
  background: #fff5f7;
}

.history-item {
  min-height: 54px;
  padding: 9px 10px;
  display: grid;
  gap: 3px;
  text-align: left;
  align-content: center;
}

.history-item.active {
  border-color: rgba(33, 107, 217, .55);
  background: rgba(230, 243, 255, .95);
}

.history-item-title {
  display: block;
  color: var(--ink);
  font-size: calc(13px + var(--font-bump));
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item small,
.history-empty {
  color: var(--muted);
  font-size: calc(11px + var(--font-bump));
  font-weight: 760;
}

.history-empty {
  padding: 10px 2px;
}

.kb-section {
  border-bottom: 0;
  margin-top: 2px;
}

.kb-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px 14px;
  background: rgba(250,253,255,.84);
  overflow: visible;
}

.kb-card span,
.kb-card small {
  display: block;
  color: #5b738c;
  line-height: 1.55;
  font-size: calc(13px + var(--font-bump));
  font-weight: 760;
}

.kb-card strong {
  display: block;
  margin: 5px 0 7px;
  color: var(--ink);
  font-size: calc(28px + var(--font-bump));
  line-height: 1;
  font-weight: 950;
}

.ghost-button {
  margin-top: 12px;
  background: #fff;
  font-size: calc(17px + var(--font-bump));
}

.main {
  height: 100vh;
  height: 100svh;
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  padding: 18px clamp(20px, 3.2vw, 52px) 0;
  gap: 10px;
}

.topbar {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: #536e8a;
  font-size: calc(13px + var(--font-bump));
  font-weight: 780;
}

.sidebar-restore {
  display: none;
  position: fixed;
  left: 18px;
  top: 18px;
  z-index: 40;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 38px rgba(31, 87, 148, .14);
  cursor: pointer;
  place-items: center;
}

.sidebar-restore span {
  display: block;
  width: 15px;
  height: 15px;
  border-right: 4px solid var(--ink);
  border-top: 4px solid var(--ink);
  transform: rotate(45deg);
  position: absolute;
  top: 14px;
}

.sidebar-restore span:first-child {
  left: 11px;
}

.sidebar-restore span:last-child {
  left: 18px;
}

.topbar-title,
.mobile-menu {
  display: none;
}

.topbar-status.ok {
  color: #146fb3;
}

.topbar-status.bad {
  color: #b24b38;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  gap: 20px;
  align-items: center;
}

.hero-title-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(calc(44px + var(--display-font-bump)), 4.3vw, calc(62px + var(--display-font-bump)));
  line-height: .95;
  font-weight: 950;
  letter-spacing: 0;
}

.hero-chip {
  border: 1px solid #c5ddf5;
  background: #e9f3ff;
  color: #1267d8;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: calc(14px + var(--font-bump));
  font-weight: 900;
}

.hero-brand-strip {
  margin: 12px 0 8px;
  display: inline-grid;
  grid-template-columns: 104px auto 48px auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  background: rgba(255,255,255,.84);
  box-shadow: 0 10px 28px rgba(35, 91, 150, .08);
}

.hero-brand-strip img {
  max-height: 30px;
  max-width: 104px;
  object-fit: contain;
}

.hero-brand-link:first-child img {
  width: auto;
  max-width: 104px;
}

.hero-brand-link:nth-of-type(2) img {
  width: 48px;
  max-width: 48px;
}

.hero-brand-strip span {
  color: #8ca0b3;
  font-weight: 900;
}

.hero-brand-strip b {
  color: #60778f;
  font-size: calc(14px + var(--font-bump));
}

.hero p {
  margin: 0;
  max-width: 920px;
  color: var(--text);
  font-size: calc(15px + var(--font-bump));
  line-height: 1.5;
  font-weight: 720;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  min-height: 70px;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 14px 36px rgba(30, 83, 137, .06);
}

.metric-icon {
  color: var(--blue);
  font-size: calc(20px + var(--font-bump));
  font-weight: 900;
}

.metric-card small,
.metric-card em {
  display: block;
  color: var(--muted);
  font-size: calc(12px + var(--font-bump));
  font-style: normal;
  font-weight: 820;
}

.metric-card strong {
  color: var(--ink);
  font-size: calc(20px + var(--font-bump));
  line-height: 1.18;
  font-weight: 950;
}

.metric-card strong em {
  display: inline;
  margin-left: 4px;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 2px solid #bfd2e6;
  min-height: 40px;
}

.tab {
  position: relative;
  height: 40px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: calc(16px + var(--font-bump));
  font-weight: 930;
  cursor: pointer;
}

.tab.active {
  color: #1267d8;
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff4f56, #216bd9);
}

.workspace {
  min-height: 0;
  border-top: 1px solid #d6e7f3;
  padding-top: 8px;
  overflow: hidden;
}

.panel {
  display: none;
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.panel.active {
  display: block;
}

#panel-chat.active {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel h2,
.section-heading h2 {
  margin: 0;
  color: #09233d;
  font-size: calc(24px + var(--font-bump));
  line-height: 1.2;
  font-weight: 950;
}

.voice-launch,
.primary-button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  cursor: pointer;
  font-weight: 930;
  box-shadow: 0 16px 34px rgba(33, 107, 217, .22);
}

.voice-launch {
  min-height: 40px;
  padding: 0 18px;
}

.suggestions {
  margin-top: 6px;
  flex: 0 0 auto;
  position: relative;
  z-index: 3;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.suggestion-head {
  padding: 7px 12px;
  color: #064b82;
  font-weight: 930;
}

.suggestion-grid {
  display: flex;
  gap: 8px;
  padding: 0 12px 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.suggestion-grid button {
  flex: 0 0 clamp(220px, 31%, 320px);
  min-height: 40px;
  max-height: 50px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 8px 10px;
  color: #17385b;
  text-align: left;
  cursor: pointer;
  font-weight: 760;
  line-height: 1.35;
  overflow: hidden;
  scroll-snap-align: start;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.wechat-tip {
  margin: 12px 0 0;
  border: 1px solid #f0d6a6;
  border-radius: 14px;
  background: #fff9ec;
  color: #815315;
  padding: 12px 14px;
  font-weight: 820;
  line-height: 1.5;
}

.chat-scroll {
  flex: 1 1 clamp(260px, 34vh, 480px);
  min-height: 0;
  margin-top: 10px;
  display: grid;
  gap: 12px;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 22px;
}

.message {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.message.user {
  grid-template-columns: minmax(0, 1fr) 42px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--blue);
  border: 1px solid var(--line);
  font-weight: 950;
}

.avatar.assistant-avatar {
  border: 0;
  background: transparent;
  box-shadow: 0 12px 22px rgba(34, 106, 216, .14);
}

.avatar.assistant-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
}

.bubble {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-strong);
  padding: 14px 16px;
  color: var(--text);
  line-height: 1.72;
  font-size: calc(16px + var(--font-bump));
  box-shadow: 0 14px 34px rgba(26, 84, 140, .07);
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: normal;
}

.message.user .bubble {
  justify-self: end;
  max-width: min(760px, 86%);
  min-width: min(8em, 100%);
  background: #eaf4ff;
  border-color: #bddaf5;
  text-align: left;
}

.message.user .avatar {
  order: 2;
  background: linear-gradient(145deg, #ff6570, #ff4654);
  color: #fff;
  border: 0;
  box-shadow: 0 14px 30px rgba(255, 79, 86, .24);
}

.avatar.user-avatar svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sources {
  margin-top: 10px;
  color: var(--muted);
  font-size: calc(13px + var(--font-bump));
  font-weight: 760;
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: calc(16px + var(--font-bump));
  font-weight: 720;
}

.diagnosis-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.78);
  padding: 20px;
}

.diagnosis-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: calc(16px + var(--font-bump));
  font-weight: 900;
}

.diagnosis-form .full {
  grid-column: 1 / -1;
}

.diagnosis-form input,
.diagnosis-form select,
.diagnosis-form textarea,
.composer input {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.diagnosis-form input,
.diagnosis-form select {
  min-height: 46px;
  padding: 0 14px;
}

.diagnosis-form textarea {
  min-height: 96px;
  resize: vertical;
  padding: 12px 14px;
}

.primary-button {
  min-height: 48px;
  padding: 0 18px;
  font-size: calc(17px + var(--font-bump));
}

.diagnosis-result {
  margin-top: 16px;
  scroll-margin-top: 16px;
  scroll-margin-bottom: calc(120px + env(safe-area-inset-bottom));
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.cap-card {
  min-height: 168px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.86);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 14px 34px rgba(26, 84, 140, .06);
}

.cap-card span {
  color: #60778f;
  font-size: calc(13px + var(--font-bump));
  font-weight: 860;
}

.cap-card strong {
  color: var(--ink);
  font-size: calc(22px + var(--font-bump));
  font-weight: 950;
}

.cap-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: calc(14px + var(--font-bump));
  font-weight: 720;
}

.cap-card.muted {
  background: #f8fbff;
}

.cap-card.unlinked {
  cursor: default;
}

.cap-card.unlinked:hover,
.cap-card.unlinked:active {
  transform: none;
}

.site-status-note {
  margin-top: auto;
  color: #7a5a20;
  font-size: calc(12px + var(--font-bump));
  font-weight: 760;
}

.finance-shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.finance-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.finance-hero > div:first-child,
.finance-rule-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 16px 42px rgba(31, 87, 148, .08);
}

.finance-hero > div:first-child {
  padding: 24px;
}

.finance-kicker {
  color: var(--blue-deep);
  font-size: calc(13px + var(--font-bump));
  font-weight: 920;
}

.finance-hero h1 {
  margin: 8px 0 10px;
  color: var(--ink);
  font-size: calc(34px + var(--font-bump));
  line-height: 1.12;
}

.finance-hero p {
  margin: 0;
  max-width: 48rem;
  color: var(--muted);
  line-height: 1.65;
  font-size: calc(16px + var(--font-bump));
  font-weight: 720;
}

.finance-rule-card {
  padding: 20px;
  display: grid;
  align-content: center;
  gap: 10px;
  background: #fff8ed;
}

.finance-rule-card strong {
  color: #7a4b2e;
  font-size: calc(18px + var(--font-bump));
  font-weight: 950;
}

.finance-rule-card span {
  color: #5f4530;
  line-height: 1.62;
  font-size: calc(14px + var(--font-bump));
  font-weight: 760;
}

.finance-dashboard {
  display: grid;
  gap: 16px;
}

.procurement-auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.86);
  box-shadow: 0 16px 42px rgba(31, 87, 148, .08);
  padding: 18px;
}

.procurement-auth-copy {
  display: grid;
  align-content: center;
  gap: 8px;
}

.procurement-auth-copy span {
  color: var(--blue-deep);
  font-size: calc(13px + var(--font-bump));
  font-weight: 920;
}

.procurement-auth-copy strong {
  color: var(--ink);
  font-size: calc(24px + var(--font-bump));
  line-height: 1.2;
  font-weight: 950;
}

.procurement-auth-copy p,
.procurement-login-status {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
  font-size: calc(14px + var(--font-bump));
  font-weight: 760;
}

.procurement-login-status[data-ok="1"] {
  color: #176444;
}

.procurement-login {
  display: grid;
  gap: 10px;
}

.procurement-login label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: calc(14px + var(--font-bump));
  font-weight: 900;
}

.procurement-login input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  padding: 0 13px;
  outline: none;
}

.procurement-login-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.secondary-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 18px;
  font-weight: 930;
  cursor: pointer;
}

.procurement-legacy {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fbff;
}

.procurement-legacy summary {
  cursor: pointer;
  color: var(--muted);
  font-size: calc(13px + var(--font-bump));
  font-weight: 850;
}

.procurement-legacy input {
  width: 100%;
  margin-top: 10px;
}

.finance-overview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.finance-stat,
.finance-answer,
.finance-record {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 12px 30px rgba(26, 84, 140, .06);
}

.finance-stat {
  min-height: 92px;
  padding: 16px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.finance-stat span {
  color: var(--muted);
  font-size: calc(14px + var(--font-bump));
  font-weight: 850;
}

.finance-stat strong {
  color: var(--ink);
  font-size: calc(28px + var(--font-bump));
  line-height: 1;
  font-weight: 950;
}

.finance-form {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, .8fr);
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.78);
  padding: 20px;
}

.procurement-intake {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.procurement-section-title {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(45, 106, 123, .16);
  border-radius: 12px;
  background: #eef8fb;
}

.procurement-section-title strong {
  color: var(--ink);
  font-size: calc(17px + var(--font-bump));
  font-weight: 950;
}

.procurement-section-title span {
  color: var(--muted);
  font-size: calc(13px + var(--font-bump));
  font-weight: 760;
}

.finance-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: calc(16px + var(--font-bump));
  font-weight: 900;
}

.finance-form .full {
  grid-column: 1 / -1;
}

.finance-form input,
.finance-form select,
.finance-form textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.finance-form input,
.finance-form select {
  min-height: 46px;
  padding: 0 14px;
}

.finance-form textarea {
  min-height: 94px;
  resize: vertical;
  padding: 12px 14px;
}

.finance-form textarea[name="items"] {
  min-height: 138px;
}

.finance-result {
  display: grid;
  gap: 14px;
}

.procurement-summary {
  border: 1px solid #cfe1f2;
  border-radius: 14px;
  background: #f8fbff;
  padding: 12px 14px;
  color: var(--muted);
  line-height: 1.55;
  font-size: calc(14px + var(--font-bump));
  font-weight: 820;
}

.procurement-items {
  display: grid;
  gap: 8px;
  border: 1px solid #d6e7de;
  border-radius: 14px;
  background: #f8fdfa;
  padding: 12px 14px;
  color: var(--text);
}

.procurement-items strong {
  color: var(--ink);
  font-size: calc(15px + var(--font-bump));
  font-weight: 950;
}

.procurement-items ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.procurement-items li {
  line-height: 1.48;
  font-size: calc(13px + var(--font-bump));
  font-weight: 720;
}

.finance-answer {
  padding: 16px;
  color: var(--text);
  line-height: 1.72;
  white-space: pre-wrap;
  font-size: calc(15px + var(--font-bump));
  font-weight: 680;
}

.finance-record-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.finance-record {
  padding: 15px;
  display: grid;
  gap: 8px;
  min-height: 172px;
}

.finance-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.finance-record-head strong {
  color: var(--ink);
  line-height: 1.35;
  font-size: calc(16px + var(--font-bump));
}

.finance-record-head span {
  flex: 0 0 auto;
  border: 1px solid rgba(33, 107, 217, .24);
  border-radius: 999px;
  padding: 4px 9px;
  background: #edf6ff;
  color: var(--blue-deep);
  font-size: calc(12px + var(--font-bump));
  font-weight: 900;
}

.finance-record small {
  color: var(--muted);
  font-size: calc(13px + var(--font-bump));
  font-weight: 780;
}

.finance-record p {
  margin: 0;
  color: var(--text);
  font-size: calc(14px + var(--font-bump));
  line-height: 1.55;
}

.finance-evidence-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.finance-evidence-list span {
  max-width: 100%;
  border: 1px solid rgba(48, 127, 100, .24);
  border-radius: 999px;
  background: #eefaf4;
  color: #1d6047;
  padding: 5px 9px;
  font-size: calc(12px + var(--font-bump));
  line-height: 1.25;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.voice-panel {
  position: fixed;
  inset: 98px clamp(24px, 5vw, 78px) 94px calc(var(--sidebar-w) + clamp(24px, 5vw, 78px));
  z-index: 30;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 72% 74%, rgba(23, 185, 210, .18), transparent 24rem),
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(235,247,255,.96));
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  padding: 24px 26px;
}

.voice-panel[hidden] {
  display: none;
}

.voice-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

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

.voice-brand h1 {
  margin: 0;
  color: var(--ink);
  font-size: calc(24px + var(--font-bump));
  font-weight: 950;
}

.voice-brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-weight: 820;
}

.voice-close {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue-deep);
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 930;
}

.voice-body {
  min-height: 0;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  gap: 14px;
}

.voice-orb {
  position: relative;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff, #74e2ff 20%, #1f71e7 72%, #0d51b2);
  box-shadow:
    0 0 0 10px rgba(73, 148, 227, .12),
    0 0 0 24px rgba(64, 148, 237, .07),
    0 28px 70px rgba(20, 99, 210, .26);
}

.voice-orb::after {
  content: "";
  position: absolute;
  inset: 22px 30px 30px 28px;
  border-radius: 50%;
  background: rgba(255,255,255,.34);
  filter: blur(2px);
}

.voice-orb.listening,
.voice-orb.speaking {
  animation: pulse 1.15s ease-in-out infinite;
}

.voice-orb.thinking {
  animation: rotateGlow 1.6s linear infinite;
}

.voice-body h3 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: clamp(calc(22px + var(--font-bump)), 2.5vw, calc(34px + var(--display-font-bump)));
  line-height: 1.25;
  font-weight: 950;
}

.voice-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: calc(16px + var(--font-bump));
  font-weight: 820;
}

.voice-live {
  width: min(720px, 92%);
  min-height: 86px;
  max-height: min(30vh, 240px);
  display: block;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  color: #24445f;
  line-height: 1.68;
  padding: 16px 18px;
  font-weight: 760;
  text-align: left;
  overflow: auto;
  white-space: pre-wrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

.voice-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(108px, auto);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.82);
}

.voice-start {
  min-height: 56px;
}

.icon-button {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: #73879a;
  cursor: pointer;
  font-weight: 950;
  font-size: calc(17px + var(--font-bump));
}

.voice-stop {
  min-height: 56px;
  padding: 0 16px;
  white-space: nowrap;
  color: var(--blue-deep);
  border-color: rgba(28, 125, 228, 0.26);
  background: rgba(255,255,255,.96);
}

.voice-mute {
  grid-column: 1 / -1;
  grid-row: 2;
  min-height: 56px;
  padding: 0 16px;
  white-space: nowrap;
  color: #b2473d;
  border-color: rgba(255, 77, 93, 0.28);
  background: #fff4f2;
}

.voice-mute[hidden] {
  display: none;
}

.voice-stop.is-active {
  color: #0f4473;
  border-color: rgba(28, 125, 228, 0.36);
  background: #eef7ff;
}

.voice-stop.is-speaking {
  color: #b2473d;
  border-color: rgba(255, 77, 93, 0.28);
  background: #fff4f2;
}

.voice-stop:disabled {
  color: #9aaaba;
  cursor: not-allowed;
  background: #f7fafc;
}

.composer {
  align-self: end;
  width: min(980px, 100%);
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 20px 60px rgba(39, 90, 150, 0.14);
  padding: 10px 12px 8px;
}

.composer.hidden {
  display: none;
}

.app-shell:not([data-active-tab="chat"]) .composer {
  display: none;
}

.composer-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 10px;
  padding: 8px;
  border-radius: 14px;
  background: #f1f4f8;
}

.composer input {
  min-height: 40px;
  padding: 0 16px;
  font-size: calc(16px + var(--font-bump));
}

.send-button {
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-size: calc(24px + var(--font-bump));
  font-weight: 900;
}

.send-button:disabled {
  background: #d7dee8;
  cursor: wait;
}

.composer-note {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 4px 0;
  color: var(--muted);
  font-size: calc(12px + var(--font-bump));
  line-height: 1.45;
  font-weight: 760;
}

.composer-note button {
  border: 0;
  background: transparent;
  color: var(--blue-deep);
  cursor: pointer;
  font-weight: 930;
  white-space: nowrap;
}

.composer-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 0 0 auto;
}

#stopPlaybackGlobal {
  color: #b2473d;
}

#stopPlaybackGlobal[hidden] {
  display: none;
}

.app-shell.sidebar-collapsed {
  --sidebar-w: 0px;
  grid-template-columns: 0 1fr;
}

.app-shell.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}

.app-shell.sidebar-collapsed .sidebar-restore {
  display: grid;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.055); }
}

@keyframes rotateGlow {
  from { filter: hue-rotate(0deg); transform: rotate(0deg); }
  to { filter: hue-rotate(18deg); transform: rotate(360deg); }
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .metric-grid,
  .capability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Leadership demo AI focus refresh */
:root {
  --bg: #f8fbff;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --line: #e4edf7;
  --line-soft: rgba(18, 91, 168, 0.10);
  --ink: #092747;
  --text: #193752;
  --muted: #6b7f93;
  --blue: #1f73df;
  --blue-deep: #0758b8;
  --cyan: #15a7ce;
  --shadow: 0 18px 54px rgba(31, 83, 136, 0.10);
  --sidebar-w: 248px;
  --radius: 14px;
}

body {
  background: #fbfdff;
}

.app-shell {
  background:
    radial-gradient(circle at 57% 42%, rgba(78, 165, 245, .18), transparent 23rem),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 54%, #f2f8ff 100%);
}

.sidebar {
  padding: 14px 14px 16px;
  gap: 10px;
  border-right-color: #edf2f8;
  background: rgba(255, 255, 255, .96);
}

.brand-card {
  margin-top: 26px;
  min-height: 48px;
  grid-template-columns: minmax(68px, 1fr) auto 42px;
  border: 0;
  background: transparent;
  padding: 4px 2px;
}

.syz-logo {
  height: 26px;
}

.qsy-logo {
  width: 42px;
  height: 38px;
}

.assistant-card {
  border-bottom-color: #edf2f8;
}

.feature-nav-section {
  padding-bottom: 10px;
}

.feature-nav {
  display: grid;
  gap: 4px;
}

.feature-nav-item {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #4d657d;
  cursor: pointer;
  text-align: left;
  padding: 0 12px;
  font-size: calc(13px + var(--font-bump));
  font-weight: 860;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.feature-nav-item:hover {
  background: #f3f8fe;
  color: var(--blue-deep);
}

.feature-nav-item.active {
  background: #edf6ff;
  color: var(--blue-deep);
}

.side-section {
  border-bottom-color: #edf2f8;
}

.main {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  padding: 16px clamp(28px, 4vw, 72px) 12px;
  gap: 8px;
}

.topbar {
  height: 28px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  min-height: 214px;
  padding: 8px 0 2px;
  text-align: center;
}

.hero-copy {
  width: min(880px, 100%);
}

.hero-title-row {
  justify-content: center;
  gap: 10px;
}

.hero h1 {
  font-size: calc(34px + var(--display-font-bump));
  line-height: 1;
}

.hero-chip {
  padding: 5px 11px;
  border-color: #d7e8f8;
  background: rgba(238, 247, 255, .92);
  color: #176ed3;
}

.main-prompt {
  margin: 28px auto 10px;
  color: #1e354d;
  font-size: calc(38px + var(--display-font-bump));
  line-height: 1.18;
  font-weight: 760;
  letter-spacing: 0;
}

.hero-body {
  max-width: 760px;
  margin: 0 auto;
  color: #66798d;
  font-size: calc(14px + var(--font-bump));
  line-height: 1.65;
  font-weight: 680;
}

.hero-mode-strip {
  display: inline-flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.hero-mode {
  min-height: 34px;
  border: 1px solid #dbe8f5;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: #506a83;
  cursor: pointer;
  padding: 0 14px;
  font-size: calc(13px + var(--font-bump));
  font-weight: 860;
  box-shadow: 0 10px 26px rgba(34, 82, 132, .06);
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}

.hero-mode:hover {
  transform: translateY(-1px);
  border-color: #bdd8f2;
  color: var(--blue-deep);
}

.hero-mode.active {
  border-color: transparent;
  background: #0b2d52;
  color: #fff;
}

.metric-grid,
.tabs {
  display: none;
}

.workspace {
  width: min(1080px, 100%);
  justify-self: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.panel-head {
  justify-content: flex-end;
  min-height: 34px;
  margin-bottom: 4px;
}

#panel-chat .panel-head h2 {
  display: none;
}

.voice-launch {
  min-height: 34px;
  border: 1px solid #d8e8f7;
  background: rgba(255, 255, 255, .9);
  color: var(--blue-deep);
  box-shadow: none;
}

.suggestions {
  max-width: 980px;
  margin: 4px auto 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.suggestion-head {
  display: none;
}

.suggestion-grid {
  justify-content: center;
  gap: 8px;
  padding: 0;
}

.suggestion-grid button {
  flex: 0 1 auto;
  width: auto;
  max-width: 238px;
  min-height: 34px;
  max-height: 38px;
  border-color: #e2edf7;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #4a637b;
  padding: 0 12px;
  font-size: calc(12px + var(--font-bump));
  font-weight: 780;
  line-height: 34px;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  box-shadow: 0 8px 22px rgba(34, 82, 132, .05);
}

.chat-scroll {
  width: min(980px, 100%);
  margin: 12px auto 0;
  min-height: clamp(220px, 36vh, 430px);
  padding: 2px 4px 16px;
}

.message {
  grid-template-columns: 36px minmax(0, 1fr);
}

.message.user {
  grid-template-columns: minmax(0, 1fr) 36px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.bubble {
  max-width: min(900px, 92%);
  border-color: #e3edf7;
  box-shadow: 0 10px 28px rgba(26, 84, 140, .055);
}

.message.user .bubble {
  max-width: min(760px, 84%);
  background: #edf6ff;
}

.composer {
  width: min(760px, 100%);
  border-radius: 26px;
  border-color: #e2edf8;
  background: rgba(255, 255, 255, .94);
  padding: 8px;
  box-shadow: 0 22px 70px rgba(36, 88, 142, .15);
}

.composer-form {
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 6px;
  padding: 4px;
  background: transparent;
}

.composer input {
  min-height: 42px;
  border: 0;
  background: transparent;
}

.send-button {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: linear-gradient(135deg, #2076df, #14a2d0);
}

.composer-note {
  padding: 4px 8px 0;
}

#panel-diagnosis.active,
#panel-capability.active {
  width: min(1060px, 100%);
  margin: 0 auto;
}

.section-heading {
  margin: 0 0 14px;
  text-align: left;
}

.diagnosis-form,
.cap-card {
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 12px 30px rgba(26, 84, 140, .055);
}

.voice-panel {
  inset: 78px clamp(24px, 5vw, 72px) 82px calc(var(--sidebar-w) + clamp(24px, 5vw, 72px));
  border-color: #dceaf7;
  background:
    radial-gradient(circle at 50% 48%, rgba(91, 179, 255, .20), transparent 24rem),
    rgba(255, 255, 255, .96);
}

@media (max-width: 820px) {
  .app-shell {
    background:
      radial-gradient(circle at 50% 30%, rgba(78, 165, 245, .18), transparent 18rem),
      linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  }

  .main {
    padding: 0 14px calc(112px + env(safe-area-inset-bottom));
    display: block;
  }

  .main > .site-icp-footer {
    margin: 10px -14px calc(-112px - env(safe-area-inset-bottom));
    padding: 9px 14px calc(9px + env(safe-area-inset-bottom));
    font-size: var(--mobile-fs-xs);
  }

  .topbar {
    height: 50px;
  }

  .hero {
    display: grid;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 22px 0 12px;
  }

  .hero-title-row {
    justify-content: center;
  }

  .hero h1 {
    font-size: calc(34px + var(--display-font-bump));
  }

  .main-prompt {
    margin-top: 22px;
    font-size: calc(27px + var(--display-font-bump));
    line-height: 1.24;
  }

  .hero-body {
    font-size: calc(13px + var(--font-bump));
  }

  .hero-mode-strip {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .hero-mode {
    flex: 0 0 auto;
  }

  .workspace {
    margin-top: 4px;
    overflow: visible;
  }

  .panel-head {
    min-height: 32px;
  }

  .suggestion-grid {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .suggestion-grid button {
    max-width: 76vw;
    flex: 0 0 auto;
  }

  .chat-scroll {
    min-height: 300px;
    padding-bottom: calc(132px + env(safe-area-inset-bottom));
  }

  .composer {
    position: fixed;
    left: 12px;
    right: auto;
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    width: calc(100dvw - 24px);
    max-width: calc(100vw - 24px);
    max-width: calc(100dvw - 24px);
    min-width: 0;
    z-index: 26;
  }

  .composer-note span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .voice-panel {
    inset: 58px 12px calc(10px + env(safe-area-inset-bottom)) 12px;
  }
}

@media (max-width: 380px) {
  .main-prompt {
    font-size: calc(25px + var(--display-font-bump));
  }
}

/* Final center-balance polish */
@media (min-width: 821px) {
  .suggestions {
    width: min(820px, 100%);
  }

  .suggestion-grid {
    flex-wrap: wrap;
    overflow: visible;
    max-width: 820px;
    margin: 0 auto;
  }

  .suggestion-grid button {
    max-width: 240px;
  }

  .capability-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
  }

  .cap-card {
    grid-column: span 2;
  }

  .cap-card:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .cap-card:nth-child(5) {
    grid-column: 4 / span 2;
  }
}

@media (max-width: 820px) {
  .capability-grid {
    grid-template-columns: 1fr;
  }

  .cap-card,
  .cap-card:nth-child(4),
  .cap-card:nth-child(5) {
    grid-column: auto;
  }
}

/* Mobile center alignment */
@media (max-width: 820px) {
  .hero-mode-strip {
    justify-content: center;
    flex-wrap: wrap;
    overflow: visible;
  }

  #panel-chat .panel-head {
    justify-content: center;
  }

  .voice-launch {
    margin: 0 auto;
  }

  .suggestions {
    width: 100%;
    margin-inline: auto;
  }

  .suggestion-grid {
    justify-content: center;
    flex-wrap: wrap;
    overflow: visible;
    gap: 8px;
    padding-inline: 0;
  }

  .suggestion-grid button {
    flex: 0 1 auto;
    max-width: min(44vw, 220px);
  }
}

/* Center-balance polish */
@media (min-width: 821px) {
  .suggestions {
    width: min(820px, 100%);
  }

  .suggestion-grid {
    flex-wrap: wrap;
    overflow: visible;
    max-width: 820px;
    margin: 0 auto;
  }

  .suggestion-grid button {
    max-width: 240px;
  }

  .capability-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
  }

  .cap-card {
    grid-column: span 2;
  }

  .cap-card:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .cap-card:nth-child(5) {
    grid-column: 4 / span 2;
  }
}

@media (max-width: 820px) {
  .capability-grid {
    grid-template-columns: 1fr;
  }

  .cap-card,
  .cap-card:nth-child(4),
  .cap-card:nth-child(5) {
    grid-column: auto;
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .app-shell {
    display: block;
    min-height: 100vh;
    min-height: 100svh;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(82vw, 310px);
    transform: translateX(-104%);
    transition: transform .2s ease;
    padding-top: 54px;
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: none;
  }

  .brand-card {
    margin-top: 0;
  }

  .main {
    min-height: 100vh;
    min-height: 100svh;
    height: auto;
    overflow: visible;
    padding: 0 14px calc(112px + env(safe-area-inset-bottom));
    gap: 12px;
    display: block;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 12;
    height: 50px;
    margin: 0 -14px 10px;
    padding: 0 14px;
    justify-content: space-between;
    background: rgba(247,251,255,.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
  }

  .sidebar-restore {
    display: none !important;
  }

  .topbar-title,
  .mobile-menu {
    display: block;
  }

  .topbar-title {
    color: var(--ink);
    font-size: calc(17px + var(--font-bump));
    font-weight: 950;
  }

  .mobile-menu {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
  }

  .mobile-menu span {
    display: block;
    width: 16px;
    height: 2px;
    margin: 4px auto;
    background: var(--ink);
  }

  .topbar-status {
    max-width: 126px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
    font-size: calc(12px + var(--font-bump));
  }

  .hero {
    display: block;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.76);
    padding: 14px;
    box-shadow: 0 14px 34px rgba(26,84,140,.07);
  }

  .hero-title-row {
    gap: 8px;
  }

  .hero h1 {
    font-size: calc(40px + var(--font-bump));
    line-height: .95;
  }

  .hero-chip {
    font-size: calc(12px + var(--font-bump));
    padding: 5px 8px;
  }

  .hero-brand-strip {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px 0 10px;
    padding: 6px 10px;
    overflow: hidden;
  }

  .hero-brand-strip img:first-of-type {
    width: auto;
    height: 26px;
    max-width: 128px;
    flex: 0 1 auto;
  }

  .hero-brand-strip img:nth-of-type(2) {
    width: 42px;
    height: 42px;
    max-width: 42px;
    flex: 0 0 42px;
  }

  .hero-brand-link:first-child img {
    width: auto;
    height: 26px;
    max-width: 128px;
  }

  .hero-brand-link:nth-of-type(2) img {
    width: 42px;
    height: 42px;
    max-width: 42px;
  }

  .hero-brand-strip span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #8095aa;
    font-size: calc(20px + var(--font-bump));
    line-height: 1;
  }

  .hero-brand-strip b {
    display: none;
  }

  .hero p {
    font-size: calc(13px + var(--font-bump));
    line-height: 1.5;
  }

  .metric-grid {
    display: none;
  }

  .metric-card {
    min-height: 82px;
    grid-template-columns: 28px 1fr;
    gap: 8px;
    padding: 12px;
  }

  .metric-icon {
    font-size: calc(20px + var(--font-bump));
  }

  .metric-card strong {
    font-size: calc(18px + var(--font-bump));
  }

  .metric-card small,
  .metric-card em {
    font-size: calc(11px + var(--font-bump));
  }

  .tabs {
    margin-top: 10px;
    gap: 8px;
    justify-content: space-between;
    min-height: 44px;
  }

  .tab {
    height: 44px;
    font-size: calc(15px + var(--font-bump));
  }

  .workspace {
    margin-top: 8px;
    padding-top: 12px;
    overflow: visible;
  }

  .panel {
    overflow: visible;
  }

  #panel-chat.active {
    overflow: hidden;
  }

  .panel h2,
  .section-heading h2 {
    font-size: calc(21px + var(--font-bump));
  }

  .voice-launch {
    min-height: 36px;
    padding: 0 12px;
    font-size: calc(13px + var(--font-bump));
  }

  .diagnosis-form,
  .capability-grid {
    grid-template-columns: 1fr;
  }

  .suggestions {
    position: static;
  }

  .suggestion-grid button {
    flex-basis: min(76vw, 320px);
  }

  .message,
  .message.user {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
  }

  .message.user {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .avatar {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: calc(13px + var(--font-bump));
  }

  .bubble {
    padding: 12px 13px;
    font-size: calc(15px + var(--font-bump));
    line-height: 1.66;
  }

  .chat-scroll {
    min-height: 300px;
    padding-bottom: calc(132px + env(safe-area-inset-bottom));
  }

  .message.user .bubble {
    max-width: 92%;
  }

  .diagnosis-form {
    padding: 14px;
    gap: 14px;
  }

  .cap-card {
    min-height: 132px;
  }

  .composer {
    position: fixed;
    left: 12px;
    right: auto;
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    width: calc(100dvw - 24px);
    max-width: calc(100vw - 24px);
    max-width: calc(100dvw - 24px);
    min-width: 0;
    z-index: 26;
    padding: 10px;
    border-radius: 18px;
  }

  .composer-form {
    grid-template-columns: minmax(0, 1fr) 46px;
    padding: 8px;
    min-width: 0;
  }

  .composer input {
    min-width: 0;
    min-height: 42px;
    font-size: calc(15px + var(--font-bump));
  }

  .composer-note {
    font-size: calc(11px + var(--font-bump));
    padding-top: 6px;
  }

  .composer-note span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .voice-panel {
    inset: 58px 12px calc(10px + env(safe-area-inset-bottom)) 12px;
    border-radius: 22px;
    padding: 14px;
    gap: 8px;
  }

  .voice-brand h1 {
    font-size: calc(20px + var(--font-bump));
  }

  .voice-brand p {
    font-size: calc(12px + var(--font-bump));
  }

  .voice-close {
    padding: 8px 10px;
    font-size: calc(13px + var(--font-bump));
  }

  .voice-orb {
    width: 92px;
    height: 92px;
  }

  .voice-body h3 {
    font-size: calc(22px + var(--font-bump));
  }

  .voice-body p {
    font-size: calc(13px + var(--font-bump));
  }

  .voice-live {
    width: 100%;
    min-height: 92px;
    font-size: calc(13px + var(--font-bump));
    max-height: 168px;
    overflow: auto;
  }
}

@media (max-width: 380px) {
  .hero {
    padding: 14px;
  }

  .hero h1 {
    font-size: calc(42px + var(--font-bump));
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tab {
    font-size: calc(14px + var(--font-bump));
  }

  .composer input {
    font-size: calc(14px + var(--font-bump));
  }
}

/* Chat-first visual refresh */
:root {
  --bg: #f5f9fd;
  --surface: rgba(255, 255, 255, 0.88);
  --line: #d8e6f3;
  --line-soft: rgba(20, 90, 160, 0.10);
  --ink: #082442;
  --text: #16324c;
  --muted: #6a7d91;
  --shadow: 0 18px 48px rgba(34, 82, 132, 0.10);
  --sidebar-w: 268px;
  --radius: 16px;
}

body {
  background: var(--bg);
}

.app-shell {
  background:
    linear-gradient(180deg, #fbfdff 0%, #f3f8fd 48%, #eef6fd 100%);
}

.sidebar {
  padding: 18px 16px 16px;
  gap: 12px;
  background: rgba(255, 255, 255, .96);
  box-shadow: none;
}

.brand-card {
  margin-top: 32px;
  min-height: 58px;
  grid-template-columns: minmax(78px, 1fr) auto 48px;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 12px;
  box-shadow: none;
}

.syz-logo {
  height: 30px;
}

.qsy-logo {
  width: 48px;
  height: 44px;
}

.brand-cross {
  font-size: calc(15px + var(--font-bump));
}

.assistant-card {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 12px;
}

.assistant-logo,
.voice-logo {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.assistant-name {
  font-size: calc(20px + var(--font-bump));
}

.assistant-desc {
  font-size: calc(12px + var(--font-bump));
}

.side-section {
  padding-bottom: 12px;
}

.side-title {
  margin-bottom: 8px;
  color: #48637d;
  font-size: calc(12px + var(--font-bump));
  font-weight: 850;
}

.select,
.quick-list button,
.history-item,
.ghost-button {
  min-height: 36px;
  border-radius: 10px;
  background: #fff;
  font-size: calc(13px + var(--font-bump));
}

.select {
  padding: 0 10px;
}

.quick-list {
  gap: 6px;
}

.quick-list button {
  text-align: left;
  padding: 0 12px;
}

.history-list {
  max-height: min(28vh, 220px);
  gap: 6px;
}

  .history-item {
    min-height: 46px;
    padding: 8px 10px;
  }

  .history-row {
    grid-template-columns: minmax(0, 1fr) 40px;
  }

  .history-delete {
    min-width: 40px;
    min-height: 40px;
  }

.history-item-title {
  font-size: calc(12px + var(--font-bump));
}

.history-item small,
.history-empty {
  font-size: calc(10px + var(--font-bump));
}

.kb-section {
  margin-top: auto;
}

.kb-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
}

.kb-card span {
  font-size: calc(11px + var(--font-bump));
  line-height: 1.25;
}

.kb-card strong {
  margin: 0;
  font-size: calc(19px + var(--font-bump));
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.kb-card small {
  display: none;
}

.ghost-button {
  margin-top: 8px;
}

.main {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  padding: 14px clamp(22px, 3vw, 40px) 12px;
  gap: 8px;
}

.topbar {
  height: 26px;
  font-size: calc(12px + var(--font-bump));
}

.hero {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  min-height: 78px;
}

.hero-title-row {
  gap: 12px;
}

.hero h1 {
  font-size: clamp(calc(34px + var(--display-font-bump)), 3.4vw, calc(48px + var(--display-font-bump)));
}

.hero-chip {
  padding: 5px 10px;
  font-size: calc(12px + var(--font-bump));
  background: #edf6ff;
}

.hero-brand-strip {
  display: none;
}

.hero p {
  margin-top: 6px;
  max-width: 760px;
  color: #49647f;
  font-size: calc(13px + var(--font-bump));
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.metric-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 560px;
}

.metric-card {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  box-shadow: none;
}

.metric-icon {
  display: none;
}

.metric-card div {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.metric-card small,
.metric-card em {
  font-size: calc(11px + var(--font-bump));
}

.metric-card strong {
  font-size: calc(14px + var(--font-bump));
}

.metric-card strong em {
  display: none;
}

.tabs {
  min-height: 38px;
  gap: 8px;
  border-bottom: 1px solid #d1e0ef;
}

.tab {
  height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: calc(14px + var(--font-bump));
}

.tab.active {
  background: #fff;
  box-shadow: 0 8px 20px rgba(34, 82, 132, .08);
}

.tab.active::after {
  display: none;
}

.workspace {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .68);
  box-shadow: 0 18px 42px rgba(34, 82, 132, .08);
  padding: 12px;
}

.panel {
  padding-right: 0;
}

.panel-head {
  min-height: 38px;
}

.panel h2,
.section-heading h2 {
  font-size: calc(20px + var(--font-bump));
}

.voice-launch {
  min-height: 34px;
  padding: 0 14px;
  font-size: calc(13px + var(--font-bump));
  box-shadow: 0 10px 24px rgba(33, 107, 217, .18);
}

.suggestions {
  margin-top: 6px;
  border-radius: 12px;
  background: rgba(248, 251, 255, .82);
  backdrop-filter: none;
}

.suggestion-head {
  padding: 7px 10px 5px;
  font-size: calc(12px + var(--font-bump));
}

.suggestion-grid {
  padding: 0 10px 8px;
}

.suggestion-grid button {
  flex-basis: clamp(220px, 30%, 310px);
  min-height: 38px;
  max-height: 48px;
  border-radius: 10px;
  background: #fff;
  font-size: calc(13px + var(--font-bump));
}

.chat-scroll {
  flex: 1 1 auto;
  min-height: clamp(330px, 48vh, 590px);
  margin-top: 10px;
  padding: 2px 4px 16px;
  gap: 10px;
}

.message {
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
}

.message.user {
  grid-template-columns: minmax(0, 1fr) 38px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 13px;
}

.bubble {
  max-width: min(900px, 92%);
  padding: 13px 15px;
  border-radius: 15px;
  line-height: 1.68;
  box-shadow: 0 10px 26px rgba(26, 84, 140, .06);
}

.message.user .bubble {
  max-width: min(760px, 84%);
}

.composer {
  width: min(980px, 100%);
  border-radius: 20px;
  padding: 8px 10px 7px;
  box-shadow: 0 16px 46px rgba(34, 82, 132, .12);
}

.composer-form {
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 8px;
  padding: 7px;
}

.composer input {
  min-height: 38px;
}

.composer-note {
  padding-top: 5px;
}

.voice-panel {
  inset: 84px clamp(24px, 5vw, 72px) 88px calc(var(--sidebar-w) + clamp(24px, 5vw, 72px));
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .metric-grid {
    justify-content: flex-start;
    max-width: none;
  }
}

@media (max-width: 820px) {
  .sidebar {
    width: min(80vw, 300px);
    padding: 52px 16px 16px;
  }

  .brand-card {
    min-height: 56px;
  }

  .main {
    display: block;
    padding: 0 14px calc(112px + env(safe-area-inset-bottom));
  }

  .hero {
    display: block;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 2px 2px 0;
  }

  .hero h1 {
    font-size: calc(36px + var(--font-bump));
  }

  .hero p {
    margin-top: 6px;
    font-size: calc(13px + var(--font-bump));
  }

  .metric-grid {
    display: none;
  }

  .tabs {
    margin-top: 8px;
    min-height: 40px;
    gap: 6px;
  }

  .tab {
    height: 34px;
    padding: 0 8px;
    font-size: calc(14px + var(--font-bump));
  }

  .workspace {
    margin-top: 8px;
    padding: 10px;
    border-radius: 16px;
  }

  .panel-head {
    min-height: 36px;
  }

  .panel h2,
  .section-heading h2 {
    font-size: calc(19px + var(--font-bump));
  }

  .suggestions {
    margin-top: 4px;
  }

  .suggestion-grid button {
    flex-basis: min(78vw, 320px);
  }

  .chat-scroll {
    min-height: min(42vh, 360px);
    padding-bottom: 12px;
  }

  .bubble {
    max-width: 92%;
  }

  .composer {
    padding: 9px;
  }
}

@media (max-width: 380px) {
  .hero {
    padding: 0 2px;
  }

  .hero h1 {
    font-size: calc(34px + var(--font-bump));
  }
}

/* Final AI-workbench direction: clean leadership demo surface */
:root {
  --bg: #f8fbff;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --line: #e4edf7;
  --line-soft: rgba(18, 91, 168, 0.10);
  --ink: #092747;
  --text: #193752;
  --muted: #6b7f93;
  --blue: #1f73df;
  --blue-deep: #0758b8;
  --cyan: #15a7ce;
  --shadow: 0 18px 54px rgba(31, 83, 136, 0.10);
  --sidebar-w: 248px;
  --radius: 14px;
}

body {
  background: #fbfdff;
}

.app-shell {
  background:
    radial-gradient(circle at 57% 42%, rgba(78, 165, 245, .18), transparent 23rem),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 54%, #f2f8ff 100%);
}

.sidebar {
  padding: 14px 14px 16px;
  gap: 10px;
  border-right-color: #edf2f8;
  background: rgba(255, 255, 255, .96);
  box-shadow: none;
}

.brand-card {
  margin-top: 26px;
  min-height: 48px;
  grid-template-columns: minmax(68px, 1fr) auto 42px;
  border: 0;
  background: transparent;
  padding: 4px 2px;
  box-shadow: none;
}

.syz-logo {
  height: 26px;
}

.qsy-logo {
  width: 42px;
  height: 38px;
}

.assistant-card {
  border-bottom-color: #edf2f8;
}

.feature-nav-section {
  padding-bottom: 10px;
}

.feature-nav {
  display: grid;
  gap: 4px;
}

.feature-nav-item {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #4d657d;
  cursor: pointer;
  text-align: left;
  padding: 0 12px;
  font-size: calc(13px + var(--font-bump));
  font-weight: 860;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.feature-nav-item:hover {
  background: #f3f8fe;
  color: var(--blue-deep);
}

.feature-nav-item.active {
  background: #edf6ff;
  color: var(--blue-deep);
}

.side-section {
  border-bottom-color: #edf2f8;
}

.main {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  padding: 16px clamp(28px, 4vw, 72px) 12px;
  gap: 8px;
}

.topbar {
  height: 28px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  min-height: 214px;
  padding: 8px 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.hero-copy {
  width: min(880px, 100%);
}

.hero-title-row {
  justify-content: center;
  gap: 10px;
}

.hero h1 {
  font-size: calc(34px + var(--display-font-bump));
  line-height: 1;
}

.hero-chip {
  padding: 5px 11px;
  border-color: #d7e8f8;
  background: rgba(238, 247, 255, .92);
  color: #176ed3;
}

.hero-brand-strip,
.metric-grid,
.tabs {
  display: none;
}

.main-prompt {
  margin: 28px auto 10px;
  color: #1e354d;
  font-size: calc(38px + var(--display-font-bump));
  line-height: 1.18;
  font-weight: 760;
  letter-spacing: 0;
}

.hero-body {
  max-width: 760px;
  margin: 0 auto;
  color: #66798d;
  font-size: calc(14px + var(--font-bump));
  line-height: 1.65;
  font-weight: 680;
}

.hero-mode-strip {
  display: inline-flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.hero-mode {
  min-height: 34px;
  border: 1px solid #dbe8f5;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: #506a83;
  cursor: pointer;
  padding: 0 14px;
  font-size: calc(13px + var(--font-bump));
  font-weight: 860;
  box-shadow: 0 10px 26px rgba(34, 82, 132, .06);
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}

.hero-mode:hover {
  transform: translateY(-1px);
  border-color: #bdd8f2;
  color: var(--blue-deep);
}

.hero-mode.active {
  border-color: transparent;
  background: #0b2d52;
  color: #fff;
}

.workspace {
  width: min(1080px, 100%);
  justify-self: center;
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.panel-head {
  justify-content: flex-end;
  min-height: 34px;
  margin-bottom: 4px;
}

#panel-chat .panel-head h2 {
  display: none;
}

.voice-launch {
  min-height: 34px;
  border: 1px solid #d8e8f7;
  background: rgba(255, 255, 255, .9);
  color: var(--blue-deep);
  box-shadow: none;
}

.suggestions {
  max-width: 980px;
  margin: 4px auto 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.suggestion-head {
  display: none;
}

.suggestion-grid {
  justify-content: center;
  gap: 8px;
  padding: 0;
}

.suggestion-grid button {
  flex: 0 1 auto;
  width: auto;
  max-width: 238px;
  min-height: 34px;
  max-height: 38px;
  border-color: #e2edf7;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #4a637b;
  padding: 0 12px;
  font-size: calc(12px + var(--font-bump));
  font-weight: 780;
  line-height: 34px;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  box-shadow: 0 8px 22px rgba(34, 82, 132, .05);
}

.chat-scroll {
  width: min(980px, 100%);
  margin: 12px auto 0;
  min-height: clamp(220px, 36vh, 430px);
  padding: 2px 4px 16px;
}

.message {
  grid-template-columns: 36px minmax(0, 1fr);
}

.message.user {
  grid-template-columns: minmax(0, 1fr) 36px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.bubble {
  max-width: min(900px, 92%);
  border-color: #e3edf7;
  box-shadow: 0 10px 28px rgba(26, 84, 140, .055);
}

.message.user .bubble {
  max-width: min(760px, 84%);
  background: #edf6ff;
}

.composer {
  width: min(760px, 100%);
  border-radius: 26px;
  border-color: #e2edf8;
  background: rgba(255, 255, 255, .94);
  padding: 8px;
  box-shadow: 0 22px 70px rgba(36, 88, 142, .15);
}

.composer-form {
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 6px;
  padding: 4px;
  background: transparent;
}

.composer input {
  min-height: 42px;
  border: 0;
  background: transparent;
}

.send-button {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: linear-gradient(135deg, #2076df, #14a2d0);
}

.composer-note {
  padding: 4px 8px 0;
}

#panel-diagnosis.active,
#panel-capability.active {
  width: min(1060px, 100%);
  margin: 0 auto;
}

.section-heading {
  margin: 0 0 14px;
  text-align: left;
}

.diagnosis-form,
.cap-card {
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 12px 30px rgba(26, 84, 140, .055);
}

.voice-panel {
  inset: 78px clamp(24px, 5vw, 72px) 82px calc(var(--sidebar-w) + clamp(24px, 5vw, 72px));
  border-color: #dceaf7;
  background:
    radial-gradient(circle at 50% 48%, rgba(91, 179, 255, .20), transparent 24rem),
    rgba(255, 255, 255, .96);
}

@media (max-width: 820px) {
  .app-shell {
    background:
      radial-gradient(circle at 50% 30%, rgba(78, 165, 245, .18), transparent 18rem),
      linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  }

  .main {
    padding: 0 14px calc(112px + env(safe-area-inset-bottom));
    display: block;
  }

  .topbar {
    height: 50px;
  }

  .hero {
    display: grid;
    min-height: 0;
    padding: 22px 0 12px;
  }

  .hero-title-row {
    justify-content: center;
  }

  .hero h1 {
    font-size: calc(34px + var(--display-font-bump));
  }

  .main-prompt {
    margin-top: 22px;
    font-size: calc(27px + var(--display-font-bump));
    line-height: 1.24;
  }

  .hero-body {
    font-size: calc(13px + var(--font-bump));
  }

  .hero-mode-strip {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .hero-mode {
    flex: 0 0 auto;
  }

  .workspace {
    margin-top: 4px;
    overflow: visible;
  }

  .panel-head {
    min-height: 32px;
  }

  .suggestion-grid {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .suggestion-grid button {
    max-width: 76vw;
    flex: 0 0 auto;
  }

  .chat-scroll {
    min-height: 300px;
    padding-bottom: calc(132px + env(safe-area-inset-bottom));
  }

  .composer {
    position: fixed;
    left: 12px;
    right: auto;
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    width: calc(100dvw - 24px);
    max-width: calc(100vw - 24px);
    max-width: calc(100dvw - 24px);
    min-width: 0;
    z-index: 26;
  }

  .composer-note span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .voice-panel {
    inset: 58px 12px calc(10px + env(safe-area-inset-bottom)) 12px;
  }
}

@media (max-width: 380px) {
  .main-prompt {
    font-size: calc(25px + var(--display-font-bump));
  }
}
/* Final center-balance polish */
@media (min-width: 821px) {
  .suggestions {
    width: min(820px, 100%);
  }

  .suggestion-grid {
    flex-wrap: wrap;
    overflow: visible;
    max-width: 820px;
    margin: 0 auto;
  }

  .suggestion-grid button {
    max-width: 240px;
  }

  .capability-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
  }

  .cap-card {
    grid-column: span 2;
  }

  .cap-card:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .cap-card:nth-child(5) {
    grid-column: 4 / span 2;
  }
}

@media (max-width: 820px) {
  .capability-grid {
    grid-template-columns: 1fr;
  }

  .cap-card,
  .cap-card:nth-child(4),
  .cap-card:nth-child(5) {
    grid-column: auto;
  }
}
/* Final mobile center alignment */
@media (max-width: 820px) {
  .hero-mode-strip {
    justify-content: center;
    flex-wrap: wrap;
    overflow: visible;
  }

  #panel-chat .panel-head {
    justify-content: center;
  }

  .voice-launch {
    margin: 0 auto;
  }

  .suggestions {
    width: 100%;
    margin-inline: auto;
  }

  .suggestion-grid {
    justify-content: center;
    flex-wrap: wrap;
    overflow: visible;
    gap: 8px;
    padding-inline: 0;
  }

  .suggestion-grid button {
    flex: 0 1 auto;
    max-width: min(44vw, 220px);
  }
}
/* Final Shui AI title centering */
.hero-title-row {
  display: grid;
  justify-items: center;
  justify-content: center;
  gap: 8px;
}

.hero h1 {
  width: 100%;
  text-align: center;
}

.hero-chip {
  justify-self: center;
}

@media (max-width: 820px) {
  .hero-title-row {
    gap: 7px;
  }
}

/* Final mobile sidebar close button */
@media (max-width: 820px) {
  .sidebar-toggle {
    display: grid;
    place-items: center;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(31, 87, 148, .09);
    cursor: pointer;
  }

  .sidebar-toggle span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .sidebar-toggle span:first-child,
  .sidebar-toggle span:last-child {
    left: 50%;
  }

  .sidebar-toggle span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  .brand-card {
    grid-template-columns: minmax(72px, 1fr) 14px 42px;
    align-items: center;
    min-height: 44px;
    gap: 6px;
    padding: 2px 4px;
  }

  .syz-logo {
    width: auto;
    height: 24px;
    justify-self: center;
    align-self: center;
  }

  .qsy-logo {
    width: 42px;
    height: 38px;
    justify-self: center;
    align-self: center;
  }

  .brand-cross {
    display: grid;
    place-items: center;
    width: 14px;
    height: 38px;
    align-self: center;
    justify-self: center;
    line-height: 1;
    font-size: calc(13px + var(--font-bump));
  }
}

/* Final desktop sidebar toggle alignment */
@media (min-width: 821px) {
  .sidebar-toggle {
    top: 14px;
    right: 24px;
    width: 28px;
    height: 28px;
  }

  .sidebar-toggle span {
    width: 10px;
    height: 10px;
    border-left-width: 3px;
    border-bottom-width: 3px;
    top: 8px;
  }

  .sidebar-toggle span:first-child {
    left: 7px;
  }

  .sidebar-toggle span:last-child {
    left: 12px;
  }
}

/* Final desktop brand group centering */
@media (min-width: 821px) {
  .brand-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 4px 12px;
  }

  .brand-card .brand-logo {
    flex: 0 0 auto;
    justify-self: auto;
    align-self: center;
    object-fit: contain;
  }

  .syz-logo {
    width: 96px;
    height: 26px;
  }

  .qsy-logo {
    width: 42px;
    height: 38px;
  }

  .brand-cross {
    display: grid;
    place-items: center;
    width: 14px;
    height: 38px;
    align-self: center;
    line-height: 1;
    font-size: calc(13px + var(--font-bump));
  }
}

/* Final mobile system font adaptation */
@media (max-width: 820px) {
  html,
  body {
    -webkit-text-size-adjust: auto;
    text-size-adjust: auto;
  }

  body,
  button,
  input,
  select,
  textarea {
    font-size: var(--mobile-fs-md);
  }

  .app-shell {
    height: 100vh;
    height: 100svh;
    max-height: 100vh;
    max-height: 100svh;
    overflow: hidden;
  }

  .main {
    height: 100vh;
    height: 100svh;
    max-height: 100vh;
    max-height: 100svh;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(max(132px, 9.5em) + env(safe-area-inset-bottom));
  }

  #panel-chat.active {
    overflow: visible;
  }

  .chat-scroll {
    padding-bottom: calc(max(132px, 9.5em) + env(safe-area-inset-bottom));
  }

  :where(
    .assistant-desc,
    .side-title,
    .history-item-title,
    .history-item small,
    .history-empty,
    .kb-card span,
    .kb-card small,
    .metric-card small,
    .metric-card em,
    .sources,
    .composer-note,
    .suggestion-head,
    .hero-brand-strip b,
    .brand-cross
  ) {
    font-size: var(--mobile-fs-sm);
    line-height: 1.35;
  }

  :where(
    .feature-nav-item,
    .hero-mode,
    .suggestion-grid button,
    .hero-chip,
    .voice-launch,
    .mini-button,
    .ghost-button,
    .tab,
    .select,
    .topbar-status
  ) {
    font-size: var(--mobile-fs-sm);
    line-height: 1.25;
  }

  :where(
    .bubble,
    .hero p,
    .hero-body,
    .section-heading p,
    .diagnosis-form label,
    .diagnosis-form input,
    .diagnosis-form select,
    .diagnosis-form textarea,
    .composer input,
    .voice-body p,
    .voice-live,
    .primary-button,
    .voice-start,
    .send-button,
    .icon-button
  ) {
    font-size: var(--mobile-fs-md);
  }

  :where(.topbar-title, .assistant-name) {
    font-size: var(--mobile-fs-lg);
    line-height: 1.22;
  }

  :where(.section-heading h2, .panel-head h2, .voice-body h3, .voice-state) {
    font-size: var(--mobile-fs-xl);
    line-height: 1.28;
  }

  :where(.main-prompt) {
    font-size: calc(1.7rem + var(--rem-font-bump));
    line-height: 1.18;
  }

  :where(.hero h1) {
    font-size: var(--mobile-fs-display);
    line-height: 1.05;
  }

  .topbar {
    min-height: 50px;
    height: auto;
    align-items: center;
    gap: 8px;
  }

  .topbar-title {
    font-size: var(--mobile-fs-lg);
    line-height: 1.2;
  }

  .topbar-status {
    max-width: 46vw;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    font-size: var(--mobile-fs-sm);
    line-height: 1.2;
  }

  .assistant-name,
  .section-heading h2,
  .panel-head h2 {
    font-size: var(--mobile-fs-xl);
    line-height: 1.25;
  }

  .assistant-desc,
  .side-title,
  .history-item-title,
  .history-item small,
  .kb-card span,
  .kb-card small {
    font-size: var(--mobile-fs-sm);
    line-height: 1.35;
  }

  .hero h1 {
    font-size: var(--mobile-fs-display);
    line-height: 1.05;
  }

  .main-prompt {
    font-size: calc(1.7rem + var(--rem-font-bump));
    line-height: 1.18;
  }

  .hero p,
  .section-heading p,
  .voice-body p {
    font-size: var(--mobile-fs-md);
    line-height: 1.58;
  }

  .hero p,
  .hero-body {
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: initial;
    overflow: visible;
    text-overflow: clip;
  }

  .hero-chip,
  .hero-mode,
  .feature-nav-item,
  .suggestion-grid button,
  .voice-launch,
  .mini-button,
  .ghost-button {
    height: auto;
    max-height: none;
    min-height: max(34px, 2.35em);
    white-space: normal;
    line-height: 1.22;
    font-size: var(--mobile-fs-sm);
  }

  .suggestion-grid button {
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: initial;
    overflow: visible;
    line-height: 1.25;
    padding-block: .55em;
  }

  .bubble {
    font-size: var(--mobile-fs-md);
    line-height: 1.72;
  }

  .sources,
  .composer-note {
    font-size: var(--mobile-fs-sm);
    line-height: 1.45;
  }

  .composer-note {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .composer-note span {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    min-width: 0;
  }

  .composer-form {
    grid-template-columns: minmax(0, 1fr) max(44px, 2.85em);
  }

  .composer input,
  .diagnosis-form input,
  .diagnosis-form select,
  .diagnosis-form textarea {
    font-size: var(--mobile-fs-md);
    line-height: 1.35;
  }

  .composer input,
  .diagnosis-form input,
  .diagnosis-form select {
    min-height: max(44px, 2.75em);
  }

  .diagnosis-form label {
    font-size: var(--mobile-fs-md);
    line-height: 1.35;
  }

  .primary-button {
    height: auto;
    min-height: max(48px, 3em);
    white-space: normal;
    line-height: 1.25;
    font-size: var(--mobile-fs-md);
  }

  .voice-body h3,
  .voice-state {
    font-size: var(--mobile-fs-xl);
    line-height: 1.3;
  }

  .voice-live {
    font-size: var(--mobile-fs-md);
    line-height: 1.68;
    min-height: max(86px, 5.4em);
  }

  .voice-actions {
    grid-template-columns: minmax(0, 1fr) minmax(6em, auto);
  }

  .voice-start,
  .send-button,
  .icon-button {
    font-size: var(--mobile-fs-md);
  }
}

/* Final composer readability guard */
.composer {
  position: relative;
  z-index: 28;
  background: #fff;
  backdrop-filter: none;
}

.composer-form {
  background: #f5f8fb;
}

.chat-scroll {
  scroll-padding-bottom: max(142px, 8.5rem);
  padding-bottom: max(142px, 8.5rem);
}

/* Feedback collection fixes: mobile drawer, diagnosis reset, clickable Shui AI card */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 45;
  border: 0;
  padding: 0;
  background: rgba(8, 31, 57, .18);
  cursor: pointer;
}

.secondary-button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--blue-deep);
  font-weight: 900;
  cursor: pointer;
}

.secondary-button:hover {
  border-color: rgba(33, 107, 217, .44);
  background: #f5fbff;
}

.diagnosis-reset {
  margin-top: -6px;
}

.cap-card-button {
  width: 100%;
  border-radius: 16px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

.cap-card-button:hover {
  border-color: rgba(33, 107, 217, .5);
  transform: translateY(-1px);
}

.cap-card-button:focus-visible,
.secondary-button:focus-visible,
.sidebar-backdrop:focus-visible {
  outline: 3px solid rgba(33, 107, 217, .24);
  outline-offset: 2px;
}

@media (max-width: 820px) {
  .app-shell.sidebar-open .sidebar-backdrop {
    display: block;
  }

  .app-shell.sidebar-open .sidebar {
    z-index: 60;
  }

  .composer {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: calc(10px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: min(calc(100vw - 24px), 640px);
    width: min(calc(100dvw - 24px), 640px);
    max-width: calc(100vw - 24px);
    max-width: calc(100dvw - 24px);
    min-width: 0;
    z-index: 40;
    background: #fff;
  }

  .chat-scroll {
    scroll-padding-bottom: calc(max(132px, 8.5em) + env(safe-area-inset-bottom));
    padding-bottom: calc(max(132px, 8.5em) + env(safe-area-inset-bottom));
  }

  .main {
    padding-bottom: calc(max(132px, 8.5em) + env(safe-area-inset-bottom));
  }

  .composer-note {
    align-items: center;
    flex-wrap: nowrap;
    min-width: 0;
  }

  .composer-note span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .composer-actions {
    flex: 0 0 auto;
  }
}

/* Final chat density optimization */
.main {
  gap: 6px;
}

.hero {
  min-height: 150px;
  padding: 4px 0 0;
}

.hero-title-row {
  gap: 6px;
}

.hero h1 {
  font-size: calc(30px + var(--display-font-bump));
}

.hero-chip {
  padding: 4px 10px;
  font-size: calc(12px + var(--font-bump));
}

.main-prompt {
  margin: 16px auto 6px;
  font-size: calc(30px + var(--display-font-bump));
  line-height: 1.15;
}

.hero-body {
  max-width: 720px;
  font-size: calc(13px + var(--font-bump));
  line-height: 1.45;
}

.hero-mode-strip {
  gap: 6px;
  margin-top: 10px;
}

.hero-mode {
  min-height: 30px;
  padding: 0 12px;
  font-size: calc(12px + var(--font-bump));
}

.panel-head {
  min-height: 30px;
  margin-bottom: 2px;
}

.voice-launch {
  min-height: 30px;
  padding: 0 14px;
  font-size: calc(12px + var(--font-bump));
}

.suggestions {
  max-width: 980px;
  margin: 2px auto 0;
  overflow: hidden;
}

.suggestion-grid {
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 4px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.suggestion-grid::-webkit-scrollbar {
  display: none;
}

.suggestion-grid button {
  flex: 0 0 auto;
  max-width: 208px;
  min-height: 30px;
  max-height: 32px;
  padding: 0 11px;
  font-size: calc(11px + var(--font-bump));
  line-height: 30px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-scroll {
  margin-top: 8px;
  min-height: clamp(300px, 44vh, 520px);
}

.bubble {
  padding: 12px 14px;
  font-size: calc(15px + var(--font-bump));
  line-height: 1.62;
}

.composer {
  border-radius: 22px;
}

@media (max-width: 820px) {
  .main {
    gap: 4px;
    padding-left: 12px;
    padding-right: 12px;
    padding-bottom: calc(max(116px, 7.5em) + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 46px;
    height: 46px;
  }

  .hero {
    min-height: 0;
    padding: 12px 0 6px;
  }

  .hero-title-row {
    gap: 4px;
  }

  .hero h1 {
    font-size: calc(1.85rem + var(--rem-font-bump));
  }

  .hero-chip {
    min-height: 24px;
    padding: 3px 8px;
    font-size: var(--mobile-fs-xs);
    line-height: 1.15;
  }

  .main-prompt {
    margin: 12px auto 6px;
    font-size: calc(1.42rem + var(--rem-font-bump));
    line-height: 1.2;
  }

  .hero-body {
    max-width: 32rem;
    font-size: var(--mobile-fs-sm);
    line-height: 1.45;
  }

  .hero-mode-strip {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    margin-top: 9px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 2px 3px;
    -webkit-overflow-scrolling: touch;
  }

  .hero-mode {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 12px;
    white-space: nowrap;
    font-size: var(--mobile-fs-sm);
  }

  #panel-chat .panel-head {
    justify-content: flex-end;
    min-height: 30px;
    margin-bottom: 2px;
  }

  .voice-launch {
    min-height: 30px;
    margin: 0 0 0 auto;
    padding: 0 12px;
    font-size: var(--mobile-fs-sm);
  }

  .suggestions {
    width: 100%;
    margin-top: 2px;
  }

  .suggestion-grid {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 2px 4px;
    -webkit-overflow-scrolling: touch;
  }

  .suggestion-grid button {
    flex: 0 0 auto;
    max-width: 74vw;
    min-height: 30px;
    max-height: 32px;
    padding: 0 11px;
    font-size: var(--mobile-fs-sm);
    line-height: 30px;
    white-space: nowrap;
  }

  .chat-scroll {
    margin-top: 6px;
    min-height: 320px;
    scroll-padding-bottom: calc(max(116px, 7.5em) + env(safe-area-inset-bottom));
    padding-bottom: calc(max(116px, 7.5em) + env(safe-area-inset-bottom));
  }

  .message,
  .message.user {
    gap: 7px;
  }

  .avatar {
    width: 32px;
    height: 32px;
    border-radius: 11px;
  }

  .avatar.user-avatar svg {
    width: 20px;
    height: 20px;
  }

  .bubble {
    padding: 10px 12px;
    font-size: var(--mobile-fs-md);
    line-height: 1.6;
  }

  .composer {
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: min(calc(100vw - 20px), 640px);
    width: min(calc(100dvw - 20px), 640px);
    max-width: calc(100vw - 20px);
    max-width: calc(100dvw - 20px);
    padding: 8px;
    border-radius: 20px;
  }

  .composer-form {
    grid-template-columns: minmax(0, 1fr) 42px;
    padding: 4px;
  }

  .composer input {
    min-height: 42px;
  }

  .send-button {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .composer-note {
    padding: 4px 6px 0;
    font-size: var(--mobile-fs-xs);
  }
}

@media (max-width: 820px) {
  .finance-shell {
    width: min(calc(100vw - 24px), 640px);
    padding: 18px 0 36px;
  }

  .finance-hero {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .procurement-auth {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .procurement-login-actions {
    grid-template-columns: 1fr;
  }

  .finance-hero > div:first-child,
  .finance-rule-card {
    border-radius: 15px;
    padding: 16px;
  }

  .finance-hero h1 {
    font-size: calc(1.75rem + var(--rem-font-bump));
  }

  .finance-overview,
  .finance-record-list {
    grid-template-columns: 1fr;
  }

  .finance-form {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  .finance-stat {
    min-height: 72px;
  }

  .finance-record-head {
    display: grid;
  }
}

/* Executive demo polish: motion, focus, and streaming clarity */
html {
  scroll-behavior: smooth;
}

.hero,
.suggestions,
.chat-scroll,
.composer,
.voice-panel,
.diagnosis-form,
.capability-grid,
.login-card,
.finance-card {
  transition:
    transform .22s ease,
    box-shadow .22s ease,
    border-color .22s ease,
    background-color .22s ease,
    opacity .22s ease;
}

.hero {
  animation: waterAiSurfaceIn .38s ease both;
}

.suggestions,
.chat-scroll {
  animation: waterAiSurfaceIn .42s ease both;
}

.composer {
  animation: waterAiComposerIn .34s ease both;
  box-shadow:
    0 18px 54px rgba(31, 83, 136, .13),
    0 1px 0 rgba(255,255,255,.9) inset;
}

.message {
  animation: waterAiMessageIn .22s ease both;
}

.bubble {
  transition:
    transform .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    background-color .18s ease;
}

.message.assistant .bubble:hover,
.message.user .bubble:hover {
  transform: translateY(-1px);
  border-color: rgba(33, 107, 217, .28);
  box-shadow: 0 18px 42px rgba(26, 84, 140, .10);
}

.bubble.is-streaming {
  position: relative;
  border-color: rgba(33, 107, 217, .32);
  background:
    linear-gradient(90deg, rgba(255,255,255,.98), rgba(246,251,255,.98), rgba(255,255,255,.98));
  background-size: 220% 100%;
  animation: waterAiStreamingSurface 1.35s ease-in-out infinite;
}

.bubble.is-streaming::after {
  content: "";
  display: inline-block;
  width: .48em;
  height: 1.05em;
  margin-left: .14em;
  vertical-align: -.12em;
  border-right: 2px solid rgba(33, 107, 217, .78);
  animation: waterAiCaret .8s steps(2, end) infinite;
}

.hero-mode,
.tab,
.feature-nav-item,
.suggestion-grid button,
.voice-launch,
.primary-button,
.secondary-button,
.ghost-button,
.mini-button,
.send-button,
.composer-note button,
.voice-close,
.voice-stop,
.voice-start,
.cap-card {
  transition:
    transform .16s ease,
    box-shadow .16s ease,
    border-color .16s ease,
    background-color .16s ease,
    color .16s ease,
    opacity .16s ease;
}

.hero-mode:hover,
.suggestion-grid button:hover,
.voice-launch:hover,
.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.mini-button:hover,
.send-button:hover,
.composer-note button:hover,
.voice-close:hover,
.voice-stop:hover,
.voice-start:hover,
.cap-card:hover {
  transform: translateY(-1px);
}

.send-button:hover,
.voice-launch:hover,
.primary-button:hover {
  box-shadow: 0 18px 38px rgba(33, 107, 217, .24);
}

.hero-mode:active,
.suggestion-grid button:active,
.voice-launch:active,
.primary-button:active,
.secondary-button:active,
.ghost-button:active,
.mini-button:active,
.send-button:active,
.composer-note button:active,
.voice-close:active,
.voice-stop:active,
.voice-start:active,
.cap-card:active {
  transform: translateY(0) scale(.985);
}

.composer:focus-within {
  border-color: rgba(33, 107, 217, .42);
  box-shadow:
    0 22px 62px rgba(31, 83, 136, .16),
    0 0 0 4px rgba(33, 107, 217, .08);
}

.composer input:focus {
  outline: none;
}

.send-button:disabled {
  transform: none;
  box-shadow: none;
}

.voice-panel:not([hidden]) {
  animation: waterAiVoiceIn .22s ease both;
}

.voice-live {
  scroll-behavior: smooth;
}

.chat-scroll,
.panel,
.history-list,
.device-list {
  scroll-behavior: smooth;
}

@keyframes waterAiSurfaceIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes waterAiComposerIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 820px) {
  .composer {
    animation-name: waterAiComposerInFixed;
  }
}

@keyframes waterAiComposerInFixed {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes waterAiMessageIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes waterAiVoiceIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes waterAiStreamingSurface {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes waterAiCaret {
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

/* Procurement login v3 shell: keep current HTML/JS, restore the missing visual layer. */
body.finance-page.procurement-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #f7fbfd 0%, #eef5f7 46%, #f8fafc 100%);
  color: var(--text);
}

.procurement-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: clamp(24px, 4vw, 46px) 0 56px;
}

.procurement-login[hidden],
.procurement-workbench[hidden],
body.procurement-authenticated .procurement-login {
  display: none !important;
}

.procurement-login {
  min-height: calc(100vh - 96px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 430px);
  gap: clamp(18px, 3vw, 34px);
  align-items: center;
}

.procurement-login-panel,
.procurement-login-card,
.procurement-workbench {
  border: 1px solid rgba(184, 207, 222, .82);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 48px rgba(40, 84, 116, .1);
}

.procurement-login-panel {
  min-height: 460px;
  border-radius: 18px;
  padding: clamp(24px, 4vw, 42px);
  display: grid;
  align-content: space-between;
  gap: 32px;
  overflow: hidden;
}

.procurement-login-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #28536f;
  font-weight: 940;
}

.procurement-login-brand strong {
  font-size: clamp(18px, 2vw, 24px);
}

.procurement-login-brand span,
.procurement-login-copy > span,
.procurement-login-card-head > span,
.procurement-section-title span,
.procurement-topbar span {
  color: #2d7a74;
  font-size: calc(13px + var(--font-bump));
  font-weight: 900;
}

.procurement-login-copy {
  display: grid;
  gap: 14px;
  max-width: 700px;
}

.procurement-login-copy h1,
.procurement-topbar h1 {
  margin: 0;
  color: #17385b;
  line-height: 1.12;
  letter-spacing: 0;
}

.procurement-login-copy h1 {
  font-size: clamp(36px, 5vw, 58px);
}

.procurement-login-copy p,
.procurement-login-card-head p,
.procurement-login-status,
.procurement-empty,
.procurement-evidence-status {
  margin: 0;
  color: #5f7284;
  line-height: 1.68;
  font-weight: 720;
}

.procurement-login-copy p {
  max-width: 55rem;
  font-size: calc(17px + var(--font-bump));
}

.procurement-login-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.procurement-login-checks span {
  min-height: 72px;
  border: 1px solid rgba(184, 207, 222, .86);
  border-radius: 14px;
  background: #f8fbfc;
  padding: 14px;
  color: #284b63;
  font-weight: 900;
  display: grid;
  align-content: center;
  gap: 4px;
}

.procurement-login-checks b {
  color: #2d7a74;
  font-size: calc(12px + var(--font-bump));
}

.procurement-login-card {
  border-radius: 18px;
  padding: clamp(22px, 3vw, 30px);
  display: grid;
  gap: 16px;
}

.procurement-login-card-head {
  display: grid;
  gap: 8px;
}

.procurement-login-card h2 {
  margin: 0;
  color: #17385b;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: 0;
}

.procurement-login label,
.procurement-form label {
  display: grid;
  gap: 7px;
  color: #193d58;
  font-size: calc(14px + var(--font-bump));
  font-weight: 900;
}

.procurement-login input,
.procurement-form input,
.procurement-form select,
.procurement-form textarea {
  width: 100%;
  border: 1px solid rgba(184, 207, 222, .92);
  border-radius: 12px;
  background: #fff;
  color: #163247;
  outline: none;
  box-sizing: border-box;
}

.procurement-login input,
.procurement-form input,
.procurement-form select {
  min-height: 46px;
  padding: 0 14px;
}

.procurement-form textarea {
  min-height: 120px;
  resize: vertical;
  padding: 12px 14px;
}

.procurement-login .primary-button,
.procurement-form .primary-button {
  justify-self: start;
  min-width: 128px;
  border-radius: 999px;
  background: linear-gradient(135deg, #207a8a, #2f8d73);
  box-shadow: 0 14px 26px rgba(32, 122, 138, .18);
}

.procurement-workbench {
  border-radius: 18px;
  padding: clamp(18px, 3vw, 26px);
  display: grid;
  gap: 18px;
}

.procurement-topbar,
.procurement-userbar,
.procurement-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.procurement-topbar h1 {
  font-size: clamp(28px, 3vw, 38px);
}

.procurement-userbar {
  border: 1px solid rgba(184, 207, 222, .8);
  border-radius: 14px;
  background: #f8fbfc;
  padding: 10px 12px;
}

.procurement-userbar strong {
  color: #17385b;
}

.procurement-userbar button,
.procurement-ghost {
  border: 1px solid rgba(184, 207, 222, .9);
  border-radius: 999px;
  background: #fff;
  color: #17385b;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 900;
  cursor: pointer;
}

.procurement-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.procurement-layout {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.procurement-form,
.procurement-result-panel {
  border: 1px solid rgba(184, 207, 222, .82);
  border-radius: 16px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 12px 32px rgba(40, 84, 116, .06);
}

.procurement-form {
  display: grid;
  gap: 14px;
}

.procurement-section-title {
  display: grid;
  gap: 4px;
}

.procurement-section-title strong {
  color: #17385b;
  font-size: calc(20px + var(--font-bump));
}

.procurement-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.procurement-form .full {
  grid-column: 1 / -1;
}

.procurement-result-panel {
  min-height: 420px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.procurement-empty {
  border: 1px dashed rgba(184, 207, 222, .92);
  border-radius: 14px;
  background: #f8fbfc;
  padding: 18px;
}

@media (max-width: 920px) {
  .procurement-shell {
    width: min(680px, calc(100vw - 24px));
    padding: 18px 0 38px;
  }

  .procurement-login,
  .procurement-layout,
  .procurement-overview {
    grid-template-columns: 1fr;
  }

  .procurement-login-panel {
    min-height: auto;
  }

  .procurement-login-copy h1 {
    font-size: clamp(30px, 9vw, 42px);
  }

  .procurement-login-checks,
  .procurement-two {
    grid-template-columns: 1fr;
  }

  .procurement-topbar,
  .procurement-userbar,
  .procurement-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .procurement-userbar,
  .procurement-userbar button,
  .procurement-form .primary-button,
  .procurement-ghost {
    width: 100%;
  }
}

/* Final mobile homepage comfort polish */
@media (max-width: 820px) {
  body:not(.finance-page) .app-shell {
    background:
      radial-gradient(circle at 50% 16%, rgba(97, 184, 255, .20), transparent 16rem),
      linear-gradient(180deg, #fbfdff 0%, #eef7ff 58%, #eaf4fb 100%);
  }

  body:not(.finance-page) .main {
    position: relative;
    padding: 0 12px calc(max(166px, 10.5em) + env(safe-area-inset-bottom));
  }

  body:not(.finance-page) .topbar {
    min-height: 48px;
    height: 48px;
    margin: 0 -12px 0;
    padding: 0 14px;
    background: rgba(250, 253, 255, .96);
    box-shadow: 0 10px 24px rgba(24, 68, 116, .06);
  }

  body:not(.finance-page) .mobile-menu {
    width: 40px;
    height: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 24px rgba(21, 80, 139, .08);
  }

  body:not(.finance-page) .topbar-title {
    letter-spacing: 0;
  }

  body:not(.finance-page) .hero {
    max-width: 640px;
    margin: 0 auto;
    padding: 8px 0 8px;
    border: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
  }

  body:not(.finance-page) .hero-copy {
    display: grid;
    justify-items: center;
    gap: 6px;
  }

  body:not(.finance-page) .hero-title-row {
    gap: 6px;
  }

  body:not(.finance-page) .hero h1 {
    font-size: clamp(1.9rem, 8.8vw, 2.35rem);
    line-height: 1.04;
  }

  body:not(.finance-page) .hero-chip {
    min-height: 24px;
    padding: 3px 9px;
    border-color: rgba(157, 203, 246, .84);
    background: rgba(236, 247, 255, .92);
  }

  body:not(.finance-page) .main-prompt {
    margin: 6px auto 4px;
    max-width: 12em;
    font-size: clamp(1.4rem, 6.6vw, 1.82rem);
    line-height: 1.18;
  }

  body:not(.finance-page) .hero-body {
    max-width: 29rem;
    margin: 0 auto;
    color: #46657f;
    font-size: var(--mobile-fs-sm);
    line-height: 1.48;
    font-weight: 760;
  }

  body:not(.finance-page) .hero-mode-strip {
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 0;
  }

  body:not(.finance-page) .hero-mode {
    min-height: 35px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 10px 26px rgba(31, 87, 148, .08);
  }

  body:not(.finance-page) .hero-mode.active {
    background: #0b3761;
    box-shadow: 0 14px 28px rgba(11, 55, 97, .18);
  }

  body:not(.finance-page) #panel-chat .panel-head {
    min-height: 32px;
    margin: 2px auto 4px;
    justify-content: flex-end;
    width: min(100%, 640px);
  }

  body:not(.finance-page) #panel-chat .panel-head h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  body:not(.finance-page) .voice-launch {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid rgba(155, 198, 238, .72);
    background: rgba(255, 255, 255, .96);
    color: var(--blue-deep);
    box-shadow: 0 10px 24px rgba(31, 87, 148, .08);
  }

  body:not(.finance-page) .suggestions {
    width: min(100%, 640px);
    margin: 4px auto 0;
    padding: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .76);
    box-shadow: 0 16px 34px rgba(31, 87, 148, .08);
  }

  body:not(.finance-page) .suggestion-head {
    display: none;
  }

  body:not(.finance-page) .suggestion-grid {
    gap: 8px;
    padding: 0;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  body:not(.finance-page) .suggestion-grid::-webkit-scrollbar {
    display: none;
  }

  body:not(.finance-page) .suggestion-grid button {
    min-height: 34px;
    max-height: 36px;
    max-width: 72vw;
    padding: 0 13px;
    border-radius: 999px;
    line-height: 34px;
    background: rgba(255, 255, 255, .96);
    box-shadow: none;
  }

  body:not(.finance-page) .chat-scroll {
    width: min(100%, 640px);
    min-height: max(286px, calc(100vh - 386px));
    min-height: max(286px, calc(100svh - 386px));
    margin: 10px auto 0;
    gap: 10px;
    scroll-padding-bottom: calc(max(166px, 10.5em) + env(safe-area-inset-bottom));
    padding-bottom: calc(max(166px, 10.5em) + env(safe-area-inset-bottom));
  }

  body:not(.finance-page) .message,
  body:not(.finance-page) .message.user {
    gap: 8px;
  }

  body:not(.finance-page) .avatar {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  body:not(.finance-page) .bubble {
    border-radius: 18px;
    padding: 12px 14px;
    box-shadow: 0 16px 34px rgba(26, 84, 140, .08);
  }

  body:not(.finance-page) .message.assistant .bubble {
    max-width: min(76vw, 520px);
  }

  body:not(.finance-page) .composer {
    bottom: calc(48px + env(safe-area-inset-bottom));
    width: min(calc(100dvw - 24px), 620px);
    max-width: calc(100dvw - 24px);
    padding: 8px;
    border-color: rgba(176, 209, 241, .92);
    border-radius: 24px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(18px);
    box-shadow:
      0 18px 48px rgba(31, 83, 136, .16),
      0 1px 0 rgba(255, 255, 255, .96) inset;
    z-index: 50;
  }

  body:not(.finance-page) .composer-form {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
    padding: 5px;
    border-radius: 18px;
    background: #f6faff;
  }

  body:not(.finance-page) .composer input {
    min-height: 44px;
    padding: 0 13px;
  }

  body:not(.finance-page) .send-button {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2183e8, #10a7cf);
  }

  body:not(.finance-page) .composer-note {
    padding: 5px 7px 0;
    gap: 8px;
  }

  body:not(.finance-page) .main > .site-icp-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    z-index: 35;
    gap: 2px 8px;
    min-height: 28px;
    padding: 4px max(10px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    font-size: calc(10.5px + var(--font-bump));
    line-height: 1.24;
  }

  body:not(.finance-page) .voice-panel {
    inset: 56px 12px calc(48px + env(safe-area-inset-bottom)) 12px;
    z-index: 80;
  }
}

@media (max-width: 380px) {
  body:not(.finance-page) .main-prompt {
    max-width: 11.5em;
    font-size: calc(1.3rem + var(--rem-font-bump));
  }

  body:not(.finance-page) .hero-body {
    font-size: var(--mobile-fs-xs);
  }

  body:not(.finance-page) .composer {
    width: min(calc(100dvw - 18px), 620px);
    max-width: calc(100dvw - 18px);
  }
}

/* Mobile drawer final-state guard */
@media (max-width: 820px) {
  .sidebar {
    transition: none !important;
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0) !important;
    transition: none;
  }
}

/* Product release mobile layout: keep the first screen calm and prevent the ICP footer from fighting the composer. */
@media (max-width: 820px) {
  body:not(.finance-page) {
    --mobile-icp-height: 28px;
    --mobile-composer-height: 92px;
    --mobile-composer-clearance: calc(var(--mobile-icp-height) + var(--mobile-composer-height) + 8px + env(safe-area-inset-bottom));
    overflow: hidden;
  }

  body:not(.finance-page) .app-shell {
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
  }

  body:not(.finance-page) .main {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    grid-template-rows: 48px auto minmax(0, 1fr) auto auto;
    gap: 0;
    overflow: hidden;
    padding: 0 12px calc(136px + env(safe-area-inset-bottom));
  }

  body:not(.finance-page) .topbar {
    position: relative;
    z-index: 4;
  }

  body:not(.finance-page) .hero {
    align-self: start;
    padding: 5px 0 5px;
    overflow: visible;
  }

  body:not(.finance-page) .hero-copy {
    gap: 4px;
  }

  body:not(.finance-page) .hero-title-row {
    justify-content: center;
    align-items: center;
    gap: 7px;
    min-height: 35px;
  }

  body:not(.finance-page) .hero h1 {
    font-size: clamp(1.72rem, 7.4vw, 2.12rem);
    line-height: 1.08;
  }

  body:not(.finance-page) .hero-chip {
    max-width: 12em;
    min-height: 23px;
    padding: 2px 8px;
    white-space: nowrap;
  }

  body:not(.finance-page) .hero-brand-strip {
    display: none;
  }

  body:not(.finance-page) .main-prompt {
    margin: 1px auto 2px;
    max-width: 13.6em;
    font-size: clamp(1.26rem, 5.4vw, 1.62rem);
    line-height: 1.18;
  }

  body:not(.finance-page) .hero-body {
    max-width: 31em;
    line-height: 1.42;
  }

  body:not(.finance-page) .hero-mode-strip {
    margin-top: 6px;
  }

  body:not(.finance-page) #panel-chat.active {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    min-height: 0;
  }

  body:not(.finance-page) #panel-chat .panel-head {
    min-height: 28px;
    margin: 0 auto 2px;
  }

  body:not(.finance-page) .suggestions {
    display: none;
    margin-top: 2px;
    border-radius: 999px;
  }

  body:not(.finance-page) .chat-scroll {
    min-height: 0;
    height: auto;
    margin-top: 7px;
    overflow-y: auto;
    padding-bottom: calc(146px + env(safe-area-inset-bottom));
    scroll-padding-bottom: calc(146px + env(safe-area-inset-bottom));
  }

  body:not(.finance-page) .composer {
    bottom: calc(var(--mobile-icp-height) + env(safe-area-inset-bottom));
    transform: translateX(-50%);
  }

  body:not(.finance-page) .voice-panel {
    top: 56px;
    right: 12px;
    bottom: var(--mobile-composer-clearance);
    left: 12px;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
  }

  body:not(.finance-page) .voice-body {
    min-height: 0;
    overflow: hidden;
  }

  body:not(.finance-page) .voice-live {
    max-height: min(28vh, 11.5em);
    max-height: min(28svh, 11.5em);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body:not(.finance-page) .voice-panel[hidden] {
    display: none;
  }

  body:not(.finance-page) .main > .site-icp-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    min-height: var(--mobile-icp-height);
    padding-top: 3px;
    padding-bottom: calc(3px + env(safe-area-inset-bottom));
    line-height: 1.12;
    white-space: nowrap;
    flex-wrap: nowrap;
    gap: 2px 5px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body:not(.finance-page) .main > .site-icp-footer::-webkit-scrollbar {
    display: none;
  }

  body:not(.finance-page) .main > .site-icp-footer span {
    display: none;
  }

  body:not(.finance-page) .main > .site-icp-footer a {
    font-size: clamp(11px, calc(11px + var(--font-bump)), 12px);
  }
}

@media (max-width: 820px) and (max-height: 720px) {
  body:not(.finance-page) .hero-body {
    display: none;
  }

  body:not(.finance-page) .public-workbench {
    display: none;
  }

  body:not(.finance-page) .main-prompt {
    max-width: 14em;
    font-size: clamp(1.18rem, 5vw, 1.48rem);
  }

  body:not(.finance-page) .hero-mode-strip {
    margin-top: 5px;
  }

  body:not(.finance-page) .suggestions {
    display: none;
  }
}

/* Product workbench homepage additions: public WaterAI stays non-device, WaterAgent owns device data. */
.public-workbench {
  width: 100%;
  max-width: 920px;
  margin: 12px 0 10px;
}

.public-workbench-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.public-workbench-card {
  min-height: 82px;
  border: 1px solid rgba(196, 221, 245, .95);
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 12px 30px rgba(35, 91, 150, .08);
  color: var(--ink);
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  display: grid;
  align-content: start;
  gap: 3px;
}

.public-workbench-card span {
  color: #1f7ac8;
  font-size: calc(12px + var(--font-bump));
  line-height: 1.2;
  font-weight: 900;
}

.public-workbench-card strong {
  color: var(--ink);
  font-size: calc(15px + var(--font-bump));
  line-height: 1.22;
  font-weight: 950;
}

.public-workbench-card small {
  color: var(--muted);
  font-size: calc(12px + var(--font-bump));
  line-height: 1.32;
  font-weight: 760;
}

.public-workbench-card.locked {
  background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(238, 248, 255, .88));
}

@media (max-width: 1180px) {
  .public-workbench-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  body:not(.finance-page) .public-workbench {
    max-width: 100%;
    margin: 8px 0 6px;
    overflow: hidden;
  }

  body:not(.finance-page) .public-workbench-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    overflow: visible;
    padding: 0 2px 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  body:not(.finance-page) .public-workbench-grid::-webkit-scrollbar {
    display: none;
  }

  body:not(.finance-page) .public-workbench-card {
    flex: 0 1 auto;
    min-height: 38px;
    max-width: 100%;
    border-radius: 999px;
    padding: 7px 12px;
    align-content: center;
  }

  body:not(.finance-page) .public-workbench-card span,
  body:not(.finance-page) .public-workbench-card small {
    display: none;
  }

  body:not(.finance-page) .public-workbench-card strong {
    max-width: min(82vw, 16em);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: calc(13px + var(--font-bump));
    line-height: 1.2;
  }
}

@media (max-width: 420px) {
  body:not(.finance-page) .hero {
    padding-top: 3px;
    padding-bottom: 3px;
  }

  body:not(.finance-page) .hero-title-row {
    min-height: 30px;
  }

  body:not(.finance-page) .hero h1 {
    font-size: clamp(1.54rem, 6.4vw, 1.9rem);
  }

  body:not(.finance-page) .main-prompt {
    font-size: clamp(1.16rem, 4.9vw, 1.42rem);
  }

  body:not(.finance-page) .hero-body {
    display: none;
  }

  body:not(.finance-page) .public-workbench {
    margin: 5px 0 4px;
  }

  body:not(.finance-page) .public-workbench-card {
    min-height: 36px;
    padding: 7px 11px;
  }
}

/* Public chat composer and ICP clearance guard */
body:not(.finance-page) #panel-chat.active .chat-scroll {
  padding-bottom: calc(max(220px, 13rem) + env(safe-area-inset-bottom));
  scroll-padding-bottom: calc(max(220px, 13rem) + env(safe-area-inset-bottom));
}

@media (max-width: 820px) {
  body:not(.finance-page) #panel-chat.active .chat-scroll {
    padding-bottom: calc(max(152px, 9.5rem) + env(safe-area-inset-bottom));
    scroll-padding-bottom: calc(max(152px, 9.5rem) + env(safe-area-inset-bottom));
  }

  body:not(.finance-page) .main {
    padding-bottom: calc(max(130px, 8.2rem) + env(safe-area-inset-bottom));
  }
}

/* Desktop conversation-first layout: keep product signals, but give the first screen back to chat. */
@media (min-width: 821px) {
  body:not(.finance-page) .main {
    grid-template-rows: 24px auto minmax(0, 1fr) auto auto;
    gap: 4px;
    padding-top: 10px;
  }

  body:not(.finance-page) .topbar {
    height: 24px;
    min-height: 24px;
  }

  body:not(.finance-page) .hero {
    min-height: 0;
    padding: 0;
  }

  body:not(.finance-page) .hero-copy {
    display: grid;
    justify-items: center;
    width: min(900px, 100%);
    gap: 4px;
  }

  body:not(.finance-page) .hero-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 32px;
    gap: 10px;
  }

  body:not(.finance-page) .hero h1 {
    width: auto;
    font-size: calc(28px + var(--display-font-bump));
    line-height: 1;
  }

  body:not(.finance-page) .hero-chip {
    min-height: 24px;
    padding: 3px 10px;
    white-space: nowrap;
    line-height: 1.2;
  }

  body:not(.finance-page) .main-prompt {
    margin: 6px auto 2px;
    font-size: calc(26px + var(--display-font-bump));
    line-height: 1.12;
  }

  body:not(.finance-page) .hero-body {
    max-width: 860px;
    font-size: calc(12px + var(--font-bump));
    line-height: 1.35;
  }

  body:not(.finance-page) .public-workbench {
    max-width: 840px;
    margin: 7px 0 4px;
  }

  body:not(.finance-page) .public-workbench-grid {
    gap: 7px;
  }

  body:not(.finance-page) .public-workbench-card {
    min-height: 50px;
    padding: 7px 11px;
    border-radius: 12px;
    align-content: center;
    gap: 1px;
  }

  body:not(.finance-page) .public-workbench-card span {
    font-size: calc(11px + var(--font-bump));
    line-height: 1.1;
  }

  body:not(.finance-page) .public-workbench-card strong {
    font-size: calc(14px + var(--font-bump));
    line-height: 1.15;
  }

  body:not(.finance-page) .public-workbench-card small {
    display: none;
  }

  body:not(.finance-page) .hero-mode-strip {
    margin-top: 5px;
    gap: 6px;
  }

  body:not(.finance-page) .hero-mode {
    min-height: 28px;
    padding: 0 12px;
  }

  body:not(.finance-page) #panel-chat .panel-head {
    min-height: 28px;
    margin-bottom: 0;
  }

  body:not(.finance-page) .voice-launch {
    min-height: 28px;
    padding: 0 13px;
  }

  body:not(.finance-page) .suggestions {
    margin-top: 0;
  }

  body:not(.finance-page) .suggestion-grid button {
    min-height: 28px;
    max-height: 30px;
    line-height: 28px;
  }

  body:not(.finance-page) .chat-scroll {
    margin-top: 6px;
    min-height: clamp(380px, calc(100vh - 324px), 640px);
    min-height: clamp(380px, calc(100svh - 324px), 640px);
  }
}

@media (min-width: 821px) and (max-height: 820px) {
  body:not(.finance-page) .hero h1 {
    font-size: calc(26px + var(--display-font-bump));
  }

  body:not(.finance-page) .main-prompt {
    margin-top: 4px;
    font-size: calc(24px + var(--display-font-bump));
  }

  body:not(.finance-page) .hero-body {
    line-height: 1.25;
  }

  body:not(.finance-page) .public-workbench {
    margin: 5px 0 3px;
  }

  body:not(.finance-page) .public-workbench-card {
    min-height: 44px;
    padding: 6px 10px;
  }

  body:not(.finance-page) .hero-mode-strip {
    margin-top: 4px;
  }
}
/* Calm public conversation hierarchy — keep one obvious voice action. */
body:not(.finance-page) #panel-chat > .panel-head,
body:not(.finance-page) .public-workbench-card:not(.locked) {
  display: none;
}

body:not(.finance-page) .public-workbench-grid {
  display: flex;
  justify-content: center;
}

body:not(.finance-page) #composerVoice {
  min-height: 44px;
}

body:not(.finance-page) .voice-panel {
  background: #f4f9ff;
}

@media (min-width: 821px) {
  body:not(.finance-page) .hero-mode-strip {
    display: none;
  }

  body:not(.finance-page) .suggestion-grid button:nth-child(n + 4) {
    display: none;
  }
}

@media (max-width: 820px) {
  body:not(.finance-page) .hero-chip {
    max-width: 100%;
    white-space: normal;
  }

  body:not(.finance-page) .hero-mode-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
    overflow: visible;
  }

  body:not(.finance-page) .hero-mode {
    min-width: 0;
    padding: 7px 4px;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    font-size: .75rem;
    border-radius: 18px;
  }

  body:not(.finance-page) .public-workbench-card.locked strong {
    max-width: 100%;
    white-space: normal;
  }

  body:not(.finance-page) #panel-chat.active {
    grid-template-rows: minmax(0, 1fr);
  }

  /* The main grid already reserves composer/footer space below this scroller. */
  body:not(.finance-page) #panel-chat.active .chat-scroll {
    padding-bottom: 12px;
    scroll-padding-bottom: 12px;
  }

  body:not(.finance-page) .voice-actions {
    grid-template-columns: minmax(0, 1fr) minmax(72px, auto);
    gap: 8px;
  }

  body:not(.finance-page) .voice-start {
    padding-inline: 8px;
  }
}

@media (max-width: 820px) and (max-height: 720px) {
  body:not(.finance-page) .public-workbench {
    display: block;
  }

  body:not(.finance-page) .topbar-title {
    font-size: 14px;
    white-space: nowrap;
  }

  body:not(.finance-page) .topbar-status {
    white-space: nowrap;
    font-size: .75rem;
  }

  body:not(.finance-page) .voice-panel {
    bottom: calc(var(--mobile-icp-height) + 8px + env(safe-area-inset-bottom));
  }

  body:not(.finance-page) .voice-orb {
    width: 48px;
    height: 48px;
  }

  body:not(.finance-page) .voice-body {
    gap: 8px;
  }

  body:not(.finance-page) .voice-live {
    min-height: 0;
    padding: 10px 12px;
  }
}

@media (max-width: 820px) and (max-height: 600px) {
  body:not(.finance-page) .main-prompt,
  body:not(.finance-page) .voice-orb {
    display: none;
  }
}

/* Public chat owns the remaining grid row; composer and legal rows reserve
   their actual height, including wrapped labels and safe-area padding. */
body:not(.finance-page) .main {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
}

body:not(.finance-page) #panel-chat.active {
  min-height: 0;
}

body:not(.finance-page) #panel-chat.active .chat-scroll {
  min-height: 0;
  flex: 1 1 0;
  padding-bottom: 12px;
  scroll-padding-bottom: 12px;
}

body:not(.finance-page) .composer {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  transform: none;
  animation-name: waterAiComposerIn;
  width: min(760px, 100%);
  max-width: 100%;
  margin: 0;
}

body:not(.finance-page) .main > .site-icp-footer {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  margin: 0;
}

@media (max-width: 820px) {
  body:not(.finance-page) .main {
    padding-bottom: 0;
  }

  body:not(.finance-page) .main > .site-icp-footer {
    width: calc(100% + 24px);
    justify-self: center;
  }
}

/* Measured short landscape failures also occur at 844px and 915px wide.
   Keep the existing drawer breakpoint; compact decoration at short height. */
@media (max-height: 450px) {
  body:not(.finance-page) .hero {
    min-height: 0;
    padding: 0;
  }

  body:not(.finance-page) .hero-copy {
    gap: 2px;
  }

  body:not(.finance-page) .hero-title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }

  body:not(.finance-page) .hero h1 {
    width: auto;
  }

  body:not(.finance-page) .main-prompt,
  body:not(.finance-page) .hero-body,
  body:not(.finance-page) .hero-mode-strip,
  body:not(.finance-page) .suggestions {
    display: none;
  }

  body:not(.finance-page) .public-workbench {
    margin: 3px 0;
  }

  body:not(.finance-page) .public-workbench-card.locked {
    min-height: 36px;
    padding: 4px 10px;
  }

  body:not(.finance-page) .public-workbench-card span,
  body:not(.finance-page) .public-workbench-card small,
  body:not(.finance-page) .composer-disclaimer,
  body:not(.finance-page) .main > .site-icp-footer span {
    display: none;
  }

  body:not(.finance-page) .app-shell[data-active-tab="chat"] .composer:not(.hidden) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 4px;
  }

  body:not(.finance-page) .composer-form {
    min-width: 0;
    padding: 2px;
  }

  body:not(.finance-page) .composer-note {
    padding: 0;
  }
}

/* Keep voice guidance in one scrollable region. Safe centering falls back to
   the content start when text is taller than the available body row. */
body:not(.finance-page) .voice-panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

body:not(.finance-page) .voice-body {
  min-width: 0;
  grid-auto-rows: max-content;
  align-content: safe center;
  overflow-x: hidden;
  overflow-y: auto;
}

body:not(.finance-page) .voice-live {
  max-height: none;
  overflow: visible;
}

body:not(.finance-page) .voice-close {
  min-height: 44px;
}

@media (max-height: 500px) {
  body:not(.finance-page) .voice-panel {
    top: 12px;
    bottom: calc(36px + env(safe-area-inset-bottom));
    padding: 12px;
    gap: 6px;
  }

  body:not(.finance-page) .voice-orb {
    display: none;
  }
}

/* Public navigation: reserve a reachable close row outside the content scroller. */
body:not(.finance-page) #sidebar {
  overflow: hidden;
}
body:not(.finance-page) #sidebar > .sidebar-controls {
  flex: 0 0 44px;
  min-height: 44px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
body:not(.finance-page) #sidebar .sidebar-controls > .sidebar-toggle {
  position: relative;
  inset: auto;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  flex: 0 0 44px;
}
body:not(.finance-page) #sidebar > .sidebar-content {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: inherit;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
body:not(.finance-page) #sidebar > .sidebar-content > * {
  flex-shrink: 0;
}
body:not(.finance-page) .mobile-menu {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}

/* Keep narrow public actions in one row without starving either full label or
   the Ready guidance above it. The existing font scale and minimum heights
   still govern both controls. */
@media (max-width: 380px) {
  body:not(.finance-page) .voice-actions {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    padding: 4px;
  }

  body:not(.finance-page) .voice-stop {
    padding-inline: 0;
    white-space: normal;
  }
}

/* Public mobile legal navigation retains its single-row scroll viewport. */
@media (max-width: 820px) {
  body:not(.finance-page) .main > .site-icp-footer {
    min-width: 0;
    max-width: 100vw;
    justify-content: flex-start;
  }
}

/* Keep narrow English legal links fully readable without horizontal hunting.
   The same reserved height keeps the voice controls clear of both rows. */
@media (max-width: 380px) {
  html[lang="en-US"] body:not(.finance-page) {
    --mobile-icp-height: 40px;
  }

  html[lang="en-US"] body:not(.finance-page) .main > .site-icp-footer {
    flex-wrap: wrap;
    justify-content: center;
    white-space: normal;
    overflow-x: visible;
  }

  html[lang="en-US"] body:not(.finance-page) .main > .site-icp-footer a {
    flex: 0 0 auto;
  }
}

/* A wrapped connection status must not widen the public mobile grid. */
@media (max-width: 820px) and (max-height: 720px) {
  body:not(.finance-page) .topbar-status {
    white-space: normal;
  }
}

/* Preserve the full product name while the connection status wraps. */
@media (max-width: 820px) {
  body:not(.finance-page) .topbar-title {
    white-space: nowrap;
  }
}

/* Hide voice-covered content without collapsing its layout space. */
.main > .voice-covered-content {
  visibility: hidden;
}

/* Narrow tall public screens need the readable title and status in separate rows. */
@media (max-width: 380px) and (min-height: 721px) {
  body:not(.finance-page) .main {
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  }

  body:not(.finance-page) .topbar {
    min-height: 64px;
    height: auto;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 8px;
    row-gap: 0;
    align-content: center;
    justify-content: initial;
  }

  body:not(.finance-page) .mobile-menu {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
  }

  body:not(.finance-page) .topbar-title {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    align-self: end;
  }

  body:not(.finance-page) .topbar-status {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    max-width: none;
    align-self: start;
  }
}

@media (max-width: 380px) {
  body:not(.finance-page) #voicePanel .voice-logo {
    display: none;
  }
}

@media (max-width: 380px) {
  body:not(.finance-page) #voicePanel .voice-brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  body:not(.finance-page) #voicePanel .voice-brand > div {
    min-width: 0;
  }

  body:not(.finance-page) #voicePanel .voice-brand h1,
  body:not(.finance-page) #voicePanel .voice-brand p {
    overflow-wrap: normal;
    word-break: normal;
  }

  body:not(.finance-page) #voicePanel .voice-close {
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
    white-space: nowrap;
  }
}

/* Feedback: non-chat mobile panels need their own bounded content scroller. */
@media (max-width: 820px) {
  body:not(.finance-page) .app-shell[data-active-tab="diagnosis"] .main,
  body:not(.finance-page) .app-shell[data-active-tab="capability"] .main {
    padding-bottom: calc(var(--mobile-icp-height) + env(safe-area-inset-bottom));
  }
  body:not(.finance-page) #panel-diagnosis.active,
  body:not(.finance-page) #panel-capability.active {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: 16px;
    -webkit-overflow-scrolling: touch;
  }
}

/* Voice uses the same readable conversation as typing, with a compact control
   dock in document flow. The transcript and answer never scroll inside it. */
body:not(.finance-page) .voice-mode .main {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}
body:not(.finance-page) .voice-mode .main > .hero,
body:not(.finance-page) .voice-mode .main > .tabs { display: none; }
body:not(.finance-page) .voice-mode .workspace { min-height: 0; }
body:not(.finance-page) .voice-mode .voice-panel:not([hidden]) {
  position: relative; inset: auto; transform: none;
  width: min(840px, 100%); max-width: 100%; height: auto; min-height: 0;
  margin: 0 auto; padding: 10px 14px; gap: 8px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto; border-radius: 20px;
  background: #f5f8fb; box-shadow: none; overflow: visible;
}
body:not(.finance-page) .voice-mode .voice-header { display: contents; }
body:not(.finance-page) .voice-mode .voice-brand,
body:not(.finance-page) .voice-mode .voice-orb,
body:not(.finance-page) .voice-mode .voice-live { display: none; }
body:not(.finance-page) .voice-mode .voice-body {
  grid-column: 1; grid-row: 1; min-height: 0; padding: 0;
  display: block; overflow: visible; text-align: left;
}
body:not(.finance-page) .voice-mode #voiceState {
  margin: 0; font-size: 1rem; line-height: 1.5; color: #233b50;
}
body:not(.finance-page) .voice-mode .voice-close {
  grid-column: 2; grid-row: 1; min-height: 44px; padding: 4px 8px;
  font-size: .875rem; align-self: center;
}
body:not(.finance-page) .voice-mode .voice-actions {
  grid-column: 1 / -1; grid-row: 2; display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px;
  padding: 0; width: 100%; margin: 0;
}
body:not(.finance-page) .voice-mode .voice-actions > button { min-height: 48px; font-size: 1rem; }
body:not(.finance-page) #panel-chat .bubble {
  font-size: 1.125rem; line-height: 1.85; overflow-wrap: anywhere;
}
body:not(.finance-page) .voice-mode #panel-chat .bubble { font-size: 1.1875rem; }
body:not(.finance-page) .voice-mode #panel-chat .message { max-width: 820px; margin-inline: auto; }
body:not(.finance-page) .voice-mode .voice-transcript { color: #315e76; border: 1px dashed #b5cedb; }
body:not(.finance-page) .voice-mode .voice-latest:not([hidden]) {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  padding: 10px 18px; min-height: 44px; white-space: nowrap;
  background: #fff; color: #194c70; border: 1px solid #cadce7; border-radius: 24px;
  box-shadow: 0 3px 14px #153f6020;
}
@media (max-height: 500px) {
  body:not(.finance-page) .voice-mode .voice-panel:not([hidden]) { padding: 4px 10px; gap: 2px; }
  body:not(.finance-page) .voice-mode .voice-actions > button { min-height: 44px; }
}
body:not(.finance-page) .voice-mode #chatScroll {
  scroll-behavior: auto;
  overflow-anchor: none;
}

/* UI polish: multiline composer and concise, visible voice help. */
body:not(.finance-page) #questionInput {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  max-height: 132px;
  padding: 10px 13px;
  border: 0;
  resize: none;
  overflow-y: auto;
  font: inherit;
  font-size: calc(16px + var(--font-bump));
  line-height: 1.45;
  background: transparent;
}

body:not(.finance-page) #questionInput:focus { outline: none; }

body:not(.finance-page) .send-button {
  width: auto;
  min-width: 64px;
  min-height: 44px;
  padding-inline: 10px;
  font-size: .875rem;
}

body:not(.finance-page) .composer-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

body:not(.finance-page) .voice-mode #voiceNote {
  margin: 4px 0 0;
  color: #557083;
  font-size: .875rem;
  line-height: 1.45;
}

body:not(.finance-page) .voice-mode .voice-live { display: none; }

body:not(.finance-page) .voice-mode .voice-start { min-height: 44px; }

/* Explicit answer playback stays readable across mobile voice layouts. */
body:not(.finance-page) .voice-mode .voice-actions > .voice-replay {
  grid-column: 1 / -1;
  grid-row: 2;
}

body:not(.finance-page) .voice-mode .voice-actions > .voice-replay:not(:disabled) {
  color: #0758b8;
}

/* Public WaterAI buttons: flat surfaces, readable labels and consistent targets. */
body:not(.finance-page) #app button:not(.sidebar-backdrop) {
  min-height: 44px;
  border-radius: 12px;
  box-shadow: none;
  text-shadow: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  -webkit-tap-highlight-color: transparent;
}

body:not(.finance-page) #app .hero-mode,
body:not(.finance-page) #app .tab,
body:not(.finance-page) #app .feature-nav-item,
body:not(.finance-page) #app .mini-button,
body:not(.finance-page) #app .ghost-button,
body:not(.finance-page) #app .secondary-button,
body:not(.finance-page) #app .history-item,
body:not(.finance-page) #app .history-delete,
body:not(.finance-page) #app .voice-launch,
body:not(.finance-page) #app .voice-close,
body:not(.finance-page) #app .icon-button,
body:not(.finance-page) #app .composer-note button,
body:not(.finance-page) #app .suggestion-grid button {
  padding: 10px 14px;
  border: 1px solid #d8e1eb;
  background: #fff;
  color: #33465b;
  transform: none;
}

body:not(.finance-page) #app button.primary-button,
body:not(.finance-page) #app button.send-button {
  min-height: 48px;
  padding: 11px 18px;
  border: 1px solid #0758b8;
  background: #0758b8;
  color: #fff;
  font-size: 16px;
  transform: none;
}

body:not(.finance-page) #app #composerVoice,
body:not(.finance-page) #app .voice-replay:not(:disabled) {
  border-color: #c5d7ed;
  background: #edf4ff;
  color: #0758b8;
}

body:not(.finance-page) #app .hero-mode.active,
body:not(.finance-page) #app .tab.active,
body:not(.finance-page) #app .feature-nav-item.active {
  border-color: #c5d7ed;
  background: #edf4ff;
  color: #0758b8;
}

body:not(.finance-page) #app .history-item.active {
  border-color: #c5d7ed;
  background: #edf4ff;
}

body:not(.finance-page) #app .history-row {
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
}

body:not(.finance-page) #app button.history-delete {
  min-width: 44px;
  padding: 8px;
  font-size: 20px;
}

body:not(.finance-page) #app .history-item-title {
  font-size: 14px;
  font-weight: 600;
}

body:not(.finance-page) #app .voice-latest {
  border: 1px solid #d8e1eb;
  background: #fff;
  color: #0758b8;
}

body:not(.finance-page) #app .hero-mode:not(:disabled):hover,
body:not(.finance-page) #app .tab:not(:disabled):hover,
body:not(.finance-page) #app .feature-nav-item:not(:disabled):hover,
body:not(.finance-page) #app .mini-button:not(:disabled):hover,
body:not(.finance-page) #app .ghost-button:not(:disabled):hover,
body:not(.finance-page) #app .secondary-button:not(:disabled):hover,
body:not(.finance-page) #app .history-item:not(:disabled):hover,
body:not(.finance-page) #app .history-delete:not(:disabled):hover,
body:not(.finance-page) #app .voice-launch:not(:disabled):hover,
body:not(.finance-page) #app .voice-close:not(:disabled):hover,
body:not(.finance-page) #app .icon-button:not(:disabled):hover,
body:not(.finance-page) #app .composer-note button:not(:disabled):hover,
body:not(.finance-page) #app .suggestion-grid button:not(:disabled):hover {
  border-color: #b8c9dd;
  background: #e7eef7;
}

body:not(.finance-page) #app button.primary-button:not(:disabled):hover,
body:not(.finance-page) #app button.send-button:not(:disabled):hover {
  border-color: #064b9d;
  background: #064b9d;
}

body:not(.finance-page) #app button:not(.sidebar-backdrop):focus-visible {
  outline: 3px solid #89b8f1;
  outline-offset: 2px;
}

body:not(.finance-page) #app button:not(.sidebar-backdrop):disabled {
  border-color: #e1e6ec;
  background: #eef1f5;
  color: #637184;
  opacity: 1;
  cursor: not-allowed;
}

body:not(.finance-page) #app .mobile-menu,
body:not(.finance-page) #app .sidebar-toggle,
body:not(.finance-page) #app .sidebar-restore {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 12px;
  border: 1px solid #d8e1eb;
  background: #fff;
}

/* Drawer controls retain a visible keyboard focus ring even in old WebViews.
   The script fallback only hides it after pointer input on those engines. */
body:not(.finance-page) #app #mobileMenu:focus,
body:not(.finance-page) #app #sidebarToggle:focus,
body:not(.finance-page) #app #sidebarRestore:focus {
  outline: 3px solid #0758b8;
  outline-offset: 2px;
}

html[data-navigation-input="pointer"] body:not(.finance-page) #app #mobileMenu:focus,
html[data-navigation-input="pointer"] body:not(.finance-page) #app #sidebarToggle:focus,
html[data-navigation-input="pointer"] body:not(.finance-page) #app #sidebarRestore:focus {
  outline: none;
}

@supports selector(:focus-visible) {
  body:not(.finance-page) #app #mobileMenu:focus:not(:focus-visible),
  body:not(.finance-page) #app #sidebarToggle:focus:not(:focus-visible),
  body:not(.finance-page) #app #sidebarRestore:focus:not(:focus-visible) {
    outline: none;
  }
}

body:not(.finance-page) #app #mobileMenu:active,
body:not(.finance-page) #app #sidebarToggle:active,
body:not(.finance-page) #app #sidebarRestore:active {
  border-color: #b8c9dd;
  background: #e7eef7;
}

body:not(.finance-page) #app .suggestion-grid button {
  max-height: none;
  white-space: normal;
}

body:not(.finance-page) #app .public-workbench-card,
body:not(.finance-page) #app .cap-card-button {
  border: 1px solid #d8e1eb;
  background: #f7f9fc;
  transform: none;
}

body:not(.finance-page) #app .voice-actions {
  gap: 10px;
}

body:not(.finance-page) #app .voice-actions > button {
  min-height: 48px;
  height: auto;
  min-width: 0;
  padding: 10px 12px;
  font-size: 16px;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

body:not(.finance-page) #app .composer-actions {
  gap: 8px;
}

body:not(.finance-page) #app .composer-note button {
  padding: 8px 12px;
}

body:not(.finance-page) #app button.send-button {
  min-width: 64px;
}

@media (max-width: 820px) {
  body:not(.finance-page) #app .hero-mode {
    padding: 8px 4px;
  }

  body:not(.finance-page) #app button.send-button {
    min-height: 44px;
    height: 44px;
    padding: 8px 12px;
  }
}

/* Immersive voice keeps the original message list and audio ownership intact. */
body:not(.finance-page) #app.voice-mode .main {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 120;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: env(safe-area-inset-top) 24px env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 56px auto minmax(0, 1fr) auto;
  grid-template-areas: "voice-header" "voice-status" "voice-transcript" "voice-controls";
  gap: 0;
  overflow: hidden;
  background: #fbfcff;
}

body:not(.finance-page) #app.voice-mode .sidebar,
body:not(.finance-page) #app.voice-mode .sidebar-backdrop,
body:not(.finance-page) #app.voice-mode .sidebar-restore,
body:not(.finance-page) #app.voice-mode .main > .topbar,
body:not(.finance-page) #app.voice-mode .main > .hero,
body:not(.finance-page) #app.voice-mode .main > .tabs,
body:not(.finance-page) #app.voice-mode .suggestions,
body:not(.finance-page) #app.voice-mode .voice-live {
  display: none;
}

body:not(.finance-page) #app.voice-mode .voice-panel:not([hidden]) {
  display: contents;
}

body:not(.finance-page) #app.voice-mode .voice-header {
  grid-area: voice-header;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(900px, 100%);
  margin: 0 auto;
  gap: 16px;
  padding: 0;
  border: 0;
}

body:not(.finance-page) #app.voice-mode .voice-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body:not(.finance-page) #app.voice-mode .voice-logo {
  display: block;
  width: 34px;
  height: 34px;
}

body:not(.finance-page) #app.voice-mode .voice-brand h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 650;
  color: #1c2d41;
}

body:not(.finance-page) #app.voice-mode .voice-brand p {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #647487;
}

body:not(.finance-page) #app.voice-mode .voice-close {
  flex: 0 0 auto;
  padding: 8px 12px;
  color: #344b65;
}

body:not(.finance-page) #app.voice-mode .voice-body {
  grid-area: voice-status;
  width: min(680px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 0;
  padding: 4px 0;
  margin: 0 auto;
  text-align: center;
  overflow: hidden;
}

body:not(.finance-page) #app.voice-mode #voiceOrb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
  width: 82px;
  height: 82px;
  margin: 0;
  border: 1px solid #d8e8fb;
  border-radius: 50%;
  background: #edf5ff;
  box-shadow: none;
  animation: none;
}

body:not(.finance-page) #app.voice-mode #voiceOrb::before,
body:not(.finance-page) #app.voice-mode #voiceOrb::after {
  display: none;
}

body:not(.finance-page) #app.voice-mode #voiceOrb span {
  width: 5px;
  height: 14px;
  border-radius: 5px;
  background: #2672cf;
  transform-origin: center;
}

body:not(.finance-page) #app.voice-mode #voiceOrb span:nth-child(2),
body:not(.finance-page) #app.voice-mode #voiceOrb span:nth-child(4) { height: 24px; }
body:not(.finance-page) #app.voice-mode #voiceOrb span:nth-child(3) { height: 34px; }
body:not(.finance-page) #app.voice-mode .voice-panel[data-voice-state="listening"] #voiceOrb span,
body:not(.finance-page) #app.voice-mode .voice-panel[data-voice-state="speaking"] #voiceOrb span {
  animation: voiceWave .95s ease-in-out infinite alternate;
}
body:not(.finance-page) #app.voice-mode #voiceOrb span:nth-child(2) { animation-delay: -.25s; }
body:not(.finance-page) #app.voice-mode #voiceOrb span:nth-child(3) { animation-delay: -.5s; }
body:not(.finance-page) #app.voice-mode #voiceOrb span:nth-child(4) { animation-delay: -.7s; }
body:not(.finance-page) #app.voice-mode .voice-panel[data-voice-state="thinking"] #voiceOrb,
body:not(.finance-page) #app.voice-mode .voice-panel[data-voice-state="opening"] #voiceOrb {
  animation: voiceWait 1.3s ease-in-out infinite alternate;
}

body:not(.finance-page) #app.voice-mode #voiceState {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
  margin: 0;
  color: #233b50;
}

body:not(.finance-page) #app.voice-mode #voiceNote {
  margin: 0;
  max-width: 36em;
  font-size: 14px;
  line-height: 1.45;
  color: #61748b;
}

body:not(.finance-page) #app.voice-mode .voice-caption-tools {
  grid-area: voice-tools;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

body:not(.finance-page) #app.voice-mode .voice-caption-tools button {
  position: static;
  inset: auto;
  transform: none;
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: #0758b8;
  font-size: 14px;
  white-space: nowrap;
}

body:not(.finance-page) #app.voice-mode .workspace {
  grid-area: voice-transcript;
  width: min(800px, 100%);
  min-height: 0;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}

body:not(.finance-page) #app.voice-mode #panel-chat.active {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

body:not(.finance-page) #app.voice-mode #chatScroll {
  width: 100%;
  min-height: 0;
  height: 100%;
  margin: 0;
  padding: 14px 4px 20px;
  gap: 18px;
  overflow-y: auto;
  scroll-padding-bottom: 20px;
}

body:not(.finance-page) #app.voice-mode #panel-chat .bubble {
  max-width: min(100%, 700px);
  font-size: 20px;
  line-height: 1.65;
  border: 0;
  box-shadow: none;
  background: #f0f4f9;
}

body:not(.finance-page) #app.voice-mode #panel-chat .message.assistant .bubble {
  background: #fff;
}

body:not(.finance-page) #app.voice-mode .voice-actions {
  grid-area: voice-controls;
  display: grid;
  grid-template-columns: minmax(0, 140px) minmax(0, 140px);
  justify-content: center;
  align-content: center;
  align-items: start;
  width: min(680px, 100%);
  margin: 0 auto;
  padding: 14px 0 8px;
  gap: 8px 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body:not(.finance-page) #app.voice-mode .voice-actions > button.voice-core-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  height: auto;
  min-height: 100px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #233b50;
  box-shadow: none;
  transform: none;
  font-size: 16px;
}

body:not(.finance-page) #app.voice-mode #voiceStart { grid-column: 1; grid-row: 1; }
body:not(.finance-page) #app.voice-mode #voiceStop { grid-column: 2; grid-row: 1; }

body:not(.finance-page) #app.voice-mode .voice-control-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #0758b8;
  color: #fff;
}

body:not(.finance-page) #app.voice-mode #voiceStop .voice-control-icon {
  background: #e9edf3;
  color: #293b50;
}

body:not(.finance-page) #app.voice-mode .voice-core-control:not(:disabled):hover .voice-control-icon { background: #064b9d; color: #fff; }
body:not(.finance-page) #app.voice-mode #voiceStop:not(:disabled):hover .voice-control-icon { background: #dce3ec; color: #293b50; }
body:not(.finance-page) #app.voice-mode .voice-core-control:disabled .voice-control-icon { background: #e9edf3; color: #708094; }
body:not(.finance-page) #app.voice-mode .voice-control-label { line-height: 1.4; font-weight: 600; }
body:not(.finance-page) #app.voice-mode .voice-control-icon svg { width: 26px; height: 26px; }
body:not(.finance-page) #app.voice-mode #voiceStart .voice-control-icon > * { display: none; }
body:not(.finance-page) #app.voice-mode #voiceStart .voice-mic-symbol { display: block; }
body:not(.finance-page) #app.voice-mode .voice-panel[data-voice-state="listening"] #voiceStart .voice-mic-symbol,
body:not(.finance-page) #app.voice-mode .voice-panel[data-voice-state="speaking"] #voiceStart .voice-mic-symbol,
body:not(.finance-page) #app.voice-mode .voice-panel[data-voice-state="opening"] #voiceStart .voice-mic-symbol,
body:not(.finance-page) #app.voice-mode .voice-panel[data-voice-state="thinking"] #voiceStart .voice-mic-symbol { display: none; }
body:not(.finance-page) #app.voice-mode .voice-panel[data-voice-state="listening"] #voiceStart .voice-send-symbol,
body:not(.finance-page) #app.voice-mode .voice-panel[data-voice-state="speaking"] #voiceStart .voice-interrupt-symbol,
body:not(.finance-page) #app.voice-mode .voice-panel[data-voice-state="opening"] #voiceStart .voice-wait-symbol,
body:not(.finance-page) #app.voice-mode .voice-panel[data-voice-state="thinking"] #voiceStart .voice-wait-symbol { display: block; }
body:not(.finance-page) #app.voice-mode .voice-wait-symbol { font-size: 30px; line-height: 1; }

body:not(.finance-page) #app.voice-mode .voice-actions > .voice-mute,
body:not(.finance-page) #app.voice-mode .voice-actions > .voice-replay {
  grid-column: 1 / -1;
  grid-row: auto;
  justify-self: center;
  width: auto;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 16px;
  border: 0;
  background: #edf4ff;
  color: #0758b8;
  font-size: 14px;
}

body:not(.finance-page) #app.voice-mode .main > .site-icp-footer {
  grid-area: voice-footer;
  position: static;
  min-height: 0;
  margin: 0;
  padding: 4px 0 0;
  align-self: center;
  background: transparent;
  border: 0;
  font-size: 10px;
  line-height: 1.3;
}

body:not(.finance-page) #app.voice-mode .voice-actions > .voice-replay:disabled {
  background: #eef1f5;
  color: #637184;
}

body:not(.finance-page) #app.voice-mode.voice-captions-hidden .workspace { display: none; }
body:not(.finance-page) #app.voice-mode.voice-captions-hidden .main {
  grid-template-rows: 56px minmax(0, 1fr) auto;
  grid-template-areas: "voice-header" "voice-status" "voice-controls";
}

@keyframes voiceWave { from { transform: scaleY(.55); } to { transform: scaleY(1); } }
@keyframes voiceWait { from { opacity: .55; } to { opacity: 1; } }

@media (max-width: 820px) {
  body:not(.finance-page) #app.voice-mode .main { padding-inline: 16px; grid-template-rows: 56px auto minmax(0, 1fr) auto; }
  body:not(.finance-page) #app.voice-mode #panel-chat .bubble { font-size: 19px; }
  body:not(.finance-page) #app.voice-mode .voice-actions { gap: 8px 24px; padding-top: 10px; }
  body:not(.finance-page) #app.voice-mode.voice-captions-hidden .main { grid-template-rows: 56px minmax(0, 1fr) auto; }
}

@media (max-height: 680px) {
  body:not(.finance-page) #app.voice-mode .main { grid-template-rows: 52px auto minmax(0, 1fr) auto; }
  body:not(.finance-page) #app.voice-mode #voiceOrb { width: 52px; height: 52px; gap: 4px; }
  body:not(.finance-page) #app.voice-mode #voiceOrb span { width: 4px; }
  body:not(.finance-page) #app.voice-mode .voice-body { gap: 4px; }
  body:not(.finance-page) #app.voice-mode #voiceState { font-size: 16px; }
  body:not(.finance-page) #app.voice-mode #voiceNote { font-size: 12px; line-height: 1.35; }
  body:not(.finance-page) #app.voice-mode .voice-brand p { display: none; }
  body:not(.finance-page) #app.voice-mode .voice-actions { padding-top: 8px; }
  body:not(.finance-page) #app.voice-mode.voice-captions-hidden .main { grid-template-rows: 52px minmax(0, 1fr) auto; }
}

@media (prefers-reduced-motion: reduce) {
  body:not(.finance-page) #app.voice-mode #voiceOrb,
  body:not(.finance-page) #app.voice-mode #voiceOrb span { animation: none !important; }
}

/* A single title and a transcript-led voice surface. */
body:not(.finance-page) #app .hero-title-row { display: none; }
body:not(.finance-page) #app .public-workbench-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body:not(.finance-page) #app.voice-mode .voice-brand p,
body:not(.finance-page) #app.voice-mode .voice-logo,
body:not(.finance-page) #app.voice-mode .main > .site-icp-footer { display: none; }
body:not(.finance-page) #app.voice-mode .voice-header-actions { display: grid; grid-auto-flow: column; align-items: center; gap: 4px; }
body:not(.finance-page) #app.voice-mode .voice-header-actions button { min-height: 44px; padding: 8px 10px; border: 0; background: transparent; font-size: 14px; color: #526277; }
body:not(.finance-page) #app.voice-mode .voice-body { padding: 14px 0 18px; gap: 5px; max-height: 32vh; overflow-y: auto; }
body:not(.finance-page) #app.voice-mode #voiceOrb { width: 44px; height: 40px; border: 0; background: transparent; border-radius: 0; gap: 4px; }
body:not(.finance-page) #app.voice-mode #voiceOrb span { width: 4px; }
body:not(.finance-page) #app.voice-mode #voiceOrb span:nth-child(3) { height: 28px; }
body:not(.finance-page) #app.voice-mode #voiceState { font-size: 17px; font-weight: 500; }
body:not(.finance-page) #app.voice-mode #voiceNote { font-size: 13px; line-height: 1.5; font-weight: 400; }
body:not(.finance-page) #app.voice-mode #voiceNote:empty { display: none; }
body:not(.finance-page) #app.voice-mode .voice-caption-tools { grid-area: voice-transcript; align-self: end; justify-self: center; width: auto; z-index: 2; pointer-events: none; }
body:not(.finance-page) #app.voice-mode .voice-caption-tools #voiceLatest { pointer-events: auto; border-radius: 22px; background: #eaf2fc; margin-bottom: 6px; box-shadow: 0 2px 10px #142b4820; }
body:not(.finance-page) #app.voice-mode #chatScroll { padding: 10px 4px 24px; gap: 24px; -webkit-overflow-scrolling: touch; overflow-anchor: none; }
body:not(.finance-page) #app.voice-mode #panel-chat .message { width: 100%; max-width: 100%; margin: 0; gap: 0; grid-template-columns: minmax(0, 1fr); animation: none; }
body:not(.finance-page) #app.voice-mode #panel-chat .message.assistant .bubble { padding: 0; background: transparent; border-radius: 0; }
body:not(.finance-page) #app.voice-mode #panel-chat .message.user .bubble { max-width: 92%; padding: 12px 16px; background: #edf2f7; border-radius: 20px; }
body:not(.finance-page) #app.voice-mode #panel-chat .bubble { font-weight: 400; line-height: 1.75; transition: none; }
body:not(.finance-page) #app.voice-mode .voice-actions { padding: 16px 0 12px; gap: 8px 28px; }
body:not(.finance-page) #app.voice-mode .voice-actions > button.voice-core-control { min-height: 84px; gap: 7px; font-size: 14px; }
body:not(.finance-page) #app.voice-mode .voice-control-icon { width: 56px; height: 56px; }
body:not(.finance-page) #app.voice-mode .voice-control-label { font-weight: 500; }
body:not(.finance-page) #app.voice-mode.voice-captions-hidden .voice-caption-tools { display: none; }
@media (max-width: 820px) {
  body:not(.finance-page) #app .public-workbench { display: none; }
  body:not(.finance-page) #app .hero { padding-top: 10px; padding-bottom: 8px; }
  body:not(.finance-page) #app .main-prompt { font-size: 17px; font-weight: 500; }
  body:not(.finance-page) #app .topbar-title { font-weight: 600; }
  body:not(.finance-page) #app.voice-mode .main { padding-left: 20px; padding-right: 20px; }
}
@media (max-height: 600px) {
  body:not(.finance-page) #app.voice-mode .voice-body { padding: 6px 0 10px; }
  body:not(.finance-page) #app.voice-mode #voiceOrb { display: none; }
  body:not(.finance-page) #app.voice-mode .voice-actions { padding-top: 10px; padding-bottom: 6px; }
}

body:not(.finance-page) #app.voice-mode #panel-chat .message.user .bubble { justify-self: end; }

body:not(.finance-page) #app .topbar-title { display: block; margin: 0; font-size: 20px; line-height: 1.4; }
/* Preserve author names for assistive technology without consuming a column. */
body:not(.finance-page) #app.voice-mode .message .avatar { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

body:not(.finance-page) #app.voice-mode.voice-captions-hidden .voice-body { max-height: none; height: 100%; }
/* Conversation-first text and press-to-talk share one stable reading surface. */
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .main {
  grid-template-rows: minmax(64px, auto) auto minmax(0, 1fr) auto auto;
  grid-template-areas: "chat-header" "chat-intro" "chat-content" "chat-composer" "chat-legal";
  background: radial-gradient(circle at 50% 16%, rgba(97,184,255,.20), transparent 24rem), linear-gradient(180deg, #fbfdff 0%, #eef7ff 58%, #eaf4fb 100%);
  padding: env(safe-area-inset-top) 28px env(safe-area-inset-bottom);
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .main > .topbar { grid-area: chat-header; }
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .main > .tabs,
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .suggestions { display: none; }
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .workspace {
  grid-area: chat-content; width: min(780px, 100%); margin: 0 auto;
  min-height: 0; height: 100%; padding: 0; background: transparent;
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) #panel-chat.active {
  display: flex; flex-direction: column; min-height: 0; height: 100%;
  padding: 0; border: 0; background: transparent; box-shadow: none;
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) #chatScroll {
  width: 100%; height: 100%; min-height: 0; margin: 0; padding: 16px 0 24px;
  display: flex; flex-direction: column; justify-content: flex-start;
  overflow-y: auto; overflow-x: hidden; gap: 24px;
  scroll-padding-bottom: 24px; overflow-anchor: none; -webkit-overflow-scrolling: touch;
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .message {
  width: 100%; max-width: 100%; margin: 0; display: grid;
  grid-template-columns: 34px minmax(0, 1fr); gap: 10px; animation: none; flex: 0 0 auto;
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .message .avatar {
  position: relative; width: 34px; height: 34px; padding: 0; margin: 3px 0 0;
  border: 0; overflow: hidden; clip: auto; white-space: normal; border-radius: 11px;
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) #panel-chat .bubble {
  max-width: 100%; font-size: 18px; font-weight: 400; line-height: 1.8;
  color: var(--text); box-shadow: 0 8px 24px rgba(26,84,140,.06); border: 1px solid var(--line); transition: none;
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .message.assistant .bubble {
  padding: 14px 16px; border-radius: 6px 20px 20px 20px; background: rgba(255,255,255,.94);
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .message.user .bubble {
  max-width: 92%; padding: 12px 16px; border-radius: 20px 6px 20px 20px;
  justify-self: end; background: #eaf4ff; border-color: #bddaf5;
}
body:not(.finance-page) #app:not(.voice-mode) .topbar {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; grid-template-rows: 1fr; column-gap: 12px;
  width: 100%; min-width: 0; min-height: 64px; height: auto; margin: 0; padding: 6px 0; border: 0; background: transparent; box-shadow: none;
}
body:not(.finance-page) #app:not(.voice-mode) .topbar-title {
  grid-column: 2; grid-row: 1; margin: 0; font-size: 20px; color: var(--ink);
  justify-self: center; text-align: center; align-self: center; font-weight: 650;
}
body:not(.finance-page) #app:not(.voice-mode) .topbar-status {
  grid-column: 3; grid-row: 1; position: static; align-self: center; justify-self: end;
  width: auto; min-width: 0; max-width: 100%; margin: 0; padding: 5px 0;
  font-size: calc(12px + var(--font-bump)); line-height: 1.35; font-weight: 500;
  color: #366a91; white-space: normal; text-align: right; overflow: visible;
  text-overflow: clip; overflow-wrap: anywhere;
}
body:not(.finance-page) #app:not(.voice-mode) #mobileMenu {
  grid-column: 1; grid-row: 1; width: 44px; height: 44px; border: 1px solid var(--line); justify-self: start;
  border-radius: 14px; background: rgba(255,255,255,.94); margin: 0;
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) #composer {
  grid-area: chat-composer; display: block; position: relative;
  top: auto; right: auto; bottom: auto; left: auto; transform: none;
  width: min(780px, 100%); max-width: 100%; margin: 0 auto; padding: 0;
  border: 0; border-radius: 24px; box-shadow: none; background: transparent; animation: none;
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) #composer.hidden { display: none; }
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .composer-form {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto;
  gap: 4px 12px; min-height: 112px; padding: 10px 12px;
  border: 1px solid #bfdaf0; border-radius: 24px; background: rgba(255,255,255,.96);
  box-shadow: 0 12px 30px rgba(31,83,136,.10);
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .composer-form:focus-within { border-color: #b2c5f5; }
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) #questionInput {
  grid-column: 1 / -1; grid-row: 1; min-height: 44px; padding: 8px 6px;
  font-size: 18px; color: #20252c; line-height: 1.5;
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) #questionInput::placeholder { color: #8d929c; }
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .composer-tools {
  display: flex; align-items: center; grid-column: 1; grid-row: 2; min-width: 0;
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .composer-tools button {
  padding: 8px 12px; min-height: 44px; border: 0; border-radius: 22px;
  background: #eaf4ff; color: #1b67a3; font-size: 14px; font-weight: 500;
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .composer-tools button + button { margin-left: 8px; }
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .send-button {
  grid-column: 2; grid-row: 2; min-width: 56px; min-height: 44px; padding: 8px 14px;
  border-radius: 23px; border: 0; background: linear-gradient(135deg, #2183e8, #10a7cf); color: white; font-weight: 500;
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .send-button:disabled { background: #eff1f5; color: #a0a6b1; }
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .composer-note {
  display: block; padding: 5px 8px 0; text-align: center; color: #9096a0;
  font-size: 10px; line-height: 1.4;
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .site-icp-footer {
  grid-area: chat-legal; position: relative; top: auto; right: auto; bottom: auto; left: auto;
  width: 100%; padding: 6px 0; margin: 0; min-height: 0;
  border: 0; background: transparent; box-shadow: none; font-size: 10px; line-height: 1.3; color: #9399a3;
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .site-icp-footer a { color: #7f8999; font-weight: 400; }
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .site-icp-footer > span { display: none; }
body:not(.finance-page) #app #holdControls { display: none; }
body:not(.finance-page) #app.hold-mode .voice-panel:not([hidden]),
body:not(.finance-page) #app.hold-mode #composer > .composer-form,
body:not(.finance-page) #app.hold-mode #composer > .composer-note { display: none; }
body:not(.finance-page) #app.hold-mode #holdControls {
  display: grid; grid-template-rows: minmax(24px, auto) 70px 44px; min-height: 148px;
  padding: 6px 12px 8px; border: 1px solid #bfdaf0; border-radius: 24px;
  box-shadow: 0 12px 30px rgba(31,83,136,.10); background: linear-gradient(180deg, rgba(255,255,255,.97), #f1f8ff); transition: background-color .15s ease, border-color .15s ease;
}
body:not(.finance-page) #app.hold-mode #holdHint {
  margin: 0; font-size: 12px; font-weight: 400; line-height: 20px;
  text-align: center; color: #617c96; overflow-wrap: anywhere;
}
body:not(.finance-page) #app.hold-mode #holdToTalkButton {
  position: relative; width: 100%; min-height: 70px; padding: 8px 0;
  color: #0b4e9d; border: 0; background: #eaf4ff; border-radius: 16px;
  font-size: 19px; font-weight: 500; touch-action: none;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
body:not(.finance-page) #app.hold-mode .hold-toolbar { display: flex; align-items: center; justify-content: space-between; }
body:not(.finance-page) #app.hold-mode .hold-toolbar button {
  min-width: 44px; min-height: 44px; padding: 8px; background: transparent;
  border: 0; border-radius: 50%; color: #344b78; font-size: 13px; font-weight: 400;
}
body:not(.finance-page) #app.hold-mode .hold-toolbar button:disabled { color: #a6adba; }
body:not(.finance-page) #app.hold-mode .hold-toolbar svg { width: 23px; height: 23px; display: block; }
body:not(.finance-page) #app #holdWave {
  --voice-input-level: .08; display: none; width: min(280px, 90%); height: 48px;
  margin: 0 auto; align-items: center; justify-content: center;
}
body:not(.finance-page) #app #holdWave span {
  display: block; flex: 1 1 0; max-width: 4px; min-width: 2px; margin: 0 2px;
  height: var(--bar-height); border-radius: 2px; background: #2386cf;
  transform: scaleY(calc(.16 + var(--voice-input-level) * .84));
  transition: transform .1s linear;
}
body:not(.finance-page) #app.hold-recording #holdControls {
  background: linear-gradient(180deg, #edf7ff 0%, #dcf1ff 100%); border-color: #abd7f1;
}
body:not(.finance-page) #app.hold-recording #holdWave { display: flex; }
body:not(.finance-page) #app.hold-recording .hold-button-label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0);
}
body:not(.finance-page) #app.hold-cancel #holdControls { background: #fff1f2; border-color: #f2c7cb; }
body:not(.finance-page) #app.hold-cancel #holdHint { color: #ae4f5c; }
body:not(.finance-page) #app.hold-cancel #holdWave span { background: #ce7080; }
@media (max-width: 820px) {
  body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .main { padding-left: 16px; padding-right: 16px; }
  body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) #panel-chat .bubble { font-size: 19px; line-height: 1.75; }
  body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) #chatScroll { padding-top: 20px; gap: 28px; }
}
@media (max-height: 560px) {
  body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .main { grid-template-rows: minmax(52px, auto) auto minmax(0, 1fr) auto; }
  body:not(.finance-page) #app:not(.voice-mode) .topbar { height: auto; min-height: 52px; }
  body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .site-icp-footer,
  body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .composer-note { display: none; }
  body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .composer-form { min-height: 98px; padding: 5px 10px; }
  body:not(.finance-page) #app.hold-mode #holdControls { grid-template-rows: minmax(24px, auto) 52px 44px; min-height: 128px; }
  body:not(.finance-page) #app.hold-mode #holdToTalkButton { min-height: 52px; }
  body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) #chatScroll { padding-top: 12px; padding-bottom: 16px; gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  body:not(.finance-page) #app #holdWave span, body:not(.finance-page) #app #holdControls { transition: none; }
}

body:not(.finance-page) #app:not(.voice-mode) .voice-caption-tools { display: none; }
body:not(.finance-page) #app.hold-mode .voice-caption-tools {
  display: flex; grid-area: chat-content; align-self: end; justify-self: center;
  z-index: 2; pointer-events: none; padding-bottom: 8px;
}
body:not(.finance-page) #app.hold-mode #voiceLatest {
  pointer-events: auto; min-height: 44px; padding: 8px 16px; background: #eef3ff;
  color: #395a96; border: 1px solid #dfe6f3; border-radius: 24px; font-weight: 400;
}

/* Keep WaterAI's existing branded hierarchy and shortcuts with compact spacing. */
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .main > .hero {
  grid-area: chat-intro; display: block; width: min(780px, 100%); max-width: 100%;
  margin: 0 auto; padding: 2px 0 8px; border: 0; background: transparent;
  box-shadow: none; text-align: center;
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .hero-copy { display: block; }
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .main-prompt {
  display: block; max-width: none; margin: 0 0 10px; color: var(--ink);
  font-size: 17px; line-height: 1.4; font-weight: 550;
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .hero-body,
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .hero-brand-strip,
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .metric-grid,
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .public-workbench { display: none; }
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .hero-mode-strip {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  width: min(400px, 100%); margin: 0 auto; padding: 0;
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .hero-mode {
  min-height: 40px; padding: 7px 10px; border: 1px solid #cfe1f2;
  background: rgba(255,255,255,.85); color: #376786; border-radius: 14px;
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .hero-mode.active {
  border-color: #b8d4f0; background: #e0efff; color: #0b4e9d;
}
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .message.user { grid-template-columns: minmax(0, 1fr) 34px; }
body:not(.finance-page) #app:not(.voice-mode) .topbar-status.bad { color: #b24b38; }
@media (max-height: 560px) {
  body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .main-prompt { display: none; }
  body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .main > .hero { padding: 0 0 4px; }
}
/* Public focus applies to every focusable surface, including the transcript,
   cards, form fields and hold-to-talk controls. Legacy input modality is
   already tracked on html; keep keyboard focus without a sticky touch ring. */
body:not(.finance-page) #app {
  -webkit-tap-highlight-color: transparent;
}
html body:not(.finance-page) #app :focus {
  outline: 3px solid #0758b8;
  outline-offset: 2px;
}
html[data-navigation-input="pointer"] body:not(.finance-page) #app :focus {
  outline: none;
}
html body:not(.finance-page) #app #chatScroll:focus {
  outline-offset: -3px;
}
@supports selector(:focus-visible) {
  html body:not(.finance-page) #app :focus:not(:focus-visible) {
    outline: none;
  }
}

/* One product header and one scroller: retain the blue WaterAI identity without
   stacking a close row, partner logos, and a second product card above history. */
body:not(.finance-page) #app #sidebar > .sidebar-controls {
  display: grid; grid-template-columns: minmax(0, 1fr) 44px;
  flex: 0 0 auto; min-height: 60px; column-gap: 4px;
  padding-bottom: 10px; border-bottom: 1px solid #dce8f3;
}
body:not(.finance-page) #app #sidebar .assistant-card {
  min-width: 0; padding: 0; margin: 0; border: 0;
  grid-template-columns: 32px minmax(0, 1fr); gap: 8px;
}
body:not(.finance-page) #app #sidebar .assistant-logo { width: 32px; height: 32px; border-radius: 10px; box-shadow: none; }
body:not(.finance-page) #app #sidebar .assistant-name { font-size: 20px; font-weight: 650; line-height: 1.4; }
body:not(.finance-page) #app #sidebar .assistant-desc { font-size: 11px; font-weight: 400; line-height: 1.5; margin-top: 0; color: #627b91; }
body:not(.finance-page) #app #sidebar .sidebar-toggle { top: auto; right: auto; bottom: auto; left: auto; padding: 0; background: transparent; border: 0; }
body:not(.finance-page) #app #sidebar .brand-card { margin: 4px 0 0; min-height: 48px; opacity: .8; }

@media (max-width: 820px) {
  body:not(.finance-page) #app #sidebar {
    /* Explicit edges are required by the supported Android WebView 83. */
    position: fixed; top: 0; bottom: 0; left: 0; right: auto;
    width: 88vw; max-width: 360px; height: 100%; max-height: 100%;
    padding: calc(12px + env(safe-area-inset-top)) 16px calc(12px + env(safe-area-inset-bottom));
    background: #f0f7ff;
    background-image: linear-gradient(165deg, #edf6ff 0%, #f7fbff 65%, #eff7ff 100%);
    border-right: 1px solid #d3e4f3; border-radius: 0 22px 22px 0;
    box-shadow: 12px 0 36px rgba(16, 49, 78, .16); gap: 0;
  }
  body:not(.finance-page) #app #sidebarBackdrop {
    z-index: 59;
    top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 38, 62, .34); border-radius: 0;
  }
  body:not(.finance-page) #app #sidebar > .sidebar-content { display: block; padding: 10px 0 8px; }
  body:not(.finance-page) #app #sidebar .side-section { margin: 0 0 14px; padding: 0 0 14px; border-bottom: 1px solid #dce8f3; }
  body:not(.finance-page) #app #sidebar .side-title { font-size: 13px; line-height: 1.5; font-weight: 500; color: #698197; margin: 0; }
  body:not(.finance-page) #app #sidebar #featureTitle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  body:not(.finance-page) #app #sidebar .feature-nav { display: grid; gap: 4px; }
  body:not(.finance-page) #app #sidebar .feature-nav-item {
    min-height: 44px; padding: 10px 12px; border: 0; border-radius: 12px;
    background: transparent; font-size: 16px; line-height: 1.5; font-weight: 500; text-align: left;
  }
  body:not(.finance-page) #app #sidebar .feature-nav-item.active { background: #dcecff; color: #0758a8; }
  body:not(.finance-page) #app #sidebar .language-section { display: grid; grid-template-columns: minmax(0, 1fr) 104px; align-items: center; gap: 8px; }
  body:not(.finance-page) #app #sidebar .select { height: 44px; min-height: 44px; font-size: 15px; font-weight: 400; padding: 0 10px; background: #fff; border-color: #d9e6f2; border-radius: 12px; }
  body:not(.finance-page) #app #sidebar .history-head { min-height: 44px; margin-bottom: 4px; }
  body:not(.finance-page) #app #sidebar #newConversation { min-width: 60px; min-height: 44px; padding: 8px 10px; border: 0; background: transparent; color: #1562aa; font-size: 14px; font-weight: 500; }
  body:not(.finance-page) #app #sidebar .history-list { display: grid; gap: 6px; max-height: none; overflow: visible; padding: 0; }
  body:not(.finance-page) #app #sidebar .history-row { grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 0; border-radius: 12px; background: rgba(255,255,255,.65); }
  body:not(.finance-page) #app #sidebar .history-item { padding: 10px 8px 10px 12px; min-height: 68px; border: 0; background: transparent; border-radius: 12px; gap: 4px; transform: none; }
  body:not(.finance-page) #app #sidebar .history-item.active { background: #dcecff; }
  body:not(.finance-page) #app #sidebar .history-item-title { font-size: 15px; line-height: 1.5; font-weight: 500; }
  body:not(.finance-page) #app #sidebar .history-item small { font-size: 12px; line-height: 1.5; font-weight: 400; color: #6b8298; white-space: normal; overflow-wrap: anywhere; }
  body:not(.finance-page) #app #sidebar .history-empty { font-size: 14px; font-weight: 400; line-height: 1.6; padding: 12px; }
  body:not(.finance-page) #app #sidebar .history-delete { width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; font-size: 20px; font-weight: 400; color: #8194a6; }
  body:not(.finance-page) #app #sidebar .history-delete:hover { background: #fce8eb; color: #a34455; }
  body:not(.finance-page) #app #sidebar .kb-section { border: 0; margin: 0; padding-bottom: 4px; }
  body:not(.finance-page) #app #sidebar .kb-card { margin-top: 10px; padding: 12px; border-radius: 12px; box-shadow: none; }
  body:not(.finance-page) #app #sidebar .kb-card span { font-size: 13px; font-weight: 500; }
  body:not(.finance-page) #app #sidebar .kb-card small { font-size: 12px; font-weight: 400; line-height: 1.5; }
  body:not(.finance-page) #app #sidebar .kb-card strong { font-size: 20px; line-height: 1.4; }
  body:not(.finance-page) #app #sidebar #clearChat { min-height: 44px; margin-top: 8px; font-size: 14px; font-weight: 400; }
  body:not(.finance-page) #app #sidebar .brand-card { width: 180px; max-width: 100%; margin: 14px auto 0; padding: 0; }
}

/* Keep the conversation readable: compact controls, unchanged voice ownership. */
body:not(.finance-page) #app .main-prompt { display: none !important; }
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .main > .hero { padding: 0 0 6px; }
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) #chatScroll { padding: 12px 0 16px; gap: 0; }
/* WebView 83 does not support gap on a flex container. */
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .message + .message { margin-top: 20px; }
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .message { grid-template-columns: 26px minmax(0, 1fr); gap: 8px; }
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .message.user { grid-template-columns: minmax(0, 1fr) 26px; }
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .message .avatar { width: 26px; height: 26px; border-radius: 8px; }
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .message.assistant .bubble,
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .message.user .bubble { padding: 12px; }

body:not(.finance-page) #app.hold-mode #holdControls {
  grid-template-rows: minmax(20px, auto) minmax(52px, auto);
  row-gap: 4px; min-height: 0; padding: 6px 8px 8px;
  border-radius: 20px; box-shadow: 0 5px 18px rgba(31,83,136,.07);
  background: linear-gradient(180deg, #f5faff, #eaf5ff);
}
body:not(.finance-page) #app.hold-mode #holdHint { line-height: 20px; font-size: 12px; padding: 0 6px; }
body:not(.finance-page) #app.hold-mode .hold-toolbar {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px;
  column-gap: 6px; align-items: center; min-width: 0;
}
body:not(.finance-page) #app.hold-mode #holdToTalkButton {
  min-width: 0; width: 100%; min-height: 52px; height: auto;
  padding: 8px 10px; border-radius: 14px; background: #dceeff;
  border: 1px solid #c6e0f7; font-size: 18px; line-height: 1.35;
  font-weight: 500; color: #0b4e9d; overflow-wrap: anywhere;
}
body:not(.finance-page) #app.hold-mode #holdPlayback,
body:not(.finance-page) #app.hold-mode #holdKeyboard { width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 10px; }
body:not(.finance-page) #app.hold-mode #holdWave { width: 100%; max-width: 220px; height: 32px; overflow: hidden; }
body:not(.finance-page) #app.hold-mode #holdWave span { min-width: 1px; max-width: 3px; margin: 0 1px; max-height: 32px; }
body:not(.finance-page) #app.hold-recording #holdControls { background: linear-gradient(180deg, #edf7ff, #dcf1ff); }
body:not(.finance-page) #app.hold-cancel #holdControls { background: #fff1f2; }
body:not(.finance-page) #app.hold-cancel #holdToTalkButton { background: #ffe5e9; border-color: #efbdc8; }
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .site-icp-footer { padding: 5px 0; }
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .site-icp-footer a { display: inline-block; margin-right: 6px; }
body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .site-icp-footer a:last-child { margin-right: 0; }
@media (max-width: 820px) {
  body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) .main { padding-left: 12px; padding-right: 12px; }
  body:not(.finance-page) #app[data-active-tab="chat"]:not(.voice-mode) #panel-chat .bubble { font-size: 19px; line-height: 1.7; }
}
