:root {
  color-scheme: dark;
  --bg: #050507;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f4f6fb;
  --muted: rgba(244, 246, 251, 0.62);
  --soft: rgba(244, 246, 251, 0.42);
  --green: #b8ff5c;
  --cyan: #65e6ff;
  --rose: #ff5e8a;
  --yellow: #ffd66b;
  --radius: 12px;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(101, 230, 255, 0.18), transparent 32rem),
    radial-gradient(circle at 90% 10%, rgba(184, 255, 92, 0.13), transparent 30rem),
    radial-gradient(circle at 55% 90%, rgba(255, 94, 138, 0.1), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

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

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

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: rgba(5, 5, 7, 0.74);
  backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #050507;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  font-weight: 950;
  box-shadow: 0 0 48px rgba(184, 255, 92, 0.2);
}

.brand strong {
  display: block;
  font-size: 15px;
}

.brand small {
  display: block;
  color: var(--soft);
  margin-top: 2px;
  font-size: 12px;
}

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

.nav-list a {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 13px;
  color: var(--muted);
  transition: 0.2s ease;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel);
}

.side-card {
  margin-top: auto;
  display: flex;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--panel);
}

.side-card p {
  margin: 4px 0 0;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.45;
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 6px rgba(101, 230, 255, 0.1);
  flex: none;
}

.status-dot.ready {
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(184, 255, 92, 0.12);
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 6;
  min-height: 76px;
  margin: -24px -24px 24px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 7, 0.7);
  backdrop-filter: blur(22px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.1;
}

h2 {
  font-size: clamp(32px, 5vw, 68px);
  line-height: 0.98;
  margin-bottom: 18px;
}

h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.model-rail {
  display: grid;
  gap: 7px;
  min-width: min(620px, 46vw);
}

.model-rail > span {
  color: var(--soft);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.model-chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: thin;
}

.model-chip {
  min-width: 96px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 9px 12px;
  color: rgba(244, 246, 251, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
  white-space: nowrap;
  transition: 0.18s ease;
}

.model-chip strong,
.model-chip small {
  display: block;
  line-height: 1.1;
}

.model-chip strong {
  font-size: 13px;
}

.model-chip small {
  margin-top: 3px;
  color: var(--soft);
  font-size: 10px;
}

.model-chip:hover,
.model-chip.active {
  color: #050507;
  border-color: transparent;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: 0 0 34px rgba(184, 255, 92, 0.18);
}

.model-chip:hover small,
.model-chip.active small {
  color: rgba(5, 5, 7, 0.68);
}

.model-picker {
  display: grid;
  gap: 7px;
  min-width: min(560px, 44vw);
}

.model-picker span {
  color: var(--soft);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.model-options,
.segmented-control {
  display: flex;
  gap: 6px;
  align-items: stretch;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow-x: auto;
}

.model-option,
.segmented-control button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.2s ease;
}

.model-option {
  min-width: auto;
  text-align: center;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.model-option strong,
.model-option small {
  display: inline;
}

.model-option small {
  margin-top: 0;
  color: var(--soft);
  font-size: 11px;
}

.model-option:hover,
.model-option.active,
.segmented-control button:hover,
.segmented-control button.active {
  color: #050507;
  background: linear-gradient(135deg, var(--green), var(--cyan));
}

.model-option.active small,
.model-option:hover small {
  color: rgba(5, 5, 7, 0.68);
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.lang-button {
  min-width: 54px;
  border: 0;
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
  transition: 0.2s ease;
}

.lang-button:hover,
.lang-button.active {
  color: #050507;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: 0 0 28px rgba(101, 230, 255, 0.16);
}

.button,
.icon-button {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text);
  background: var(--panel);
  font-weight: 850;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s ease;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.24);
}

.button.primary {
  color: #050507;
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 54px rgba(184, 255, 92, 0.18);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.035);
}

.select,
.input,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  padding: 12px 13px;
  outline: none;
}

.select {
  color-scheme: dark;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text) 50%),
    linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.select option {
  color: #f4f6fb;
  background: #101116;
}

.select:focus,
.input:focus,
.textarea:focus {
  border-color: rgba(184, 255, 92, 0.52);
}

.view {
  display: none;
  animation: fadeUp 0.45s ease both;
}

.view.active {
  display: block;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(340px, 0.94fr);
  align-items: center;
  gap: 28px;
  min-height: calc(100vh - 150px);
}

.hero-copy p,
.section-lead {
  color: var(--muted);
  line-height: 1.75;
  font-size: 17px;
  max-width: 720px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.metric,
.card,
.agent-card,
.store-card,
.price-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric {
  padding: 15px;
  color: var(--soft);
}

.metric strong {
  display: block;
  color: var(--text);
  font-size: 22px;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.11), transparent);
  transform: translateX(-100%);
  animation: scan 5.5s linear infinite;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.agent-stack {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.agent-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.22);
}

.agent-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #050507;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  font-weight: 950;
}

.agent-row p {
  color: var(--soft);
  margin: 2px 0 0;
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.04);
}

