@font-face {
  font-family: Daxline;
  src: url("/assets/daxline-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Daxline;
  src: url("/assets/daxline-bold.woff2") format("woff2");
  font-weight: 600 700;
  font-display: swap;
}
@font-face {
  font-family: Daxline;
  src: url("/assets/daxline-extrabold.woff2") format("woff2");
  font-weight: 800 900;
  font-display: swap;
}
:root {
  --paper: #f5f5f2;
  --surface: #fff;
  --ink: #292c2f;
  --muted: #7b7e7d;
  --line: #dedfda;
  --soft: #eeefeb;
  --accent: #bd6949;
  --danger: #a33a31;
  --sans: Daxline, Arial, sans-serif;
  --sidebar: 286px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[hidden] {
  display: none !important;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
select,
summary {
  cursor: pointer;
}
button {
  color: inherit;
}
a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
::selection {
  background: #dfc6b7;
  color: var(--ink);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.1;
}
button {
  border: 0;
  background: none;
}
.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;
}
.skip-link {
  position: fixed;
  top: -70px;
  left: 20px;
  z-index: 100;
  background: var(--ink);
  color: white;
  padding: 12px 20px;
}
.skip-link:focus {
  top: 12px;
}
.icon {
  width: 19px;
  height: 19px;
  display: block;
  flex-shrink: 0;
}
[data-icon] {
  display: inline-flex;
  flex-shrink: 0;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 9px 14px;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.35;
  border: 1px solid transparent;
  border-radius: 3px;
  text-decoration: none;
  transition:
    background 0.18s,
    color 0.18s,
    border-color 0.18s;
  white-space: nowrap;
}
.button--primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.button--primary:hover:not(:disabled) {
  background: #464a4c;
  border-color: #464a4c;
}
.button--outline {
  border-color: var(--line);
  background: transparent;
}
.button--outline:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--surface);
}
.button--quiet {
  background: transparent;
}
.button--quiet:hover:not(:disabled) {
  background: var(--soft);
}
.icon-button {
  width: 34px;
  min-height: 34px;
  padding: 7px;
}
.eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.65px;
  line-height: 1.5;
  text-transform: uppercase;
}
.muted {
  color: var(--muted);
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand img {
  display: block;
  width: 188px;
  height: auto;
}
.brand--light img {
  filter: brightness(0) invert(1);
}
.language-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}
.language-control select {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 4px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 0;
}
.language-control .icon {
  width: 16px;
  height: 16px;
}
.form-error {
  color: var(--danger);
  font-size: 13px;
}
.form-error:empty {
  display: none;
}
.action-dialog {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 80px rgb(0 0 0 / 18%);
}
.knowledge-controls {
  display: flex;
  margin-top: 10px;
}
.vector-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.vector-toggle:disabled {
  opacity: 0.5;
  cursor: wait;
}
.switch-track {
  width: 27px;
  height: 16px;
  border-radius: 9px;
  background: #c5c8c7;
  padding: 3px;
}
.switch-track::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  transition: transform 0.15s;
}
.vector-toggle[aria-checked="true"] .switch-track {
  background: var(--ink);
}
.vector-toggle[aria-checked="true"] .switch-track::after {
  transform: translateX(11px);
}
.vector-state {
  min-width: 22px;
  font-size: 10px;
  text-transform: uppercase;
}
.vector-disabled {
  display: inline-flex;
  color: var(--muted);
  flex-shrink: 0;
}
.vector-disabled .icon {
  width: 17px;
  height: 17px;
}
.action-dialog::backdrop {
  background: rgb(25 30 31 / 42%);
  backdrop-filter: blur(3px);
}
.action-dialog-form {
  display: grid;
  gap: 24px;
  padding: clamp(20px, 5vw, 32px);
}
.action-dialog-heading {
  margin: 0;
  font-size: 21px;
  line-height: 1.4;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.action-dialog-input {
  width: 100%;
  min-width: 0;
}
.action-dialog-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.button--danger {
  background: var(--danger);
  border-color: var(--danger);
}
.button--danger:hover:not(:disabled) {
  background: var(--danger);
  border-color: var(--danger);
  filter: brightness(0.9);
}
.toast {
  position: fixed;
  z-index: 100;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 12px);
  max-width: calc(100% - 32px);
  padding: 13px 20px;
  background: var(--ink);
  color: white;
  border-radius: 3px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  box-shadow: 0 6px 24px #0002;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.mobile-only {
  display: none;
}

