:root {
  font:
    15px/1.6 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #252725;
  background: #fafaf9;
  font-synthesis: none;
  --muted: #777a74;
  --line: #e6e7e2;
  --accent: #3d5947;
  --sidebar: #f1f2ee;
  --surface: #fff;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
  background: none;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
button,
input,
textarea,
a {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
input,
textarea,
select {
  outline-offset: 4px;
}
:focus-visible {
  outline: 2px solid #567560;
}
button {
  transition:
    background 0.16s,
    color 0.16s,
    box-shadow 0.16s;
}
button:hover:not(:disabled) {
  background: #e6e8e1;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 7px;
  border-radius: 8px;
  color: #73766f;
  flex-shrink: 0;
}
.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #303a30;
  color: white;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 500;
}
.primary:hover:not(:disabled) {
  background: #435142;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #394638;
  color: white;
}
.brand-mark svg {
  width: 23px;
  height: 23px;
}
small {
  color: var(--muted);
  font-size: 12px;
}
input,
textarea,
select {
  color: inherit;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  max-width: 100%;
}
input::placeholder,
textarea::placeholder {
  color: #92958d;
}
.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;
}
#login {
  max-width: 400px;
  margin: 15vh auto;
  padding: 28px;
}
#login > .brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 13px;
}
#login h1 {
  font-size: 30px;
  letter-spacing: -1px;
  font-weight: 550;
  margin: 25px 0 10px;
}
#login p {
  color: var(--muted);
  margin-bottom: 30px;
}
#sign-in label {
  display: block;
  font-size: 13px;
  margin-bottom: 7px;
  font-weight: 500;
}
#sign-in input {
  width: 100%;
}
#sign-in button {
  width: 100%;
  margin-top: 14px;
  justify-content: space-between;
}
#login > small {
  display: block;
  margin-top: 25px;
  text-align: center;
}
#workspace {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  overflow: hidden;
}
#sidebar {
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  padding: 26px 16px 12px;
  border-right: 1px solid var(--line);
  min-height: 0;
  gap: 12px;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 20px;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.9px;
}
.brand-caption {
  display: block;
  font-size: 8px;
  letter-spacing: 1.7px;
  font-weight: 500;
  color: #85897f;
  line-height: 1.5;
}
#sidebar-close {
  margin-left: auto;
}
.project-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dfe2d9;
  background: #f8f9f5;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
}
.project-avatar,
.account-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #d8ddcf;
  background: #e7ebdf;
  color: #647355;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}
.project-card strong,
.account-row strong {
  display: block;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.4;
}
.project-card small,
.account-row small {
  display: block;
  font-size: 11px;
}
#new {
  font-size: 13px;
  min-height: 42px;
}
#new svg {
  width: 17px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 8px;
}
.search-box:focus-within {
  background: #fff;
  box-shadow: 0 0 0 1px #d8ddd1;
}
.search-box svg {
  width: 16px;
  color: #898d82;
}
.search-box input {
  padding: 6px 0;
  background: none;
  border: 0;
  border-radius: 0;
  outline: 0;
  min-width: 0;
  width: 100%;
  font-size: 12px;
}
.nav-heading {
  font-size: 9px;
  font-weight: 600;
  color: #85897e;
  letter-spacing: 1.4px;
  padding: 12px 12px 0;
}
#conversations {
  overflow-y: auto;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
