:root {
  color-scheme: light;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --text-sm: 0.875rem;
  --text-base: 0.95rem;
  --text-lg: 1.5rem;
  --text-xl: 2.75rem;
  --color-bg: #f6f5f0;
  --color-text: #1c302b;
  --color-muted: #68736c;
  --color-border: #dee2d9;
  --color-focus: #97704a;
  --color-danger: #a23835;
  --color-panel: #edf0e8;
  --accent: #b58051;
  --sidebar: #172925;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
summary {
  cursor: pointer;
}
button {
  min-height: 46px;
  padding: 11px 19px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  color: var(--color-text);
  font-size: 0.85rem;
  font-weight: 600;
  transition:
    background 0.18s,
    transform 0.18s,
    box-shadow 0.18s;
  margin: 8px 8px 8px 0;
}
button:hover {
  background: #edf0e8;
  box-shadow: 0 3px 12px #1c302b0b;
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
form > button,
.primary-button {
  background: var(--sidebar);
  color: #fff;
  border-color: var(--sidebar);
}
form > button:hover,
.primary-button:hover {
  background: #2e4940;
}
input:not([type="checkbox"]),
select,
textarea {
  display: block;
  min-height: 48px;
  width: min(100%, 520px);
  padding: 12px 15px;
  border: 1px solid #cfd6cb;
  border-radius: 10px;
  background: #fff;
  color: var(--color-text);
  min-width: 0;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px #b5805112;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--sidebar);
  margin-right: 10px;
  flex-shrink: 0;
}
textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
}
label {
  display: block;
  margin: 20px 0 7px;
  font-size: 0.8rem;
  font-weight: 600;
}
label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  line-height: 1.4;
  font-weight: 400;
}
h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}
h2 {
  font-size: clamp(2rem, 3.3vw, 3rem);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.055em;
  margin-bottom: 16px;
}
h3 {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}
p {
  color: var(--color-muted);
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  background: var(--sidebar);
  color: #f5f4ea;
  padding: 34px 22px 24px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  margin-bottom: 45px;
}
.brand-mark {
  height: 43px;
  width: 43px;
  display: grid;
  place-items: center;
  border: 1px solid #91a3994d;
  border-radius: 13px;
  color: #e8c7a2;
  font-size: 32px;
  line-height: 1;
}
.brand strong {
  font-size: 1.35rem;
  letter-spacing: -0.05em;
  font-weight: 600;
}
.brand-dot {
  color: #deb48d;
}
.brand small {
  display: block;
  color: #a4b3a8;
  font-size: 0.63rem;
  letter-spacing: 0.04em;
}
.nav-eyebrow {
  font-size: 0.6rem;
  letter-spacing: 0.19em;
  color: #8fa396;
  margin: 0 12px 12px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: #b5c4b9;
  text-decoration: none;
  font-size: 0.81rem;
  border-radius: 8px;
  transition:
    background 0.18s,
    color 0.18s;
}
nav a:hover {
  background: #ffffff08;
  color: #fff;
}
nav a[aria-current="page"] {
  background: #f2f3e912;
  color: #fff;
  box-shadow: inset 2px 0 #d1a67c;
}
.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  font-size: 16px;
  color: #adc0b2;
}
nav a[aria-current="page"] .nav-icon {
  color: #e2bd95;
}
nav button {
  background: transparent;
  border: 0;
  color: #a9baad;
  text-align: left;
  font-size: 0.75rem;
  margin-top: 15px;
  padding: 8px 12px;
}
nav button:hover {
  background: #ffffff08;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 28px 12px 0;
  color: #8fa396;
  font-size: 0.65rem;
}
.privacy-light {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a8bf93;
  margin-right: 7px;
}
.sidebar-bottom p {
  margin: 10px 0 0;
  color: #bdcbbf;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}
.workspace {
  margin-left: 248px;
}
.topbar {
  height: 80px;
  padding: 0 48px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--color-muted);
  gap: 20px;
}
.topbar-status {
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  white-space: nowrap;
  color: #738d64;
}
main {
  max-width: 1360px;
  margin: auto;
  padding: 48px;
  min-height: calc(100dvh - 155px);
  animation: arrive 0.35s ease;
}
main > h2 + p {
  max-width: 660px;
  margin-bottom: 30px;
}
main > section,
main > form,
main > article,
fieldset {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 28px;
  margin: 24px 0;
  box-shadow: 0 8px 32px #24382b06;
  min-width: 0;
}
section > section,
article > section {
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  margin: 16px 0;
}
form > label:first-child {
  margin-top: 0;
}
details {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #ffffff80;
  margin: 14px 0;
  padding: 17px 20px;
}
summary {
  font-size: 0.82rem;
  font-weight: 500;
}
details[open] summary {
  margin-bottom: 20px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--color-panel);
  padding: 20px;
  border-radius: 12px;
  font-size: 0.8rem;
  max-height: 600px;
  overflow: auto;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 48px;
  border-top: 1px solid var(--color-border);
  font-size: 0.65rem;
  color: #7c867e;
}
.menu-toggle {
  display: none;
}
.skip {
  position: fixed;
  top: -100px;
  left: 15px;
  z-index: 100;
  padding: 12px 20px;
  background: white;
  border-radius: 8px;
}
.skip:focus {
  top: 12px;
}
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 4px;
}
[role="alert"] {
  border: 1px solid #e6c4bd;
  background: #fff0ec;
  color: var(--color-danger);
  padding: 15px 20px;
  border-radius: 12px;
}
.muted {
  color: var(--color-muted);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.8rem;
  display: block;
  overflow: auto;
}
td,
th {
  padding: 13px 16px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}
