: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: 100svh;
  overflow: hidden;
  font-size: calc(1rem + var(--rem-font-bump));
  overflow-wrap: anywhere;
}

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

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

.app-shell {
  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: 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;
}

.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-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: 100svh;
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  padding: 18px clamp(20px, 3.2vw, 52px) 12px;
  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-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;
}

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

.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;
}

.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 h2 {
  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-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;
  }

  .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: 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: 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-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 h2 {
    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-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) auto;
  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));
}

.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: 100svh;
    max-height: 100svh;
    overflow: hidden;
  }

  .main {
    height: 100svh;
    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);
}

@media (max-width: 820px) {
  .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);
  }
}
