:root {
  --ink: #161616;
  --muted: #61594f;
  --line: rgba(125, 81, 28, 0.18);
  --brand: #cc935b;
  --brand-deep: #1f2e92;
  --shadow: 0 20px 48px rgba(36, 28, 16, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: #fff;
}

body.blank-demo {
  overflow-x: hidden;
}

html,
body.widget-only-page {
  background: transparent;
}

body.widget-only-page {
  min-height: 100vh;
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.blank-demo-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 28px 28px 140px;
}

.blank-demo-stage {
  min-height: calc(100vh - 168px);
  min-height: calc(100dvh - 168px);
  background: #fff;
}

.blank-demo-grid-wrap {
  width: min(1320px, 100%);
  margin: 0 auto;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 22px;
}

.blank-catalog-grid {
  padding-right: 460px;
}

.catalog-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(204, 147, 91, 0.16);
}

.catalog-cover-wrap {
  aspect-ratio: 0.78;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(31, 46, 146, 0.12), rgba(204, 147, 91, 0.16));
}

.catalog-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.catalog-author {
  margin: 10px 0 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.catalog-title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.2;
}

.catalog-summary {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.82rem;
  flex-grow: 1;
}

.catalog-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.catalog-recommend,
.catalog-link,
.recommendation-link,
.starter-chip,
.widget-send {
  border-radius: 999px;
  transition: transform 0.18s ease, background 0.18s ease;
}

.catalog-recommend,
.catalog-link {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
}

.catalog-recommend {
  background: rgba(31, 46, 146, 0.07);
  color: var(--brand-deep);
}

.catalog-recommend:hover,
.catalog-link:hover,
.recommendation-link:hover,
.starter-chip:hover,
.widget-send:hover,
.blank-demo-button:hover {
  transform: translateY(-1px);
}

.launcher-teaser {
  position: fixed;
  right: 94px;
  bottom: 146px;
  z-index: 39;
  width: min(300px, calc(100vw - 48px));
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(204, 147, 91, 0.28);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(36, 28, 16, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.36s ease, transform 0.62s cubic-bezier(0.22, 1, 0.36, 1);
}

.launcher-teaser::after {
  content: "";
  position: absolute;
  right: 38px;
  bottom: -10px;
  width: 18px;
  height: 18px;
  border-right: 1px solid rgba(204, 147, 91, 0.28);
  border-bottom: 1px solid rgba(204, 147, 91, 0.28);
  background: rgba(255, 255, 255, 0.98);
  transform: rotate(45deg);
}

.launcher-teaser p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
}

.launcher-teaser.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.chat-launcher {
  position: fixed;
  right: 92px;
  bottom: 52px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 72px;
  min-width: 0;
  padding: 14px 18px;
  border: 4px solid rgba(204, 147, 91, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 46px rgba(18, 25, 75, 0.18);
  cursor: pointer;
  overflow: visible;
  isolation: isolate;
  opacity: 0;
  transform: translateY(42px) scale(0.96);
  transition: opacity 0.38s ease, transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.chat-launcher::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 18px;
  padding: 2px;
  background:
    conic-gradient(
      from 0deg,
      rgba(255, 255, 255, 0) 0deg,
      rgba(255, 255, 255, 0) 210deg,
      rgba(255, 255, 255, 0.08) 236deg,
      rgba(255, 255, 255, 0.92) 264deg,
      rgba(255, 255, 255, 0.12) 292deg,
      rgba(255, 255, 255, 0) 320deg,
      rgba(255, 255, 255, 0) 360deg
    );
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: launcher-border-spin 4.8s linear infinite;
}

.chat-launcher.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.chat-launcher.is-visible:hover {
  transform: translateY(-4px) scale(1.01);
}

.chat-launcher.is-bouncing {
  animation: launcher-bounce 1.05s cubic-bezier(0.22, 1, 0.36, 1);
}

.launcher-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(204, 147, 91, 0.26), rgba(255, 255, 255, 0.95));
  overflow: hidden;
  flex-shrink: 0;
}