.grid {
  display: grid;
  gap: 14px;
}

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

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.agent-card,
.store-card,
.price-card,
.panel {
  padding: 20px;
}

.card p,
.agent-card p,
.store-card p,
.price-card p {
  color: var(--muted);
  line-height: 1.65;
}

.agent-card {
  cursor: pointer;
  transition: 0.2s ease;
}

.agent-card:hover,
.agent-card.active {
  transform: translateY(-2px);
  border-color: rgba(184, 255, 92, 0.48);
  background: rgba(184, 255, 92, 0.08);
}

.agent-card .agent-icon {
  margin-bottom: 14px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.chat-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  min-height: calc(100vh - 128px);
}

.chat-sidebar,
.chat-main {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.chat-sidebar {
  display: flex;
  flex-direction: column;
}

.chat-side-head,
.chat-head {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.conversation-list {
  padding: 12px;
  display: grid;
  gap: 8px;
  overflow: auto;
}

.conversation-item {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.conversation-item.active,
.conversation-item:hover {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel);
}

.conversation-item small {
  display: block;
  color: var(--soft);
  margin-top: 3px;
}

.chat-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

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

.chat-head p {
  margin: 3px 0 0;
  color: var(--soft);
  font-size: 13px;
}

.agent-switcher {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: thin;
}

.agent-switch {
  min-width: 190px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
}

.agent-switch:hover,
.agent-switch.active {
  color: var(--text);
  border-color: rgba(184, 255, 92, 0.48);
  background: rgba(184, 255, 92, 0.09);
}

.agent-switch small {
  display: block;
  margin-top: 2px;
  color: var(--soft);
  font-size: 11px;
}

.agent-icon.mini {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 12px;
}

.message-list {
  flex: 1;
  padding: 18px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 14px;
}

.message {
  position: relative;
  max-width: 880px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.message.user {
  margin-left: auto;
  background: rgba(184, 255, 92, 0.1);
  border-color: rgba(184, 255, 92, 0.25);
}

.message-meta {
  color: var(--soft);
  font-size: 12px;
  margin-bottom: 8px;
}

.message-body {
  color: rgba(244, 246, 251, 0.88);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.message-body pre {
  position: relative;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #09090d;
}

.template-box {
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  color: rgba(244, 246, 251, 0.82);
  background: #09090d;
  line-height: 1.55;
}

.message-body code {
  color: var(--green);
}

.copy-message {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 6px 8px;
  font-size: 11px;
}

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

.composer textarea {
  min-height: 90px;
  resize: vertical;
}

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

.prompt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.challenge-card {
  border: 1px solid rgba(184, 255, 92, 0.24);
  border-radius: 22px;
  padding: 22px;
  margin: 14px 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(91, 240, 255, 0.14), transparent 34%),
    radial-gradient(circle at 90% 20%, rgba(184, 255, 92, 0.16), transparent 34%),
    rgba(255, 255, 255, 0.045);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.challenge-card h3 {
  margin: 6px 0 8px;
  font-size: 24px;
}

.challenge-card p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.75;
}

.challenge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.prompt-chip {
  border: 1px solid rgba(184, 255, 92, 0.22);
  border-radius: 999px;
  background: rgba(184, 255, 92, 0.08);
  color: var(--text);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.store-card {
  display: grid;
  gap: 12px;
}

.store-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--soft);
  font-size: 12px;
}

.value-compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 20px;
}

.value-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(184, 255, 92, 0.1), rgba(91, 240, 255, 0.04)),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.value-card span {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.value-card strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
  margin-bottom: 8px;
}

.value-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.pro-agent-card {
  position: relative;
  overflow: hidden;
}

.pro-agent-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(184, 255, 92, 0.12), transparent 38%);
  opacity: 0.65;
}

.custom-agent-card {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.025);
}

.stars {
  color: var(--yellow);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
}

.settings-model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 10px 0 16px;
}

.settings-model-grid .model-option {
  width: 100%;
  min-height: 64px;
  justify-content: flex-start;
  align-items: center;
  border-radius: 16px;
  padding: 13px 16px;
  text-align: left;
}

.settings-model-grid .model-option strong,
.settings-model-grid .model-option small {
  display: block;
}

.settings-model-grid .model-option small {
  margin-top: 4px;
}

#saveSet {
  display: inline-flex;
  margin-top: 2px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.hint {
  color: var(--soft);
  font-size: 12px;
  line-height: 1.55;
}

.plain-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 18px;
  padding: 0;
  list-style: none;
}

