:root {
  color-scheme: light;
  --navy-980: #001017;
  --navy-950: #001922;
  --navy-900: #00313d;
  --navy-820: #064353;
  --green-700: #1f775e;
  --green-600: #2d9a78;
  --green-500: #56bb91;
  --green-100: #eaf8f2;
  --gold-500: #f3a61c;
  --gold-600: #d88b0d;
  --orange-500: #df8d25;
  --red-600: #bf3a3a;
  --ink: #0c2630;
  --muted: #60727a;
  --soft: #f6faf8;
  --paper: #ffffff;
  --line: #dbe5e1;
  --line-strong: #c7d5d0;
  --shadow: 0 24px 70px rgba(0, 16, 23, 0.26);
  --soft-shadow: 0 14px 36px rgba(0, 49, 61, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 42% 0%, rgba(86, 187, 145, 0.16), transparent 32%),
    linear-gradient(145deg, #022b34 0%, var(--navy-980) 78%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.shell {
  min-height: 100vh;
  padding: 24px 16px;
}

.login-page {
  min-height: 100vh;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(440px, 100%);
  display: grid;
  gap: 30px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.login-brand {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.login-brand img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 14px 28px rgba(0, 16, 23, 0.18);
}

.login-brand h1,
.login-brand p,
.login-form label,
.login-error {
  margin: 0;
  letter-spacing: 0;
}

.login-brand h1 {
  color: var(--ink);
  font-size: 28px;
  line-height: 1.08;
  font-weight: 840;
}

.login-brand p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 15px;
}

.login-form {
  display: grid;
  gap: 11px;
}

.login-form label {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  text-transform: uppercase;
}

.login-password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 10px;
}

.login-password-row input {
  min-width: 0;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 16px;
  outline: none;
}

.login-password-row input:focus {
  border-color: rgba(45, 154, 120, 0.66);
  box-shadow: 0 0 0 4px rgba(45, 154, 120, 0.12);
}

.login-password-row button {
  height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--gold-500);
  color: var(--navy-980);
  cursor: pointer;
  font-size: 14px;
  font-weight: 820;
}

.login-password-row button:hover {
  background: #ffb532;
}

.login-password-row button:disabled {
  background: #a7b0aa;
  color: #ffffff;
  cursor: wait;
}

.login-error {
  padding: 11px 12px;
  border: 1px solid rgba(191, 58, 58, 0.24);
  border-radius: 8px;
  background: #fff0f0;
  color: var(--red-600);
  font-size: 14px;
  line-height: 1.35;
}

.workspace {
  width: min(1248px, 100%);
  height: calc(100vh - 48px);
  min-height: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.sidebar {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 34px 20px 28px;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(0, 63, 78, 0.9), rgba(0, 20, 27, 0.98)),
    var(--navy-950);
  color: #f8fbf9;
}

