:root {
  --paper: #f7f4ed;
  --white: #fffdf9;
  --ink: #302d27;
  --muted: #685f54;
  --line: #e4ded2;
  --accent: #a94f37;
  --soft: #eee6d8;
  --green: #4c684f;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
button:hover {
  background: var(--soft);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #a94f3790;
  outline-offset: 3px;
}
.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.primary:hover {
  background: #8c3f2b;
}
.primary span {
  margin-left: 18px;
}
a {
  color: var(--accent);
}
.topbar {
  height: 78px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 36px;
  gap: 24px;
  background: var(--white);
}
.brand {
  font-family: Georgia, serif;
  font-size: 25px;
  text-decoration: none;
  letter-spacing: -0.8px;
  color: var(--ink);
  white-space: nowrap;
}
.brand span {
  color: var(--accent);
}
.pill,
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 700;
}
.pill {
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 20px;
  color: var(--muted);
}
.account {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
}
.login {
  max-width: 520px;
  margin: 7vh auto;
  padding: 40px;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.consent-check {
  display: flex;
  align-items: start;
  gap: 8px;
}
.consent-check input {
  width: auto;
  margin-top: 6px;
}
#account-dialog {
  max-height: 90dvh;
  overflow-y: auto;
}
#google-button,
#link-google,
#key-login {
  margin: 18px 0;
}
.login h1 {
  font-family: Georgia, serif;
  font-size: 49px;
  line-height: 1.15;
  font-weight: 400;
  margin: 20px 0;
}
.login em {
  color: var(--accent);
}
p {
  margin: 12px 0;
}
.muted,
small {
  color: var(--muted);
  font-size: 13px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  margin: 18px 0 6px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cfc6b6;
  background: var(--white);
  color: var(--ink);
  border-radius: 8px;
}
textarea {
  resize: vertical;
  min-height: 68px;
  max-height: 230px;
}
.login button {
  width: 100%;
  margin-top: 20px;
}
.spending {
  margin: 16px clamp(16px, 4vw, 36px);
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}
.spending-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.spending-heading button {
  font-size: 12px;
  padding: 6px 10px;
}
.spending-amounts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.spending-amounts dt {
  font-size: 12px;
  color: var(--muted);
}
.spending-amounts dd {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.spending p {
  margin-bottom: 0;
}
.mode-banner {
  padding: 10px 36px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}
.mode-banner strong {
  color: var(--ink);
}
.layout {
  display: grid;
  grid-template-columns: 265px minmax(0, 1fr);
  max-width: 1500px;
  margin: auto;
  min-height: calc(100vh - 120px);
}
.selector {
  padding: 25px 20px;
  border-right: 1px solid var(--line);
  background: #f1ede4;
  overflow-wrap: anywhere;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 9px 0 12px;
}
.section-title h2 {
  font-size: 11px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  font-weight: 650;
}
.section-title button {
  padding: 3px 9px;
  border-color: transparent;
  background: transparent;
  font-size: 20px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 22px;
}
.stack button {
  text-align: left;
  border-color: transparent;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.stack button.active {
  border-color: #cbb9a2;
  background: var(--white);
}
.stack button:hover {
  background: var(--soft);
}
.stack small {
  font-size: 11px;
}
.conversation-row {
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
}
.conversation-row.active {
  border-color: #cbb9a2;
  background: var(--white);
}
.conversation-row .conversation-open {
  flex: 1;
  min-width: 0;
  padding: 9px 8px 9px 12px;
}
.conversation-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.unread-indicator {
  display: inline-block;
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2865a0;
}
.conversation-row .conversation-delete {
  width: 40px;
  min-height: 44px;
  padding: 10px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  color: var(--muted);
}
.conversation-delete svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.delete-conversation-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.sidebar-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 35px;
}
.conversation {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 1150px;
  width: 100%;
  margin: auto;
  align-self: stretch;
}
.conversation-heading {
  padding: 28px 38px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.conversation-heading h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 28px;
  margin: 5px 0;
}
.heading-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.heading-actions button {
  font-size: 12px;
}
.history {
  flex: 1;
  padding: 28px 38px;
  min-height: 310px;
}
.empty {
  text-align: center;
  max-width: 440px;
  margin: 40px auto 60px;
}
.empty-star {
  font-size: 65px;
  color: var(--accent);
}
.empty h2 {
  font:
    32px Georgia,
    serif;
}
.empty p {
  color: var(--muted);
}
.turn {
  margin-bottom: 30px;
}
.bubble {
  padding: 18px 22px;
  border-radius: 14px;
  max-width: 86%;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.user-bubble {
  background: var(--soft);
  margin-left: auto;
  border-bottom-right-radius: 3px;
}
.answer-bubble {
  background: var(--white);
  border: 1px solid var(--line);
  margin-top: 16px;
  border-bottom-left-radius: 3px;
}
.bubble p {
  margin: 5px 0 12px;
}
.bubble .answer-label {
  font-size: 10px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.bubble details {
  white-space: normal;
}
.bubble summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--accent);
}
.bubble .reading-note {
  color: var(--muted);
  font-size: 12px;
  margin-top: 16px;
}
.chart-reasoning {
  margin-top: 16px;
}
.technical-details {
  margin-top: 12px;
}
.bubble ul {
  padding-left: 18px;
  font-size: 12px;
  color: var(--muted);
}
.turn-status {
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0;
}
.turn-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.turn-actions button {
  font-size: 12px;
  padding: 6px 10px;
}
.pending {
  margin: 0 38px 12px;
  background: #eee9dd;
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: 9px;
  font-size: 13px;
}
.pending button {
  margin: 10px 8px 0 0;
  font-size: 12px;
}
.composer-wrap {
  padding: 0 38px 22px;
}
.profile-setup {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.profile-setup p {
  flex: 1 1 200px;
  margin: 0;
  font-size: 13px;
}
.profile-setup button {
  flex-shrink: 0;
}
.examples {
  display: flex;
  gap: 7px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.examples button {
  font-size: 11px;
  border-radius: 20px;
  background: transparent;
}
.composer-wrap form {
  display: flex;
  align-items: flex-end;
  padding: 9px;
  background: var(--white);
  border: 1px solid #cec4b4;
  border-radius: 13px;
  gap: 10px;
}
.composer-wrap textarea {
  border: 0;
  background: transparent;
  padding: 8px;
  flex: 1;
}
.composer-wrap .primary {
  margin-bottom: 3px;
}
.composer-note {
  font-size: 10px;
  color: var(--muted);
  margin: 8px 4px;
}
.error {
  color: #9b281e;
}
.notice {
  padding: 12px 36px;
  background: #f9e9df;
  border-bottom: 1px solid #dec6b8;
  color: #6d3f2b;
  font-size: 13px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  padding: 28px;
  width: min(620px, calc(100% - 24px));
  max-height: 90vh;
  overflow: auto;
  color: var(--ink);
}
dialog::backdrop {
  background: #28241d66;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.dialog-heading h2 {
  font:
    28px Georgia,
    serif;
  margin: 6px 0 12px;
}
.dialog-heading button {
  font-size: 23px;
  line-height: 1;
  padding: 6px 10px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
#birth-time-details {
  margin-top: 16px;
}
#birth-time-details summary {
  padding: 12px 0;
  cursor: pointer;
}
.inline {
  display: flex;
  gap: 8px;
}
.inline input {
  min-width: 0;
}
.inline button {
  white-space: nowrap;
}
.place-picker input {
  font-size: 16px;
}
.place-picker [role='listbox'] {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  border: 1px solid #cfc6b6;
  border-radius: 8px;
  background: var(--white);
  max-height: min(280px, 35vh);
  max-height: min(280px, 35dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.place-picker [role='option'] {
  padding: 12px;
  min-height: 54px;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.place-picker [role='option'] + [role='option'] {
  border-top: 1px solid var(--line);
}
.place-picker [role='option']:hover,
.place-picker [role='option'][aria-selected='true'] {
  background: var(--soft);
}
.place-picker [role='option'][aria-selected='true'] {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.place-picker [role='option'] strong,
.place-picker [role='option'] span {
  display: block;
}
.place-picker [role='option'] span {
  font-size: 12px;
  color: var(--muted);
}
.place-confirmed {
  border-left: 3px solid var(--green);
  padding: 8px 12px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
form > .primary {
  margin-top: 20px;
}
.inspector {
  width: min(780px, calc(100% - 24px));
}
.inspector pre,
pre {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  font-size: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 320px;
  overflow: auto;
}
.inspector details {
  margin: 15px 0;
}
.inspector summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.draft {
  background: #f5e4d4;
  border-left: 3px solid var(--accent);
  padding: 14px;
  margin: 15px 0;
}
.inspect-section {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 24px;
}
.inspect-section h3 {
  font-size: 16px;
}
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.comparison-grid article {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
}
.comparison-grid h3 {
  font-size: 13px;
}
.status-badge {
  font-size: 11px;
  color: var(--green);
  font-weight: 650;
}
.mobile-tools {
  display: none;
}
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 5;
  background: white;
  padding: 12px;
}
.skip:focus {
  top: 10px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
@media (max-width: 900px) {
  .topbar {
    padding: 0 20px;
  }
  .layout {
    grid-template-columns: 230px minmax(0, 1fr);
  }
  .conversation-heading {
    display: block;
    padding: 24px;
  }
  .heading-actions {
    margin-top: 14px;
  }
  .history {
    padding: 24px;
  }
  .composer-wrap {
    padding: 0 24px 20px;
  }
  .pending {
    margin-left: 24px;
    margin-right: 24px;
  }
}
@media (max-width: 650px) {
  .topbar {
    height: 65px;
    padding: 0 15px;
    gap: 12px;
  }
  .brand {
    font-size: 21px;
  }
  .account span {
    display: none;
  }
  .account button {
    font-size: 11px;
    padding: 6px;
  }
  .pill {
    display: none;
    font-size: 8px;
    letter-spacing: 1px;
  }
  .mode-banner {
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 5px 10px;
  }
  .mode-banner > span:last-child {
    flex-basis: 100%;
    font-size: 10px;
  }
  .layout {
    display: block;
  }
  .selector {
    display: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: 60vh;
    overflow: auto;
  }
  .selector.open {
    display: block;
  }
  .mobile-tools {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }
  .mobile-tools button {
    font-size: 12px;
  }
  .conversation-heading {
    padding: 19px 18px;
  }
  .conversation-heading h1 {
    font-size: 25px;
  }
  .history {
    padding: 20px 16px;
  }
  .bubble {
    max-width: 94%;
    padding: 15px;
  }
  .composer-wrap {
    padding: 0 16px 18px;
  }
  .pending {
    margin-left: 16px;
    margin-right: 16px;
  }
  .form-grid,
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    gap: 0;
  }
  .login {
    margin: 25px 12px;
    padding: 28px;
  }
  .login h1 {
    font-size: 41px;
  }
  .composer-wrap button {
    font-size: 12px;
  }
  .examples button {
    font-size: 10px;
  }
  .notice {
    padding: 12px 16px;
  }
  dialog {
    padding: 20px;
  }
  .heading-actions #refresh {
    display: none;
  }
  .empty {
    margin: 20px auto;
  }
  .empty h2 {
    font-size: 28px;
  }
  .inline {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
