:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", sans-serif;
  background: #081216;
  color: #eaf2f3;
  --accent: #77e9df;
  --line: #284047;
  --dim: #a2b6bc;
  --panel: #102026;
  --shade: #0b171c;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  border: 1px solid var(--line);
  background: #152930;
  border-radius: 9px;
  padding: 0.62rem 0.85rem;
}
button:hover,
button:focus-visible {
  border-color: #72bbb6;
  background: #1c353b;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
a {
  color: var(--accent);
}
input,
textarea,
select {
  background: #0a171c;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.68rem 0.8rem;
  min-width: 0;
}
label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: #ccdade;
}
input[type="checkbox"] {
  accent-color: var(--accent);
}
label.check,
.audio-toggle {
  flex-direction: row;
  align-items: center;
}
.error {
  color: #ffbaaa;
}
.primary,
.send {
  background: var(--accent);
  border-color: transparent;
  color: #052524;
  font-weight: 650;
}
.primary:hover,
.send:hover {
  background: #abfff4;
  color: #052524;
}
.primary span {
  float: right;
}
.gate {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
}
.gate-art {
  background: radial-gradient(
    ellipse at 53% 49%,
    #103d43 0%,
    #10272d 38%,
    #0b191d 70%
  );
  position: relative;
  display: grid;
  align-items: center;
  border-right: 1px solid var(--line);
}
.gate-art::after,
#welcome::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(#70bcbc44 0.7px, transparent 0.9px);
  background-size: 20px 20px;
  mask-image: radial-gradient(ellipse, #0008, transparent 77%);
}
.gate-art .brand,
.gate-signature {
  position: absolute;
  left: 8%;
  z-index: 1;
}
.gate-art .brand {
  top: 6%;
}
.gate-signature {
  bottom: 6%;
  color: #95bec1;
  font:
    12px "Cascadia Code",
    Consolas,
    monospace;
}
.brand {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.brand span {
  font-weight: 400;
  color: #a4bfc4;
}
.brandmark {
  display: inline-block;
  width: 25px;
  height: 25px;
  border: 2px solid var(--accent);
  border-radius: 6px;
  transform: rotate(45deg);
  margin-right: 9px;
  position: relative;
}
.brandmark:before,
.brandmark:after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid #66a8a7;
  border-radius: 3px;
}
.brandmark:after {
  inset: 8px;
  background: var(--accent);
}
.gate-form {
  align-self: center;
  justify-self: center;
  width: min(80%, 370px);
}
h1,
h2,
h3,
p {
  margin: 0;
}
.kicker,
.navtitle {
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}
.gate h1,
#welcome h1 {
  font-size: clamp(36px, 4.5vw, 60px);
  letter-spacing: -0.055em;
  font-weight: 500;
  margin-top: 0.55rem;
}
.gate p,
#welcome p,
.sub {
  color: var(--dim);
  line-height: 1.6;
}
.gate form {
  display: grid;
  gap: 18px;
  margin-top: 32px;
}
.gate input {
  padding: 13px;
}
.about-link {
  display: inline-block;
  margin-top: 18px;
  font-size: 0.875rem;
  text-underline-offset: 3px;
}
.gate button.primary {
  margin-top: 8px;
  padding: 13px 15px;
}
.orb-wrap {
  position: relative;
  width: min(100%, 530px);
  aspect-ratio: 1.55;
  margin: auto;
}
.orb {
  width: 100%;
  height: 100%;
  display: block;
}
.gate-art .orb-wrap {
  aspect-ratio: 1;
  width: 94%;
}
#shell {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  height: 100dvh;
  overflow: hidden;
}
aside {
  background: #0c181d;
  border-right: 1px solid var(--line);
  padding: 28px 17px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
}
aside .brand {
  padding-left: 12px;
  margin-bottom: 26px;
}
.newchat {
  text-align: left;
  color: #ceeeee;
  background: #163034;
  margin-bottom: 24px;
  font-size: 14px;
}
.navtitle {
  font-size: 10px;
  color: #7a959e;
  margin: 30px 12px 8px;
}
.navlink,
.recent {
  width: 100%;
  text-align: left;
  color: var(--dim);
  border: 1px solid transparent;
  background: transparent;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.navlink[aria-current],
.recent[aria-current] {
  color: var(--accent);
  background: #173034;
}
.navlink svg,
.icon svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.recent {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
#recent {
  overflow: auto;
  min-height: 28px;
}
.identity {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.identity b {
  background: #274649;
  color: var(--accent);
  padding: 8px 11px;
  border-radius: 10px;
}
.identity button {
  margin-left: auto;
  background: transparent;
}
.desk {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.desk header {
  display: flex;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid #21353b;
  padding: 0 32px;
  min-height: 62px;
  font-size: 13px;
}
.crumb,
.slash {
  color: #81999d;
}
.top-status {
  margin-left: auto;
  color: #aac6c6;
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.dot,
.signal {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #63dac8;
  border-radius: 50%;
  box-shadow: 0 0 12px #58d3c766;
}
.signal {
  margin-right: 8px;
}
#menu {
  display: none;
}
#chat {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 50% 38%, #10303466, transparent 62%);
}
.chat-scroll {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  position: relative;
}
#welcome {
  margin: auto;
  text-align: center;
  position: relative;
  width: 100%;
  padding: 12px 10px 18px;
}
#welcome .orb-wrap {
  max-height: clamp(130px, 30vh, 305px);
}
#welcome .kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
#welcome h1 {
  font-size: clamp(36px, 3.7vw, 55px);
}
#welcome p {
  margin: 0.5rem 0 1rem;
}
.chips {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.chips button {
  font-size: 12px;
  background: #102226;
  color: #c7dbdc;
  border-radius: 20px;
}
.composer-wrap,
#messages {
  width: min(100% - 52px, 860px);
  margin: 0 auto;
}
.composer-wrap {
  padding: 12px 0 16px;
}
#composer {
  border: 1px solid #39575e;
  padding: 12px;
  border-radius: 17px;
  background: linear-gradient(125deg, #192c32, #112328);
  box-shadow: 0 8px 32px #0002;
}
#composer textarea {
  resize: vertical;
  min-height: 48px;
  max-height: 180px;
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 4px;
  outline-offset: -1px;
}
.composer-tools {
  display: flex;
  gap: 7px;
  align-items: center;
}
.icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  color: #bdd1d4;
}
.icon.active {
  color: #ffada6;
  border-color: #ffada6;
}
.grow {
  flex: 1;
}
.audio-toggle {
  font-size: 12px;
  color: #a8bec2;
  gap: 3px;
}
.composer-tools select {
  max-width: 145px;
  padding: 5px;
  font-size: 12px;
}
.send {
  width: 35px;
  height: 35px;
  font-size: 20px;
  padding: 0;
}
.note {
  min-height: 17px;
  padding: 5px;
  color: var(--dim);
  font-size: 12px;
}
#attachments {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
#attachments button {
  font-size: 12px;
  margin-bottom: 8px;
}
#messages {
  padding: 12px 0;
}
.msg {
  max-width: 92%;
  margin: 16px 0 22px;
}
.msg .by {
  font-size: 11px;
  color: var(--accent);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 7px;
}
.msg .body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.msg.user {
  margin-left: auto;
  width: fit-content;
  padding: 12px 17px;
  background: #192d33;
  border-radius: 15px;
}
.msg.user .by {
  color: #a2babe;
}
.downloads {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 10px;
}
.downloads audio {
  max-width: 100%;
  height: 34px;
}
#jobbar {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  flex-wrap: wrap;
  color: #c8e1df;
}
#jobbar button {
  padding: 4px 8px;
}
.state-dot {
  animation: pulse 1.6s infinite;
}
.state-dot.idle {
  animation: none;
}
@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}
#panel {
  overflow: auto;
  padding: clamp(16px, 4vw, 54px);
  width: min(100%, 1060px);
  margin: 0 auto;
}
.pagehead {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 24px;
}
.pagehead h1 {
  font-weight: 500;
  letter-spacing: -1.5px;
  font-size: 34px;
  margin-right: auto;
}
.card {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 20px;
  border-radius: 14px;
  margin-bottom: 16px;
}
.card h2 {
  font-size: 18px;
  font-weight: 550;
  margin-bottom: 14px;
}
.card form,
#modalbody form {
  display: grid;
  gap: 14px;
}
.wrap,
.row {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.row {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.row:last-child {
  border: 0;
}
.row .title {
  flex: 1;
  min-width: 110px;
  overflow-wrap: anywhere;
}
.row small {
  display: block;
  margin-top: 3px;
  color: var(--dim);
}
.row button,
.row a {
  font-size: 12px;
}
.mono {
  font:
    13px Cascadia Code,
    Consolas,
    monospace;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.fieldgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.empty {
  color: var(--dim);
  font-size: 14px;
  padding: 10px 0;
}
.danger {
  color: #ffb7a6;
}
.account-delete-description {
  margin: 0 0 18px;
  color: var(--dim);
  line-height: 1.5;
}
#account-delete-heading,
#account-delete-description + form label {
  overflow-wrap: anywhere;
}
.account-delete-actions {
  justify-content: flex-end;
}
.account-delete-actions .danger {
  background: #442929;
  border-color: #784941;
}
.close {
  float: right;
}
.muted {
  color: var(--dim);
}
.card output {
  display: block;
  overflow-wrap: anywhere;
}
.card textarea {
  min-height: 100px;
}
dialog {
  background: #13262c;
  color: #edf5f6;
  border: 1px solid #45626b;
  border-radius: 16px;
  max-width: min(90vw, 580px);
  width: 500px;
  padding: 20px;
}
dialog::backdrop {
  background: #0009;
  backdrop-filter: blur(4px);
}
#modalbody h2 {
  margin: 4px 0 20px;
}
#modalbody textarea {
  min-height: 180px;
}
#toast {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 8;
  padding: 12px 16px;
  max-width: min(90vw, 580px);
  background: #20383f;
  color: #eef6f5;
  border: 1px solid #557780;
  border-radius: 9px;
  box-shadow: 0 10px 32px #0005;
}
button[aria-busy="true"] {
  opacity: 0.65;
}
@media (max-width: 760px) {
  .gate {
    grid-template-columns: 1fr;
    grid-template-rows: 26vh auto;
  }
  .gate-art {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .gate-art .brand {
    top: 18%;
    left: 6%;
    font-size: 18px;
  }
  .gate-art .orb-wrap {
    height: 100%;
    width: 80%;
  }
  .gate-signature {
    display: none;
  }
  .gate-form {
    align-self: start;
    padding: 32px 0;
  }
  .gate h1 {
    font-size: 36px;
  }
  #shell {
    display: block;
  }
  .desk {
    height: 100%;
  }
  aside {
    position: fixed;
    inset: 0 auto 0 0;
    width: 245px;
    z-index: 5;
    transform: translateX(-100%);
    transition: transform 0.18s;
    box-shadow: 0 0 40px #0005;
  }
  #shell.menuopen aside {
    transform: none;
  }
  #shell.menuopen .desk {
    opacity: 0.55;
  }
  #menu {
    display: block;
    padding: 4px 7px;
  }
  .desk header {
    padding: 0 15px;
    min-height: 50px;
  }
  .composer-wrap,
  #messages {
    width: calc(100% - 22px);
  }
  .composer-wrap {
    padding-bottom: 4px;
  }
  #panel {
    padding: 20px 12px;
  }
  .audio-toggle {
    font-size: 11px;
  }
  .composer-tools select {
    max-width: 108px;
  }
  .card {
    padding: 14px;
  }
  #welcome .orb-wrap {
    max-height: 24vh;
  }
  #welcome p {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
