:root {
  font-family: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  color: #172b27;
  background: #f7f8f2;
  font-synthesis: none;
  color-scheme: light;
  --ink: #172b27;
  --muted: #52655c;
  --line: #ced9ce;
  --green: #235b43;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #328051; outline-offset: 3px; }

.workspace {
  width: min(1110px, calc(100% - 80px));
  margin: 0 auto;
  padding: clamp(28px, 6vh, 70px) 0 28px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .08em;
}

.mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #dcf497;
  border-radius: 11px;
  font: bold 25px/1 Georgia, serif;
  padding-bottom: 3px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(32px, 7vw, 102px);
  align-items: start;
  margin-top: clamp(35px, 7vh, 78px);
}

.setup { padding-top: 12px; }
h1 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(58px, 7.1vw, 106px);
  letter-spacing: -.072em;
  line-height: .89;
}

.intro { color: var(--muted); font-size: 17px; line-height: 1.65; max-width: 30ch; margin: 23px 0 30px; }
#site-form { display: grid; gap: 9px; max-width: 400px; }
label { font-weight: 650; font-size: 14px; }
input {
  width: 100%;
  min-width: 0;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  min-height: 47px;
}
input::placeholder { color: #627368; opacity: 1; }

.primary {
  border: 1px solid var(--green);
  border-radius: 10px;
  background: var(--green);
  color: white;
  font-weight: 650;
  padding: 11px 15px;
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.primary:hover:not(:disabled) { background: #194632; }
.primary:disabled { background: #e8ede6; border-color: #e1e8df; color: #52655c; }
.status { color: var(--muted); font-size: 14px; line-height: 1.4; margin: 10px 0 0; }
.status:empty { display: none; }
.status[data-error="true"] { color: #a33322; }
.examples { margin-top: 23px; }
.examples p { color: var(--muted); font-size: 14px; margin: 0 0 9px; }
.chip {
  color: #24533e;
  border: 1px solid #c9d8c9;
  border-radius: 20px;
  background: #f1f5ec;
  padding: 7px 11px;
  margin: 0 3px 6px 0;
  font-size: 13px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.chip:hover:not(:disabled) { background: #e1eddd; }
.chip:disabled { opacity: .65; }
.message-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.message-actions .chip { display: inline-block; margin: 0; text-decoration: none; }

.chat {
  background: #fff;
  border: 1px solid #d9e0d6;
  border-radius: 21px;
  overflow: hidden;
  box-shadow: 0 18px 56px #233f2813, 0 3px 12px #233f280a;
}
.chat-header { display: flex; align-items: center; gap: 13px; background: var(--ink); color: #fff; padding: 18px 22px; }
.chat-header div { min-width: 0; }
.chat-header h2 { font-size: 17px; margin: 0; }
.chat-header p { font-size: 13px; color: #d1e0d2; margin: 4px 0 0; overflow-wrap: anywhere; }
.chat-icon {
  width: 39px;
  height: 39px;
  border-radius: 11px;
  background: #dcf497;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.chat-icon span {
  width: 19px;
  height: 15px;
  border: 2px solid var(--ink);
  border-radius: 5px 5px 5px 1px;
  position: relative;
}
.chat-icon span::before { content: "···"; position: absolute; inset: -7px 1px 0; color: var(--ink); font-weight: 700; }
.chat-body { padding: 16px; }
.messages {
  height: clamp(255px, 42vh, 385px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px;
  overscroll-behavior: contain;
}
.empty { margin: auto; text-align: center; padding: 14px; max-width: 34ch; }
.empty-icon {
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  color: var(--green);
  background: #ebf2e5;
  font: 58px/1.2 Georgia, serif;
}
.empty p { margin: 0 0 5px; font-weight: 700; }
.empty small { color: var(--muted); line-height: 1.45; }
.bubble { max-width: min(90%, 48ch); padding: 10px 13px; overflow-wrap: anywhere; line-height: 1.48; font-size: 15px; }
.question { align-self: flex-end; background: #234f3d; color: white; border-radius: 13px 13px 3px 13px; }
.answer { align-self: flex-start; background: #edf3ea; color: var(--ink); border-radius: 13px 13px 13px 3px; white-space: pre-line; }
.source { color: #24573c; display: block; margin: 8px 0 0; font-size: 13px; text-underline-offset: 3px; }
.suggestions { margin: 8px 1px 2px; }
.composer { display: flex; align-items: stretch; gap: 8px; margin-top: 10px; }
.composer input { flex: 1; }
footer { color: var(--muted); font-size: 13px; margin-top: 27px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 740px) {
  .workspace { width: calc(100% - 34px); }
  .layout { grid-template-columns: 1fr; gap: 24px; margin-top: 27px; }
  .setup { padding-top: 0; }
  h1 { font-size: clamp(53px, 13vw, 84px); }
  h1 br { display: none; }
  .intro { margin: 15px 0 20px; max-width: 38ch; }
  #site-form { max-width: none; }
  .examples { margin-top: 15px; }
  .chat-header { padding: 14px 16px; }
  .chat-body { padding: 11px; }
}
