:root {
  color-scheme: light;
  --radius: 14px;
  font-family: "Inter Tight", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

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

button,
a {
  touch-action: manipulation;
}

button {
  color: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

textarea,
input {
  caret-color: var(--accent);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--control-line) transparent;
}

svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke-width: 1.6;
}

button {
  border: 0;
  background: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-family: Fraunces, Georgia, serif;
  font-variation-settings: "opsz" 14;
  font-weight: 600;
  letter-spacing: -0.035em;
}

h1 {
  font-size: clamp(34px, 3.8vw, 50px);
  line-height: 1.15;
  text-wrap: balance;
}

h2 {
  font-size: 25px;
  line-height: 1.3;
}

h3 {
  font-size: 15px;
  font-weight: 600;
}

p {
  color: var(--muted);
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  z-index: 20;
  top: -80px;
  left: 20px;
  background: var(--accent);
  color: var(--surface-raised);
  padding: 10px 18px;
  border-radius: 8px;
}

.skip-link:focus {
  top: 15px;
}

.boot {
  display: grid;
  place-content: center;
  gap: 15px;
  min-height: 100dvh;
  text-align: center;
}

.noscript {
  padding: 30px;
}

.wordmark { display: inline-flex; align-items: center; text-decoration: none; line-height: 1; }

.shell {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 38px 22px 20px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
}

.brand {
  padding: 0 17px;
}

.house-switch {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  margin-top: 37px;
  font-size: 13px;
  font-weight: 550;
  background: var(--surface);
}

.house-switch svg {
  width: 18px;
}

.house-switch span {
  flex: 1;
}

.nav {
  display: grid;
  gap: 5px;
  margin-top: 28px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 450;
}

.nav a:hover {
  background: #e8edf8;
}

.nav a[aria-current="page"] {
  background: #dce4f5;
  color: var(--accent);
  font-weight: 650;
}

.nav a[aria-current="page"] svg {
  stroke-width: 2;
}

.nav-separator {
  height: 1px;
  background: var(--line);
  margin: 20px 16px;
}

.sidebar-bottom {
  margin-top: auto;
  padding: 32px 10px 0;
}

.account {
  display: flex;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.avatar {
  display: grid;
  place-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  font-family: Fraunces, serif;
  font-variation-settings: "opsz" 14;
  font-size: 17px;
  color: var(--accent);
}

.account-name {
  font-size: 13px;
  font-weight: 550;
}

.account-role {
  font-size: 11px;
  color: var(--muted);
}

.account button {
  margin-left: auto;
  padding: 7px;
}

.account svg {
  width: 17px;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 82px;
  padding: 0 49px;
  gap: 15px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.breadcrumb svg {
  width: 16px;
  height: 16px;
}

.breadcrumb span:last-child {
  color: var(--ink);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  color: var(--muted);
}

.mobile-brand {
  display: none;
}

.page {
  width: 100%;
  max-width: 1130px;
  margin: 0 auto;
  padding: 33px 49px 40px;
  flex: 1;
}

.page-intro {
  margin-bottom: 35px;
}

.page-intro p {
  margin-top: 12px;
  max-width: 600px;
  font-size: 15px;
}

.date {
  font-size: 12px;
  color: var(--muted);
}

.composer {
  border: 1px solid var(--control-line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  overflow: hidden;
}

.composer:focus-within {
  border-color: var(--accent);
  box-shadow: 0 4px 22px #1b3a8c09;
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 94px;
  max-height: 240px;
  resize: vertical;
  background: none;
  border: 0;
  padding: 23px 24px 10px;
  outline: none;
  font-size: 16px;
  color: var(--ink);
  line-height: 1.6;
}

.composer textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 15px 15px 24px;
}

.composer-hint {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
}

.composer-hint svg {
  width: 14px;
  height: 14px;
}

.send-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--surface-raised);
}

.send-button:hover {
  background: var(--accent-hover);
}

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

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.suggestion {
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 12px;
  background: transparent;
}

.suggestion:hover {
  background: var(--accent-soft);
  border-color: var(--control-line);
}

.suggestion svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: 23px;
}

.text-link {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.text-link:hover {
  text-decoration: underline;
}

.text-link svg {
  width: 14px;
  height: 14px;
}

.primary,
.secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 11px 17px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
}

