:root {
  --bg: #050505;
  --ink: #f6f0f0;
  --muted: #9a8c8c;
  --line: rgba(255, 42, 42, 0.22);
  --accent: #e10600;
  --accent-2: #ff2a2a;
  --card: rgba(12, 0, 0, 0.72);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: Outfit, system-ui, sans-serif;
}

.page-chat {
  height: 100%;
  overflow: hidden;
}

html:has(.page-chat),
html:has(.page-chat) body {
  height: 100%;
  overflow: hidden;
}

.grain,
.glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
}

.grain {
  opacity: 0.1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  z-index: 0;
}

.glow-a {
  background: radial-gradient(circle at 16% 8%, rgba(225, 6, 0, 0.34), transparent 42%);
}

.glow-b {
  background: radial-gradient(circle at 88% 88%, rgba(120, 0, 0, 0.35), transparent 46%);
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 40px;
}

.topbar nav {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar nav a[aria-current="page"] {
  color: #fff;
}

.nav-cta {
  padding: 8px 14px;
  border: 1px solid rgba(225, 6, 0, 0.55);
  border-radius: 999px;
  color: #ff7a7a !important;
}

.nav-cta:hover {
  border-color: var(--accent);
  color: #fff !important;
}

.brand,
.topbar a {
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  border: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
}

.brand-footer img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.brand-chat {
  margin: 0 0 14px;
}

.brand-chat img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.hero,
.gate,
.about,
.site-footer {
  position: relative;
  z-index: 1;
}

.page-home {
  background:
    radial-gradient(circle at 50% 18%, rgba(225, 6, 0, 0.16), transparent 42%),
    linear-gradient(#080808, #050505);
}

.page-home::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    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: 48px 48px;
  mask-image: radial-gradient(circle at 50% 20%, #000 20%, transparent 75%);
}

.hero {
  padding: 8vh 40px 10vh;
}

.hero-solo {
  padding: 12vh 40px 8vh;
}

.hero-solo .hero-copy {
  max-width: 860px;
  margin: 0 auto;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 400px);
  gap: 56px;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
}

.hero-copy {
  text-align: left;
}

.hero-copy.center {
  text-align: center;
}

.hero-badge {
  display: inline-block;
  margin: 0 0 24px;
  padding: 8px 16px;
  border: 1px solid rgba(225, 6, 0, 0.55);
  border-radius: 999px;
  color: #ff5c5c;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.hero h1,
.hero-title {
  margin: 0;
  font-family: Outfit, system-ui, sans-serif;
  font-size: clamp(38px, 5.4vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
}

.hero-title span {
  color: #ff5a4a;
  font-style: normal;
}

.hero-sub {
  margin: 22px 0 0;
  max-width: 540px;
  color: #a1a1a1;
  font-size: 17px;
  line-height: 1.55;
}

.hero-sub.wide,
.center .hero-sub {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  margin-top: 32px;
}

.center-actions {
  justify-content: center;
}

.container {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 40px;
}

.section {
  position: relative;
  z-index: 1;
  padding: 72px 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.015);
  border-top: 1px solid rgba(255, 42, 42, 0.12);
  border-bottom: 1px solid rgba(255, 42, 42, 0.12);
}

.section-title,
.page-title {
  margin: 0 0 16px;
  font-family: "Instrument Serif", serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 400;
}

.page-hero {
  position: relative;
  z-index: 1;
  padding: 8vh 0 2vh;
}

.section-lead {
  max-width: 720px;
  margin: 0 0 36px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.center-text {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.center {
  text-align: center;
}

.info-grid {
  display: grid;
  gap: 16px;
}

.info-grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.info-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.info-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.info-grid h3 {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.info-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.mini-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: #cfc3c3;
  line-height: 1.55;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.steps li {
  display: grid;
  gap: 6px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.steps strong {
  color: #fff;
  font-size: 18px;
}

.steps span {
  color: var(--muted);
  line-height: 1.55;
}

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.compare > div {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.compare h3 {
  margin: 0 0 14px;
  color: var(--accent-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 14px;
}

.compare ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.section-cta {
  margin: 28px 0 0;
}

.cta-band {
  padding-bottom: 96px;
}

.prose {
  max-width: 760px;
}

.prose h2 {
  margin: 36px 0 12px;
  font-family: "Instrument Serif", serif;
  font-size: 34px;
  font-weight: 400;
}

.prose p,
.prose li {
  color: var(--muted);
  line-height: 1.7;
  font-size: 17px;
}

.prose ul {
  padding-left: 20px;
}

.prose em {
  color: #fff;
  font-style: italic;
}

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  padding: 4px 18px 8px;
}

.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 600;
  color: #fff;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.65;
}

.faq-list a {
  color: #ff7a7a;
}

.login-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 48px;
  align-items: center;
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 6vh 40px 10vh;
}

.login-title {
  font-size: clamp(42px, 6vw, 68px);
}

.login-points {
  margin: 28px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.login-card {
  width: 100%;
  max-width: none;
  padding: 28px;
  border: 1px solid rgba(225, 6, 0, 0.35);
  background: rgba(10, 0, 0, 0.78);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.auth-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-note a,
.linkish {
  color: #ff7a7a;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.rail h1 {
  margin: 0;
  font-family: "Instrument Serif", serif;
  font-size: 58px;
  font-weight: 400;
  line-height: 0.92;
}

.rail h1 em,
h1 em {
  font-style: italic;
  color: var(--accent);
}

.kicker {
  margin: 0 0 18px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--muted);
}

.lede,
.hint,
#statusDetail {
  color: var(--muted);
  line-height: 1.55;
}

.lede {
  margin: 18px 0 32px;
  font-size: 18px;
  max-width: 520px;
}

.hero-actions,
.tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero .tabs {
  margin-bottom: 4px;
}

.btn-primary,
.btn-ghost,
.ghost,
#sendBtn,
.tab {
  font: inherit;
  cursor: pointer;
}

.btn-primary,
#sendBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.btn-primary:hover,
#sendBtn:hover {
  background: var(--accent-2);
}

.btn-ghost,
.ghost {
  border: 1px solid var(--line);
}

.btn-ghost,
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  color: var(--ink);
  background: transparent;
  text-decoration: none;
}

.btn-ghost:hover,
.ghost:hover {
  border-color: var(--accent);
  color: #fff;
}

.wide {
  width: 100%;
}

.hero .auth-card {
  width: 100%;
  max-width: none;
  padding: 28px;
  border: 1px solid rgba(225, 6, 0, 0.35);
  background: rgba(10, 0, 0, 0.78);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.about {
  padding: 0 40px 80px;
  max-width: 1080px;
}

.about h2 {
  margin: 0 0 16px;
  font-family: "Instrument Serif", serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 400;
}

.about-lead {
  max-width: 720px;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.about-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.about-grid h3 {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.site-footer {
  padding: 40px 40px 28px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.45);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.footer-grid p,
.footer-grid a {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.5;
}

.footer-grid a:hover {
  color: #fff;
}

.footer-title {
  color: #fff !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 12px !important;
}

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.auth-card {
  max-width: 420px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
}

.tab {
  flex: 1;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
}

.tab.on {
  color: #fff;
  background: rgba(225, 6, 0, 0.22);
}

.auth-error {
  min-height: 1.3em;
  color: var(--accent-2);
  font-size: 14px;
}

.auth-card label {
  display: block;
  margin: 12px 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-card input,
textarea {
  width: 100%;
  margin-top: 8px;
  padding: 14px 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 14px;
  font: inherit;
  outline: none;
}

.auth-card input:focus,
textarea:focus {
  border-color: var(--accent);
}

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  background: #0a0a0a;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: #111;
}

.rail-top,
.rail-mid,
.rail-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rail-mid {
  flex: 1;
  min-height: 0;
}

.rail .brand-chat {
  margin: 0;
  padding: 8px 10px;
  border-radius: 12px;
}

.rail .brand-chat:hover {
  background: rgba(255, 255, 255, 0.04);
}

.rail .brand-chat img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.rail .brand-chat span {
  font-size: 13px;
  letter-spacing: 0.08em;
}

.new-chat-btn {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(225, 6, 0, 0.45);
  border-radius: 12px;
  background: rgba(225, 6, 0, 0.12);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.new-chat-btn:hover {
  background: rgba(225, 6, 0, 0.22);
}

.rail-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(225, 6, 0, 0.25);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}

.user-chip strong,
.user-chip span {
  display: block;
}

.user-chip strong {
  font-size: 13px;
  font-weight: 600;
}

.user-chip span {
  color: var(--muted);
  font-size: 11px;
}

.status-card {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.status-card #statusDetail {
  margin: 0;
  font-size: 12px;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(225, 6, 0, 0.55);
  animation: pulse 1.6s infinite;
}

.pulse.ready {
  background: #7dcc8a;
  animation: none;
}

.pulse.error {
  background: var(--accent);
  animation: none;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px transparent;
  }
}

.bar {
  margin-top: 12px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7a0000, var(--accent-2));
  transition: width 0.25s ease;
}

.ghost {
  width: 100%;
  margin-bottom: 0;
}

.ghost.danger:hover {
  border-color: var(--accent);
  color: var(--accent-2);
}

.stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(225, 6, 0, 0.08), transparent 42%),
    #0a0a0a;
}

.chat-top {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  padding: 14px 20px 0;
}

.model-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 20, 20, 0.9);
  font-size: 13px;
  font-weight: 600;
}