/* Sign-in: photography and the same typographic rhythm as the brand site. */
.login-view {
  display: grid;
  grid-template-columns: 54% 46%;
  min-height: 100dvh;
  background: var(--surface);
}
.login-visual {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  overflow: hidden;
  color: white;
  background: #777c7b;
}
.login-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 50%;
  z-index: -2;
}
.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #0003, transparent 30%, #0008);
  z-index: -1;
}
.login-visual > .brand {
  position: absolute;
  top: 48px;
  left: 48px;
}
.login-visual > .brand img {
  width: 210px;
}
.login-visual-label {
  position: absolute;
  top: 52px;
  right: 38px;
  font-size: 9px;
  letter-spacing: 1.5px;
}
.login-editorial {
  position: absolute;
  bottom: 55px;
  left: 48px;
  right: 35px;
}
.login-editorial .eyebrow {
  opacity: 0.8;
  margin-bottom: 16px;
}
.login-editorial > p {
  font-size: clamp(36px, 4.3vw, 68px);
  line-height: 1.03;
  font-weight: 700;
  letter-spacing: -1.8px;
  white-space: pre-line;
}
.image-caption {
  display: block;
  font-size: 9px;
  letter-spacing: 1.6px;
  margin-top: 28px;
  opacity: 0.65;
}
.login-panel {
  padding: 42px 48px 26px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.login-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.login-content {
  width: 100%;
  max-width: 390px;
  margin: auto;
  padding: 70px 0;
}
.login-content h1 {
  margin: 20px 0 24px;
  font-size: clamp(40px, 4.2vw, 60px);
  font-weight: 700;
  letter-spacing: -1.8px;
  white-space: pre-line;
}
.login-intro {
  color: #6e7371;
  font-size: 17px;
  max-width: 340px;
  line-height: 1.6;
}
.microsoft-login {
  margin-top: 36px;
  width: 100%;
  min-height: 52px;
  font-size: 14px;
  justify-content: flex-start;
  padding: 15px 18px;
}
.microsoft-login > [data-icon] {
  margin-left: auto;
}
.microsoft-login > svg {
  flex-shrink: 0;
}
.login-members {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
  font-size: 11px;
  color: var(--muted);
}
.login-members .icon {
  width: 14px;
  height: 14px;
}
.login-content .form-error {
  margin-top: 20px;
}
.login-privacy {
  border-top: 1px solid var(--line);
  margin-top: 44px;
  padding-top: 20px;
}
.login-privacy .eyebrow {
  color: #999b96;
  font-size: 9px;
}
.login-privacy p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 9px;
}
.login-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
}
.login-footer a {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.login-footer .icon {
  width: 12px;
  height: 12px;
}

/* Workspace navigation. */
.workspace {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  height: 100dvh;
  overflow: hidden;
}
.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 30px 20px 15px;
  background: #eeefeb;
  border-right: 1px solid var(--line);
}
.sidebar-brand {
  position: relative;
  padding: 2px 8px 27px;
}
.sidebar-brand .brand img {
  width: 190px;
}
.sidebar-brand .eyebrow {
  color: #9a9d96;
  font-size: 8px;
  letter-spacing: 2.4px;
  margin-top: 12px;
}
.new-chat {
  width: 100%;
  min-height: 44px;
  justify-content: flex-start;
  margin-bottom: 26px;
}
.new-chat .keyboard-hint {
  margin-left: auto;
  opacity: 0.45;
  font-size: 17px;
}
.sidebar-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 8px;
  color: var(--muted);
}
.sidebar-section-label .eyebrow {
  font-size: 9px;
  letter-spacing: 1.4px;
}
.convos {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 20px;
  scrollbar-width: thin;
  scrollbar-color: #c7c9c2 transparent;
}
.folder {
  padding: 8px 0;
  border-radius: 4px;
}
.folder-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  color: var(--muted);
}
.folder-head > .icon {
  width: 14px;
  height: 14px;
}
.folder-name {
  min-width: 0;
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.folder-count {
  font-size: 10px;
  color: #a4a79e;
}
.folder-head .row-menu {
  margin-right: -6px;
}
.chat-row {
  position: relative;
  display: flex;
  align-items: center;
  border-left: 2px solid transparent;
  margin: 3px 0;
  border-radius: 0 3px 3px 0;
}
.chat-row:hover {
  background: #e6e8e1;
}
.chat-row.selected {
  background: white;
  border-left-color: var(--ink);
}
.chat-open {
  flex: 1;
  min-width: 0;
  justify-content: flex-start;
  text-align: left;
  font-size: 12px;
  padding: 10px 7px;
  border-radius: 0;
}
.chat-open > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-open .icon {
  width: 15px;
  height: 15px;
  color: #969b92;
}
.row-menu {
  position: relative;
  flex-shrink: 0;
}
.row-menu summary {
  list-style: none;
  padding: 7px;
  border-radius: 3px;
}
.row-menu summary::-webkit-details-marker {
  display: none;
}
.row-menu summary .icon {
  width: 16px;
  height: 16px;
}
.chat-row .row-menu > summary {
  opacity: 0;
}
.chat-row:hover .row-menu > summary,
.chat-row:focus-within .row-menu > summary,
.row-menu[open] > summary {
  opacity: 1;
}
.row-menu[open] {
  z-index: 20;
}
.row-menu-content {
  position: absolute;
  right: 0;
  top: 30px;
  z-index: 20;
  width: 195px;
  display: grid;
  gap: 2px;
  padding: 7px;
  border: 1px solid var(--line);
  background: white;
  box-shadow: 0 8px 25px #20241914;
  border-radius: 4px;
}
.row-menu-content .button {
  justify-content: flex-start;
  min-height: 34px;
  font-weight: 400;
  font-size: 12px;
  padding: 7px 9px;
}
.danger {
  color: var(--danger);
}
.move-label {
  display: grid;
  gap: 5px;
  font-size: 10px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 5px;
  padding: 9px;
}
.move-label select {
  width: 100%;
  padding: 7px 5px;
  font-size: 12px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}
.folder-drop-end {
  padding: 4px;
  text-align: center;
  color: #b3b7ac;
  font-size: 14px;
}
.is-dragging {
  opacity: 0.35;
}
.drop-hover {
  outline: 1px dashed #8e9685;
  outline-offset: -1px;
  background: #e2e6db;
}
.sidebar-account {
  border-top: 1px solid #d8dcd1;
  padding-top: 18px;
}
.account-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 15px;
}
.avatar {
  width: 34px;
  height: 34px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  background: #dedfd8;
  border-radius: 50%;
  color: #656c5d;
  font-size: 11px;
  font-weight: 700;
}
.account-person > div {
  flex: 1;
  min-width: 0;
}
.account-person strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.account-person .muted {
  display: block;
  font-size: 10px;
  margin-top: 2px;
}
.account-person .icon-button {
  color: #7d8277;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  font-size: 11px;
  color: #72796a;
  text-decoration: none;
  border-radius: 3px;
}
.sidebar-link:hover {
  background: #e1e4d9;
}
.sidebar-link > .icon {
  width: 15px;
  height: 15px;
}
.sidebar-link > [data-icon]:last-child {
  margin-left: auto;
}
.sidebar-link > [data-icon]:last-child .icon {
  width: 12px;
  height: 12px;
}
.sidebar-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #a1a69a;
  font-size: 8px;
  letter-spacing: 0.9px;
  padding: 16px 8px 0;
}
#cat {
  padding: 0 4px;
  color: #b9bdb2;
  font-size: 12px;
}
#cat:hover,
#cat:focus-visible {
  color: var(--accent);
}

