:root {
  color-scheme: dark;
  --bg: #14181b;
  --panel: #1b2024;
  --line: #353e43;
  --muted: #aab6ba;
  --text: #edf5f3;
  --accent: #9feacb;
  --ink: #10251e;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
button {
  color: inherit;
}
.top {
  height: 66px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 max(5vw, 20px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 680;
  font-size: 1.25rem;
  letter-spacing: -0.05em;
}
.brand-icon,
.lockmark,
.glyph {
  color: var(--accent);
  font-family: Georgia, serif;
  line-height: 1;
}
.brand-icon {
  font-size: 2.2rem;
}
.slash {
  color: #5d6b70;
}
.context,
.eyebrow,
.address span,
small {
  color: var(--muted);
}
.context,
.quiet,
.eyebrow,
.address span {
  font-size: 0.88rem;
}
.end {
  margin-left: auto;
}
.quiet,
.refresh,
.suggestions button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
}
.quiet:hover,
.refresh:hover,
.suggestions button:hover {
  border-color: #81978e;
  color: var(--accent);
}
.primary {
  background: var(--accent);
  color: var(--ink);
  font-weight: 650;
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
}
.primary:hover {
  background: #bbf6df;
}
.login {
  margin: clamp(55px, 10vh, 120px) auto 28px;
  width: min(430px, calc(100% - 32px));
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.lockmark {
  font-size: 3.8rem;
}
.login h1 {
  font-size: 2.05rem;
  letter-spacing: -0.055em;
  margin: 12px 0;
}
.login p {
  color: var(--muted);
  line-height: 1.55;
}
.login form {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}
.login label {
  font-size: 0.9rem;
}
.login input,
textarea {
  background: #151a1d;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
}
.login .primary {
  margin-top: 5px;
}
.error:not(:empty) {
  color: #ffb9ad;
}
.error:empty {
  display: none;
}
.shell {
  width: min(1390px, 100%);
  margin: 0 auto;
  padding: 22px max(3vw, 18px) 28px;
}
nav {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
}
nav button {
  border: none;
  border-radius: 7px;
  background: transparent;
  padding: 8px 18px;
  color: var(--muted);
  font-weight: 600;
}
nav button[aria-pressed="true"] {
  background: #2a3534;
  color: var(--accent);
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(282px, 330px);
  gap: 18px;
  align-items: start;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-head h1,
.panel-head h2 {
  margin: 0;
  letter-spacing: -0.045em;
}
.panel-head h1 {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
}
.panel-head h2 {
  font-size: 1.36rem;
}
.chat {
  display: flex;
  flex-direction: column;
  height: clamp(520px, calc(100dvh - 166px), 1020px);
}
.chat > .panel-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.model-name {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 4px;
}
.model-name span,
code,
.meter strong,
#age {
  font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
.conversation {
  padding: 20px 24px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  overscroll-behavior: contain;
}
.conversation:has(#empty:not([hidden])) {
  display: grid;
  align-content: center;
}
#empty {
  text-align: center;
}
.glyph {
  display: inline-grid;
  place-items: center;
  width: 55px;
  height: 55px;
  border: 1px solid #456859;
  border-radius: 15px;
  font-size: 3rem;
  background: #21312c;
}
#empty h2 {
  font-size: 1.65rem;
  letter-spacing: -0.05em;
  margin: 16px 0 20px;
}
.suggestions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.suggestions button {
  font-size: 0.88rem;
  padding: 8px 10px;
  color: #c6d6cf;
}
.msg {
  max-width: 83%;
  margin: 0 0 20px;
}
.msg b {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}
.msg p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.55;
  margin: 6px 0 0;
}
.msg.user {
  margin-left: auto;
  background: #263530;
  border: 1px solid #354b40;
  padding: 10px 14px;
  border-radius: 12px;
}
.msg.user b {
  color: #b4c9be;
}
#composer {
  border: 1px solid #47574f;
  border-radius: 11px;
  margin: 0 18px 18px;
  background: #151b1a;
  padding: 10px 12px;
}
textarea {
  resize: vertical;
  max-height: 130px;
  min-height: 48px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 5px;
}
textarea::placeholder {
  color: #9dadad;
}
.composer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 3px;
}
.composer-bottom small {
  font-size: 0.8rem;
}
.telemetry {
  padding: 22px;
}
.eyebrow {
  font-family: ui-monospace, monospace;
  color: var(--accent);
  letter-spacing: 0.13em;
  margin-bottom: 5px;
}
.refresh {
  padding: 1px 9px;
  font-size: 1.45rem;
  color: var(--muted);
}
.address {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 18px 0 5px;
}
.address code {
  font-size: 0.95rem;
}
.address span {
  font-size: 0.77rem;
}
.meter,
.services {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.meter > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
h3 {
  font-size: 0.95rem;
  font-weight: 550;
  margin: 0;
}
.meter strong {
  font-size: 0.85rem;
  font-weight: 500;
}
.meter small,
#uptime {
  font-size: 0.8rem;
}
progress {
  appearance: none;
  display: block;
  overflow: hidden;
  height: 5px;
  border: 0;
  border-radius: 4px;
  width: 100%;
  margin-top: 13px;
  background: #354043;
}
progress::-webkit-progress-bar {
  background: #354043;
}
progress::-webkit-progress-value {
  background: var(--accent);
}
progress::-moz-progress-bar {
  background: var(--accent);
}
#spark {
  height: 32px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  margin: 7px 0 3px;
}
#spark i {
  flex: 1;
  background: #75bba1;
  min-height: 2px;
  border-radius: 2px 2px 0 0;
}
.services ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}
.services li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 0.9rem;
}
.ok {
  color: var(--accent);
}
.down {
  color: #ffb298;
}
.services li span {
  font-size: 0.8rem;
}
.server-view .chat {
  display: none;
}
.server-view .layout {
  grid-template-columns: minmax(0, 650px);
}
.server-view .telemetry {
  display: block;
}
.sr {
  position: absolute;
  clip: rect(0, 0, 0, 0);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
@media (max-width: 760px) {
  .top {
    height: 54px;
  }
  .shell {
    padding: 12px 12px 16px;
  }
  nav {
    margin-bottom: 11px;
  }
  .layout {
    display: block;
  }
  .telemetry {
    display: none;
  }
  .chat {
    height: calc(100dvh - 128px);
    min-height: 380px;
  }
  .chat > .panel-head,
  .conversation {
    padding: 16px;
  }
  #composer {
    margin: 0 10px 10px;
  }
  .msg {
    max-width: 95%;
  }
  .suggestions {
    flex-direction: column;
    align-items: center;
  }
  .login {
    padding: 24px;
  }
  .panel-head h1 {
    font-size: 1.55rem;
  }
}
.file-login {
  position: relative;
  display: block;
  margin: 3px auto 0;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.file-login:hover,
.file-login:focus-within {
  color: var(--accent);
}
.file-login input {
  opacity: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  cursor: pointer;
}
