* { box-sizing: border-box; }
html, body { height: 100%; background: #000; }
body {
  margin: 0;
  color: var(--sg-ink);
  background: #000;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button, textarea, input, select { font: inherit; }
button, select { cursor: pointer; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid rgba(248, 250, 252, 0.42); outline-offset: 2px; }

.gw {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  height: 100vh;
  min-height: 100vh;
  background: #000;
}
.gw.is-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.gw.is-collapsed .gw-side { padding-inline: 0; border-right: 0; overflow: hidden; }
.gw.is-collapsed .gw-open { display: inline-flex; }

.gw-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 10px 8px 14px;
  background: #000;
  border-right: 1px solid #1f1f1f;
  color: #f4f4f5;
  transition: padding 160ms ease;
}
.gw-side__top {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  margin-bottom: 8px;
}
.gw-side__brand {
  min-width: 0;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  color: #f8fafc;
  font-size: 12.5px;
  font-weight: 760;
}
.gw-side__brand:hover { background: #181818; }
.gw-side__brand img { width: auto; height: 22px; display: block; object-fit: contain; }
.gw-side__brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-icon-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #cfcfcf;
  background: transparent;
}
.gw-icon-btn:hover { color: #fff; background: #181818; }
.gw-icon-btn svg { width: 17px; height: 17px; }
.gw-open { display: none; }

.gw-nav { display: grid; gap: 2px; }
.gw-nav__item {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 7px;
  padding: 0 10px;
  background: transparent;
  color: #f4f4f5;
  text-align: left;
  font-size: 12px;
  font-weight: 650;
}
.gw-nav__item svg { width: 17px; height: 17px; color: #f4f4f5; flex: none; }
.gw-nav__item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-nav__item:hover,
.gw-nav__item.is-active { background: #2f2f2f; color: #fff; }
.gw-nav--secondary { gap: 0; }
.gw-side__spacer { flex: 1; min-height: 32px; }

.gw-recents { margin: 24px 0 8px; display: grid; gap: 2px; padding: 0 10px; }
.gw-recents p {
  margin: 0 0 9px;
  color: #6f7f9c;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0;
}
.gw-recents a {
  min-width: 0;
  color: #49638a;
  border-radius: 6px;
  padding: 6px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.2;
}
.gw-recents a:hover { color: #dbeafe; }

.gw-account {
  margin: 8px 0 0;
  padding: 14px 8px 0;
  border-top: 1px solid #202020;
}
.gw-account h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 11.5px;
  line-height: 1.25;
  font-weight: 760;
  letter-spacing: 0;
}
.gw-account p {
  margin: 0 0 15px;
  color: #c8c8c8;
  font-size: 11px;
  line-height: 1.45;
}
.gw-account a {
  width: 100%;
  height: 36px;
  border: 1px solid #3c3c3c;
  border-radius: 999px;
  background: #232323;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 760;
}
.gw-account a:hover { background: #2d2d2d; border-color: #4a4a4a; }

.gw-main { min-width: 0; height: 100vh; display: flex; flex-direction: column; background: #000; }
.gw-top {
  height: 54px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 0 24px;
}
.gw-top__left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gw-switcher {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 0;
  border-radius: 8px;
  padding: 0 8px;
  background: transparent;
  color: #f8fafc;
  font-size: 12.5px;
  font-weight: 760;
}
.gw-switcher:hover { background: #181818; }
.gw-switcher svg { color: #bdbdbd; width: 14px; height: 14px; }
.gw-switcher--mark { width: 38px; padding: 0; justify-content: center; }
.gw-switcher--mark img { width: auto; height: 20px; display: block; object-fit: contain; }
.gw-model {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #a8b3c7;
  font-size: 12px;
}
.gw-model[hidden] { display: none; }
.gw-model label { color: #68758c; }
.gw-model select {
  height: 30px;
  min-width: 168px;
  max-width: 260px;
  border: 1px solid #213044;
  border-radius: 999px;
  background: #0f1720;
  color: #dbeafe;
  padding: 0 28px 0 12px;
}
.gw-model select:disabled { color: #748096; background: #0b1016; cursor: default; }
.gw-auth { display: flex; align-items: center; gap: 8px; }
.gw-auth a {
  min-height: 31px;
  border-radius: 999px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 760;
}
.gw-auth__login { border: 0; background: #fff; color: #050505; }
.gw-auth__login:hover { background: #ececec; }
.gw-auth__signup { border: 1px solid #2d2d2d; background: #202020; color: #fff; }
.gw-auth__signup:hover { background: #2b2b2b; }

.gw-view {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  color: #f8fafc;
}
.gw-chat {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 0 24px 16vh;
  text-align: center;
}
.gw-chat.has-thread {
  justify-content: flex-end;
  gap: 20px;
  padding-bottom: 34px;
}
.gw-chat h1 {
  margin: 0;
  color: #f8fafc;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 560;
  letter-spacing: 0;
}
.gw-thread {
  width: min(760px, calc(100% - 48px));
  display: grid;
  gap: 18px;
  margin-bottom: 4px;
  text-align: left;
}
.gw-message { display: flex; gap: 12px; align-items: flex-start; text-align: left; }
.gw-message.user { justify-content: flex-end; }
.gw-message__mark { width: 29px; height: 29px; border-radius: 8px; display: grid; place-items: center; background: transparent; flex: none; }
.gw-message__mark img { width: 100%; height: 100%; object-fit: contain; }
.gw-bubble {
  max-width: 680px;
  border: 1px solid #2d2d2d;
  border-radius: 18px;
  background: #171717;
  color: #d7d7d7;
  padding: 12px 15px;
  line-height: 1.58;
  font-size: 12.5px;
}
.gw-message.user .gw-bubble { background: #242424; color: #f8fafc; }
.gw-bubble p { margin: 0 0 10px; }
.gw-bubble p:last-child { margin-bottom: 0; }
.gw-bubble ul, .gw-bubble ol { margin: 8px 0; padding-left: 22px; }
.gw-bubble li { margin: 4px 0; }
.gw-bubble h3, .gw-bubble h4 { margin: 14px 0 6px; font-size: 1em; font-weight: 600; color: #f3f3f3; }
.gw-bubble strong { font-weight: 600; color: #f3f3f3; }
.gw-bubble a { color: #8ab4ff; text-decoration: underline; }
.gw-bubble code { background: rgba(255,255,255,0.08); padding: 1px 5px; border-radius: 4px; font-size: 0.92em; }
.gw-bubble pre.gw-code { background: #0d0d0d; border: 1px solid #2a2a2a; border-radius: 8px; padding: 12px; overflow-x: auto; margin: 10px 0; }
.gw-bubble pre.gw-code code { background: none; padding: 0; }
.gw-grounding { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 11px; color: #9b9b9b; font-size: 12px; }
.gw-grounding span { border-bottom: 1px solid #3a3a3a; }
.gw-composer {
  width: min(710px, 100%);
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 7px;
  border: 1px solid #253447;
  border-radius: 28px;
  background: #111923;
  box-shadow: none;
}
.gw-composer:focus-within { border-color: #3a516b; }
.gw-composer__plus {
  width: 34px;
  height: 34px;
  flex: none;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: #d4d4d4;
  font-size: 21px;
  line-height: 1;
  font-weight: 280;
}
.gw-composer__plus:hover { background: #1f2b38; color: #fff; }
.gw-composer textarea {
  flex: 1;
  min-width: 0;
  min-height: 34px;
  max-height: 150px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #f8fafc;
  padding: 9px 2px 7px;
  line-height: 1.35;
  font-size: 12.5px;
}
.gw-composer textarea::placeholder { color: #7f8ca1; }
.gw-composer__tools { flex: none; display: flex; align-items: center; gap: 5px; }
.gw-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a8b3c7;
  font-size: 12px;
  white-space: nowrap;
}
.gw-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a3ff12;
  box-shadow: 0 0 9px rgba(163, 255, 18, 0.55);
}
.gw-status.is-gated::before { background: #64748b; box-shadow: none; }
.gw-mic,
.gw-send {
  width: 36px;
  height: 36px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
}
.gw-mic { color: #d4d4d4; background: transparent; }
.gw-mic:hover { background: #1f2b38; color: #fff; }
.gw-mic svg { width: 16px; height: 16px; }
.gw-send { background: #8b97a8; color: #050505; }
.gw-send.is-ready { background: #f8fafc; }
.gw-send svg { width: 17px; height: 17px; stroke-width: 2.25; }
.gw-suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 760px; }
.gw-suggestions button {
  min-height: 34px;
  border: 1px solid #1f3143;
  border-radius: 999px;
  background: #030609;
  color: #d7e5ff;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 650;
}
.gw-suggestions button:hover { background: #101820; border-color: #34475b; }

.gw-page {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto;
  padding: 56px 0 120px;
}
.gw-page--narrow { width: min(760px, calc(100% - 48px)); }
.gw-page__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.gw-page h1 { margin: 0 0 8px; font-size: 24px; line-height: 1.12; font-weight: 700; letter-spacing: 0; }
.gw-page p { margin: 0; color: #a8b3c7; line-height: 1.5; font-size: 13px; }
.gw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gw-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gw-panel {
  border: 1px solid #1f2b38;
  border-radius: 8px;
  background: #07090c;
  padding: 18px;
  min-width: 0;
}
.gw-panel h2 { margin: 0 0 10px; color: #fff; font-size: 14px; line-height: 1.25; letter-spacing: 0; }
.gw-panel h3 { margin: 0 0 8px; color: #fff; font-size: 13px; line-height: 1.25; letter-spacing: 0; }
.gw-panel p + p { margin-top: 10px; }
.gw-panel ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.gw-panel li { color: #a8b3c7; font-size: 12.5px; line-height: 1.45; display: flex; gap: 8px; align-items: flex-start; }
.gw-panel li::before { content: ""; width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: #8fb7ff; flex: none; }
.gw-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.gw-kpi { border: 1px solid #1f2b38; border-radius: 8px; padding: 14px; background: #05070a; }
.gw-kpi span { display: block; color: #748096; font-size: 12px; margin-bottom: 8px; }
.gw-kpi strong { display: block; color: #f8fafc; font-size: 14px; line-height: 1.2; }
.gw-pillrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 13px; }
.gw-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid #233448;
  border-radius: 999px;
  color: #d7e5ff;
  background: #08101a;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 650;
}
.gw-pill.is-muted { color: #94a3b8; background: #05070a; }
.gw-alert {
  border: 1px solid #334155;
  border-radius: 8px;
  background: #07111c;
  color: #dbeafe;
  padding: 14px;
  margin: 0 0 16px;
  line-height: 1.5;
  font-size: 12.5px;
}
.gw-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.gw-btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #2d4054;
  border-radius: 999px;
  background: #111923;
  color: #fff;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 720;
}
.gw-btn:hover { background: #172231; }
.gw-btn--primary { background: #fff; border-color: #fff; color: #050505; }
.gw-btn--primary:hover { background: #e8edf4; }
.gw-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.gw-tabs a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #213044;
  border-radius: 999px;
  padding: 0 12px;
  color: #a8b3c7;
  font-size: 12px;
  font-weight: 680;
}
.gw-tabs a.is-active { color: #050505; background: #f8fafc; border-color: #f8fafc; }
.gw-form { display: grid; gap: 12px; margin-top: 14px; }
.gw-form label { display: grid; gap: 7px; color: #dbeafe; font-size: 12.5px; font-weight: 650; }
.gw-form input,
.gw-form textarea,
.gw-form select {
  width: 100%;
  border: 1px solid #233448;
  border-radius: 8px;
  background: #05070a;
  color: #f8fafc;
  padding: 11px 12px;
  outline: 0;
  line-height: 1.4;
}
.gw-form textarea { min-height: 108px; resize: vertical; }
.gw-form input:focus,
.gw-form textarea:focus,
.gw-form select:focus { border-color: #4d6b8c; }
.gw-form__status { min-height: 20px; color: #a8b3c7; font-size: 12.5px; }
.gw-form__status.is-error { color: #ffb4b4; }
.gw-form__status.is-ok { color: #b7f7c1; }
.gw-muted { color: #748096; }
.gw-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12.5px; }
.gw-table th,
.gw-table td { border-bottom: 1px solid #1f2b38; padding: 10px 0; text-align: left; color: #a8b3c7; }
.gw-table th { color: #f8fafc; font-weight: 720; }
.gw-profile { display: flex; align-items: center; gap: 12px; }
.gw-avatar { width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; background: #0d1824; border: 1px solid #24384d; color: #dbeafe; font-weight: 760; }
.gw-cookie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border-top: 1px solid #5c5c5c;
  background: #464646;
  color: #fff;
  padding: 15px 46px 15px 18px;
}
.gw-cookie[hidden] { display: none; }
.gw-cookie strong { display: block; font-size: 13px; margin-bottom: 7px; }
.gw-cookie p { margin: 0; max-width: 900px; color: #f0f0f0; font-size: 11.5px; line-height: 1.45; }
.gw-cookie__close {
  position: absolute;
  top: 15px;
  right: 16px;
  border: 0;
  background: transparent;
  color: #d0d0d0;
  font-size: 18px;
}
.gw-cookie__actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.gw-cookie__actions button {
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid #f8fafc;
  background: #121212;
  color: #fff;
  padding: 0 12px;
  font-size: 11.5px;
  font-weight: 760;
}
.gw-cookie__actions button:first-child { border-color: #686868; background: transparent; }
.gw-cookie__actions button:last-child { background: #fff; color: #050505; }
.gw-cookie__prefs { display: inline-flex; align-items: center; gap: 8px; color: #f0f0f0; margin-top: 10px; font-size: 12px; }
.gw-cookie__prefs[hidden] { display: none; }

@media (max-width: 980px) {
  .gw-grid,
  .gw-grid--three,
  .gw-kpis { grid-template-columns: 1fr; }
  .gw-page__header { display: block; }
  .gw-page__header .gw-actions { margin-top: 14px; }
}
@media (max-width: 820px) {
  body { overflow: auto; }
  .gw { grid-template-columns: 0 minmax(0, 1fr); min-height: 100svh; }
  .gw-side { padding-inline: 0; overflow: hidden; }
  .gw.is-open { grid-template-columns: minmax(214px, 72vw) minmax(0, 1fr); }
  .gw.is-open .gw-side { padding: 10px 8px 14px; overflow: visible; }
  .gw-open { display: inline-flex; }
  .gw-top { padding-left: 10px; }
  .gw-model label { display: none; }
  .gw-chat { padding-bottom: 14vh; }
  .gw-cookie { grid-template-columns: 1fr; padding-right: 42px; }
  .gw-cookie__actions { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .gw-auth__signup { display: none; }
  .gw-auth a { padding-inline: 12px; }
  .gw-switcher { max-width: 120px; overflow: hidden; }
  .gw-model { display: none; }
  .gw-chat { padding-inline: 14px; gap: 28px; }
  .gw-chat h1 { font-size: 20px; }
  .gw-composer { border-radius: 24px; }
  .gw-status { display: none; }
  .gw-page { width: calc(100% - 28px); padding-top: 28px; }
}

.gw-typing { display: inline-flex; gap: 5px; align-items: center; padding: 4px 2px; }
.gw-typing i { width: 7px; height: 7px; border-radius: 50%; background: #8b8f98; display: inline-block; animation: gw-blink 1.3s infinite both; }
.gw-typing i:nth-child(2) { animation-delay: .18s; }
.gw-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes gw-blink { 0%,80%,100% { opacity:.25; transform: translateY(0);} 40% { opacity:1; transform: translateY(-3px);} }
