/* Lextracks combined chat shell, vendored as a presentation layer only. */
:root {
  --chat-bg: #fcfbf8;
  --chat-paper: #fcfbf8;
  --chat-rail: #fcfbf8;
  --chat-soft: #f0eee7;
  --chat-hover: #e0ddd4;
  --chat-ink: #292d28;
  --chat-muted: #5d625a;
  --chat-faint: #60665c;
  --chat-line: #d8d5cc;
  --chat-strong: #848b80;
  --chat-action: var(--chat-ink);
  --chat-link: var(--chat-ink);
  --chat-focus: var(--chat-ink);
  --chat-accent-soft: #efeee9;
  --chat-danger: #9b3e38;
  --chat-rail-width: 244px;
  --chat-panel-width: 336px;
  --chat-editorial: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "P052", Georgia, serif;
  /* Dialogs live outside .desk, so the supplied palette must live at root. */
  --bg: var(--chat-bg);
  --paper: var(--chat-paper);
  --rail: var(--chat-rail);
  --soft: var(--chat-soft);
  --hover: var(--chat-hover);
  --ink: var(--chat-ink);
  --muted: var(--chat-muted);
  --faint: var(--chat-faint);
  --line: var(--chat-line);
  --line-strong: var(--chat-strong);
  --accent: var(--chat-action);
  --accent-ink: var(--chat-link);
  --accent-button: var(--chat-action);
  --accent-strong: color-mix(in srgb, var(--chat-action) 90%, var(--chat-paper));
  --on-accent: var(--chat-paper);
  --accent-soft: var(--chat-accent-soft);
  --focus: var(--chat-focus);
  --danger: var(--chat-danger);
}
:root[data-mode="dark"] {
  --chat-bg: #22241f;
  --chat-paper: #1d201c;
  --chat-rail: #242721;
  --chat-soft: #2b2f28;
  --chat-hover: #353b31;
  --chat-ink: #eeede6;
  --chat-muted: #c4c6bb;
  --chat-faint: #a8afa1;
  --chat-line: #42483d;
  --chat-strong: #798572;
  --chat-action: var(--chat-ink);
  --chat-link: var(--chat-ink);
  --chat-focus: var(--chat-ink);
  --chat-accent-soft: #343a32;
  --chat-danger: #f0aaa0;
  --accent: var(--chat-action);
  --accent-ink: var(--chat-link);
  --accent-button: var(--chat-action);
  --accent-strong: color-mix(in srgb, var(--chat-action) 90%, var(--chat-paper));
  --on-accent: var(--chat-paper);
  --accent-soft: var(--chat-accent-soft);
  --focus: var(--chat-focus);
}

