/* An illustrative MAX conversation, not a live messenger or customer transcript. */
.home-page .hero { isolation: auto; }
.visual-polish .hero, .visual-polish .hero-grid { min-height: min(700px, 100svh); }
.visual-polish .hero-grid { padding-top: 88px; padding-bottom: 24px; }
.visual-polish .hero-copy { padding-block: 24px; }
.visual-polish .hero-chat-stage { width: min(100%, 450px); height: auto; min-width: 0; padding: 16px 0; align-self: center; justify-self: center; }
.hero-chat-stage::after { display: none; }
.hc-window { display: flex; flex-direction: column; min-height: 284px; border: 1px solid #385374; border-radius: 16px; background: #0b192c; }
.hc-header { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 9px 16px; background: #14253d; border-radius: 15px 15px 0 0; border-bottom: 1px solid #2a3e58; }
.hc-header .hc-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.hc-header > div:not(.hc-channel) { display: grid; gap: 2px; }
.hc-header strong { font-size: 16px; font-weight: 700; }
.hc-header span { color: #aebfd5; font-size: 12px; }
.hc-channel { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.hc-channel span { font-size: 12px; font-weight: 700; color: #eef5ff; }
.hc-channel img { width: 28px; height: 28px; }
.hc-conversation { flex: 1; min-height: 224px; padding: 12px 16px; position: relative; }
.hc-conversation:focus-visible { outline: 2px solid #7db7ff; outline-offset: -3px; }
.hc-script { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.hc-script[hidden], .hc-message[hidden], .hc-typing[hidden], .hc-scenarios[hidden] { display: none; }
.hc-message { max-width: 92%; padding: 8px 11px; border-radius: 12px 12px 12px 4px; background: #203550; color: #f0f5fb; font-size: 13px; line-height: 1.4; }
.hc-message p { margin: 0; color: inherit; font-size: inherit; line-height: inherit; }
.hc-message p strong { font-weight: 650; }
.hc-out { align-self: flex-end; background: #225cba; border-radius: 14px 14px 4px 14px; }
.hc-message.is-new { animation: hc-arrive 300ms cubic-bezier(.16,1,.3,1) both; }
.hc-file { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.hc-file > span:last-child { display: grid; gap: 1px; min-width: 0; }
.hc-file strong { font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.hc-file small { color: #d5e4f6; font-size: 12px; }
.hc-file-icon { flex: 0 0 30px; display: grid; place-items: center; height: 22px; border-radius: 4px; background: #f0f5fc; color: #28558e; font-size: 11px; font-weight: 800; }
.hc-file-sheet { background: #d9f1e7; color: #23654d; }
.hc-file-video { background: #dbdfff; color: #3d4e97; }
.hc-file-video svg { width: 23px; height: 23px; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.hc-receipt { display: flex; gap: 7px; align-items: center; margin-top: 4px; color: #9fe6cc; font-size: 12px; }
.hc-receipt svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hc-typing { position: absolute; bottom: 5px; left: 16px; display: flex; gap: 4px; align-items: center; height: 16px; color: #aebfd5; font-size: 11px; }
.hc-typing span { margin-right: 3px; }
.hc-typing i { width: 4px; height: 4px; border-radius: 50%; background: #aebfd5; animation: hc-typing 900ms ease-in-out infinite; }
.hc-typing i:nth-of-type(2) { animation-delay: 120ms; }
.hc-typing i:nth-of-type(3) { animation-delay: 240ms; }
.hc-scenarios { display: flex; justify-content: center; gap: 6px; margin-top: 9px; }
.hc-scenarios button { min-height: 32px; padding: 5px 11px; border: 1px solid #3a5270; border-radius: 8px; background: #0d1c30; color: #c2d2e5; font: inherit; font-size: 12px; font-weight: 600; line-height: 1.35; cursor: pointer; transition: background-color 160ms, border-color 160ms, color 160ms; }
.hc-scenarios button[aria-pressed="true"] { background: #21497c; color: #fff; border-color: #75a9ee; }
.hc-scenarios button:hover { background: #23538d; color: #fff; border-color: #75a9ee; }
.hc-scenarios button:focus-visible { outline: 2px solid #a6ceff; outline-offset: 3px; }
.hc-scenarios button:active { background: #16385f; }
/* Small task demonstration beside the FAQ; the answers remain user-controlled. */
.home-page .agent-panel .mini-kpi { padding: 14px; gap: 9px; }
.home-page .agent-panel .mini-kpi :is(span, small) { font-size: 12px; color: #b8cbe1; }
.home-page .agent-panel .progress-line i { width: 100%; transform: scaleX(1); background: #69b4ff; }
.home-page .agent-panel.is-faq-playing .progress-line i { animation: hc-task 12s ease-in-out infinite; }
.home-page .agent-panel.is-faq-playing .agent-channel { animation: hc-channel 12s ease-in-out infinite; }
.home-page .agent-panel li { transition: color 250ms ease; }
.home-page .agent-panel[data-task-step="0"] li:first-child,
.home-page .agent-panel[data-task-step="1"] li:nth-child(2),
.home-page .agent-panel[data-task-step="2"] li:last-child { color: #fff; }
.home-page .faq-preview details[open] .faq-answer > p { animation: hc-answer 200ms ease-out; }
@keyframes hc-arrive { from { opacity: .45; transform: translateY(9px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes hc-typing { 0%, 70%, 100% { opacity: .35; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-2px); } }
@keyframes hc-task { 0%, 4% { transform: scaleX(.08); } 30% { transform: scaleX(.4); } 64% { transform: scaleX(.7); } 82%, 100% { transform: scaleX(1); } }
@keyframes hc-channel { 0%, 100% { transform: none; } 12% { transform: translate(3px,-3px) rotate(-8deg); } 25% { transform: none; } }
@keyframes hc-answer { from { opacity: .65; } to { opacity: 1; } }
@media (min-width: 821px) and (max-width: 1100px) {
  .hc-conversation { padding-inline: 14px; }
  .hc-message { max-width: 93%; font-size: 13px; }
  .hc-scenarios button { padding-inline: 6px; font-size: 11px; }
}
@media (max-width: 820px) {
  .visual-polish .hero, .visual-polish .hero-grid { min-height: 0; }
  .visual-polish .hero-grid { padding-top: 88px; padding-bottom: 16px; gap: 16px; }
  .visual-polish .hero-copy { padding: 0; }
  .visual-polish .hero-copy h1 { font-size: 34px; line-height: 1.1; margin: 0; }
  .visual-polish .hero-lead { font-size: 14px; line-height: 1.45; margin: 12px 0 0; }
  .visual-polish .hero-actions { display: flex; flex-flow: row nowrap; gap: 8px; margin-top: 14px; }
  .visual-polish .hero-actions .button { width: auto; flex: 1; min-height: 40px; padding: 9px 10px; font-size: 12px; }
  .visual-polish .hero-stack { display: none; }
  .visual-polish .hero-chat-stage { height: auto; width: 100%; max-width: 580px; margin: 0 auto; padding: 0; }
}
@media (max-width: 480px) {
  .hc-window { min-height: 260px; }
  .hc-header { min-height: 48px; padding: 6px 12px; }
  .hc-header .hc-avatar { width: 32px; height: 32px; }
  .hc-header strong { font-size: 14px; }
  .hc-header span { font-size: 11px; }
  .hc-conversation { min-height: 214px; padding: 10px; }
  .hc-message { max-width: 96%; font-size: 13px; padding: 7px 9px; }
  .hc-scenarios { gap: 5px; justify-content: flex-start; }
  .hc-scenarios button { font-size: 11px; padding-inline: 9px; min-height: 30px; }
}
@media (max-width: 480px) and (max-height: 740px) {
  .visual-polish .hero-grid { padding-top: 82px; gap: 12px; padding-bottom: 12px; }
  .visual-polish .hero-copy h1 { font-size: 30px; }
  .visual-polish .hero-lead { font-size: 13px; line-height: 1.4; margin-top: 9px; }
  .visual-polish .hero-actions { margin-top: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .hc-message.is-new, .hc-typing i, .home-page .agent-panel *, .home-page .faq-preview details[open] .faq-answer > p { animation: none !important; }
  .hc-scenarios button, .home-page .agent-panel li { transition: none; }
}
