/* Ask TMPL: full-page chat in the shape people already know (centered column, greeting, big composer, suggestions).
   TMPL tokens only (DESIGN.md): black, cream, warm grays, one gold action. Flat surfaces, no shadows or gradients. */
:root{--black:#000;--s1:#0E0D08;--s2:#161616;--s3:#1F1F1F;--s4:#2A2A2A;--ink:#EDEBE7;--ink-2:#B5AFA5;--ink-3:#8A847A;--gold:#C9A86A;--gold-hi:#E2C68E;--gold-ink:#131209;--ease:cubic-bezier(.22,1,.36,1);--font:'Manrope','Avenir Next',system-ui,sans-serif;--col:720px;--g:20px}
*{box-sizing:border-box;margin:0}
[hidden]{display:none!important}
html,body{height:100%;background:var(--black);color:var(--ink);font:400 16px/1.6 var(--font);-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%}
body{overflow:hidden}
.app{display:flex;flex-direction:column;height:100dvh;max-width:100%}
button,input,textarea{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--gold-hi);outline-offset:3px;border-radius:12px}
::selection{background:rgba(201,168,106,.35)}
a{color:var(--ink);text-decoration:underline;text-underline-offset:3px;text-decoration-color:rgba(237,235,231,.4)}
a:hover{text-decoration-color:var(--ink)}

.bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:calc(12px + env(safe-area-inset-top)) max(var(--g),env(safe-area-inset-right)) 12px max(var(--g),env(safe-area-inset-left));flex:none}
.brand{display:inline-flex;min-height:44px;align-items:center}
.bar-r{display:flex;align-items:center;gap:10px}
.seg{display:inline-flex;background:var(--s2);border-radius:99px;padding:3px}
.seg button{border:0;background:none;min-width:44px;min-height:44px;border-radius:99px;color:var(--ink-3);font-weight:600;font-size:13px;cursor:pointer;transition:background .2s var(--ease),color .2s var(--ease)}
.seg button[aria-pressed=true]{background:var(--ink);color:var(--black)}
.ghost{border:0;background:none;box-shadow:inset 0 0 0 1px rgba(237,235,231,.22);color:var(--ink);min-height:44px;padding:0 16px;border-radius:99px;font-weight:600;font-size:14px;cursor:pointer;transition:background .2s var(--ease)}
.ghost:hover{background:rgba(237,235,231,.07)}

.scroll{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:0 max(var(--g),env(safe-area-inset-right)) 8px max(var(--g),env(safe-area-inset-left));scroll-behavior:smooth;outline:0}
.hero{max-width:var(--col);margin:0 auto;padding:clamp(40px,14vh,140px) 0 12px;text-align:center}
.hero h1{font-weight:500;font-size:clamp(32px,6.4vw,48px);line-height:1.08;letter-spacing:-.035em}
.hero .sub{margin:14px auto 0;max-width:34ch;color:var(--ink-2);font-size:17px;line-height:26px}
.app.chatting .hero{display:none}
.log{max-width:var(--col);margin:0 auto;display:flex;flex-direction:column;gap:22px;padding:8px 0 20px}