/* Chat. */
.chat-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: #fafaf8;
}
.chat-header {
  min-height: 95px;
  padding: 23px 36px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #e5e6e1;
}
.chat-heading {
  flex: 1;
  min-width: 0;
}
.chat-heading .eyebrow {
  font-size: 8px;
  letter-spacing: 1.4px;
  margin-bottom: 7px;
}
.chat-heading h1 {
  font-size: 17px;
  line-height: 1.25;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.chat-header .button {
  font-size: 11px;
}
.chat-header .button .icon {
  width: 15px;
  height: 15px;
}
.typing-state {
  font-size: 11px;
  color: var(--muted);
}
.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 35px max(32px, calc((100% - 840px) / 2));
  scrollbar-width: thin;
  scrollbar-color: #d5d8ce transparent;
}
.chat-empty {
  max-width: 800px;
  padding: clamp(35px, 6vh, 90px) 0 25px;
  margin: auto;
}
.chat-empty > .eyebrow {
  color: var(--accent);
  font-size: 9px;
}
.chat-empty h2 {
  font-size: clamp(44px, 4.6vw, 70px);
  font-weight: 700;
  letter-spacing: -2.1px;
  line-height: 1.05;
  white-space: pre-line;
  margin: 20px 0;
}
.chat-empty-intro {
  font-size: 16px;
  color: #858a80;
  max-width: 440px;
  line-height: 1.65;
}
.prompt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-top: 42px;
}
.prompt-card {
  position: relative;
  text-align: left;
  border: 1px solid var(--line);
  background: white;
  padding: 20px 18px 36px;
  min-height: 154px;
  border-radius: 3px;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.prompt-card:hover {
  border-color: #8c9483;
  transform: translateY(-3px);
}
.prompt-card > .icon:first-child {
  width: 20px;
  height: 20px;
  color: #929b85;
  margin-bottom: 18px;
}
.prompt-card .eyebrow {
  font-size: 8px;
  letter-spacing: 1.05px;
  color: #909587;
  margin-bottom: 9px;
}
.prompt-card strong {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 400;
  display: block;
}
.prompt-card > .icon:last-child {
  position: absolute;
  right: 14px;
  bottom: 13px;
  width: 14px;
  height: 14px;
}
.empty-note {
  font-size: 10px;
  color: #a0a697;
  margin-top: 23px;
}
.message {
  max-width: 100%;
  margin: 0 auto 35px;
}
.message-header {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 11px;
  margin-bottom: 10px;
}
.message-header strong {
  font-weight: 600;
}
.message-header time {
  margin-left: auto;
  font-size: 9px;
  color: #9da296;
}
.message-avatar {
  display: flex;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d6dacd;
  border-radius: 50%;
  color: #8a947d;
  font-size: 9px;
}
.message--assistant .message-avatar {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.8;
  font-size: 15px;
}
.message--user .message-body {
  background: #eeefea;
  padding: 17px 20px;
  border-radius: 4px;
}
.message-body a {
  color: #677a58;
}
.message-actions {
  display: flex;
  gap: 3px;
  margin-top: 8px;
}
.message-actions .button {
  padding: 4px 7px;
  min-height: 27px;
  font-size: 10px;
  font-weight: 400;
  color: #8f9786;
}
.message-actions .icon {
  width: 13px;
  height: 13px;
}
.attachment-link {
  display: flex;
  gap: 8px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  text-decoration: none;
  font-size: 12px;
  margin-top: 12px;
}
.attachment-link:has(img) {
  display: block;
  padding: 6px;
}
.attachment-link img {
  max-width: 280px;
  max-height: 230px;
  width: 100%;
  object-fit: contain;
  display: block;
  border-radius: 2px;
}
.attachment-link:has(img) span {
  display: block;
  padding: 5px;
  font-size: 10px;
}
.generated-image {
  display: block;
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
  margin: 14px 0;
  border-radius: 3px;
}
.download-link {
  display: flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  font-size: 12px;
  margin-top: 10px;
}
.download-link .icon {
  width: 15px;
  height: 15px;
}
.message-sources {
  white-space: normal;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--muted);
  font-size: 11px;
}
.message-sources p {
  padding: 10px 0;
  white-space: pre-wrap;
  line-height: 1.6;
}
.pending-response {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  padding: 22px 24px;
  margin: 16px 0 28px;
  border: 1px solid #bd69494d;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: #bd69490d;
}
.thinking-dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}
.thinking-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  animation: breathe 1.2s infinite alternate;
}
.thinking-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.thinking-dot:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes breathe {
  to {
    opacity: 0.3;
    transform: scale(0.7);
  }
}
.composer-area {
  width: 100%;
  max-width: 912px;
  margin: 0 auto;
  padding: 10px 36px 22px;
  flex-shrink: 0;
}
.composer {
  padding: 17px 16px 12px;
  background: white;
  border: 1px solid #d6dacd;
  border-radius: 6px;
  box-shadow: 0 4px 20px #343a4005;
}
.composer:focus-within {
  border-color: #99a38e;
}
#input {
  width: 100%;
  min-height: 66px;
  max-height: 200px;
  resize: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  padding: 0 4px;
  outline: none;
}
#input::placeholder {
  color: #a0a697;
}
.composer-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}
.composer-controls .button {
  min-height: 34px;
  font-size: 11px;
}
.composer-controls #send {
  margin-left: auto;
  padding: 9px 15px;
}
.composer-controls select {
  font-size: 11px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  padding: 5px 8px;
  color: #7f8975;
  max-width: 180px;
}
.upload-button {
  position: relative;
  overflow: hidden;
  color: #7f8975;
  font-weight: 400;
}
.upload-button input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}
.upload-button:focus-within {
  outline: 2px solid var(--accent);
}
.upload-button .icon {
  width: 16px;
  height: 16px;
}
.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.attachment-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  max-width: 100%;
  background: var(--soft);
  padding: 4px 5px 4px 8px;
  font-size: 11px;
  border-radius: 3px;
}
.attachment-chip > span {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-chip .icon {
  width: 14px;
  height: 14px;
}
.attachment-chip .button {
  min-height: 24px;
  width: 24px;
  padding: 4px;
}
.composer-footnote {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px 0;
  font-size: 9px;
  color: #a0a697;
}
.edit-notice {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  margin-bottom: 6px;
  background: #eee6dc;
  border-radius: 3px;
  font-size: 11px;
}
.edit-notice .button {
  margin-left: auto;
  min-height: 25px;
  padding: 3px 5px;
  font-size: 10px;
}
.edit-notice .icon {
  width: 14px;
  height: 14px;
}

/* Administration: the same surfaces and typography, with a more open grid. */
.site-header {
  min-height: 86px;
  padding: 0 4.5vw;
  display: flex;
  align-items: center;
  gap: 45px;
  background: white;
  border-bottom: 1px solid var(--line);
}
.site-header .brand img {
  width: 188px;
}
.site-header nav {
  display: flex;
  align-self: stretch;
  gap: 28px;
}
.site-header nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 12px;
  color: #929789;
  border-bottom: 2px solid transparent;
}
.site-header nav a[aria-current] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.site-header nav .icon {
  width: 15px;
  height: 15px;
}
.header-tools {
  display: flex;
  align-items: center;
  gap: 23px;
  margin-left: auto;
}
.header-user {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
}
.admin-page {
  max-width: 1360px;
  padding: 52px 4.5vw 0;
  margin: auto;
}
.page-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 35px;
}
.page-intro > div > .eyebrow {
  color: var(--accent);
  font-size: 9px;
  margin-bottom: 14px;
}
.page-intro h1 {
  font-size: clamp(40px, 4.7vw, 64px);
  font-weight: 700;
  letter-spacing: -2px;
}
.page-intro p {
  color: #919789;
  font-size: 15px;
  margin-top: 17px;
}
.workspace-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  white-space: nowrap;
}
.workspace-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  background: #899976;
  border-radius: 50%;
}
.admin-tabs {
  display: flex;
  gap: 30px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}