#jobbar .preview {
  white-space: pre-wrap;
  word-break: break-word;
  flex-basis: 100%;
  max-height: 140px;
  overflow: auto;
  padding: 9px;
  background: #121d22;
  border-radius: 8px;
}
#jobbar[data-state="failed"] .dot,
#jobbar[data-state="cancelled"] .dot {
  background: #f39d8a;
}
#jobbar[data-state="approval_required"] .dot,
#jobbar[data-state="needs_input"] .dot {
  background: #ecc27f;
}
#desktop-action {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 9px;
  padding-bottom: 9px;
}
#desktop-action label {
  font-size: 12px;
}
#desktop-action input,
#desktop-action select {
  padding: 5px;
}
#activity {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--accent);
  text-transform: capitalize;
}
#activity .orb {
  width: 34px;
  height: 34px;
}
#activity:not([hidden]) + .top-status {
  margin-left: 8px;
}
.badge {
  margin-left: auto;
  color: var(--accent);
}
.artifact-preview {
  max-width: 140px;
  max-height: 80px;
  border-radius: 6px;
  background: #d9e5e4;
  object-fit: contain;
}
#desktop-state {
  flex-basis: 100%;
  font-size: 11px;
  color: var(--dim);
}
#history {
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--dim);
}
#history summary {
  cursor: pointer;
}
#timeline {
  max-height: 20vh;
  min-height: 30px;
  overflow: auto;
  margin: 6px 0;
  background: var(--shade);
  border-radius: 6px;
}
.step {
  padding: 5px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.step time {
  font:
    11px Consolas,
    monospace;
  color: var(--accent);
}
.integration-card {
  padding: 0;
  overflow: hidden;
}
.integration-card > h2 {
  padding: 22px 22px 3px;
}
.card .gemini-preset {
  gap: 12px;
  padding: 18px 20px;
  margin: 0 22px 20px;
  border: 1px solid #335456;
  border-radius: 10px;
  background: #10282c;
}
.gemini-preset h3 {
  font-size: 1rem;
  font-weight: 600;
}
.gemini-preset p {
  color: var(--dim);
  font-size: 0.85rem;
  line-height: 1.5;
}
.gemini-preset a {
  text-underline-offset: 2px;
}
.gemini-preset input[type="password"] {
  max-width: 32rem;
}
.gemini-preset .check,
.gemini-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gemini-actions {
  flex-wrap: wrap;
}
.gemini-actions button {
  font-size: 0.84rem;
}
.integration-note {
  color: var(--dim);
  border-top: 1px solid var(--line);
  padding: 16px 22px;
  font-size: 12px;
  margin: 0;
}
.integration-group {
  border-top: 1px solid var(--line);
}
.integration-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  list-style: none;
  padding: 16px 21px;
}
.integration-heading::-webkit-details-marker {
  display: none;
}
.integration-heading:before {
  content: "›";
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
}
.integration-group[open] > .integration-heading:before {
  transform: rotate(90deg);
}
.integration-heading strong {
  font-size: 14px;
  font-weight: 600;
}
.integration-heading small {
  color: var(--dim);
  margin-left: auto;
  font-size: 12px;
}
.card .integration-form {
  display: block;
}
.integration-fields {
  padding: 0 22px 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
}
.integration-field {
  min-width: 0;
}
.integration-field-title,
.integration-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.integration-field label {
  margin: 0;
  font-weight: 550;
}
.integration-field input,
.integration-field select {
  width: 100%;
  margin: 7px 0 3px;
  padding: 8px;
  font-size: 13px;
}
.integration-help,
.integration-status {
  font-size: 12px;
  line-height: 1.45;
  color: var(--dim);
  display: block;
}
.integration-source {
  font-size: 10px;
  letter-spacing: 0.15px;
  color: #9db3b9;
}
.integration-source.configured {
  color: #82cfc5;
}
.integration-reset {
  border: 0;
  background: transparent;
  padding: 4px 0;
  font-size: 12px;
  color: var(--accent);
}
.integration-footer {
  justify-content: flex-end;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
}
.integration-footer button {
  font-size: 13px;
}
@media (max-width: 800px) {
  .integration-fields {
    grid-template-columns: 1fr;
  }
  .integration-heading {
    padding: 14px;
  }
  .integration-fields {
    padding: 0 14px 16px;
  }
}