.brand {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.brand-logo {
  width: 72px;
  height: 72px;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
}

.brand h1,
.brand p,
.sidebar-section h2,
.example-group h3,
.topbar h2,
.topbar p,
.welcome-card h3,
.welcome-card h4,
.message-body p,
.message-body ul,
.message-body h3,
.message-body h4,
.legal-note {
  margin: 0;
  letter-spacing: 0;
}

.brand h1 {
  color: #ffffff;
  font-size: 24px;
  line-height: 1.08;
  font-weight: 800;
}

.brand p {
  margin-top: 7px;
  color: rgba(239, 250, 244, 0.78);
  font-size: 15px;
  line-height: 1.2;
}

.sidebar-section {
  display: grid;
  gap: 12px;
}

.sidebar-section h2 {
  color: #85e2b4;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  text-transform: uppercase;
}

.corpus-list,
.example-group {
  display: grid;
  gap: 8px;
}

.corpus-row,
.example-button,
.sidebar-note {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.corpus-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: rgba(248, 251, 249, 0.94);
  font-size: 15px;
  line-height: 1.25;
}

.corpus-icon {
  width: 24px;
  height: 24px;
  position: relative;
  display: inline-grid;
  place-items: center;
  color: transparent;
  font-size: 0;
}

.corpus-icon::before,
.check-icon::before,
.shield-icon::before {
  content: "";
  width: 18px;
  height: 18px;
  display: block;
  background: currentColor;
  mask: var(--icon) center / contain no-repeat;
}

.corpus-icon {
  color: #f8fbf9;
}

.corpus-icon[aria-hidden="true"] {
  --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M5 4.5A2.5 2.5 0 0 1 7.5 2H20v17H7.5A2.5 2.5 0 0 0 5 21.5v-17Zm2.5-.5a.5.5 0 0 0-.5.5v12.58c.17-.04.34-.06.5-.06H18V4H7.5ZM4 4.5c0-.28-.22-.5-.5-.5S3 4.22 3 4.5v17c0 .28.22.5.5.5s.5-.22.5-.5v-17Z'/%3E%3C/svg%3E");
}

.corpus-icon.database {
  --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 3C7.03 3 3 4.57 3 6.5v11C3 19.43 7.03 21 12 21s9-1.57 9-3.5v-11C21 4.57 16.97 3 12 3Zm0 2c4.3 0 7 1.2 7 1.5S16.3 8 12 8 5 6.8 5 6.5 7.7 5 12 5Zm0 5c2.83 0 5.43-.51 7-1.36V11.5c0 .3-2.7 1.5-7 1.5s-7-1.2-7-1.5V8.64C6.57 9.49 9.17 10 12 10Zm0 5c2.83 0 5.43-.51 7-1.36v3.86c0 .3-2.7 1.5-7 1.5s-7-1.2-7-1.5v-3.86C6.57 14.49 9.17 15 12 15Z'/%3E%3C/svg%3E");
}

.check-icon {
  width: 18px;
  height: 18px;
  color: var(--green-500);
  border: 1px solid rgba(86, 187, 145, 0.72);
  border-radius: 999px;
}

.check-icon::before {
  width: 11px;
  height: 11px;
  margin: 2px auto 0;
  --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='m7.7 13.4-3.1-3.1 1.4-1.4 1.7 1.7 6.3-6.3 1.4 1.4-7.7 7.7Z'/%3E%3C/svg%3E");
}

.corpus-stat strong {
  display: block;
  color: #ffffff;
  font-size: 15px;
}

.corpus-stat small {
  display: block;
  margin-top: 4px;
  color: rgba(248, 251, 249, 0.72);
  font-size: 12px;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--green-500);
  box-shadow: 0 0 0 5px rgba(86, 187, 145, 0.14);
}

.examples {
  gap: 18px;
}

.example-group h3 {
  margin-bottom: 8px;
  color: #85e2b4;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  text-transform: uppercase;
}

.example-button {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.example-button:hover {
  background: rgba(86, 187, 145, 0.16);
  border-color: rgba(86, 187, 145, 0.38);
  transform: translateY(-1px);
}

.sidebar-note {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: auto;
  padding: 16px;
  background: rgba(86, 187, 145, 0.12);
  border-color: rgba(86, 187, 145, 0.32);
}

.shield-icon {
  width: 28px;
  height: 28px;
  color: var(--green-500);
}

.shield-icon::before {
  width: 28px;
  height: 28px;
  --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 22C8.13 20.66 5.56 18.56 4.27 15.7 3.42 13.81 3 11.31 3 8.2V4.5L12 1l9 3.5v3.7c0 3.11-.42 5.61-1.27 7.5C18.44 18.56 15.87 20.66 12 22Zm0-2.16c3.12-1.17 5.12-2.84 6-5 .67-1.63 1-3.84 1-6.64V5.87l-7-2.72-7 2.72V8.2c0 2.8.33 5.01 1 6.64.88 2.16 2.88 3.83 6 5Z'/%3E%3C/svg%3E");
}

.sidebar-note p {
  margin: 0;
  color: rgba(248, 251, 249, 0.86);
  font-size: 13px;
  line-height: 1.52;
}

.chat-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  background: linear-gradient(180deg, #fbfdfc 0%, #ffffff 28%);
}

.topbar {
  min-height: 126px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
}

.topbar-title {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.topbar-title img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}

.topbar h2 {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.15;
  font-weight: 820;
}

.topbar p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.3;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.active-badge,
.secondary-button,
.answer-action {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 740;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(0, 49, 61, 0.04);
}

.active-badge {
  padding: 0 15px;
}

.active-badge span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green-600);
}

.secondary-button {
  padding: 0 14px;
  cursor: pointer;
}

.secondary-button:hover,
.answer-action:hover {
  border-color: rgba(45, 154, 120, 0.42);
  color: var(--green-700);
}

.answer-action:disabled {
  cursor: default;
  opacity: 0.86;
}

.answer-action:disabled:hover {
  border-color: rgba(45, 154, 120, 0.36);
}

.messages {
  min-height: 0;
  overflow: auto;
  padding: 34px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.messages::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
  width: 10px;
}