#conversations button {
  display: block;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  width: 100%;
  min-height: 38px;
  border-radius: 8px;
  padding: 9px 12px;
  flex-shrink: 0;
  font-size: 12px;
  color: #656a5e;
}
#conversations button[aria-current="true"] {
  color: #303a2c;
  background: #e1e5d9;
  font-weight: 550;
}
.nav-empty {
  padding: 0 12px;
  font-size: 12px;
  color: var(--muted);
}
.sidebar-footer {
  border-top: 1px solid #dfe2d9;
  padding-top: 12px;
}
.sidebar-footer > button {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  text-align: left;
}
.sidebar-footer > button svg {
  width: 17px;
}
.account-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 15px;
  padding: 10px 5px 0;
}
.account-avatar {
  background: #e0e2db;
  border: 0;
  color: #676c60;
  border-radius: 50%;
  width: 29px;
  height: 29px;
  font-size: 11px;
}
.account-row .icon-button {
  margin-left: auto;
}
.account-row strong {
  font-size: 11px;
}
.account-row small {
  font-size: 10px;
}
main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
.topbar {
  height: 76px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 36px;
}
.heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.project-label {
  color: #85887f;
  font-size: 12px;
  white-space: nowrap;
}
.project-label span {
  margin-left: 12px;
  color: #c6c9bf;
}
#title {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  margin: 0;
  max-width: 600px;
}
.private-badge {
  margin-left: auto;
  color: #84897b;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 9px;
  white-space: nowrap;
  font-size: 10px;
}
#sidebar-toggle {
  display: none;
}
#chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
}
.conversation-content {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}
#welcome {
  width: 100%;
  max-width: 760px;
  margin: auto;
  padding: 45px 0 65px;
}
.welcome-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  font-weight: 550;
  letter-spacing: 1.9px;
  color: #78846c;
}
.accent-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #81936c;
  flex-shrink: 0;
}
#welcome h1 {
  font-size: clamp(30px, 3.7vw, 46px);
  line-height: 1.15;
  letter-spacing: -1.9px;
  font-weight: 500;
  margin: 19px 0 15px;
}
#welcome > p {
  font-size: 14px;
  color: #83857e;
  line-height: 1.85;
}
.suggestions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 36px;
}
.suggestions button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 17px 19px;
  min-height: 156px;
}
.suggestions button:hover {
  background: #f5f7f0;
  border-color: #cdd5c4;
  box-shadow: 0 3px 12px #34462708;
}
.suggestions svg {
  color: #728364;
  margin-bottom: 17px;
  width: 21px;
  height: 21px;
}
.suggestions strong {
  font-size: 12px;
  font-weight: 550;
  margin-bottom: 5px;
}
.suggestions button > span:not(.suggestion-arrow) {
  font-size: 11px;
  color: #84887d;
  max-width: 160px;
  line-height: 1.65;
}
.suggestion-arrow {
  position: absolute;
  right: 16px;
  top: 18px;
  color: #adb2a3;
  font-size: 16px;
}
#welcome .welcome-note {
  font-size: 11px;
  margin-top: 19px;
  color: #95988f;
}
#messages {
  padding: 24px 0 20px;
}
.message {
  margin: 0 0 30px;
  overflow-wrap: anywhere;
  min-width: 0;
  font-size: 14px;
  line-height: 1.85;
}
.message.user {
  margin-left: auto;
  max-width: 85%;
  width: fit-content;
  background: #eeefe9;
  border-radius: 18px 18px 4px 18px;
  padding: 13px 19px;
}
.message.user > .message-author {
  display: none;
}
.message-author {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #3c4536;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
}
.message-author:before {
  content: "F";
  display: grid;
  place-items: center;
  background: #e8ecdf;
  color: #647655;
  border-radius: 7px;
  width: 26px;
  height: 26px;
  font-size: 13px;
}
.message-body p {
  margin: 0 0 14px;
}
.message-body > :last-child {
  margin-bottom: 0;
}
.message-body ul,
.message-body ol {
  padding-left: 24px;
  margin: 12px 0 18px;
}
.message-body li {
  padding-left: 3px;
  margin: 5px 0;
}
.message-body h3,
.message-body h4 {
  font-size: 16px;
  line-height: 1.4;
  margin: 24px 0 10px;
  font-weight: 600;
}
.message-body pre {
  padding: 14px;
  background: #f0f1ec;
  border-radius: 9px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 12px;
}
.message-body a {
  color: #4b7053;
  text-underline-offset: 3px;
}
.message-body code {
  font-size: 0.9em;
  background: #eef0e9;
  padding: 2px 4px;
  border-radius: 4px;
}
.feedback {
  display: flex;
  gap: 4px;
  margin-top: 15px;
}
.feedback button {
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  color: #888c81;
}
.feedback-form,
.message form,
#vision-status form {
  padding: 15px;
  margin: 15px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  white-space: normal;
}
.feedback-form label,
#vision-status label {
  width: 100%;
  font-size: 12px;
}
.feedback-form textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
}
.message form button,
#vision-status form button {
  border: 1px solid var(--line);
  padding: 7px 12px;
  border-radius: 8px;
  background: white;
  font-size: 12px;
}
.message form input {
  flex: 1;
  min-width: 120px;
  font-size: 14px;
}
#vision-status:not(:empty) {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f2f4ed;
  margin-top: 18px;
  font-size: 12px;
  color: #69725f;
}
#vision-status p {
  margin: 3px 0;
}
#vision-status input {
  display: block;
  width: 100%;
  margin-top: 8px;
}
#vision-status select {
  width: 100%;
}
.composer-region {
  width: 100%;
  max-width: 824px;
  margin: 0 auto;
  padding: 0 32px max(17px, env(safe-area-inset-bottom));
  position: relative;
  flex-shrink: 0;
}
.work-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  padding: 0 3px 6px;
}
#status {
  font-size: 11px;
  color: #85897c;
  margin: 0;
}
#status[data-working="true"] {
  color: #526843;
}
#status[data-working="true"]:before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7c9369;
  margin-right: 8px;
  animation: pulse 1.4s ease-in-out infinite;
}
#cancel {
  font-size: 11px;
  border: 1px solid #dce1d3;
  border-radius: 6px;
  padding: 3px 9px;
}
#compose {
  background: #fff;
  border: 1px solid #dddfd7;
  border-radius: 17px;
  padding: 16px 16px 10px;
  box-shadow: 0 4px 18px #303b2705;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
#compose:focus-within {
  border-color: #a8b69a;
  box-shadow: 0 0 0 3px #b7c4a519;
}
#question {
  display: block;
  width: 100%;
  border: 0;
  outline: 0;
  resize: none;
  padding: 0 2px;
  min-height: 30px;
  max-height: 160px;
  line-height: 1.65;
  border-radius: 0;
  font-size: 14px;
}
.composer-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 13px;
}
.composer-context {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #7e8870;
  background: #f5f6f1;
  padding: 4px 8px;
  border-radius: 5px;
}
.composer-context .accent-dot {
  width: 4px;
  height: 4px;
}
.keyboard-hint {
  font-size: 9px;
  color: #a0a398;
  margin-left: auto;
}
.keyboard-hint span {
  margin: 0 4px;
}
#send {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #3d4b34;
  color: white;
  padding: 6px;
  display: grid;
  place-items: center;
  margin-left: auto;
}
#send:hover:not(:disabled) {
  background: #526345;
}
#send:disabled {
  background: #e3e7dc;
  color: #8d9981;
  opacity: 1;
}
#send svg {
  width: 19px;
}
.composer-note {
  display: flex;
  justify-content: center;
  gap: 5px;
  align-items: center;
  color: #95998d;
  font-size: 9px;
  margin: 11px 0 0;
}
.composer-note button {
  padding: 0 3px;
  font-size: 9px;
  text-decoration: underline;
  text-underline-offset: 2px;
  border-radius: 3px;
}
#usage-details {
  font-size: 11px;
  color: var(--muted);
  padding: 8px 4px 0;
  text-align: center;
}
#jump-latest {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 2px 8px #00000009;
  font-size: 11px;
  padding: 6px 13px;
  white-space: nowrap;
}
#sources {
  position: fixed;
  right: 16px;
  top: 16px;
  bottom: 16px;
  width: min(480px, calc(100% - 32px));
  padding: 27px;
  background: #fafbf8;
  z-index: 30;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 20px 100px #1a261926;
  overflow: auto;
}
.sources-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #88917e;
}
.sources-header h2 {
  font-size: 21px;
  letter-spacing: -0.6px;
  font-weight: 550;
  margin: 7px 0;
}
.sources-description {
  font-size: 12px;
  color: var(--muted);
  margin: 9px 0 30px;
}
#sources h3 {
  font-size: 13px;
  font-weight: 600;
  margin-top: 25px;
}
#sources ul {
  padding: 0;
  list-style: none;
}
#sources li {
  border: 1px solid var(--line);
  background: white;
  padding: 13px 15px;
  border-radius: 10px;
  margin: 8px 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