.admin-tabs a {
  text-decoration: none;
  color: #8c9481;
  font-size: 12px;
  padding: 13px 0;
}
.admin-tabs a:first-child {
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  margin-bottom: -1px;
}
.admin-section {
  margin-bottom: 36px;
  scroll-margin-top: 24px;
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 19px;
}
.section-heading h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.4px;
}
.section-heading > .section-index {
  font-size: 10px;
  color: #adb39f;
  margin-right: 1px;
}
.section-heading > .muted {
  margin-left: auto;
  font-size: 11px;
}
.section-heading .button {
  margin-left: auto;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: white;
  border-radius: 4px;
  margin-bottom: 22px;
}
.stat-card {
  padding: 24px;
  border-right: 1px solid var(--line);
}
.stat-card:last-child {
  border: 0;
}
.stat-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: #929a86;
  font-size: 10px;
}
.stat-card-top .icon {
  width: 17px;
  height: 17px;
}
.stat-card strong {
  display: block;
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1.3;
  margin-top: 14px;
}
.stat-card > span {
  display: block;
  color: #a7ae9b;
  font-size: 9px;
  margin-top: 4px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.panel-heading {
  padding: 24px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.panel-heading h3 {
  font-size: 16px;
  font-weight: 600;
}
.panel-heading p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
.filter-form {
  display: flex;
  gap: 9px;
  align-items: end;
  flex-wrap: wrap;
}
.field {
  display: grid;
  gap: 7px;
  color: #8c9481;
  font-size: 10px;
}
input,
select {
  min-width: 0;
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 3px;
  background: white;
  color: var(--ink);
  font-size: 12px;
}
input:focus,
select:focus {
  border-color: #98a28a;
  outline-offset: 1px;
}
input::placeholder {
  color: #a8af9a;
}
.filter-form input {
  font-size: 11px;
  padding: 8px;
}
.filter-form .button {
  min-height: 34px;
  font-size: 11px;
  padding: 8px 12px;
}
.chart-wrap {
  padding: 0 26px 23px;
}
.chart-caption {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #a1aa92;
  padding-top: 6px;
}
.usage-chart {
  display: block;
  width: 100%;
  height: 130px;
  border-bottom: 1px solid var(--line);
}
.chart-bar {
  fill: #bcc4b1;
  transition: fill 0.2s;
}
.chart-bar:hover {
  fill: var(--ink);
}
.chart-baseline {
  stroke: #eef0e8;
  stroke-width: 1;
}
.empty-chart {
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}
.table-wrap {
  width: 100%;
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 12px;
}
th {
  background: #fafbf7;
  font-size: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #9ba68d;
  font-weight: 600;
}
th,
td {
  padding: 16px 24px;
  border-top: 1px solid #e8eae2;
}
td {
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fafbf8;
}
.model-badge {
  display: inline-flex;
  padding: 3px 7px;
  background: #f1f3ec;
  border-radius: 3px;
  color: #78846a;
  font-size: 10px;
}
.role-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  padding: 3px 7px;
  border: 1px solid #e0e5d6;
  border-radius: 3px;
}
.role-badge.admin {
  background: #e9ece3;
  border-color: #e9ece3;
}
.status-badge {
  border: 0;
  color: #8e9a7f;
  padding: 0;
}
.status-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.status-badge.disabled {
  color: #bd796b;
}
.user-cell {
  display: flex;
  gap: 10px;
  align-items: center;
}
.user-cell .avatar {
  width: 30px;
  height: 30px;
  font-size: 9px;
}
.user-cell strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.user-cell small {
  display: block;
  font-size: 10px;
  color: #98a189;
  margin-top: 3px;
}
.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}
.table-actions .button {
  font-size: 10px;
  min-height: 30px;
  padding: 6px 8px;
}
.table-actions .icon {
  width: 14px;
  height: 14px;
}
.table-actions .row-menu-content {
  top: 25px;
}
.user-form {
  display: grid;
  grid-template-columns: 1fr 1.2fr 120px auto;
  gap: 12px;
  align-items: end;
  padding: 0 26px 25px;
  border-bottom: 1px solid var(--line);
}
.user-form .button {
  min-height: 40px;
  font-size: 11px;
}
.team-toolbar {
  padding: 17px 25px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-field .icon {
  width: 16px;
  height: 16px;
  color: #9ba68a;
}
.search-field input {
  border: 0;
  padding: 4px 0;
  font-size: 11px;
  min-width: 200px;
}
.team-count {
  font-size: 10px;
  color: #a2ad90;
}
.history-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 42px;
  min-height: 150px;
}
.history-empty > .icon {
  width: 30px;
  height: 30px;
  color: #a2ad93;
}
.history-empty strong {
  display: block;
  font-size: 15px;
  font-weight: 400;
  margin-bottom: 5px;
}
.history-empty p {
  color: #a2ad93;
  font-size: 11px;
}
.history-heading {
  padding: 24px 26px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.history-heading h3 {
  font-size: 15px;
  font-weight: 600;
}
.history-heading p {
  color: #929d82;
  font-size: 11px;
  margin-top: 5px;
}
.history-chats {
  padding: 0 25px 20px;
}
.history-chat {
  border-top: 1px solid var(--line);
  padding: 13px 0;
}
.history-chat summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.history-chat summary span {
  color: #9eaa8b;
  font-size: 10px;
}
.history-message {
  margin-top: 15px;
  padding: 14px 16px;
  border-left: 2px solid #d5ddca;
  background: #f7f9f3;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.knowledge-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 30px;
  padding: 30px;
  background: #e9ece3;
  border: 1px solid #dbe1d1;
  border-radius: 4px;
}
.knowledge-copy {
  display: flex;
  gap: 21px;
  align-items: center;
}
.knowledge-symbol {
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #f7f9f2;
  border: 1px solid #d6decb;
  border-radius: 50%;
  color: #849671;
}
.knowledge-symbol .icon {
  width: 23px;
  height: 23px;
}
.knowledge-copy h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.4px;
}
.knowledge-copy p {
  font-size: 12px;
  color: #8a9a79;
  margin-top: 9px;
  max-width: 470px;
}
.knowledge-action {
  text-align: right;
}
.knowledge-action .button {
  font-size: 11px;
}
.knowledge-action p {
  margin-top: 8px;
  font-size: 10px;
  color: #7c8c6b;
}
.ingest-note {
  color: #a1aa93;
  margin-top: 12px;
  font-size: 10px;
}
.ingest-note summary {
  width: fit-content;
}
.ingest-note p {
  margin-top: 8px;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 25px 0 30px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  color: #a3ad95;
}
.page-footer a {
  text-decoration: none;
}
.admin-error {
  margin: 24px 0;
  padding: 22px;
  background: #f5e8e3;
  color: #965a4a;
  border: 1px solid #ead2c8;
  font-size: 13px;
}
.admin-error:empty {
  display: none;
}