.messages::-webkit-scrollbar-thumb {
  background: #c9d6d0;
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

.welcome-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 26px 34px;
  padding: 38px 40px 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.welcome-copy h3 {
  color: var(--ink);
  font-size: 27px;
  line-height: 1.16;
  font-weight: 830;
}

.welcome-copy > p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.35;
}

.welcome-questions {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  max-width: 520px;
}

.welcome-questions button {
  min-height: 54px;
  padding: 0 18px 0 52px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
  line-height: 1.25;
  text-align: left;
}

.welcome-questions button::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  background: var(--green-600);
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 5.5A3.5 3.5 0 0 1 7.5 2h9A3.5 3.5 0 0 1 20 5.5v6A3.5 3.5 0 0 1 16.5 15H11l-5.2 4.16A1 1 0 0 1 4 18.38V5.5ZM7.5 4A1.5 1.5 0 0 0 6 5.5v10.8l4.02-3.22A1 1 0 0 1 10.64 13h5.86a1.5 1.5 0 0 0 1.5-1.5v-6A1.5 1.5 0 0 0 16.5 4h-9Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.welcome-questions button:hover {
  border-color: rgba(45, 154, 120, 0.46);
  background: #ffffff;
}

.welcome-illustration {
  min-height: 210px;
  position: relative;
  align-self: center;
}

.clipboard {
  position: absolute;
  right: 36px;
  top: 16px;
  width: 120px;
  height: 166px;
  border: 10px solid #667a7f;
  border-top-width: 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #edf3f1);
  box-shadow: 0 20px 34px rgba(0, 49, 61, 0.16);
  transform: rotate(2deg);
}

.clipboard::before {
  content: "";
  position: absolute;
  left: 30px;
  top: -28px;
  width: 58px;
  height: 28px;
  border-radius: 7px 7px 3px 3px;
  background: var(--navy-950);
}

.clipboard::after {
  content: "";
  position: absolute;
  left: 51px;
  top: -19px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ffffff;
}

.clipboard span {
  display: block;
  width: 66px;
  height: 5px;
  margin: 25px 0 0 20px;
  border-radius: 999px;
  background: #b8c6c8;
}

.clipboard span:nth-child(2) {
  width: 78px;
  margin-top: 14px;
}

.clipboard span:nth-child(3) {
  width: 52px;
  margin-top: 14px;
}

.lens {
  position: absolute;
  right: 18px;
  top: 98px;
  width: 84px;
  height: 84px;
  border: 8px solid #0e303a;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.lens::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -34px;
  width: 58px;
  height: 10px;
  border-radius: 999px;
  background: #0e303a;
  transform: rotate(45deg);
}

.leaf {
  position: absolute;
  left: 22px;
  bottom: 14px;
  width: 34px;
  height: 86px;
  border-radius: 34px 0 34px 0;
  background: #50b98c;
  transform: rotate(-28deg);
}

.leaf-two {
  left: 54px;
  bottom: 4px;
  height: 70px;
  background: #71cfa6;
  transform: rotate(-54deg);
}

.welcome-divider {
  grid-column: 1 / -1;
  height: 1px;
  background: var(--line);
}

.does-list {
  display: grid;
  gap: 12px;
  padding-right: 26px;
}

.does-not-list {
  padding: 0 0 0 34px;
  border-left: 1px solid var(--line);
}

.does-list h4 {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 820;
  text-transform: uppercase;
}

.does-list p {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #243942;
  font-size: 15px;
  line-height: 1.35;
}

.does-list span {
  width: 14px;
  height: 14px;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--green-600);
  position: relative;
}

.does-list span::before {
  content: "";
  position: absolute;
  inset: 3px;
  background: #ffffff;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 14 14' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='m5.4 9.6-2.5-2.5 1.1-1.1 1.4 1.4L10 2.8l1.1 1.1-5.7 5.7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.does-not-list span {
  background: var(--orange-500);
}

.does-not-list span::before {
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 14 14' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4.05 2.95 7 5.9l2.95-2.95 1.1 1.1L8.1 7l2.95 2.95-1.1 1.1L7 8.1l-2.95 2.95-1.1-1.1L5.9 7 2.95 4.05l1.1-1.1Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.message {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
}

.message-role {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding-top: 19px;
  text-transform: uppercase;
}

.message.assistant .message-role {
  color: var(--ink);
}

.message.assistant .message-role::before {
  content: "";
  width: 42px;
  height: 42px;
  display: block;
  margin-bottom: 8px;
  border-radius: 8px;
  background: url("/assets/logo-ok.png") center / cover no-repeat;
  box-shadow: 0 8px 20px rgba(0, 49, 61, 0.16);
}