#sources a {
  color: var(--accent);
}
.sources-empty {
  font-size: 12px;
  color: var(--muted);
}
#sources-backdrop,
#sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: #22291e35;
  z-index: 25;
  cursor: default;
  backdrop-filter: blur(2px);
}
#error {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100% - 32px);
  width: max-content;
  border: 1px solid #e8cfc8;
  background: #fff6f2;
  color: #8d4234;
  padding: 8px 10px 8px 16px;
  border-radius: 12px;
  box-shadow: 0 5px 25px #0000000a;
  z-index: 50;
  font-size: 13px;
}
#error .icon-button {
  color: inherit;
}
.sidebar-collapsed#workspace {
  grid-template-columns: minmax(0, 1fr);
}
.sidebar-collapsed #sidebar {
  display: none;
}
.sidebar-collapsed #sidebar-toggle {
  display: inline-flex;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (min-width: 1500px) {
  #welcome {
    max-width: 800px;
  }
  .suggestions button {
    min-height: 167px;
  }
  .topbar {
    padding: 0 42px;
  }
}
@media (max-width: 1000px) {
  #workspace {
    grid-template-columns: 230px minmax(0, 1fr);
  }
  .topbar {
    padding: 0 24px;
  }
  .private-badge {
    display: none;
  }
  .suggestions {
    gap: 8px;
  }
  .suggestions button {
    padding: 17px 13px;
  }
  .keyboard-hint {
    display: none;
  }
  #chat-scroll {
    padding: 0 24px;
  }
  .composer-region {
    padding-left: 24px;
    padding-right: 24px;
  }
}
@media (max-width: 900px) {
  #workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  #sidebar,
  #workspace.sidebar-collapsed #sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(290px, 85vw);
    z-index: 20;
    display: none;
    padding-top: 20px;
  }
  #workspace.sidebar-open #sidebar {
    display: flex;
  }
  #sidebar-backdrop {
    z-index: 19;
  }
  #sidebar-toggle {
    display: inline-flex;
  }
  .topbar {
    height: 62px;
    padding: 0 14px;
    gap: 10px;
  }
  .heading {
    gap: 7px;
  }
  .project-label {
    font-size: 11px;
  }
  .project-label span {
    margin-left: 7px;
  }
  #title {
    font-size: 11px;
  }
  #chat-scroll {
    padding: 0 20px;
  }
  #welcome {
    padding: 28px 0 30px;
  }
  #welcome h1 {
    font-size: 33px;
    letter-spacing: -1.2px;
    margin-top: 15px;
  }
  #welcome > p {
    font-size: 13px;
  }
  .welcome-eyebrow {
    font-size: 9px;
    letter-spacing: 1.4px;
  }
  .desktop-break {
    display: none;
  }
  .suggestions {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 25px;
  }
  .suggestions button {
    min-height: 74px;
    padding: 13px 35px 13px 49px;
    justify-content: center;
  }
  .suggestions svg {
    position: absolute;
    left: 15px;
    top: 24px;
    margin: 0;
    width: 19px;
  }
  .suggestions strong {
    margin-bottom: 2px;
  }
  .suggestions button > span:not(.suggestion-arrow) {
    max-width: none;
    font-size: 11px;
  }
  .suggestion-arrow {
    top: 24px;
    right: 15px;
  }
  #welcome .welcome-note {
    font-size: 10px;
    margin-bottom: 0;
  }
  .composer-region {
    padding-left: 14px;
    padding-right: 14px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  #compose {
    padding: 13px 13px 9px;
    border-radius: 15px;
  }
  #question {
    font-size: 16px;
    min-height: 28px;
  }
  .composer-toolbar {
    margin-top: 9px;
  }
  .composer-note {
    font-size: 8px;
    gap: 2px;
  }
  .composer-note button {
    font-size: 8px;
  }
  .message {
    font-size: 14px;
  }
  .message.user {
    max-width: 92%;
    padding: 11px 15px;
  }
  #messages {
    padding-top: 15px;
  }
  .work-status {
    min-height: 25px;
  }
  #sources {
    padding: 20px;
  }
  .icon-button {
    width: 40px;
    height: 40px;
  }
  #send {
    width: 36px;
    height: 36px;
  }
  .sidebar-footer > button {
    min-height: 44px;
  }
  #conversations button {
    min-height: 44px;
  }
  .feedback button {
    min-height: 36px;
  }
  .account-row {
    padding-bottom: env(safe-area-inset-bottom);
  }
}
@media (max-height: 680px) and (min-width: 901px) {
  #welcome {
    padding: 20px 0;
  }
  #welcome h1 {
    font-size: 35px;
  }
  .suggestions {
    margin-top: 20px;
  }
  .suggestions button {
    min-height: 130px;
    padding: 15px;
  }
  .suggestions svg {
    margin-bottom: 12px;
  }
}

/* Keep secondary copy readable without competing with the conversation. */
#welcome > p,
.suggestions button > span:not(.suggestion-arrow),
#welcome .welcome-note {
  color: #6f7468;
}
.suggestions strong {
  font-size: 13px;
}
.suggestions button > span:not(.suggestion-arrow) {
  font-size: 12px;
}
#conversations button,
.sidebar-footer > button {
  font-size: 13px;
}
.search-box input {
  font-size: 13px;
}
.message {
  font-size: 15px;
}
#title,
.project-label {
  font-size: 13px;
}
.composer-note,
.composer-note button {
  font-size: 10px;
  color: #74796d;
}
.composer-context {
  font-size: 11px;
  color: #66715a;
}
.keyboard-hint {
  color: #777d70;
  font-size: 10px;
}
#status,
.feedback button {
  color: #707766;
}
.welcome-eyebrow,
.nav-heading {
  color: #6a745d;
}
@media (max-width: 900px) {
  .composer-note,
  .composer-note button {
    font-size: 9px;
  }
  #title,
  .project-label {
    font-size: 12px;
  }
  .message {
    font-size: 15px;
  }
}