th {
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  background: #f5f6f1;
}
dl {
  margin: 0;
}
.data-result {
  background: #f0f2eb;
  border-radius: 12px;
  padding: 6px 20px;
  margin: 18px 0;
  overflow-wrap: anywhere;
  min-width: 0;
}
.data-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(0, 2fr);
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid #dbe0d6;
}
.data-row:last-child {
  border: 0;
}
.data-row dt {
  font-size: 0.72rem;
  color: var(--color-muted);
}
.data-row dd {
  margin: 0;
  font-size: 0.84rem;
}
.data-result .data-result {
  background: #ffffff90;
  padding: 0 14px;
  margin: 5px 0;
}
.empty-state {
  padding: 30px 10px;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.85rem;
}
.eyebrow {
  font-size: 0.64rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: #8c6d4e;
  margin-bottom: 16px;
}
.hero {
  position: relative;
  overflow: hidden;
  min-height: 245px;
  border-radius: 22px;
  padding: 38px 42px;
  background: #e8ecdf;
  margin-bottom: 28px;
}
.hero:after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  border: 1px solid #aab89d55;
  border-radius: 50%;
  right: -100px;
  top: -110px;
  box-shadow:
    0 0 0 45px #aab89d12,
    0 0 0 90px #aab89d0b;
  pointer-events: none;
}
.hero h2 {
  max-width: 650px;
  font-family: Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.045em;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  position: relative;
  z-index: 1;
}
.hero p {
  max-width: 450px;
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}
.hero a {
  position: relative;
  z-index: 1;
  display: inline-block;
  background: var(--sidebar);
  color: #fff;
  padding: 12px 21px;
  border-radius: 10px;
  font-size: 0.78rem;
  text-decoration: none;
  margin-top: 6px;
}
.section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 35px 0 16px;
}
.section-label h3 {
  margin: 0;
}
.section-label span {
  font-size: 0.69rem;
  color: var(--color-muted);
}
.home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.destination {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 17px;
  padding: 25px;
  text-decoration: none;
  min-height: 190px;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    border-color 0.2s;
}
.destination:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px #20372c09;
  border-color: #a9b69e;
}
.destination-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid #dce3d4;
  border-radius: 11px;
  color: #6d805f;
  font-size: 21px;
  margin-bottom: 21px;
}
.destination h3 {
  font-size: 1rem;
  margin: 0 0 5px;
}
.destination p {
  font-size: 0.75rem;
  margin: 0 0 14px;
}
.destination .arrow {
  margin-top: auto;
  font-size: 1rem;
  color: #9c7957;
  align-self: flex-end;
}
.welcome-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.welcome-strip p {
  margin: 0;
  font-size: 0.75rem;
}
.welcome-strip span {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--color-muted);
}
.thread-list p {
  padding: 18px 0;
  border-bottom: 1px solid var(--color-border);
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.thread-list p:last-child {
  border: 0;
}
.thread-list a {
  text-decoration: none;
  font-weight: 600;
}
.thread-list span {
  font-size: 0.72rem;
  color: var(--color-muted);
}
[aria-label="Conversation messages"] {
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}
[aria-label="Conversation messages"] article {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  margin: 20px 0;
  padding: 25px;
}
[aria-label="Conversation messages"] article[data-role="user"] {
  background: #e9eddf;
  margin-left: 10%;
}
[aria-label="Conversation messages"] article h3 {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #7d8a74;
}
[data-design-slot="message-content"] {
  font: inherit;
  background: none;
  padding: 0;
  border: 0;
  max-height: none;
  margin-bottom: 0;
}
.auth-story h2 {
  font-family: Georgia, serif;
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.055em;
  max-width: 500px;
}
.auth-story > p:not(.eyebrow) {
  max-width: 370px;
  font-size: 0.9rem;
}
.auth-art {
  height: 180px;
  margin-top: 45px;
  position: relative;
  overflow: hidden;
  max-width: 420px;
}
.auth-art:before,
.auth-art:after {
  content: "";
  position: absolute;
  border: 1px solid #a8b39766;
  border-radius: 100% 100% 0 0;
  width: 230px;
  height: 300px;
  left: 12px;
  top: 20px;
  background: linear-gradient(145deg, #d9dfcc88, transparent);
}
.auth-art:after {
  left: 125px;
  top: 60px;
  width: 190px;
  background: linear-gradient(145deg, #eadcc977, transparent);
  border-color: #c3ad8d66;
}
.auth-note {
  font-size: 0.65rem !important;
}
.auth-card {
  padding: 36px;
  background: #ffffffcf;
  border: 1px solid #e0e4d9;
  border-radius: 22px;
  box-shadow: 0 16px 60px #263d2d08;
}
.auth-card h3 {
  font-size: 1.5rem;
  letter-spacing: -0.045em;
  font-weight: 500;
}
.auth-card > p {
  font-size: 0.78rem;
  margin-bottom: 25px;
}
.auth-card form {
  padding: 0;
  margin: 0;
  border: 0;
  box-shadow: none;
}
.auth-card form > button {
  width: 100%;
  margin: 20px 0 8px;
}
.auth-card input:not([type="checkbox"]) {
  width: 100%;
}
.auth-card details {
  background: transparent;
  padding: 17px 0;
  border: 0;
  border-top: 1px solid var(--color-border);
  border-radius: 0;
  margin: 10px 0 0;
}
.auth-card details p {
  font-size: 0.75rem;
}
.auth-card summary {
  font-size: 0.75rem;
}
.auth-card .auth-footnote {
  margin: 22px 0 0;
  font-size: 0.65rem;
  text-align: center;
  color: #697465;
}
body[data-state="auth"] .sidebar {
  position: static;
  width: auto;
  background: transparent;
  color: var(--color-text);
  padding: 28px 5vw;
  overflow: visible;
}
body[data-state="auth"] .brand {
  margin: 0;
}
body[data-state="auth"] .brand-mark {
  color: var(--sidebar);
  border-color: #bcc6b4;
}
body[data-state="auth"] .brand small {
  color: var(--color-muted);
}
body[data-state="auth"] .brand-dot {
  color: var(--accent);
}
body[data-state="auth"] .sidebar nav,
body[data-state="auth"] .sidebar-bottom,
body[data-state="auth"] .nav-eyebrow,
body[data-state="auth"] .topbar,
body[data-state="auth"] .menu-toggle {
  display: none;
}
body[data-state="auth"] .workspace {
  margin: 0;
}
body[data-state="auth"] main {
  min-height: calc(100dvh - 200px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10%;
  align-items: center;
  max-width: 1190px;
  padding: 35px 5vw 60px;
}
body[data-state="auth"] footer {
  max-width: 1190px;
  margin: auto;
  padding-inline: 5vw;
}
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (min-width: 1500px) {
  main {
    padding: 56px 64px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 210px;
    padding-inline: 14px;
  }
  .workspace {
    margin-left: 210px;
  }
  main {
    padding: 32px;
  }
  .topbar {
    padding-inline: 32px;
  }
  .home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero {
    padding: 30px;
  }
  .auth-card {
    padding: 28px;
  }
  body[data-state="auth"] main {
    gap: 6%;
  }
  footer {
    padding-inline: 32px;
  }
  .topbar-status {
    display: none;
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    padding: 14px 20px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    overflow: visible;
    box-shadow: 0 4px 15px #11251d0c;
  }
  .brand {
    margin: 0;
  }
  .brand-mark {
    height: 34px;
    width: 34px;
    font-size: 26px;
    border-radius: 9px;
  }
  .brand strong {
    font-size: 1.1rem;
  }
  .brand small {
    font-size: 0.55rem;
  }
  .menu-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: 1px solid #ffffff28;
    color: #ecf0e6;
    min-height: 38px;
    margin: 0;
    padding: 7px 12px;
    font-size: 0.7rem;
  }
  .nav-eyebrow,
  .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--sidebar);
    padding: 14px 20px 24px;
    max-height: calc(100dvh - 75px);
    overflow: auto;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid #ffffff14;
    box-shadow: 0 14px 20px #17292522;
  }
  .sidebar[data-open="true"] nav {
    display: grid;
  }
  .sidebar nav a {
    min-height: 46px;
  }
  .sidebar nav button {
    grid-column: 1/-1;
  }
  .workspace {
    margin: 0;
  }
  .topbar {
    height: 52px;
    padding: 0 22px;
    font-size: 0.65rem;
  }
  main {
    padding: 28px 22px;
    min-height: calc(100dvh - 210px);
  }
  h2 {
    font-size: 2.1rem;
  }
  .hero {
    min-height: 240px;
    padding: 28px 25px;
  }
  .hero h2 {
    font-size: 2.6rem;
    max-width: 310px;
  }
  .hero p {
    max-width: 270px;
  }
  .hero:after {
    right: -230px;
  }
  .home-grid {
    gap: 12px;
  }
  .destination {
    padding: 20px;
    min-height: 190px;
  }
  .destination h3 {
    font-size: 0.95rem;
  }
  .destination p {
    font-size: 0.72rem;
  }
  .welcome-strip {
    align-items: flex-start;
    margin-bottom: 23px;
  }
  .welcome-strip span {
    font-size: 0.55rem;
    text-align: right;
  }
  .section-label {
    margin-top: 28px;
  }
  .section-label span {
    font-size: 0.6rem;
  }
  main > section,
  main > form,
  main > article,
  fieldset {
    padding: 22px 19px;
    border-radius: 15px;
  }
  footer {
    padding: 23px 22px;
    flex-direction: column;
    gap: 4px;
    font-size: 0.6rem;
  }
  .data-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .thread-list p {
    flex-direction: column;
    gap: 4px;
  }
  body[data-state="auth"] .sidebar {
    padding: 24px;
  }
  body[data-state="auth"] main {
    display: block;
    padding: 25px 24px 40px;
    max-width: 570px;
  }
  .auth-story h2 {
    font-size: 3.2rem;
    max-width: 400px;
  }
  .auth-story > p:not(.eyebrow) {
    font-size: 0.82rem;
  }
  .auth-art,
  .auth-note {
    display: none;
  }
  .auth-card {
    padding: 27px 24px;
    margin-top: 30px;
    border-radius: 20px;
  }
  .auth-card h3 {
    font-size: 1.4rem;
  }
  body[data-state="auth"] footer {
    padding: 22px 24px;
  }
}
@media (max-width: 380px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
  .auth-story h2 {
    font-size: 2.7rem;
  }
  .destination {
    min-height: 150px;
  }
  .welcome-strip {
    flex-direction: column;
    gap: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
body[data-state="auth"] main > [role="alert"] {
  grid-column: 1/-1;
}
.data-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}
.data-item:last-child {
  border: 0;
}
.data-item h4 {
  font-size: 0.65rem;
  color: #8c6d4e;
  margin-bottom: 8px;
}
main > label {
  margin-top: 25px;
}
main > a:not(.destination) {
  display: inline-block;
  font-size: 0.8rem;
  margin: 12px 14px 12px 0;
}
input[type="file"] {
  font-size: 0.78rem;
}
input::file-selector-button {
  border: 0;
  background: #e9eddf;
  color: #263b30;
  border-radius: 6px;
  padding: 6px 10px;
  margin-right: 10px;
}
fieldset legend {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0 10px;
}
.empty-state h3 {
  color: var(--color-text);
  font-size: 1.3rem;
}
.empty-state p {
  max-width: 440px;
  margin: 10px auto;
}
.hero > .eyebrow {
  font-size: 0.62rem;
  color: #79664c;
  letter-spacing: 0.14em;
}
.auth-story .eyebrow {
  font-size: 0.62rem;
}
.sidebar nav {
  padding-bottom: 15px;
}
/* Conversation workspace: stable history, independently scrolling transcript, anchored composer. */
.chat-history {
  display: none;
}
.chat-mode .chat-history {
  display: block;
  min-height: 0;
  overflow: auto;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #ffffff14;
  flex: 1;
}
.chat-mode .sidebar nav a {
  display: none;
}
.chat-mode .sidebar nav a[href="#home"],
.chat-mode .sidebar nav a[href="#threads"],
.chat-mode .sidebar nav a[href="#new"],
.chat-mode .sidebar nav a[href="#household"] {
  display: flex;
}
.chat-mode .sidebar nav button {
  display: none;
}
.chat-mode .sidebar .brand {
  margin-bottom: 28px;
}
.chat-mode .nav-eyebrow {
  display: none;
}
.chat-history > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.chat-history > input {
  width: 100%;
  background: #ffffff08 !important;
  border-color: #ffffff19 !important;
  color: #e0e8df !important;
  font-size: 0.72rem;
  min-height: 38px;
  padding: 9px 12px;
}
.chat-history > input::placeholder {
  color: #a4b5a6;
}
.chat-history > .eyebrow {
  font-size: 0.55rem;
  color: #a4b5a6;
  margin: 22px 10px 10px;
}
.chat-history-list a {
  display: block;
  color: #b8c8bc;
  font-size: 0.76rem;
  text-decoration: none;
  padding: 10px;
  border-radius: 7px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.chat-history-list a:hover,
.chat-history-list a[aria-current="page"] {
  background: #ffffff0b;
  color: white;
}
.chat-history-list > p {
  font-size: 0.72rem;
  color: #a4b5a6;
  padding: 0 10px;
}
.chat-mode .sidebar-bottom {
  margin-top: 0;
  padding-top: 15px;
}
.chat-mode .topbar {
  height: 58px;
}
.chat-mode footer {
  display: none;
}
.chat-mode main {
  max-width: none;
  padding: 0;
  height: calc(100dvh - 58px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: none;
}
.chat-mode main.chat-welcome {
  overflow-y: auto;
}
.chat-toolbar {
  height: 70px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 32px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  z-index: 2;
}
.chat-toolbar h2 {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 auto 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.chat-toolbar label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.chat-toolbar select {
  font-size: 0.75rem;
  min-height: 36px;
  width: 100px;
  padding: 6px 10px;
  background: transparent;
}
.thread-actions {
  margin: 0;
  padding: 7px 10px;
  white-space: nowrap;
  font-size: 0.7rem;
  border: 0;
  background: transparent;
  position: relative;
}
.thread-actions summary {
  font-size: 0.7rem;
}
.thread-actions[open] {
  position: absolute;
  right: 24px;
  top: 72px;
  z-index: 5;
  background: white;
  box-shadow: 0 8px 30px #17292514;
  border: 1px solid var(--color-border);
  padding: 16px;
  min-width: 180px;
}
.thread-actions a {
  display: block;
  font-size: 0.75rem;
}
.chat-mode .chat-messages {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #c7cec0 transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  padding: 24px max(32px, calc((100% - 780px) / 2));
  background: transparent;
}
.chat-mode .chat-messages article {
  padding: 20px 0;
  margin: 0 0 24px;
  background: transparent;
  border: 0;
  border-radius: 0;
  position: relative;
}
.chat-mode .chat-messages article[data-role="user"] {
  background: #e9ede3;
  margin: 10px 0 30px 15%;
  padding: 18px 24px;
  border-radius: 22px 22px 5px 22px;
}
.chat-mode .chat-messages article > h3 {
  font-size: 0.65rem;
  color: #65785f;
  margin: 0 0 12px;
  letter-spacing: 0.07em;
}
.message-body {
  font-size: 0.95rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.message-body p {
  color: var(--color-text);
  margin: 0 0 14px;
}
.message-body p:last-child {
  margin-bottom: 0;
}
.message-body h3 {
  margin: 24px 0 12px;
  font-size: 1.1rem;
}
.message-body code {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.8em;
  background: #e6eadd;
  padding: 2px 5px;
  border-radius: 4px;
}
.message-body pre {
  background: #e9ece3;
  font-size: 0.84rem;
  line-height: 1.6;
  border: 1px solid #d9dfd1;
}
.message-body pre code {
  background: none;
  padding: 0;
}
.message-body li {
  margin-bottom: 8px;
}
.message-copy {
  font-size: 0.65rem;
  padding: 3px 8px;
  min-height: 28px;
  background: transparent;
  border: 0;
  color: #687663;
  margin: 12px 0 0;
}
.composer-wrap {
  padding: 0 max(32px, calc((100% - 780px) / 2)) 13px;
  flex-shrink: 0;
  background: var(--color-bg);
}
.chat-composer {
  background: #fff !important;
  border: 1px solid #cdd6c7 !important;
  border-radius: 22px !important;
  padding: 14px 16px 10px !important;
  box-shadow: 0 4px 24px #17342307 !important;
  margin: 0 !important;
  position: relative;
}
.chat-composer > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.chat-composer textarea {
  width: 100%;
  border: 0;
  outline: 0;
  box-shadow: none !important;
  padding: 7px 5px;
  resize: none;
  min-height: 70px;
  max-height: 170px;
  background: transparent;
  font-size: 0.93rem;
  line-height: 1.55;
}
.chat-composer textarea:focus-visible {
  outline: 2px solid #b5805155;
  outline-offset: 1px;
  border-radius: 6px;
}
.composer-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}
.composer-controls > button {
  margin: 0 0 0 auto;
  min-height: 38px;
  padding: 8px 15px;
  border-radius: 12px;
  background: var(--sidebar);
  color: #fff;
  border: 0;
  font-size: 0.75rem;
}
.composer-controls > button[hidden] {
  display: none;
}
.composer-controls > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.composer-controls > select {
  width: 190px;
  min-height: 34px;
  font-size: 0.73rem;
  border: 0;
  padding: 5px;
  background: #f2f4ed;
}
.composer-hint {
  font-size: 0.6rem;
  color: #7e8977;
}
.attachment-control {
  border: 0;
  background: none;
  margin: 0;
  padding: 8px 0;
  position: relative;
}
.attachment-control summary {
  font-size: 0.76rem;
  color: #65765e;
}
.attachment-control[open] {
  position: absolute;
  bottom: 65px;
  left: 0;
  padding: 20px;
  background: white;
  border: 1px solid var(--color-border);
  box-shadow: 0 8px 30px #17342314;
  border-radius: 14px;
  max-width: 100%;
  z-index: 5;
}
.chat-disclaimer,
[data-design-slot="chat-disclaimer"] {
  text-align: center;
  font-size: 0.62rem;
  line-height: 1.5;
  color: #737e6b;
  margin: 11px auto 0;
  max-width: 680px;
}
[data-design-slot="stream-status"] {
  font-size: 0.7rem;
  color: #74826b;
  min-height: 20px;
  margin: 0 5px 6px;
}
.chat-composer > p {
  font-size: 0.7rem;
  color: #68785d;
  margin: 0;
}
.chat-welcome-inner {
  width: min(100% - 60px, 760px);
  margin: auto;
  padding: 70px 0 35px;
}
.chat-welcome-inner > .eyebrow {
  text-align: center;
  margin: 0 0 20px;
  color: #8b775b;
  font-size: 0.64rem;
}
.chat-welcome-inner > h2 {
  text-align: center;
  font-size: clamp(2rem, 3.3vw, 3rem);
  font-family: Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.045em;
  margin-bottom: 14px;
}
.chat-welcome-inner > p:not(.eyebrow) {
  text-align: center;
  font-size: 0.83rem;
  max-width: 450px;
  margin: 0 auto 30px;
}
.chat-welcome-inner .chat-composer {
  margin-top: 35px !important;
}
.suggestion-chips {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
}
.suggestion-chips button {
  border-radius: 30px;
  background: transparent;
  font-size: 0.71rem;
  min-height: 36px;
  margin: 0;
  padding: 9px 14px;
  font-weight: 400;
}
.chat-options {
  width: min(100% - 60px, 760px);
  margin: 15px auto 30px;
  background: transparent;
  border: 0;
  padding: 0;
}
.chat-options > summary {
  text-align: center;
  color: #728169;
  font-size: 0.7rem;
}
.chat-options > form {
  background: #fff;
  border: 1px solid var(--color-border);
  padding: 20px;
  border-radius: 15px;
  margin: 20px 0;
}
.all-chats a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  font-size: 0.8rem;
}
.knowledge-notes section {
  padding: 22px;
  background: #f1f3ec;
  border: 1px solid #dbe2d2;
  border-radius: 14px;
  margin: 18px 0;
}
.knowledge-notes textarea {
  max-width: none;
}
main[data-screen="household"] form > h3 {
  margin-top: 35px;
}
main[data-screen="household"] form > p {
  font-size: 0.8rem;
}
main[data-screen="household"] textarea {
  min-height: 170px;
  max-width: none;
}
@media (max-width: 1100px) {
  .chat-toolbar {
    padding-inline: 24px;
  }
  .chat-mode .chat-messages {
    padding-inline: 25px;
  }
  .composer-wrap {
    padding-inline: 25px;
  }
  .composer-hint {
    display: none;
  }
  .chat-welcome-inner {
    width: calc(100% - 50px);
  }
}
@media (max-width: 760px) {
  .chat-mode .sidebar {
    flex-shrink: 0;
  }
  .chat-mode .topbar {
    display: none;
  }
  .chat-mode main {
    height: calc(100dvh - 64px);
  }
  .chat-mode .chat-history {
    display: none;
  }
  .chat-mode .sidebar[data-open="true"] .chat-history {
    display: block;
    position: fixed;
    top: 300px;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--sidebar);
    padding: 20px;
    z-index: 30;
    margin: 0;
  }
  .chat-mode .sidebar nav {
    max-height: 235px;
    overflow: auto;
  }
  .chat-mode .sidebar-bottom {
    display: none;
  }
  .chat-toolbar {
    height: 58px;
    padding: 10px 18px;
    gap: 8px;
  }
  .chat-toolbar h2 {
    font-size: 0.8rem;
  }
  .chat-toolbar select {
    width: 80px;
    font-size: 0.68rem;
  }
  .thread-actions summary {
    font-size: 0.63rem;
  }
  .thread-actions[open] {
    top: 65px;
    right: 15px;
  }
  .chat-mode .chat-messages {
    padding: 18px;
  }
  .chat-mode .chat-messages article[data-role="user"] {
    margin-left: 8%;
    padding: 15px 18px;
  }
  .message-body {
    font-size: 0.9rem;
    line-height: 1.75;
  }
  .composer-wrap {
    padding: 0 12px max(10px, env(safe-area-inset-bottom));
  }
  .chat-composer {
    padding: 10px 13px !important;
    border-radius: 20px !important;
  }
  .chat-composer textarea {
    font-size: 16px;
    min-height: 60px;
  }
  .chat-disclaimer,
  [data-design-slot="chat-disclaimer"] {
    font-size: 0.55rem;
    padding-inline: 4px;
  }
  .chat-welcome-inner {
    width: calc(100% - 32px);
    padding: 45px 0 25px;
  }
  .chat-welcome-inner > h2 {
    font-size: 2.3rem;
  }
  .chat-welcome-inner > p:not(.eyebrow) {
    font-size: 0.75rem;
    padding-inline: 15px;
  }
  .chat-welcome-inner .chat-composer {
    margin-top: 28px !important;
  }
  .suggestion-chips {
    gap: 7px;
    margin: 20px 0;
  }
  .suggestion-chips button {
    font-size: 0.65rem;
    padding: 9px 11px;
    min-height: 36px;
  }
  .chat-options {
    width: calc(100% - 40px);
  }
  .chat-mode .sidebar .brand {
    margin: 0;
  }
}
.chat-mode .chat-messages .message-body h3 {
  font-size: 1.15rem;
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin: 24px 0 12px;
}
.chat-mode .chat-messages .message-body h3:first-child {
  margin-top: 0;
}
.chat-mode .chat-messages ul {
  padding-left: 23px;
}
.chat-mode .sidebar .brand {
  flex-shrink: 0;
}
.chat-mode .sidebar nav {
  flex-shrink: 0;
}
.chat-mode .chat-history {
  flex-shrink: 1;
}
.chat-mode .workspace {
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
.chat-mode .topbar {
  flex-shrink: 0;
}
.chat-mode main {
  height: auto;
  flex: 1;
  min-height: 0;
}
.composer-controls > .composer-hint {
  font-size: 0.6rem;
  color: #7e8977;
}
@media (max-width: 760px) {
  body.chat-mode {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .chat-mode .workspace {
    height: auto;
    flex: 1;
    min-height: 0;
  }
  .chat-mode main {
    height: 100%;
    flex: 1;
    min-height: 0;
  }
  .composer-controls > .composer-hint {
    display: none;
  }
}
.chat-mode .workspace {
  min-width: 0;
}
.chat-mode main {
  width: 100%;
  min-width: 0;
  margin: 0;
}
.chat-toolbar,
.chat-mode .chat-messages,
.composer-wrap {
  min-width: 0;
  width: 100%;
}
[hidden] {
  display: none !important;
}

.finance-ledger {
  margin-block: 1.5rem 3rem;
}
.ledger-filters {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(120px, 2fr);
  gap: 0.65rem 1rem;
  align-items: center;
}
.transaction-card {
  border: 1px solid #d8ded5;
  border-radius: 16px;
  padding: 1.1rem;
  margin-block: 0.75rem;
  background: #fffefb;
}
.transaction-card summary {
  cursor: pointer;
  font-weight: 650;
  line-height: 1.6;
}
.transaction-card[open] {
  box-shadow: 0 8px 30px #1729250b;
}
.account-card {
  border-bottom: 1px solid #d8ded5;
  padding-block: 1rem;
}
@media (max-width: 600px) {
  .ledger-filters {
    display: block;
  }
  .ledger-filters label {
    display: block;
    margin-top: 0.8rem;
  }
  .transaction-card {
    padding: 0.85rem;
  }
}
