:root {
  --navy: #17365f;
  --ink: #0d2f4d;
  --cyan: #00a8c8;
  --teal: #22b8a9;
  --mint: #edfdf8;
  --aqua: #d9f7f6;
  --bg: #effbfc;
  --surface: #ffffff;
  --muted: #6e8495;
  --line: #cbe7ed;
  --soft: rgba(0, 168, 200, .10);
  --danger: #9b4a2a;
  --warning-bg: #fff9ef;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(23, 54, 95, .12);
  --sidebar: 292px;
  --sidebar-compact: 82px;
}

body[data-theme="dark"] {
  --navy: #d7ecff;
  --ink: #eaf7ff;
  --cyan: #21d1ee;
  --teal: #48dccf;
  --mint: #071826;
  --aqua: #0b2536;
  --bg: #020814;
  --surface: #071523;
  --muted: #8cafc2;
  --line: #173650;
  --soft: rgba(33, 209, 238, .13);
  --shadow: 0 24px 80px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(0,168,200,.16), transparent 34%),
    radial-gradient(circle at 92% 20%, rgba(34,184,169,.18), transparent 32%),
    linear-gradient(135deg, #fbfefe 0%, var(--bg) 54%, #e7f6f8 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body[data-theme="dark"] {
  background:
    radial-gradient(circle at 14% 4%, rgba(33,209,238,.18), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(72,220,207,.16), transparent 26%),
    linear-gradient(135deg, #01040b 0%, #06111f 55%, #071827 100%);
}

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

button { cursor: pointer; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  transition: grid-template-columns .22s ease;
}

.app-shell:has(.sidebar.is-compact) {
  grid-template-columns: var(--sidebar-compact) 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  background: rgba(255,255,255,.82);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 20;
  transition: width .22s ease, background .2s ease;
}

body[data-theme="dark"] .sidebar {
  background: rgba(7,21,35,.88);
}

.side-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-toggle, .top-icon, .more-btn, .modal-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(23, 54, 95, .06);
}

.brand-mini {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 32px rgba(0,168,200,.14);
}

.brand-mini img {
  width: 160px;
  height: 52px;
  object-fit: contain;
  object-position: left center;
}

.new-chat, .nav-item {
  width: 100%;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 12px;
  text-align: left;
  position: relative;
}

.new-chat {
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 16px 42px rgba(0,168,200,.18);
}

.new-chat kbd {
  display: none;
}

.nav-item:hover, .nav-item.active {
  background: var(--soft);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 4px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(var(--cyan), var(--teal));
}

.nav-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--cyan);
  background: rgba(0,168,200,.10);
  font-weight: 900;
}

.nav-label { white-space: nowrap; }

.nav-item em {
  margin-left: auto;
  font-style: normal;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 99px;
  color: var(--cyan);
  background: rgba(0,168,200,.10);
}

.sidebar.is-compact .nav-label,
.sidebar.is-compact .history,
.sidebar.is-compact .side-card,
.sidebar.is-compact .profile-text,
.sidebar.is-compact .new-chat kbd,
.sidebar.is-compact .nav-item em {
  display: none;
}

.sidebar.is-compact .new-chat,
.sidebar.is-compact .nav-item {
  justify-content: center;
  padding: 0;
}

.history {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.section-label {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}

.history-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 10px 12px;
  border-radius: 14px;
  display: grid;
  gap: 3px;
}

.history-item:hover, .history-item.selected { background: rgba(23,54,95,.05); }

.history-item span { color: var(--muted); font-size: 12px; }

.side-card {
  margin-top: auto;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(237,253,248,.90));
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
}

body[data-theme="dark"] .side-card {
  background: linear-gradient(145deg, rgba(7,21,35,.95), rgba(11,37,54,.95));
}

.side-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.side-card b { font-size: 14px; }
.side-card p { margin: 4px 0 10px; color: var(--muted); font-size: 12px; }
.side-card button {
  grid-column: 1 / -1;
  border: 0;
  border-radius: 12px;
  padding: 9px;
  background: var(--navy);
  color: #fff;
}

.profile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
}

body[data-theme="dark"] .profile { background: rgba(7,21,35,.72); }

.avatar, .large-avatar {
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
}

.avatar { width: 38px; height: 38px; }
.large-avatar { width: 80px; height: 80px; font-size: 28px; }
.profile-text { display: grid; font-size: 13px; }
.profile-text span { color: var(--muted); font-size: 12px; }
.profile .more-btn { margin-left: auto; width: 36px; height: 36px; }

.profile-menu, .top-menu {
  position: absolute;
  min-width: 150px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: none;
  z-index: 60;
}

.profile-menu { right: 8px; bottom: 58px; }
.top-menu { right: 0; top: 52px; }
.profile-menu.open, .top-menu.open { display: grid; gap: 4px; }
.profile-menu button, .top-menu button {
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
}
.profile-menu button:hover, .top-menu button:hover { background: var(--soft); }

.main {
  min-width: 0;
  padding: 22px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 18px;
  backdrop-filter: blur(20px);
}

.crumb {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.crumb b { font-size: 19px; color: var(--navy); }
.crumb span { color: var(--muted); font-size: 13px; }

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-pill i {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: #c7a444;
}

.status-pill.online i { background: #16b978; }
.status-pill.offline i { background: #d76545; }
.top-icon { position: relative; font-size: 18px; }
.top-icon span {
  position: absolute;
  right: -3px;
  top: -5px;
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  background: #e85656;
  color: white;
  font-size: 11px;
  display: grid;
  place-items: center;
}

.view, .answer-view {
  display: none;
}
.view.active, .answer-view.active {
  display: block;
}

.search-stage {
  min-height: calc(100vh - 108px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 50px 20px;
}

.stage-brand {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.stage-logo {
  width: 148px;
  height: 118px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 18px 42px rgba(0,168,200,.20));
}

.stage-logo img { width: 220px; height: 120px; object-fit: contain; }
.stage-brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(56px, 8vw, 104px);
  line-height: .9;
  color: var(--navy);
  letter-spacing: -4px;
}
.stage-brand sup { font-size: .24em; }
.stage-brand span { color: var(--muted); letter-spacing: .18em; font-size: 12px; }

.composer {
  width: min(880px, 100%);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 16px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow);
}
body[data-theme="dark"] .composer { background: rgba(7,21,35,.92); }

.composer-meta, .composer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.composer-meta span {
  color: var(--navy);
  font-weight: 700;
}
.composer-meta i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--teal);
  margin-right: 6px;
}
.composer-meta button {
  border: 0;
  background: transparent;
  color: var(--muted);
}
.composer textarea {
  width: 100%;
  border: 0;
  outline: 0;
  resize: vertical;
  min-height: 112px;
  padding: 18px 4px;
  color: var(--ink);
  background: transparent;
  font-size: 18px;
}
.tools { display: flex; gap: 8px; flex-wrap: wrap; }
.tools button, .quick-prompts button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  padding: 9px 13px;
}
.send-btn {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.stage-note { color: var(--muted); margin: 0; }
.quick-prompts { width: min(880px, 100%); display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.home-scroll {
  max-width: 1120px;
  margin: 0 auto 90px;
  display: grid;
  gap: 34px;
}

.brand-story, .home-section, .rwd-story, .page-head, .panel, .privacy-banner, .network-map, .calculator-shell {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow);
}
body[data-theme="dark"] .brand-story,
body[data-theme="dark"] .home-section,
body[data-theme="dark"] .rwd-story,
body[data-theme="dark"] .page-head,
body[data-theme="dark"] .panel,
body[data-theme="dark"] .privacy-banner,
body[data-theme="dark"] .network-map,
body[data-theme="dark"] .calculator-shell { background: rgba(7,21,35,.84); }

.brand-story { padding: 54px; text-align: center; }
.eyebrow, .kicker { color: var(--cyan); letter-spacing: .16em; font-size: 12px; font-weight: 800; }
.brand-story h1 { margin: 14px 0; font-size: clamp(34px, 5vw, 62px); line-height: 1.08; color: var(--navy); }
.brand-story strong { color: var(--teal); }
.hero-sub { color: var(--muted); font-size: 18px; }

.home-section { padding: 34px; }
.home-section-head { display: grid; gap: 8px; margin-bottom: 22px; }
.home-section-head h2, .page-head h2 { margin: 0; font-size: 32px; color: var(--navy); }
.home-section-head p, .page-head p { margin: 0; color: var(--muted); }
.specialties { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.specialty {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: var(--surface);
  color: var(--ink);
  display: grid;
  gap: 8px;
  text-align: left;
}
.specialty.active { border-color: var(--cyan); box-shadow: 0 12px 34px rgba(0,168,200,.12); }
.spec-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--cyan);
  font-weight: 900;
}
.specialty small { color: var(--muted); }

.rwd-story {
  padding: 36px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 28px;
  align-items: center;
}
.rwd-copy h2 { margin: 10px 0; color: var(--navy); font-size: 38px; line-height: 1.1; }
.rwd-copy p { color: var(--muted); line-height: 1.8; }
.primary-btn, .outline-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
}
.primary-btn { color: #fff; background: linear-gradient(135deg, var(--cyan), var(--teal)); }
.outline-btn { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.rwd-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 14px; align-items: center; }
.rwd-flow div {
  min-height: 160px;
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(145deg, var(--surface), var(--mint));
  border: 1px solid var(--line);
  display: grid;
  align-content: center;
  gap: 8px;
}
.rwd-flow span { color: var(--cyan); font-weight: 900; }
.rwd-flow small { color: var(--muted); }
.rwd-flow i { color: var(--teal); font-style: normal; font-weight: 900; }

.page-head {
  max-width: 1180px;
  margin: 14px auto 22px;
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.search-strip {
  max-width: 1180px;
  margin: 0 auto 16px;
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}
.search-strip input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 12px;
}
.search-strip button {
  border: 0;
  border-radius: 16px;
  padding: 12px 18px;
  color: white;
  background: var(--navy);
}
.filter-row {
  max-width: 1180px;
  margin: 0 auto 20px;
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.filter {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  background: var(--surface);
  color: var(--ink);
}
.filter.active { background: var(--navy); color: white; }

.evidence-grid, .metric-grid, .project-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.evidence-card, .metric, .project-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(23,54,95,.06);
}
.card-top, .source-row, .panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.level {
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--soft);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
}
.evidence-card h3, .project-grid h3 { color: var(--navy); }
.evidence-card p, .source-row, .project-grid p { color: var(--muted); line-height: 1.7; }
.source-row button, .project-grid button, .full-source {
  border: 0;
  background: transparent;
  color: var(--cyan);
  font-weight: 800;
}