.primary {
  background: var(--accent);
  color: var(--surface-raised);
}

.primary:hover {
  background: var(--accent-hover);
}

.secondary {
  border: 1px solid var(--control-line);
  background: var(--surface-raised);
}

.secondary:hover {
  background: var(--accent-soft);
}

.primary svg,
.secondary svg {
  width: 16px;
  height: 16px;
}

.receipt-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
}

.receipt-icon {
  width: 38px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  place-content: center;
  background: var(--sidebar);
  color: var(--muted);
}

.receipt-meta {
  flex: 1;
  min-width: 0;
}

.receipt-meta strong {
  font-size: 13px;
  font-weight: 550;
}

.receipt-meta p {
  font-size: 12px;
  margin-top: 2px;
}

.receipt-value {
  font-size: 13px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.agent-state {
  display: flex;
  align-items: center;
  gap: 7px;
}

.state-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--success);
}

.state-dot.busy {
  background: #805b19;
}

.empty-text {
  font-size: 13px;
  color: var(--muted);
  padding: 20px 0;
}

.preview-bar {
  background: var(--warning-soft);
  color: #6c501c;
  padding: 7px 18px;
  text-align: center;
  font-size: 12px;
}

.preview-bar a {
  margin-left: 8px;
}

.notice {
  font-size: 13px;
  line-height: 1.6;
  padding: 13px 16px;
  border-radius: 8px;
  background: var(--warning-soft);
  color: #6c501c;
  margin-bottom: 20px;
}

.notice button {
  font-weight: 600;
  text-decoration: underline;
}

.notice.error {
  background: #f9e9e4;
  color: var(--danger);
}

.loading-surface {
  padding: 55px 0;
  color: var(--muted);
}

.chat-page {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  max-width: 990px;
  padding-top: 13px;
  height: calc(100dvh - 82px);
  min-height: 550px;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}

.chat-header h1 {
  font-size: 30px;
}

.chat-header p {
  font-size: 12px;
  margin-top: 5px;
}

.chat-status {
  font-size: 12px;
  color: var(--muted);
}

.messages {
  flex: 1;
  overflow-y: auto;
  min-height: 120px;
  padding: 28px 4px 20px;
  overscroll-behavior: contain;
}

.message {
  margin: 0 0 28px;
  max-width: 87%;
  overflow-wrap: anywhere;
}

.message-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 9px;
}

.message-label .brand-small {
  font-family: Fraunces, serif;
  font-variation-settings: "opsz" 14;
  font-size: 21px;
  line-height: 1;
  color: var(--accent);
}

.message-label time {
  color: var(--muted);
  font-weight: 400;
  font-size: 10px;
}

.message-body {
  white-space: pre-wrap;
  line-height: 1.75;
  font-size: 14px;
  max-width: 68ch;
}

.message-body a {
  color: var(--accent);
  text-decoration: underline;
}

.message.user {
  margin-left: auto;
  max-width: 78%;
}

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

.message.user .message-body {
  background: var(--accent-soft);
  padding: 14px 19px;
  border-radius: 14px 14px 3px 14px;
}

.message.pending {
  opacity: 0.65;
}

.chat-empty {
  display: grid;
  place-content: center;
  min-height: 100%;
  text-align: center;
  max-width: 600px;
  margin: auto;
  padding: 20px;
}

.chat-empty h2 {
  font-size: 30px;
}

.chat-empty p {
  margin: 12px 0 20px;
  font-size: 14px;
  max-width: 43ch;
}

.chat-empty .suggestions {
  justify-content: center;
}

.chat-page .composer {
  flex-shrink: 0;
}

.chat-page .composer textarea {
  min-height: 71px;
  font-size: 14px;
  padding-top: 17px;
}

.chat-disclaimer {
  font-size: 11px;
  text-align: center;
  padding-top: 11px;
}

.thinking {
  display: flex;
  gap: 5px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  padding: 6px 0 19px;
}

.thinking span:first-child {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: breathe 1.4s ease-in-out infinite;
}

@keyframes breathe {
  50% {
    opacity: 0.35;
  }
}

.detail-section {
  margin: 32px 0 38px;
}

.detail-section .section-heading {
  padding-bottom: 17px;
  border-bottom: 1px solid var(--control-line);
}