/* File-first workspace. The document is the main canvas; chat is an accessory. */
:root {
  color: #292c28;
  background: #f7f8f6;
  --sidebar: #f5f6f3;
  --muted: #747a70;
  --line: #e3e6df;
}
#workspace {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 340px;
}
#workspace.sidebar-collapsed {
  grid-template-columns: minmax(0, 1fr) 340px;
}
#workspace.assistant-hidden {
  grid-template-columns: 210px minmax(0, 1fr);
}
#workspace.sidebar-collapsed.assistant-hidden {
  grid-template-columns: minmax(0, 1fr);
}
#sidebar {
  grid-column: 1;
  grid-row: 1;
  padding: 14px 10px 10px;
  gap: 10px;
}
.sidebar-brand {
  padding: 4px 7px 6px;
  gap: 8px;
  font-size: 20px;
  letter-spacing: -0.7px;
}
.sidebar-brand .brand-mark {
  height: 27px;
  width: 27px;
  border-radius: 7px;
}
.brand-caption {
  display: none;
}
#sidebar-close {
  width: 28px;
  height: 28px;
}
.project-card {
  padding: 9px;
  margin: 3px 2px;
  background: transparent;
  border: 0;
}
.project-avatar {
  width: 27px;
  height: 27px;
  border-radius: 6px;
}
.project-card small {
  font-size: 10px;
}
.explorer-switch {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin: 0 3px 1px;
}
.explorer-switch button {
  flex: 1;
  padding: 7px;
  font-size: 12px;
  color: #7b8175;
  border-bottom: 2px solid transparent;
}
.explorer-switch button[aria-pressed="true"] {
  color: #394831;
  border-bottom-color: #7d916a;
}
#file-explorer,
#chat-explorer {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.search-box {
  margin: 0 3px;
  padding: 0 8px;
  min-height: 32px;
}
.search-box input {
  font-size: 11px;
}
#project-files {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 0 18px;
  scrollbar-width: thin;
}
.file-group {
  margin-bottom: 8px;
}
.file-group summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 550;
  padding: 8px 7px;
  color: #58624e;
}
.group-count {
  float: right;
  font-size: 10px;
  color: #8a9083;
  font-weight: 400;
}
.explorer-file {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  text-align: left;
  padding: 7px 8px 7px 19px;
  border-radius: 5px;
  font-size: 11px;
}
.explorer-filename {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.explorer-file-icon {
  color: #858e7b;
  font-size: 15px;
  line-height: 1;
  flex: 0 0 15px;
}
.explorer-file[aria-current="true"] {
  background: #e5eadf;
  color: #33452a;
}
.file-subheading {
  font-size: 8px;
  letter-spacing: 1px;
  color: #858d7d;
  padding: 12px 20px 5px;
}
.explorer-note {
  font-size: 11px;
  color: #717968;
  padding: 10px;
}
.explorer-retry {
  font-size: 11px;
  padding: 5px 10px;
  text-decoration: underline;
}
#chat-explorer #new {
  margin: 5px 3px;
  padding: 9px 8px;
  font-size: 11px;
}
#conversations {
  flex: 1;
}
#conversations button {
  font-size: 11px;
}
.sidebar-footer {
  padding-top: 7px;
}
.sidebar-footer > button {
  display: none;
}
.account-row {
  margin: 0;
  padding: 7px 3px 0;
}
.account-row strong {
  font-size: 10px;
}
.account-row small {
  font-size: 9px;
}
#evidence-workspace {
  position: relative;
  grid-row: 1;
  grid-column: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #eef0eb;
}
#workspace.sidebar-collapsed #evidence-workspace {
  grid-column: 1;
}
.editor-header {
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  background: #f6f7f4;
  border-bottom: 1px solid var(--line);
}
/* Reference controls float over the viewer; opening them never resizes it. */
.answer-review {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: 43px;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 5px;
  border: 1px solid #ccd5c4;
  border-radius: 12px;
  background: #fbfcf9;
  box-shadow:
    0 4px 16px #27381e20,
    0 1px 3px #27381e12;
}
/* Keep native video playback controls clear. */
#evidence-workspace:has(#source-viewer video) .answer-review {
  top: 100px;
  bottom: auto;
}
.review-heading {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}
.review-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 5px;
  border-radius: 6px;
  flex-shrink: 0;
}
.review-picker:hover {
  background: #eaf0e3;
}
.review-picker:has(select:focus-visible) {
  outline: 2px solid #71845a;
  outline-offset: 1px;
}
.review-count {
  color: #4f6043;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.review-picker-arrow {
  color: #7d8a72;
  font-size: 13px;
}
#review-position {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.review-step,
.review-close,
.review-focus {
  min-height: 32px;
  border-radius: 6px;
}
.review-step,
.review-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  padding: 0;
  color: #637453;
}
.review-step span {
  font-size: 22px;
  line-height: 1;
}
.review-step:hover,
.review-close:hover,
.review-focus:hover {
  background: #eaf0e3;
}
.review-close {
  margin-left: 2px;
  color: #7a8374;
  font-size: 18px;
}
.review-focus {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  width: 185px;
  min-width: 0;
  padding: 0 9px;
  border-left: 1px solid #dbe2d4;
  border-radius: 0 6px 6px 0;
  color: #4c5e42;
  text-align: left;
}
#review-source-title,
#review-summary {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#review-source-title {
  font-size: 11px;
  font-weight: 500;
}
#review-summary {
  color: #7b8771;
  font-size: 9px;
}
.review-away #review-summary {
  color: #3d5947;
}
.review-live-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.review-answer {
  margin: 12px 0 0;
  border: 1px solid #d9e2d3;
  border-radius: 6px;
  padding: 6px 10px;
  color: #3d5947;
  background: #f4f7ef;
  font-size: 11px;
}
.review-answer:hover {
  background: #eaf0e2;
}
.file-reference-count {
  display: inline-flex;
  min-width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  margin-left: 7px;
  border-radius: 4px;
  background: #e5eadc;
  color: #586b43;
  font-size: 9px;
}
.source-citation[aria-current="location"] {
  background: #e4edcc;
  box-shadow: 0 0 0 2px #b8ca97;
}
.pdfViewer .page.cited-page {
  outline: 2px solid #9bad80;
  outline-offset: -2px;
}
@media (max-width: 600px) {
  .answer-review {
    max-width: calc(100% - 16px);
    bottom: 36px;
  }
  .review-step,
  .review-close,
  .review-picker,
  .review-focus {
    min-height: 38px;
  }
  .review-focus {
    width: 150px;
    padding: 0 6px;
  }
}
#sidebar-toggle {
  display: inline-flex;
  align-self: center;
  margin: 0 5px;
  width: 29px;
  height: 29px;
}
#evidence-tabs {
  display: flex;
  flex: 1;
  min-width: 0;
  overflow: auto hidden;
  scrollbar-width: none;
}
.file-tab {
  display: flex;
  align-items: center;
  min-width: 110px;
  max-width: 245px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  position: relative;
}
.file-tab[data-active="true"] {
  background: #fff;
}
.file-tab[data-active="true"]:after {
  content: "";
  position: absolute;
  height: 2px;
  background: #70875a;
  bottom: 0;
  left: 0;
  right: 0;
}
.file-tab-select {
  text-align: left;
  padding: 12px 5px 12px 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  flex: 1;
  min-width: 0;
}
.file-tab-close {
  border-radius: 4px;
  width: 23px;
  height: 25px;
  font-size: 16px;
  color: #8c9187;
  margin-right: 6px;
  flex-shrink: 0;
}
.file-tab:not([data-active="true"]) .file-tab-close {
  opacity: 0;
}
.file-tab:hover .file-tab-close,
.file-tab:focus-within .file-tab-close {
  opacity: 1;
}
.assistant-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 12px;
  font-size: 11px;
  color: #657656;
  border-left: 1px solid var(--line);
  flex-shrink: 0;
}
.assistant-toggle svg {
  height: 17px;
  width: 17px;
}
.assistant-toggle[aria-expanded="true"] span {
  display: none;
}
#source-viewer {
  flex: 1;
  position: relative;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.editor-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 25px;
  padding: 0 15px;
  font-size: 9px;
  color: #7c8374;
  background: #f7f8f5;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