.calc-count {
  text-align: right;
  display: grid;
}
.calc-count b { font-size: 32px; color: var(--cyan); }
.calc-count span { color: var(--muted); }
.calculator-shell {
  max-width: 1180px;
  margin: 0 auto 60px;
  min-height: 680px;
  display: grid;
  grid-template-columns: 360px 1fr;
  overflow: hidden;
}
.calculator-list {
  border-right: 1px solid var(--line);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.calc-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  outline: 0;
  color: var(--ink);
  background: var(--surface);
}
.calc-tabs { display: flex; gap: 7px; flex-wrap: wrap; }
.calc-tabs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--ink);
  background: var(--surface);
  font-size: 13px;
}
.calc-tabs button.active { color: white; background: var(--navy); }
.calc-list {
  display: grid;
  gap: 9px;
  overflow: auto;
  padding-right: 4px;
}
.calc-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 13px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  display: grid;
  gap: 5px;
}
.calc-item.active { border-color: var(--cyan); background: var(--soft); }
.calc-item span { color: var(--cyan); font-size: 12px; font-weight: 800; }
.calc-item small { color: var(--muted); line-height: 1.45; }
.calculator-detail {
  padding: 28px;
  overflow: auto;
}
.calc-detail-head {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}
.calc-detail-head span {
  color: var(--cyan);
  font-weight: 800;
  font-size: 13px;
}
.calc-detail-head h3 {
  margin: 0;
  color: var(--navy);
  font-size: 32px;
}
.calc-detail-head p { margin: 0; color: var(--muted); line-height: 1.7; }
.calc-detail-head small {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--mint);
  border: 1px solid var(--line);
  color: var(--muted);
}
.calc-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.calc-field {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px;
  background: var(--surface);
  display: grid;
  gap: 8px;
}
.calc-field span { font-weight: 700; }
.calc-field select, .calc-field input[type="number"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  color: var(--ink);
  background: var(--surface);
}
.calc-field input[type="range"] { width: 100%; accent-color: var(--cyan); }
.calc-field.check {
  grid-template-columns: auto 1fr;
  align-items: center;
}
.calc-field.check input { width: 18px; height: 18px; accent-color: var(--cyan); }
.calc-result {
  margin-top: 20px;
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(0,168,200,.12), rgba(34,184,169,.12));
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 20px;
}
.result-score {
  min-width: 120px;
  height: 120px;
  border-radius: 28px;
  background: var(--surface);
  display: grid;
  place-items: center;
  align-content: center;
  box-shadow: 0 14px 36px rgba(0,168,200,.12);
}
.result-score strong { color: var(--cyan); font-size: 42px; line-height: 1; }
.result-score span { color: var(--muted); }
.calc-result b { color: var(--navy); font-size: 22px; }
.calc-result p { color: var(--muted); line-height: 1.7; }
.calc-disclaimer {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.metric-grid { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.metric span { color: var(--muted); }
.metric strong { display: block; color: var(--navy); font-size: 38px; margin: 8px 0; }
.metric small { color: var(--muted); }
.data-layout {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.panel { padding: 24px; }
.bar-list { display: grid; gap: 18px; margin-top: 18px; }
.bar-list div { display: grid; gap: 8px; }
.bar-list i { height: 12px; border-radius: 99px; background: var(--mint); overflow: hidden; }
.bar-list em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--teal)); }
.pipeline ol { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 14px; }
.pipeline li { display: flex; gap: 12px; }
.pipeline li span { color: var(--cyan); font-weight: 900; }
.pipeline small { color: var(--muted); }
.privacy-banner {
  max-width: 1180px;
  margin: 18px auto 60px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.lock {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  color: #fff;
  font-weight: 900;
}
.privacy-banner p { margin: 4px 0 0; color: var(--muted); }
.privacy-banner button {
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 10px 14px;
  color: var(--ink);
}

.network-map {
  max-width: 1180px;
  margin: 0 auto 18px;
  padding: 38px;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 30px;
  overflow: hidden;
}
.map-copy h3 { color: var(--navy); font-size: 40px; line-height: 1.15; }
.map-copy p { color: var(--muted); line-height: 1.8; }
.network-stats { display: flex; gap: 18px; flex-wrap: wrap; }
.network-stats span { display: grid; color: var(--muted); }
.network-stats b { color: var(--cyan); font-size: 30px; }
.orbit {
  position: relative;
  height: 340px;
}
.orbit-ring {
  position: absolute;
  inset: 20px;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.ring-two { inset: 78px; }
.orbit-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.orbit-core img { width: 180px; object-fit: contain; }
.node {
  position: absolute;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--navy);
  color: white;
  font-size: 13px;
}
.n1 { left: 30px; top: 65px; }
.n2 { right: 34px; top: 86px; }
.n3 { left: 72px; bottom: 56px; }
.n4 { right: 60px; bottom: 72px; }

.answer-top, .answer-layout, .question-card {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}
.answer-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}
.answer-top button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 14px;
}
.question-card {
  padding: 24px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.question-card span { color: var(--cyan); font-weight: 900; }
.question-card h2 { color: var(--navy); }
.question-card small { color: var(--muted); }
.answer-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
}
.answer-main, .sources-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  padding: 24px;
  box-shadow: var(--shadow);
}
.ai-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ai-orb {
  width: 50px;
  height: 50px;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
}
.ai-head span { color: var(--muted); }
.thinking { display: none; gap: 10px; color: var(--muted); }
.thinking i {
  width: 16px;
  height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.model-answer { line-height: 1.75; }
.model-answer h2, .model-answer h3, .model-answer h4 { color: var(--navy); }
.model-answer table { width: 100%; border-collapse: collapse; }
.model-answer th, .model-answer td { border: 1px solid var(--line); padding: 10px; vertical-align: top; }
.model-answer th { background: var(--mint); }
.table-wrap { overflow-x: auto; margin: 14px 0; }
.answer-chart {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: var(--mint);
}
.answer-chart figcaption { font-weight: 900; margin-bottom: 12px; color: var(--navy); }
.chart-row { display: grid; grid-template-columns: 110px 1fr 70px; gap: 10px; align-items: center; margin: 8px 0; }
.chart-row i { height: 12px; border-radius: 99px; background: rgba(0,168,200,.12); overflow: hidden; }
.chart-row em { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--teal)); }
.notice {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #eed6a6;
  background: var(--warning-bg);
  color: #684418;
}
body[data-theme="dark"] .notice { background: #1f1b10; color: #f2d7a4; }
.followup {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
}
.followup textarea { border: 0; outline: 0; resize: vertical; background: transparent; color: var(--ink); }
.followup button { border: 0; border-radius: 14px; background: var(--cyan); color: white; font-size: 20px; }
.feedback { margin-top: 18px; display: flex; gap: 10px; align-items: center; color: var(--muted); }
.feedback button { border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); padding: 8px 12px; }
.source-item {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.source-item span {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--cyan);
  font-weight: 900;
}
.source-item small { color: var(--muted); }
.full-source { margin-top: 14px; }

.modal, .settings-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 100;
}
.modal.open, .settings-modal.open { display: block; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1,8,18,.48);
  backdrop-filter: blur(8px);
}
.modal-card {
  position: relative;
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  margin: 24px auto;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.modal-close {
  position: absolute;
  right: 18px;
  top: 18px;
}
.modal-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  font-weight: 900;
  margin-bottom: 12px;
}
.modal-card h2 { color: var(--navy); }
.modal-card p, .modal-card li { color: var(--muted); line-height: 1.75; }
.demo-form, .profile-form {
  display: grid;
  gap: 12px;
}
.demo-form label, .profile-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}
.demo-form input, .demo-form select, .profile-form input {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  color: var(--ink);
  background: var(--surface);
}
.modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.modal-grid div, .announcement-list article {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: var(--mint);
}
.announcement-list { display: grid; gap: 12px; }
.announcement-list span { color: var(--cyan); font-size: 12px; font-weight: 800; }

.settings-card {
  position: relative;
  width: min(1040px, calc(100vw - 40px));
  height: min(760px, calc(100vh - 48px));
  margin: 24px auto;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 260px 1fr;
}
.settings-nav {
  padding: 24px;
  border-right: 1px solid var(--line);
  background: var(--mint);
  display: grid;
  align-content: start;
  gap: 10px;
}
.settings-nav h2 { color: var(--navy); }
.settings-nav button {
  border: 0;
  border-radius: 14px;
  padding: 12px;
  text-align: left;
  color: var(--ink);
  background: transparent;
}
.settings-nav button.active { background: var(--surface); color: var(--cyan); font-weight: 900; }
.settings-body {
  padding: 28px;
  overflow: auto;
}
.settings-pane { display: none; }
.settings-pane.active { display: block; }
.settings-pane h3 { margin-top: 0; color: var(--navy); font-size: 28px; }
.profile-form { grid-template-columns: 90px 1fr 1fr; align-items: start; }
.profile-form .large-avatar { grid-row: span 3; }
.settings-actions { margin-top: 20px; display: flex; gap: 10px; }
.theme-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.theme-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  display: grid;
  gap: 8px;
}
.theme-card.active { border-color: var(--cyan); box-shadow: 0 12px 32px rgba(0,168,200,.13); }
.theme-card span {
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, #effbfc, #fff, #d9f7f6);
}
.theme-card[data-theme="dark"] span {
  background: linear-gradient(135deg, #020814, #071523, #123553);
}
.linking-list, .compliance-list { display: grid; gap: 12px; }
.linking-list div {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
}
.linking-list span, .compliance-list small { color: var(--muted); }
.linking-list button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 12px;
}
.compliance-list div {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px 12px;
}
.compliance-list span {
  width: 28px;
  height: 28px;
  border-radius: 99px;
  background: rgba(22,185,120,.14);
  color: #16b978;
  display: grid;
  place-items: center;
  font-weight: 900;
  grid-row: span 2;
}
.agreement-box {
  margin-top: 16px;
  height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: var(--mint);
  line-height: 1.75;
}
.agreement-box p { color: var(--muted); }
.agree-row { display: flex; gap: 8px; margin: 14px 0; color: var(--ink); }
.agree-row input { accent-color: var(--cyan); }
.primary-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.inbox-panel {
  position: fixed;
  right: 22px;
  top: 82px;
  width: 360px;
  max-width: calc(100vw - 44px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
  z-index: 70;
  display: none;
}
.inbox-panel.open { display: grid; gap: 12px; }
.inbox-panel article {
  padding: 12px;
  border-radius: 16px;
  background: var(--mint);
  border: 1px solid var(--line);
}
.inbox-panel p { margin: 5px 0; color: var(--muted); }
.inbox-panel span { color: var(--cyan); font-size: 12px; }
.inbox-panel .panel-head button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 22px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  border-radius: 999px;
  background: var(--navy);
  color: white;
  padding: 12px 18px;
  box-shadow: var(--shadow);
  transition: .2s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 1080px) {
  .app-shell, .app-shell:has(.sidebar.is-compact) { grid-template-columns: 82px 1fr; }
  .sidebar { padding: 14px 10px; }
  .sidebar .nav-label, .sidebar .history, .sidebar .side-card, .sidebar .profile-text, .sidebar .new-chat kbd, .sidebar .nav-item em { display: none; }
  .sidebar .new-chat, .sidebar .nav-item { justify-content: center; padding: 0; }
  .specialties, .metric-grid, .evidence-grid, .project-grid { grid-template-columns: repeat(2, 1fr); }
  .rwd-story, .network-map, .answer-layout, .data-layout, .calculator-shell { grid-template-columns: 1fr; }
  .calculator-list { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 720px) {
  .main { padding: 14px; }
  .topbar { align-items: flex-start; gap: 12px; }
  .status-pill { display: none; }
  .stage-brand strong { font-size: 52px; letter-spacing: -2px; }
  .tools span { display: none; }
  .specialties, .metric-grid, .evidence-grid, .project-grid, .calc-form, .modal-grid, .theme-options { grid-template-columns: 1fr; }
  .page-head, .privacy-banner, .calc-result { flex-direction: column; align-items: flex-start; }
  .rwd-flow { grid-template-columns: 1fr; }
  .rwd-flow i { display: none; }
  .settings-card { grid-template-columns: 1fr; height: calc(100vh - 32px); margin: 16px auto; }
  .settings-nav { border-right: 0; border-bottom: 1px solid var(--line); }
  .profile-form { grid-template-columns: 1fr; }
}

/* v2 visual correction: restore the previous clean homepage composition */
.app-shell:has(.sidebar.is-compact) {
  grid-template-columns: 1fr;
}

.app-shell:has(.sidebar.is-compact) .main {
  grid-column: 1;
}

.sidebar.is-compact {
  position: fixed;
  inset: 0 auto auto 0;
  width: 0;
  height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  overflow: visible;
  z-index: 80;
}

.sidebar.is-compact .side-top {
  position: fixed;
  left: 28px;
  top: 24px;
  z-index: 90;
}

.sidebar.is-compact .brand-mini,
.sidebar.is-compact .new-chat,
.sidebar.is-compact .main-nav,
.sidebar.is-compact .history,
.sidebar.is-compact .side-card,
.sidebar.is-compact .profile {
  display: none;
}

.sidebar.is-compact .sidebar-toggle {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #6d8797;
  font-size: 26px;
  line-height: 1;
}

.sidebar:not(.is-compact) {
  position: sticky;
  width: var(--sidebar);
}

.sidebar:not(.is-compact) .brand-mini {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  overflow: hidden;
}

.sidebar:not(.is-compact) .brand-mini img {
  width: 252px;
  height: auto;
  max-width: none;
  transform: translate(-23px, -27px);
}

.main {
  padding: 0;
}

.topbar {
  position: fixed;
  right: 28px;
  top: 22px;
  z-index: 70;
  width: auto;
  min-height: auto;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
}

.topbar .crumb {
  display: none;
}

.top-actions {
  gap: 8px;
}

.top-actions .status-pill {
  font-size: 12px;
  padding: 8px 11px;
  opacity: .82;
}

.top-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.78);
  box-shadow: 0 10px 30px rgba(23,54,95,.10);
}

