@font-face {
  font-family: Manrope;
  src: url("/assets/manrope-regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url("/assets/manrope-bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
:root {
  font-family: Manrope, Arial, sans-serif;
  color: #232a26;
  background: #f5f4ef;
  font-synthesis: none;
  --muted: #62685e;
  --line: #e4e5de;
  --green: #263e32;
  --accent: #bd432a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 11px;
  background: var(--green);
  color: #fff;
  padding: 13px 20px;
  font-weight: 700;
  transition: background 0.15s;
}
button:hover {
  background: #375341;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #ba682f;
  outline-offset: 3px;
}
input,
textarea,
select {
  color: inherit;
  background: #fff;
  border: 1px solid #d6d9ce;
  border-radius: 10px;
  padding: 12px;
  max-width: 100%;
}
textarea {
  resize: vertical;
  width: 100%;
  line-height: 1.65;
}
input {
  width: 100%;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -1.2px;
  line-height: 1.25;
}
h2 {
  font-size: 16px;
  letter-spacing: -0.4px;
}
p {
  line-height: 1.65;
}
.topbar {
  max-width: 1120px;
  padding: 16px 28px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  text-decoration: none;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -1.2px;
}
.brand span {
  display: inline-block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2px;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid #c4c8bc;
  color: var(--muted);
}
.version {
  font-size: 11px;
  background: #e7eadf;
  border-radius: 24px;
  padding: 8px 12px;
  white-space: nowrap;
}
.eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--muted);
  margin-bottom: 10px;
}
#studio {
  max-width: 1120px;
  margin: 14px auto 40px;
  padding: 0 28px;
}
.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 20px;
}
.version-picker select {
  max-width: 280px;
  border: 0;
  background: transparent;
  font-size: 12px;
  color: var(--muted);
  padding-right: 24px;
}
.review-navigation {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 0;
}
#approved-chats {
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  text-underline-offset: 4px;
}
.chat-shell {
  display: grid;
  grid-template-columns: 215px minmax(0, 1fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 5px 25px #313c2605;
}
#people {
  background: #fafaf6;
  padding: 18px 10px;
  border-right: 1px solid var(--line);
}
.person {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  color: inherit;
  background: transparent;
  text-align: left;
  padding: 15px 10px;
  border-radius: 11px;
  margin-bottom: 4px;
  font-weight: 400;
}
.person:hover {
  background: #eff1e8;
}
.person[aria-pressed="true"] {
  background: #e8eddf;
}
.avatar {
  display: grid;
  place-items: center;
  background: #eaede2;
  color: #485b44;
  flex-shrink: 0;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}
.person:nth-child(2) .avatar {
  background: #efe5d9;
  color: #7e583a;
}
.person:nth-child(3) .avatar {
  background: #e5e9ed;
  color: #456079;
}
.person:nth-child(4) .avatar {
  background: #f0e4e3;
  color: #865452;
}
.person:nth-child(5) .avatar {
  background: #e8e2ee;
  color: #6c577c;
}
.person strong {
  display: block;
  font-size: 12px;
}
.person small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 3px;
}
.person .dot {
  margin-left: auto;
  width: 6px;
  height: 6px;
  background: #457344;
  border-radius: 50%;
  flex-shrink: 0;
}
.person .dot.failed {
  background: #bd432a;
}
.person .dot.pending {
  background: #aeb8a2;
}
.chat-heading {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.person-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}
.person-heading p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.small-status {
  font-size: 10px;
  color: #55714a;
  text-align: right;
}
#messages {
  height: clamp(230px, calc(100dvh - 555px), 420px);
  overflow: auto;
  padding: 22px 26px;
  scrollbar-width: thin;
  scrollbar-color: #d6ddcc transparent;
}
.message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 18px;
}
.message.customer {
  align-items: flex-end;
}
.message small {
  font-size: 9px;
  color: var(--muted);
  margin: 0 4px 6px;
}
.bubble {
  max-width: 89%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.75;
  background: #f1f3ec;
  padding: 12px 16px;
  border-radius: 0 12px 12px 12px;
}
.customer .bubble {
  background: #fff;
  border: 1px solid #e2e6d9;
  border-radius: 12px 0 12px 12px;
}
.product {
  font-size: 11px;
  font-weight: 700;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #d3dac9;
}
.empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  max-width: 340px;
  margin: auto;
}
.empty strong {
  color: #354331;
  font-size: 17px;
}
.empty-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #d9dfd1;
  border-radius: 15px;
  font-size: 24px;
  margin-bottom: 4px;
}
#chat-form {
  margin: 0 24px;
  display: flex;
  gap: 10px;
  padding: 6px 8px 6px 12px;
  border: 1px solid #dce1d4;
  border-radius: 12px;
  background: #fafbf7;
  align-items: end;
}
#message {
  background: transparent;
  border: 0;
  resize: none;
  padding: 6px 0;
  min-height: 36px;
  max-height: 130px;
  font-size: 12px;
}
#message:focus {
  outline: none;
}
.send {
  border-radius: 9px;
  padding: 6px;
  width: 36px;
  height: 36px;
  font-size: 20px;
  flex-shrink: 0;
}
.chat-foot {
  padding: 12px 24px 16px;
  font-size: 9px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}
