:root {
  --navy: #0b2031;
  --accent: #e7bf63;
  --cream: #f9f5eb;
  --ink: #142b3e;
  --muted: #586572;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  color: var(--ink);
  font:
    14px/1.6 Arial,
    Helvetica,
    sans-serif;
}
h1,
h2,
p {
  margin-top: 0;
}
h1,
h2 {
  font-family: Georgia, serif;
  font-weight: 400;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
input,
textarea {
  width: 100%;
  background: white;
  border: 1px solid #b7c0c6;
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--ink);
}
textarea {
  resize: vertical;
  min-height: 65px;
  max-height: 180px;
}
label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin: 8px 0 5px;
}
label span {
  font-weight: 400;
  color: var(--muted);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #99752f;
  outline-offset: 3px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 0.16em;
  font-weight: 700;
}
.primary {
  background: var(--navy);
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 600;
  min-height: 44px;
}
.secondary {
  background: white;
  border: 1px solid #b7c0c6;
  border-radius: 6px;
  padding: 9px 13px;
  min-height: 40px;
  color: var(--ink);
}
.error {
  color: #98212b;
  margin: 0;
  font-size: 12px;
  white-space: pre-wrap;
}
.error:not(:empty) {
  padding: 10px 16px;
  background: #fff1ed;
}
.widget-body {
  background: var(--cream);
  height: 100dvh;
  overflow: hidden;
}
.chat-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}
.chat-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: var(--navy);
  color: white;
  padding: 22px 20px 17px;
  flex-shrink: 0;
}
.chat-header .eyebrow {
  color: var(--accent);
  font-size: 8px;
}
.chat-header h1 {
  font-size: 25px;
  margin: 6px 0;
}
.chat-header p {
  font-size: 11px;
  color: #d4dce1;
  margin: 0;
}
.icon-button {
  color: var(--accent);
  background: transparent;
  border: 0;
  font: 28px Arial;
  align-self: flex-start;
  min-width: 35px;
  min-height: 35px;
}
.welcome {
  padding: 18px 20px 8px;
}
.welcome h2 {
  font-size: 23px;
  margin-bottom: 7px;
}
.welcome p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 13px;
}
.topics {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.topics button {
  background: white;
  border: 1px solid #cbbb9e;
  border-radius: 20px;
  font-size: 10px;
  padding: 9px 11px;
  min-height: 36px;
  color: var(--ink);
}
.messages {
  flex: 1;
  min-height: 55px;
  overflow-y: auto;
  overflow-wrap: anywhere;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.message {
  max-width: 90%;
  padding: 11px 14px;
  border-radius: 10px;
  background: white;
  border: 1px solid #ded8cc;
  flex-shrink: 0;
  align-self: flex-start;
}
.message.visitor {
  align-self: flex-end;
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.message.pending {
  opacity: 0.75;
}
.message-label {
  display: block;
  font-size: 9px;
  letter-spacing: 0.06em;
  opacity: 0.8;
  margin-bottom: 5px;
}
.message p {
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}
.message time {
  font-size: 9px;
  opacity: 0.75;
  display: block;
  margin-top: 5px;
}
.composer {
  padding: 8px 20px 14px;
  background: #fff;
  border-top: 1px solid #ded8cc;
  flex-shrink: 0;
}
.composer .primary {
  width: 100%;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.composer input {
  font-size: 12px;
  padding: 7px 10px;
}
.chat-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 8px;
  color: #5b635e;
  padding: 8px 13px;
  background: #f1ebdf;
  flex-shrink: 0;
}
.retry {
  display: block;
  margin-top: 8px;
  background: var(--accent);
  color: var(--navy);
  border: 0;
  padding: 8px 11px;
  border-radius: 4px;
  font-size: 11px;
}
.staff-body {
  background: #eef0ed;
  min-height: 100vh;
}
.platform-header {
  background: var(--navy);
  color: white;
  padding: 24px 38px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}
.wordmark {
  color: white;
  text-decoration: none;
  font:
    25px Georgia,
    serif;
}
.wordmark span {
  color: var(--accent);
}
.platform-header > span {
  font-size: 9px;
  letter-spacing: 0.16em;
}
.staff-body main {
  padding: 32px 38px;
}
.login-card {
  max-width: 440px;
  margin: 40px auto;
  background: var(--cream);
  padding: 40px;
  border: 1px solid #d8d3c8;
  border-radius: 12px;
}
.login-card h1 {
  font-size: 39px;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 18px 0;
}
.login-card h1 em {
  color: #846323;
}
.login-card p {
  color: var(--muted);
  font-size: 13px;
  margin: 20px 0;
}
.login-card .primary {
  margin-top: 20px;
  width: 100%;
}
.login-card small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 20px;
}
.workspace-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 0 0 25px;
}
.workspace-heading h1 {
  font-size: 35px;
  margin: 5px 0;
}
.staff-controls {
  display: flex;
  gap: 20px;
  align-items: center;
}
.availability-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
}
.availability-toggle input {
  width: 18px;
  height: 18px;
}
.inbox-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  min-height: 650px;
  background: white;
  border: 1px solid #cdd4d6;
  border-radius: 12px;
  overflow: hidden;
}
.inbox {
  background: var(--cream);
  border-right: 1px solid #d8d3c8;
}
.inbox-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}
.inbox-heading h2 {
  font-size: 24px;
  margin: 0;
}
.badge {
  background: var(--navy);
  color: var(--accent);
  border-radius: 50%;
  padding: 3px 10px;
  font-size: 11px;
}
.inbox-item {
  display: block;
  text-align: left;
  padding: 18px 20px;
  width: 100%;
  border: 0;
  border-top: 1px solid #ded8cc;
  color: var(--ink);
  background: transparent;
}
.inbox-item.selected {
  background: #e9dfc8;
  border-left: 3px solid #876325;
}
.inbox-item strong {
  display: block;
  font-size: 13px;
}
.inbox-item span {
  font-size: 11px;
  color: var(--muted);
}
.connection {
  display: block;
  padding: 20px;
  font-size: 10px;
  color: var(--muted);
}
.empty {
  font-size: 12px;
  padding: 20px;
  color: var(--muted);
}
.thread-area {
  min-width: 0;
  position: relative;
}
.thread-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 22px;
  border-bottom: 1px solid #ded8cc;
}
.thread-heading h2 {
  font-size: 23px;
  margin-bottom: 6px;
}
.thread-heading p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
  overflow-wrap: anywhere;
}
.thread-heading > div:last-child {
  display: flex;
  gap: 8px;
}
.thread-area .messages {
  height: 410px;
}
.thread-area .composer {
  padding: 20px;
}
.thread-area .composer .primary {
  width: auto;
}
.thread-hint {
  padding: 30px;
  color: var(--muted);
  font-size: 13px;
}
#thread-panel:not([hidden]) + .thread-hint {
  display: none;
}
.demo-body {
  background: var(--navy);
  color: white;
  min-height: 100vh;
}
.demo-body main {
  padding: 100px max(30px, 8vw);
  max-width: 1100px;
}
.demo-body .eyebrow {
  color: var(--accent);
}
.demo-body h1 {
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.1;
  margin: 30px 0;
  letter-spacing: -0.04em;
}
.demo-body h1 em {
  color: var(--accent);
}
.demo-body p {
  max-width: 580px;
  color: #d5dfe4;
}
.demo-body a {
  color: var(--accent);
}
@media (max-width: 760px) {
  .platform-header {
    padding: 20px;
  }
  .platform-header > span {
    display: none;
  }
  .staff-body main {
    padding: 20px;
  }
  .workspace-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .staff-controls {
    flex-wrap: wrap;
  }
  .inbox-layout {
    grid-template-columns: 1fr;
  }
  .inbox {
    border-right: 0;
    border-bottom: 1px solid #d8d3c8;
  }
  .inbox-item {
    padding: 14px 20px;
  }
  .thread-heading {
    flex-wrap: wrap;
  }
  .thread-area .messages {
    height: 350px;
  }
  .login-card {
    padding: 28px;
    margin: 25px auto;
  }
  .platform-header .wordmark {
    font-size: 22px;
  }
}
@media (max-height: 650px) {
  .welcome {
    padding-top: 12px;
  }
  .welcome p {
    display: none;
  }
  .chat-header {
    padding: 14px 20px;
  }
  .chat-header h1 {
    font-size: 22px;
  }
  .composer {
    padding: 5px 16px 10px;
  }
  .composer label {
    margin: 5px 0 3px;
  }
  .chat-footer {
    font-size: 7px;
  }
  .composer textarea {
    min-height: 50px;
  }
  .topics button {
    min-height: 30px;
    padding: 7px 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

.inbox-item .preview {
  font-size: 12px;
  line-height: 1.6;
  margin: 7px 0;
  color: #344e60;
  overflow-wrap: anywhere;
}