.view:not(#view-assistant),
.answer-view {
  padding: 86px 22px 34px;
}

#view-assistant {
  padding: 0;
}

.search-stage {
  position: relative;
  min-height: 100vh;
  padding: 9vh 24px 6vh;
  overflow: hidden;
  justify-content: center;
  gap: 22px;
}

.search-stage::before,
.search-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 53%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
}

.search-stage::before {
  width: min(1160px, 72vw);
  height: min(1160px, 72vw);
  border: 120px solid rgba(0, 168, 200, .045);
}

.search-stage::after {
  width: min(760px, 47vw);
  height: min(760px, 47vw);
  background: rgba(255,255,255,.22);
  box-shadow: inset 0 0 0 1px rgba(0,168,200,.025);
}

.stage-brand,
.composer,
.stage-note {
  position: relative;
  z-index: 1;
}

.stage-brand {
  gap: 6px;
  margin-top: -4vh;
  margin-bottom: 18px;
}

.stage-logo {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
  filter: drop-shadow(0 22px 44px rgba(0,168,200,.22));
}

.stage-logo img {
  width: 596px;
  height: auto;
  max-width: none;
  transform: translate(-55px, -60px);
}

.stage-brand strong {
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(54px, 5.2vw, 74px);
  line-height: .98;
  letter-spacing: -3px;
  color: #17365f;
  text-shadow: 0 10px 28px rgba(23,54,95,.06);
}

.stage-brand sup {
  font-size: .18em;
  top: -.45em;
  position: relative;
}

.stage-brand span {
  color: #008f9b;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .22em;
}

.composer {
  width: min(1060px, 62vw);
  min-width: 760px;
  border-radius: 24px;
  padding: 14px 16px 13px;
  background: rgba(255,255,255,.91);
  box-shadow: 0 28px 90px rgba(23,54,95,.15);
}

.composer textarea {
  min-height: 92px;
  padding: 18px 6px 14px;
  font-size: 18px;
}

.composer-meta {
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(203,231,237,.72);
  font-size: 14px;
}

.composer-footer {
  align-items: flex-end;
}

.tools button {
  border: 0;
  background: transparent;
  color: #6e8495;
  padding: 6px 8px;
  font-size: 13px;
}

.send-btn {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  box-shadow: 0 12px 28px rgba(0,168,200,.25);
}

.stage-note {
  margin-top: -3px;
  font-size: 13px;
}

.quick-prompts {
  display: none;
}

.home-scroll {
  padding: 0 22px;
}

body[data-theme="dark"] .stage-brand strong {
  color: #d7ecff;
}

body[data-theme="dark"] .stage-brand span {
  color: #48dccf;
}

body[data-theme="dark"] .composer,
body[data-theme="dark"] .top-icon {
  background: rgba(7,21,35,.88);
}

@media (max-width: 1280px) {
  .composer {
    width: min(920px, 74vw);
    min-width: 0;
  }
}

/* final reference alignment: match the earlier premium OpenEvidence-like visual scale */
body::before {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 112px;
  z-index: 50;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.80), rgba(255,255,255,.42) 58%, rgba(255,255,255,0));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(203,231,237,.42);
}

.sidebar.is-compact .side-top,
.topbar {
  z-index: 90;
}

.search-stage {
  min-height: 100vh;
  padding-top: 8.2vh;
  padding-bottom: 3.8vh;
}

.search-stage::before {
  width: min(1160px, 58vw);
  height: min(1160px, 58vw);
  border-width: clamp(72px, 6.5vw, 118px);
  border-color: rgba(0,168,200,.033);
  top: 54.5%;
}

.search-stage::after {
  width: min(760px, 38vw);
  height: min(760px, 38vw);
  top: 55%;
}

.stage-brand {
  margin-top: -5.3vh;
  margin-bottom: 22px;
  gap: 4px;
}

.stage-logo {
  width: clamp(76px, 5.8vw, 118px);
  height: clamp(76px, 5.8vw, 118px);
}

.stage-brand strong {
  font-size: clamp(36px, 3.05vw, 58px);
  letter-spacing: -2.4px;
  font-weight: 400;
}

.stage-brand span {
  font-size: clamp(9px, .68vw, 13px);
  letter-spacing: .22em;
  font-weight: 800;
}

.composer {
  width: min(1072px, 52.5vw);
  min-width: 0;
  height: clamp(138px, 10.7vw, 216px);
  padding: 13px 16px 12px;
  border-radius: 20px;
  box-shadow:
    0 34px 90px rgba(23,54,95,.12),
    0 1px 0 rgba(255,255,255,.96) inset;
}

.composer-meta {
  padding-bottom: 8px;
  font-size: clamp(11px, .66vw, 13px);
}

.composer textarea {
  min-height: 54px;
  height: calc(100% - 86px);
  padding: 16px 6px 8px;
  font-size: clamp(14px, .86vw, 18px);
}

.composer-footer {
  min-height: 36px;
}

.tools button {
  font-size: clamp(10px, .58vw, 13px);
  padding: 4px 8px;
}

.send-btn {
  width: clamp(38px, 2.35vw, 48px);
  height: clamp(38px, 2.35vw, 48px);
  border-radius: 14px;
}

.stage-note {
  font-size: clamp(10px, .58vw, 12px);
  margin-top: 1px;
}

.stage-note::after {
  content: "向下探索 OpenWellM";
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  color: #7a93a1;
  font-size: 13px;
}

.home-scroll {
  max-width: none;
  padding: 0;
  gap: 0;
}

.brand-story,
.home-section,
.rwd-story,
.conversation-section {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.brand-story {
  min-height: 100vh;
  padding: 24vh 8vw 12vh;
  text-align: center;
  display: grid;
  align-content: center;
  justify-items: center;
  background:
    radial-gradient(circle at 50% 22%, rgba(0,168,200,.12), transparent 16%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,252,252,.96));
}

.brand-story::after {
  display: none;
}