.editor-status span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#document-revision {
  flex-shrink: 0;
  max-width: 45%;
}
.document-reader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}
.reader-toolbar {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 11;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 2px 5px;
  background: #fffffff5;
  border: 1px solid #dce1d7;
  border-radius: 8px;
  box-shadow: 0 2px 8px #27312014;
  flex-shrink: 0;
}
.workspace-history {
  display: flex;
  align-items: center;
  gap: 0;
  padding-right: 5px;
}
.workspace-history .icon-button {
  width: 25px;
  font-size: 24px;
  padding: 0;
}
.workspace-history button:disabled {
  opacity: 0.3;
  cursor: default;
}
.reader-more {
  position: relative;
  margin-left: auto;
}
.reader-more summary {
  list-style: none;
  font-size: 20px;
  cursor: pointer;
}
.reader-more summary::-webkit-details-marker {
  display: none;
}
.reader-more-menu {
  position: absolute;
  right: 0;
  top: 34px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  padding: 12px;
  width: 275px;
  max-width: calc(100vw - 40px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  box-shadow: 0 4px 14px #28331e18;
}
.reader-more-menu a {
  white-space: nowrap;
}
.reader-zoom-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.reader-shortcuts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  padding-top: 10px;
  margin: 0;
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}
.reader-shortcuts dd { margin: 0; }
.reader-shortcuts dt { font-weight: 600; }
.document-reader:has(.reader-find:not([hidden])) .reader-toolbar {
  top: 52px;
}
.document-reader .document-rail {
  /* Keep the compact controls above the rail modes without moving the dock. */
  padding-top: 44px;
}
.reader-more-menu .reader-button { justify-content: flex-start; }
.reader-zoom-controls .reader-button { justify-content: center; }
.reader-more-menu .reader-button[aria-pressed="true"] {
  background: #e7ecdf;
  color: #375632;
}
.reader-more .pan-active {
  color: #375632;
  background: #e7ecdf;
}
.recording-information {
  max-width: 580px;
  align-self: center;
}
.reader-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  border-radius: 5px;
  font-size: 16px;
  color: #626b59;
  text-decoration: none;
  padding: 2px 6px;
}
.reader-button:hover {
  background: #eff2eb;
}
.reader-toolbar > .reader-button:first-child {
  margin-right: auto;
}
.reader-toolbar > a:last-child {
  margin-left: auto;
}
.reader-page {
  width: 50px;
  padding: 4px;
  text-align: center;
  border: 1px solid #e4e7df;
  border-radius: 5px;
  font-size: 11px;
  appearance: textfield;
  -moz-appearance: textfield;
}
.reader-page::-webkit-inner-spin-button {
  -webkit-appearance: none;
}
.reader-total {
  font-size: 11px;
  color: #818875;
  min-width: 28px;
}
.toolbar-divider {
  height: 15px;
  width: 1px;
  background: #e5e8df;
  margin: 0 5px;
}
.reader-zoom {
  border: 0;
  padding: 4px;
  border-radius: 5px;
  font-size: 11px;
  width: 88px;
  color: #65715a;
  background: #fff;
}
.citation-return {
  font-size: 10px;
  gap: 3px;
}
.reader-body {
  flex: 1;
  min-height: 0;
  display: flex;
  position: relative;
}
.reader-canvas {
  position: relative;
  flex: 1;
  min-width: 0;
}
.pdf-scroller {
  position: absolute;
  inset: 0;
  overflow: auto;
  overscroll-behavior: contain;
  /* The reader restores its own sheet anchor after a scale change. */
  overflow-anchor: none;
  background: #e8ebe5;
}
.pdfViewer {
  padding: 24px 0 12px;
}
.pdfViewer .page {
  margin-bottom: 18px;
  border: 0;
  box-shadow: 0 2px 9px #2731201a;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.pdfViewer.zoom-preview {
  will-change: transform;
  pointer-events: none;
}
.reader-page-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.reader-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #eef0eb;
  color: #69735e;
  font-size: 13px;
  text-align: center;
  z-index: 10;
}
.reader-loading p {
  max-width: 300px;
  font-size: 12px;
}
.reader-opening-preview {
  width: 100%;
  min-height: 0;
  flex: 1;
  object-fit: contain;
  pointer-events: none;
}
.document-rail {
  width: 185px;
  flex-shrink: 0;
  background: #f5f6f2;
  border-right: 1px solid #dce1d5;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.rail-modes {
  display: flex;
  padding: 9px 8px;
  gap: 4px;
  border-bottom: 1px solid #e3e7dc;
}
.rail-modes button {
  flex: 1;
  font-size: 11px;
}
.rail-modes button[aria-pressed="true"] {
  background: #e5eadd;
  color: #455738;
}
.rail-list {
  overflow: auto;
  flex: 1;
  padding: 9px;
  min-height: 0;
}
.rail-note {
  font-size: 11px;
  color: #79816e;
  padding: 6px;
}
.outline-link {
  display: block;
  text-align: left;
  font-size: 11px;
  padding: 7px;
  line-height: 1.4;
  width: 100%;
  border-radius: 4px;
}
.outline-group {
  padding-left: 11px;
  font-size: 10px;
}
.outline-group summary {
  padding: 3px 5px;
  color: #818976;
  cursor: pointer;
}
.page-thumbnail {
  display: flex;
  align-items: center;
  flex-direction: column;
  width: 100%;
  padding: 10px 5px;
  border: 1px solid transparent;
  border-radius: 6px;
  margin-bottom: 5px;
}
.page-thumbnail[aria-current="page"] {
  border-color: #8fa378;
  background: #e9efdf;
}
.thumbnail-placeholder {
  display: grid;
  place-items: center;
  min-width: 126px;
  min-height: 154px;
  background: #fff;
  box-shadow: 0 1px 5px #3442271a;
  color: #a3aa9a;
  font-size: 18px;
}
.thumbnail-placeholder canvas,
.thumbnail-placeholder img {
  width: 126px;
  display: block;
}
.thumbnail-label {
  font-size: 10px;
  color: #707a63;
  padding-top: 7px;
}
.reader-find {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #f8faf5;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.reader-find input {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 5px;
}
.find-count {
  white-space: nowrap;
  font-size: 10px;
  color: #718064;
}
.citation-marks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}
.citation-highlight {
  position: absolute;
  border: 1px solid #bc8d14;
  background: #ffd3266b;
  border-radius: 2px;
  box-shadow: none;
}
.canvas-highlighted .citation-highlight {
  background: transparent;
}
.drawing-highlight {
  border: 2px solid #bd810b;
  background: #ffd32629;
  box-shadow: 0 0 0 2px #ffffff99;
}
.drawing-highlight::before {
  content: "Drawing area";
  position: absolute;
  left: -2px;
  top: -25px;
  padding: 2px 8px;
  border-radius: 4px 4px 0 0;
  background: #936600;
  color: white;
  font:
    11px/21px -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  white-space: nowrap;
}
.editor-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 25px;
  background: #f3f5ef;
}
.empty-document-icon {
  font-size: 42px;
  color: #a3ad96;
}
.editor-empty h2 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.7px;
  margin: 15px 0 0;
}
.editor-empty p {
  font-size: 12px;
  color: #7a846d;
  margin: 10px 0 22px;
}
.viewer-button {
  border: 1px solid #dce3d2;
  border-radius: 7px;
  padding: 7px 12px;
  font-size: 12px;
  color: #5f7050;
  background: #fff;
}
.media-editor {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}
.media-toolbar {
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  background: #fff;
  font-size: 11px;
  color: #69735f;
  flex-shrink: 0;
}
.media-canvas {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.media-canvas video,
.media-canvas img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #20251c;
  border-radius: 3px;
}
.media-error {
  font-size: 13px;
}
#main {
  grid-column: 3;
  grid-row: 1;
  border-left: 1px solid var(--line);
  background: #fcfdfb;
  min-width: 0;
}
#workspace.sidebar-collapsed #main {
  grid-column: 2;
}
#workspace.assistant-hidden #main {
  display: none;
}
.topbar {
  height: 44px;
  padding: 0 13px;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  background: #f9faf7;
}
.assistant-label {
  font-size: 12px;
  font-weight: 600;
  color: #46583b;
}
.assistant-subtitle {
  font-size: 10px;
  color: #87917c;
  margin-right: auto;
}
.topbar .icon-button {
  height: 27px;
  width: 27px;
  padding: 4px;
}
.conversation-heading {
  padding: 10px 17px;
  border-bottom: 1px solid #eef1e8;
}
#title {
  font-size: 10px;
  color: #7c876f;
}
#chat-scroll {
  padding: 0 19px;
  scrollbar-gutter: auto;
}
#welcome {
  padding: 25px 0;
}
.welcome-eyebrow {
  display: none;
}
#welcome h1 {
  font-size: 25px;
  letter-spacing: -0.8px;
  margin: 0 0 13px;
}
#welcome > p {
  font-size: 12px;
  line-height: 1.7;
  color: #7b8570;
}
.suggestions {
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 21px;
}
.suggestions button {
  min-height: 64px;
  padding: 12px 20px 12px 41px;
  border-radius: 8px;
}
.suggestions svg {
  position: absolute;
  left: 12px;
  top: 15px;
  width: 17px;
  height: 17px;
}
.suggestions strong {
  font-size: 11px;
}
.suggestions button > span:not(.suggestion-arrow) {
  max-width: none;
  font-size: 10px;
}
.suggestion-arrow {
  display: none;
}
#welcome .welcome-note {
  font-size: 10px;
}
.message {
  font-size: 12px;
  line-height: 1.85;
  margin-bottom: 22px;
}
.message.user {
  max-width: 95%;
  padding: 10px 12px;
  border-radius: 11px 11px 3px 11px;
}
.message-author {
  font-size: 11px;
}
.message-body h3 {
  font-size: 13px;
}
.message-body ul,
.message-body ol {
  padding-left: 18px;
}
.composer-region {
  padding: 0 13px 10px;
}
#question {
  font-size: 12px;
  padding: 12px;
}
#compose {
  border-radius: 12px;
}
.composer-toolbar {
  padding: 0 10px 8px;
}
.composer-context {
  font-size: 9px;
}
.keyboard-hint {
  display: none;
}
.composer-note {
  font-size: 9px;
  line-height: 1.5;
  gap: 7px;
}
.composer-note button {
  font-size: 9px;
}
#status {
  font-size: 10px;
}
.source-citation {
  display: inline-block;
  max-width: 100%;
  vertical-align: baseline;
  line-height: 1.6;
  border-radius: 4px;
  background: #edf2e6;
  color: #506544;
  text-decoration: none;
  font-size: 0.92em;
  padding: 1px 4px;
}
.source-citation:hover {
  background: #e0eacf;
  text-decoration: underline;
}
@media (min-width: 901px) and (max-width: 1150px) {
  #workspace {
    grid-template-columns: 185px minmax(0, 1fr) 300px;
  }
  #workspace.sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  #workspace.assistant-hidden {
    grid-template-columns: 185px minmax(0, 1fr);
  }
  #workspace.sidebar-collapsed.assistant-hidden {
    grid-template-columns: minmax(0, 1fr);
  }
  .toolbar-divider {
    margin-inline: 2px;
  }
  .reader-toolbar {
    gap: 2px;
    padding-inline: 6px;
  }
}
@media (max-width: 900px) {
  #workspace,
  #workspace.sidebar-collapsed,
  #workspace.assistant-hidden,
  #workspace.sidebar-collapsed.assistant-hidden {
    grid-template-columns: minmax(0, 1fr);
  }
  #evidence-workspace,
  #workspace.sidebar-collapsed #evidence-workspace {
    grid-column: 1;
  }
  #main,
  #workspace.sidebar-collapsed #main {
    display: none;
  }
  #workspace.assistant-mobile-open #main {
    display: flex;
    position: fixed;
    inset: 0 0 0 auto;
    width: min(390px, 100%);
    z-index: 18;
    box-shadow: -15px 0 45px #28331e1c;
  }
  #sidebar,
  #workspace.sidebar-collapsed #sidebar {
    z-index: 22;
    width: 245px;
  }
  #sidebar-backdrop {
    z-index: 21;
  }
  .editor-header {
    height: 48px;
  }
  .assistant-toggle {
    padding: 0 10px;
  }
  .assistant-toggle span {
    display: none;
  }
  .file-tab {
    max-width: 200px;
  }
  .file-tab-close {
    opacity: 1 !important;
  }
  .reader-toolbar {
    height: 48px;
    gap: 2px;
    padding: 0 6px;
  }
  .reader-button {
    min-height: 34px;
    min-width: 30px;
  }
  .reader-page {
    width: 43px;
  }
  .reader-total {
    font-size: 10px;
  }
  .reader-zoom {
    width: 79px;
  }
  .toolbar-divider {
    margin-inline: 2px;
  }
  .citation-return {
    font-size: 0;
    min-width: 20px;
  }
  .citation-return::before {
    content: "↩";
    font-size: 16px;
  }
  .editor-status {
    padding-inline: 10px;
    font-size: 8px;
  }
  #document-revision {
    display: none;
  }
  .document-rail {
    width: 165px;
  }
  .media-canvas {
    padding: 12px;
  }
  .pdfViewer {
    padding-top: 12px;
  }
  #chat-scroll {
    padding: 0 19px;
  }
  .message {
    font-size: 13px;
  }
  .topbar {
    height: 48px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .citation-highlight {
    transition: none;
  }
}
#composer-document {
  max-width: calc(100% - 42px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  padding: 3px 5px;
  border-radius: 4px;
}
#composer-document[aria-pressed="true"] {
  color: #60774b;
  background: #eff4e8;
}
.message-file-context {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  padding: 4px 0 0;
  color: #738365;
}
.reader-button svg {
  width: 15px;
  height: 15px;
}
.outline-group {
  padding-left: 5px;
}
.outline-group summary {
  font-size: 11px;
  color: #59684c;
  padding: 8px 4px;
}