.detail-section > p {
  font-size: 13px;
  margin-top: -6px;
  margin-bottom: 14px;
}

.detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 25px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.detail-row .label {
  font-size: 14px;
  font-weight: 550;
  margin-bottom: 4px;
}

.detail-row p {
  font-size: 13px;
  max-width: 65ch;
}

.detail-value {
  font-size: 14px;
  text-align: right;
  max-width: 60%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--success);
  padding: 4px 9px;
  font-size: 11px;
  border-radius: 5px;
  white-space: nowrap;
}

.badge.warn {
  background: var(--warning-soft);
  color: #6c501c;
}

.badge.neutral {
  background: var(--sidebar);
  color: var(--muted);
}

.connection-row {
  display: flex;
  align-items: center;
  gap: 19px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.connection-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-raised);
  color: var(--muted);
}

.connection-icon svg {
  width: 23px;
  height: 23px;
}

.connection-copy {
  flex: 1;
  min-width: 0;
}

.connection-copy h3 {
  font-size: 14px;
}

.connection-copy p {
  font-size: 13px;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.connection-copy .connection-address {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

.quiet-box {
  margin-top: 35px;
  padding: 25px 0;
  border-top: 1px solid var(--line);
}

.quiet-box p {
  font-size: 13px;
  margin-top: 10px;
  max-width: 70ch;
}

.sign-out {
  color: var(--danger);
}

@media (min-width: 1600px) {
.page {
    padding-top: 55px;
  }

.topbar {
    padding-inline: 65px;
  }

.chat-page {
    padding-top: 20px;
  }

}

@media (max-width: 1100px) {
.shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

.sidebar {
    padding-inline: 15px;
  }

.topbar {
    padding-inline: 32px;
  }

.page {
    padding-inline: 32px;
  }

.topbar-right .date {
    display: none;
  }

.suggestion {
    font-size: 11px;
  }

}

@media (max-width: 850px) {




}

@media (max-width: 650px) {
.shell {
    display: flex;
    flex-direction: column;
  }

.sidebar {
    position: fixed;
    inset: auto 0 0;
    height: auto;
    z-index: 5;
    display: block;
    padding: 0 12px env(safe-area-inset-bottom);
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-right: 0;
  }

.sidebar .brand,
.house-switch,
.sidebar-bottom,
.nav-separator {
    display: none;
  }

.nav {
    display: flex;
    justify-content: space-between;
    margin: 0;
    gap: 0;
  }

.nav a {
    padding: 11px 3px 9px;
    flex-direction: column;
    gap: 4px;
    border-radius: 0;
    min-width: 50px;
    font-size: 10px;
  }

.nav a[aria-current="page"] {
    background: none;
    color: var(--accent);
  }

.nav a[aria-current="page"] svg {
    background: var(--accent-soft);
    box-sizing: content-box;
    padding: 3px 13px;
    border-radius: 12px;
    margin: -3px -13px;
  }

.nav svg {
    width: 19px;
    height: 19px;
  }

.topbar {
    height: 72px;
    padding: 0 22px;
    border-bottom: 1px solid var(--line);
  }

.mobile-brand {
    display: block;
    font-size: 28px;
  }

.breadcrumb {
    display: none;
  }

.topbar-right {
    gap: 9px;
    font-size: 11px;
  }

.page {
    padding: 32px 22px 100px;
  }

.composer textarea {
    padding: 18px 17px 10px;
    font-size: 14px;
    min-height: 106px;
  }

.composer-footer {
    padding: 0 12px 12px 17px;
  }

.composer-hint {
    font-size: 10px;
  }

.suggestions {
    gap: 7px;
  }

.suggestion {
    padding: 8px 10px;
    font-size: 11px;
    gap: 6px;
  }

.suggestion svg {
    width: 14px;
  }

.section-heading {
    margin-bottom: 17px;
  }

.section-heading h2 {
    font-size: 22px;
  }

.preview-bar {
    font-size: 10px;
    padding: 6px 12px;
  }

.chat-page {
    height: calc(100dvh - 138px - env(safe-area-inset-bottom));
    min-height: 350px;
    padding: 20px 18px 13px;
  }

.has-preview .chat-page {
    height: calc(100dvh - 165px - env(safe-area-inset-bottom));
  }

.chat-header {
    padding-bottom: 15px;
  }

.chat-header h1 {
    font-size: 27px;
  }

.chat-status {
    font-size: 10px;
  }

.chat-page .composer textarea {
    min-height: 66px;
    padding: 14px 15px 8px;
    max-height: 140px;
  }

.chat-page .composer-footer {
    padding-left: 15px;
    padding-bottom: 10px;
  }

.chat-page .composer-hint {
    font-size: 10px;
  }

.chat-disclaimer {
    font-size: 9px;
    padding-top: 8px;
  }

.message {
    max-width: 95%;
  }

.message.user {
    max-width: 90%;
  }

.message-body {
    font-size: 13px;
  }

.messages {
    padding-top: 22px;
  }

.chat-empty h2 {
    font-size: 28px;
  }

.chat-empty p {
    font-size: 13px;
  }

.chat-empty {
    padding: 5px 0 15px;
  }

.chat-empty .suggestions {
    margin-top: 0;
  }

.page-intro h1 {
    font-size: 36px;
  }

.page-intro {
    margin-bottom: 23px;
  }

.page-intro p {
    font-size: 14px;
  }

.detail-section {
    margin-top: 23px;
  }

.detail-row {
    gap: 15px;
    padding: 18px 0;
  }

.detail-value {
    font-size: 13px;
  }

.detail-row .label {
    font-size: 13px;
  }

.detail-row p {
    font-size: 12px;
  }

.detail-section .section-heading h2 {
    font-size: 22px;
  }

.detail-section .text-link {
    font-size: 11px;
  }

.badge {
    font-size: 10px;
    padding: 4px 7px;
  }

.connection-row {
    gap: 12px;
    padding: 22px 0;
    flex-wrap: wrap;
  }

.connection-icon {
    width: 37px;
    height: 37px;
    border-radius: 10px;
  }

.connection-copy h3 {
    font-size: 13px;
  }

.connection-copy p {
    font-size: 12px;
  }

.connection-row > .badge {
    margin-left: 49px;
    margin-top: -6px;
  }

.connection-row > .secondary {
    margin-left: 49px;
  }



















}

@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

}

.action-spaced {
  margin-top: 18px;
}

.login-note svg {
  width: 12px;
  height: 12px;
  vertical-align: -2px;
  margin-right: 4px;
}

@media (min-width: 651px) {
.has-preview .chat-page {
    height: calc(100dvh - 114px);
  }

}

select { font: inherit; color: inherit; }

button,
input,
textarea,
select { accent-color: var(--accent); }

.wordmark { letter-spacing: -0.04em; }

.house-switch { margin-top: 30px; align-items: flex-start; }

.house-switch span { min-width: 0; overflow-wrap: anywhere; }

.house-switch small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 400; }

