/* Try Demo (/demo, demo.html): a full-window page laid out like a generic AI assistant with an app open beside the chat
   (Alex 2026-10-05): the example conversation (marked in yellow) with its message bar, and the live demo
   app (assets/demo/app.html) in a panel on the right. Our own look, not any one assistant's: the site's Figtree, our
   colours, our owl on the conversation, and none of an assistant's own chrome (no icon rail, Share menu or reply icons:
   deceptive-pages risk read, 2026-10-05). The cards in the conversation are the app's own chat card (assets/demo/card.html,
   framed with a host of ours, assets/demo/card-host.js), sized to the height each reports (assets/js/demo.js); a card's Open full
   dashboard button opens the panel. The message bar's buttons only press and wiggle. A first-visit tour (assets/js/demo.js, .tour)
   points at the pieces. Below 860px the conversation sits above the app, folded to one line until Show chat. */
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("/assets/fonts/figtree-latin.woff2") format("woff2"); }
:root { --d-ink: #1d2433; --d-muted: #5b6474; --d-faint: #6b7383; --d-line: #e3e6ec; --d-rail: #f6f7f9; --d-hover: #eceff3; --d-bubble: #2f3a4d; --d-accent: #465737; --d-yellow: #fff1a8; --d-yellow-line: #e5c84a; --d-yellow-ink: #574500; --d-bg: #fff; --d-surface: #f1f3f6; --d-field-line: #d5d9e1; --d-soft: #3a4252; color-scheme: light; }
/* Dark follows the device, or the dashboard's Settings > Appearance choice, which the page passes on (assets/js/demo.js sets data-theme and tells the cards) */
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { --d-ink: #e8eaf0; --d-muted: #a7afbd; --d-faint: #98a1b0; --d-line: #343b4a; --d-rail: #1b1f27; --d-hover: #2a303c; --d-bubble: #3b4760; --d-accent: #5d7349; --d-yellow: #4a3f10; --d-yellow-line: #8a7420; --d-yellow-ink: #f3e08a; --d-bg: #171a21; --d-surface: #232833; --d-field-line: #3a4252; --d-soft: #c3c9d4; color-scheme: dark; } }
:root[data-theme=dark] { --d-ink: #e8eaf0; --d-muted: #a7afbd; --d-faint: #98a1b0; --d-line: #343b4a; --d-rail: #1b1f27; --d-hover: #2a303c; --d-bubble: #3b4760; --d-accent: #5d7349; --d-yellow: #4a3f10; --d-yellow-line: #8a7420; --d-yellow-ink: #f3e08a; --d-bg: #171a21; --d-surface: #232833; --d-field-line: #3a4252; --d-soft: #c3c9d4; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--d-bg); color: var(--d-ink); font: 15px/1.55 "Figtree", ui-sans-serif, system-ui, "Segoe UI", Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 8px 12px; background: var(--d-bg); color: var(--d-ink); border: 1px solid var(--d-line); border-radius: 8px; }
.skip:focus { left: 8px; }
.demo-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.demo { display: grid; grid-template-columns: 440px minmax(0, 1fr); height: 100vh; height: 100dvh; min-height: 560px; }
/* the chat side's look-only buttons: a press and a little wiggle, nothing else */
.tap { cursor: pointer; }
.tap.tapped { animation: demo-tap .42s cubic-bezier(.3, .7, .4, 1.4); }
.demo-input.tapped { animation: demo-press .32s ease-out; }
@keyframes demo-press { 30% { transform: scale(.98); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } 100% { transform: none; } }
@keyframes demo-tap { 0% { transform: scale(1); } 20% { transform: scale(.88); } 45% { transform: scale(1.04) rotate(-5deg); } 65% { transform: rotate(4deg); } 82% { transform: rotate(-2deg); } 100% { transform: none; } }
.demo-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.demo-bar { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 10px 0 18px; flex: none; border-bottom: 1px solid var(--d-line); }
.demo-owl { flex: none; width: 26px; height: 26px; }
.demo-title { flex: none; margin: 0; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.demo-marker { flex: 0 1 auto; min-width: 0; margin-right: auto; font-size: 12px; font-weight: 600; line-height: 16px; padding: 2px 9px; background: var(--d-yellow); border: 1px solid var(--d-yellow-line); border-radius: 6px; color: var(--d-yellow-ink); }
.demo-toggle { display: none; }
.demo-msgs { list-style: none; margin: 0; padding: 8px 20px 6px; flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.demo-msgs .u { align-self: flex-end; max-width: 85%; padding: 8px 14px; background: var(--d-bubble); color: #fff; border-radius: 16px 16px 4px 16px; overflow-wrap: anywhere; }
.demo-msgs .a { align-self: stretch; }
.demo-step { display: flex; width: fit-content; align-items: center; gap: 5px; margin-bottom: 3px; font-size: 13px; line-height: 20px; color: var(--d-faint); }
.demo-step .i { width: 14px; height: 14px; color: var(--d-accent); stroke-width: 2.4; }
.demo-msgs .a p { margin: 0 0 8px; overflow-wrap: anywhere; }
.demo-msgs .a p:last-child { margin-bottom: 0; }
/* the app's own card, as the chat shows it: framed, as wide as the message up to a card's width, as tall as the card says (demo:height) */
.demo-card { display: block; width: 100%; max-width: 560px; height: 470px; margin: 6px 0 10px; border: 1px solid var(--d-line); border-radius: 12px; background: var(--d-bg); }
.demo-card[data-view=explanation], .demo-card[data-view=po] { height: 397px; }
.demo-chat button:focus-visible, .demo-ico:focus-visible, .demo-tour-again:focus-visible, .tour button:focus-visible { outline: 2px solid #2f6feb; outline-offset: 2px; }
.demo-compose { flex: none; padding: 0 14px; }
.demo-input { display: flex; align-items: center; gap: 4px; height: 50px; padding: 0 6px; border: 1px solid var(--d-field-line); border-radius: 14px; background: var(--d-bg); }
.demo-input button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--d-muted); }
.demo-input button:hover { background: var(--d-hover); }
.demo-input .demo-ph { flex: 1; display: block; width: auto; text-align: left; padding: 0 6px; color: var(--d-faint); }
.demo-input .demo-ph:hover { background: transparent; }
.demo-input .demo-send { background: var(--d-bubble); color: #fff; }
.demo-input .demo-send:hover { background: var(--d-ink); }
.demo-note { flex: none; margin: 0; padding: 5px 8px 6px; text-align: center; font-size: 11.5px; line-height: 1.35; color: var(--d-muted); }
.demo-note a { color: inherit; }
.demo-app { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-left: 1px solid var(--d-line); }
.demo-app-bar { display: flex; align-items: center; gap: 6px; height: 52px; padding: 0 12px; flex: none; }
.demo-pill { font-size: 14px; font-weight: 600; padding: 5px 12px; background: var(--d-surface); border-radius: 8px; }
.demo-tour-again { margin-right: auto; padding: 4px 8px; border: 0; background: transparent; color: var(--d-muted); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.demo-ico { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--d-ink); cursor: pointer; }
.demo-ico:hover { background: var(--d-hover); }
.demo-ico .i { width: 18px; height: 18px; }
.demo-ico[aria-pressed="true"] { background: var(--d-hover); }
.demo-frame { flex: 1; min-height: 0; }
.demo-frame iframe { display: block; width: 100%; height: 100%; border: 0; border-top: 1px solid var(--d-line); background: var(--d-bg); }
.demo-frame.pulse iframe { animation: demo-pulse .9s ease-out; }
@keyframes demo-pulse { 0% { box-shadow: inset 0 0 0 3px #9fb38a; } 100% { box-shadow: inset 0 0 0 3px transparent; } }
/* the panel's buttons: expand hides the conversation, close hides the app (a card's Open full dashboard brings it back) */
.demo.wide { grid-template-columns: 0 minmax(0, 1fr); }
.demo.wide .demo-chat { visibility: hidden; }
.demo.closed { grid-template-columns: minmax(0, 1fr) 0; }
.demo.closed .demo-app { display: none; }
.demo.closed .demo-msgs, .demo.closed .demo-compose, .demo.closed .demo-note { width: 100%; max-width: 760px; margin-left: auto; margin-right: auto; }
/* the first-visit tour: a dimmed page with a lit window on the element, and a card with an arrow pointing at it */
.tour { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(20, 26, 38, .55); outline: 2px solid #fff; transition: all .25s ease; pointer-events: none; }
.tour-spot.none { left: 50% !important; top: 50% !important; width: 0 !important; height: 0 !important; outline: 0; }
.tour-card { position: fixed; width: 300px; max-width: calc(100vw - 32px); padding: 16px 16px 12px; background: var(--d-bg); color: var(--d-ink); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .25); pointer-events: auto; transition: left .25s ease, top .25s ease; }
.tour-card h2 { margin: 0 0 4px; font-size: 16px; line-height: 1.3; }
.tour-card p { margin: 0 0 12px; font-size: 14px; line-height: 1.45; color: var(--d-soft); }
.tour-arrow { position: absolute; width: 14px; height: 14px; background: var(--d-bg); transform: rotate(45deg); }
.tour-foot { display: flex; align-items: center; gap: 8px; }
.tour-count { font-size: 12px; color: var(--d-faint); margin-right: auto; }
.tour-foot button { padding: 7px 12px; border-radius: 8px; border: 1px solid var(--d-line); background: var(--d-bg); color: var(--d-ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.tour-foot .tour-next { background: var(--d-accent); border-color: var(--d-accent); color: #fff; }
.tour-foot .tour-skip { border: 0; padding: 7px 4px; color: var(--d-muted); font-weight: 500; }
@media (max-width: 860px) {
  .demo, .demo.wide, .demo.closed { display: block; height: auto; min-height: 0; }
  .demo-compose, .demo-ico { display: none; }
  .demo-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } /* the owl says whose it is; no room for the name too */
  .demo.wide .demo-chat { visibility: visible; }
  .demo.closed .demo-app { display: flex; }
  .demo-chat { border-bottom: 1px solid var(--d-line); }
  .demo-bar { height: 48px; padding: 0 16px; border-bottom: 0; }
  .demo-toggle { display: inline-flex; flex: none; margin-left: auto; font-size: 13px; font-weight: 600; line-height: 1; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--d-line); background: var(--d-bg); color: var(--d-ink); cursor: pointer; }
  .demo-msgs { display: none; overflow: visible; padding: 4px 16px 12px; }
  .demo-chat.open .demo-msgs { display: flex; }
  .demo-note { display: none; }
  .demo-chat.open .demo-note { display: block; }
  .demo-app { border-left: 0; }
  .demo-app-bar { height: 44px; padding: 0 16px; }
  .demo-tour-again { margin-right: 0; margin-left: auto; }
  .demo-frame iframe { height: calc(100vh - 48px - 1px - 44px); height: calc(100svh - 48px - 1px - 44px); min-height: 520px; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-frame.pulse iframe, .tap.tapped, .demo-input.tapped { animation: none; }
  .tap.tapped, .demo-input.tapped { opacity: .6; }
  .tour-spot, .tour-card { transition: none; }
}
