:root {
  color-scheme: dark;
  font:
    16px/1.5 Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: #f4f5f3;
  background: #111312;
  --surface: #111312;
  --sidebar: #0c0e0d;
  --raised: #1b1e1c;
  --line: #303431;
  --muted: #a5aea8;
  --mint: #8cebd6;
  --column: 48rem;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  padding: 0.58rem 0.86rem;
  background: var(--mint);
  color: #102923;
  font-weight: 590;
  cursor: pointer;
  text-decoration: none;
}
button:hover:not(:disabled),
.button:hover {
  filter: brightness(1.1);
}
button:disabled {
  cursor: default;
  opacity: 0.48;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}
a {
  color: var(--mint);
  text-underline-offset: 0.2em;
}
svg {
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
  overflow-wrap: anywhere;
}
h1,
h2,
h3,
h4 {
  line-height: 1.25;
}
p,
dd {
  white-space: pre-wrap;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.app {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: clamp(13.5rem, 20vw, 17rem) minmax(0, 1fr);
  overflow: hidden;
}
#sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1.3rem 0.75rem 0.85rem;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  margin: 0 0.45rem;
  text-decoration: none;
  color: #e7eae8;
}
.brand img {
  display: block;
  width: 6rem;
  height: auto;
}
.brand span {
  font-size: 0.73rem;
  line-height: 1;
  border: 1px solid #3a423d;
  border-radius: 0.3rem;
  padding: 0.24rem 0.3rem;
  font-weight: 650;
}
#conversations {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-top: 2.5rem;
}
.nav-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0 0.65rem 0.55rem;
}
.nav-item {
  width: 100%;
  justify-content: flex-start;
  text-align: start;
  gap: 0.65rem;
  min-height: 2.55rem;
  padding: 0.48rem 0.6rem;
  margin: 0.06rem 0;
  background: transparent;
  color: #c4cbc6;
  font-weight: 480;
  font-size: 0.86rem;
}
.nav-item svg {
  color: #9aa69f;
  width: 1rem;
  height: 1rem;
}
.nav-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-item:hover,
.icon-button:hover {
  background: #1c201d;
}
.nav-item[aria-current] {
  background: #222723;
  color: #f5f9f5;
}
.nav-item[aria-current] svg {
  color: var(--mint);
}
.sidebar-footer {
  border-top: 1px solid var(--line);
  padding-top: 0.65rem;
}
main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3.6rem;
  padding: 0.5rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
}
#context {
  font-weight: 560;
  font-size: 0.92rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.icon-button {
  background: transparent;
  color: #c4ccc6;
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
}
.mobile {
  display: none;
}
#notice:not(:empty) {
  margin: 0.5rem auto 0;
  max-width: var(--column);
  color: #f3dab1;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
}
#screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
}
.viewport {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #3b413c transparent;
}
.messages,
.intro,
.account-hint {
  width: min(100%, var(--column));
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.messages {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-block: 1.65rem;
}
.messages:empty {
  display: none;
}
.intro {
  margin-block: auto;
  padding-block: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}
.intro h1 {
  font-size: clamp(1.6rem, 3.1vw, 2.25rem);
  font-weight: 560;
  letter-spacing: -0.045em;
}
.intro > p {
  max-width: 27rem;
  color: var(--muted);
}
.suggestions,
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.suggestions {
  justify-content: center;
  margin-top: 0.35rem;
}
.suggestion,
.quiet {
  border: 1px solid var(--line);
  background: transparent;
  color: #e0e5e1;
}
.suggestion {
  padding: 0.48rem 0.79rem;
  border-radius: 2rem;
  font-size: 0.82rem;
  font-weight: 490;
}
.suggestion svg {
  width: 0.92rem;
  height: 0.92rem;
  color: var(--muted);
}
.suggestion:hover,
.quiet:hover {
  background: var(--raised);
}
.turn {
  min-width: 0;
  align-self: flex-start;
  max-width: 100%;
}
.turn.user {
  align-self: flex-end;
  max-width: min(84%, 37rem);
  border-radius: 1.1rem 1.1rem 0.25rem 1.1rem;
  background: #e6eae5;
  color: #18211a;
  padding: 0.62rem 1rem;
}
.turn.assistant {
  max-width: 100%;
}
.byline,
.draft-kind {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  color: var(--muted);
}
.byline {
  margin-bottom: 0.4rem;
  font-weight: 590;
}
.byline svg {
  color: var(--mint);
  width: 0.95rem;
  height: 0.95rem;
}
.message-text {
  font-size: 0.98rem;
  line-height: 1.6;
}
.assistant > button {
  margin-top: 0.65rem;
}
.proposal,
.review,
.card {
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: 0.85rem;
  padding: clamp(0.95rem, 2.4vw, 1.25rem);
  min-width: 0;
}
.turn .proposal,
.turn .card,
.turn .review,
.card .review {
  margin-top: 0.8rem;
}
.proposal h3,
.card h3,
.review h3 {
  font-size: 1.07rem;
  margin: 0.45rem 0;
}
.proposal h4 {
  font-size: 1rem;
  margin-top: 0.6rem;
}
.proposal p,
.card p,
.review p {
  margin: 0.45rem 0;
  color: #c6cfc9;
  font-size: 0.93rem;
}
.proposal > button,
.card .actions {
  margin-top: 0.7rem;
}
.card .actions a {
  font-size: 0.87rem;
  padding-block: 0.35rem;
}
.quiet,
.form button,
.review button {
  font-size: 0.88rem;
}
.review {
  border-color: #446057;
}
.form {
  display: grid;
  gap: 0.7rem;
}
.form > button {
  justify-self: start;
}
.form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.86rem;
  color: #ced5ce;
}
.form input,
.form select,
.form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #4b544e;
  background: #141815;
  border-radius: 0.45rem;
  padding: 0.55rem 0.7rem;
}
.form textarea {
  min-height: 4.5rem;
  resize: vertical;
}
.muted,
dt {
  color: var(--muted);
}
dl {
  display: grid;
  grid-template-columns: minmax(6rem, auto) 1fr;
  gap: 0.4rem 1rem;
  font-size: 0.89rem;
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.account-hint {
  color: var(--muted);
  font-size: 0.82rem;
  padding-block: 1rem;
}
.typing {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.65rem 0;
}
.typing i {
  width: 0.37rem;
  height: 0.37rem;
  border-radius: 50%;
  background: var(--muted);
  animation: pulse 1.2s infinite ease-in-out;
}
.typing i:nth-of-type(2) {
  animation-delay: 0.13s;
}
.typing i:nth-of-type(3) {
  animation-delay: 0.26s;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
    transform: translateY(-0.16rem);
  }
}
@media (prefers-reduced-motion: reduce) {
  .typing i {
    animation: none;
  }
}
.composer {
  flex: none;
  padding: 0.85rem clamp(1rem, 4vw, 2rem) max(1.1rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.composer-inner {
  max-width: calc(var(--column) - 4rem);
  margin-inline: auto;
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  border: 1px solid #404741;
  border-radius: 1.05rem;
  background: var(--raised);
  padding: 0.4rem;
}
.composer-inner:focus-within {
  border-color: #819b8f;
}
.composer textarea {
  flex: 1;
  min-width: 0;
  field-sizing: content;
  min-height: 2.5rem;
  max-height: 8rem;
  resize: none;
  padding: 0.55rem 0.6rem;
  border: 0;
  background: transparent;
  outline: none;
  line-height: 1.45;
}
.composer textarea::placeholder {
  color: #9da69f;
}
.composer textarea:focus-visible {
  outline: none;
}
.send {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 0.75rem;
  padding: 0;
}
.send:disabled {
  background: #353b36;
  color: #b2bcb5;
  opacity: 1;
}
body > main {
  margin: 10vh auto;
  padding: 1.5rem;
  max-width: 36rem;
  gap: 1rem;
}
@media (max-width: 47rem) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }
  .mobile {
    display: inline-flex;
  }
  #sidebar {
    visibility: hidden;
    position: fixed;
    z-index: 5;
    inset: 0 auto 0 0;
    width: min(19rem, 86vw);
    padding-top: max(1.3rem, env(safe-area-inset-top));
  }
  #sidebar.open {
    visibility: visible;
  }
  #close-nav {
    position: absolute;
    top: 0.6rem;
    right: 0.5rem;
  }
  #shade {
    position: fixed;
    z-index: 4;
    inset: 0;
    border: 0;
    border-radius: 0;
    background: #0009;
  }
  .chat-header {
    min-height: 3.25rem;
    padding: 0.18rem 0.7rem;
  }
  .intro {
    gap: 0.85rem;
  }
  .composer {
    padding: 0.6rem 0.75rem max(0.7rem, env(safe-area-inset-bottom));
  }
  .turn.user {
    max-width: 88%;
  }
  dl {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
  dd + dt {
    margin-top: 0.42rem;
  }
}
@media (max-height: 33rem) {
  .intro {
    padding-block: 1rem;
    gap: 0.55rem;
  }
}
.brand-mark {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
}
@media (min-width: 47.01rem) {
  .app.compact {
    grid-template-columns: 4rem minmax(0, 1fr);
  }
  .compact #sidebar {
    align-items: center;
    padding-inline: 0.45rem;
  }
  .compact .brand {
    display: block;
    width: 2.2rem;
    height: 2.2rem;
    background: url('/mark.png') center/contain no-repeat;
  }
  .compact .brand img,
  .compact .brand span,
  .compact .nav-label,
  .compact .nav-item span {
    display: none;
  }
  .compact #conversations,
  .compact .sidebar-footer {
    width: 100%;
  }
  .compact .nav-item {
    justify-content: center;
  }
}