#evidence {
  max-width: 100%;
}
summary {
  cursor: pointer;
}
#receipts {
  overflow-wrap: anywhere;
  font-size: 10px;
  padding-top: 8px;
  max-width: 570px;
}
#receipts p {
  margin: 6px 0;
}
.feedback-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px 2px 12px;
}
.feedback-bar strong {
  font-size: 14px;
}
.feedback-bar p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.feedback-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.feedback-actions button {
  font-size: 12px;
}
.voice {
  background: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.voice:hover {
  background: #a53823;
}
.voice svg {
  width: 16px;
  height: 18px;
}
.below {
  display: flex;
  justify-content: space-between;
}
.text-button {
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  padding: 8px 2px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-button:hover {
  background: transparent;
  color: #263e32;
}
.progress,
.completion {
  padding: 16px 20px;
  margin-bottom: 15px;
  border: 1px solid #dce1d1;
  border-radius: 13px;
  background: #edf1e5;
  font-size: 12px;
}
.progress {
  display: flex;
  align-items: center;
  gap: 14px;
}
.progress p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.activity {
  width: 14px;
  height: 14px;
  border: 2px solid #c6d3b9;
  border-top-color: #426134;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.completion > div {
  display: flex;
  align-items: center;
  gap: 9px;
}
.success-dot {
  color: #416d34;
}
#understanding {
  margin-top: 9px;
  padding-left: 24px;
}
#explanation {
  padding-top: 10px;
}
#explanation p {
  margin: 9px 0;
  max-width: 850px;
}
#explanation details {
  margin: 8px 0;
}
#explanation h3 {
  font-size: 12px;
  margin: 12px 0 5px;
}
#explanation ul {
  padding-left: 20px;
  line-height: 1.7;
}
.inline-error,
#error {
  border: 1px solid #dfb9ad;
  background: #fff2ec;
  color: #8b301e;
  border-radius: 11px;
  padding: 12px 16px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.inline-error {
  margin: 0 24px 14px;
}
#error {
  max-width: 1064px;
  margin: 10px auto;
}
#notice:empty {
  display: none;
}
#notice {
  max-width: 1064px;
  margin: 4px auto 10px;
  font-size: 11px;
  color: var(--muted);
  padding: 0 4px;
}
.login {
  max-width: 480px;
  padding: 70px 24px;
  margin: auto;
}
.login h1 {
  font-size: 46px;
  margin-bottom: 20px;
}
.login > p:not(.eyebrow) {
  font-size: 14px;
  color: var(--muted);
}
.login form {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.login label {
  font-size: 12px;
}
.login button {
  margin-top: 2px;
}
#feedback-dialog {
  width: min(560px, calc(100vw - 24px));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  color: inherit;
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 20px 70px #20281c33;
}