.plain-list li {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

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

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.employee-stack {
  display: grid;
  gap: 12px;
}

.employee-line {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(135deg, rgba(184, 255, 92, 0.12), transparent 48%),
    rgba(255, 255, 255, 0.045);
  color: var(--text);
  border-radius: 18px;
  padding: 16px 18px;
  text-align: left;
  display: grid;
  gap: 5px;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.employee-line span {
  font-size: 17px;
  font-weight: 900;
}

.employee-line small {
  color: var(--muted);
  line-height: 1.5;
}

.employee-line:hover {
  transform: translateY(-2px);
  border-color: rgba(184, 255, 92, 0.55);
  background:
    linear-gradient(135deg, rgba(184, 255, 92, 0.2), transparent 54%),
    rgba(255, 255, 255, 0.075);
}

.store-feature {
  background:
    radial-gradient(circle at 85% 20%, rgba(184, 255, 92, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
}

@keyframes scan {
  to {
    transform: translateX(100%);
  }
}

@keyframes float {
  50% {
    transform: translateY(-10px);
  }
}

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero-grid,
  .chat-layout,
  .settings-grid,
  .value-compare {
    grid-template-columns: 1fr;
  }

  .grid.cols-4,
  .grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .main {
    padding: 14px;
  }

  /* Compact mobile sidebar: brand + horizontal scrolling nav, no tall menu */
  .sidebar {
    padding: 12px 14px;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .nav-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    margin-top: 12px;
    scrollbar-width: none;
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .nav-list a {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 12px;
  }

  /* Hide the BYOK status card on phones to surface content faster (still in Settings) */
  .side-card {
    display: none;
  }

  .topbar {
    margin: -14px -14px 16px;
    padding: 14px;
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions,
  .top-actions .select,
  .top-actions .button,
  .language-switch,
  .model-rail,
  .model-picker {
    width: 100%;
    min-width: 0;
  }

  .model-chip-row {
    width: 100%;
  }

  .lang-button {
    flex: 1;
  }

  .metrics,
  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2 {
    grid-template-columns: 1fr;
  }

  h2 {
    font-size: 38px;
  }

  .chat-head,
  .composer-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Conversation row with delete button */
.conversation-row {
  display: flex;
  align-items: stretch;
  gap: 4px;
  border: 1px solid transparent;
  border-radius: 10px;
}
.conversation-row.active,
.conversation-row:hover {
  border-color: var(--line);
  background: var(--panel);
}
.conversation-row .conversation-item {
  border: none;
  background: transparent;
  flex: 1;
}
.conversation-row.active .conversation-item,
.conversation-row:hover .conversation-item {
  background: transparent;
  border: none;
  color: var(--text);
}
.conversation-delete {
  flex: 0 0 auto;
  align-self: center;
  width: 30px;
  height: 30px;
  margin-right: 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--soft);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.conversation-delete:hover {
  color: var(--rose);
  border-color: var(--rose);
  background: rgba(255, 94, 138, 0.1);
}

/* Active agent banner in chat */
.active-agent-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(184, 255, 92, 0.12), rgba(101, 230, 255, 0.08));
}
.active-agent-banner .agent-icon {
  width: 46px;
  height: 46px;
  font-size: 18px;
}
.active-agent-meta {
  flex: 1;
  min-width: 0;
}
.active-agent-meta small {
  display: block;
  color: var(--green);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.active-agent-meta strong {
  display: block;
  font-size: 19px;
  color: var(--text);
}
.active-agent-meta p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.switcher-label {
  margin: 0;
  padding: 12px 14px 0;
  color: var(--soft);
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* Stronger highlight for the active partner in the switcher */
.agent-switch.active {
  box-shadow: inset 0 0 0 1px var(--green);
  background: rgba(184, 255, 92, 0.16);
}

/* Login */
.login-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(184, 255, 92, 0.4);
  border-radius: 10px;
  background: rgba(184, 255, 92, 0.08);
  color: var(--text);
  font-size: 14px;
}
.login-providers {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}
.google-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.google-button .g-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  color: #4285f4;
  font-weight: 900;
}

/* Conversation row with delete */
.convo-row {
  display: flex;
  align-items: stretch;
  gap: 4px;
  border: 1px solid transparent;
  border-radius: 10px;
}
.convo-row.active,
.convo-row:hover {
  border-color: var(--line);
  background: var(--panel);
}
.convo-row .conversation-item {
  border: none;
  background: transparent;
  flex: 1;
}
.convo-row.active .conversation-item,
.convo-row:hover .conversation-item {
  color: var(--text);
  border: none;
  background: transparent;
}
.convo-del {
  flex: 0 0 auto;
  align-self: center;
  width: 28px;
  height: 28px;
  margin-right: 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--soft);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}
.convo-del:hover {
  color: var(--rose);
  border-color: var(--rose);
  background: rgba(255, 94, 138, 0.1);
}

.store-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.store-card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.store-card-actions .button { flex: 1; }
.store-card-actions .btn-sm { flex: 0 0 auto; padding: 8px 10px; font-size: 12px; }

.consult-band {
  border: 1px solid var(--cyan);
  border-radius: 18px;
  padding: 28px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.10), rgba(124, 92, 255, 0.10));
}
.consult-inner {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.consult-copy { flex: 1 1 360px; }
.consult-cta { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.consult-cta .button { white-space: nowrap; }
@media (max-width: 720px) {
  .consult-band { padding: 20px; }
  .consult-cta { width: 100%; }
  .consult-cta .button { width: 100%; text-align: center; }
}