.message-body {
  min-width: 0;
  max-width: 830px;
  display: grid;
  gap: 12px;
}

.message.user .message-body {
  margin-left: auto;
  width: min(760px, 100%);
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdfc, #f5faf7);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  box-shadow: 0 8px 22px rgba(0, 49, 61, 0.045);
}

.history-panel {
  width: min(830px, calc(100% - 88px));
  margin-left: 88px;
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(45, 154, 120, 0.34);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.history-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.history-header h3,
.history-header p,
.history-item h4,
.history-item p,
.history-empty {
  margin: 0;
  letter-spacing: 0;
}

.history-header h3 {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 830;
}

.history-header p,
.history-item p,
.history-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}

.history-close {
  flex: 0 0 auto;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.history-item-copy {
  min-width: 0;
}

.history-item h4 {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.32;
  font-weight: 780;
}

.history-item p {
  margin-top: 5px;
}

.history-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.history-item-actions .answer-action,
.history-close {
  height: 38px;
  padding: 0 12px;
}

.history-empty {
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fbfdfc;
}

.typing-message .message-body {
  align-self: start;
}

.typing-bubble {
  width: max-content;
  max-width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid rgba(45, 154, 120, 0.3);
  border-radius: 8px;
  background: #ffffff;
  color: #38525b;
  font-size: 14px;
  font-weight: 720;
  line-height: 1.25;
  box-shadow: 0 7px 18px rgba(0, 49, 61, 0.04);
}

.typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green-600);
  animation: typingPulse 1.05s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 140ms;
}

.typing-dots span:nth-child(3) {
  animation-delay: 280ms;
}

@keyframes typingPulse {
  0%,
  80%,
  100% {
    opacity: 0.32;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.answer-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 7px 18px rgba(0, 49, 61, 0.04);
}

.answer-card.quick-card {
  border-color: rgba(45, 154, 120, 0.5);
  box-shadow: 0 8px 22px rgba(45, 154, 120, 0.08);
}

.answer-card summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.answer-card summary::-webkit-details-marker {
  display: none;
}

.answer-card summary > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 820;
  line-height: 1.2;
  text-transform: uppercase;
}

.answer-card svg,
.answer-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--green-700);
  flex: 0 0 auto;
}

.quick-card svg {
  color: var(--navy-900);
}

.chevron {
  width: 8px;
  height: 8px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg);
  transition: transform 150ms ease;
}

.answer-card[open] .chevron {
  transform: rotate(-135deg);
}

.answer-card-body {
  padding: 0 18px 16px;
  color: #1d343d;
  font-size: 15px;
  line-height: 1.52;
}

.answer-card-body p + p,
.answer-card-body p + ul,
.answer-card-body ul + p,
.answer-card-body h4 + p,
.answer-card-body p + h4 {
  margin-top: 10px;
}

.answer-card-body h4 {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 800;
}

.answer-card-body ul {
  display: grid;
  gap: 7px;
  padding-left: 18px;
}

.answer-card-body li::marker {
  color: var(--green-700);
}

.source-list {
  padding-left: 17px;
}

.source-list li {
  padding-left: 2px;
}

.source-list strong {
  color: #10313b;
  font-size: 14px;
}

.source-list p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}

.prudence-state {
  display: grid;
  gap: 7px;
}

.prudence-state span {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 780;
}

.prudence-state span::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: currentColor;
}

.prudence-green span {
  color: var(--green-700);
  background: var(--green-100);
}

.prudence-orange span {
  color: #9a5b0d;
  background: #fff4df;
}

.prudence-red span {
  color: var(--red-600);
  background: #fff0f0;
}

.decision-note {
  margin-top: 4px;
  padding: 16px;
  border: 1px solid rgba(45, 154, 120, 0.34);
  border-radius: 8px;
  background: #f4fbf8;
}

.decision-note h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 820;
  text-transform: uppercase;
}

.answer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 0 0;
}

.answer-action {
  min-width: 42px;
  padding: 0 14px;
  cursor: pointer;
}

.answer-action:first-child {
  border-color: var(--navy-900);
  background: var(--navy-900);
  color: #ffffff;
}

.answer-action:first-child svg {
  color: #ffffff;
}

