:root {
  --lau-950: #00382d;
  --lau-900: #004638;
  --lau-800: #005a46;
  --lau-700: #006b54;
  --lau-600: #0b8067;
  --lau-200: #b9ddd2;
  --lau-100: #dcefe9;
  --lau-50: #eff8f5;
  --ink-950: #15231f;
  --ink-800: #293934;
  --ink-650: #4a5c56;
  --ink-500: #70807a;
  --ink-400: #8d9a96;
  --line: #e1e8e5;
  --line-strong: #cfdad6;
  --canvas: #fbfcfb;
  --surface: #ffffff;
  --sidebar: #f4f7f5;
  --ivory: #f8f4eb;
  --gold: #b9893e;
  --red: #b44444;
  --red-soft: #fff2f0;
  --amber: #8a5a12;
  --amber-soft: #fff8e9;
  --blue-soft: #edf4fa;
  --shadow-sm: 0 1px 2px rgb(15 42 34 / 4%), 0 7px 22px rgb(15 42 34 / 5%);
  --shadow-md: 0 24px 70px rgb(11 52 41 / 13%);
  --radius-sm: 10px;
  --radius-md: 15px;
  --radius-lg: 22px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--canvas);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink-950);
  background: var(--canvas);
}

button,
textarea {
  font: inherit;
}

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

button {
  color: inherit;
}

a {
  color: inherit;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.page-shell {
  width: min(1320px, calc(100% - 72px));
  margin-inline: auto;
}

.eyebrow {
  margin: 0;
  color: var(--lau-700);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-lockup {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  color: var(--ink-950);
  text-decoration: none;
}

.brand-monogram {
  display: grid;
  width: 48px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px 9px 13px 9px;
  color: #fff;
  background: linear-gradient(145deg, var(--lau-600), var(--lau-900));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 14%);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.brand-copy strong {
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  overflow: hidden;
  color: var(--ink-500);
  font-size: 0.63rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.primary-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--lau-800);
  border-radius: 12px;
  color: #fff;
  background: var(--lau-800);
  box-shadow: 0 8px 20px rgb(0 90 70 / 18%);
  font-weight: 730;
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.primary-button:hover:not(:disabled) {
  background: var(--lau-900);
  box-shadow: 0 11px 24px rgb(0 70 56 / 22%);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.icon-button {
  display: grid;
  padding: 0;
  border: 0;
  place-items: center;
  color: var(--ink-650);
  background: transparent;
  cursor: pointer;
}

.primary-button:focus-visible,
.icon-button:focus-visible,
.new-chat-button:focus-visible,
.history-item:focus-visible,
.suggestion-card:focus-visible,
.send-button:focus-visible,
.message-action-button:focus-visible,
.retry-button:focus-visible,
.notice button:focus-visible {
  outline: 3px solid rgb(11 128 103 / 20%);
  outline-offset: 2px;
}

/* Shared assistant mark */

.assistant-mark {
  position: relative;
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
}

.mark-core {
  position: relative;
  z-index: 2;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 5px solid #fff;
  border-radius: 18px 18px 23px 18px;
  color: #fff;
  background: linear-gradient(145deg, #087b63, #00483a);
  box-shadow: 0 12px 30px rgb(0 82 64 / 22%);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.mark-ray {
  position: absolute;
  border: 1px solid rgb(0 107 84 / 20%);
  border-radius: 50%;
}

.mark-ray-one {
  inset: 4px;
}

.mark-ray-two {
  inset: -4px;
  border-color: rgb(185 137 62 / 17%);
  transform: rotate(18deg) scaleY(0.82);
}

/* Boot */

.boot-screen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgb(220 239 233 / 80%), transparent 23rem),
    #fff;
  transition: opacity 300ms ease, visibility 300ms ease;
}

.boot-screen.is-leaving {
  visibility: hidden;
  opacity: 0;
}

.assistant-mark-large {
  width: 80px;
  height: 80px;
}

.boot-screen > strong {
  margin-top: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.boot-progress {
  width: 180px;
  height: 3px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--lau-100);
}

.boot-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--lau-700);
  animation: boot-loading 1s ease-in-out infinite alternate;
}

.boot-screen p {
  margin: 10px 0 0;
  color: var(--ink-500);
  font-size: 0.72rem;
}

@keyframes boot-loading {
  from { transform: translateX(-20%); }
  to { transform: translateX(160%); }
}

/* Sign in */

.auth-view {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 5% 86%, rgb(11 128 103 / 9%), transparent 27rem),
    radial-gradient(circle at 89% 14%, rgb(185 137 62 / 8%), transparent 25rem),
    linear-gradient(125deg, #fbfcfb 0%, #fbfcfb 58%, #f2f7f5 58%, #f2f7f5 100%);
}

.public-header {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgb(207 218 214 / 75%);
}

.pilot-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  color: var(--ink-650);
  background: rgb(255 255 255 / 65%);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.pilot-pill i,
.trust-row > span:first-child > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa6a2;
}