/* the assistant speaks as plain text on the page; the customer's words sit in a quiet bubble (the familiar split) */
.row{display:flex;gap:12px;animation:in .35s var(--ease) both}
.row.me{justify-content:flex-end}
.bubble-me{max-width:85%;background:var(--s2);padding:10px 16px;border-radius:20px 20px 6px 20px;white-space:pre-wrap;overflow-wrap:anywhere}
.av{flex:none;width:28px;height:28px;border-radius:50%;background:var(--ink);color:var(--black);display:grid;place-items:center;font-weight:700;font-size:13px;letter-spacing:-.03em;margin-top:2px}
.av.team{background:var(--gold);color:var(--gold-ink)}
.body{min-width:0;flex:1}
.who{font-size:13px;font-weight:600;color:var(--ink-2);margin-bottom:2px}
.txt{white-space:pre-line;overflow-wrap:anywhere}
.txt .n{font-variant-numeric:tabular-nums;font-weight:600}
.note{align-self:center;color:var(--ink-3);font-size:13.5px;text-align:center;max-width:46ch;animation:in .35s var(--ease) both}
.dbg{font:500 11px/1.3 ui-monospace,Menlo,monospace;color:var(--ink-3);opacity:.7;margin-top:6px}
.follow{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.chip{border:0;background:none;box-shadow:inset 0 0 0 1px var(--s4);color:var(--ink);min-height:44px;padding:0 16px;border-radius:99px;font-weight:500;font-size:14.5px;cursor:pointer;transition:background .2s var(--ease),box-shadow .2s var(--ease);text-align:left}
.chip:hover{background:var(--s2);box-shadow:inset 0 0 0 1px var(--ink-3)}
.typing{display:flex;gap:5px;padding:10px 0}
.typing i{width:7px;height:7px;border-radius:50%;background:var(--ink-3);animation:blink 1.2s infinite var(--ease)}
.typing i:nth-child(2){animation-delay:.15s}.typing i:nth-child(3){animation-delay:.3s}
@keyframes blink{0%,80%,100%{opacity:.25}40%{opacity:1}}
@keyframes in{from{opacity:0;transform:translateY(8px)}}

.dock{flex:none;padding:8px max(var(--g),env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(var(--g),env(safe-area-inset-left));background:var(--black)}
.dock>*{max-width:var(--col);margin-left:auto;margin-right:auto}
.chips{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}
.chips .chip{text-align:center;padding:8px 14px;line-height:1.35}
.app.chatting .chips{display:none}
.chips .chip{background:var(--s1)}
.handoff{display:flex;align-items:center;flex-wrap:wrap;gap:8px 10px;margin-bottom:10px;padding:10px 14px;border-radius:16px;background:var(--s2);color:var(--ink-2);font-size:14px}
.handoff .dot{width:8px;height:8px;border-radius:50%;background:var(--ink);animation:blink 1.6s infinite}
.handoff.live .dot{animation:none;background:var(--gold)}
.mail{display:flex;gap:8px;flex:1 1 100%}
.mail input{flex:1;min-width:0;min-height:44px;border:0;border-radius:12px;background:var(--s3);padding:0 14px}
.composer{display:flex;align-items:flex-end;gap:8px;background:var(--s2);border-radius:28px;padding:8px 8px 8px 20px;box-shadow:inset 0 0 0 1px var(--s4);transition:box-shadow .2s var(--ease)}
.composer:focus-within{box-shadow:inset 0 0 0 1px var(--ink-3)}
.composer textarea{flex:1;min-width:0;border:0;background:none;resize:none;max-height:160px;padding:9px 0;line-height:1.5;font-size:16px;outline:0}
.composer textarea::placeholder{color:var(--ink-3)}
.linkbtn{border:0;background:none;color:var(--ink);font-size:inherit;text-decoration:underline;text-underline-offset:3px;text-decoration-color:rgba(237,235,231,.4);cursor:pointer;padding:12px 4px;margin:-12px 0}
.linkbtn:hover{text-decoration-color:var(--ink)}
.send{flex:none;width:44px;height:44px;border:0;border-radius:50%;background:var(--gold);color:var(--gold-ink);display:grid;place-items:center;cursor:pointer;transition:background .2s var(--ease),transform .2s var(--ease)}
.send:hover{background:var(--gold-hi)}.send:active{transform:scale(.94)}
.send:disabled{background:var(--s4);color:var(--ink-3);cursor:default;transform:none}
.fine{margin-top:10px;text-align:center;color:var(--ink-3);font-size:12.5px;line-height:18px}

@media (min-width:700px){:root{--g:32px}.hero .sub{font-size:18px}.chips{gap:10px;grid-template-columns:repeat(4,1fr)}}
@media (max-width:420px){.bar .ghost{padding:0 12px}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
/* wide screens, nothing said yet: greeting and composer sit together in the middle, like the chat apps people know */
@media (min-width:700px) and (min-height:560px){
  .app:not(.chatting){justify-content:center}
  .app:not(.chatting) .bar{position:absolute;top:0;left:0;right:0}
  .app:not(.chatting) .scroll{flex:none;overflow:visible}
  .app:not(.chatting) .hero{padding:0 0 28px}
  .app:not(.chatting) .dock{padding-top:0}
  .app:not(.chatting) .chips{order:2;margin:16px 0 0}
  .app:not(.chatting) .dock{display:flex;flex-direction:column}
  .app:not(.chatting) .fine{order:3}
  .app:not(.chatting) .dock>*{width:100%}
}

/* embedded in the corner panel (390px wide): same page, tighter */
.embed .bar{padding:12px 14px 8px}.embed .hero{padding:clamp(24px,9vh,72px) 0 8px}.embed .hero h1{font-size:30px}.embed .hero .sub{font-size:15.5px;line-height:23px}
.embed .ghost.x{width:44px;padding:0;display:grid;place-items:center}
.embed .dock{padding-bottom:calc(10px + env(safe-area-inset-bottom))}
.embed .fine{font-size:12px;line-height:17px}
@media (min-width:700px) and (min-height:560px){.embed.app:not(.chatting){justify-content:flex-start}.embed.app:not(.chatting) .bar{position:static}.embed.app:not(.chatting) .scroll{flex:1;overflow-y:auto}.embed.app:not(.chatting) .hero{padding:clamp(24px,9vh,72px) 0 8px}.embed.app:not(.chatting) .dock{display:block;padding-top:8px}.embed.app:not(.chatting) .chips{margin:0 0 12px}.embed .chips{grid-template-columns:1fr 1fr}}
/* 44px minimum taps (mobile check 2026-11-23) */
.seg button{min-height:44px}
.linkbtn{padding:15px 6px;margin:-15px 0}
.composer textarea{min-height:44px}