.nav { gap: 3px; margin-top: 22px; }

.nav a { padding-block: 10px; }

.nav-separator { margin-block: 12px; }

.sidebar { overflow-y: auto; }

.sidebar-bottom { padding-top: 22px; }

.account-name { max-width: 108px; overflow-wrap: anywhere; }

.breadcrumb { min-width: 0; }

.breadcrumb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 230px; }

.topbar-chat { color: var(--accent); font-weight: 550; }

.topbar-chat svg { width: 17px; height: 17px; }

.intro-actions { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; }

.intro-actions > div:first-child { min-width: 0; }

.intro-actions > .primary,
.intro-actions > .secondary,
.intro-actions > .button-group { margin-top: 5px; flex-shrink: 0; }

.intro-actions h1 { max-width: 17ch; }

.intro-actions p { max-width: 60ch; font-size: 14px; line-height: 1.7; }

.button-group { display: flex; gap: 9px; align-items: center; }

.workspace-section { margin-top: 37px; }

.workspace-section:first-child { margin-top: 0; }

.workspace-section .section-heading { margin-bottom: 12px; }

.section-count { font-size: 12px; color: var(--muted); }

.row-copy { min-width: 0; flex: 1; }

.row-copy h3 { overflow-wrap: anywhere; font-size: 14px; font-weight: 550; line-height: 1.55; }

.row-copy p { margin-top: 3px; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }

.row-edit { min-width: 42px; min-height: 42px; justify-content: flex-end; flex-shrink: 0; }