.pilot-pill i,
.trust-row i.is-ok {
  background: #1ba172;
  box-shadow: 0 0 0 3px rgb(27 161 114 / 12%);
}

.trust-row i.is-error {
  background: var(--red);
}

.sign-in-layout {
  display: grid;
  min-height: calc(100vh - 158px);
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.72fr);
  align-items: center;
  gap: clamp(60px, 9vw, 142px);
  padding-block: 58px 68px;
}

.sign-in-copy {
  max-width: 730px;
}

.sign-in-copy h1 {
  max-width: 710px;
  margin: 16px 0 23px;
  color: var(--ink-950);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.25rem, 5.6vw, 5.65rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.99;
}

.sign-in-copy h1 em {
  color: var(--lau-700);
  font-weight: inherit;
}

.sign-in-copy .lead {
  max-width: 610px;
  margin: 0;
  color: var(--ink-650);
  font-size: clamp(1rem, 1.28vw, 1.13rem);
  line-height: 1.7;
}

.preview-chat {
  max-width: 600px;
  margin-top: 38px;
  padding-top: 26px;
  border-top: 1px solid var(--line-strong);
}

.preview-question {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.preview-question span {
  padding: 10px 14px;
  border-radius: 15px 15px 4px 15px;
  color: #fff;
  background: var(--lau-700);
  font-size: 0.79rem;
}

.preview-question i {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: var(--lau-900);
  background: var(--lau-100);
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 800;
}

.preview-answer {
  display: grid;
  margin-top: 17px;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.mini-assistant-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px 10px 13px 10px;
  color: #fff;
  background: var(--lau-800);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.48rem;
  font-weight: 700;
}

.preview-answer p {
  margin: 2px 0 0;
  color: var(--ink-650);
  font-size: 0.78rem;
  line-height: 1.6;
}

.sign-in-card {
  width: 100%;
  max-width: 470px;
  justify-self: end;
  padding: 38px;
  border: 1px solid rgb(207 218 214 / 90%);
  border-radius: var(--radius-lg);
  background: rgb(255 255 255 / 94%);
  box-shadow: var(--shadow-md);
}

.card-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--lau-700);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.secure-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 10px;
  background: var(--lau-50);
}

.secure-icon svg {
  width: 17px;
  height: 17px;
}

.sign-in-card h2 {
  margin: 23px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.sign-in-card > p {
  margin: 0;
  color: var(--ink-650);
  font-size: 0.88rem;
  line-height: 1.65;
}

.sign-in-button {
  width: 100%;
  min-height: 52px;
  justify-content: space-between;
  margin-top: 26px;
  padding: 0 17px;
}

.sign-in-button svg {
  width: 20px;
  height: 20px;
}

.auth-error {
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid #efc9c4;
  border-radius: var(--radius-sm);
  color: #8f302d;
  background: var(--red-soft);
  font-size: 0.77rem;
  line-height: 1.5;
}

.trust-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-500);
  font-size: 0.68rem;
}