.model-pill img {
  border-radius: 50%;
}

.model-pill em {
  font-style: normal;
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
}

.messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding: 18px 24px 12px;
}

.empty {
  max-width: 640px;
  margin: 12vh auto 0;
  text-align: center;
}

.empty-logo {
  display: block;
  margin: 0 auto 18px;
  border-radius: 16px;
}

.empty h2 {
  margin: 0 0 10px;
  font-family: Outfit, system-ui, sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.empty p {
  margin: 0 auto;
  max-width: 420px;
  color: var(--muted);
}

.empty-suggestions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.empty-suggestions button {
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: #ddd;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.empty-suggestions button:hover {
  border-color: rgba(225, 6, 0, 0.45);
  background: rgba(225, 6, 0, 0.08);
  color: #fff;
}

.msg {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  width: min(760px, 100%);
  margin: 0 auto 28px;
  user-select: text;
  -webkit-user-select: text;
}

.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(225, 6, 0, 0.2);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin-top: 2px;
}

.msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.msg.user .msg-avatar {
  background: rgba(255, 255, 255, 0.1);
}

.msg-content {
  min-width: 0;
}

.msg.user .body {
  display: inline-block;
  max-width: 100%;
  padding: 12px 16px;
  border-radius: 18px 18px 6px 18px;
  background: rgba(225, 6, 0, 0.16);
  border: 1px solid rgba(225, 6, 0, 0.22);
}

