:root {
  --operator-green: #263f3c;
  --operator-green-2: #365752;
  --operator-red: #98581d;
  --operator-ink: #263f3c;
  --operator-paper: #f0e8da;
  --operator-line: #ddd5c7;
}

body {
  background:
    radial-gradient(circle at 85% 4%, rgba(210, 188, 149, 0.2), transparent 24rem),
    #f0e8da;
}

.operator-page {
  padding: 20px 0 44px;
}

.operator-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
  max-width: 1120px;
  margin-bottom: 12px;
}

.operator-intro-copy {
  max-width: 760px;
}

.operator-intro h1 {
  max-width: 760px;
  margin: 5px 0 10px;
  color: var(--operator-ink);
  font-size: clamp(36px, 3.6vw, 50px);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.operator-intro h1 em {
  color: var(--operator-red);
  font-style: normal;
}

.operator-intro-copy > p:last-child {
  max-width: 720px;
  margin: 0;
  color: #59685f;
  font-size: 15px;
  line-height: 1.65;
}

.operator-intro-notes {
  display: grid;
  gap: 6px;
}

.operator-intro-notes span {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 7px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid rgba(32, 52, 44, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  color: #56655d;
  font-size: 13px;
  line-height: 1.6;
}

.operator-intro-notes b {
  color: var(--operator-green-2);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.operator-chat-shell {
  display: block;
  max-width: 1120px;
  min-height: 0;
  padding-inline: 0;
  overflow: hidden;
  border: 1px solid rgba(32, 52, 44, 0.11);
  border-radius: 10px;
  background: #faf6ed;
  box-shadow: 0 12px 34px rgba(41, 55, 47, 0.08);
}

.chat-history {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 18px 14px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.12), transparent 48%),
    #21483c;
  color: #fff;
}

.chat-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 4px 14px;
}

.chat-history-heading strong {
  font-size: 14px;
  letter-spacing: 0.04em;
}

.new-chat-button {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.new-chat-button:hover,
.new-chat-button:focus-visible {
  background: rgba(255, 255, 255, 0.16);
}

.chat-session-list {
  display: grid;
  gap: 5px;
  min-height: 80px;
  overflow: auto;
}

.chat-session-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #dce7e1;
  text-align: left;
  cursor: pointer;
}

.chat-session-list button:hover,
.chat-session-list button:focus-visible,
.chat-session-list button[aria-current="true"] {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.chat-session-list b {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-session-list span {
  color: #aebfb6;
  font-size: 10px;
}

.chat-history-empty {
  margin: 18px 10px;
  color: #aebfb6;
  font-size: 12px;
}

.chat-storage-note {
  margin: auto 4px 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  color: #aebfb6;
  font-size: 10px;
  line-height: 1.7;
}

.chat-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  background: #faf6ed;
}

.chat-shell-heading {
  padding: 10px 18px 6px;
  border-bottom: 1px solid #e6dfd2;
  background: rgba(255, 255, 255, 0.88);
}

.chat-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.chat-shell-heading small {
  color: var(--operator-red);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.chat-shell-heading h2 {
  margin: 2px 0 0;
  color: var(--operator-ink);
  font-size: 19px;
  letter-spacing: -0.02em;
}

.chat-readiness {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #65746c;
  font-size: 11px;
  white-space: nowrap;
}

.chat-readiness i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4f9b6c;
  box-shadow: 0 0 0 4px rgba(79, 155, 108, 0.12);
}

.chat-prompt-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  margin-top: 5px;
  padding: 0 0 2px;
  scrollbar-width: thin;
}

.chat-prompt-strip > span {
  flex: 0 0 auto;
  color: #6b776f;
  font-size: 11px;
}

.chat-prompt-strip button {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid #d9d1c3;
  border-radius: 999px;
  background: #fff;
  color: #365548;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.chat-prompt-strip button:hover,
.chat-prompt-strip button:focus-visible {
  border-color: var(--operator-green-2);
  background: #eff5f0;
}

.deep-chat-stage {
  min-height: 0;
  height: clamp(460px, 50vh, 580px);
  min-height: 460px;
  flex: 1 1 auto;
}

deep-chat {
  display: block;
  width: 100%;
  height: 100%;
}

.chat-footer-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 36px;
  padding: 7px 20px;
  border-top: 1px solid #ebe4d8;
  background: #fff;
}

.chat-footer-line > span {
  color: #929b95;
  font-size: 10px;
  white-space: nowrap;
}

.chat-status {
  display: flex;
  align-items: center;
  min-height: 24px;
  margin: 0;
  padding: 4px 8px;
  color: #758078;
  font-size: 12px;
  line-height: 1.5;
}

.chat-status.is-busy {
  background: #fff7e8;
  border-radius: 9px;
  color: #98581d;
  font-weight: 700;
}

.chat-status.is-busy::before {
  content: "";
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-right: 0.5em;
  border: 2px solid rgba(152, 88, 29, 0.24);
  border-top-color: #98581d;
  border-radius: 50%;
  animation: operator-wait 0.8s linear infinite;
}

@keyframes operator-wait {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .operator-intro {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .operator-intro-notes {
    display: flex;
  }

  .operator-intro-notes span {
    display: inline-flex;
    padding: 7px 10px;
  }

  .operator-intro-notes b {
    display: inline;
    margin: 0;
  }

}

@media (max-width: 720px) {
  .operator-page {
    padding: 28px 0 36px;
  }

  .operator-intro {
    margin-bottom: 18px;
  }

  .operator-intro h1 {
    font-size: clamp(34px, 10vw, 48px);
  }

  .operator-intro-notes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .operator-intro-notes span {
    display: grid;
    grid-template-columns: 58px 1fr;
    padding: 8px 10px;
  }

  .operator-intro-notes b {
    margin: 0;
  }

  .operator-chat-shell {
    display: block;
    min-height: 0;
    border-radius: 10px;
  }

  .chat-history {
    padding: 10px;
  }

  .chat-history-heading {
    padding: 1px 2px 8px;
  }

  .chat-session-list {
    display: flex;
    min-height: auto;
    overflow-x: auto;
  }

  .chat-session-list button {
    flex: 0 0 176px;
  }

  .chat-storage-note {
    display: none;
  }

  .chat-shell-heading {
    padding: 14px 16px 12px;
  }

  .chat-shell-heading h2 {
    font-size: 18px;
  }

  .chat-prompt-strip {
    padding: 8px 14px;
  }

  .deep-chat-stage {
    height: min(68vh, 650px);
    min-height: 500px;
  }

  .chat-status {
    padding: 0;
  }

  .chat-footer-line {
    padding-inline: 16px;
  }

  .chat-footer-line > span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}

/* Keep the working conversation above the fold. */
.operator-intro{display:block;margin-bottom:18px}.operator-intro h1{font-size:32px;line-height:1.3;margin:0 0 8px}.operator-intro .eyebrow{display:none}.operator-intro-copy>p:last-child{font-size:14px}.operator-page{padding-top:24px}.chat-shell-heading{padding:13px 18px}.chat-shell-heading h2{font-size:17px}.deep-chat-stage{height:clamp(330px,calc(100dvh - 430px),540px);min-height:330px}.operator-page+.footer{padding-block:18px}@media(max-width:760px){.operator-intro h1{font-size:26px}.operator-intro{padding-inline:18px}.deep-chat-stage{height:52dvh;min-height:300px}.chat-footer-line>span{display:none}}