.brand-story .eyebrow span {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.brand-story .eyebrow span::before,
.brand-story .eyebrow span::after {
  content: "";
  width: 42px;
  height: 1px;
  background: rgba(0,143,155,.44);
}

.brand-story h1 {
  max-width: 900px;
  margin: 18px 0 18px;
  color: #17365f;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(48px, 4.2vw, 86px);
  line-height: 1.16;
  letter-spacing: -2px;
  font-weight: 360;
}

.brand-story strong {
  display: inline-block;
  color: #0f8f95;
  font-weight: 420;
}

.hero-sub {
  max-width: 760px;
  text-align: center;
  font-size: clamp(15px, .95vw, 18px);
  line-height: 1.9;
  color: #718899;
}

.brand-metrics {
  display: none;
}

.specialty-section {
  min-height: 86vh;
  padding: 18vh 9vw 12vh;
  background: linear-gradient(180deg, rgba(244,252,252,.96), rgba(250,253,253,.98));
}

.specialty-section .home-section-head {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  gap: 14px;
  margin-bottom: 58px;
}

.specialty-section .home-section-head h2 {
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(34px, 2.6vw, 54px);
  font-weight: 420;
  letter-spacing: -1px;
}

.specialty-section .home-section-head p {
  max-width: 620px;
  font-size: clamp(14px, .82vw, 17px);
  color: #7c90a0;
}

.specialties {
  max-width: 1380px;
  margin: 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.specialty {
  min-height: 146px;
  padding: 34px 28px;
  display: grid;
  grid-template-columns: 66px 1fr;
  align-items: center;
  align-content: center;
  gap: 0 22px;
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(198,226,232,.82);
  box-shadow: 0 20px 60px rgba(23,54,95,.045);
}

.specialty.active {
  border: 2px solid rgba(18,184,199,.70);
}

.spec-icon {
  grid-row: span 2;
  width: 54px;
  height: 54px;
  border-radius: 16px;
}

.specialty b {
  font-size: clamp(17px, 1.05vw, 22px);
  font-weight: 650;
  color: #17365f;
}

.specialty small {
  font-size: clamp(12px, .66vw, 14px);
}

.rwd-story {
  min-height: 72vh;
  padding: 15vh 6.8vw 14vh;
  display: grid;
  grid-template-columns: .85fr 1.45fr;
  align-items: center;
  gap: 8vw;
  background: linear-gradient(115deg, #123a5e 0%, #135d68 100%);
  color: white;
}

.rwd-copy span {
  color: #19b6bc;
  font-weight: 800;
  letter-spacing: .18em;
}

.rwd-copy h2 {
  color: white;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(40px, 3.25vw, 70px);
  font-weight: 420;
  line-height: 1.15;
  letter-spacing: -1.2px;
}

.rwd-copy p {
  max-width: 590px;
  color: rgba(220,244,247,.82);
  font-size: clamp(14px, .78vw, 16px);
}

.rwd-flow {
  grid-template-columns: 1fr auto 1fr auto 1fr;
}

.rwd-flow div {
  min-height: 184px;
  padding: 34px 30px;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: none;
  color: white;
}

.rwd-flow span {
  color: #54d5d3;
}

.rwd-flow b {
  color: white;
}

.rwd-flow small {
  color: rgba(220,244,247,.72);
}

.rwd-flow i {
  color: #54d5d3;
}

.conversation-section {
  min-height: 46vh;
  padding: 13vh 7vw 10vh;
  text-align: center;
  background: #fff;
}

.conversation-section .home-section-head {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.conversation-section h2 {
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(32px, 2.35vw, 52px);
  font-weight: 420;
  color: #17365f;
}

.conversation-prompts {
  margin-top: 54px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  color: #8da0ad;
}

.conversation-prompts button {
  border: 1px solid rgba(198,226,232,.92);
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  color: #60798b;
  padding: 9px 18px;
}

.topbar {
  background: transparent;
}

.top-actions .status-pill,
.top-icon {
  background: rgba(255,255,255,.58);
  border-color: rgba(203,231,237,.62);
  box-shadow: 0 12px 34px rgba(23,54,95,.08);
}

@media (max-width: 1280px) {
  .composer {
    width: min(900px, 72vw);
    height: 206px;
  }

  .stage-brand strong {
    font-size: 58px;
  }

  .stage-logo {
    width: 116px;
    height: 116px;
  }
}

@media (max-width: 900px) {
  body::before {
    height: 82px;
  }

  .composer {
    width: min(680px, 88vw);
  }

  .specialties,
  .rwd-story,
  .rwd-flow {
    grid-template-columns: 1fr;
  }

  .rwd-flow i {
    display: none;
  }
}

@media (max-width: 720px) {
  .stage-brand {
    margin-top: 0;
  }

  .stage-brand strong {
    font-size: 42px;
  }

  .stage-logo {
    width: 92px;
    height: 92px;
  }

  .composer {
    width: 100%;
    height: 188px;
  }

  .brand-story h1 {
    font-size: 40px;
  }
}

/* final hero proportion lock */
@media (min-width: 901px) {
  .search-stage {
    justify-content: flex-start;
    padding-top: 0;
  }

  .stage-brand {
    margin-top: clamp(190px, 30vh, 360px);
    margin-bottom: 20px;
    transform: none;
  }

  .stage-logo {
    width: clamp(82px, 5.2vw, 112px);
    height: clamp(82px, 5.2vw, 112px);
  }

  .stage-brand strong {
    font-size: clamp(38px, 2.65vw, 56px);
    letter-spacing: -2.1px;
  }

  .stage-brand span {
    font-size: clamp(9px, .58vw, 12px);
  }

  .composer {
    width: min(1072px, 52.4vw);
    height: clamp(132px, 10.4vw, 214px);
    min-width: 0;
  }

  .composer textarea {
    height: calc(100% - 82px);
    min-height: 42px;
    font-size: clamp(13px, .78vw, 17px);
  }

  .tools button {
    font-size: clamp(10px, .54vw, 12px);
  }

  .send-btn {
    width: clamp(36px, 2.22vw, 46px);
    height: clamp(36px, 2.22vw, 46px);
  }

  .stage-note {
    font-size: clamp(10px, .54vw, 12px);
  }
}

/* premium homepage refresh */
body {
  background:
    radial-gradient(circle at 50% 46%, rgba(255,255,255,.72) 0 24%, rgba(216,244,246,.48) 24.2% 38%, transparent 38.3%),
    radial-gradient(circle at 50% 49%, transparent 0 34%, rgba(0,168,200,.048) 34.2% 47%, transparent 47.2%),
    radial-gradient(circle at 50% 50%, transparent 0 44%, rgba(34,184,169,.038) 44.2% 58%, transparent 58.3%),
    linear-gradient(135deg, #f9fdfd 0%, #effafa 45%, #e8f7f8 100%);
}

.search-stage::before {
  border-color: rgba(0, 168, 200, .032);
}

.search-stage::after {
  background: rgba(255,255,255,.20);
}

.stage-logo {
  width: 122px;
  height: 122px;
  border-radius: 0;
  overflow: visible;
  filter: drop-shadow(0 26px 42px rgba(0, 168, 200, .18));
}

.stage-logo img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  transform: none;
}

.stage-brand {
  margin-top: -2vh;
  margin-bottom: 22px;
}

.stage-brand strong {
  font-size: clamp(50px, 4.7vw, 68px);
  font-weight: 400;
  letter-spacing: -3.6px;
  color: #1b3760;
}

.stage-brand span {
  margin-top: 3px;
  color: #008f9b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .24em;
}

.composer {
  width: min(1060px, 58vw);
  min-width: 820px;
  border: 1px solid rgba(166, 218, 227, .78);
  border-radius: 22px;
  background: rgba(255,255,255,.88);
  box-shadow:
    0 34px 100px rgba(23,54,95,.10),
    0 1px 0 rgba(255,255,255,.92) inset;
}

.composer-meta {
  font-size: 13px;
}

.composer-meta span {
  font-weight: 650;
}

.composer textarea {
  min-height: 96px;
  font-size: 17px;
  font-weight: 350;
  letter-spacing: -.01em;
}

.composer textarea::placeholder {
  color: #8da3b0;
}

.tools button {
  font-weight: 400;
}

.send-btn {
  background: linear-gradient(145deg, #12b8c7, #0c8fa5);
}

.stage-note {
  color: #8499a6;
  font-weight: 350;
}

.top-actions .status-pill,
.top-icon {
  background: rgba(255,255,255,.66);
  backdrop-filter: blur(18px);
}

.home-scroll {
  max-width: 1180px;
  gap: 26px;
  padding: 26px 24px 96px;
}

.brand-story,
.home-section,
.rwd-story {
  border-color: rgba(190, 228, 233, .72);
  background:
    linear-gradient(145deg, rgba(255,255,255,.86), rgba(244,252,252,.68));
  box-shadow:
    0 28px 90px rgba(23,54,95,.075),
    0 1px 0 rgba(255,255,255,.9) inset;
}

.brand-story {
  position: relative;
  overflow: hidden;
  padding: 72px 78px;
  text-align: left;
}

.brand-story::after {
  content: "";
  position: absolute;
  right: -110px;
  top: -150px;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  border: 82px solid rgba(0,168,200,.045);
}

.eyebrow,
.kicker {
  font-weight: 700;
  letter-spacing: .18em;
}

.brand-story h1 {
  max-width: 820px;
  font-size: clamp(42px, 5vw, 76px);
  font-weight: 350;
  letter-spacing: -2.8px;
  line-height: 1.04;
}

.brand-story strong {
  font-weight: 380;
  color: #16365f;
}

.hero-sub {
  max-width: 760px;
  font-size: 18px;
  font-weight: 350;
  line-height: 1.9;
  color: #617b8c;
}

.brand-metrics {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.brand-metrics span {
  min-width: 160px;
  padding: 16px 18px;
  border: 1px solid rgba(190,228,233,.76);
  border-radius: 20px;
  background: rgba(255,255,255,.62);
  color: #698292;
  font-weight: 350;
}

.brand-metrics b {
  display: block;
  color: #0f8fa2;
  font-size: 28px;
  font-weight: 450;
  line-height: 1.1;
}

.home-section {
  padding: 44px;
}

.home-section-head {
  grid-template-columns: minmax(260px, 480px) 1fr;
  gap: 16px 54px;
  align-items: end;
}

.home-section-head span {
  grid-column: 1 / -1;
}

.home-section-head h2 {
  font-size: clamp(30px, 3vw, 46px);
  font-weight: 380;
  letter-spacing: -1.4px;
  line-height: 1.14;
}

.home-section-head p {
  font-size: 16px;
  line-height: 1.9;
  font-weight: 350;
}

.specialties {
  margin-top: 26px;
}

.specialty {
  min-height: 184px;
  padding: 22px;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.84), rgba(239,251,252,.58));
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.specialty:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 60px rgba(23,54,95,.09);
}

.specialty b {
  font-size: 19px;
  font-weight: 500;
  color: #17365f;
}

.specialty small {
  font-size: 13px;
  font-weight: 350;
}

.spec-icon {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: rgba(0,168,200,.075);
  font-weight: 500;
}

.rwd-story {
  padding: 48px;
  grid-template-columns: minmax(320px, .92fr) 1.08fr;
}

.rwd-copy h2 {
  font-size: clamp(34px, 3.6vw, 58px);
  font-weight: 360;
  letter-spacing: -2px;
}

.rwd-copy p {
  font-size: 16px;
  font-weight: 350;
}

.primary-btn {
  font-weight: 550;
  box-shadow: 0 16px 36px rgba(0,168,200,.16);
}

.rwd-flow div {
  min-height: 184px;
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.78), rgba(234,249,250,.72));
}

.rwd-flow span {
  font-weight: 500;
  letter-spacing: .08em;
}

.rwd-flow b {
  font-size: 18px;
  font-weight: 500;
}

.rwd-flow small {
  line-height: 1.6;
  font-weight: 350;
}

.sidebar:not(.is-compact) .brand-mini img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  transform: none;
}

.orbit-core img {
  width: 82px;
  height: 82px;
  object-fit: contain;
}

body[data-theme="dark"] {
  background:
    radial-gradient(circle at 50% 42%, rgba(33,209,238,.12), transparent 32%),
    radial-gradient(circle at 50% 50%, transparent 0 42%, rgba(33,209,238,.06) 42.2% 54%, transparent 54.4%),
    linear-gradient(135deg, #020814 0%, #071523 55%, #0a1e2c 100%);
}

body[data-theme="dark"] .brand-story,
body[data-theme="dark"] .home-section,
body[data-theme="dark"] .rwd-story {
  background: linear-gradient(145deg, rgba(7,21,35,.86), rgba(8,32,46,.72));
}

body[data-theme="dark"] .brand-story strong,
body[data-theme="dark"] .specialty b,
body[data-theme="dark"] .home-section-head h2,
body[data-theme="dark"] .rwd-copy h2 {
  color: #d7ecff;
}

@media (max-width: 1280px) {
  .composer {
    width: min(980px, 76vw);
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .home-section-head,
  .rwd-story {
    grid-template-columns: 1fr;
  }

  .brand-story {
    padding: 46px 30px;
  }
}

@media (max-width: 720px) {
  .stage-logo {
    width: 102px;
    height: 102px;
  }

  .stage-logo img {
    width: 100%;
    height: 100%;
    transform: none;
  }

  .stage-brand strong {
    font-size: 43px;
    letter-spacing: -2.4px;
  }

  .composer {
    width: 100%;
    min-width: 0;
  }

  .brand-metrics,
  .specialties {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1080px) {
  .app-shell,
  .app-shell:has(.sidebar.is-compact) {
    grid-template-columns: 1fr;
  }

  .sidebar:not(.is-compact) {
    position: fixed;
    width: min(292px, calc(100vw - 32px));
    left: 0;
    top: 0;
    z-index: 95;
  }

  .composer {
    width: min(860px, 86vw);
  }

  .stage-brand strong {
    font-size: clamp(48px, 7vw, 68px);
  }
}

@media (max-width: 720px) {
  .sidebar.is-compact .side-top {
    left: 14px;
    top: 12px;
  }

  .topbar {
    right: 14px;
    top: 12px;
  }

  .top-actions .status-pill {
    display: none;
  }

  .search-stage {
    padding: 86px 18px 40px;
  }

  .search-stage::before {
    width: 720px;
    height: 720px;
    border-width: 74px;
  }

  .search-stage::after {
    width: 430px;
    height: 430px;
  }

  .stage-logo {
    width: 108px;
    height: 108px;
  }

  .stage-logo img {
    width: 488px;
    transform: translate(-45px, -49px);
  }

  .stage-brand strong {
    font-size: 44px;
    letter-spacing: -2px;
  }

  .stage-brand span {
    font-size: 10px;
  }

  .composer {
    width: 100%;
    min-width: 0;
  }
}

/* absolute final override: reference screenshots scale and viewport */
@media (min-width: 901px) {
  .search-stage {
    justify-content: flex-start !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .stage-brand {
    margin-top: clamp(190px, 30vh, 360px) !important;
    margin-bottom: 20px !important;
    gap: 4px !important;
  }

  .stage-logo {
    width: clamp(82px, 5.2vw, 112px) !important;
    height: clamp(82px, 5.2vw, 112px) !important;
  }

  .stage-logo img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: contain !important;
    transform: none !important;
  }

  .stage-brand strong {
    font-size: clamp(38px, 2.65vw, 56px) !important;
    letter-spacing: -2.1px !important;
    font-weight: 400 !important;
  }

  .stage-brand span {
    font-size: clamp(9px, .58vw, 12px) !important;
    letter-spacing: .22em !important;
  }

  .composer {
    width: min(1072px, 52.4vw) !important;
    min-width: 0 !important;
    height: clamp(132px, 10.4vw, 214px) !important;
    border-radius: 20px !important;
  }

  .composer textarea {
    height: calc(100% - 82px) !important;
    min-height: 42px !important;
    font-size: clamp(13px, .78vw, 17px) !important;
  }
}

.home-scroll {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  gap: 0 !important;
}

.brand-story,
.home-section,
.rwd-story,
.conversation-section {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.brand-metrics {
  display: none !important;
}

.rwd-story {
  min-height: 72vh !important;
  padding: 15vh 6.8vw 14vh !important;
  display: grid !important;
  grid-template-columns: .85fr 1.45fr !important;
  align-items: center !important;
  gap: 8vw !important;
  background: linear-gradient(115deg, #123a5e 0%, #135d68 100%) !important;
  color: white !important;
}

.rwd-copy span {
  color: #18b8bf !important;
}

.rwd-copy h2 {
  color: white !important;
}

.rwd-copy p {
  color: rgba(220,244,247,.82) !important;
}

.rwd-flow div {
  background: rgba(255,255,255,.09) !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  color: white !important;
}

.rwd-flow span,
.rwd-flow i {
  color: #54d5d3 !important;
}

.rwd-flow b {
  color: white !important;
}

.rwd-flow small {
  color: rgba(220,244,247,.72) !important;
}

@media (max-width: 900px) {
  .rwd-story {
    grid-template-columns: 1fr !important;
  }
}

/* requested interaction corrections */
:root {
  --sidebar-compact: 56px;
}

body::before {
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}

body.is-scrolled::before {
  opacity: 1;
  visibility: visible;
}

body:has(.sidebar:not(.is-compact))::before {
  opacity: 0 !important;
  visibility: hidden !important;
}

.app-shell:has(.sidebar.is-compact) {
  grid-template-columns: var(--sidebar-compact) 1fr !important;
}

.app-shell:has(.sidebar.is-compact) .main {
  grid-column: 2 !important;
}

.sidebar {
  z-index: 120;
}

.sidebar.is-compact {
  position: sticky !important;
  top: 0 !important;
  width: var(--sidebar-compact) !important;
  height: 100vh !important;
  padding: 14px 6px !important;
  border-right: 1px solid rgba(203,231,237,.72) !important;
  background: rgba(255,255,255,.78) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  overflow: visible !important;
  display: flex !important;
  gap: 12px !important;
}

.sidebar.is-compact .side-top {
  position: static !important;
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
}

.sidebar.is-compact .sidebar-toggle {
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
  border: 0 !important;
  background: transparent !important;
  color: #657783 !important;
  font-size: 22px !important;
}

.sidebar.is-compact .brand-mini,
.sidebar.is-compact .history,
.sidebar.is-compact .side-card,
.sidebar.is-compact .profile,
.sidebar.is-compact .nav-label,
.sidebar.is-compact .new-chat kbd,
.sidebar.is-compact .nav-item em {
  display: none !important;
}

.sidebar.is-compact .new-chat,
.sidebar.is-compact .main-nav {
  display: grid !important;
  width: 100% !important;
}

.sidebar.is-compact .new-chat,
.sidebar.is-compact .nav-item {
  width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  border-radius: 12px !important;
  justify-content: center !important;
  justify-self: center !important;
  background: transparent !important;
  box-shadow: none !important;
}

.sidebar.is-compact .new-chat:hover,
.sidebar.is-compact .nav-item:hover,
.sidebar.is-compact .nav-item.active {
  background: rgba(13,47,77,.08) !important;
}

.sidebar.is-compact .nav-item.active::before {
  display: none !important;
}

.sidebar.is-compact .nav-icon {
  width: 28px !important;
  height: 28px !important;
  flex-basis: 28px !important;
  background: transparent !important;
  color: #5f707a !important;
  font-size: 18px !important;
}

.sidebar.is-compact .nav-item.active .nav-icon,
.sidebar.is-compact .new-chat .nav-icon {
  color: #12aebb !important;
}

.topbar {
  right: 26px !important;
}

.conversation-section {
  min-height: 48vh !important;
  padding: 12vh 7vw 11vh !important;
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
  text-align: center !important;
}

.conversation-section .home-section-head {
  display: grid !important;
  justify-items: center !important;
  text-align: center !important;
  gap: 12px !important;
  margin: 0 !important;
}

.conversation-section .home-section-head span {
  color: #0f9aa5 !important;
  font-size: 13px !important;
  letter-spacing: .22em !important;
  font-weight: 800 !important;
}

.conversation-section h2 {
  margin: 0 !important;
  font-family: Georgia, "Times New Roman", "Songti SC", serif !important;
  font-size: clamp(32px, 2.25vw, 50px) !important;
  line-height: 1.18 !important;
  font-weight: 420 !important;
  color: #17365f !important;
}

.conversation-prompts {
  margin-top: 58px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.conversation-prompts > span {
  color: #8ba0ad !important;
  font-size: 14px !important;
}

.conversation-prompts button {
  min-height: 32px !important;
  padding: 7px 17px !important;
  border: 1px solid rgba(198,226,232,.92) !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.82) !important;
  color: #60798b !important;
  font-size: 14px !important;
}

.conversation-trust {
  margin-top: 44px !important;
  display: flex !important;
  justify-content: center !important;
  gap: 38px !important;
  flex-wrap: wrap !important;
  color: #7e95a3 !important;
  font-size: 13px !important;
}

.conversation-trust span::first-letter {
  color: #10aab5;
}

body.is-near-bottom .stage-note::after {
  opacity: 0 !important;
  transform: translateX(-50%) translateY(8px) !important;
  pointer-events: none !important;
}

.sidebar.is-compact .profile {
  display: flex !important;
  margin-top: auto !important;
  width: 42px !important;
  height: 54px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  justify-content: center !important;
  align-items: center !important;
  justify-self: center !important;
}

.sidebar.is-compact .avatar {
  width: 34px !important;
  height: 34px !important;
  border-radius: 999px !important;
  background: #415762 !important;
  color: #fff !important;
  font-size: 15px !important;
  box-shadow: 0 8px 18px rgba(23,54,95,.14) !important;
}

.sidebar.is-compact .profile .more-btn {
  position: absolute !important;
  inset: 0 !important;
  width: 42px !important;
  height: 54px !important;
  opacity: 0 !important;
  display: block !important;
}

.sidebar.is-compact .profile-menu {
  left: 52px !important;
  right: auto !important;
  bottom: 4px !important;
}

.sponsor-section {
  min-height: 56vh;
  padding: 12vh 0 10vh;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfefe 100%);
  text-align: center;
  overflow: hidden;
}

.sponsor-section .kicker {
  color: #0f9aa5;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .18em;
}

.sponsor-section h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  color: #182f4f;
  font-size: clamp(30px, 2vw, 42px);
  font-weight: 420;
  letter-spacing: -.6px;
}

.sponsor-section p {
  margin: 0 0 42px;
  color: #6f8290;
  font-size: 16px;
}

.sponsor-marquee {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 18px 0 24px;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.sponsor-track {
  width: max-content;
  display: flex;
  align-items: center;
  gap: clamp(42px, 5vw, 96px);
  animation: sponsor-marquee 34s linear infinite;
}

.sponsor-track img {
  width: clamp(120px, 9vw, 180px);
  height: 60px;
  object-fit: contain;
  opacity: .88;
  filter: grayscale(1) saturate(.2) contrast(.98);
}

.sponsor-marquee:hover .sponsor-track {
  animation-play-state: paused;
}

@keyframes sponsor-marquee {
  from { transform: translateX(8vw); }
  to { transform: translateX(-50%); }
}

.sponsor-note {
  margin-top: 18px;
  color: #8a9ca8;
  font-size: 13px;
}

.site-footer {
  padding: 54px 8vw 34px;
  background: #f7f9fa;
  border-top: 1px solid rgba(203, 213, 218, .72);
  display: grid;
  grid-template-columns: 1.35fr .55fr .55fr .55fr 1.45fr;
  gap: 44px;
  color: #596b76;
}

.footer-brand img {
  width: 210px;
  height: auto;
  object-fit: contain;
  margin-bottom: 18px;
  opacity: .9;
}

.footer-brand p {
  max-width: 340px;
  margin: 0;
  color: #72838e;
  line-height: 1.8;
  font-size: 14px;
}

.footer-col {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-col h3,
.footer-subscribe label {
  margin: 0 0 4px;
  color: #22384f;
  font-size: 15px;
  font-weight: 650;
}

.footer-col a,
.footer-col button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #667782;
  text-align: left;
  text-decoration: none;
  font-size: 14px;
}

.footer-col a:hover,
.footer-col button:hover {
  color: #0f9aa5;
}

.footer-subscribe {
  display: grid;
  align-content: start;
  gap: 12px;
}

.footer-subscribe div {
  display: flex;
  gap: 8px;
}

.footer-subscribe input {
  min-width: 0;
  flex: 1;
  border: 1px solid rgba(183,196,203,.82);
  border-radius: 6px;
  background: #fff;
  padding: 12px 14px;
  color: #22384f;
}

.footer-subscribe button {
  border: 1px solid #5d6a72;
  border-radius: 6px;
  background: #fff;
  color: #22384f;
  padding: 0 18px;
  font-weight: 650;
}

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 18px;
  color: #697b86;
  font-size: 13px;
}

.footer-bottom span {
  color: #22384f;
}

.footer-bottom a {
  color: #697b86;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: #0f9aa5;
}

@media (max-width: 1080px) {
  .app-shell,
  .app-shell:has(.sidebar.is-compact) {
    grid-template-columns: var(--sidebar-compact) 1fr !important;
  }
}

@media (max-width: 980px) {
  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand,
  .footer-subscribe,
  .footer-bottom {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .app-shell,
  .app-shell:has(.sidebar.is-compact) {
    grid-template-columns: 0 1fr !important;
  }

  .app-shell:has(.sidebar.is-compact) .main {
    grid-column: 1 !important;
  }

  .sidebar.is-compact {
    width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
  }

  .sidebar.is-compact .side-top {
    position: fixed !important;
    left: 14px !important;
    top: 12px !important;
    width: auto !important;
  }

  .sidebar.is-compact .main-nav,
  .sidebar.is-compact .new-chat {
    display: none !important;
  }

  .sidebar.is-compact .profile {
    display: none !important;
  }

  .site-footer {
    grid-template-columns: 1fr;
    padding: 42px 24px 28px;
  }

  .footer-brand,
  .footer-subscribe,
  .footer-bottom {
    grid-column: auto;
  }

  .footer-subscribe div {
    flex-direction: column;
  }

  .sponsor-section {
    padding: 10vh 0 8vh;
  }
}

/* final brand polish: hero logo, rings, and rebuilt dark mode */
@media (min-width: 901px) {
  .search-stage {
    min-height: 100vh !important;
    justify-content: flex-start !important;
    padding-top: 0 !important;
  }

  .stage-brand {
    margin-top: clamp(198px, 28vh, 312px) !important;
    margin-bottom: 44px !important;
    gap: 0 !important;
  }

  .stage-logo {
    width: clamp(108px, 6.1vw, 126px) !important;
    height: clamp(108px, 6.1vw, 126px) !important;
    margin-bottom: 24px !important;
  }

  .stage-brand strong {
    position: relative !important;
    display: inline-block !important;
    font-size: clamp(50px, 4.35vw, 68px) !important;
    line-height: .9 !important;
    letter-spacing: -3.1px !important;
    font-weight: 400 !important;
  }

  .stage-brand sup {
    position: absolute !important;
    left: calc(100% + 5px) !important;
    top: .02em !important;
    font-size: .18em !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
  }

  .stage-brand span {
    display: block !important;
    margin-top: 17px !important;
    padding-left: .22em !important;
    color: #008d98 !important;
    font-size: clamp(10px, .58vw, 12px) !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    letter-spacing: .255em !important;
  }
}

body {
  background:
    radial-gradient(circle at 50% 52%, rgba(255,255,255,.90) 0 25.5%, rgba(226,248,249,.58) 25.7% 40.2%, transparent 40.4%),
    radial-gradient(circle at 50% 52%, transparent 0 34.8%, rgba(15,170,181,.043) 35% 49.5%, transparent 49.7%),
    radial-gradient(circle at 50% 52%, transparent 0 47.5%, rgba(15,170,181,.036) 47.8% 61.5%, transparent 61.7%),
    linear-gradient(135deg, #fbfefe 0%, #f2fbfb 48%, #e8f7f8 100%) !important;
}

.search-stage::before {
  inset: clamp(76px, 8.4vw, 124px) clamp(235px, 21vw, 430px) auto !important;
  width: auto !important;
  height: min(78vw, 1040px) !important;
  aspect-ratio: 1 / 1 !important;
  margin: 0 auto !important;
  border-width: clamp(78px, 7.2vw, 138px) !important;
  border-color: rgba(15, 170, 181, .036) !important;
  border-radius: 50% !important;
  transform: none !important;
}

.search-stage::after {
  inset: clamp(155px, 15vw, 250px) clamp(405px, 31vw, 650px) auto !important;
  width: auto !important;
  height: min(52vw, 700px) !important;
  aspect-ratio: 1 / 1 !important;
  margin: 0 auto !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.30) !important;
  box-shadow: 0 0 0 1px rgba(15,170,181,.018) inset !important;
  transform: none !important;
}

body[data-theme="dark"] {
  --navy: #d9edff;
  --ink: #d7e7f4;
  --muted: #9fb7c7;
  --line: rgba(102, 186, 200, .20);
  --soft: rgba(7, 18, 31, .78);
  color: #d7e7f4 !important;
  background:
    radial-gradient(circle at 50% 52%, rgba(17,37,54,.88) 0 25.5%, rgba(18,78,88,.30) 25.7% 40.2%, transparent 40.4%),
    radial-gradient(circle at 50% 52%, transparent 0 34.8%, rgba(41,215,221,.11) 35% 49.5%, transparent 49.7%),
    radial-gradient(circle at 50% 52%, transparent 0 47.5%, rgba(52,221,206,.075) 47.8% 61.5%, transparent 61.7%),
    linear-gradient(135deg, #020712 0%, #061423 45%, #092233 100%) !important;
}

body[data-theme="dark"]::before {
  background:
    linear-gradient(180deg, rgba(3, 11, 19, .78), rgba(3, 11, 19, .35) 58%, rgba(3, 11, 19, 0)) !important;
}

body[data-theme="dark"] .stage-logo {
  filter:
    drop-shadow(0 18px 32px rgba(0, 210, 225, .25))
    drop-shadow(0 0 2px rgba(255, 255, 255, .62)) !important;
}

body[data-theme="dark"] .stage-logo img {
  opacity: 1 !important;
}

body[data-theme="dark"] .search-stage::before {
  border-color: rgba(39, 210, 220, .075) !important;
  box-shadow:
    0 0 120px rgba(0, 208, 222, .08),
    0 0 0 1px rgba(255,255,255,.018) inset !important;
}

body[data-theme="dark"] .search-stage::after {
  background: rgba(14, 45, 63, .22) !important;
  box-shadow:
    0 0 0 1px rgba(89, 220, 226, .035) inset,
    0 34px 120px rgba(0, 0, 0, .16) !important;
}

body[data-theme="dark"] .stage-brand strong {
  color: #e8f4ff !important;
  text-shadow: 0 18px 36px rgba(0,0,0,.32) !important;
}

body[data-theme="dark"] .stage-brand sup {
  color: #a9d8ea !important;
}

body[data-theme="dark"] .stage-brand span {
  color: #37d2d0 !important;
  text-shadow: 0 10px 24px rgba(0,0,0,.34) !important;
}

body[data-theme="dark"] .composer,
body[data-theme="dark"] .brand-story,
body[data-theme="dark"] .home-section,
body[data-theme="dark"] .panel,
body[data-theme="dark"] .page-head,
body[data-theme="dark"] .calculator-shell,
body[data-theme="dark"] .privacy-banner,
body[data-theme="dark"] .network-map {
  background: linear-gradient(145deg, rgba(7, 21, 35, .86), rgba(8, 32, 46, .76)) !important;
  border-color: rgba(91, 209, 219, .22) !important;
  box-shadow:
    0 32px 110px rgba(0, 0, 0, .32),
    0 1px 0 rgba(255,255,255,.08) inset !important;
}

body[data-theme="dark"] .composer-meta,
body[data-theme="dark"] .composer-meta button,
body[data-theme="dark"] .tools button,
body[data-theme="dark"] .stage-note,
body[data-theme="dark"] .home-section-head p,
body[data-theme="dark"] .hero-sub,
body[data-theme="dark"] .specialty small,
body[data-theme="dark"] .conversation-prompts > span,
body[data-theme="dark"] .conversation-trust,
body[data-theme="dark"] .sponsor-section p {
  color: #a5bbca !important;
}

body[data-theme="dark"] .composer textarea,
body[data-theme="dark"] .followup textarea,
body[data-theme="dark"] input,
body[data-theme="dark"] textarea {
  color: #e7f4ff !important;
  background: transparent !important;
}

body[data-theme="dark"] .composer textarea::placeholder,
body[data-theme="dark"] textarea::placeholder,
body[data-theme="dark"] input::placeholder {
  color: #7892a5 !important;
}

body[data-theme="dark"] .composer-meta {
  border-bottom-color: rgba(91, 209, 219, .16) !important;
}

body[data-theme="dark"] .composer-meta span,
body[data-theme="dark"] .home-section-head h2,
body[data-theme="dark"] .brand-story h1,
body[data-theme="dark"] .brand-story strong,
body[data-theme="dark"] .specialty b,
body[data-theme="dark"] .conversation-section h2,
body[data-theme="dark"] .sponsor-section h2,
body[data-theme="dark"] .footer-col h3,
body[data-theme="dark"] .footer-subscribe label {
  color: #e4f2ff !important;
}

body[data-theme="dark"] .sidebar,
body[data-theme="dark"] .sidebar.is-compact {
  background: rgba(3, 11, 20, .82) !important;
  border-right-color: rgba(91, 209, 219, .16) !important;
  color: #dcebf5 !important;
}

body[data-theme="dark"] .nav-icon,
body[data-theme="dark"] .sidebar.is-compact .nav-icon,
body[data-theme="dark"] .sidebar-toggle {
  color: #9fb7c7 !important;
}

body[data-theme="dark"] .nav-item.active,
body[data-theme="dark"] .sidebar.is-compact .nav-item.active,
body[data-theme="dark"] .sidebar.is-compact .new-chat:hover,
body[data-theme="dark"] .sidebar.is-compact .nav-item:hover {
  background: rgba(45, 211, 218, .13) !important;
}

body[data-theme="dark"] .top-actions .status-pill,
body[data-theme="dark"] .top-icon,
body[data-theme="dark"] .top-menu,
body[data-theme="dark"] .profile-menu {
  background: rgba(7, 20, 33, .82) !important;
  border-color: rgba(91, 209, 219, .20) !important;
  color: #dbeef8 !important;
  box-shadow: 0 18px 48px rgba(0,0,0,.28) !important;
}

body[data-theme="dark"] .specialty,
body[data-theme="dark"] .conversation-prompts button,
body[data-theme="dark"] .theme-card,
body[data-theme="dark"] .source-item,
body[data-theme="dark"] .history-item,
body[data-theme="dark"] .footer-subscribe input,
body[data-theme="dark"] .footer-subscribe button {
  background: rgba(8, 25, 40, .72) !important;
  border-color: rgba(91, 209, 219, .18) !important;
  color: #d7e7f4 !important;
}

body[data-theme="dark"] .sponsor-section,
body[data-theme="dark"] .site-footer {
  background: linear-gradient(180deg, #05111d 0%, #071725 100%) !important;
  border-color: rgba(91, 209, 219, .14) !important;
  color: #a5bbca !important;
}

body[data-theme="dark"] .sponsor-track img,
body[data-theme="dark"] .footer-brand img {
  opacity: .84 !important;
  filter: grayscale(1) saturate(.2) brightness(1.22) contrast(.9) !important;
}

body[data-theme="dark"] .footer-bottom span,
body[data-theme="dark"] .footer-col a,
body[data-theme="dark"] .footer-col button,
body[data-theme="dark"] .footer-bottom a {
  color: #94aebe !important;
}

body[data-theme="dark"] .composer textarea::placeholder,
body[data-theme="dark"] .followup textarea::placeholder,
body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
  color: #7892a5 !important;
  opacity: 1 !important;
}

@media (max-width: 900px) {
  .stage-brand {
    margin-bottom: 28px !important;
  }

  .stage-logo {
    margin-bottom: 18px !important;
  }

  .stage-brand span {
    margin-top: 13px !important;
  }
}

/* rollback: keep logo typography polish, restore previous stable hero background/ring proportions */
body {
  background:
    radial-gradient(circle at 50% 46%, rgba(255,255,255,.72) 0 24%, rgba(216,244,246,.48) 24.2% 38%, transparent 38.3%),
    radial-gradient(circle at 50% 49%, transparent 0 34%, rgba(0,168,200,.048) 34.2% 47%, transparent 47.2%),
    radial-gradient(circle at 50% 50%, transparent 0 44%, rgba(34,184,169,.038) 44.2% 58%, transparent 58.3%),
    linear-gradient(135deg, #f9fdfd 0%, #effafa 45%, #e8f7f8 100%) !important;
}

.search-stage::before,
.search-stage::after {
  left: 50% !important;
  border-radius: 50% !important;
  pointer-events: none !important;
  aspect-ratio: auto !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
  right: auto !important;
  bottom: auto !important;
}

.search-stage::before {
  width: min(1160px, 58vw) !important;
  height: min(1160px, 58vw) !important;
  top: 54.5% !important;
  border-width: clamp(72px, 6.5vw, 118px) !important;
  border-style: solid !important;
  border-color: rgba(0,168,200,.033) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.search-stage::after {
  width: min(760px, 38vw) !important;
  height: min(760px, 38vw) !important;
  top: 55% !important;
  background: rgba(255,255,255,.20) !important;
  box-shadow: inset 0 0 0 1px rgba(0,168,200,.025) !important;
}

body[data-theme="dark"] {
  background:
    radial-gradient(circle at 50% 42%, rgba(33,209,238,.12), transparent 32%),
    radial-gradient(circle at 50% 50%, transparent 0 42%, rgba(33,209,238,.06) 42.2% 54%, transparent 54.4%),
    linear-gradient(135deg, #020814 0%, #071523 55%, #0a1e2c 100%) !important;
}

body[data-theme="dark"] .search-stage::before {
  border-color: rgba(33,209,238,.055) !important;
  box-shadow: none !important;
}

body[data-theme="dark"] .search-stage::after {
  background: rgba(7,21,35,.18) !important;
  box-shadow: inset 0 0 0 1px rgba(33,209,238,.028) !important;
}

/* v25: non-home brand return and composer tool redesign */
.return-home {
  position: fixed;
  left: calc(var(--sidebar) + 28px);
  top: 28px;
  z-index: 88;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 6px 14px 6px 8px;
  border: 1px solid rgba(190, 228, 233, .84);
  border-radius: 999px;
  background: rgba(255,255,255,.68);
  color: #17365f;
  box-shadow: 0 16px 48px rgba(23, 54, 95, .09);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -.01em;
}

.return-home img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0,168,200,.18));
}

.return-home:hover {
  border-color: rgba(0,168,200,.42);
  color: #0f8fa2;
  transform: translateY(-1px);
}

.app-shell:has(.sidebar.is-compact) .return-home {
  left: calc(var(--sidebar-compact) + 22px);
}

.main:has(#view-assistant.active) .return-home {
  display: none;
}

.composer-tools {
  position: relative;
  align-items: center;
  gap: 7px;
  flex-wrap: nowrap;
  min-width: 0;
}

.composer-tools button,
.composer-tools summary {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  white-space: nowrap;
  user-select: none;
}

.composer-tools .tool-toggle,
.composer-tools .attachment-picker > summary {
  border: 1px solid transparent;
  background: transparent;
  color: #6e8495;
  padding: 4px 8px;
  font-size: clamp(10px, .56vw, 12px);
  font-weight: 420;
}

.composer-tools .tool-toggle:hover,
.composer-tools .attachment-picker > summary:hover {
  color: #0f8fa2;
  background: rgba(0,168,200,.065);
}

.composer-tools .tool-toggle.active {
  color: #0b8fa1;
  border-color: rgba(0,168,200,.22);
  background: rgba(0,168,200,.095);
}

.model-picker,
.attachment-picker {
  position: relative;
}

.model-picker > summary,
.attachment-picker > summary {
  list-style: none;
  cursor: pointer;
}

.model-picker > summary::-webkit-details-marker,
.attachment-picker > summary::-webkit-details-marker {
  display: none;
}

.model-picker > summary {
  min-height: 32px;
  padding: 5px 10px 5px 8px;
  border: 1px solid rgba(0,168,200,.28);
  background: linear-gradient(145deg, rgba(229, 250, 251, .92), rgba(255,255,255,.72));
  color: #17365f;
  box-shadow: 0 8px 22px rgba(0,168,200,.06);
  font-size: clamp(10px, .58vw, 12px);
  font-weight: 650;
}

.model-picker > summary i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22b8a9, #00a8c8);
  box-shadow: 0 0 0 4px rgba(0,168,200,.08);
}

.model-picker > summary b {
  color: #0f8fa2;
  font-weight: 700;
}

.model-menu,
.attachment-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 110;
  min-width: 150px;
  padding: 8px;
  border: 1px solid rgba(190, 228, 233, .92);
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 22px 70px rgba(23,54,95,.15);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: grid;
  gap: 5px;
}

.attachment-menu {
  min-width: 128px;
}

.model-menu button,
.attachment-menu button {
  width: 100%;
  min-height: 32px;
  justify-content: flex-start;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #587083;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 520;
}

.model-menu button:hover,
.attachment-menu button:hover,
.model-menu button.active {
  background: rgba(0,168,200,.10);
  color: #0f8fa2;
}

body[data-theme="dark"] .return-home {
  background: rgba(7, 20, 33, .78);
  border-color: rgba(91, 209, 219, .20);
  color: #e4f2ff;
  box-shadow: 0 18px 48px rgba(0,0,0,.28);
}

body[data-theme="dark"] .model-picker > summary {
  background: rgba(8, 32, 46, .82);
  border-color: rgba(91, 209, 219, .28);
  color: #e4f2ff;
}

body[data-theme="dark"] .model-picker > summary b {
  color: #48dccf;
}

body[data-theme="dark"] .model-menu,
body[data-theme="dark"] .attachment-menu {
  background: rgba(7, 20, 33, .94);
  border-color: rgba(91, 209, 219, .20);
  box-shadow: 0 22px 70px rgba(0,0,0,.32);
}

body[data-theme="dark"] .model-menu button,
body[data-theme="dark"] .attachment-menu button,
body[data-theme="dark"] .composer-tools .tool-toggle,
body[data-theme="dark"] .composer-tools .attachment-picker > summary {
  color: #a5bbca !important;
}

body[data-theme="dark"] .model-menu button:hover,
body[data-theme="dark"] .attachment-menu button:hover,
body[data-theme="dark"] .model-menu button.active,
body[data-theme="dark"] .composer-tools .tool-toggle.active {
  background: rgba(45, 211, 218, .13) !important;
  color: #48dccf !important;
}

@media (max-width: 1280px) {
  .composer-tools {
    gap: 5px;
  }

  .model-picker > summary {
    padding-right: 8px;
  }
}

@media (max-width: 900px) {
  .return-home {
    left: 76px !important;
    top: 16px;
  }

  .composer-tools {
    flex-wrap: wrap;
  }
}

/* v26: move non-home return entry into sidebar brand area */
.return-home {
  display: none !important;
}

.sidebar-home-brand {
  display: none;
  align-items: center;
  gap: 9px;
  height: 42px;
  min-width: 0;
  max-width: 190px;
  padding: 5px 13px 5px 7px;
  border: 1px solid rgba(190, 228, 233, .86);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #17365f;
  box-shadow: 0 12px 34px rgba(23,54,95,.08);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.8px;
  white-space: nowrap;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.sidebar-home-brand img {
  width: 31px;
  height: 31px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 14px rgba(0,168,200,.16));
}

.sidebar-home-brand:hover {
  border-color: rgba(0,168,200,.44);
  color: #0f8fa2;
  transform: translateY(-1px);
}

.sidebar:not(.is-compact) .brand-mini {
  display: none !important;
}

.sidebar:not(.is-compact) .sidebar-home-brand {
  display: inline-flex !important;
}

.sidebar.is-compact .sidebar-home-brand {
  display: none !important;
}

body[data-theme="dark"] .sidebar-home-brand {
  background: rgba(7,20,33,.74);
  border-color: rgba(91,209,219,.22);
  color: #e8f4ff;
  box-shadow: 0 16px 42px rgba(0,0,0,.24);
}

body[data-theme="dark"] .sidebar-home-brand:hover {
  color: #48dccf;
}

/* v27: top-right answer model picker */
.model-status-picker {
  position: relative;
  padding: 0;
}

.model-status-picker > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  user-select: none;
}

.model-status-picker > summary::-webkit-details-marker {
  display: none;
}

.model-status-picker > summary::after {
  content: "⌄";
  font-size: 12px;
  color: #7d96a8;
  transform: translateY(-1px);
}

.model-status-picker[open] > summary::after {
  transform: rotate(180deg) translateY(1px);
}

.model-status-picker > summary span {
  font-weight: 650;
  color: #17365f;
}

.model-status-picker > summary b {
  font-size: 13px;
  font-weight: 520;
  color: #6f8798;
}

.answer-model-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  width: 286px;
  padding: 12px;
  border: 1px solid rgba(190, 228, 233, .88);
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 22px 70px rgba(23, 54, 95, .16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.answer-model-menu section + section {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(205, 229, 233, .78);
}

.answer-model-menu section > span {
  display: block;
  margin: 0 0 7px 4px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .16em;
  color: #0aa6b4;
  text-transform: uppercase;
}

.answer-model-option {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #17365f;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 560;
  text-align: left;
}

.answer-model-option::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: transparent;
}

.answer-model-option:hover {
  background: rgba(0, 168, 200, .08);
  color: #0f8fa2;
}

.answer-model-option.active {
  background: rgba(0, 168, 200, .12);
  color: #0f8fa2;
}

.answer-model-option.active::after {
  background: #20c6bd;
  box-shadow: 0 0 0 4px rgba(32, 198, 189, .12);
}

body[data-theme="dark"] .model-status-picker > summary span {
  color: #e8f4ff;
}

body[data-theme="dark"] .model-status-picker > summary b,
body[data-theme="dark"] .model-status-picker > summary::after {
  color: #9fb7c7;
}

body[data-theme="dark"] .answer-model-menu {
  background: rgba(7, 20, 33, .94);
  border-color: rgba(91, 209, 219, .20);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .34);
}

body[data-theme="dark"] .answer-model-menu section + section {
  border-top-color: rgba(91, 209, 219, .14);
}

body[data-theme="dark"] .answer-model-option {
  color: #dbeef8;
}

body[data-theme="dark"] .answer-model-option:hover,
body[data-theme="dark"] .answer-model-option.active {
  background: rgba(45, 211, 218, .13);
  color: #48dccf;
}

/* v28: OpenWell model option, refined brand tagline, and phone adaptation */
.stage-brand span {
  display: inline-block;
  max-width: min(268px, calc(100vw - 40px));
  text-align: center;
  line-height: 1.55;
  font-size: clamp(7.2px, .42vw, 8px);
  letter-spacing: .055em;
  overflow-wrap: anywhere;
}

.answer-model-option.openwell-model {
  background:
    linear-gradient(135deg, rgba(0, 168, 200, .14), rgba(38, 208, 185, .13));
  border: 1px solid rgba(0, 168, 200, .22);
  color: #07365c;
  font-weight: 750;
}

.answer-model-option.openwell-model::before {
  content: "达愈";
  min-width: 34px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  margin-right: 8px;
  border-radius: 999px;
  background: #0fb7bd;
  color: white;
  font-size: 10px;
  letter-spacing: .06em;
}

.answer-model-option.openwell-model:hover,
.answer-model-option.openwell-model.active {
  background:
    linear-gradient(135deg, rgba(0, 168, 200, .20), rgba(38, 208, 185, .19));
  color: #07365c;
}

body[data-theme="dark"] .answer-model-option.openwell-model {
  background:
    linear-gradient(135deg, rgba(45, 211, 218, .18), rgba(38, 208, 185, .12)) !important;
  border-color: rgba(91, 209, 219, .28);
  color: #e8f4ff;
}

body[data-theme="dark"] .answer-model-option.openwell-model:hover,
body[data-theme="dark"] .answer-model-option.openwell-model.active {
  color: #ffffff;
}

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  body::before {
    height: 76px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .app-shell,
  .app-shell:has(.sidebar.is-compact) {
    display: block;
    grid-template-columns: 1fr;
  }

  .main {
    width: 100%;
    min-width: 0;
  }

  .topbar {
    right: 12px;
    top: 12px;
    z-index: 120;
  }

  .top-actions {
    gap: 6px;
  }

  .top-actions .model-status-picker {
    display: inline-flex !important;
    max-width: 164px;
  }

  .model-status-picker > summary {
    height: 38px;
    padding: 8px 10px;
    gap: 6px;
  }

  .model-status-picker > summary span {
    max-width: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
  }

  .model-status-picker > summary b {
    font-size: 11px;
  }

  .answer-model-menu {
    position: fixed;
    top: 58px;
    right: 10px;
    width: min(330px, calc(100vw - 20px));
    max-height: calc(100svh - 78px);
    overflow: auto;
    border-radius: 20px;
  }

  .top-icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .sidebar.is-compact .side-top {
    left: 12px;
    top: 12px;
  }

  .sidebar.is-compact .sidebar-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(190, 228, 233, .8);
    border-radius: 14px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 10px 28px rgba(23, 54, 95, .08);
    font-size: 22px;
  }

  .sidebar:not(.is-compact) {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 328px);
    height: 100svh;
    z-index: 130;
    padding: 14px 12px;
    overflow-y: auto;
    box-shadow: 22px 0 80px rgba(23, 54, 95, .16);
  }

  .sidebar:not(.is-compact) .side-top {
    position: static;
  }

  .sidebar:not(.is-compact) .sidebar-home-brand {
    max-width: 206px;
  }

  .view:not(#view-assistant),
  .answer-view {
    padding: 82px 14px 30px;
  }

  .search-stage {
    min-height: 100svh;
    padding: 90px 16px 38px;
    gap: 16px;
    justify-content: flex-start;
  }

  .search-stage::before {
    width: 560px;
    height: 560px;
    top: 45%;
    border-width: 58px;
  }

  .search-stage::after {
    width: 360px;
    height: 360px;
    top: 46%;
  }

  .stage-brand {
    margin-top: 12px;
    margin-bottom: 12px;
    gap: 5px;
  }

  .stage-logo {
    width: 84px;
    height: 84px;
  }

  .stage-brand strong {
    font-size: clamp(38px, 12vw, 52px);
    line-height: 1;
    letter-spacing: -1.8px;
  }

  .stage-brand span {
    max-width: min(232px, 84vw);
    font-size: 8px;
    letter-spacing: .035em;
    line-height: 1.45;
  }

  .composer {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 218px;
    border-radius: 22px;
    padding: 13px;
  }

  .composer textarea {
    height: 88px;
    min-height: 88px;
    font-size: 15px;
    padding: 14px 4px 8px;
  }

  .composer-footer {
    align-items: flex-end;
    gap: 10px;
  }

  .composer-tools {
    flex-wrap: wrap;
    gap: 6px;
    max-width: calc(100% - 52px);
  }

  .composer-tools .tool-toggle,
  .composer-tools .attachment-picker > summary,
  .model-picker > summary {
    min-height: 32px;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(245, 252, 252, .78);
  }

  .tools span,
  .model-picker > summary span,
  .attachment-picker > summary span {
    display: inline;
  }

  .model-picker > summary b {
    max-width: 58px;
  }

  .send-btn {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
  }

  .stage-note {
    max-width: 280px;
    line-height: 1.6;
  }

  .stage-note::after {
    display: none;
  }

  .quick-prompts {
    display: flex;
    width: 100%;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 8px;
  }

  .quick-prompts button {
    flex: 0 0 auto;
    max-width: 82vw;
  }

  .home-scroll {
    padding: 0;
  }

  .brand-story,
  .specialty-section,
  .rwd-story,
  .conversation-section,
  .sponsor-section,
  .site-footer {
    min-height: auto;
    padding: 82px 18px;
  }

  .brand-story h1,
  .rwd-copy h2,
  .conversation-section h2 {
    font-size: clamp(34px, 10.6vw, 46px);
    line-height: 1.18;
    letter-spacing: -1px;
  }

  .brand-story .eyebrow span::before,
  .brand-story .eyebrow span::after {
    width: 24px;
  }

  .brand-metrics {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 10px;
  }

  .specialty-section .home-section-head {
    margin-bottom: 28px;
  }

  .specialties,
  .metric-grid,
  .evidence-grid,
  .project-grid,
  .calc-form,
  .modal-grid,
  .theme-options {
    grid-template-columns: 1fr !important;
  }

  .specialty {
    min-height: 110px;
    grid-template-columns: 54px 1fr;
    padding: 22px 18px;
  }

  .spec-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .rwd-story,
  .network-map,
  .answer-layout,
  .data-layout,
  .calculator-shell {
    grid-template-columns: 1fr !important;
  }

  .rwd-story {
    gap: 34px;
  }

  .rwd-flow {
    grid-template-columns: 1fr;
  }

  .rwd-flow i {
    display: none;
  }

  .conversation-prompts {
    flex-direction: column;
    align-items: stretch;
  }

  .conversation-prompts button {
    width: 100%;
  }

  .conversation-trust {
    flex-direction: column;
    gap: 10px;
  }

  .sponsor-marquee {
    margin-top: 24px;
  }

  .sponsor-track {
    gap: 54px;
  }

  .sponsor-track img {
    max-width: 132px;
    max-height: 42px;
  }

  .footer-inner,
  .footer-links {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-subscribe div {
    grid-template-columns: 1fr;
  }

  .page-head,
  .privacy-banner,
  .calc-result {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-head {
    padding: 28px 22px;
  }

  .page-head h2 {
    font-size: clamp(34px, 10vw, 48px);
  }

  .calculator-list {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: none;
  }

  .calculator-detail {
    padding: 18px;
  }

  .answer-layout {
    gap: 16px;
  }

  .sources-panel {
    order: 2;
  }

  .inbox-panel {
    right: 12px;
    top: 66px;
    width: calc(100vw - 24px);
    max-height: calc(100svh - 86px);
    overflow: auto;
  }

  .modal-card {
    width: calc(100vw - 24px);
    max-height: calc(100svh - 24px);
    overflow: auto;
    border-radius: 24px;
    padding: 24px;
  }

  .settings-card {
    width: calc(100vw - 20px);
    height: calc(100svh - 20px);
    margin: 10px auto;
    grid-template-columns: 1fr;
  }

  .settings-nav {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .settings-content {
    padding: 18px;
  }

  .profile-form {
    grid-template-columns: 1fr;
  }
}

/* v30: corrected mobile interaction and stable one-line brand tagline */
.stage-brand span {
  white-space: nowrap;
  max-width: 258px;
  font-size: clamp(8px, .46vw, 9px);
  letter-spacing: .075em;
}

@media (max-width: 768px) {
  body {
    min-height: 100svh;
    background: linear-gradient(180deg, #f7fcfc 0%, #eef9f9 100%);
  }

  body::before {
    height: 78px !important;
    background: linear-gradient(180deg, rgba(255,255,255,.90), rgba(255,255,255,.58) 76%, rgba(255,255,255,0)) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
  }

  .main,
  #view-assistant {
    min-height: 100svh;
    overflow-x: hidden;
  }

  .sidebar.is-compact {
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .sidebar.is-compact .side-top {
    position: fixed !important;
    left: 14px !important;
    top: 14px !important;
    z-index: 150 !important;
  }

  .sidebar.is-compact .sidebar-toggle {
    width: 42px !important;
    height: 42px !important;
    border-radius: 15px !important;
    background: rgba(255,255,255,.84) !important;
    border: 1px solid rgba(190,228,233,.88) !important;
    box-shadow: 0 12px 34px rgba(23,54,95,.10) !important;
    color: #17365f !important;
    font-size: 21px !important;
  }

  .sidebar:not(.is-compact) {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: min(86vw, 336px) !important;
    height: 100svh !important;
    padding: 14px 14px 132px !important;
    display: flex !important;
    flex-direction: column !important;
    background: rgba(255,255,255,.96) !important;
    border-right: 1px solid rgba(190,228,233,.9) !important;
    box-shadow: 28px 0 90px rgba(23,54,95,.18) !important;
    overflow-y: auto !important;
    z-index: 180 !important;
  }

  .sidebar:not(.is-compact)::after {
    content: "";
    position: fixed;
    inset: 0 0 0 min(86vw, 336px);
    background: rgba(7, 25, 36, .12);
    backdrop-filter: blur(2px);
    pointer-events: none;
  }

  .sidebar:not(.is-compact) .side-top {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
  }

  .sidebar:not(.is-compact) .sidebar-toggle {
    width: 46px !important;
    height: 46px !important;
    flex: 0 0 auto !important;
    border-radius: 16px !important;
  }

  .sidebar:not(.is-compact) .sidebar-home-brand {
    display: inline-flex !important;
    width: auto !important;
    max-width: 210px !important;
    height: 46px !important;
    padding: 5px 15px 5px 7px !important;
  }

  .sidebar:not(.is-compact) .brand-mini {
    display: none !important;
  }

  .sidebar:not(.is-compact) .new-chat,
  .sidebar:not(.is-compact) .main-nav,
  .sidebar:not(.is-compact) .nav-item {
    display: flex !important;
  }

  .sidebar:not(.is-compact) .main-nav {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .sidebar:not(.is-compact) .new-chat,
  .sidebar:not(.is-compact) .nav-item {
    width: 100% !important;
    min-height: 48px !important;
    justify-content: flex-start !important;
    padding: 0 14px !important;
    gap: 12px !important;
    border-radius: 17px !important;
  }

  .sidebar:not(.is-compact) .nav-label,
  .sidebar:not(.is-compact) .profile-text,
  .sidebar:not(.is-compact) .new-chat .nav-label,
  .sidebar:not(.is-compact) .nav-item em {
    display: inline-flex !important;
  }

  .sidebar:not(.is-compact) .new-chat kbd {
    display: none !important;
  }

  .sidebar:not(.is-compact) .history {
    display: none !important;
  }

  .sidebar:not(.is-compact) .side-card {
    display: grid !important;
    margin-top: 18px !important;
  }

  .sidebar:not(.is-compact) .profile {
    display: grid !important;
    grid-template-columns: 48px 1fr 44px !important;
    position: fixed !important;
    left: 14px !important;
    bottom: max(14px, env(safe-area-inset-bottom)) !important;
    width: calc(min(86vw, 336px) - 28px) !important;
    min-height: 64px !important;
    z-index: 190 !important;
    background: rgba(255,255,255,.94) !important;
  }

  .topbar {
    top: 14px !important;
    right: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    padding-left: 68px !important;
    padding-right: 12px !important;
    z-index: 140 !important;
    display: flex !important;
    justify-content: flex-end !important;
    box-sizing: border-box !important;
  }

  .top-actions {
    width: 100% !important;
    justify-content: flex-end !important;
    gap: 8px !important;
  }

  .top-actions .model-status-picker {
    display: inline-flex !important;
    flex: 1 1 auto !important;
    max-width: 192px !important;
    min-width: 0 !important;
    justify-content: center !important;
  }

  .model-status-picker > summary {
    width: 100% !important;
    justify-content: center !important;
    padding: 8px 11px !important;
  }

  .model-status-picker > summary span {
    max-width: 82px !important;
    font-size: 13px !important;
  }

  .model-status-picker > summary b {
    font-size: 12px !important;
  }

  .model-status-picker[open] {
    position: static !important;
  }

  .model-status-picker[open] .answer-model-menu {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    top: 72px !important;
    width: calc(100vw - 28px) !important;
    min-width: calc(100vw - 28px) !important;
    max-width: none !important;
    transform: translateX(-50%) !important;
    max-height: min(640px, calc(100svh - 96px)) !important;
    overflow-y: auto !important;
    padding: 12px !important;
    border-radius: 22px !important;
    z-index: 260 !important;
  }

  .answer-model-menu section > span {
    margin-left: 8px !important;
    white-space: nowrap !important;
  }

  .answer-model-option {
    min-height: 42px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
  }

  .top-icon {
    width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px !important;
  }

  .search-stage {
    min-height: 100svh !important;
    height: auto !important;
    padding: 86px 16px 28px !important;
    justify-content: flex-start !important;
    align-content: start !important;
    gap: 12px !important;
    overflow: visible !important;
  }

  .search-stage::before {
    width: 480px !important;
    height: 480px !important;
    top: 47% !important;
    border-width: 52px !important;
  }

  .search-stage::after {
    width: 310px !important;
    height: 310px !important;
    top: 47% !important;
  }

  .stage-brand {
    margin: 0 0 10px !important;
    gap: 4px !important;
    width: 100% !important;
    justify-items: center !important;
    transform: none !important;
  }

  .stage-logo {
    width: 78px !important;
    height: 78px !important;
    margin: 0 auto 2px !important;
  }

  .stage-logo img {
    width: 352px !important;
    transform: translate(-32px, -35px) !important;
  }

  .stage-brand strong {
    font-size: clamp(38px, 11.4vw, 48px) !important;
    line-height: .98 !important;
    letter-spacing: -1.9px !important;
    text-align: center !important;
  }

  .stage-brand sup {
    font-size: .18em !important;
  }

  .stage-brand span {
    max-width: 224px !important;
    width: auto !important;
    font-size: 8px !important;
    letter-spacing: .025em !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  .composer {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 226px !important;
    height: auto !important;
    margin: 0 auto !important;
    border-radius: 24px !important;
    padding: 13px !important;
    box-shadow: 0 20px 62px rgba(23,54,95,.13) !important;
    transform: none !important;
  }

  .composer-meta {
    font-size: 14px !important;
  }

  .composer textarea {
    height: 82px !important;
    min-height: 82px !important;
    font-size: 16px !important;
    line-height: 1.55 !important;
  }

  .composer-footer {
    display: grid !important;
    grid-template-columns: 1fr 54px !important;
    gap: 10px !important;
    align-items: end !important;
  }

  .composer-tools {
    max-width: none !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .composer-tools .tool-toggle,
  .composer-tools .attachment-picker > summary,
  .model-picker > summary {
    min-height: 34px !important;
    padding: 7px 10px !important;
    background: rgba(246,252,252,.86) !important;
  }

  .send-btn {
    width: 54px !important;
    height: 54px !important;
    border-radius: 18px !important;
    align-self: end !important;
  }

  .stage-note {
    margin: 8px auto 0 !important;
    max-width: 330px !important;
    font-size: 12px !important;
  }

  .quick-prompts {
    display: flex !important;
    margin-top: 2px !important;
  }

  .brand-story,
  .specialty-section,
  .rwd-story,
  .conversation-section,
  .sponsor-section,
  .site-footer {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
}

/* v35: OpenWellM logo refresh and centered brand lockup */
.sidebar-home-brand {
  justify-content: center !important;
  gap: 10px !important;
  width: 186px !important;
  max-width: 186px !important;
  padding: 5px 14px 5px 9px !important;
  font-size: 17px !important;
  letter-spacing: -.35px !important;
}

.sidebar-home-brand img {
  width: 32px !important;
  height: 32px !important;
}

.sidebar-home-brand span {
  display: inline-block !important;
  line-height: 1 !important;
}

.stage-brand {
  justify-items: center !important;
  text-align: center !important;
  gap: 10px !important;
}

.stage-logo {
  display: grid !important;
  place-items: center !important;
  overflow: visible !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(255,255,255,.78) 0%, rgba(255,255,255,.18) 68%, rgba(255,255,255,0) 100%) !important;
}

.stage-logo img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: contain !important;
  transform: none !important;
}

.stage-brand strong {
  letter-spacing: -1.2px !important;
  text-align: center !important;
}

.stage-brand span {
  display: block !important;
  width: 100% !important;
  max-width: min(92vw, 560px) !important;
  text-align: center !important;
  letter-spacing: .18em !important;
}

.footer-brand {
  text-align: center;
}

.footer-brand img {
  display: block;
  width: 250px !important;
  margin: 0 auto 18px !important;
}

.footer-brand p {
  margin: 0 auto !important;
}

@media (max-width: 720px) {
  .stage-brand strong {
    font-size: clamp(36px, 10vw, 46px) !important;
    letter-spacing: -.8px !important;
  }

  .stage-brand span {
    max-width: 300px !important;
    font-size: 8px !important;
    letter-spacing: .06em !important;
    white-space: normal !important;
  }
}
.main-nav .nav-item[hidden] { display: none !important; }

.ow-hidden-module-notice {
  position: relative;
  z-index: 2;
  width: min(720px, calc(100% - 36px));
  box-sizing: border-box;
  margin: 86px auto 0;
  padding: 12px 16px;
  border: 1px solid #b7dce2;
  border-radius: 12px;
  background: #f1fafb;
  color: #24536a;
  font-size: 14px;
  line-height: 1.6;
}
.ow-hidden-module-notice[hidden],
body[data-mode="library"] .ow-hidden-module-notice { display: none !important; }
