:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef2f1;
  color: #172326;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
button, input, textarea { font: inherit; }
button { border: 1px solid #223234; background: #203638; color: white; border-radius: 6px; padding: 10px 14px; cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
.shell { min-height: 100vh; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login__form { width: min(420px, 100%); display: grid; gap: 14px; background: white; border: 1px solid #d7dfdf; border-radius: 8px; padding: 24px; box-shadow: 0 18px 54px rgba(20, 35, 38, .12); }
.eyebrow { margin: 0; color: #38756e; font-size: 12px; font-weight: 800; text-transform: uppercase; }
h1, h2, p { margin: 0; }
label { display: grid; gap: 6px; font-weight: 700; color: #405154; }
input, textarea { border: 1px solid #c8d3d3; border-radius: 6px; padding: 10px 12px; background: white; color: #172326; }
.password-field { display: grid; grid-template-columns: 1fr 44px; gap: 8px; align-items: center; }
.password-field input { min-width: 0; width: 100%; }
.icon-button { width: 44px; height: 42px; display: grid; place-items: center; padding: 0; background: white; color: #203638; border-color: #c8d3d3; }
.workspace { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 18px 24px; background: white; border-bottom: 1px solid #d7dfdf; }
.topbar__actions { display: flex; align-items: center; gap: 10px; }
.upload__prompt { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.upload__prompt select { border: 1px solid #c8d3d3; border-radius: 6px; padding: 10px 12px; background: white; color: #172326; }
.upload__prompt textarea { min-height: 74px; resize: vertical; }
.upload__prompt label:last-child { grid-column: 1 / -1; }
.panes { min-height: 0; display: grid; grid-template-columns: 340px 1fr; }
.documents { overflow: auto; padding: 18px; border-right: 1px solid #d7dfdf; background: #f8faf9; }
.doc { width: 100%; text-align: left; display: grid; gap: 4px; margin-top: 10px; background: white; color: #172326; border-color: #d7dfdf; }
.doc strong { overflow-wrap: anywhere; }
.doc span { color: #5d6b6e; font-size: 13px; }
.editor { min-width: 0; display: grid; grid-template-rows: auto 1fr; }
.editor__bar { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 16px 18px; background: white; border-bottom: 1px solid #d7dfdf; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.button-link { display: inline-flex; align-items: center; border: 1px solid #223234; border-radius: 6px; padding: 10px 14px; color: #203638; background: white; text-decoration: none; font-weight: 700; }
textarea[data-editor] { width: 100%; height: 100%; resize: none; border: 0; border-radius: 0; padding: 22px; line-height: 1.55; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.work-queue { overflow: auto; padding: 18px; background: #fbfcfc; }
.work-queue__list { display: grid; gap: 10px; }
.work-queue__item { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; width: 100%; text-align: left; background: white; color: #172326; border-color: #d7dfdf; }
.work-queue__item strong, .work-queue__item span { min-width: 0; overflow-wrap: anywhere; }
.work-queue__item span { color: #5d6b6e; font-size: 13px; }
.work-queue__badge { justify-self: end; align-self: start; border: 1px solid #c8d3d3; border-radius: 999px; padding: 3px 8px; color: #244f58; background: #eef7f7; font-size: 12px; font-weight: 800; }
.message { min-height: 20px; color: #b42318; }
.toast { position: fixed; right: 18px; bottom: 18px; max-width: 360px; background: #203638; color: white; border-radius: 8px; padding: 14px 16px; box-shadow: 0 18px 40px rgba(20, 35, 38, .25); }
.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: start center; padding: 7vh 24px 24px; background: rgba(20, 35, 38, .34); }
.modal__panel { width: min(840px, 100%); display: grid; gap: 18px; background: white; border: 1px solid #d7dfdf; border-radius: 8px; padding: 22px; box-shadow: 0 24px 80px rgba(20, 35, 38, .25); }
.modal__header, .modal__actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.modal__actions { justify-content: flex-end; }
.switch-field { margin-right: auto; display: inline-flex; grid-template-columns: none; grid-auto-flow: column; align-items: center; gap: 10px; font-weight: 800; }
.switch-field input { appearance: none; position: relative; width: 42px; height: 24px; padding: 0; border: 1px solid #9fb0b2; border-radius: 999px; background: #dbe4e4; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.switch-field input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(20, 35, 38, .28); transition: transform .15s ease; }
.switch-field input:checked { background: #244f58; border-color: #244f58; }
.switch-field input:checked::after { transform: translateX(18px); }
.upload-file { position: relative; gap: 10px; }
.upload-file input { width: 100%; padding-bottom: 13px; }
.upload-line { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; overflow: hidden; background: #d7dfdf; border-radius: 999px; }
.upload-line span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #214a4e, #36a4b2, #70d0a4, #214a4e); background-size: 240% 100%; animation: upload-line 1.1s linear infinite; transition: width .18s ease; }
.upload-status { min-height: 20px; color: #405154; font-weight: 700; }
@keyframes upload-line {
  from { background-position: 0 0; }
  to { background-position: 240% 0; }
}
@media (max-width: 900px) {
  .upload__prompt, .panes { grid-template-columns: 1fr; }
  .documents { max-height: 260px; border-right: 0; border-bottom: 1px solid #d7dfdf; }
  .editor__bar { align-items: stretch; flex-direction: column; }
}