.trust-row span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.trust-row strong {
  color: var(--ink-650);
  font-size: inherit;
}

.trust-row svg {
  width: 13px;
  height: 13px;
  color: var(--lau-600);
}

.public-footer {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid rgb(207 218 214 / 75%);
  color: var(--ink-500);
  font-size: 0.68rem;
}

/* Chat shell */

.app-view {
  position: fixed;
  z-index: 1;
  inset: 0;
  display: flex;
  overflow: hidden;
  background: var(--canvas);
}

.chat-sidebar {
  position: relative;
  z-index: 30;
  display: flex;
  width: 288px;
  height: 100%;
  flex: 0 0 auto;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at 0 0, rgb(11 128 103 / 6%), transparent 15rem),
    var(--sidebar);
}

.sidebar-header {
  display: flex;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  padding: 17px 19px 14px;
}

.sidebar-brand .brand-monogram {
  width: 42px;
  height: 38px;
  border-radius: 8px 8px 11px 8px;
  font-size: 0.78rem;
}

.sidebar-brand .brand-copy strong {
  font-size: 1rem;
}

.sidebar-close {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.sidebar-close svg,
.menu-button svg {
  width: 20px;
  height: 20px;
}

.new-chat-button {
  display: grid;
  min-height: 48px;
  margin: 10px 14px 16px;
  padding: 0 13px;
  border: 1px solid #b9d3ca;
  border-radius: 12px;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--lau-900);
  background: rgb(255 255 255 / 80%);
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.new-chat-button:hover:not(:disabled) {
  border-color: #8ebbae;
  background: #fff;
  transform: translateY(-1px);
}

.new-chat-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.new-chat-button svg {
  width: 19px;
  height: 19px;
}

.new-chat-button span {
  font-size: 0.78rem;
  font-weight: 750;
}

.new-chat-button kbd {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink-500);
  background: var(--sidebar);
  font-family: inherit;
  font-size: 0.57rem;
}

.history-section {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 21px;
  color: var(--ink-500);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.history-heading small {
  font-size: 0.61rem;
}

.history-list {
  overflow-x: hidden;
  overflow-y: auto;
  padding: 3px 9px 16px;
  scrollbar-color: #c4d0cc transparent;
  scrollbar-width: thin;
}

.history-item {
  display: grid;
  width: 100%;
  min-height: 54px;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 0;
  border-radius: 10px;
  color: var(--ink-650);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease;
}

.history-item:hover:not(:disabled) {
  color: var(--ink-950);
  background: rgb(255 255 255 / 66%);
}

.history-item.selected {
  color: var(--lau-900);
  background: #fff;
  box-shadow: inset 3px 0 var(--lau-700), var(--shadow-sm);
}

.history-item:disabled {
  cursor: wait;
  opacity: 0.65;
}

.history-item > span:first-child {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: rgb(225 232 229 / 70%);
}

.history-item.selected > span:first-child {
  color: var(--lau-700);
  background: var(--lau-50);
}

.history-item svg {
  width: 15px;
  height: 15px;
}

.history-item > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.history-item strong,
.history-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item strong {
  font-size: 0.73rem;
  font-weight: 650;
}

.history-item small {
  color: var(--ink-400);
  font-size: 0.59rem;
}

.history-empty {
  display: grid;
  max-width: 190px;
  margin: 32px auto;
  justify-items: center;
  color: var(--ink-400);
  text-align: center;
}

.history-empty svg {
  width: 25px;
  height: 25px;
}

.history-empty p {
  margin: 10px 0 0;
  font-size: 0.68rem;
  line-height: 1.5;
}

.sidebar-footer {
  flex: 0 0 auto;
  padding: 12px 13px 15px;
  border-top: 1px solid var(--line);
}

.web-status {
  display: grid;
  min-height: 54px;
  grid-template-columns: 34px minmax(0, 1fr) 8px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgb(255 255 255 / 55%);
}

.web-status-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  color: var(--lau-700);
  background: var(--lau-50);
}

