/* JPSAI assistant — modern chat UI (uses styles.css design tokens) */
.assistant-wrap { max-width: 820px; margin: 0 auto; }
.assistant-intro { text-align: center; margin-bottom: 2rem; }
.assistant-intro .eyebrow { color: var(--dodger-blue); }
.assistant-disclaimer {
  font-size: 0.85rem; color: var(--gray-600);
  background: var(--blue-soft); border-radius: var(--radius-sm);
  padding: 0.8rem 1rem; margin: 1.2rem auto 0; max-width: 600px;
}

#chat-container {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md);
}
#chat-window { height: 440px; overflow-y: auto; padding: 1.4rem; background: var(--off-white); }
#chat-messages { display: flex; flex-direction: column; gap: 0.8rem; }

.message {
  max-width: 80%; padding: 0.75rem 1.05rem; border-radius: 16px;
  font-size: 0.96rem; line-height: 1.55; white-space: pre-wrap;
}
.user-message { align-self: flex-end; background: var(--dodger-blue); color: #fff; border-bottom-right-radius: 4px; }
.bot-message { align-self: flex-start; background: #fff; color: var(--ink); border: 1px solid var(--gray-200); border-bottom-left-radius: 4px; }
.bot-message.typing { color: var(--gray-600); font-style: italic; }

.chat-greeting { text-align: center; color: var(--gray-600); font-size: 0.9rem; padding: 1rem; }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-top: 0.8rem; }
.chat-suggestions button {
  background: #fff; border: 1px solid var(--gray-200); color: var(--navy);
  border-radius: 100px; padding: 0.45rem 0.95rem; font-size: 0.82rem; cursor: pointer;
  font-family: var(--font-body); transition: border-color .15s, color .15s;
}
.chat-suggestions button:hover { border-color: var(--dodger-blue); color: var(--dodger-blue); }

#chat-input-container { display: flex; gap: 0.7rem; padding: 1rem; border-top: 1px solid var(--gray-200); background: #fff; }
#chat-input {
  flex: 1; border: 1.5px solid var(--gray-200); border-radius: 100px;
  padding: 0.8rem 1.2rem; font-family: var(--font-body); font-size: 0.96rem; color: var(--ink);
}
#chat-input:focus { outline: none; border-color: var(--dodger-blue); box-shadow: 0 0 0 3px rgba(45,127,249,.15); }
#send-button {
  background: var(--dodger-blue); color: #fff; border: 0; border-radius: 100px;
  padding: 0.8rem 1.5rem; font-family: var(--font-heading); font-weight: 600; cursor: pointer;
}
#send-button:hover { background: #1f6fe0; }
#send-button:disabled { opacity: .5; cursor: default; }

@media (max-width: 560px) { #chat-window { height: 60vh; } .message { max-width: 90%; } }

/* Rate-limit badge */
.rl-badge {
  font-size: 0.72rem; font-weight: 600; color: var(--gray-600);
  padding: 0.2rem 0.6rem; border-radius: 100px;
  background: var(--gray-100); display: block;
  text-align: center; margin-bottom: 0.4rem;
}
.rl-badge--warn { background: #FEF3C7; color: #92400E; }
.upgrade-wall {
  border-left: 3px solid var(--dodger-blue) !important;
  background: linear-gradient(135deg, rgba(0,90,156,0.05), rgba(0,90,156,0.02)) !important;
}
.upgrade-wall a { color: var(--dodger-blue); font-weight: 700; }
.rl-note {
  font-size: 0.75rem; color: var(--gray-600); text-align: center;
  padding: 0.4rem 1rem; margin: 0;
}

/* JPSAI Tier cards */
.jpsai-tiers {
  padding: var(--space-xl) 0;
  background: var(--off-white);
  border-top: 1px solid var(--gray-200);
}
.jt-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
  align-items: start;
}
.jt-card {
  background: var(--white); border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 2rem 1.75rem;
  position: relative; text-align: center;
  transition: transform .2s, box-shadow .2s;
}
.jt-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.jt-card--featured { border-color: var(--dodger-blue); }
.jt-card--soon { opacity: 0.75; }
.jt-card h3 {
  font-family: var(--font-heading); font-weight: 800;
  font-size: 1.35rem; color: var(--navy); margin-bottom: 0.6rem;
}
.jt-price {
  display: block; font-family: var(--font-heading); font-weight: 900;
  font-size: 2.8rem; color: var(--dodger-blue); line-height: 1; margin-bottom: 0.3rem;
}
.jt-price span { font-size: 1rem; font-weight: 600; color: var(--gray-600); }
.jt-limit {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: #fff; background: var(--dodger-blue);
  border-radius: 100px; padding: 0.25rem 0.85rem; margin-bottom: 1.5rem;
}
.jt-card--soon .jt-limit { background: var(--gray-400); }
.jt-card ul {
  text-align: left; padding: 0; margin: 0 0 1.75rem;
}
.jt-card ul li {
  list-style: none; font-size: 0.88rem; line-height: 1.5;
  padding: 0.45rem 0; border-bottom: 1px solid var(--gray-100);
  color: var(--ink);
}
.jt-card ul li::before { content: '✓ '; color: var(--dodger-blue); font-weight: 900; }
.jt-card ul li.dim { color: var(--gray-500); }
.jt-card ul li.dim::before { content: '– '; color: var(--gray-400); font-weight: 400; }
.jt-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--dodger-blue); color: #fff;
  font-family: var(--font-heading); font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  padding: 0.3rem 1rem; border-radius: 100px; white-space: nowrap;
}
.jt-badge--soon { background: var(--gray-400); }
.jt-cta-note { font-size: 0.78rem; color: var(--gray-600); }
.jt-note {
  max-width: 660px; margin: var(--space-lg) auto 0;
  font-size: 0.8rem; color: var(--gray-600); text-align: center; line-height: 1.5;
}
@media (max-width: 900px) { .jt-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; } }

/* Sacred / esoteric atmospheric overlay on JPSAI hero */
.page-hero {
  position: relative;
  isolation: isolate;
}
.page-hero::after {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background-image: url('static/images/web/sacred_1.jpg');
  background-size: cover; background-position: center;
  opacity: 0.05; pointer-events: none; mix-blend-mode: luminosity;
}
.page-hero .container { position: relative; z-index: 1; }

/* Chat section dark atmospheric background */
.page-body {
  position: relative;
  background: #f8fafd;
}
.page-body::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background-image: url('static/images/web/sacred_1.jpg');
  background-size: 600px; background-position: center;
  background-repeat: no-repeat;
  opacity: 0.025; pointer-events: none;
}
.page-body .container { position: relative; z-index: 1; }
