/* /demos page. Builds on preview.css tokens and its .o-* sample mockups. */
.dm-hero { padding: 36px 0 32px; }
.dm-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.dm-hero h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; margin: 16px 0 14px; }
.dm-hero-sub { color: var(--text-secondary); font-size: 1.08rem; max-width: 34rem; margin-bottom: 22px; }
.dm-hero .hero-ctas { margin-bottom: 0; }

.dm-chat { background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius-bento); box-shadow: var(--card-shadow-hover); overflow: hidden; min-width: 0; }
.dm-chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #19181D; color: #fff; }
.dm-chat-avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; background: #FFC83D; display: grid; place-items: center; font-size: 1.15rem; }
.dm-chat-id { min-width: 0; flex: 1; line-height: 1.25; }
.dm-chat-id h2 { font-size: 0.98rem; font-weight: 800; color: #fff; }
.dm-chat-id span { font-size: 0.76rem; color: #E5E2DC; }
.dm-chat-restart { flex: none; min-height: 40px; padding: 0 12px; border: 1px solid rgba(255,255,255,.4); border-radius: var(--radius-pill); background: transparent; color: #fff; font: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.dm-chat-restart:hover { background: rgba(255,255,255,.14); }
.dm-chat-restart:focus-visible, .dm-chip:focus-visible, .dm-chat-form button:focus-visible { outline: 3px solid var(--d2a-purple); outline-offset: 2px; }
.dm-chat-log:focus-visible, .dm-chat-form input:focus-visible { outline: 3px solid var(--d2a-purple); outline-offset: -3px; }
.dm-demo-label { padding: 7px 16px; background: var(--d2a-yellow-tint); border-bottom: 1px solid var(--d2a-yellow-border); color: #6B4C00; font-size: 0.8rem; font-weight: 700; }
.dm-chat-log { height: 320px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px; padding: 14px; background: var(--bg-page); }
.dm-msg { max-width: 86%; padding: 9px 13px; border-radius: 16px; font-size: 0.93rem; line-height: 1.42; overflow-wrap: anywhere; }
.dm-msg-bot { align-self: flex-start; background: #fff; border: 1px solid var(--border-soft); border-bottom-left-radius: 5px; }
.dm-msg-user { align-self: flex-end; background: #C44300; color: #fff; border-bottom-right-radius: 5px; }
.dm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dm-typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid var(--border-soft); border-radius: 16px; }
.dm-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); animation: dm-blink 1s infinite; }
.dm-typing i:nth-child(2) { animation-delay: .15s; }
.dm-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dm-blink { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .dm-typing i { animation: none; } }

.dm-confirm { flex: none; align-self: stretch; padding: 14px; border-radius: 16px; background: var(--d2a-teal-tint); border: 1px solid var(--d2a-teal-border); }
.dm-confirm-title { font-weight: 800; color: #05604F; margin-bottom: 8px; }
.dm-confirm-title::before { content: '✓ '; }
.dm-confirm dl { display: grid; gap: 4px; font-size: 0.88rem; }
.dm-confirm dl div { display: flex; justify-content: space-between; gap: 12px; }
.dm-confirm dt { color: var(--text-secondary); }
.dm-confirm dd { font-weight: 700; text-align: right; }
.dm-confirm-note { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--d2a-teal-border); font-size: 0.76rem; color: var(--text-secondary); }

.dm-chat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 2px; min-height: 56px; align-content: flex-start; }
.dm-chip { min-height: 40px; padding: 6px 12px; border: 1px solid var(--d2a-orange-border); border-radius: var(--radius-pill); background: var(--d2a-orange-tint); color: var(--d2a-orange-text); font: inherit; font-size: 0.82rem; font-weight: 700; line-height: 1.2; cursor: pointer; }
.dm-chip:hover { border-color: var(--d2a-orange); }
.dm-chip-primary { background: #C44300; border-color: #C44300; color: #fff; }
.dm-chip-primary:hover { background: #A83A00; }
.dm-chat-form { display: flex; gap: 8px; padding: 10px 12px 12px; }
.dm-chat-form input { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border: 1px solid #8E8E9C; border-radius: var(--radius-pill); background: #fff; color: var(--text-primary); font: inherit; font-size: 1rem; }
.dm-chat-form button { flex: none; min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--radius-pill); background: #19181D; color: #fff; font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; }

.dm-card-cap { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dm-sample { flex: none; margin-top: 3px; padding: 2px 9px; border-radius: var(--radius-pill); background: var(--bg-subtle); color: var(--text-secondary); font-size: 0.72rem; font-weight: 700; }

.dm-site-teal { background: linear-gradient(135deg, #06826D, #1D4ED8); }
.dm-site-dark { background: linear-gradient(135deg, #19181D, #5B35E0); }
.dm-social-six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.o-post.dm-post-d { background: linear-gradient(150deg, #A67500, #C44300); }
.o-post.dm-post-e { background: linear-gradient(150deg, #C71B4C, #5B35E0); }
.o-post.dm-post-f { background: linear-gradient(150deg, #19181D, #06826D); }
.o-video.dm-video-warm { background: radial-gradient(circle at 25% 20%, #FF6B1A, #19181D 72%); }
.o-frame .o-video { min-height: 190px; }
.dm-appt { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; font-size: 0.64rem; font-weight: 700; text-align: center; }
.dm-appt span { padding: 6px 2px; border-radius: 7px; background: var(--bg-page); }
.dm-appt .on { background: #06826D; color: #fff; }

.dm-cta { margin-top: 0; }

@media (min-width: 641px) {
  .dm-social-six .o-post { aspect-ratio: 4 / 3; }
}
@media (max-width: 900px) {
  body.dm-chat-in-view .sticky-cta, body.dm-chat-in-view .chat-launcher { visibility: hidden; }
  .dm-hero { padding: 20px 0 24px; }
  .dm-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .dm-hero-sub { margin-bottom: 0; }
  .dm-hero .hero-ctas { display: none; }
}
@media (max-width: 400px) {
  .dm-chat-id span { font-size: 0.72rem; }
  .dm-chat-log { height: 300px; }
}