.web-status-icon svg {
  width: 16px;
  height: 16px;
}

.web-status > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.web-status strong,
.web-status small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-status strong {
  font-size: 0.67rem;
}

.web-status small {
  color: var(--ink-500);
  font-size: 0.58rem;
}

.web-status > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1ba172;
  box-shadow: 0 0 0 3px rgb(27 161 114 / 12%);
}

.user-card {
  display: grid;
  min-height: 54px;
  margin-top: 9px;
  grid-template-columns: 36px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 9px;
  padding: 7px 6px 3px 8px;
}

.user-avatar {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--lau-800);
  font-size: 0.64rem;
  font-weight: 800;
}

.user-details {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.user-details strong,
.user-details small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-details strong {
  font-size: 0.7rem;
}

.user-details small {
  color: var(--ink-500);
  font-size: 0.59rem;
}

.sign-out-button {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.sign-out-button:hover,
.sidebar-close:hover,
.menu-button:hover {
  color: var(--lau-800);
  background: var(--lau-50);
}

.sign-out-button svg {
  width: 17px;
  height: 17px;
}

.chat-main {
  position: relative;
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  background:
    radial-gradient(circle at 100% 0, rgb(220 239 233 / 29%), transparent 25rem),
    var(--canvas);
}

.chat-header {
  position: relative;
  z-index: 12;
  display: flex;
  min-height: 72px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 27px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 88%);
  backdrop-filter: blur(12px);
}

.chat-header-left {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.menu-button {
  display: none;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 10px;
}

.conversation-heading {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.conversation-heading > strong {
  overflow: hidden;
  max-width: min(42vw, 560px);
  font-size: 0.86rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-heading > span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-500);
  font-size: 0.62rem;
}

.conversation-heading > span > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1ba172;
}

.conversation-heading > span[data-tone="working"] > i {
  background: var(--gold);
  animation: status-pulse 1s ease-in-out infinite alternate;
}

.conversation-heading > span[data-tone="error"] > i {
  background: var(--red);
}

.conversation-heading > span[data-tone="idle"] > i {
  background: var(--ink-400);
}

@keyframes status-pulse {
  to { box-shadow: 0 0 0 4px rgb(185 137 62 / 15%); }
}

.model-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink-650);
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-size: 0.66rem;
  font-weight: 720;
}

.model-pill svg {
  width: 14px;
  height: 14px;
  color: var(--lau-700);
}

.model-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1ba172;
}

.notice {
  position: relative;
  z-index: 10;
  display: grid;
  min-height: 44px;
  flex: 0 0 auto;
  grid-template-columns: 17px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 9px;
  padding: 8px 25px;
  border-bottom: 1px solid #ead49d;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 0.72rem;
}

.notice.is-error {
  border-color: #efc9c4;
  color: #933b37;
  background: var(--red-soft);
}

.notice.is-success {
  border-color: var(--lau-200);
  color: var(--lau-900);
  background: var(--lau-50);
}

.notice > svg {
  width: 17px;
  height: 17px;
}

.notice button {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: currentColor;
  background: transparent;
  font-size: 1.15rem;
  cursor: pointer;
}

.chat-scroll {
  position: relative;
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-color: #c7d1ce transparent;
  scrollbar-width: thin;
}

/* Welcome */

.welcome-state {
  display: flex;
  width: min(900px, calc(100% - 60px));
  min-height: 100%;
  margin: 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 54px 0 48px;
  text-align: center;
}

.welcome-mark {
  margin-bottom: 14px;
}