.callout-highlight {
  outline: 3px solid #a96b00;
  outline-offset: 4px;
  box-shadow: 0 0 0 7px #fff9;
}

.pdf-scroller.pan-enabled,
.pdf-scroller.pan-enabled .textLayer,
.pdf-scroller.pan-enabled a {
  cursor: grab;
}
.pdf-scroller.is-panning,
.pdf-scroller.is-panning * {
  cursor: grabbing !important;
  user-select: none !important;
}
.reader-button[aria-pressed="true"] {
  background: #e3e8d9;
  color: #344728;
}

/* Keep the dock compact at every viewport and bounded by its own reader. */
.document-reader .reader-toolbar {
  height: 34px;
  max-width: calc(100% - 20px);
}

.message-attachment { display: block; margin-top: 0.6rem; overflow-wrap: anywhere; }

.rfi-card {display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:14px;border:1px solid var(--line,#ddd);border-radius:8px;margin-top:10px}
.rfi-card strong {flex:1;min-width:180px}.rfi-card .message-attachment {margin:0}

.rfi-editor {position:absolute;inset:0;display:flex;flex-direction:column;min-width:0;background:#e9ece7;color:#18251e}
.rfi-tools {display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 12px;background:#fff;border-bottom:1px solid #ccd4c8;z-index:2;flex-shrink:0}
.rfi-tools button {padding:8px 12px;border:1px solid #bfc8b8;border-radius:5px;background:#fff;color:#22361f;font-size:12px;font-weight:600;white-space:nowrap}
.rfi-tools .rfi-save {background:#45633a;border-color:#45633a;color:#fff;min-width:72px}
.rfi-tools button:disabled {opacity:.55;cursor:default}.rfi-tools button:focus-visible {outline:3px solid #69a8df;outline-offset:2px}
.rfi-save-status {font-size:12px;flex:1;min-width:120px;overflow-wrap:anywhere}.rfi-editor[data-state="error"] .rfi-save-status {color:#a22d20}
.rfi-zoom {display:flex;align-items:center;gap:5px}.rfi-zoom button {padding:6px 9px}.rfi-zoom-label {min-width:36px;font-size:11px;text-align:center}
.rfi-scroll {flex:1;min-height:0;overflow:auto;padding:16px;scroll-padding:16px}.rfi-stage {margin:0 auto 20px;position:relative}
.rfi-paper {position:absolute;left:0;top:0;transform-origin:top left;width:612px;background:#fff;color:#111;font-family:Arial,sans-serif;font-size:9px;box-shadow:0 2px 12px #0002}
.rfi-form-head {height:368px;position:relative;overflow:hidden}.rfi-template {position:absolute;left:0;top:0;width:612px;height:792px;pointer-events:none;user-select:none}
.rfi-inline-field {display:block;box-sizing:border-box;margin:0;padding:0 1px;border:0;border-radius:1px;min-width:0;background:transparent;color:#111;font:9px/12px Arial,sans-serif;outline:1px solid transparent;outline-offset:0;resize:none;overflow:hidden;width:100%}
.rfi-inline-field:hover {outline-color:#bed2e2;background:#f2f8ff99}.rfi-inline-field:focus {border-color:#3f84bd;outline:1px solid #3f84bd;background:#eef6ff;overflow:auto}
.rfi-inline-field::placeholder {color:#9aa3a9;font-style:italic}.rfi-inline-field[aria-invalid="true"] {outline-color:#bf392b;background:#fff0ee}
.rfi-admin-field {position:absolute;padding:0;resize:none}.rfi-inline-field:disabled {opacity:1;color:#111}
.rfi-form-body {padding:0 54px 0}.rfi-request-fields {min-height:84px}.rfi-form-line {position:relative;margin-bottom:12px}.rfi-form-line:last-child {margin-bottom:0}
.rfi-reference-label {position:absolute;left:0;top:0;font:9px/12px Arial,sans-serif;pointer-events:none}.rfi-form-line[data-field="references"] textarea {padding-left:46px}
.rfi-form-body h2 {font:bold 12px/16px Arial,sans-serif;color:#345c8b;margin:12px 0 8px}.rfi-response-blank {min-height:150px}
.rfi-form-foot {height:100px;position:relative;overflow:hidden;min-height:100px}.rfi-form-foot img {position:absolute;width:612px;height:792px;left:0;bottom:0;pointer-events:none}
.rfi-form-page-mask {position:absolute;left:506px;top:48px;width:55px;height:20px;background:white}
.rfi-additional-pages {max-width:816px;margin:0 auto}.rfi-extra-label {font-size:12px;color:#55624d}.rfi-additional-pages canvas {display:block;max-width:100%;height:auto;margin:0 auto 16px;background:#fff;box-shadow:0 2px 12px #0002}
.rfi-notice {padding:8px 12px;background:#fff1d8;flex-shrink:0;font-size:12px}.rfi-notice button {margin-left:12px;text-decoration:underline}.rfi-notice[hidden] {display:none}
.rfi-conflict-dialog {max-width:650px;width:90%;max-height:80vh;overflow:auto;border:1px solid #b9c6b3;border-radius:8px;padding:20px;background:#fff;color:#18251e}.rfi-conflict-dialog::backdrop {background:#0005}.rfi-conflict-dialog h2 {margin-top:0}.rfi-conflict-dialog section {padding:12px 0;border-bottom:1px solid #ddd}.rfi-conflict-dialog p {white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}.rfi-conflict-dialog button,.rfi-conflict-dialog select {padding:8px;margin:8px 8px 0 0;border:1px solid #b9c6b3;border-radius:4px}
@media(max-width:600px){.rfi-tools {gap:6px;padding:8px}.rfi-tools .rfi-save-status {order:3;flex-basis:100%;min-width:0}.rfi-zoom {margin-left:auto}.rfi-zoom button {padding:6px}.rfi-scroll {padding:10px}}

/* Quiet PDF dock: page navigation, chat context, and view settings. */
.document-reader .reader-toolbar{height:40px;gap:4px;padding:4px 6px;border-radius:12px;border-color:#dce0d9;background:#ffffffed;box-shadow:0 2px 10px #24301e0d}
.reader-toolbar .reader-button{min-height:30px;min-width:28px;border-radius:7px;font-size:13px;color:#46503f;padding:4px 6px}
.reader-toolbar>.reader-button:first-child{margin-right:0}
.reader-page-controls{display:flex;align-items:center;gap:2px}
.reader-page-controls .reader-page{width:36px;padding:4px 2px;border-color:transparent;background:transparent;font-size:12px;font-variant-numeric:tabular-nums}
.reader-page-controls .reader-page:hover,.reader-page-controls .reader-page:focus{border-color:#dce0d9;background:#fff}
.reader-page-controls .reader-total{font-size:11px;min-width:24px;font-variant-numeric:tabular-nums}
.reader-toolbar .toolbar-divider{margin:0 2px;height:18px;flex:none}
.reader-disclosure{flex:none}
.reader-disclosure-trigger{list-style:none;gap:5px;font-weight:500;white-space:nowrap;cursor:pointer}
.reader-disclosure-trigger::-webkit-details-marker{display:none}
.reader-disclosure-trigger svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none}
.reader-disclosure-trigger svg:last-child{width:12px;height:12px;color:#8b9385}
.reader-add .reader-disclosure-trigger{background:#eff2eb;color:#35452c}
.reader-disclosure[open]>.reader-disclosure-trigger{background:#e6ebe1}
.reader-control-panel{position:fixed;z-index:110;width:224px;max-width:calc(100vw - 24px);overflow-y:auto;overscroll-behavior:contain;box-sizing:border-box;padding:6px;border:1px solid #dce0d9;border-radius:12px;background:#fffffff7;backdrop-filter:blur(20px);box-shadow:0 8px 28px #24301e1c,0 2px 5px #24301e0a}
.reader-disclosure:not([open])>.reader-control-panel{display:none}
.reader-control-panel .reader-button{display:flex;width:100%;min-height:38px;justify-content:flex-start;gap:10px;padding:8px 10px;font:400 13px system-ui;white-space:nowrap;border-radius:7px}
.reader-control-panel .reader-button svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex:none}
.reader-control-panel .reader-button:disabled{opacity:.4;cursor:default}
.reader-control-panel .reader-button:hover:not(:disabled){background:#eef1eb}
.reader-control-panel .reader-button[aria-pressed=true]{background:#e6ebe1}
.reader-control-panel .reader-context-commands{display:grid;gap:2px;padding:0;border:0;margin:0}
.reader-control-panel .reader-zoom-controls{padding:4px 2px 9px;border-bottom:1px solid #e5e8e1;margin-bottom:5px;gap:4px}
.reader-control-panel .reader-zoom-controls .reader-button{width:32px;min-width:32px;justify-content:center;font-size:20px;padding:3px}
.reader-control-panel .reader-zoom{flex:1;width:auto;min-width:0;height:30px;border:0;background:transparent;font-size:12px;color:#46503f}
.reader-toolbar :is(button,summary,input,select,a):focus-visible{outline:2px solid #597d45;outline-offset:2px}
@media(max-width:900px){.document-reader .reader-toolbar{height:44px;top:8px;left:8px;padding:3px 4px;gap:2px;max-width:calc(100% - 16px)}.reader-toolbar .reader-button{min-height:36px;min-width:28px;padding:4px}.reader-control-panel .reader-button{min-height:44px}.reader-view .reader-disclosure-trigger span,.reader-view .reader-disclosure-trigger svg:last-child{display:none}.reader-page-controls{gap:0}.reader-toolbar .toolbar-divider{margin:0 1px}.reader-add .reader-disclosure-trigger{font-size:12px;gap:4px}.reader-control-panel .reader-zoom-controls .reader-button{min-height:40px}}
.citation-highlight.selection-highlight{border:2px solid #405d99;background:transparent;box-shadow:none;z-index:7}
.selection-area-label{position:absolute;left:-2px;top:-25px;padding:2px 7px;background:#405d99;color:#fff;border-radius:5px 5px 0 0;font:11px/19px system-ui;white-space:nowrap;pointer-events:none}
.reader-timing-report{width:min(42rem,90vw);max-height:90vh;padding:1.25rem;border:1px solid #aab4c4;border-radius:.5rem;background:#fff;color:#182235}
.reader-timing-report::backdrop{background:#0005}
.reader-timing-report h2{font-size:1.1rem;margin:0 0 .5rem}
.reader-timing-report p{font-size:.9rem}
.reader-timing-report textarea{display:block;width:100%;height:50vh;margin:.75rem 0;box-sizing:border-box;font:12px/1.4 monospace;resize:vertical}

/* Zoom pixels cover the canvas patches; keep citation color above those tiles. */
.reader-raster-tiles-active.canvas-highlighted .citation-highlight:not(.selection-highlight):not(.citation-area) {
  background: #ffd3266b;
}
.reader-raster-tiles-active.canvas-highlighted .citation-highlight.drawing-highlight:not(.selection-highlight):not(.citation-area) {
  background: #ffd32629;
}