@media (min-width: 1600px) {
  .login-panel {
    padding: 50px 65px 35px;
  }
  .login-content {
    max-width: 430px;
  }
}
@media (max-width: 1100px) {
  :root {
    --sidebar: 252px;
  }
  .sidebar {
    padding-left: 14px;
    padding-right: 14px;
  }
  .sidebar-brand .brand img {
    width: 177px;
  }
  .chat-header {
    padding: 22px 26px;
  }
  .messages {
    padding: 30px 26px;
  }
  .composer-area {
    padding-left: 26px;
    padding-right: 26px;
  }
  .login-visual-label {
    display: none;
  }
  .login-panel {
    padding-left: 34px;
    padding-right: 34px;
  }
  .login-visual > .brand {
    left: 35px;
  }
  .login-editorial {
    left: 35px;
  }
  .stat-card {
    padding: 20px;
  }
  .panel-heading {
    flex-wrap: wrap;
  }
  th,
  td {
    padding: 14px 18px;
  }
  .user-form {
    grid-template-columns: 1fr 1fr;
  }
  .site-header {
    gap: 30px;
  }
}
@media (max-width: 800px) {
  .login-view {
    grid-template-columns: 42% 58%;
  }
  .login-visual > .brand img {
    width: 170px;
  }
  .login-visual > .brand {
    left: 25px;
    top: 35px;
  }
  .login-editorial {
    left: 25px;
    bottom: 35px;
  }
  .login-editorial > p {
    font-size: 39px;
  }
  .image-caption {
    font-size: 7px;
  }
  .login-panel {
    padding: 30px 30px 20px;
  }
  .login-content h1 {
    font-size: 44px;
  }
  .login-intro {
    font-size: 15px;
  }
  .site-header {
    min-height: 75px;
    padding: 0 25px;
    gap: 25px;
  }
  .site-header .brand img {
    width: 160px;
  }
  .site-header nav {
    gap: 18px;
  }
  .header-user > span:last-child {
    display: none;
  }
  .header-tools {
    gap: 12px;
  }
  .admin-page {
    padding: 35px 25px 0;
  }
  .stat-card {
    padding: 17px;
  }
  .stat-card strong {
    font-size: 31px;
  }
  .stat-card-top .icon {
    display: none;
  }
  .stat-card-top {
    font-size: 9px;
  }
  .knowledge-panel {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .knowledge-action {
    text-align: left;
    padding-left: 76px;
  }
}
@media (max-width: 680px) {
  .mobile-only {
    display: inline-flex;
  }
  .login-view {
    display: flex;
    flex-direction: column;
  }
  .login-visual {
    min-height: 250px;
    height: 33dvh;
    max-height: 330px;
  }
  .login-photo {
    object-position: 50% 45%;
  }
  .login-visual > .brand {
    top: 25px;
    left: 25px;
  }
  .login-visual > .brand img {
    width: 170px;
  }
  .login-editorial {
    bottom: 25px;
    left: 25px;
  }
  .login-editorial > p {
    font-size: 33px;
    letter-spacing: -0.8px;
  }
  .login-editorial .eyebrow,
  .image-caption {
    display: none;
  }
  .login-panel {
    padding: 24px;
    flex: 1;
  }
  .login-top > .eyebrow {
    font-size: 9px;
  }
  .login-content {
    padding: 40px 0;
    max-width: 420px;
  }
  .login-content h1 {
    font-size: 43px;
    margin-top: 15px;
  }
  .login-intro {
    font-size: 15px;
  }
  .login-privacy {
    margin-top: 28px;
  }
  .login-footer {
    font-size: 9px;
  }
  .workspace {
    display: block;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 286px;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.2s;
  }
  .sidebar.is-open {
    transform: translateX(0);
  }
  .sidebar-brand {
    padding-right: 27px;
  }
  .sidebar-brand .brand img {
    width: 180px;
  }
  #closeSidebar {
    position: absolute;
    right: -9px;
    top: -7px;
  }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: #171d1480;
    z-index: 49;
    width: 100%;
    height: 100%;
  }
  .chat-header {
    min-height: 76px;
    padding: 17px 15px;
    gap: 10px;
  }
  .chat-heading .eyebrow {
    font-size: 7px;
    letter-spacing: 1px;
    margin-bottom: 5px;
  }
  .chat-heading h1 {
    font-size: 14px;
  }
  #copyAll {
    padding: 7px;
    min-height: 32px;
    font-size: 10px;
  }
  #copyAll > span:last-child {
    display: none;
  }
  .typing-state {
    display: none;
  }
  .messages {
    padding: 24px 20px;
  }
  .chat-empty {
    padding-top: 25px;
  }
  .chat-empty h2 {
    font-size: 48px;
    letter-spacing: -1.5px;
  }
  .chat-empty-intro {
    font-size: 14px;
  }
  .prompt-grid {
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 28px;
  }
  .prompt-card {
    min-height: 0;
    padding: 14px 40px 14px 48px;
  }
  .prompt-card > .icon:first-child {
    position: absolute;
    top: 21px;
    left: 15px;
    margin: 0;
    width: 18px;
    height: 18px;
  }
  .prompt-card > .icon:last-child {
    top: 24px;
    bottom: auto;
  }
  .prompt-card .eyebrow {
    margin-bottom: 5px;
    font-size: 7px;
  }
  .prompt-card strong {
    font-size: 12px;
  }
  .empty-note {
    font-size: 9px;
    margin-top: 18px;
  }
  .composer-area {
    padding: 8px 14px 14px;
  }
  .composer {
    padding: 14px 10px 10px;
  }
  #input {
    font-size: 14px;
    min-height: 53px;
  }
  .composer-controls {
    gap: 4px;
  }
  .composer-controls .button {
    font-size: 10px;
    padding: 7px;
  }
  .composer-controls select {
    max-width: 130px;
    font-size: 10px;
    padding: 4px;
  }
  .upload-button > span:not([data-icon]) {
    display: none;
  }
  .composer-footnote {
    font-size: 8px;
    gap: 5px;
  }
  .composer-footnote span:last-child {
    display: none;
  }
  .edit-notice {
    font-size: 10px;
  }
  .message-body {
    font-size: 14px;
  }
  .chat-row .row-menu > summary {
    opacity: 1;
  }
  .site-header {
    padding: 0 18px;
    min-height: 69px;
    gap: 20px;
    flex-wrap: wrap;
  }
  .site-header .brand img {
    width: 145px;
  }
  .site-header nav {
    order: 3;
    width: 100%;
    gap: 25px;
    min-height: 37px;
  }
  .site-header nav a {
    font-size: 11px;
  }
  .header-user {
    display: none;
  }
  .header-tools {
    gap: 8px;
  }
  .admin-page {
    padding: 29px 18px 0;
  }
  .page-intro {
    align-items: flex-start;
    margin-bottom: 26px;
  }
  .page-intro h1 {
    font-size: 43px;
  }
  .page-intro p {
    font-size: 12px;
    max-width: 250px;
    line-height: 1.6;
  }
  .page-intro > .workspace-badge {
    display: none;
  }
  .admin-tabs {
    gap: 20px;
    overflow-x: auto;
    margin-bottom: 25px;
  }
  .admin-tabs a {
    font-size: 11px;
    white-space: nowrap;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stat-card {
    padding: 18px;
  }
  .stat-card:nth-child(2) {
    border-right: 0;
  }
  .stat-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .stat-card strong {
    font-size: 33px;
    margin-top: 9px;
  }
  .panel-heading {
    padding: 20px 17px;
  }
  .filter-form {
    width: 100%;
  }
  .filter-form .field {
    flex: 1;
  }
  .filter-form input {
    width: 100%;
  }
  .chart-wrap {
    padding: 0 17px 18px;
  }
  .section-heading {
    margin-bottom: 15px;
  }
  .section-heading h2 {
    font-size: 18px;
  }
  .section-heading > .muted {
    display: none;
  }
  .user-form {
    padding: 0 17px 20px;
    gap: 12px;
  }
  .user-form > .field:nth-child(2) {
    grid-column: 1/-1;
    grid-row: 1;
  }
  .user-form .button {
    align-self: end;
  }
  .team-toolbar {
    padding: 16px 17px;
  }
  .search-field input {
    min-width: 0;
    width: 170px;
  }
  th,
  td {
    padding: 13px 16px;
  }
  .history-empty {
    padding: 27px 20px;
  }
  .history-empty strong {
    font-size: 13px;
  }
  .history-empty p {
    font-size: 10px;
  }
  .knowledge-panel {
    padding: 22px 18px;
  }
  .knowledge-copy {
    gap: 14px;
    align-items: flex-start;
  }
  .knowledge-symbol {
    width: 44px;
    height: 44px;
  }
  .knowledge-copy h3 {
    font-size: 17px;
  }
  .knowledge-copy p {
    font-size: 11px;
  }
  .knowledge-action {
    padding-left: 58px;
  }
  .history-heading {
    padding: 20px 17px;
  }
  .history-chats {
    padding: 0 17px 17px;
  }
  .history-chat summary {
    flex-wrap: wrap;
  }
  .page-footer {
    font-size: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.carbon-panel {
  display: flex;
  gap: 32px;
  align-items: start;
  padding: 24px;
  margin-bottom: 22px;
}
.carbon-stat {
  flex: 0 0 300px;
}
.carbon-stat strong {
  display: block;
  margin-top: 10px;
  font-size: 32px;
  font-weight: 600;
}
.carbon-stat p {
  margin: 8px 0 0;
  font-size: 11px;
}
.carbon-method {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  line-height: 1.6;
}
.carbon-method summary {
  font-weight: 600;
  padding: 4px 0;
}
.carbon-method p {
  margin: 12px 0;
}
.carbon-sources {
  display: grid;
  gap: 6px;
}
.carbon-sources a {
  text-decoration: underline;
  overflow-wrap: anywhere;
}
@media (max-width: 800px) {
  .carbon-panel {
    flex-direction: column;
    gap: 16px;
    padding: 18px;
  }
  .carbon-stat {
    flex-basis: auto;
  }
}

/* Sanitized formatted replies, including older saved Markdown conversations. */
.rich-text {
  white-space: normal;
}
.rich-text > :first-child {
  margin-top: 0;
}
.rich-text > :last-child {
  margin-bottom: 0;
}
.rich-text p,
.rich-text ul,
.rich-text ol,
.rich-text blockquote,
.rich-text pre,
.rich-text table {
  margin: 0 0 1em;
}
.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text h4,
.rich-text h5,
.rich-text h6 {
  font-size: 1.15em;
  line-height: 1.3;
  margin: 1.25em 0 0.65em;
}
.rich-text h1 {
  font-size: 1.5em;
}
.rich-text h2 {
  font-size: 1.3em;
}
.rich-text ul,
.rich-text ol {
  padding-left: 1.5em;
}
.rich-text li {
  margin: 0.3em 0;
}
.rich-text blockquote {
  border-left: 3px solid var(--line);
  padding: 0 1em;
  color: var(--muted);
}
.rich-text pre {
  padding: 16px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: auto;
  white-space: pre;
}
.rich-text code {
  font-family: ui-monospace, monospace;
  font-size: 0.88em;
  background: var(--soft);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}
.rich-text pre code {
  padding: 0;
  background: none;
}
.rich-text table {
  display: block;
  max-width: 100%;
  overflow: auto;
  border-collapse: collapse;
  font-size: 0.9em;
}
.rich-text th,
.rich-text td {
  padding: 8px 12px;
  border: 1px solid var(--line);
  text-align: left;
}
.rich-text th {
  background: var(--soft);
}
.rich-text hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.5em 0;
}
.history-message > strong {
  display: block;
  margin-bottom: 8px;
}
.attachment-thumbnail {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 3px;
}
#mainContent.chat-panel {
  position: relative;
}
#mainContent.file-drop-active::after {
  content: attr(data-drop-label);
  position: absolute;
  inset: 12px;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f5f5f2ed;
  border: 2px dashed var(--accent);
  border-radius: 8px;
  font-size: 24px;
  font-weight: 600;
  pointer-events: none;
}
.template-page .page-intro h1 {
  white-space: pre-line;
}
.template-toolbar {
  display: flex;
  gap: 20px;
  align-items: end;
  margin-bottom: 28px;
}
.template-toolbar .field:first-child {
  flex: 1;
}
.template-toolbar .field {
  min-width: 180px;
}
.template-toolbar > span {
  font-size: 12px;
  padding-bottom: 8px;
}
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 20px;
}
.template-card {
  display: flex;
  flex-direction: column;
  align-items: start;
  padding: 28px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 4px;
  min-width: 0;
}
.template-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
}
.template-card-top .eyebrow {
  overflow-wrap: anywhere;
}
.template-card h2 {
  font-size: 23px;
  line-height: 1.2;
  margin: 22px 0 12px;
  overflow-wrap: anywhere;
}
.template-description {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 18px;
  overflow-wrap: anywhere;
}
.template-preview {
  font-size: 12px;
  margin-bottom: 24px;
  width: 100%;
}
.template-preview summary {
  font-weight: 600;
}
.template-prompt {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 260px;
  overflow: auto;
}
.template-card > .button {
  margin-top: auto;
}
.template-page-note {
  margin-top: 28px;
  color: var(--muted);
  font-size: 12px;
}
.template-empty {
  grid-column: 1/-1;
  padding: 40px;
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
}
.template-management {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 1fr);
}
.template-form {
  padding: 28px;
  border-right: 1px solid var(--line);
  display: grid;
  gap: 16px;
}
.template-form h3 {
  margin: 0 0 8px;
}
.template-form textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 12px;
  background: white;
  color: var(--ink);
  font: inherit;
}
.template-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.template-admin-list {
  padding: 16px 28px;
}
.template-admin-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.template-admin-item h4 {
  font-size: 15px;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}
.template-admin-item p {
  font-size: 12px;
  margin: 0 0 12px;
}
@media (max-width: 800px) {
  .template-management {
    grid-template-columns: 1fr;
  }
  .template-form {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .template-toolbar {
    flex-wrap: wrap;
  }
  .template-toolbar .field {
    min-width: 0;
    flex: 1 1 180px;
  }
  .template-toolbar > span {
    width: 100%;
  }
  .template-card {
    padding: 24px;
  }
}
@media (max-width: 560px) {
  .template-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .template-toolbar .field,
  .template-toolbar .field:first-child {
    width: 100%;
    min-width: 0;
    flex: none;
  }
  .template-toolbar input,
  .template-toolbar select {
    width: 100%;
    min-width: 0;
  }
}