.msg.assistant .body {
  padding-top: 2px;
}

.thought-panel {
  margin: 0 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.thought-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.thought-panel summary::-webkit-details-marker {
  display: none;
}

.thought-title {
  font-size: 13px;
  font-weight: 600;
  color: #ff8f86;
}

.thought-state {
  color: var(--muted);
  font-size: 12px;
}

.thought-body {
  max-height: 280px;
  overflow: auto;
  padding: 0 14px 14px;
  color: #a8a0a0;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
}

.thought-panel:not([open]) .thought-body {
  display: none;
}

.bubble-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.msg .who {
  margin-bottom: 0;
}

.msg .body {
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
  color: #f2efef;
}

.copy-btn {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.msg:hover .copy-btn,
.copy-btn:focus-visible,
.copy-btn.copied {
  opacity: 1;
}

.copy-btn:hover {
  color: #fff;
  border-color: rgba(225, 6, 0, 0.55);
}

.copy-btn.copied {
  color: #7dcc8a;
  border-color: rgba(125, 204, 138, 0.45);
}

.msg.is-typing .copy-btn {
  display: none;
}

.typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 10px;
  vertical-align: middle;
}

.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  opacity: 0.35;
  animation: typing-bounce 1.1s infinite ease-in-out;
}

.typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing span:nth-child(3) {
  animation-delay: 0.3s;
}

.typing-label {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.02em;
}

@keyframes typing-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.who {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.composer-dock {
  flex: 0 0 auto;
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 0 18px;
}

.composer-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.tool-hint {
  color: #6f6666;
  font-size: 12px;
}

.think-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.think-chip:has(input:checked) {
  color: #fff;
  border-color: rgba(225, 6, 0, 0.55);
  background: rgba(225, 6, 0, 0.14);
}

.think-chip input {
  accent-color: var(--accent);
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 12px 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: #161616;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.composer textarea {
  flex: 1;
  resize: none;
  min-height: 24px;
  max-height: 160px;
  margin: 0;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
  outline: none;
}

.composer textarea:focus {
  border-color: transparent;
}

#sendBtn {
  flex: 0 0 auto;
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
}

#sendBtn:hover {
  background: var(--accent-2);
}

#sendBtn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.composer-hint {
  margin: 10px 0 0;
  text-align: center;
  color: #6f6666;
  font-size: 12px;
}

@media (max-width: 860px) {
  html:has(.page-chat),
  html:has(.page-chat) body,
  .page-chat {
    height: 100%;
    overflow: hidden;
  }

  .hero-content,
  .login-wrap,
  .compare,
  .info-grid.two,
  .info-grid.three {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .topbar,
  .hero,
  .about,
  .site-footer,
  .container,
  .login-wrap {
    padding-left: 18px;
    padding-right: 18px;
  }

  .about-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100%;
  }

  .rail {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    max-height: none;
    padding: 12px;
    gap: 10px;
  }

  .rail-mid {
    display: none;
  }

  .rail-bottom {
    flex-direction: row;
    align-items: center;
  }

  .rail-bottom .ghost {
    width: auto;
    min-height: 40px;
    padding: 0 14px;
  }

  .stage {
    min-height: 0;
  }

  .messages {
    padding: 12px 14px;
  }

  .composer-dock {
    width: min(100%, calc(100% - 20px));
    padding-bottom: 12px;
  }

  .empty-suggestions {
    grid-template-columns: 1fr;
  }

  .msg {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 22px;
  }

  .msg-avatar {
    width: 30px;
    height: 30px;
  }

  .copy-btn {
    opacity: 1;
  }

  .topbar nav {
    gap: 12px;
  }
}