.desk {
  grid-template-columns: var(--chat-rail-width) minmax(0, 1fr) var(--chat-panel-width);
  background: var(--chat-paper);
  color: var(--chat-ink);
}
body { background: var(--chat-bg); color: var(--chat-ink); }
.desk.workflows-hidden { --chat-panel-width: 0px; }
.desk.workflows-hidden > #workflow-panel { display: none; }
.desk .rail {
  width: var(--chat-rail-width);
  padding: 23px 15px 14px;
  background: var(--chat-rail);
  border-right-color: var(--chat-line);
}
.desk .brand-row {
  min-height: 44px;
  margin: 0 5px 25px;
  padding-bottom: 0;
  border-bottom: 0;
}
.desk .brand { width: 143px; opacity: .89; }
.desk .compact-brand { color: var(--chat-ink); border: 0; padding: 8px 10px; min-width: 44px; min-height: 44px; }
.desk .brand-monogram { display: block; width: 20px; height: 28px; fill: currentColor; }
.desk .office-identity { margin-bottom: 25px; }
.desk .office-avatar {
  width: 35px;
  height: 35px;
  border-radius: 5px;
  background: transparent;
  border-color: var(--chat-strong);
  color: var(--chat-ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}
.desk .office-identity .office-name { font-size: 12.5px; font-weight: 600; }
.desk .office-identity .office-caption { font-size: 11.5px; color: var(--chat-muted); }
.desk .new-conversation {
  min-height: 43px;
  border-radius: 6px;
  border-color: var(--chat-strong);
  background: var(--chat-paper);
  color: var(--chat-ink);
  box-shadow: none;
  font-size: 12.5px;
  font-weight: 500;
}
.desk .new-conversation:hover { background: var(--chat-soft); border-color: var(--chat-ink); color: var(--chat-ink); }
.desk .new-conversation .ico { color: currentColor; }
.desk .new-conversation { border-color: var(--chat-ink); }
.desk .primary-nav { margin: 20px 0 26px; gap: 3px; }
.desk .nav-item { min-height: 41px; border-radius: 5px; font-size: 12.5px; color: var(--chat-muted); }
.desk .nav-item.current { background: var(--chat-hover); color: var(--chat-ink); font-weight: 600; }
.desk .nav-item:hover { background: var(--chat-hover); color: var(--chat-ink); }
.desk .history-heading { padding-left: 11px; font-size: 10px; letter-spacing: 1.25px; text-transform: uppercase; color: var(--chat-faint); }
.desk .conversation-row { border-radius: 5px; padding: 11px; margin-bottom: 4px; font-size: 12px; color: var(--chat-muted); }
.desk .conversation-row.active { border: 1px solid var(--chat-line); background: var(--chat-paper); }
.desk .rail-footer { border-top-color: var(--chat-line); }

.desk .workspace,
.desk .workspace-header { background: var(--chat-paper); }
.desk .workspace-header { height: 73px; min-height: 73px; border-bottom-color: var(--chat-line); padding: 0 30px; }
.desk .context-symbol { border: 0; border-left: 1px solid var(--chat-line); border-radius: 0; color: var(--chat-muted); }
.desk .context-copy > label { font-size: 9px; letter-spacing: 1.25px; color: var(--chat-faint); }
.desk .context-select { font-size: 12px; color: var(--chat-ink); }
.desk .header-workflows {
  min-height: 34px;
  border-radius: 5px;
  border-color: var(--chat-line);
  background: transparent;
  color: var(--chat-muted);
  font-size: 11px;
}
.desk .header-workflows[aria-expanded="true"] { background: var(--chat-soft); color: var(--chat-ink); border-color: var(--chat-line); }
.desk .workspace-body { padding: 35px 48px 24px; scrollbar-color: var(--chat-line) transparent; }
.desk .workspace:has(.welcome:not([hidden])) .workspace-body { margin-top: auto; padding-bottom: 9px; }
.desk .welcome { max-width: 744px; }
.desk .welcome-note { color: var(--chat-muted); font-size: 10px; letter-spacing: 1.35px; text-transform: uppercase; }
.desk .welcome-note:before { background: var(--chat-ink); }
.desk .welcome h1 {
  font-family: var(--chat-editorial);
  font-size: 49px;
  line-height: 1.12;
  letter-spacing: -1.6px;
  font-weight: 400;
  color: var(--chat-ink);
}
.desk .welcome p { max-width: 355px; font-size: 14px; line-height: 1.85; color: var(--chat-muted); }
.desk .work-path { display: none; }

.desk .composer-region { padding: 9px 42px 21px; }
.desk .composer { border-radius: 10px; border-color: var(--chat-strong); background: var(--chat-paper); box-shadow: 0 2px 0 #292d2804; }
.desk .composer:focus-within { border-color: var(--chat-focus); box-shadow: 0 0 0 2px var(--chat-accent-soft); }
.desk .composer textarea { min-height: 70px; padding: 18px 18px 10px; font-size: 14px; line-height: 1.7; color: var(--chat-ink); }
.desk .composer textarea::placeholder { color: var(--chat-faint); }
.desk .composer-toolbar { padding: 0 10px 9px; }
.desk .start-task { border-radius: 5px; color: var(--chat-muted); font-size: 11px; }
.desk .start-task:hover { background: var(--chat-soft); color: var(--chat-ink); }
.desk .send-button { width: 35px; height: 35px; border-radius: 5px; background: var(--chat-action); color: var(--chat-paper); }
.desk .send-button:disabled { background: var(--chat-soft); border: 1px solid var(--chat-line); color: var(--chat-faint); }
.desk .composer-footnote { margin-top: 9px; font-size: 9.5px; color: var(--chat-faint); }
.desk .composer-footnote .ico { width: 11px; height: 11px; }

.desk .workflows { background: var(--chat-bg); border-left-color: var(--chat-line); }
.desk .panel-header { min-height: 76px; padding: 18px 24px; border-bottom-color: var(--chat-line); }
.desk .panel-header h2 { font-size: 13px; font-weight: 600; }
.desk .panel-header p { font-size: 10.5px; color: var(--chat-muted); }
.desk .workflow-content { padding: 15px 20px 24px; scrollbar-color: var(--chat-line) transparent; }
.desk .workflow-search { border-color: var(--chat-strong); border-radius: 5px; margin-bottom: 27px; background: transparent; }
.desk .workflow-search input { height: 36px; font-size: 11px; }
.desk .section-label { font-size: 10px; letter-spacing: 1.25px; text-transform: uppercase; color: var(--chat-faint); }
.desk .workflow-card {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 15px 14px 13px;
  border: 1px solid var(--chat-line);
  border-radius: 5px;
  background: var(--chat-paper);
  text-align: left;
}
.desk .workflow-card:hover,
.desk .workflow-card:focus-visible { background: var(--chat-paper); border-color: var(--chat-strong); }
.desk .workflow-card-top { display: flex; align-items: center; gap: 9px; color: var(--chat-faint); font-size: 9.5px; letter-spacing: .6px; text-transform: uppercase; }
.desk .workflow-card-symbol { display: inline-grid; place-items: center; width: 25px; height: 27px; border: 1px solid var(--chat-line); border-radius: 2px; color: var(--chat-ink); flex-shrink: 0; }
.desk .workflow-card-symbol .ico { width: 14px; height: 14px; }
.desk .workflow-card h3 { margin: 11px 0 7px; color: var(--chat-ink); font-size: 13px; line-height: 1.55; font-weight: 600; }
.desk .workflow-card p { margin: 0 0 15px; color: var(--chat-muted); font-size: 12px; line-height: 1.8; }
.desk .workflow-card-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--chat-line); color: var(--chat-faint); font-size: 10.5px; }
.desk .workflow-card-foot .ico { width: 13px; height: 13px; color: var(--chat-link); }
.desk .workflow-more { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; margin-top: 5px; color: var(--chat-muted); font-size: 12px; }
.desk .workflow-more .ico { width: 14px; height: 14px; color: var(--chat-link); }
.desk .decision .decision-confirm { color: var(--chat-paper); }
.desk .workflow-footer { padding: 18px 24px; font-size: 10.5px; line-height: 1.8; border-top-color: var(--chat-line); color: var(--chat-muted); }
.desk .workflow-footer strong { font-size: 10.5px; color: var(--chat-ink); }

