:root {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #1b2538;
  background: #f7f8fc;
  font-size: 15px;
  --accent: #256b56;
  --muted: #637087;
  --line: #e3e7ef;
  --nav: #121d2e;
}
.account-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 20px;
  align-items: end;
}
.account-form input,
.account-form select {
  display: block;
  width: 100%;
  margin-top: 8px;
}
.account-form > button {
  justify-self: start;
  margin-top: 12px;
}
.audit-wrap td {
  white-space: normal;
  min-width: 125px;
  max-width: 330px;
  text-align: left;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.audit-heading {
  margin-top: 30px;
  align-items: center;
}
.audit-heading a {
  text-decoration: none;
  font-size: 13px;
  flex: none;
}
#current-user {
  font-size: 12px;
  color: #d8e9e2;
  line-height: 1.6;
  margin-bottom: 12px;
}
@media (max-width: 700px) {
  .account-form {
    grid-template-columns: 1fr;
  }
  .audit-heading {
    display: flex;
    gap: 12px;
  }
  .audit-heading h2 {
    font-size: 18px;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #70bca5;
  outline-offset: 3px;
}
button,
.quiet,
.primary {
  transition: background 0.15s;
}
button:hover {
  filter: brightness(0.97);
}
a {
  color: #256b56;
}
p {
  line-height: 1.65;
  color: var(--muted);
}
h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.025em;
}
h1 {
  font-size: 32px;
  margin: 8px 0 14px;
  font-weight: 650;
}
h2 {
  font-size: 21px;
  margin: 22px 0 15px;
}
h3 {
  font-size: 17px;
}
small {
  font-size: 12px;
  line-height: 1.7;
}
input,
textarea,
select {
  border: 1px solid #d5dce6;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  color: #1b2538;
  max-width: 100%;
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #39856e;
  box-shadow: 0 0 0 3px #39856e16;
}
textarea {
  resize: vertical;
  line-height: 1.6;
}
label {
  display: block;
  font-weight: 550;
  margin: 14px 0 8px;
}
input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  flex: none;
}
pre {
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.7;
  margin: 0;
}
button.primary,
.primary {
  background: var(--accent);
  color: white;
  padding: 12px 19px;
  border-radius: 10px;
  font-weight: 600;
  line-height: 1.4;
}
.quiet {
  background: #edf1f5;
  color: #344158;
  border-radius: 9px;
  padding: 10px 13px;
  white-space: normal;
}
.icon-button {
  font-size: 23px;
  padding: 4px 10px;
  background: transparent;
  color: inherit;
}
.text-button {
  background: transparent;
  color: inherit;
  padding: 12px 0;
  text-align: left;
  font-size: 13px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #bce7d8;
  color: #143a2e;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.1em;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex: none;
}
.logo span {
  color: #2b7e64;
  font-size: 35px;
}
.logo.large {
  width: 58px;
  height: 58px;
  font-size: 35px;
  border-radius: 17px;
  margin: 0 auto 25px;
}
.login-screen {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(ellipse at 15% 10%, #e4f0eb, transparent 60%), #f7f8fc;
}
.login-card {
  min-width: 0;
  width: 440px;
  max-width: 100%;
  padding: 38px 35px;
  background: #fff;
  border: 1px solid #e2e9e5;
  border-radius: 24px;
  box-shadow: 0 20px 70px #1b382512;
  text-align: center;
}
.login-card h1 {
  font-size: 32px;
  margin: 14px 0;
}
.login-card label {
  text-align: left;
  font-size: 13px;
  margin-top: 25px;
}
.login-card input,
.login-card button {
  width: 100%;
}
.login-card button {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
}
.login-card small {
  color: var(--muted);
}
.login-help {
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin: 8px 0 0;
}
.login-card .password-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  cursor: pointer;
}
.login-card .password-toggle input {
  width: 17px;
  height: 17px;
  margin: 0;
}
.error {
  color: #a12739;
  font-size: 14px;
  min-height: 0;
}
.workspace {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  height: 100dvh;
}
.workspace[hidden],
[hidden] {
  display: none !important;
}
aside {
  background: var(--nav);
  color: #e4ebf5;
  display: flex;
  flex-direction: column;
  padding: 28px 19px 18px;
  min-height: 0;
}
.brand {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 23px;
  font-weight: 650;
  padding: 0 9px;
}
.brand small {
  display: block;
  color: #9caac0;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.02em;
  margin-top: 1px;
}
.new-chat {
  background: #274338;
  color: #d7f5e9;
  border: 1px solid #3c6252;
  border-radius: 10px;
  padding: 12px 15px;
  display: flex;
  gap: 12px;
  font-weight: 550;
  margin: 28px 0 20px;
}
nav {
  display: grid;
  gap: 4px;
}
.nav {
  background: transparent;
  text-align: left;
  color: #b5c2d5;
  padding: 12px 13px;
  border-radius: 8px;
  display: flex;
  gap: 13px;
  font-size: 15px;
  line-height: 1.4;
}
.nav.active {
  color: #edf6ff;
  background: #24344b;
}
.sidebar-caption {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #8494ad;
  margin: 30px 12px 12px;
}
.chat-list {
  overflow: auto;
  min-height: 60px;
  flex: 1;
}
.chat-item {
  display: flex;
  align-items: center;
  border-radius: 8px;
  margin: 3px 0;
  gap: 3px;
}
.chat-item.active {
  background: #233249;
}
.chat-item > button:first-child {
  background: transparent;
  color: #bfcbdd;
  text-align: left;
  padding: 11px 12px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.chat-item .delete-chat {
  background: transparent;
  color: #98aac1;
  padding: 8px;
  font-size: 17px;
  opacity: 0.65;
}
.sidebar-bottom {
  font-size: 11px;
  color: #a6b6ce;
  padding: 18px 9px 0;
  border-top: 1px solid #2c394e;
}
.sidebar-bottom button {
  display: block;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #85cead;
  border-radius: 100%;
  margin-right: 6px;
}
.main-shell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
header {
  height: 82px;
  flex: none;
  padding: 0 36px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffffb8;
  gap: 15px;
}
header strong {
  display: block;
  font-size: 17px;
}
header span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
#mobile-menu {
  display: none;
}
.view {
  min-height: 0;
  flex: 1;
}
.chat-view {
  display: flex;
  flex-direction: column;
}
.conversation {
  overflow: auto;
  flex: 1;
  scroll-behavior: smooth;
  padding: 25px 35px 20px;
}
.conversation > * {
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}
.welcome {
  padding: 10vh 0 30px;
  max-width: 720px;
}
.welcome .eyebrow {
  margin-bottom: 12px;
}
.welcome h1 {
  font-size: 37px;
}
.welcome p {
  font-size: 16px;
  max-width: 550px;
}
.suggestions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 30px;
}
.suggestion {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  text-align: left;
  padding: 17px 18px;
  line-height: 1.6;
  font-size: 14px;
  color: #344158;
  min-width: 0;
}
.suggestion small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.message {
  margin-bottom: 28px;
  overflow-wrap: anywhere;
}
.message.user {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}
.user-bubble {
  background: #e6edea;
  padding: 14px 19px;
  border-radius: 17px 17px 4px 17px;
  max-width: 85%;
  white-space: pre-wrap;
  line-height: 1.7;
}
.answer-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
  font-size: 13px;
  font-weight: 650;
}
.answer-head .mini-logo {
  color: #25705a;
  background: #def1e9;
  padding: 4px 7px;
  border-radius: 6px;
}
.origin {
  font-weight: 400;
  color: #637087;
  font-size: 12px;
}
.answer-body {
  line-height: 1.8;
  font-size: 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.answer-body.structured {
  white-space: normal;
}
.answer-body h3 {
  margin: 24px 0 8px;
}
.answer-body p {
  color: #344158;
  margin: 6px 0 13px;
  white-space: pre-wrap;
}
.answer-body .lesson-title {
  font-size: 23px;
  color: #19253a;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 22px 0;
  max-width: 100%;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
th,
td {
  text-align: center;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
}
th {
  background: #eef4f1;
  color: #255845;
  font-weight: 600;
}
tr:last-child td {
  border: 0;
}
tbody tr:nth-child(2n) {
  background: #fafbfc;
}
.explanation {
  border-left: 3px solid #c5dcd3;
  padding: 0 0 0 15px;
  margin: 18px 0;
  color: #526177;
  font-size: 14px;
}
.explanation summary {
  cursor: pointer;
  font-weight: 550;
  margin-bottom: 9px;
  color: #3b6455;
}
.verification {
  font-size: 11px;
  color: var(--muted);
  margin: 14px 0 7px;
}
.answer-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.answer-actions button,
.answer-actions a {
  background: transparent;
  font-size: 12px;
  padding: 7px 9px;
  border-radius: 6px;
  color: #526177;
  text-decoration: none;
}
.answer-actions button:hover,
.answer-actions a:hover {
  background: #e9edf2;
}
.composer-shell {
  padding: 0 35px 18px;
  max-width: 100%;
  flex: none;
}
.composer {
  max-width: 850px;
  margin: auto;
  background: #fff;
  border: 1px solid #d9e0e8;
  border-radius: 17px;
  padding: 15px 15px 11px;
  box-shadow: 0 5px 20px #1b253805;
}
.composer textarea {
  width: 100%;
  border: 0;
  padding: 0 4px;
  border-radius: 0;
  resize: none;
  max-height: 180px;
  min-height: 54px;
  box-shadow: none;
  font-size: 15px;
}
.composer-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.composer-tools select {
  border: 0;
  background: transparent;
  color: #637087;
  font-size: 12px;
  padding: 8px 3px;
  max-width: 48%;
}
.composer-tools .quiet {
  background: #f2f5f7;
  font-size: 12px;
  padding: 8px 11px;
}
.send {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 24px;
  border-radius: 10px;
  width: 39px;
  height: 36px;
  flex: none;
}
.composer-note {
  text-align: center;
  font-size: 10px;
  line-height: 1.6;
  margin: 8px 0 0;
}
.job-progress {
  max-width: 850px;
  margin: 0 auto 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 15px;
  background: #eaf2ee;
  border: 1px solid #cde0d6;
  border-radius: 11px;
  font-size: 12px;
  color: #375b4c;
}
.job-progress > div {
  flex: 1;
  min-width: 0;
}
.job-progress .quiet {
  font-size: 11px;
  padding: 5px 8px;
}
.job-progress pre {
  max-height: 120px;
  overflow: auto;
  margin-top: 4px;
}
.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid #bbd3c8;
  border-top-color: #2d7459;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-top: 2px;
  flex: none;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.content-view {
  overflow: auto;
  padding: 38px 40px 55px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.page-heading h1 {
  font-size: 30px;
}
.page-heading p {
  margin-bottom: 0;
  max-width: 720px;
}
.page-heading > button {
  flex: none;
  margin-top: 15px;
}
.page-heading > .button-row {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.notice {
  background: #eaf2ee;
  color: #335f4e;
  padding: 17px 20px;
  line-height: 1.7;
  font-size: 14px;
  border: 1px solid #d5e5dd;
  border-radius: 12px;
  margin-bottom: 23px;
  overflow-wrap: anywhere;
}
.notice.subtle {
  background: #edf1f7;
  border-color: #dde4ef;
  color: #526077;
  margin-top: 25px;
}
.cards {
  display: grid;
  gap: 14px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 22px 24px;
  border-radius: 14px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.card h2,
.card h3 {
  margin-top: 0;
}
.card p {
  font-size: 14px;
  margin-bottom: 0;
}
.card .button-row {
  margin-top: 17px;
}
.card small {
  color: var(--muted);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 25px;
}
.stat-number {
  font-size: 29px;
  font-weight: 650;
  margin: 10px 0 6px;
  letter-spacing: -0.04em;
}
.stat-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin-top: 11px;
}
.stat-line strong {
  color: #293c53;
  font-weight: 550;
  text-align: right;
}
.button-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.button-row label {
  margin: 0;
}
.button-row .quiet,
.button-row .primary {
  font-size: 13px;
}
.button-row select {
  padding: 10px;
  font-size: 13px;
}
.review-text {
  width: 100%;
  min-height: 140px;
  font-size: 14px;
}
.review-prompt,
.review-subject {
  width: 100%;
  margin: 8px 0;
}
.review-card label {
  font-size: 13px;
}
.empty {
  color: var(--muted);
  padding: 30px 15px;
  text-align: center;
  line-height: 1.7;
}
.check {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 400;
  line-height: 1.6;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 27px 29px;
  max-width: 600px;
  width: calc(100% - 32px);
  max-height: 90dvh;
  color: #1b2538;
  box-shadow: 0 20px 90px #10233830;
}
dialog::backdrop {
  background: #101d2e75;
  backdrop-filter: blur(3px);
}
dialog select,
dialog textarea {
  width: 100%;
}
dialog p {
  font-size: 13px;
}
dialog h2 {
  margin: 0;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
dialog .primary {
  margin-top: 15px;
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 22px;
  border-radius: 12px;
  background: #172d26;
  color: #e7fff4;
  box-shadow: 0 8px 40px #12281d30;
  z-index: 100;
  max-width: min(90vw, 650px);
  font-size: 14px;
  line-height: 1.6;
}
.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;
}
@media (min-width: 1500px) {
  .content-view {
    padding: 45px max(45px, calc((100vw - 1450px) / 2));
  }
  .conversation {
    padding-top: 38px;
  }
}
@media (max-width: 1000px) {
  .workspace {
    grid-template-columns: 235px minmax(0, 1fr);
  }
  aside {
    padding: 25px 12px 15px;
  }
  header {
    padding: 0 23px;
  }
  .conversation {
    padding: 22px;
  }
  .composer-shell {
    padding: 0 22px 14px;
  }
  .content-view {
    padding: 28px 23px;
  }
  .page-heading {
    display: block;
  }
  .page-heading > .button-row {
    justify-content: flex-start;
    margin-top: 20px;
  }
  .welcome h1 {
    font-size: 32px;
  }
  .origin {
    display: block;
    line-height: 1.5;
  }
  .suggestions {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .workspace {
    display: flex;
  }
  .main-shell {
    width: 100%;
  }
  aside {
    display: none;
    position: fixed;
    left: 0;
    top: 69px;
    bottom: 0;
    width: 270px;
    z-index: 20;
    box-shadow: 10px 0 30px #12233830;
  }
  aside.open {
    display: flex;
  }
  header {
    height: 69px;
    padding: 0 12px;
    gap: 8px;
  }
  header > div {
    flex: 1;
  }
  header span {
    font-size: 10px;
  }
  header strong {
    font-size: 15px;
  }
  header .quiet {
    padding: 8px;
    font-size: 11px;
  }
  #mobile-menu {
    display: block;
  }
  .conversation {
    padding: 18px 17px;
  }
  .welcome {
    padding: 7vh 3px 20px;
  }
  .welcome h1 {
    font-size: 30px;
  }
  .welcome p {
    font-size: 15px;
  }
  .suggestions {
    gap: 10px;
    margin-top: 20px;
  }
  .suggestion {
    padding: 13px 16px;
  }
  .composer-shell {
    padding: 0 12px 12px;
  }
  .composer-note {
    font-size: 9px;
  }
  .composer {
    padding: 12px;
  }
  .composer-tools {
    gap: 4px;
  }
  .composer-tools select {
    max-width: 46%;
  }
  .user-bubble {
    max-width: 95%;
  }
  .answer-body {
    font-size: 15px;
  }
  .origin {
    font-size: 11px;
  }
  .answer-actions {
    gap: 1px;
  }
  .content-view {
    padding: 28px 17px;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  .card {
    padding: 19px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  dialog {
    padding: 22px;
  }
  .login-card {
    padding: 30px 23px;
  }
  .login-screen {
    padding: 17px;
  }
  .job-progress {
    gap: 8px;
    padding: 10px;
  }
  .answer-head {
    align-items: flex-start;
  }
  th,
  td {
    padding: 10px 12px;
  }
  .button-row {
    gap: 8px;
  }
  .sidebar-caption {
    margin-top: 22px;
  }
}
/* Document context stays visible without widening the chat on small screens. */
.attachment-status { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; padding:8px 12px; margin-bottom:8px; background:var(--surface, #eef4f2); border-radius:12px; font-size:12px; overflow-wrap:anywhere; }
.attachment-status[hidden] { display:none; }
.attachment-status > span { flex:1 1 190px; min-width:0; }
.personal-card { background:#fff; border:1px solid #e0e7e4; border-radius:18px; padding:22px; margin:16px 0; overflow-wrap:anywhere; min-width:0; }
.personal-card p { line-height:1.6; color:#52665d; }
.personal-form { display:grid; gap:12px; margin:16px 0; }
.personal-form label { display:grid; gap:7px; min-width:0; }
.personal-form input, .personal-form textarea, .personal-card textarea, .personal-card input { width:100%; box-sizing:border-box; }
.personal-pre { white-space:pre-wrap; overflow-wrap:anywhere; max-height:480px; overflow:auto; padding:14px; background:#f3f6f4; border-radius:10px; font-size:13px; }
.personal-meta { font-size:12px; color:#607168; line-height:1.6; }
aside { overflow-y:auto; }
aside > .brand, aside > .new-chat, aside > nav, aside > .sidebar-bottom, aside > .sidebar-caption { flex-shrink:0; }
.chat-list { min-height:90px; }
.personal-card label.check { display:flex; align-items:flex-start; gap:10px; line-height:1.5; }
.personal-card input[type=checkbox] { width:18px; height:18px; flex:0 0 18px; margin-top:3px; }
.scheduler-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr)); gap:14px; }
.scheduler-grid input { min-width:0; }
@media(max-width:600px){ .personal-card{padding:16px;} .personal-card .button-row{display:flex;flex-wrap:wrap;} .personal-card button{white-space:normal;} }
