:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #172422;
  background: #f5f6f2;
  --ink: #172422;
  --green: #245c49;
  --border: #d5dfd9;
  --muted: #465b53;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, textarea { font: inherit; }
button {
  cursor: pointer;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  border-radius: .65rem;
  padding: .6rem .85rem;
}
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #438b74; outline-offset: 3px; }
.topbar {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  padding: .75rem clamp(1rem, 4vw, 3rem);
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.brand { text-decoration: none; color: var(--green); font-size: 1.2rem; font-weight: 750; }
.brand span { color: var(--ink); font-weight: 500; }
#account { display: flex; align-items: center; gap: .75rem; }
#signin { display: grid; place-items: center; min-height: 72vh; padding: 1rem; }
.signin-card { background: #fff; border: 1px solid var(--border); border-radius: 1rem; padding: clamp(1rem, 5vw, 2.5rem); max-width: 30rem; }
.choices { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.context { margin: 0 0 .35rem; color: var(--green); font-size: .8rem; font-weight: 700; }
h1 { margin: 0; font-size: clamp(1.45rem, 4vw, 2rem); }
#workspace {
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
  width: min(100% - 2rem, 76rem);
  margin: clamp(1rem, 4vw, 2.5rem) auto;
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
}
aside { padding: 1rem; background: #edf2ee; border-right: 1px solid var(--border); }
aside h2 { font-size: .9rem; margin: 1.4rem 0 .65rem; }
#history { display: grid; gap: .4rem; max-height: 60vh; overflow: auto; padding: .2rem; }
#history button { text-align: left; }
button[aria-current="true"] { border-color: var(--green); background: #dbede2; }
.chat { display: flex; flex-direction: column; min-height: 70dvh; min-width: 0; }
.chat-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.chat-header, #compose { padding: 1rem clamp(.75rem, 3vw, 1.75rem); }
.chat-header { border-bottom: 1px solid var(--border); }
#empty { padding: 0 1.25rem; color: var(--muted); }
#transcript {
  display: flex; flex-direction: column; flex: 1; gap: .85rem;
  list-style: none; margin: 0; padding: 1rem clamp(.75rem, 3vw, 1.75rem);
  max-height: 65dvh; overflow: auto;
}
.bubble {
  max-width: min(88%, 44rem); align-self: flex-start; border-radius: .8rem;
  padding: .65rem .9rem; background: #edf2ee; overflow-wrap: anywhere;
}
.bubble.mine { align-self: flex-end; background: #dbede2; }
.bubble p { margin: .3rem 0 0; white-space: pre-wrap; }
.meta { color: var(--muted); font-size: .8rem; }
.bubble button { margin-top: .5rem; }
#compose { border-top: 1px solid var(--border); }
#compose label { display: block; margin-bottom: .35rem; font-size: .9rem; font-weight: 650; }
.composer { display: flex; gap: .5rem; align-items: end; }
textarea { width: 100%; min-width: 0; resize: vertical; border: 1px solid #8ca499; border-radius: .65rem; padding: .6rem; }
#create, #send { background: var(--green); border-color: var(--green); color: #fff; }
#notice { width: min(100% - 2rem, 76rem); margin: 1rem auto; color: #7b321b; }
@media (max-width: 650px) {
  #workspace { grid-template-columns: 1fr; }
  aside { border-right: 0; border-bottom: 1px solid var(--border); }
  #history { grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); max-height: 8rem; }
  .chat { min-height: 58dvh; }
}
.public-demo {
  width: min(100% - 2rem, 46rem);
  margin: 2rem auto;
  padding: 1.5rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 1rem;
}
.public-demo a { color: var(--green); }
.public-demo li { margin-block: .55rem; }
.enquiry-body { white-space: pre-wrap; overflow-wrap: anywhere; }