.welcome-state h1 {
  margin: 10px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.3rem, 4.2vw, 3.35rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.welcome-lead {
  max-width: 610px;
  margin: 0;
  color: var(--ink-650);
  font-size: 0.89rem;
  line-height: 1.65;
}

.suggestion-grid {
  display: grid;
  width: 100%;
  margin-top: 34px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.suggestion-card {
  display: grid;
  min-height: 88px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  color: var(--ink-650);
  background: rgb(255 255 255 / 84%);
  box-shadow: 0 2px 10px rgb(15 42 34 / 2%);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.suggestion-card:hover {
  border-color: #b8cec7;
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.suggestion-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
}

.suggestion-icon.mint {
  color: var(--lau-700);
  background: var(--lau-50);
}

.suggestion-icon.gold {
  color: #8b681f;
  background: #fbf3df;
}

.suggestion-icon.blue {
  color: #3d6f92;
  background: var(--blue-soft);
}

.suggestion-icon.rose {
  color: #9b5952;
  background: #faefed;
}

.suggestion-icon svg {
  width: 21px;
  height: 21px;
}

.suggestion-card > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.suggestion-card strong,
.suggestion-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-card strong {
  color: var(--ink-800);
  font-size: 0.77rem;
}

.suggestion-card small {
  color: var(--ink-500);
  font-size: 0.66rem;
}

.suggestion-arrow {
  width: 17px;
  height: 17px;
  color: var(--ink-400);
  transition: color 160ms ease, transform 160ms ease;
}

.suggestion-card:hover .suggestion-arrow {
  color: var(--lau-700);
  transform: translateX(2px);
}

/* Messages */

.message-list {
  width: min(850px, calc(100% - 54px));
  min-height: 100%;
  margin: 0 auto;
  padding: 42px 0 55px;
}

.message-row {
  display: flex;
  width: 100%;
  animation: message-arrive 230ms ease both;
}

.message-row + .message-row {
  margin-top: 30px;
}

@keyframes message-arrive {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.message-row.user {
  justify-content: flex-end;
}

.message-row.user .message-body {
  max-width: min(76%, 650px);
  align-items: flex-end;
}

.message-row.user .message-content {
  padding: 12px 16px;
  border-radius: 18px 18px 5px 18px;
  color: #fff;
  background: linear-gradient(145deg, var(--lau-700), var(--lau-900));
  box-shadow: 0 8px 20px rgb(0 77 61 / 11%);
  white-space: pre-wrap;
}

.message-row.assistant {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.message-avatar {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 11px 11px 14px 11px;
  color: #fff;
  background: linear-gradient(145deg, #0b8067, #004638);
  box-shadow: 0 6px 15px rgb(0 77 61 / 16%);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.49rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.message-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.message-content {
  overflow-wrap: anywhere;
  color: var(--ink-800);
  font-size: 0.88rem;
  line-height: 1.72;
}

.message-content > :first-child {
  margin-top: 0;
}

.message-content > :last-child {
  margin-bottom: 0;
}

.message-content p {
  margin: 0 0 13px;
}

.message-content h2,
.message-content h3 {
  margin: 23px 0 8px;
  color: var(--ink-950);
  font-size: 1rem;
  line-height: 1.35;
}

.message-content h3 {
  font-size: 0.93rem;
}

.message-content ul,
.message-content ol {
  margin: 8px 0 14px;
  padding-left: 1.35rem;
}

.message-content li + li {
  margin-top: 6px;
}

.message-content a {
  color: var(--lau-700);
  font-weight: 650;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.message-content a:hover {
  color: var(--lau-900);
}

.message-content code {
  padding: 0.16em 0.38em;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #8a3f55;
  background: #f6f4f4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82em;
}

.message-content pre {
  overflow-x: auto;
  margin: 14px 0;
  padding: 15px;
  border: 1px solid #2b3b36;
  border-radius: 11px;
  color: #e7efec;
  background: #1d2b27;
  font-size: 0.78rem;
  line-height: 1.6;
}

.message-content pre code {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font-size: inherit;
}

.message-content blockquote {
  margin: 13px 0;
  padding: 8px 14px;
  border-left: 3px solid var(--lau-200);
  color: var(--ink-650);
  background: var(--lau-50);
}

.message-table-region {
  max-width: 100%;
  overflow-x: auto;
  margin: 14px 0 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.message-table-region:focus-visible {
  outline: 2px solid var(--lau-600);
  outline-offset: 2px;
}

.message-content table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.82rem;
  line-height: 1.5;
}

.message-content th,
.message-content td {
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow-wrap: normal;
  vertical-align: top;
}

.message-content th:last-child,
.message-content td:last-child {
  border-right: 0;
}

.message-content tbody tr:last-child td {
  border-bottom: 0;
}

.message-content th {
  color: var(--ink-950);
  background: var(--lau-50);
  font-weight: 700;
}

.message-content tbody tr:nth-child(even) {
  background: #fafcfb;
}

.message-actions {
  display: flex;
  min-height: 25px;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  color: var(--ink-400);
  opacity: 0;
  transition: opacity 150ms ease;
}

.message-row:hover .message-actions,
.message-row:focus-within .message-actions {
  opacity: 1;
}

.message-actions > span {
  font-size: 0.58rem;
}

.message-action-button {
  display: grid;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  place-items: center;
  color: var(--ink-500);
  background: transparent;
  cursor: pointer;
}

.message-action-button:hover {
  color: var(--lau-800);
  background: var(--lau-50);
}

.message-action-button svg {
  width: 14px;
  height: 14px;
}

.thinking-body {
  display: flex;
  min-height: 37px;
  align-items: center;
  gap: 10px;
  color: var(--ink-500);
  font-size: 0.75rem;
}

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

.thinking-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lau-600);
  animation: thinking 1.05s ease-in-out infinite;
}

.thinking-dots i:nth-child(2) {
  animation-delay: 120ms;
}

.thinking-dots i:nth-child(3) {
  animation-delay: 240ms;
}

@keyframes thinking {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.response-error {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 15px;
  border: 1px solid #edcfca;
  border-radius: 13px;
  color: #843b37;
  background: var(--red-soft);
}

.response-error > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.response-error strong {
  font-size: 0.77rem;
}

.response-error p {
  margin: 0;
  color: #955f5b;
  font-size: 0.68rem;
  line-height: 1.45;
}

.retry-button {
  display: inline-flex;
  min-height: 34px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid #ddb7b2;
  border-radius: 8px;
  color: #843b37;
  background: #fff;
  font-size: 0.67rem;
  font-weight: 750;
  cursor: pointer;
}

.retry-button:hover {
  border-color: #c9938d;
}

.retry-button svg {
  width: 14px;
  height: 14px;
}

.history-loading {
  display: flex;
  min-height: 240px;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.history-loading span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lau-600);
  animation: thinking 1.05s ease-in-out infinite;
}

.history-loading span:nth-child(2) { animation-delay: 120ms; }
.history-loading span:nth-child(3) { animation-delay: 240ms; }

.scroll-bottom-button {
  position: sticky;
  z-index: 5;
  bottom: 14px;
  left: calc(50% - 18px);
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  place-items: center;
  color: var(--ink-650);
  background: #fff;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.scroll-bottom-button svg {
  width: 17px;
  height: 17px;
}

/* Composer */

.composer-area {
  position: relative;
  z-index: 11;
  flex: 0 0 auto;
  padding: 9px 25px 12px;
  background: linear-gradient(to bottom, rgb(251 252 251 / 0%), var(--canvas) 18%, var(--canvas));
}

.composer {
  width: min(850px, 100%);
  margin: 0 auto;
  padding: 13px 13px 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 32px rgb(15 50 40 / 8%);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.composer:focus-within {
  border-color: #9bbfb4;
  box-shadow: 0 12px 36px rgb(15 50 40 / 10%), 0 0 0 3px rgb(11 128 103 / 6%);
}

.composer textarea {
  display: block;
  width: 100%;
  max-height: 176px;
  min-height: 28px;
  resize: none;
  overflow-y: auto;
  padding: 2px 3px;
  border: 0;
  outline: 0;
  color: var(--ink-950);
  background: transparent;
  font-size: 0.88rem;
  line-height: 1.55;
}

.composer textarea::placeholder {
  color: #98a39f;
}

.composer textarea:disabled {
  color: var(--ink-500);
  cursor: wait;
}

.composer-toolbar {
  display: flex;
  min-height: 35px;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 7px;
}

.composer-context {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.search-mode-switch {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--canvas);
}

.search-mode-option {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 0;
  border-radius: 7px;
  color: var(--ink-500);
  background: transparent;
  font-size: 0.59rem;
  font-weight: 750;
  cursor: pointer;
}

.search-mode-option svg {
  width: 12px;
  height: 12px;
}

.search-mode-option.is-selected {
  color: var(--lau-800);
  background: #fff;
  box-shadow: 0 1px 4px rgb(15 50 40 / 10%);
}

.search-mode-option:focus-visible {
  outline: 2px solid var(--lau-600);
  outline-offset: 2px;
}

.search-mode-option:disabled {
  color: var(--ink-400);
  cursor: not-allowed;
  opacity: 0.55;
}

.character-count {
  color: var(--ink-400);
  font-size: 0.58rem;
}

.character-count.is-limit {
  color: var(--red);
  font-weight: 700;
}

.send-button {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 11px;
  place-items: center;
  color: #fff;
  background: var(--lau-800);
  box-shadow: 0 5px 14px rgb(0 90 70 / 20%);
  cursor: pointer;
  transition: background 150ms ease, opacity 150ms ease, transform 150ms ease;
}

.send-button:hover:not(:disabled) {
  background: var(--lau-900);
  transform: translateY(-1px);
}

.send-button:disabled {
  color: #aab4b0;
  background: #e7ecea;
  box-shadow: none;
  cursor: default;
}

.send-button svg {
  width: 18px;
  height: 18px;
}

.send-button .stop-icon {
  display: none;
}

.composer.is-generating .send-button .send-icon {
  display: none;
}

.composer.is-generating .send-button .stop-icon {
  display: block;
}

.disclaimer {
  width: min(850px, 100%);
  margin: 7px auto 0;
  color: var(--ink-400);
  font-size: 0.58rem;
  line-height: 1.4;
  text-align: center;
}

.sidebar-overlay {
  position: fixed;
  z-index: 25;
  inset: 0;
  background: rgb(15 32 27 / 38%);
  opacity: 0;
  backdrop-filter: blur(2px);
  transition: opacity 180ms ease;
}

.sidebar-overlay.is-visible {
  opacity: 1;
}

.toast-region {
  position: fixed;
  z-index: 1100;
  right: 22px;
  bottom: 22px;
  display: grid;
  width: min(320px, calc(100% - 44px));
  gap: 8px;
}

.toast {
  padding: 11px 14px;
  border: 1px solid var(--lau-200);
  border-radius: 10px;
  color: var(--lau-950);
  background: #fff;
  box-shadow: var(--shadow-md);
  font-size: 0.73rem;
  font-weight: 650;
  animation: toast-in 180ms ease both;
}

.toast.error {
  border-color: #efc9c4;
  color: #843b37;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1000px) {
  .sign-in-layout {
    gap: 55px;
  }

  .sign-in-copy h1 {
    font-size: clamp(3rem, 6vw, 4.6rem);
  }

  .sign-in-card {
    padding: 32px;
  }

  .chat-sidebar {
    width: 270px;
  }
}

@media (max-width: 840px) {
  .page-shell {
    width: min(100% - 40px, 680px);
  }

  .auth-view {
    overflow: auto;
    background:
      radial-gradient(circle at 50% 12%, rgb(11 128 103 / 8%), transparent 25rem),
      #f8faf9;
  }

  .sign-in-layout {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 40px;
    padding-block: 58px;
  }

  .sign-in-copy {
    max-width: 650px;
    text-align: center;
  }

  .sign-in-copy h1,
  .sign-in-copy .lead {
    margin-inline: auto;
  }

  .preview-chat {
    display: none;
  }

  .sign-in-card {
    max-width: 520px;
    justify-self: center;
  }

  .public-footer {
    min-height: 82px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    text-align: center;
  }

  .chat-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(304px, 86vw);
    box-shadow: 18px 0 50px rgb(15 42 34 / 14%);
    transform: translateX(-105%);
    transition: transform 200ms ease;
  }

  .chat-sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-close,
  .menu-button {
    display: grid;
  }

  .chat-header {
    padding-inline: 17px;
  }

  .welcome-state {
    width: min(720px, calc(100% - 38px));
  }

  .message-list {
    width: min(720px, calc(100% - 38px));
  }

  .composer-area {
    padding-inline: 17px;
  }
}

@media (max-width: 600px) {
  .page-shell {
    width: calc(100% - 30px);
  }

  .public-header {
    min-height: 75px;
  }

  .public-header .brand-monogram {
    width: 42px;
    height: 38px;
    font-size: 0.78rem;
  }

  .pilot-pill {
    padding: 7px 9px;
    font-size: 0.56rem;
  }

  .sign-in-layout {
    gap: 34px;
    padding-block: 45px 52px;
  }

  .sign-in-copy h1 {
    margin-top: 13px;
    font-size: clamp(2.55rem, 13vw, 3.7rem);
  }

  .sign-in-copy .lead {
    font-size: 0.92rem;
  }

  .sign-in-card {
    padding: 28px 23px;
  }

  .sign-in-card h2 {
    font-size: 1.7rem;
  }

  .trust-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .public-footer span:last-child {
    max-width: 360px;
  }

  .chat-header {
    min-height: 64px;
    padding-inline: 12px;
  }

  .conversation-heading > strong {
    max-width: 43vw;
    font-size: 0.78rem;
  }

  .conversation-heading > span {
    font-size: 0.57rem;
  }

  .model-pill {
    padding: 7px 9px;
  }

  .model-pill span {
    display: none;
  }

  .model-pill svg {
    width: 17px;
    height: 17px;
  }

  .notice {
    padding-inline: 15px;
  }

  .welcome-state {
    width: calc(100% - 28px);
    justify-content: flex-start;
    padding-block: 42px 32px;
  }

  .welcome-mark {
    transform: scale(0.9);
  }

  .welcome-state h1 {
    font-size: 2.25rem;
  }

  .welcome-lead {
    max-width: 420px;
    font-size: 0.8rem;
  }

  .suggestion-grid {
    margin-top: 26px;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .suggestion-card {
    min-height: 72px;
    padding: 10px 12px;
  }

  .suggestion-icon {
    width: 38px;
    height: 38px;
  }

  .message-list {
    width: calc(100% - 28px);
    padding-block: 28px 40px;
  }

  .message-row + .message-row {
    margin-top: 25px;
  }

  .message-row.assistant {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
  }

  .message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 9px 9px 12px 9px;
    font-size: 0.43rem;
  }

  .message-row.user .message-body {
    max-width: 88%;
  }

  .message-content {
    font-size: 0.82rem;
  }

  .message-row.user .message-content {
    padding: 10px 13px;
  }

  .message-actions {
    opacity: 1;
  }

  .response-error {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .composer-area {
    padding: 7px 10px 8px;
  }

  .composer {
    padding: 11px 10px 8px 13px;
    border-radius: 16px;
  }

  .composer textarea {
    font-size: 0.83rem;
  }

  .disclaimer {
    padding-inline: 10px;
    font-size: 0.53rem;
  }

  .toast-region {
    right: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
  }
}

@media (max-height: 700px) and (min-width: 601px) {
  .welcome-state {
    justify-content: flex-start;
    padding-top: 34px;
  }

  .welcome-mark {
    transform: scale(0.82);
    margin-bottom: 5px;
  }

  .suggestion-grid {
    margin-top: 22px;
  }

  .suggestion-card {
    min-height: 75px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
