:root {
  font-family:
    "DM Sans",
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #1c2a2b;
  background: #f8f8f4;
  font-size: 15px;
  --ink: #172224;
  --muted: #606d6b;
  --line: #dce1db;
  --paper: #f8f8f4;
  --green: #33634e;
  --lime: #c5e985;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #549375;
  outline-offset: 2px;
}
button {
  border: 0;
  background: transparent;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
[hidden] {
  display: none !important;
}
#shell {
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
  height: 100dvh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 22px;
  letter-spacing: -1.1px;
  font-weight: 650;
}
.brand img {
  width: 34px;
  border-radius: 10px;
}
#rail {
  display: flex;
  flex-direction: column;
  padding: 29px 16px 13px;
  background: var(--ink);
  color: #ecf1eb;
}
#rail .brand {
  padding: 0 8px;
}
.rail-label,
.eyebrow {
  letter-spacing: 0.15em;
  font-size: 10px;
  font-weight: 700;
}
.rail-label {
  margin: 48px 12px 12px;
  color: #a1b1ab;
}
.people-label {
  margin-top: 32px;
}
nav,
.rail-bottom,
#roster {
  display: grid;
  gap: 3px;
}
#rail button {
  color: #d4dcd5;
  border-radius: 7px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  font-weight: 510;
}
#rail button:hover,
#rail button.active {
  background: #2b3a3a;
  color: white;
}
#rail nav b {
  font: 21px/18px monospace;
  color: #bbcdbd;
  width: 20px;
  text-align: center;
}
#rail nav .active b {
  color: var(--lime);
}
#req-count {
  margin-left: auto;
  color: #e0eda4;
}
.rail-bottom {
  margin-top: auto;
}
.owner {
  display: flex;
  align-items: center;
  gap: 11px;
  border-top: 1px solid #384646;
  margin: 15px 5px 0;
  padding: 17px 2px 2px;
}
.owner-icon,
.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  font-weight: 650;
}
.owner-icon {
  width: 35px;
  height: 35px;
  background: #394a48;
  border-radius: 50%;
}
.owner small {
  display: block;
  font-size: 11px;
  color: #aab9b3;
  margin-top: 3px;
}
.owner #logout {
  margin-left: auto;
}
.avatar {
  border-radius: 12px;
  width: 48px;
  height: 48px;
  color: #2d4a39;
  background: #d5e7bf;
  font-family: Georgia, serif;
  font-size: 21px;
}
.avatar.cto {
  color: #4a5269;
  background: #dce2f2;
}
.avatar.other {
  color: #715641;
  background: #ecdfcc;
}
.avatar.sm {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 13px;
}
.content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.top {
  height: 62px;
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(20px, 4vw, 59px);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  flex: none;
}
.top em {
  font-style: normal;
  color: #adb6b0;
}
.top strong {
  color: var(--ink);
  font-weight: 550;
}
.instance,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
}
.instance {
  margin-left: auto;
}
.instance i,
.pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64916a;
}
.pill {
  border: 1px solid var(--line);
  padding: 5px 9px;
  border-radius: 50px;
  background: #fff;
}
.pill.rest i {
  background: #adb3a6;
}
#menu {
  display: none;
}
#page {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 34px clamp(20px, 4vw, 59px);
}
#page.chat {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 20px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 14px;
}
.identity h1 {
  font:
    500 clamp(24px, 3vw, 33px)/1.2 Georgia,
    serif;
  margin: 0;
  letter-spacing: -0.9px;
}
.identity p,
.muted {
  color: var(--muted);
  font-size: 13px;
}
.identity p {
  margin: 4px 0 0;
}
.identity .pill {
  margin-left: auto;
}
.tabs {
  margin-top: 25px;
  display: flex;
  gap: 23px;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  border-bottom: 2px solid transparent;
  padding: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.tabs .active {
  color: #264f3d;
  border-color: #497353;
}
.feed {
  flex: 1;
  overflow: auto;
  min-height: 0;
  padding: 20px 3px 14px;
}
.empty {
  margin: clamp(14px, 7vh, 75px) auto 20px;
  max-width: 610px;
}
.empty .eyebrow {
  color: var(--green);
}
.empty h2,
.page-title {
  font:
    500 clamp(30px, 3.3vw, 46px)/1.12 Georgia,
    serif;
  letter-spacing: -1.5px;
  margin: 0.4em 0 0.3em;
}
.empty p,
.lead {
  line-height: 1.6;
  color: var(--muted);
  max-width: 620px;
}
.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}
.chip,
.secondary,
.primary {
  border-radius: 8px;
  font-size: 13px;
  font-weight: 550;
  padding: 10px 14px;
}
.secondary,
.chip {
  border: 1px solid #d1d9d0;
  background: #fff;
}
.chip:hover,
.secondary:hover {
  background: #eef3e7;
}
.primary,
#login-form button {
  background: var(--ink);
  color: white;
}
.composer {
  flex: none;
  padding: 13px 14px 9px;
  background: #fff;
  border: 1px solid #c9d2c7;
  border-radius: 13px;
  box-shadow: 0 3px 14px #293a2909;
}
.composer textarea {
  border: 0;
  width: 100%;
  resize: vertical;
  min-height: 42px;
  max-height: 150px;
  background: transparent;
  color: var(--ink);
  padding: 3px;
}
.composer footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.composer select {
  border: 0;
  background: white;
  color: var(--muted);
  font-size: 12px;
}
.send {
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  padding: 8px 14px;
}
.notice {
  color: #705827;
  background: #f5eedb;
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 12px;
  margin: 0 0 10px;
}
.notice button {
  text-decoration: underline;
  font-weight: 600;
}
.message {
  max-width: 760px;
  margin: 8px 0 20px;
}
.message.user {
  margin-left: auto;
  background: #edf1e7;
  padding: 12px 15px;
  border-radius: 12px;
  max-width: min(85%, 650px);
}
.byline {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 12px;
  font-weight: 620;
}
.byline time {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}
.message > p,
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.55;
  margin: 7px 0 0;
}
.markdown {
  margin-top: 7px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  overflow-x: auto;
}
.markdown > :first-child {
  margin-top: 0;
}
.markdown > :last-child {
  margin-bottom: 0;
}
.markdown :is(p, ol, ul, pre, blockquote, table) {
  margin-block: 0.55em;
}
.markdown :is(ul, ol) {
  padding-inline-start: 1.6em;
}
.markdown :is(h1, h2, h3, h4, h5, h6) {
  line-height: 1.3;
  margin-block: 1em 0.35em;
}
.markdown h1 {
  font-size: 1.4em;
}
.markdown h2 {
  font-size: 1.2em;
}
.markdown code {
  font-size: 0.9em;
  background: #eef1ec;
  padding: 0.1em 0.3em;
  border-radius: 3px;
}
.markdown pre {
  background: #f2f4f0;
  padding: 0.75em;
  border-radius: 6px;
  overflow-x: auto;
  white-space: pre;
}
.markdown pre code {
  background: transparent;
  padding: 0;
}
.markdown blockquote {
  border-inline-start: 3px solid var(--line);
  margin-inline: 0;
  padding-inline-start: 0.85em;
}
.markdown table {
  border-collapse: collapse;
}
.markdown :is(th, td) {
  border: 1px solid var(--line);
  padding: 0.3em 0.6em;
  text-align: start;
}
.summary {
  border-left: 2px solid #c0cab7;
  padding-left: 12px;
  color: var(--muted);
}
.error {
  color: #893e35;
}
.cards {
  display: grid;
  gap: 13px;
  margin-top: 24px;
}
.card {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.card h3 {
  margin: 0;
  font-size: 16px;
}
.card p {
  line-height: 1.5;
}
.row {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
}
.row .right {
  margin-left: auto;
}
.manager {
  border-left: 2px solid #cfdbbe;
  margin-left: min(calc(var(--depth, 0) * 18px), 70px);
}
label {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  font-size: 13px;
  font-weight: 550;
}
input,
select,
textarea {
  padding: 10px 12px;
  border: 1px solid #c6d0c7;
  border-radius: 6px;
  background: white;
  max-width: 100%;
}
input[type="checkbox"] {
  width: auto;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
}
pre {
  font:
    13px/1.55 ui-monospace,
    monospace;
  background: #eef1ea;
  color: #243329;
  padding: 16px;
  border-radius: 8px;
}
.terminal {
  background: #172224;
  color: #cfdecf;
}
.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-head button {
  font-size: 25px;
}
.dialog-head strong {
  font:
    24px Georgia,
    serif;
}
dialog {
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 22px;
  width: min(440px, 90vw);
  max-height: 85dvh;
}
dialog::backdrop {
  background: #17222477;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  padding: 12px 20px;
  background: var(--ink);
  color: white;
  border-radius: 9px;
  z-index: 4;
  box-shadow: 0 8px 32px #0003;
}
#login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 10% 0%, #e0e9d7, transparent 65%), #f6f7f2;
}
.login-card {
  max-width: 400px;
  width: 90vw;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.login-card h1 {
  font:
    35px/1.05 Georgia,
    serif;
  margin: 40px 0 12px;
}
.login-card p {
  color: var(--muted);
  line-height: 1.5;
}
#login-form button {
  width: 100%;
  border-radius: 7px;
  padding: 11px;
  display: flex;
  justify-content: space-between;
}
#login-error {
  color: #93362d;
}
a {
  color: #315e44;
}
@media (max-width: 800px) {
  #shell {
    grid-template-columns: 195px 1fr;
  }
  #rail {
    padding: 24px 10px;
  }
  .brand {
    font-size: 19px;
  }
}
@media (max-width: 640px) {
  #shell {
    display: block;
  }
  #rail {
    display: none;
    position: fixed;
    inset: 0 auto 0 0;
    width: 238px;
    z-index: 3;
    box-shadow: 0 0 0 100vmax #11222260;
  }
  #rail.open {
    display: flex;
  }
  .content {
    height: 100dvh;
  }
  #menu {
    display: block;
    margin-left: -6px;
  }
  .top {
    height: 49px;
  }
  #page {
    padding: 22px 16px;
  }
  #page.chat {
    padding-bottom: max(11px, env(safe-area-inset-bottom));
  }
  .tabs {
    gap: 16px;
    overflow: auto;
    margin-top: 18px;
  }
  .empty {
    margin: 26px auto 16px;
  }
  .identity {
    gap: 10px;
  }
  .identity h1 {
    font-size: 27px;
  }
  .card {
    padding: 15px;
  }
  .suggestions {
    gap: 6px;
  }
  .instance {
    font-size: 10px;
  }
  .avatar {
    width: 39px;
    height: 39px;
  }
  .top {
    gap: 8px;
  }
}
.provider {
  padding: 15px 0 0;
  margin-top: 15px;
  border-top: 1px solid var(--line);
}
.identity #state {
  margin-left: auto;
}

#chat-model {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
  margin-top: 5px;
}
.model-picker {
  color: #264f3d;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
}
#custom-label[hidden] {
  display: none;
}
