.site-header {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.site-header h1 {
  margin-bottom: 0.25rem;
}

.site-header h1 a {
  text-decoration: none;
  color: inherit;
}

.tagline {
  color: var(--pico-muted-color, #666);
  margin-top: 0;
}

.form-errors,
.recommend-error {
  margin-bottom: 1rem;
}

.preferences {
  margin-bottom: 1.5rem;
}

.destination {
  margin-bottom: 1rem;
  scroll-margin-top: 1rem;
}

body.chat-page .chat-scroll-area {
  position: relative;
}

body.chat-page .chat-scroll-area--more-below::after {
  content: "";
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  display: block;
  height: 3rem;
  margin-top: -3rem;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent,
    color-mix(in srgb, var(--pico-background-color, #fff) 88%, transparent)
  );
}

.destination-photo {
  margin: 0.75rem 0 1rem;
}

.destination-photo img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 0;
}

.destination-photo-credit {
  margin: 0.35rem 0 0;
  font-size: 0.85em;
  line-height: 1.35;
  color: var(--pico-muted-color, #666);
}

.destination-photo-credit .destination-photo-description {
  display: block;
}

.destination-photo-credit a {
  color: inherit;
  text-decoration: underline;
}

.reasons {
  margin-bottom: 0;
}

.tradeoff-notices {
  margin: 0 0 1.25rem;
}

.tradeoff-notice {
  margin: 0 0 0.5rem;
  color: var(--pico-del-color, #a32);
}

.tradeoff-notice:last-child {
  margin-bottom: 0;
}

.caveats {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  color: var(--pico-del-color, #a32);
  font-size: 0.95em;
}

#results:empty {
  display: none;
}

#results:not(:empty) {
  margin-top: 2rem;
}

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

/* Chat type root: 1rem = former 0.9rem bubble size, then +1px. */
html:has(body.chat-page) {
  font-size: calc(90% + 1px);
}

body.chat-page {
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

body.chat-page > main.chat-app-main {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.saved-sidebar {
  box-sizing: border-box;
  flex: 0 0 18.33rem;
  width: 18.33rem;
  min-height: 100vh;
  margin: 0;
  padding: 0.94rem 0.78rem 1.39rem;
  background: #f7f7f8;
  border-right: 1px solid var(--pico-muted-border-color, #e5e7eb);
  border-radius: 0;
}

.saved-sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.44rem;
  margin-bottom: 1.11rem;
}

.saved-new-chat {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0.39rem 0.72rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.72rem;
  box-shadow: none;
  text-decoration: none;
  color: var(--pico-muted-color, #666);
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-transform: uppercase;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.saved-new-chat-icon {
  flex-shrink: 0;
  opacity: 0.75;
}

.saved-new-chat:hover,
.saved-new-chat:focus,
.saved-new-chat:active {
  background: color-mix(in srgb, var(--pico-primary, #0172ad) 10%, transparent);
  border-color: color-mix(in srgb, var(--pico-primary, #0172ad) 28%, transparent);
  box-shadow: none;
  text-decoration: none;
  color: var(--pico-primary, #0172ad);
  outline: none;
}

.saved-new-chat:hover .saved-new-chat-icon,
.saved-new-chat:focus .saved-new-chat-icon {
  opacity: 1;
}

.saved-sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.56rem;
  margin: 0 0 0.56rem;
  padding: 0 0.72rem;
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--pico-muted-color, #666);
}

.saved-sidebar-title-main {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.saved-sidebar-title-icon {
  flex-shrink: 0;
  opacity: 0.75;
}

.saved-ideas-count {
  font-variant-numeric: tabular-nums;
  text-transform: none;
  letter-spacing: 0;
}

.saved-ideas-empty {
  margin: 0.39rem 0 0;
  padding: 0 0.72rem;
  font-size: 0.94rem;
  color: var(--pico-muted-color, #666);
}

.saved-ideas-list {
  display: flex;
  flex-direction: column;
  gap: 0.17rem;
  padding: 0 0.72rem;
}

.saved-idea-row {
  display: flex;
  align-items: stretch;
  border-radius: 0.56rem;
}

.saved-idea-row.is-current {
  background: #ececee;
}

.saved-idea-open {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.11rem;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.5rem 0.61rem;
  background: transparent;
  border: none;
  box-shadow: none;
  text-align: left;
  color: inherit;
  cursor: pointer;
  font: inherit;
  line-height: 1.25;
}

.saved-idea-open:hover,
.saved-idea-row:hover {
  background: #ececee;
}

.saved-idea-name {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.87rem;
  font-weight: 500;
}

.saved-idea-meta {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.76rem;
  color: var(--pico-muted-color, #666);
}

.saved-idea-row .saved-idea-remove {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0.28rem;
  background: transparent;
  border: none;
  box-shadow: none;
  opacity: 0;
  line-height: 0;
  color: var(--pico-muted-color, #666);
}

.saved-idea-row .saved-idea-remove svg {
  display: block;
}

.saved-idea-row:hover .saved-idea-remove,
.saved-idea-row:focus-within .saved-idea-remove {
  opacity: 1;
}

.saved-idea-row .saved-idea-remove:hover,
.saved-idea-row .saved-idea-remove:focus-visible {
  color: var(--pico-del-color, #a32);
}

.conversations-sidebar-title {
  margin-top: 1.39rem;
}

.conversations-list {
  display: flex;
  flex-direction: column;
  gap: 0.17rem;
  padding: 0 0.72rem;
}

.conversation-row {
  display: flex;
  align-items: stretch;
  border-radius: 0.56rem;
}

.conversation-row.is-current {
  background: #ececee;
}

.conversation-open {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.11rem;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.5rem 0.61rem;
  text-align: left;
  background: transparent;
  border: none;
  box-shadow: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.conversation-open:hover {
  background: rgba(0, 0, 0, 0.04);
}

.conversation-title {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.87rem;
  font-weight: 500;
}

.conversation-meta {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.76rem;
  color: var(--pico-muted-color, #666);
}

.conversation-row .conversation-remove {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0.28rem;
  background: transparent;
  border: none;
  box-shadow: none;
  opacity: 0;
  line-height: 0;
  color: var(--pico-muted-color, #666);
}

.conversation-row .conversation-remove svg {
  display: block;
}

.conversation-row:hover .conversation-remove,
.conversation-row:focus-within .conversation-remove {
  opacity: 1;
}

.conversation-row .conversation-remove:hover,
.conversation-row .conversation-remove:focus-visible {
  color: var(--pico-del-color, #a32);
}

body.chat-page .chat-page-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  max-width: 740px;
  height: 100%;
  margin: 0 auto;
  padding: 1.11rem 1.11rem 0.83rem;
  overflow: hidden;
  box-sizing: border-box;
}

body.chat-page .chat-scroll-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.chat-page .chat-thread {
  display: flex;
  flex-direction: column;
  gap: 0.83rem;
  margin: 0 0 1.11rem;
}

body.chat-page .chat-bubble {
  max-width: 70%;
  margin: 0;
  border: none;
  padding: 0.78rem 1.06rem;
  border-radius: 1rem;
  font-size: 1rem;
}

body.chat-page .chat-bubble strong {
  display: none;
}

body.chat-page .chat-bubble-assistant {
  align-self: flex-start;
  margin-right: auto;
  background: #f3f4f6;
}

body.chat-page .chat-bubble-user {
  align-self: flex-end;
  margin-left: auto;
  background: #eef4f8;
}

body.chat-page .chat-bubble p {
  margin: 0;
}

body.chat-page .chat-bubble-text p {
  margin: 0 0 0.75rem;
}

body.chat-page .chat-bubble-text p:last-child {
  margin-bottom: 0;
}

body.chat-page .chat-bubble-text a {
  color: var(--pico-primary, #0172ad);
}

body.chat-page .chat-bubble-streaming p,
body.chat-page .chat-bubble-streaming .chat-bubble-text {
  min-height: 1.25em;
}

body.chat-page .chat-composer {
  flex-shrink: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0.56rem 0 0;
}

body.chat-page .chat-composer textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0.78rem 1.06rem;
  border: 1px solid color-mix(in srgb, var(--pico-primary, #0172ad) 35%, #c5d5e0);
  border-radius: 1rem;
  background: #eef4f8;
  color: inherit;
  font-size: 1rem;
  line-height: 1.45;
  resize: none;
  outline: none;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.chat-page .chat-composer textarea:focus,
body.chat-page .chat-composer textarea:focus-visible {
  border-color: var(--pico-primary, #0172ad);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--pico-primary, #0172ad) 18%, transparent);
}

body.chat-page .chat-phase,
body.chat-page .chat-results,
body.chat-page #chat-alerts:empty {
  margin: 0;
}

body.chat-page .chat-phase {
  color: var(--pico-muted-color, #666);
  font-style: italic;
}

body.chat-page .chat-phase-detail {
  display: block;
  margin-top: 0.28rem;
  font-style: normal;
  opacity: 0.85;
}

body.chat-page .chat-results {
  margin-top: 1.67rem;
}

body.chat-page .chat-results .destinations,
body.chat-page .saved-idea-preview .destination,
body.chat-page .saved-idea-preview .preferences {
  font-size: 1rem;
  line-height: 1.45;
}

body.chat-page .chat-results .destinations h2,
body.chat-page .saved-idea-preview .preferences h2 {
  font-size: 1.11rem;
  line-height: 1.35;
}

body.chat-page .chat-results .destination h3,
body.chat-page .saved-idea-preview .destination h3 {
  font-size: 1.06rem;
  line-height: 1.35;
}

body.chat-page .chat-results .destination p,
body.chat-page .saved-idea-preview .destination p,
body.chat-page .chat-results .preferences ul,
body.chat-page .saved-idea-preview .preferences ul,
body.chat-page .chat-results .reasons,
body.chat-page .saved-idea-preview .reasons,
body.chat-page .chat-results .tradeoff-notices,
body.chat-page .chat-results .caveats,
body.chat-page .saved-idea-preview .caveats {
  font-size: inherit;
}

body.chat-page .chat-alert {
  margin: 1.11rem 0;
  color: var(--pico-del-color, #a32);
}

body.chat-page .chat-caret {
  display: inline-block;
  width: 0.55ch;
  height: 1em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: currentColor;
  animation: chat-caret-blink 1s steps(1) infinite;
}

@keyframes chat-caret-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.seo-niche .seo-highlights {
  margin: 1.25rem 0 1.5rem;
}

.seo-niche .seo-cta {
  margin-bottom: 0.75rem;
}

.seo-nav {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--pico-muted-border-color, #ddd);
}

.seo-nav h3 {
  margin-bottom: 0.5rem;
}

.seo-nav ul {
  margin-bottom: 0;
}

body.chat-page .seo-nav-compact {
  flex-shrink: 0;
  margin-top: 0.56rem;
  padding-top: 0.56rem;
  border-top: 1px solid var(--pico-muted-border-color, #ddd);
  font-size: 0.83rem;
  line-height: 1.35;
  color: var(--pico-muted-color, #666);
}

body.chat-page .seo-nav-compact h3 {
  margin-bottom: 0.39rem;
  font-size: 0.83rem;
  font-weight: 600;
  color: inherit;
}

body.chat-page .seo-nav-compact ul {
  margin-bottom: 0;
}

body.chat-page .seo-nav-compact a {
  color: inherit;
}

.destination header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.destination header h3 {
  margin: 0;
}

.save-idea-btn {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0.22rem 0.78rem;
  font-size: 0.85em;
  font-weight: 500;
  white-space: nowrap;
}

.save-idea-btn.is-saved {
  background: transparent;
  border: 1px solid var(--pico-muted-border-color, #ccc);
  color: inherit;
}

.saved-idea-preview {
  margin: 0 0 1.39rem;
}

.saved-idea-preview:not([hidden]) {
  padding-bottom: 1.11rem;
  border-bottom: 1px solid var(--pico-muted-border-color, #ddd);
}

body.chat-page.viewing-saved-idea .chat-page-shell {
  overflow-y: auto;
}

body.chat-page.viewing-saved-idea #chat-scroll-area,
body.chat-page.viewing-saved-idea .chat-composer,
body.chat-page.viewing-saved-idea .seo-nav {
  display: none;
}

body.chat-page.viewing-saved-idea .saved-idea-preview:not([hidden]) {
  border-bottom: none;
  padding-bottom: 0;
}

.saved-idea-preferences {
  margin-top: 1.39rem;
}

.saved-idea-detail .saved-idea-detail-remove {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0.28rem;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--pico-muted-color, #666);
  line-height: 0;
  flex-shrink: 0;
}

.saved-idea-detail .saved-idea-detail-remove:hover,
.saved-idea-detail .saved-idea-detail-remove:focus-visible {
  color: var(--pico-del-color, #a32);
}

.saved-idea-detail .saved-idea-detail-remove svg {
  display: block;
}

.saved-idea-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.83rem;
  margin: 0.94rem 0 0.28rem;
}

.saved-idea-plan-note {
  margin: 0;
  font-size: 0.85em;
  color: var(--pico-muted-color, #666);
}

@media (max-width: 53.33rem) {
  .saved-idea-row .saved-idea-remove {
    opacity: 1;
  }
}