.empty-state { border-top: 1px solid var(--line); padding: 25px 0 20px; }

.empty-state h3 { font-size: 14px; font-weight: 550; }

.empty-state p { margin-top: 6px; font-size: 13px; max-width: 60ch; line-height: 1.7; }

.empty-state .text-link { margin-top: 9px; min-height: 36px; justify-content: flex-start; }

.order-row { display: flex; align-items: flex-start; gap: 15px; padding: 18px 0; border-top: 1px solid var(--line); }

.form-field input,
.form-field textarea,
.form-field select { width: 100%; padding: 10px 12px; border: 1px solid var(--control-line); border-radius: 7px; background: var(--surface-raised); color: var(--ink); min-height: 44px; font-size: 14px; }

.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--muted); opacity: 1; }

.order-row > strong { font-size: 13px; font-weight: 550; white-space: nowrap; font-variant-numeric: tabular-nums; }

.notice.success { background: var(--accent-soft); color: var(--success); display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.notice.success button { margin: -8px; width: 36px; height: 36px; display: grid; place-content: center; }

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

.form-field { margin-bottom: 19px; min-width: 0; }

.form-field:last-child { margin-bottom: 0; }

.form-field > label,
fieldset > legend { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 550; }

.form-field > label > span { font-weight: 400; color: var(--muted); font-size: 11px; }

.form-field textarea { resize: vertical; min-height: 80px; line-height: 1.6; }

.form-field select { padding-right: 30px; }

.field-hint { font-size: 11px; line-height: 1.65; margin-top: 7px; color: var(--muted); max-width: 70ch; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; margin-bottom: 19px; }

.form-grid .form-field { margin-bottom: 0; }

.delete-button { margin-right: auto; padding-block: 10px; color: var(--danger); font-size: 13px; }

.delete-button:hover { text-decoration: underline; text-underline-offset: 4px; }

.danger-button { padding: 11px 15px; font-size: 13px; border-radius: 7px; background: var(--danger); color: var(--surface-raised); }

.danger-button:hover { background: #822b1b; }

@media (max-width: 1100px) {
.intro-actions { gap: 20px; flex-wrap: wrap; }

.intro-actions h1 { max-width: none; }

}

@media (max-width: 650px) {
.sidebar { overflow: visible; padding-inline: 8px; }

.nav { margin-top: 0; }

.nav > a { flex: 1 1 0; min-width: 0; }

.nav > a { padding: 12px 2px 10px; font-size: 10px; }

.topbar-chat { font-size: 12px; }

.intro-actions { display: block; }

.intro-actions h1 { font-size: 37px; max-width: 15ch; }

.intro-actions p { font-size: 13px; margin-top: 12px; }

.intro-actions > .primary,
.intro-actions > .secondary,
.intro-actions > .button-group { margin-top: 21px; }

.workspace-section { margin-top: 31px; }

.section-heading { gap: 9px; }

.section-heading h2 { font-size: 23px; }

.section-heading .text-link { font-size: 11px; }

.row-copy h3 { font-size: 14px; }

.row-copy p { font-size: 12px; }

.order-row { gap: 12px; flex-wrap: wrap; }

.order-row .row-copy { flex-basis: 70%; }

.order-row > strong { font-size: 12px; }

.form-field input,
.form-field textarea,
.form-field select { font-size: 16px; }

.form-grid { gap: 12px; }

.form-field label { font-size: 12px; }

}

@media (max-width: 370px) {
.page { padding-inline: 18px; }

.form-grid { grid-template-columns: 1fr; gap: 19px; }

}

/* Memory is a readable notebook; editing happens beside the saved context. */
.memory-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 5px 0 20px; }
.memory-toolbar input { width: min(340px, 75%); min-height: 44px; padding: 10px 13px; color: var(--ink); background: var(--surface-raised); border: 1px solid var(--control-line); border-radius: 7px; }
.memory-toolbar input::placeholder { color: var(--muted); opacity: 1; }
.memory-list { border-bottom: 1px solid var(--line); }
.memory-row { display: flex; align-items: flex-start; gap: 28px; padding: 26px 0; border-top: 1px solid var(--line); }
.memory-copy { min-width: 0; flex: 1; }
.memory-text { font-size: 16px; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; max-width: 70ch; line-height: 1.7; }
.memory-meta { font-size: 11px; margin-top: 10px; color: var(--muted); }
.memory-row > .row-edit { margin-top: -7px; }
.memory-expanded { margin-top: 8px; }
.memory-expanded summary, .receipt-items summary { font-size: 12px; padding-block: 5px; color: var(--accent); cursor: pointer; }
.memory-expanded .memory-text { margin-top: 12px; }
.memory-note { margin-top: 22px; }
.memory-editor { padding: 24px; margin-bottom: 26px; background: var(--accent-soft); border-radius: 12px; }
.memory-list .memory-editor { margin-top: 20px; }
.memory-editor > label { display: block; font-size: 15px; font-weight: 550; }
.memory-editor > .field-hint { color: var(--muted); max-width: 65ch; margin: 7px 0 17px; font-size: 12px; }
.memory-editor textarea { display: block; width: 100%; min-height: 145px; max-height: 55dvh; resize: vertical; border: 1px solid var(--control-line); border-radius: 7px; background: var(--surface-raised); padding: 13px 15px; font-size: 15px; color: var(--ink); line-height: 1.7; }
.memory-editor textarea::placeholder { color: var(--muted); }
.memory-editor .notice, .profile-editor .notice { margin-top: 15px; }
.form-actions { display: flex; justify-content: flex-end; gap: 15px; align-items: center; margin-top: 19px; }
.form-actions .delete-button { margin-right: auto; }
.forget-confirmation { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.forget-confirmation p { color: var(--muted); font-size: 13px; max-width: 65ch; margin-bottom: 15px; }
.profile-editor { padding-block: 12px 20px; }
.profile-editor fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.section-note { margin-top: 16px; max-width: 70ch; font-size: 12px; line-height: 1.7; }
.saved-details { margin-top: 42px; border-top: 1px solid var(--line); padding-top: 7px; }
.saved-details > summary { padding-block: 18px; font-family: Fraunces, Georgia, serif; font-size: 23px; cursor: pointer; }
.saved-details > summary span { margin-left: 8px; font-family: 'Inter Tight', sans-serif; font-size: 12px; color: var(--muted); }
.saved-details > .section-note { margin-top: 0; margin-bottom: 12px; }
.saved-products-title { margin-top: 28px; font-size: 14px; }
.saved-product { border-bottom: 1px solid var(--line); padding: 18px 0; }
.saved-product h3 { font-size: 14px; }
.saved-product p { font-size: 12px; margin-top: 5px; line-height: 1.7; }
.activity-row { display: flex; align-items: flex-start; gap: 24px; border-top: 1px solid var(--line); padding: 22px 0; }
.activity-row h3 a { color: var(--ink); text-decoration: none; }
.activity-row h3 a:hover { text-decoration: underline; }
.activity-row .badge { flex-shrink: 0; }
.chat-empty { text-align: left; max-width: 680px; width: 100%; padding: 30px 0; }
.chat-empty h2 { font-size: clamp(34px, 3.4vw, 46px); max-width: 16ch; }
.chat-empty p { max-width: 48ch; line-height: 1.75; }
.chat-empty .suggestions { justify-content: flex-start; }
.chat-empty .starter-note { font-size: 11px; margin: 15px 0 0; max-width: 60ch; }
.chat-page .composer textarea { min-height: 90px; }
.chat-page:has(.chat-empty) .composer textarea { min-height: 115px; }
.chat-header > div { min-width: 0; }
.chat-status { flex-shrink: 0; }
@media (max-width: 650px) {
  .nav > a { flex: 1 1 0; min-width: 0; padding: 12px 2px 10px; }
  .nav { margin-top: 0; }
  .sidebar { overflow: visible; padding-inline: 8px; }
  .memory-toolbar { gap: 12px; }
  .memory-toolbar input { font-size: 16px; width: min(235px, 73%); }
  .memory-toolbar .section-count { font-size: 11px; white-space: nowrap; }
  .memory-row { gap: 18px; padding: 23px 0; }
  .memory-text { font-size: 15px; }
  .memory-meta { font-size: 10px; }
  .memory-editor { padding: 19px 17px; margin-inline: -3px; }
  .memory-editor textarea { font-size: 16px; padding: 11px 12px; }
  .memory-editor .primary, .memory-editor .secondary { padding-inline: 12px; font-size: 12px; }
  .form-actions { gap: 8px; }
  .form-actions .button-group { gap: 7px; }
  .memory-editor > label { font-size: 14px; }
  .saved-details { margin-top: 34px; }
  .saved-details > summary { font-size: 22px; }
  .activity-row { flex-wrap: wrap; gap: 9px; }
  .activity-row .row-copy { flex-basis: 100%; }
  .activity-row .badge { font-size: 10px; }
  .chat-empty { padding-block: 10px; }
  .chat-empty h2 { font-size: 34px; }
  .chat-empty p { font-size: 13px; margin-bottom: 17px; }
  .chat-empty .suggestions { gap: 7px; }
  .chat-empty .starter-note { font-size: 10px; margin-top: 12px; }
  .chat-header { align-items: flex-start; }
  .chat-status { max-width: 90px; font-size: 10px; padding-top: 4px; }
  .chat-page .composer textarea { min-height: 75px; }
  .chat-page:has(.chat-empty) .composer textarea { min-height: 90px; }
  .composer-hint { max-width: 25ch; }
  .detail-row { flex-wrap: wrap; gap: 7px; }
  .detail-value { text-align: left; max-width: 100%; flex-basis: 100%; }
}

/* Shopping extends the existing household list and form surfaces. */
.shopping-row { display: flex; align-items: flex-start; gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.shopping-row .row-copy { flex: 1; min-width: 0; }
.shopping-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 14px; max-width: 310px; }
.shopping-actions button { min-height: 44px; }
#shopping-form fieldset { border: 0; padding: 0; min-width: 0; }
#shopping-form h2 { margin-bottom: 24px; }
@media (max-width: 700px) {
 .shopping-row { flex-direction: column; gap: 12px; }
 .shopping-actions { justify-content: flex-start; max-width: none; }
 .workspace-section .section-heading { flex-wrap: wrap; gap: 12px; }
}

/* Photos stay beside the conversation, before they are sent. */
.attachments { display:flex; flex-wrap:wrap; gap:10px; }
.attachments:empty { display:none; }
.attachment { display:flex; align-items:center; gap:8px; padding:8px 0; max-width:100%; font-size:12px; }
.attachment img { width:48px; height:56px; object-fit:cover; border-radius:4px; }
.attachment span { max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.attachment button,.photo-button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:44px; background:transparent; border:0; color:var(--accent); }
.attachment button { width:44px; }
.attachment svg,.photo-button svg { width:18px; height:18px; }
.photo-button { flex-shrink:0; font-size:13px; padding:0 8px 0 0; }
.message-photos { font-size:12px; color:var(--muted); margin-top:10px; }
@media(max-width:700px) { .composer-footer { flex-wrap:wrap; } .composer-hint { order:3; flex-basis:100%; } .send-button { margin-left:auto; } }

/* The tile is a brand surface; working content stays on quiet glaze. */
.sidebar { border-top: 6px solid var(--accent); }
.sidebar .brand { padding: 16px 17px; }
.sidebar-bottom::before { content: ""; display: block; height: 64px; margin: 20px -22px; background: url("/brand/pattern/tile-pattern.svg") 0 0 / 256px 256px; }
.brand-small { width: 24px; height: 24px; object-fit: contain; }
.empty-state > .brand-rosette { margin-bottom: 18px; }
.chat-empty { min-height: 100%; align-content: safe center; }
.chat-header, .composer, .composer-note { flex-shrink: 0; }
.saved-details > summary { font-variation-settings: "opsz" 14; }
input, textarea, select { font-variant-numeric: tabular-nums; }

/* Public landing and Telegram sign-in. */
.sign-in { min-height: 100dvh; }
.landing-header, .landing-content, .landing-footer-inner { width: min(1100px, 100%); margin-inline: auto; padding-inline: 32px; }
.landing-header { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.landing-header .wordmark, .landing-footer .wordmark { padding: 18px; margin-left: -18px; }
.landing-nav { display: flex; gap: 28px; align-items: center; font-size: 14px; font-weight: 600; }
.landing-nav a { padding-block: 12px; text-decoration: none; }
.landing-nav a:hover { text-decoration: underline; }
.landing-hero { padding: 72px 32px; display: grid; place-items: center; }
.landing-hero .tile-panel { width: min(720px, 100%); padding: 48px 56px; }
.landing-hero h1 { font-size: clamp(44px, 4.8vw, 64px); line-height: 1.07; letter-spacing: -.02em; font-weight: 700; max-width: 15ch; }
.landing-hero h1 em { color: var(--accent); }
.landing-hero p { max-width: 45ch; font-size: 18px; line-height: 1.6; margin-top: 22px; }
.landing-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.landing-actions a { display: inline-flex; align-items: center; min-height: 48px; text-decoration: none; }
.landing-content { padding-block: 64px 72px; }
.landing-content > h2 { font-size: 32px; }
.landing-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; margin-top: 28px; }
.landing-feature { border-top: 1px solid var(--line); padding-top: 24px; }
.landing-feature h3 { margin: 16px 0 8px; font-size: 17px; }
.landing-feature p { font-size: 16px; line-height: 1.65; max-width: 32ch; }
.landing-sign-in { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; border-top: 1px solid var(--line); margin-top: 56px; padding-top: 48px; scroll-margin-top: 24px; }
.landing-sign-in > div > h2 { font-size: 40px; max-width: 14ch; }
.landing-sign-in > div > p { margin-top: 18px; max-width: 36ch; font-size: 16px; }
.sign-in-form h2 { font-size: 28px; }
.sign-in-form > p { margin-top: 12px; font-size: 15px; }
.sign-in-form form { margin-top: 24px; }
.sign-in-form .primary { width: 100%; min-height: 48px; }
.phone-consent { font-size: 13px; margin-top: 16px; color: var(--muted); }
.sign-in-form .login-note { display: flex; gap: 8px; font-size: 12px; margin-top: 20px; align-items: center; }
.sign-in-form .notice { margin-top: 20px; margin-bottom: 0; }
.landing-footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-bottom: 28px; color: var(--muted); font-size: 12px; }
.landing-footer::after { content: ""; display: block; height: 96px; background: url("/brand/pattern/tile-pattern.svg") 0 0 / 256px 256px; }
@media (max-width: 650px) {
  .sidebar { border-top: 1px solid var(--line); }
  .sidebar-bottom::before { display: none; }
  .mobile-brand .brand-logo { width: 112px; }
  .landing-header, .landing-content, .landing-footer-inner { padding-inline: 24px; }
  .landing-header { min-height: 84px; gap: 16px; }
  .landing-header .brand-logo { width: 120px; }
  .landing-nav { font-size: 13px; gap: 18px; }
  .landing-nav .how-link { display: none; }
  .landing-hero { padding: 40px 27px; }
  .landing-hero .tile-panel { padding: 32px 22px; }
  .landing-hero h1 { font-size: 44px; }
  .landing-hero p { font-size: 16px; margin-top: 20px; }
  .landing-actions { flex-direction: column; }
  .landing-actions a { justify-content: center; }
  .landing-content { padding-block: 42px; }
  .landing-content > h2 { font-size: 28px; }
  .landing-features { grid-template-columns: 1fr; gap: 24px; }
  .landing-feature { display: grid; grid-template-columns: 28px 1fr; gap: 4px 16px; }
  .landing-feature .brand-rosette { grid-row: span 2; margin-top: 1px; }
  .landing-feature h3 { margin: 0 0 4px; }
  .landing-feature p { max-width: none; font-size: 15px; }
  .landing-sign-in { grid-template-columns: 1fr; gap: 28px; margin-top: 36px; padding-top: 32px; }
  .landing-sign-in > div > h2 { font-size: 32px; max-width: none; }
  .landing-footer-inner { align-items: flex-start; flex-direction: column; gap: 4px; }
}
@media (max-width: 700px) {
  .composer-footer .composer-hint { max-width: none; }
  .send-button { flex-shrink: 0; }
}

.shopping-suggestion { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
.shopping-suggestion button { min-height: 52px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.shopping-suggestion button:hover { background: var(--accent-soft); }
.shopping-suggestion .suggestion-add { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 8px 4px; text-align: left; font: inherit; }
.shopping-suggestion .suggestion-add span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shopping-suggestion svg { width: 24px; height: 24px; flex: none; }
.shopping-suggestion .suggestion-dismiss { flex: none; width: 44px; padding: 10px; color: var(--muted); }