.answer-action.is-saved {
  border-color: rgba(45, 154, 120, 0.36);
  background: var(--green-100);
  color: var(--green-700);
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 12px;
  padding: 20px 24px 12px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.composer textarea {
  width: 100%;
  min-height: 62px;
  max-height: 150px;
  resize: none;
  padding: 18px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.42;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(0, 49, 61, 0.03);
}

.composer textarea::placeholder {
  color: #7c8b90;
}

.composer textarea:focus {
  border-color: rgba(45, 154, 120, 0.66);
  box-shadow: 0 0 0 4px rgba(45, 154, 120, 0.12);
}

.composer button {
  width: 58px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: var(--gold-500);
  color: var(--navy-980);
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(216, 139, 13, 0.28);
  transition:
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.composer button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.composer button:hover {
  background: #ffb532;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(216, 139, 13, 0.34);
}

.composer button:disabled {
  background: #a7b0aa;
  color: #ffffff;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.legal-note {
  padding: 0 24px 18px;
  color: #66777f;
  font-size: 12px;
  line-height: 1.35;
  background: #ffffff;
}

.example-button:focus-visible,
.welcome-questions button:focus-visible,
.secondary-button:focus-visible,
.answer-action:focus-visible,
.login-password-row input:focus-visible,
.login-password-row button:focus-visible,
.composer textarea:focus-visible,
.composer button:focus-visible {
  outline: 3px solid rgba(243, 166, 28, 0.36);
  outline-offset: 2px;
}

@media (max-width: 1040px) {
  .workspace {
    grid-template-columns: 290px minmax(0, 1fr);
  }

  .welcome-card {
    grid-template-columns: 1fr;
  }

  .welcome-illustration {
    display: none;
  }

  .does-not-list {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 820px) {
  .shell {
    padding: 0;
  }

  .workspace {
    height: 100vh;
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    border: 0;
    border-radius: 0;
  }

  .sidebar {
    max-height: 240px;
    padding: 16px;
    gap: 14px;
  }

  .brand {
    grid-template-columns: 56px minmax(0, 1fr);
    margin-bottom: 2px;
  }

  .brand-logo {
    width: 56px;
    height: 56px;
  }

  .brand h1 {
    font-size: 20px;
  }

  .brand p {
    font-size: 13px;
  }

  .corpus-list {
    grid-template-columns: 1fr 1fr;
  }

  .corpus-row {
    min-height: 46px;
    font-size: 13px;
  }

  .corpus-row:nth-child(4),
  .corpus-stat {
    display: none;
  }

  .examples,
  .sidebar-note {
    display: none;
  }

  .topbar {
    min-height: 96px;
    padding: 16px;
    align-items: flex-start;
  }

  .topbar-title {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 11px;
  }

  .topbar-title img {
    width: 34px;
    height: 34px;
  }

  .topbar h2 {
    font-size: 18px;
  }

  .topbar p {
    font-size: 13px;
  }

  .active-badge {
    display: none;
  }

  .messages {
    padding: 18px 14px;
    gap: 18px;
  }

  .welcome-card {
    padding: 24px 18px;
  }

  .welcome-copy h3 {
    font-size: 23px;
  }

  .welcome-copy > p {
    font-size: 15px;
  }

  .message {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .message-role {
    padding-top: 0;
  }

  .message.assistant .message-role::before {
    display: none;
  }

  .message-body {
    max-width: 100%;
  }

  .message.user .message-body {
    margin-left: 0;
  }

  .history-panel {
    width: 100%;
    margin-left: 0;
    padding: 15px;
  }

  .history-item {
    grid-template-columns: 1fr;
  }

  .history-item-actions {
    justify-content: flex-start;
  }

  .answer-card-body {
    font-size: 14px;
  }

  .answer-action {
    flex: 1 1 auto;
  }

  .composer {
    grid-template-columns: minmax(0, 1fr) 54px;
    padding: 12px;
  }

  .composer textarea {
    min-height: 66px;
    padding: 13px 14px;
    font-size: 14px;
  }

  .composer button {
    width: 54px;
    height: 66px;
  }

  .legal-note {
    padding: 0 12px 12px;
  }
}

@media (max-width: 520px) {
  .login-shell {
    padding: 16px;
  }

  .login-panel {
    padding: 24px 18px;
  }

  .login-brand {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .login-brand img {
    width: 58px;
    height: 58px;
  }

  .login-brand h1 {
    font-size: 24px;
  }

  .login-password-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .sidebar {
    max-height: 172px;
  }

  .sidebar-section {
    display: none;
  }

  .topbar {
    min-height: 118px;
    flex-direction: column;
    gap: 12px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .secondary-button {
    height: 38px;
  }

  .welcome-questions button {
    min-height: 58px;
    padding-right: 14px;
  }

  .does-list p {
    align-items: flex-start;
  }

  .answer-card summary {
    padding: 0 13px;
  }

  .answer-card summary > span:first-child {
    font-size: 12px;
  }
}