.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
}
.dialog-heading h2 {
  font-size: 24px;
}
.icon-button {
  background: #f0f2e9;
  color: inherit;
  padding: 2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 22px;
}
.hint {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
#feedback-context {
  margin: 10px 0 18px;
}
#feedback-dialog label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}
#feedback {
  font-size: 13px;
}
#recording-status {
  font-size: 12px;
  color: #a43923;
  margin: 10px 0;
}
#save-status {
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0 18px;
}
.dialog-actions {
  display: flex;
  justify-content: end;
  gap: 8px;
}
.dialog-actions button {
  font-size: 12px;
}
.saved-notes {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 24px;
  font-size: 12px;
}
.note {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.note small {
  color: var(--muted);
  font-size: 10px;
}
.note p {
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 6px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
@media (max-width: 720px) {
  .topbar {
    padding: 20px;
  }
  .brand span {
    display: none;
  }
  #studio {
    padding: 0 16px;
    margin-top: 4px;
  }
  .page-heading {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 16px;
    gap: 8px;
  }
  h1 {
    font-size: 23px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .version-picker select {
    max-width: 125px;
    font-size: 10px;
    padding: 2px 12px 2px 0;
  }
  #approved-chats {
    font-size: 11px;
  }
  .review-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .chat-shell {
    grid-template-columns: 1fr;
  }
  #people {
    display: flex;
    padding: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: auto;
    gap: 3px;
  }
  .person {
    flex-direction: column;
    text-align: center;
    min-width: 61px;
    flex: 1;
    padding: 9px 3px;
    gap: 5px;
    margin: 0;
    position: relative;
  }
  .person small {
    display: none;
  }
  .person strong {
    font-size: 9px;
  }
  .person .avatar {
    width: 29px;
    height: 29px;
    font-size: 10px;
  }
  .person .dot {
    position: absolute;
    top: 9px;
    right: 7px;
    width: 5px;
    height: 5px;
  }
  .chat-heading {
    padding: 16px;
  }
  .person-heading .avatar {
    display: none;
  }
  .person-heading p {
    font-size: 10px;
  }
  .small-status {
    font-size: 9px;
  }
  #messages {
    height: 340px;
    padding: 18px 14px;
  }
  .bubble {
    font-size: 12px;
    max-width: 94%;
    padding: 10px 13px;
  }
  #chat-form {
    margin: 0 12px;
  }
  #message {
    font-size: 12px;
  }
  .chat-foot {
    padding: 10px 14px 14px;
    font-size: 8px;
  }
  .feedback-bar {
    align-items: start;
    flex-direction: column;
    gap: 14px;
    padding-top: 20px;
  }
  .feedback-actions {
    width: 100%;
  }
  .feedback-actions button {
    padding: 12px 13px;
    font-size: 11px;
  }
  .voice {
    flex: 1;
  }
  .feedback-bar p {
    font-size: 11px;
  }
  .progress,
  .completion {
    padding: 13px 14px;
    font-size: 11px;
  }
  #notice,
  #error {
    margin: 8px 16px;
    max-width: none;
  }
  #feedback-dialog {
    padding: 20px;
  }
  .inline-error {
    margin: 0 12px 12px;
  }
  .login {
    padding-top: 50px;
  }
  .login h1 {
    font-size: 36px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Feedback is part of the workspace, never an overlay over the conversation. */
.conversation-workspace {
  min-width: 0;
}
#feedback-dialog {
  margin: 0;
  width: auto;
  max-width: none;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  min-width: 0;
}
.feedback-open #studio {
  max-width: 1440px;
}
.feedback-open .conversation-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: stretch;
}
.feedback-open .chat-shell {
  grid-template-columns: 155px minmax(0, 1fr);
}
.feedback-open .person {
  padding: 12px 5px;
  gap: 6px;
}
.feedback-open .person .avatar {
  width: 27px;
  height: 27px;
}
.feedback-open .person small {
  font-size: 8px;
}
.feedback-open #messages {
  height: clamp(220px, calc(100dvh - 350px), 440px);
}
.feedback-open #feedback-dialog {
  max-height: calc(100dvh - 250px);
  overflow: auto;
}
#feedback-dialog .eyebrow {
  font-size: 8px;
}
#feedback-dialog h2 {
  font-size: 20px;
}
#feedback-dialog .saved-notes {
  margin-top: 12px;
  padding-top: 12px;
}
#feedback-dialog .dialog-actions {
  flex-wrap: wrap;
}
@media (max-width: 900px) and (min-width: 721px) {
  .feedback-open .chat-shell {
    grid-template-columns: 115px minmax(0, 1fr);
  }
  .feedback-open .person .avatar,
  .feedback-open .person small {
    display: none;
  }
  .feedback-open .conversation-workspace {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 10px;
  }
}
@media (max-width: 720px) {
  .feedback-open .topbar {
    padding: 10px 16px;
  }
  .feedback-open .brand {
    font-size: 22px;
  }
  .feedback-open #studio {
    height: calc(100dvh - 70px);
    margin: 0;
    display: flex;
    flex-direction: column;
    padding: 0 10px;
  }
  .feedback-open .below,
  .feedback-open .feedback-bar > div:first-child {
    display: none;
  }
  .feedback-open .conversation-workspace {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(180px, 1fr) auto;
    gap: 8px;
  }
  .feedback-open .chat-shell {
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .feedback-open #people {
    padding: 4px;
  }
  .feedback-open .person {
    min-width: 50px;
    padding: 6px 2px;
  }
  .feedback-open .person .avatar,
  .feedback-open .person .dot {
    display: none;
  }
  .feedback-open .conversation {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .feedback-open .chat-heading {
    padding: 8px 12px;
  }
  .feedback-open #messages {
    height: auto;
    min-height: 90px;
    flex: 1;
    padding: 10px;
  }
  .feedback-open #chat-form,
  .feedback-open .chat-foot {
    display: none;
  }
  .feedback-open #feedback-dialog {
    padding: 12px;
    max-height: 34dvh;
    overflow: auto;
    border-radius: 12px;
  }
  .feedback-open #feedback-dialog h2 {
    font-size: 15px;
  }
  .feedback-open #feedback-dialog .eyebrow,
  .feedback-open #feedback-dialog label .hint {
    display: none;
  }
  .feedback-open #feedback-context {
    margin: 3px 0 8px;
  }
  .feedback-open #feedback {
    min-height: 60px;
    height: 72px;
    padding: 8px;
  }
  .feedback-open #recording-status,
  .feedback-open #save-status {
    margin: 5px 0;
    font-size: 10px;
  }
  .feedback-open .dialog-actions button {
    padding: 8px 10px;
    font-size: 11px;
  }
  .feedback-open .feedback-bar {
    padding: 8px 0;
    flex-shrink: 0;
  }
  .feedback-open .feedback-actions {
    gap: 7px;
  }
  .feedback-open .feedback-actions button {
    padding: 10px;
  }
  .feedback-open .completion,
  .feedback-open .progress {
    max-height: 54px;
    overflow: auto;
    padding: 8px;
    margin: 4px 0;
    flex-shrink: 0;
  }
  .feedback-open #notice,
  .feedback-open #error {
    max-height: 36px;
    overflow: auto;
    margin: 3px 10px;
  }
}

@media (max-width: 720px) {
  .feedback-open .page-heading {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    margin: 0;
  }
  .feedback-open .page-heading .version-picker {
    display: none;
  }
}

.contact-date {
  text-align: center;
  font-size: 11px;
  color: var(--muted, #626d65);
  padding: 14px 0 8px;
}

.feedback-scope-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  margin: 6px 0;
}
.feedback-scope-row select {
  font: inherit;
  max-width: 180px;
  border: 1px solid #cfd7d0;
  border-radius: 6px;
  padding: 4px;
  background: white;
  color: #243a2e;
}
.feedback-scope-row .hint {
  margin: 0;
}