.launcher-mark img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.launcher-text {
  max-width: 150px;
  text-align: left;
  font-family: "Archivo Black", "Manrope", sans-serif;
  font-size: 1.08rem;
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.02em;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.publisher-widget {
  position: fixed;
  right: 72px;
  bottom: 162px;
  z-index: 50;
  width: min(420px, calc(100vw - 32px));
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.publisher-widget.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.widget-shell {
  display: flex;
  flex-direction: column;
  height: min(720px, 70vh);
  max-height: min(720px, 70vh);
  background: rgba(255, 251, 246, 0.98);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  padding: 20px 20px 14px;
  border-bottom: 1px solid rgba(204, 147, 91, 0.2);
}

.widget-eyebrow,
.recommendation-eyebrow {
  margin: 0 0 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--brand-deep);
}

.widget-header h3 {
  margin: 0;
  font-size: 1.06rem;
}

.widget-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(31, 46, 146, 0.08);
  color: var(--brand-deep);
  font-size: 1.2rem;
  cursor: pointer;
}

.widget-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.widget-intro {
  padding: 12px 0 8px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.widget-intro p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.starter-chips {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.starter-chip {
  width: min(100%, 270px);
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(204, 147, 91, 0.4);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.82rem;
  text-align: center;
}

.chat-message {
  display: flex;
}

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

.chat-message-bot {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: min(100%, 92%);
  padding: 13px 15px;
  border-radius: 18px;
  line-height: 1.5;
  font-size: 0.9rem;
}

.chat-message-user .chat-bubble {
  margin-left: auto;
  background: #f3ebe2;
}

.chat-message-bot .chat-bubble {
  background: #fff;
  border: 1px solid rgba(204, 147, 91, 0.25);
}

.chat-bubble p:first-child {
  margin-top: 0;
}

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

.recommendation-card {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(204, 147, 91, 0.16), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(204, 147, 91, 0.28);
}

.recommendation-cover {
  width: 70px;
  aspect-ratio: 0.72;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(31, 46, 146, 0.08);
}

.recommendation-title {
  margin: 4px 0;
  font-size: 0.95rem;
}

.recommendation-authors {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.recommendation-link {
  min-height: 40px;
  padding: 0 14px;
  border: none;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.widget-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px 16px 10px;
  border-top: 1px solid rgba(204, 147, 91, 0.2);
}

.widget-input input {
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(204, 147, 91, 0.32);
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.94);
  outline: none;
  font-size: 0.9rem;
}

.widget-input input:focus {
  border-color: rgba(31, 46, 146, 0.35);
  box-shadow: 0 0 0 4px rgba(31, 46, 146, 0.08);
}

.widget-send {
  width: 48px;
  height: 48px;
  border: none;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
}

.widget-footer {
  display: flex;
  justify-content: center;
  padding: 0 16px 16px;
}

.widget-footer img {
  height: 18px;
  opacity: 0.9;
}

.widget-status {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 6px 0;
}

.catalog-empty {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
}

body.widget-only-page .chat-launcher {
  right: 24px;
  bottom: 24px;
  box-shadow: none;
}

body.widget-only-page .launcher-teaser {
  right: 24px;
  bottom: 118px;
  box-shadow: none;
}

body.widget-only-page .publisher-widget {
  right: 0;
  bottom: 134px;
  width: min(420px, calc(100vw - 20px));
}

@keyframes launcher-border-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes launcher-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  16% {
    transform: translateY(-14px) scale(1.015);
  }

  30% {
    transform: translateY(0) scale(1);
  }

  48% {
    transform: translateY(-9px) scale(1.01);
  }

  64% {
    transform: translateY(0) scale(1);
  }

  80% {
    transform: translateY(-4px) scale(1.005);
  }
}

@media (max-width: 1024px) {
  .blank-catalog-grid {
    padding-right: 0;
  }
}

@media (max-width: 720px) {
  .blank-demo-shell {
    padding: 12px 12px 156px;
  }

  .blank-demo-stage {
    min-height: calc(100vh - 168px);
    min-height: calc(100dvh - 168px);
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .catalog-actions {
    flex-direction: column;
  }

  .catalog-card {
    padding: 12px;
    border-radius: 16px;
  }

  .catalog-cover-wrap {
    border-radius: 12px;
  }

  .catalog-author {
    font-size: 0.76rem;
  }

  .catalog-title {
    font-size: 0.92rem;
  }

  .catalog-summary {
    font-size: 0.78rem;
    line-height: 1.38;
  }

  .chat-launcher {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    justify-content: center;
    min-width: 0;
    min-height: 68px;
    padding: 12px 16px;
    gap: 10px;
  }

  .launcher-teaser {
    left: 12px;
    right: 12px;
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    width: auto;
    padding: 11px 14px;
  }

  .launcher-mark {
    width: 40px;
    height: 40px;
  }

  .launcher-mark img {
    width: 22px;
    height: 22px;
  }

  .launcher-text {
    max-width: none;
    font-size: 1rem;
    line-height: 0.92;
  }

  .publisher-widget {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    transform: translateY(calc(100% + 24px));
  }

  body.widget-only-page .chat-launcher {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: auto;
  }

  body.widget-only-page .launcher-teaser {
    left: 12px;
    right: 12px;
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    width: auto;
  }

  body.widget-only-page .publisher-widget {
    left: 0;
    right: 0;
    width: 100%;
    bottom: 0;
  }

  .widget-shell {
    height: min(84dvh, 760px);
    max-height: min(84dvh, 760px);
    border-radius: 24px 24px 0 0;
    border-bottom: none;
    box-shadow: 0 -18px 44px rgba(36, 28, 16, 0.16);
  }

  .widget-header {
    padding: 16px 16px 12px;
  }

  .widget-header h3 {
    font-size: 1rem;
  }

  .widget-close {
    width: 40px;
    height: 40px;
  }

  .widget-messages {
    padding: 14px;
    gap: 10px;
  }

  .widget-intro {
    min-height: auto;
    padding: 4px 0 10px;
    justify-content: flex-start;
  }

  .widget-intro p {
    margin-bottom: 10px;
    font-size: 0.86rem;
  }

  .starter-chips {
    width: 100%;
  }

  .starter-chip {
    width: 100%;
    min-height: 46px;
    font-size: 0.84rem;
  }

  .chat-bubble {
    max-width: 92%;
    padding: 12px 14px;
    font-size: 0.88rem;
  }

  .widget-input {
    gap: 8px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .widget-input input {
    height: 46px;
    font-size: 16px;
    padding: 0 16px;
  }

  .widget-input input::placeholder {
    font-size: 14.5px;
  }

  .widget-send {
    width: 46px;
    height: 46px;
  }

  .widget-footer {
    padding: 0 14px calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .recommendation-card {
    grid-template-columns: 56px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .recommendation-link {
    grid-column: span 2;
    width: 100%;
  }
}

@media (max-width: 540px) {
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .blank-demo-shell {
    padding-left: 10px;
    padding-right: 10px;
  }

  .publisher-widget,
  body.widget-only-page .publisher-widget {
    left: 0;
    right: 0;
    width: 100%;
  }

  .widget-shell {
    height: min(88dvh, 820px);
    max-height: min(88dvh, 820px);
  }

  .chat-launcher,
  body.widget-only-page .chat-launcher {
    left: 10px;
    right: 10px;
  }

  .launcher-teaser,
  body.widget-only-page .launcher-teaser {
    left: 10px;
    right: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .launcher-teaser,
  .chat-launcher,
  .publisher-widget {
    transition: none;
  }

  .chat-launcher::before,
  .chat-launcher.is-bouncing {
    animation: none;
  }
}