/* Native messages in the reference's document-reading grammar. */
.desk:has(#thread:not([hidden])) .workspace-body { padding: 18px 38px 8px 38px; }
.desk:has(#thread:not([hidden])) .conversation { width: 100%; max-width: 884px; padding: 0 0 8px; }
.desk:has(#thread:not([hidden])) #messages { gap: 26px; }
.desk .message-text { color: var(--chat-ink); }
.desk .user-message {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  align-self: stretch;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.desk .memo-request-label { padding-top: 4px; color: var(--chat-faint); font: 400 9px/1.7 var(--font-mono); letter-spacing: 1px; }
.desk .brief-text { max-width: 760px; margin: 0; color: var(--chat-muted); font: 400 12px/1.7 var(--chat-font); white-space: pre-wrap; overflow-wrap: anywhere; }
.desk .answer-card {
  position: relative;
  padding: 0;
  border: 1px solid var(--chat-strong);
  border-top: 2px solid var(--chat-ink);
  border-radius: 2px;
  background: var(--chat-paper);
  box-shadow: none;
  container-type: inline-size;
}
.desk .answer-card::before, .desk .answer-card::after { content: ''; position: absolute; top: -6px; width: 1px; height: 10px; background: var(--chat-ink); pointer-events: none; }
.desk .answer-card::before { left: -1px; }
.desk .answer-card::after { right: -1px; }
.desk .answer-header { min-height: 47px; margin: 0; padding: 9px 26px; border-bottom: 1px solid var(--chat-line); }
.desk .answer-author { gap: 10px; }
.desk .answer-symbol { width: 13px; height: 19px; flex: 0 0 13px; border: 0; border-radius: 0; background: transparent; color: var(--chat-ink); box-shadow: none; }
.desk .answer-symbol svg { display: block; width: 13px; height: 19px; fill: currentColor; }
.desk .answer-identity { display: flex; align-items: baseline; gap: 10px; }
.desk .answer-kicker { color: var(--chat-ink); font: 600 10px/1.4 var(--font-mono); letter-spacing: .7px; }
.desk .answer-name { padding-left: 10px; border-left: 1px solid var(--chat-line); color: var(--chat-muted); font: 400 9px/1.4 var(--font-mono); letter-spacing: .3px; }
.desk .answer-status { color: var(--chat-muted); font: 400 9px/1.5 var(--font-mono); letter-spacing: .5px; }
.desk .answer-status::before { border: 1px solid currentColor; background: transparent; box-shadow: none; }
.desk .answer-content { padding: 20px 30px 24px; font-size: 14px; line-height: 1.75; letter-spacing: -.1px; }
.desk .answer-content .document-kicker { display: block; margin: 0 0 8px; color: var(--chat-muted); font: 400 9px/1.6 var(--font-mono); letter-spacing: 1.45px; }
.desk .answer-content > h2:first-of-type {
  margin: 0 0 18px !important;
  padding: 0 0 16px;
  border-top: 0;
  border-bottom: 1px solid var(--chat-line);
  color: var(--chat-ink);
  font: 400 35px/1.14 var(--chat-editorial);
  letter-spacing: -.9px;
  text-transform: none;
  text-wrap: balance;
}
.desk .answer-content h2:not(:first-of-type), .desk .answer-content h3, .desk .answer-content h4 {
  color: var(--chat-ink);
  font: 600 12px/1.5 var(--chat-font);
  letter-spacing: -.1px;
  text-transform: none;
}
.desk .answer-content .document-section-heading { display: flex; align-items: baseline; gap: 11px; margin: 18px 0 7px; }
.desk .answer-content .document-section-heading h3 { margin: 0; padding: 0; border: 0; }
.desk .answer-content .document-section-index { min-width: 16px; color: var(--chat-muted); font: 400 9px/1.6 var(--font-mono); letter-spacing: .4px; user-select: none; }
.desk .answer-content .document-summary { max-width: 775px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--chat-line); font-size: 16px; line-height: 1.7; letter-spacing: -.2px; }
.desk .answer-content h3:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.desk .answer-actions { margin: 0; padding: 9px 0 0; }
.desk .answer-action { color: var(--chat-muted); }
.desk:has(#thread:not([hidden])) .composer-region { padding: 7px 38px 15px; border-top: 1px solid var(--chat-line); box-shadow: none; }
.desk:has(#thread:not([hidden])) .composer { max-width: 884px; border-radius: 7px; }
.desk:has(#thread:not([hidden])) .composer textarea { min-height: 42px; max-height: 112px; padding: 13px 16px 3px; font-size: 13px; }
.desk:has(#thread:not([hidden])) .composer-toolbar { padding: 0 8px 6px; }
.desk:has(#thread:not([hidden])) .composer-toolbar .icon-btn,
.desk:has(#thread:not([hidden])) .start-task { min-height: 31px; height: 31px; }
.desk:has(#thread:not([hidden])) #send { width: 31px; min-width: 31px; height: 31px; }
.desk .decision { border-radius: 5px; border-color: var(--chat-line); background: var(--chat-soft); }
.desk .decision button { border-radius: 5px; }

@media (min-width: 1240px) {
  .desk:has(#thread:not([hidden])) { --workflow-width: 336px; --chat-panel-width: 336px; }
  .desk:has(#thread:not([hidden])) > .workflows { width: 336px; }
}
@media (max-width: 639px) {
  .desk:has(#thread:not([hidden])) .workspace-body { padding: 18px 18px 8px; }
  .desk .user-message { display: block; padding: 0 4px; }
  .desk .memo-request-label { display: block; margin-bottom: 5px; font-size: 10.5px; }
  .desk .brief-text { font-size: 12px; line-height: 1.65; }
  .desk .answer-header { min-height: 51px; padding: 8px 16px; gap: 8px; }
  .desk .answer-name { display: none; }
  .desk .answer-status { font-size: 10.5px; }
  .desk .answer-kicker { font-size: 10.5px; }
  .desk .answer-content { padding: 17px 16px 22px; }
  .desk .answer-content > h2:first-of-type { font-size: 30px; line-height: 1.15; }
  .desk .answer-content .document-summary { font-size: 15px; line-height: 1.8; }
  .desk:has(#thread:not([hidden])) .composer-region { padding: 7px 14px max(13px, env(safe-area-inset-bottom)); }
  .desk:has(#thread:not([hidden])) .composer textarea { font-size: 16px; }
  .desk:has(#thread:not([hidden])) .composer-toolbar .icon-btn,
  .desk:has(#thread:not([hidden])) .start-task,
  .desk:has(#thread:not([hidden])) #send { min-width: 44px; min-height: 44px; height: 44px; }
}

@media (max-width: 1239px) {
  .desk { --chat-rail-width: 76px; grid-template-columns: var(--chat-rail-width) minmax(0, 1fr); }
  .desk > .workflows { display: none; }
  .desk .rail { width: 76px; padding: 23px 12px 14px; }
  .desk .brand-row { justify-content: center; margin: 0 0 25px; padding-bottom: 16px; }
  .desk .brand { display: none; }
  .desk .compact-brand { display: block; }
  .desk .office-identity { margin: 0 4px 20px; }
  .desk .new-conversation, .desk .nav-item { justify-content: center; padding: 10px 5px; }
  .desk .history { display: none; }
  .desk .workspace-header { padding: 0 23px; }
  .desk .workspace-body { padding-left: 32px; padding-right: 32px; }
  .desk .composer-region { padding-left: 26px; padding-right: 26px; }
}
@media (max-width: 959px) {
  .desk .workspace-header { height: 70px; min-height: 70px; }
  .desk .welcome h1 { font-size: 47px; }
}
@media (max-width: 639px) {
  .desk { display: flex; }
  .desk > .rail { display: none; }
  .desk .workspace { width: 100%; }
  .desk .composer { width: 100%; max-width: 740px; }
  .desk .workspace-header { height: 65px; min-height: 65px; padding: 0 10px; gap: 7px; }
  .desk .context-symbol { display: none; }
  .desk .context-copy > label { display: none; }
  .desk .context-select { min-height: 44px; max-width: 137px; font-size: 11px; }
  .desk .header-workflows { min-width: 44px; min-height: 40px; padding: 7px; border: 0; }
  .desk .header-workflows .button-label { display: none; }
  .desk .workspace-body { padding: 27px 24px 19px; }
  .desk .workspace:has(.welcome:not([hidden])) .workspace-body { margin-top: 28px; padding-bottom: 9px; }
  .desk .welcome h1 { font-size: 43px; }
  .desk .welcome p { font-size: 13px; line-height: 1.85; }
  .desk .composer-region { padding: 8px 18px 17px; }
  .desk .composer textarea { min-height: 77px; padding: 15px; font-size: 16px; }
  .desk .send-button, .desk .composer-left .icon-btn { width: 44px; min-width: 44px; height: 44px; }
  .desk .start-task { min-height: 44px; font-size: 11px; }
  .desk .composer-footnote { font-size: 9.5px; justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .desk *, .desk *::before, .desk *::after { transition: none !important; animation: none !important; }
}

/* Supplied combined-chat shell: exact home geometry and controls. */
@font-face {
  font-family: CombinedInstrument;
  src: url('/assets/combined-instrument.woff2') format('woff2');
  font-display: swap;
  font-style: normal;
  font-weight: 400 700;
}

.desk {
  --chat-font: CombinedInstrument, sans-serif;
  --chat-width: 740px;
  --chat-gutter: 36px;
  --rail-width: 244px;
  --workflow-width: 312px;
  --paper: var(--chat-paper);
  --soft: var(--chat-soft);
  --line: var(--chat-line);
  --muted: var(--chat-muted);
  --ink: var(--chat-ink);
  --faint: var(--chat-faint);
  --orange: var(--chat-strong);
  --editorial: var(--chat-editorial);
  grid-template-columns: var(--rail-width) minmax(0, 1fr) var(--workflow-width);
  font-family: var(--chat-font);
}
.desk.workflows-hidden { --workflow-width: 0px; }
.desk .workflows { width: 312px; max-width: 100%; }
.desk .rail { padding: 24px 15px 14px; }
.desk .rail-collapse { display: inline-flex; }
.desk .header-actions { margin-left: auto; }
.desk.rail-collapsed { --rail-width: 72px; --chat-rail-width: 72px; }
.desk.rail-collapsed > .rail { width: 72px; padding: 24px 8px 14px; }
.desk.rail-collapsed > .rail .office-identity { display: none; }
.desk.rail-collapsed > .rail .brand-row { margin: 0 0 25px; justify-content: center; }
.desk.rail-collapsed > .rail .new-conversation,
.desk.rail-collapsed > .rail .nav-item { justify-content: center; padding: 10px 5px; }
.desk.focus-mode { grid-template-columns: minmax(0, 1fr); }
.desk.focus-mode > .rail, .desk.focus-mode > .workflows { display: none; }
.desk.focus-mode > .workspace { grid-column: 1; width: 100%; }
.desk.focus-mode .arrival-art { display: none; }
.desk .brand-block { height: 52px; min-height: 52px; margin-bottom: 24px; border-bottom: 0; }
.desk .new-conversation { min-height: 44px; border-radius: 9px; font-size: 14px; font-weight: 550; }
.desk .primary-nav { gap: 3px; }
.desk .nav-item { min-height: 42px; border-radius: 8px; font-size: 14px; }
.desk .history-heading { display: flex; align-items: center; justify-content: space-between; padding-right: 2px; }
.desk .history-heading .icon-btn { width: 28px; height: 28px; min-width: 28px; color: var(--muted); }
.desk .history-item { display: flex; align-items: flex-start; gap: 11px; min-height: 56px; padding: 10px 11px; border-radius: 8px; color: var(--chat-muted); }
.desk .history-item.active { background: var(--chat-soft); color: var(--chat-ink); }
.desk .history-item .history-icon { display: inline-flex; width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; }
.desk .history-item .history-icon .ico { width: 17px; height: 17px; }
.desk .history-item .history-copy { display: block; min-width: 0; flex: 1; }
.desk .history-item .history-copy strong, .desk .history-item .history-copy small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.desk .history-item .history-copy strong { color: var(--chat-ink); font-size: 13px; font-weight: 550; line-height: 1.4; }
.desk .history-item .history-copy small { margin-top: 3px; color: var(--chat-muted); font-size: 12px; line-height: 1.4; }
.desk .conversation-row button { border-radius: 8px; }

.desk .workspace-header {
  height: 76px;
  min-height: 76px;
  padding: 0 27px;
  gap: 14px;
  border-bottom: 0;
  box-shadow: inset 0 -1px var(--line);
}
.topbar-leading, .mobile-brand { display: none; }
.desk .conversation-tabs { display: flex; flex: 1 1 0; min-width: 0; height: 36px; overflow: hidden; }
.desk .conversation-tabs[hidden] { display: none; }
.conversation-tab-scroll { display: flex; flex: 1; min-width: 0; align-items: stretch; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; touch-action: pan-x pinch-zoom; overscroll-behavior-x: contain; cursor: grab; user-select: none; -webkit-user-select: none; }
.conversation-tab-scroll button { cursor: inherit; }
.conversation-tab-scroll.dragging-tabs, .conversation-tab-scroll.dragging-tabs button { cursor: grabbing; }
.conversation-tab-scroll::-webkit-scrollbar { display: none; }
.conversation-tab { display: flex; align-items: stretch; position: relative; min-width: 132px; max-width: 238px; height: 36px; flex-shrink: 0; border-right: 1px solid color-mix(in srgb, var(--line) 76%, transparent); }
.conversation-tab:first-child { border-left: 1px solid color-mix(in srgb, var(--line) 76%, transparent); }
.conversation-tab.active { background: var(--soft); }
.conversation-tab.active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--ink); pointer-events: none; }
.conversation-tab-target { display: flex; align-items: center; flex: 1; min-width: 0; height: 100%; padding: 0 9px 0 11px; border: 0; background: transparent; color: var(--faint); text-align: left; white-space: nowrap; font: 450 11px/1 var(--chat-font); }
.conversation-tab-target > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-tab:hover .conversation-tab-target { color: var(--ink); }
.conversation-tab.active .conversation-tab-target { color: var(--ink); font-weight: 560; }
.conversation-tab.pending { align-items: center; padding: 0 11px; color: var(--ink); font: 560 11px/1 var(--chat-font); }
.conversation-tab-close { display: grid; place-items: center; width: 27px; min-width: 27px; height: 100%; border: 0; background: transparent; color: var(--faint); opacity: 0; transition: opacity .12s, color .12s, background .12s; }
.conversation-tab:hover .conversation-tab-close, .conversation-tab.active .conversation-tab-close, .conversation-tab-close:focus-visible { opacity: .68; }
.conversation-tab-close:hover { opacity: 1; color: var(--ink); background: var(--soft); }
.conversation-tab-close .ico { width: 12px; height: 12px; }
.desk .header-actions { flex: 0 0 auto; gap: 3px; }
.desk .header-divider { width: 1px; height: 24px; margin: 0 5px; background: var(--line); }
.desk .header-workflows { min-height: 40px; border-radius: 8px; padding: 8px 10px; font-size: 13px; font-weight: 400; }
.desk .desktop-only { display: inline-flex; }

.desk .workspace:has(.welcome:not([hidden])) .workspace-body { flex: 0 1 auto; margin-top: auto; padding: 28px var(--chat-gutter) 24px; }
.desk .workspace:has(.welcome:not([hidden])) .workspace-body { margin-top: auto; padding: 28px var(--chat-gutter) 24px; }
.desk .welcome, .desk .conversation, .desk .composer-inner { width: min(100%, var(--chat-width)); max-width: var(--chat-width); margin-left: auto; margin-right: auto; }
.desk .arrival-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; min-height: 0; }
.desk .arrival-copy { padding: 0; }
.desk .arrival-art { display: block; width: 180px; height: 236px; margin: 0; position: relative; overflow: hidden; }
.desk .arrival-art[hidden] { display: none; }
.desk .arrival-art img { width: 100%; height: 100%; object-fit: contain; opacity: .76; }
.desk .arrival-art .construction { display: none; }
.desk .welcome-note { margin-bottom: 18px; font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 500; }
.desk .welcome-note::before { width: 23px; }
.desk .welcome h1 { margin: 0 0 18px; font-size: clamp(37px, 3.3vw, 48px); line-height: 1.13; letter-spacing: -1.4px; }
.desk .welcome p { max-width: 410px; margin: 0; font-size: 16px; line-height: 1.75; }
.desk .work-path { display: none; }
.desk .workspace:has(.welcome:not([hidden])) .composer-region { flex-shrink: 0; min-height: 0; margin-bottom: auto; padding: 0 var(--chat-gutter) 28px; }
.desk .composer { width: 100%; max-width: 740px; border-radius: 12px; box-shadow: none; }
.desk .composer textarea { min-height: 72px; padding: 17px 18px 8px; font-size: 15px; line-height: 1.7; }
.desk .composer-toolbar { padding: 0 10px 10px; }
.desk .start-task { min-height: 40px; font-size: 13px; }
.desk #send { width: 40px; min-width: 40px; height: 40px; border-radius: 8px; }
.desk .composer-footnote { max-width: 740px; align-items: flex-start; justify-content: flex-start; flex-wrap: wrap; gap: 5px 12px; margin-top: 7px; font-size: 11px; line-height: 1.6; }

.desk .workflows { background: var(--paper); }
.desk .panel-header { min-height: 76px; margin-bottom: 0; padding: 21px 20px 15px; border-bottom: 0; }
.desk .panel-header h2 { font-size: 15px; font-weight: 600; }
.desk .panel-header p { margin-top: 3px; font-size: 13px; }
.desk #workflow-list { padding: 0; }
.desk .workflow-card h3 { font-size: 13px; }
.desk .workflow-card p { font-size: 12px; line-height: 1.8; }
.desk .workflow-note { padding: 18px 22px 22px; font-size: 12px; line-height: 1.65; }

@media (max-width: 1199px) {
  .desk { grid-template-columns: 72px minmax(0, 1fr) 312px; --chat-gutter: 28px; }
  .desk.workflows-hidden { grid-template-columns: 72px minmax(0, 1fr); }
  .desk .rail { width: 72px; padding: 23px 8px 12px; }
  .desk .arrival-copy > p { font-size: 15px; }
}
@media (min-width: 640px) and (max-width: 1199px) {
  .desk .header-workflows { background: var(--soft); color: var(--ink); }
}

@media (max-width: 959px) {
  .desk .workspace-header { height: 70px; min-height: 70px; }
}

@media (max-width: 639px) {
  .desk { display: flex; --chat-gutter: 20px; }
  .desk > .rail, .desk > .workflows { display: none; }
  .desk .workspace-header {
    height: calc(100px + env(safe-area-inset-top));
    min-height: calc(100px + env(safe-area-inset-top));
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: 56px 44px;
    gap: 0 4px;
    padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  }
  .desk .workspace-header:has(.conversation-tabs[hidden]) { height: calc(56px + env(safe-area-inset-top)); min-height: calc(56px + env(safe-area-inset-top)); grid-template-rows: 56px; }
  .desk .topbar-leading { display: flex; grid-column: 1; grid-row: 1; align-items: center; gap: 4px; }
  .desk .mobile-brand { display: block; font: 20px/1 var(--editorial); letter-spacing: -.6px; color: var(--ink); }
  .desk .mobile-nav-button { display: inline-flex; width: 44px; min-width: 44px; height: 44px; }
  .desk .header-actions { grid-column: 2; grid-row: 1; justify-self: end; gap: 0; }
  .desk .header-actions .desktop-only, .desk .header-actions .header-divider { display: none !important; }
  .desk .header-actions .icon-btn { width: 44px; min-width: 44px; height: 44px; }
  .desk .header-workflows { width: auto; min-width: 44px; min-height: 44px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: transparent; font-size: 13px; }
  .desk .header-workflows .button-label { display: inline; }
  .desk .conversation-tabs { grid-column: 1 / -1; grid-row: 2; width: 100%; height: 44px; }
  .conversation-tab { min-width: 200px; max-width: 250px; height: 44px; }
  .conversation-tab-target { min-height: 44px; font-size: 13px; padding: 0 10px; }
  .conversation-tab.pending { font-size: 13px; }
  .conversation-tab-close { opacity: 1; width: 44px; min-width: 44px; height: 44px; }
  .desk .workspace:has(.welcome:not([hidden])) .workspace-body { flex: 0 1 auto; margin-top: clamp(16px, 6dvh, 48px); padding: 16px var(--chat-gutter) 24px; min-height: 0; }
  .desk .arrival-layout { display: block; }
  .desk .arrival-art { display: none; }
  .desk .welcome h1 { margin-bottom: 16px; font-size: 36px; line-height: 1.13; letter-spacing: -1.1px; }
  .desk .welcome-note { margin-bottom: 16px; font-size: 13px; }
  .desk .welcome p { max-width: 410px; font-size: 16px; line-height: 1.6; }
  .desk .composer-region { flex-shrink: 0; margin-bottom: 0; padding: 0 var(--chat-gutter) max(16px, env(safe-area-inset-bottom)); }
  .desk .composer textarea { min-height: 60px; max-height: 112px; padding: 14px 14px 6px; font-size: 16px; line-height: 1.5; }
  .desk .composer-toolbar { padding: 0 8px 8px; }
  .desk #send, .desk .composer-toolbar .icon-btn { width: 44px; min-width: 44px; height: 44px; }
  .desk .start-task { min-height: 44px; font-size: 14px; }
  .desk .composer-footnote { margin-top: 8px; font-size: 12px; line-height: 1.5; }
}

@media (max-width: 359px) {
  .desk { --chat-gutter: 16px; }
  .desk .mobile-brand { font-size: 18px; }
  .desk .welcome h1 { font-size: 34px; }
}

/* Final reference: a single ink and paper, including the open conversation.
   Keep this outside the login-page rules and leave native thread data intact. */
:root {
  color-scheme: light;
  --font: Inter, "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --chat-bg: #fcfbf8;
  --chat-paper: #fcfbf8;
  --chat-rail: #fcfbf8;
  --chat-soft: #fcfbf8;
  --chat-hover: #fcfbf8;
  --chat-ink: #292d28;
  --chat-muted: #292d28;
  --chat-faint: #292d28;
  --chat-line: color-mix(in srgb, var(--chat-ink) 18%, transparent);
  --chat-strong: #292d28;
  --chat-action: #292d28;
  --chat-link: #292d28;
  --chat-focus: #292d28;
  --chat-accent-soft: #fcfbf8;
  --chat-danger: #292d28;
  --shadow: none;
  --on-accent: var(--chat-paper);
}
:root[data-mode="dark"] {
  color-scheme: dark;
  --chat-bg: #292d28;
  --chat-paper: #292d28;
  --chat-rail: #292d28;
  --chat-soft: #292d28;
  --chat-hover: #292d28;
  --chat-ink: #fcfbf8;
  --chat-muted: #fcfbf8;
  --chat-faint: #fcfbf8;
  --chat-line: color-mix(in srgb, var(--chat-ink) 18%, transparent);
  --chat-strong: #fcfbf8;
  --chat-action: #fcfbf8;
  --chat-link: #fcfbf8;
  --chat-focus: #fcfbf8;
  --chat-accent-soft: #292d28;
  --chat-danger: #fcfbf8;
}
body { font-family: var(--font); }
.desk { --chat-font: var(--font); --workflow-width: 336px; }
.desk .workflows { width: 336px; }
.desk .brand-row { margin-bottom: 35px; }
.desk .history-item { border: 1px solid transparent; }
.desk .history-item.active { border-color: var(--chat-line); background: var(--chat-paper); }
.desk .rail-footer, .desk .rail-footer:has(>button[hidden]) { border-top: 1px solid var(--chat-line); }
.desk *, .desk *::before, .desk *::after,
.overlay-dialog, .overlay-dialog * { box-shadow: none !important; text-shadow: none !important; }
.desk input::placeholder, .desk textarea::placeholder { color: var(--chat-ink) !important; opacity: 1; }
.desk #message::placeholder { opacity: .5; }
.desk button:disabled { opacity: 1; }
.desk .brand { opacity: 1; filter: url(#lextracks-brand-light); mix-blend-mode: normal; }
:root[data-mode="dark"] .desk .brand { filter: url(#lextracks-brand-dark); mix-blend-mode: normal; }
.desk .brand-monogram { fill: var(--chat-ink); }
.desk .arrival-art img { opacity: 1; filter: url(#lextracks-brand-light); }
:root[data-mode="dark"] .desk .arrival-art img { filter: url(#lextracks-brand-dark); }
.desk .new-conversation { background: var(--chat-action); color: var(--chat-paper); border-color: var(--chat-action); border-radius: 6px; font-size: 13px; font-weight: 500; }
.desk .new-conversation:hover { background: var(--chat-ink); color: var(--chat-paper); }
.desk .workspace-header { border-bottom: 1px solid var(--chat-line); box-shadow: none; }
.desk .header-workflows { height: 34px; min-height: 34px; padding: 7px 10px; border-radius: 5px; background: transparent; font-size: 12px; }
.desk .header-workflows[aria-expanded="true"] { background: var(--chat-soft); }
.desk #send, .desk #send:disabled { background: var(--chat-action); color: var(--chat-paper); border-color: var(--chat-action); }
.desk .composer-footnote { color: var(--chat-ink); }
.desk .welcome h1 { white-space: nowrap; }
.desk .composer textarea { max-height: min(60dvh, 620px); overflow-y: auto; }
.desk .composer textarea:focus { outline: none; }
.desk .composer:focus-within { outline: none; border-width: 2px; }
.desk .answer-card { border: 1px solid var(--chat-line); }
.desk .answer-card::before, .desk .answer-card::after { background: var(--chat-line); }
.desk .brief-text { letter-spacing: -.1px; }
.desk:has(#thread:not([hidden])) .composer { border-color: var(--chat-ink); }
@media (min-width: 640px) and (max-width: 1199px) {
  .desk { --workflow-width: 318px; grid-template-columns: 72px minmax(0, 1fr) var(--workflow-width); }
  .desk.workflows-hidden { grid-template-columns: 72px minmax(0, 1fr); }
  .desk > .workflows { display: flex; width: 318px; }
  .desk > .rail .office-identity { display: none; }
  .desk > .rail .brand-row { margin-bottom: 34px; }
  .desk .header-workflows { background: var(--chat-paper); }
}
@media (min-width: 960px) and (max-width: 1099px) {
  .desk .arrival-copy { max-width: 400px; }
}
@media (min-width: 640px) and (max-width: 959px) {
  .desk, .desk.workflows-hidden { --workflow-width: 0px; grid-template-columns: 72px minmax(0, 1fr); }
  .desk > .workflows { display: none; }
}
@media (min-width: 640px) and (max-width: 760px) {
  .desk .header-workflows { width: 44px; min-width: 44px; padding: 7px; }
  .desk .header-workflows .button-label { display: none; }
}
@media (max-width: 639px) {
  .desk .header-workflows { width: auto; height: 44px; min-height: 44px; padding: 7px 9px; border: 1px solid var(--chat-line); border-radius: 5px; font-size: 13px; }
  .desk .welcome h1 { font-size: clamp(25px, 8vw, 31px); }
}

/* Match the reference reading column: symmetric thin scrollbar gutter on desktop/tablet. */
@media (min-width: 640px) { .desk .workspace-body { scrollbar-gutter: stable both-edges; scrollbar-width: thin; } }
