/* TARAA homepage mock, round 1. Light is the default (owner, 2026-11-18). Blue-led palette; layout language borrowed from อปท.com.
   No external requests: system fonts only. All colours are tokens; contrast checked (see ../README.md). */
:root {
  --bg: #F4F8FC; --surface: #FFFFFF; --surface2: #EAF2FB; --text: #0B1B3A; --muted: #41506B;
  --primary: #1A5FC8; --primary-ink: #FFFFFF; --primary-soft: #E3EEFC; --accent: #0A6C80; --gold: #8A5A00;
  --border: #D3E0EE; --ok: #0F7B4F; --warn: #B3261E;
  --shadow: 0 1px 2px rgba(11,27,58,.06), 0 8px 24px rgba(11,27,58,.08);
  --radius: 16px; --radius-sm: 10px; --head-h: 64px; --panel-w: 420px;
  --net-cube-l: #9898A0; --net-cube-r: #686870; --net-cube-t: #E84028;   /* LogicEverything network cube (footer link): brand art colours, not UI colours */
}
:root[data-theme="dark"] {
  --bg: #0B1B3A; --surface: #12294F; --surface2: #17335F; --text: #F7FAFC; --muted: #B8C4D9;
  --primary: #5AA2FF; --primary-ink: #0B1B3A; --primary-soft: #1B3A6E; --accent: #7FD8E6; --gold: #F2C46B;
  --border: #27457A; --ok: #6FD6A5; --warn: #FF9A93;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --net-cube-l: #C2C3CA; --net-cube-r: #8E8F98;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.5; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--primary); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* header, brand, main menu, second row: site-chrome/chrome.css (shared with the apps) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font-weight: 700; text-decoration: none; color: var(--text); }
.btn:hover { background: var(--primary-soft); }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn.primary:hover { filter: brightness(1.08); background: var(--primary); }
.btn.round { padding: 9px; width: 40px; height: 40px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.menu-wrap { position: relative; }
.pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 6px; z-index: 40; }
.pop[hidden] { display: none; }
.pop button, .pop .info { display: flex; width: 100%; gap: 10px; align-items: center; padding: 10px 12px; border: 0; background: none; text-align: left; border-radius: 8px; font-size: .95rem; }
.pop button:hover { background: var(--primary-soft); }
.pop .info { color: var(--muted); font-size: .85rem; cursor: default; }
.pop .sel[aria-checked="true"] { font-weight: 800; color: var(--primary); }

/* ---------- page ---------- */
main { transition: padding-right .2s; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.hero { text-align: center; padding: 28px 0 8px; }
.hero .mascot { width: 84px; height: 84px; margin: 0 auto 6px; }
.hero h1 { text-wrap: balance; margin: 0 auto 8px; max-width: 22ch; font-size: clamp(1.7rem, 4.2vw, 2.7rem); line-height: 1.15; letter-spacing: -.01em; }
.hero h1 b { color: var(--primary); }
.hero p { margin: 0 auto; max-width: 60ch; color: var(--muted); font-size: 1.05rem; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 22px 0 12px; }
.section-title h2 { margin: 0; font-size: 1.3rem; }
.section-title small { color: var(--muted); }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .nav { display: flex; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.agent { align-content: center; display: grid; grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 6px; padding: 14px 12px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; text-align: center; }
.agent:hover { transform: translateY(-2px); border-color: var(--primary); }
.agent img { width: 76px; height: 76px; object-fit: contain; }
.agent .n { font-weight: 800; font-size: 1rem; line-height: 1.2; }
.agent .j { color: var(--muted); font-size: .85rem; line-height: 1.35; min-height: 2.3em; }
.agent .go { margin-top: 2px; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .85rem; color: var(--primary); background: var(--primary-soft); padding: 6px 14px; border-radius: 999px; }
@media (min-width: 1000px) {
  .agent { grid-template-columns: 84px 1fr; justify-items: start; text-align: left; align-items: center; column-gap: 12px; padding: 12px 14px; }
  .agent img { width: 84px; height: 84px; grid-row: span 3; }
  .agent .go { justify-self: start; }
}
.note-demo { margin: 10px 0 0; font-size: .85rem; color: var(--muted); }

.sec { padding: 40px 0 8px; }
.sec h2 { margin: 0 0 14px; font-size: 1.5rem; }
.cols3 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .cols3 { grid-template-columns: repeat(3, 1fr); } .cols2 { grid-template-columns: repeat(2, 1fr) !important; } }
.cols2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); }
.steps { counter-reset: s; display: grid; gap: 12px; grid-template-columns: 1fr; padding: 0; list-style: none; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px 18px 64px; position: relative; font-weight: 700; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 14px; width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-weight: 800; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks li { padding-left: 30px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: .25em; width: 18px; height: 18px; border-radius: 50%; background: var(--primary-soft); box-shadow: inset 0 0 0 5px var(--primary); }
details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; margin: 8px 0; }
summary { font-weight: 800; cursor: pointer; }
details p { margin: 8px 0 0; color: var(--muted); }
.early { margin: 40px 0 0; padding: 26px; border-radius: var(--radius); background: linear-gradient(135deg, #124a9c, #0a6c80); color: #fff; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.early img { width: 96px; height: 96px; }
.early h2 { margin: 0 0 6px; color: #fff; }
.early p { margin: 0 0 10px; opacity: .95; }
.early a.btn { background: #fff; color: #0B1B3A; border-color: #fff; }
footer.foot { margin: 40px 0 120px; padding: 18px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- chat panel (right dock like tonimaxx.com; sheet on phones) ---------- */
.panel { position: fixed; z-index: 45; background: var(--surface); display: flex; flex-direction: column; box-shadow: var(--shadow); border-left: 1px solid var(--border);
  inset: 0; transform: translateY(102%); transition: transform .22s ease; }
.panel.on { transform: none; }
@media (min-width: 1100px) {
  .panel { inset: var(--head-h) 0 0 auto; width: var(--panel-w); transform: translateX(102%); }
  body.panel-open main, body.panel-open .head { padding-right: var(--panel-w); }
  body.panel-open .head { padding-right: calc(var(--panel-w) + 20px); }
}
.chat { display: flex; flex-direction: column; min-height: 0; flex: 1; position: relative; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.chat-head img { width: 40px; height: 40px; object-fit: contain; }
.chat-head .t { flex: 1; min-width: 0; }
.chat-head .t b { display: block; font-size: 1rem; line-height: 1.2; }
.chat-head .t small { color: var(--muted); font-size: .78rem; }
.chat-head .btn.round { width: 36px; height: 36px; padding: 7px; border-color: transparent; background: none; }
.chat-head .btn.round:hover { background: var(--primary-soft); }
.speaking img { animation: bob .9s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-3px) scale(1.04); } }
.chat-notice { margin: 12px 14px 0; padding: 12px 14px; border: 1px solid var(--border); background: var(--surface2); border-radius: var(--radius-sm); font-size: .9rem; }
.chat-notice .row { display: flex; gap: 12px; margin-top: 8px; align-items: center; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 14px; scroll-behavior: smooth; }
.welcome { text-align: center; padding: 8px 0 10px; }
.welcome img { width: 120px; height: 120px; margin: 0 auto 4px; object-fit: contain; }
.welcome h3 { margin: 0 0 4px; font-size: 1.25rem; }
.welcome p { margin: 0 auto; max-width: 42ch; color: var(--muted); font-size: .95rem; }
.sugg-title { margin: 14px 0 6px; color: var(--muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; text-align: left; }
.sugg { display: grid; gap: 8px; }
.chat[data-shell="page"] .sugg { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.sugg button { text-align: left; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; }
.sugg button:hover { border-color: var(--primary); background: var(--primary-soft); }
.msg { margin: 10px 0; display: flex; flex-direction: column; gap: 4px; max-width: 92%; }
.msg.user { margin-left: auto; align-items: flex-end; }
.bubble { padding: 10px 14px; border-radius: 16px; background: var(--surface2); white-space: pre-wrap; word-break: break-word; }
.msg.user .bubble { background: var(--primary); color: var(--primary-ink); border-bottom-right-radius: 4px; }
.msg.bot .bubble { border-bottom-left-radius: 4px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .75rem; color: var(--muted); }
.chip { padding: 2px 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.meta button { border: 0; background: none; color: var(--muted); text-decoration: underline; font-size: .75rem; padding: 0; }
.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%,60%,100% { opacity: .3; } 30% { opacity: 1; } }
.chat-limit { margin: 0 14px 8px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--surface)); font-size: .9rem; }
.chat-limit b { display: block; }
.chat-limit .btn { margin-top: 8px; }
.composer { margin: 0 14px; border: 2px solid var(--border); border-radius: 18px; background: var(--surface); padding: 8px 10px; }
.composer:focus-within { border-color: var(--primary); }
.composer textarea { width: 100%; border: 0; outline: none; resize: none; background: none; color: var(--text); font: inherit; min-height: 44px; max-height: 120px; }
.composer .row { display: flex; align-items: center; gap: 6px; }
.composer .cnt { flex: 1; color: var(--muted); font-size: .75rem; }
.composer .btn.round { width: 36px; height: 36px; padding: 7px; }
.composer .send { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.composer .mic.on { background: var(--warn); color: #fff; border-color: var(--warn); animation: pulse 1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--warn) 25%, transparent); } }
.chat-foot { margin: 6px 14px 10px; text-align: center; color: var(--muted); font-size: .75rem; }
.status { margin: 0 14px 6px; color: var(--accent); font-size: .8rem; font-weight: 700; min-height: 1.2em; }

/* ---------- full chat page ---------- */
.chat-page { display: grid; grid-template-columns: 1fr; height: calc(100dvh - var(--head-h)); }
@media (min-width: 900px) { .chat-page { grid-template-columns: 300px 1fr; } }
.side { display: none; border-right: 1px solid var(--border); background: var(--surface); padding: 14px; overflow-y: auto; }
@media (min-width: 900px) { .side { display: block; } }
.side .new { width: 100%; justify-content: center; margin-bottom: 14px; }
.side h4 { margin: 14px 4px 6px; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.side .list { display: grid; gap: 2px; }
.side .list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 10px; text-align: left; font-weight: 600; }
.side .list button:hover, .side .list button[aria-current="true"] { background: var(--primary-soft); }
.side .list img { width: 30px; height: 30px; object-fit: contain; }
.side .list small { display: block; color: var(--muted); font-weight: 500; }
.chat-main { min-width: 0; display: flex; background: var(--bg); }
.chat-main .chat { max-width: 860px; width: 100%; margin: 0 auto; background: var(--bg); }
.chat-main .composer { margin-bottom: 0; }
.agents-strip { display: flex; gap: 8px; overflow-x: auto; padding: 8px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
@media (min-width: 900px) { .agents-strip { display: none; } }
.agents-strip button { flex: none; display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 4px 12px 4px 4px; font-weight: 700; font-size: .85rem; }
.agents-strip button img { width: 28px; height: 28px; object-fit: contain; }
.agents-strip button[aria-current="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }

/* ---------- sign-in dialog ---------- */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(11,27,58,.5); }
.modal[hidden] { display: none; }
.dlg { width: min(440px, 100%); background: var(--surface); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.dlg .idu { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; margin-bottom: 8px; }
.dlg .idu i { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg,#124a9c,#7FD8E6); display: inline-block; }
.dlg p { color: var(--muted); }
.dlg .mockflag { font-size: .8rem; background: var(--surface2); border-radius: 8px; padding: 8px 10px; margin: 10px 0; }
.dlg .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }

/* ---------- Memory dialog (consent + manage); same dialog look as sign-in ---------- */
.dlg.mem { width: min(520px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; outline: none; }
.dlg.mem h2 { margin: 0 0 8px; font-size: 1.25rem; line-height: 1.3; }
.dlg.mem h3 { margin: 14px 0 4px; font-size: .95rem; }
.dlg.mem ul { margin: 0 0 8px; padding-left: 20px; color: var(--muted); }
.dlg.mem li { margin: 2px 0; }
.dlg.mem .memnot { color: var(--text); background: var(--surface2); border-radius: 10px; padding: 8px 10px; }
.dlg.mem .memver { font-size: .8rem; }
.dlg.mem .memmsg { min-height: 1.4em; margin: 6px 0 0; color: var(--text); font-weight: 600; }
.btn.danger { color: var(--warn); border-color: var(--warn); }
.btn.danger:hover { background: var(--surface2); }
.btn[disabled] { opacity: .55; cursor: default; }
@media (max-width: 520px) { .dlg.mem { padding: 18px; } .dlg.mem .actions .btn { flex: 1 1 100%; } }

/* ---------- mock controls ---------- */
.mockbar { position: fixed; left: 12px; bottom: 12px; z-index: 80; background: #0B1B3A; color: #F7FAFC; border-radius: 14px; padding: 8px 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  max-width: calc(100vw - 24px); font-size: .8rem; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.mockbar b { color: #7FD8E6; letter-spacing: .05em; }
.mockbar select, .mockbar button { background: #17335F; color: #F7FAFC; border: 1px solid #27457A; border-radius: 8px; padding: 4px 8px; font-size: .8rem; }
.mockbar button[aria-pressed="true"] { background: #5AA2FF; color: #0B1B3A; }
@media (max-width: 700px) { .mockbar { font-size: .72rem; padding: 6px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* chat page layout: header + (strip) + chat fill the viewport */
body[data-page="chat"] { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
body[data-page="chat"] .chat-page { height: auto; flex: 1; min-height: 0; }
body[data-page="chat"] .chat-main { min-height: 0; }
body[data-page="chat"] .chat { height: 100%; }


/* jump to latest: chevron + fade above the composer (see tonimaxx.com/ask) */
.composer { position: relative; }
.chat-fade { position: absolute; left: -14px; right: -14px; bottom: 100%; height: 28px; pointer-events: none; background: linear-gradient(to bottom, transparent, var(--fade, var(--bg))); }
.panel .chat-fade { --fade: var(--surface); }
.chat-jump { position: absolute; left: 50%; bottom: 100%; z-index: 4; transform: translateX(-50%); margin-bottom: 10px; min-width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.28); font: inherit; font-size: .85rem; white-space: nowrap; }
.chat-jump[hidden], .chat-fade[hidden] { display: none; }
.chat-jump:hover { border-color: var(--primary); }
.chat-jump .icon { width: 18px; height: 18px; }
.chat-jump .jl:empty { display: none; }
.chat-jump.new { padding: 0 12px 0 14px; border-color: var(--primary); }
@media (pointer: coarse) { .chat-jump { min-width: 44px; height: 44px; } }
@media (prefers-reduced-motion: no-preference) { .chat-jump { animation: jf .15s ease-out; } @keyframes jf { from { opacity: 0; } } }
.chat-scroll { scroll-behavior: auto; }

/* Typography: the Noto fonts (--font body, --font-head headings 20px and larger) are defined once in assets/chrome.css (shared with the apps).
   Headings use --font-head at weight 700; everything smaller stays on the body font. */
h1, h2, h3, .agent .n, .chat-head .t b, .welcome h3, .early h2, .dlg .idu, summary { font-family: var(--font-head); }
h1 { font-weight: 700; font-size: clamp(1.9rem, 4.6vw, 2.9rem); line-height: 1.18; }
.section-title h2, .sec h2 { font-weight: 700; font-size: 1.7rem; }
.card h3 { font-weight: 700; font-size: 1.25rem; }
.agent .n { font-weight: 700; font-size: 1.25rem; }
.welcome h3 { font-weight: 700; font-size: 1.5rem; }
summary { font-weight: 600; font-size: 1.1rem; font-family: var(--font); }

.drawer-head .brand .logo-img { height: 44px; }

/* round 2 hero: the main TARAA avatar (3x3 cube) */
.hero .mascot.avatar-main { width: auto; height: 132px; margin: 0 auto 10px; }
@media (max-width: 520px) { .hero .mascot.avatar-main { height: 110px; } }


:lang(th) .agent .n, :lang(th) .chat-head .t b { line-height: 1.35; }

/* line breaking for languages without word spaces: break between phrases, not inside a word (2026-11-20) */
:lang(ja) :is(h1, h2, h3, p, .vstrip span, summary) { word-break: auto-phrase; line-break: strict; }
:lang(ko) :is(h1, h2, h3, p, .vstrip span, .agent .j, summary) { word-break: keep-all; }
:lang(zh) :is(h1, h2, h3, p, .vstrip span, .agent .j, summary) { line-break: strict; }


/* round 3: agent avatars tint their card and chat header; motion states replace drawn poses */
.agent { border-color: color-mix(in srgb, var(--ac, var(--primary)) 38%, var(--border)); }
.agent:hover { border-color: var(--ac, var(--primary)); box-shadow: 0 6px 22px color-mix(in srgb, var(--ac, var(--primary)) 28%, transparent); }
.agent .go { color: var(--text); background: color-mix(in srgb, var(--ac, var(--primary)) 22%, var(--surface)); }
.agent img { width: 92px; height: 92px; }
@media (min-width: 1000px) { .agent { grid-template-columns: 96px 1fr; } .agent img { width: 96px; height: 96px; } }
.chat-head { background: linear-gradient(90deg, color-mix(in srgb, var(--ac, var(--primary)) 18%, transparent), transparent 70%); }
.chat-head img { width: 48px; height: 48px; }
.chat-head.thinking img { animation: think 1.4s ease-in-out infinite; transform-origin: 50% 100%; }
.chat-head.done img { animation: hop .55s ease-out 1; }
@keyframes think { 0%,100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg) translateY(-2px); } }
@keyframes hop { 0% { transform: none; } 35% { transform: translateY(-9px) scale(1.08); } 70% { transform: translateY(0) scale(.97); } 100% { transform: none; } }
.welcome img { width: auto; height: 150px; }
.side .list img, .agents-strip img { object-fit: contain; }

/* round 3: no avatar above the headline (the 12 cards carry the characters); main avatar in Early access */
.hero { padding-top: 40px; }
.early img.avatar-main { width: auto; height: 130px; filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 6px rgba(255,255,255,.55)); }

/* round 3 footer: same structure as tonimaxx.com (brand row, link groups, network line, legal row) */
.sitefoot { margin-top: 56px; padding: 36px 0 110px; border-top: 1px solid var(--border); background: var(--surface); }
.sitefoot .fr1 { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.sitefoot .fbrand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); line-height: 1; }
.sitefoot .fbrand img { height: 34px; width: auto; }
.sitefoot .fbrand span { display: block; flex: none; width: calc(16px * 5.0549); height: 16px; font-size: 0; background: currentColor; -webkit-mask: url(wordmark-outfit-v2.svg) center / contain no-repeat; mask: url(wordmark-outfit-v2.svg) center / contain no-repeat; }   /* the TARAA wordmark image (assets/wordmark-outfit-v2.svg) */
.sitefoot .ftag { color: var(--muted); flex: 1; min-width: 200px; }
.sitefoot .fmail { font-weight: 700; color: var(--primary); text-decoration: none; }
.sitefoot .fmail:hover { text-decoration: underline; }
.sitefoot .fr2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; padding: 24px 0; }
.sitefoot .fh { display: block; font: 700 1.05rem var(--font-head); margin-bottom: 10px; }
.sitefoot .fls { display: grid; gap: 7px; }
.sitefoot .fls a { color: var(--muted); text-decoration: none; }
.sitefoot .fls a:hover { color: var(--primary); text-decoration: underline; }
.sitefoot .fbk { margin: 0; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface2); color: var(--muted); font-size: .92rem; }
.sitefoot .fnet { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }   /* network hub link (one per page, plain dofollow): muted like the line, underlined so it is not colour-only */
.sitefoot .fnet:hover { color: var(--primary); }
.sitefoot .fnet svg { display: inline-block; width: 12px; height: 14px; margin-right: 6px; vertical-align: -2px; }
.sitefoot .fnet .cl { fill: var(--net-cube-l); } .sitefoot .fnet .cr { fill: var(--net-cube-r); } .sitefoot .fnet .ct { fill: var(--net-cube-t); }
.sitefoot .fsep { margin: 0 6px; }
.sitefoot .fbk > span:last-child { display: inline-block; }   /* the sign-in sentence wraps as one unit */
@media (max-width: 520px) { .sitefoot .fnet { display: table; margin-bottom: 4px; } .sitefoot .fsep { display: none; } }   /* phones: link on its own line, no dangling separator */
.sitefoot .fr3 { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; color: var(--muted); font-size: .85rem; align-items: center; }
.sitefoot .fr3 a { color: var(--muted); }
.sitefoot .fr3 .fnote { margin-left: auto; }
@media (max-width: 640px) { .sitefoot .fr3 .fnote { margin-left: 0; width: 100%; } }

/* hand-off buttons (Front desk suggest_agent) */
.handoffs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.handoff { padding: 7px 14px; font-size: .9rem; }

/* ---------- experts (illustrated people) + markdown / code blocks ---------- */
#experts { padding-top: 6px; }
.agent.expert img { border-radius: 16px; background: color-mix(in srgb, var(--ac, var(--primary)) 14%, var(--surface)); object-fit: cover; object-position: top; }
.agent .r { color: var(--text); font-weight: 700; font-size: .85rem; }
.agent.expert { border-width: 2px; }
.agent.expert .go { background: color-mix(in srgb, var(--ac, var(--primary)) 28%, var(--surface)); }
.chat-head .t small { display: block; }
.chat.expert .chat-head img { border-radius: 12px; background: color-mix(in srgb, var(--ac, var(--primary)) 14%, var(--surface)); object-fit: cover; object-position: top; }
.chat-disc { padding: 6px 14px; font-size: .78rem; font-weight: 700; color: var(--text); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border-bottom: 1px solid var(--border); }
.welcome.expert img { border-radius: 24px; background: color-mix(in srgb, var(--ac, var(--primary)) 14%, var(--surface)); object-fit: cover; object-position: top; box-shadow: var(--shadow); }
.welcome .role { color: var(--muted); font-weight: 700; margin: -2px 0 6px; }
.side .grp { margin: 12px 4px 4px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.msg.bot .bubble { white-space: normal; }
.bubble p { margin: 0 0 .6em; } .bubble p:last-child, .bubble ul:last-child, .bubble ol:last-child { margin-bottom: 0; }
.bubble ul, .bubble ol { margin: 0 0 .6em; padding-left: 1.3em; } .bubble li { margin: .15em 0; }
.bubble code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: color-mix(in srgb, var(--text) 10%, transparent); padding: .1em .35em; border-radius: 5px; }
.bubble a { color: var(--primary); text-decoration: underline; word-break: break-word; }
.code { margin: .5em 0 .7em; border-radius: 12px; overflow: hidden; background: #0f172a; color: #e5eefc; border: 1px solid #243455; }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: #17233f; font: 700 .75rem ui-monospace, Menlo, Consolas, monospace; color: #9fb3d9; text-transform: lowercase; }
.code-head button { border: 1px solid #36507f; background: #1e2f55; color: #e5eefc; border-radius: 8px; padding: 3px 10px; font-size: .75rem; }
.code-head button:hover { background: #29407a; }
.code pre { margin: 0; padding: 12px; overflow-x: auto; max-width: 100%; }
.code pre code { background: none; padding: 0; color: inherit; font-size: .85rem; line-height: 1.5; white-space: pre; display: block; }
.msg { max-width: 100%; } .msg.bot .bubble { max-width: min(100%, 52rem); }
.agent.expert img { grid-row: span 4; align-self: start; }
.agent .go { white-space: nowrap; }
@media (max-width: 999px) { .agent.expert .go { white-space: normal; } }

/* answer footer: subtle "Report this answer" on the right; smart follow-up chips */
.msg.bot .meta { justify-content: flex-start; }
.msg.bot .meta:has(button[data-report]:only-child) { justify-content: flex-end; }
.fups { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 2px; }
.fups button { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 7px 14px; font-size: .88rem; text-align: left; line-height: 1.3; }
.fups button:hover { border-color: var(--primary); background: var(--primary-soft); }

/* Response panel (language / length / style / follow-ups) */
.chat { position: relative; }
.chat-head .btn.round { position: relative; }
.chat-head .dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.resp-pop { position: absolute; z-index: 30; top: 58px; right: 10px; width: min(340px, calc(100% - 20px)); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 12px 14px 14px; }
.resp-pop[hidden] { display: none; }
.rp-title { font: 700 1.05rem var(--font-head); margin-bottom: 8px; }
.rp-row { margin: 10px 0; }
.rp-l { display: block; font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.rp-row select { width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.rp-note { display: block; color: var(--muted); font-size: .76rem; margin-top: 4px; }
.seg { display: flex; gap: 4px; background: var(--surface2); padding: 3px; border-radius: 12px; }
.seg.wrap { flex-wrap: wrap; }
.seg button { flex: 1 1 auto; border: 0; background: none; padding: 7px 10px; border-radius: 9px; font-weight: 700; font-size: .85rem; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; justify-content: center; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(11,27,58,.18); }
.seg button .icon { width: 13px; height: 13px; }
.rp-row.sw { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rp-row.sw .rp-l { margin: 0; }
.switch { width: 44px; height: 26px; border-radius: 999px; border: 0; background: var(--border); position: relative; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--primary); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }

/* streaming: caret while tokens arrive; the send button becomes Stop */
.bubble.streaming::after { content: ""; display: inline-block; width: .5em; height: 1em; margin-left: 2px; vertical-align: -.15em; background: var(--primary); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.composer .send.stop { background: var(--warn); border-color: var(--warn); color: #fff; }

/* MoradokLanna word cards (text only, site fonts) */
.wcards { display: grid; gap: 8px; margin: 8px 0 2px; max-width: 100%; }
.wcard { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--border); border-left: 3px solid var(--ac, var(--primary)); border-radius: 10px; background: var(--surface2, var(--surface)); font-size: .88rem; }
.wcard .wn { flex: none; min-width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--ac, var(--primary)) 22%, var(--surface)); font-size: .75rem; font-weight: 600; }
.wcard .wb { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.wcard .wb b { font-size: 1rem; }
.wcard .wb i { color: var(--muted, inherit); opacity: .8; }
.wcard .wb .wm { opacity: .95; } .wcard .wb .we { opacity: .75; }
.wcard .wb a { justify-self: start; font-size: .82rem; }

.wcard .wb .wm { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.docs-chip { margin: 6px 0 2px; font-size: .78rem; opacity: .85; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.docs-chip a { font-weight: 600; }

/* Tier 1 chat UX: timestamps on hover, tool status line, per-answer actions */
.msg .mt { display: block; font-size: .72rem; opacity: 0; transition: opacity .15s; margin: 2px 6px 0; }
.msg.user .mt { text-align: right; }
.msg:hover .mt, .msg:focus-within .mt { opacity: .7; }
@media (hover: none) { .msg .mt { opacity: .5; } }
.meta .mt { display: inline; margin: 0 8px 0 0; }
.tstat { font-size: .82rem; opacity: 0; margin: 4px 6px 0; animation: tstatIn .3s 1.2s forwards; }
@keyframes tstatIn { to { opacity: .75; } }
@media (prefers-reduced-motion: reduce) { .tstat { animation-duration: .01s; } }
.meta button[data-retry] { background: none; border: 0; padding: 0; margin-right: 12px; font: inherit; font-size: .78rem; color: inherit; opacity: .7; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.meta button[data-retry]:hover { opacity: 1; }

/* Answer actions (icons) + Report dialog. Icons are Lucide line icons; every icon button has a tooltip and an aria-label. */
.acts { display: flex; align-items: center; flex-wrap: wrap; gap: 0; margin: 2px 0 0 -6px; color: var(--muted); }
.acts .ib { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; color: inherit; cursor: pointer; }
.acts .ib .icon, .acts .rep .icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.acts .ib:hover, .acts .rep:hover { background: var(--surface2); color: var(--text); }
.acts .ib[aria-pressed="true"] { color: var(--primary); }
.acts .ib[aria-pressed="true"] .icon { fill: currentColor; }
.acts .rep { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; font-size: .78rem; cursor: pointer; }
.acts .rep[disabled] { cursor: default; background: none; color: var(--ok); }
.acts [data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--text); color: var(--surface); font-size: .72rem; line-height: 1.2; white-space: nowrap; padding: 5px 8px; border-radius: 6px; opacity: 0; pointer-events: none; z-index: 20; }
.acts [data-tip]:hover::after, .acts [data-tip]:focus-visible::after { opacity: 1; }
.acts .ib:first-child::after { left: 0; transform: none; }
@media (pointer: coarse) { .acts .ib { width: 40px; height: 40px; } .acts [data-tip]::after { display: none; } }
.rdlg h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 1.05rem; }
.rdlg h3 .icon, .rdlg .btn .icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.rdlg .btn { display: inline-flex; align-items: center; gap: 6px; }
.rdlg .hint { margin: 0 0 4px; font-size: .88rem; }
.rdlg label { display: block; margin: 12px 0 4px; font-size: .8rem; color: var(--muted); }
.rdlg select, .rdlg textarea { width: 100%; font: inherit; color: var(--text); background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.rdlg textarea { min-height: 60px; resize: vertical; }
.rdlg .sentbox { margin-top: 12px; padding: 10px 12px; font-size: .8rem; color: var(--muted); border: 1px dashed var(--border); border-radius: 10px; }
.rdlg .sentbox b { color: var(--text); }
.rdlg .rp-err { margin: 8px 0 0; color: var(--warn); font-size: .85rem; }
.rdlg .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

/* Placeholder cards (Advanced agents, Business and organization agents): visible, not openable */
.agent.soon { cursor: default; opacity: .92; }
.agent.soon .go { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.agent.soon .go .tag { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface2); color: var(--muted); letter-spacing: .02em; }
.agent.soon .go a { color: var(--primary); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.agent.soon .go a:hover { text-decoration: underline; }

/* Trip Buddy: Share my location bar + place cards */
.ch-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 0 2px 8px; min-width: 0; }   /* composer helpers: the helper row (design/COMPOSER-HELPERS-PLAN.md) */
.ch-row[hidden] { display: none; }
.locsw { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: none; color: var(--muted); border-radius: 99px; padding: 5px 12px 5px 9px; font: inherit; font-size: .8rem; cursor: pointer; }
.locsw .icon { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.locsw[aria-pressed="true"] { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.locst { font-size: .75rem; color: var(--muted); }
.pcards { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.pcard { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.pcard .pb { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pcard .pb b { overflow-wrap: anywhere; }
.pcard .pm, .pcard .ph { font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.pcard .pn { display: flex; flex-direction: column; gap: 4px; flex: none; }
.pcard .pn a { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--primary); color: var(--primary); border-radius: 8px; padding: 3px 9px; font-size: .78rem; text-decoration: none; white-space: nowrap; }
.pcard .pn a .icon { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.pcard .pn a:hover { background: var(--primary-soft); }
.pcred { color: var(--muted); font-size: .7rem; }
/* shop link buttons (open_link): label + the real domain */
.lcards { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.lcard { display: inline-flex; flex-direction: column; gap: 1px; min-width: 0; max-width: 100%; border: 1px solid var(--primary); color: var(--primary); background: var(--surface); border-radius: 12px; padding: 8px 14px; text-decoration: none; }
.lcard b { font-weight: 700; overflow-wrap: anywhere; }
.lcard .ld { font-size: .74rem; color: var(--muted); overflow-wrap: anywhere; }
.lcard:hover { background: var(--primary-soft); }
.lcard:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* source cards (answer provenance) */
.scards { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.scard { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; text-decoration: none; color: var(--text); min-width: 0; }
.scard .sn { flex: none; min-width: 22px; height: 22px; border-radius: 99px; background: var(--primary-soft); color: var(--primary); font-size: .75rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.scard .sb { min-width: 0; display: flex; flex-direction: column; gap: 1px; flex: 1; }
.scard .sb b { font-weight: 600; font-size: .86rem; overflow-wrap: anywhere; }
.scard .sm { font-size: .74rem; color: var(--muted); overflow-wrap: anywhere; }
.scard .so { flex: none; font-size: .78rem; color: var(--primary); }
.scard:hover { border-color: var(--primary); }
.scard:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* one-tap quick questions + ahead / behind tag */
.qchips { flex-basis: 100%; display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.qchips::-webkit-scrollbar { display: none; }
.qchips button { flex: none; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: .82rem; cursor: pointer; white-space: nowrap; }
.qchips button:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
@media (pointer: coarse) { .qchips button { padding: 9px 14px; } }
.pcard .pos { font-weight: 700; }
.pcard .pos.ahead { color: var(--ok); }
.pcard .pos.behind { color: var(--muted); font-weight: 500; }

/* Route ahead: range box, route and plan cards */
.rng { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); border: 1px solid var(--border); border-radius: 99px; padding: 3px 10px; }
.rng .rin { width: 56px; border: 0; background: none; color: var(--text); font: inherit; font-size: .85rem; text-align: right; padding: 2px 0; }
.rng .rin:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.pcard.route, .pcard.plan { background: var(--surface2); }
.pcard .pd { display: flex; flex-direction: column; gap: 1px; font-size: .84rem; margin-top: 4px; }
.pcard .pd i { font-style: normal; font-weight: 700; color: var(--primary); }
.pcard .pd small { color: var(--muted); font-size: .74rem; overflow-wrap: anywhere; }


/* Compact composer: the chat keeps as much height as possible */
.composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 6px; align-items: end; padding: 6px 10px 6px; }
.composer > .ch-row { grid-column: 1 / -1; }
.composer textarea { min-height: 30px; padding: 4px 2px; line-height: 1.35; }
.composer .row { padding-bottom: 1px; }
.composer .cnt { display: none; }
.composer .cnt.near { display: inline; position: absolute; right: 10px; top: -16px; font-size: .7rem; background: var(--surface); padding: 0 4px; border-radius: 6px; }
.ch-row { gap: 4px 6px; padding: 0 0 4px; }
.ch-row > * { flex: none; }
.ch-row .ch-pill { height: 32px; padding: 0 10px 0 8px; max-width: 100%; min-width: 0; }
.ch-row .ch-pill > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ch-row .locedit { width: 32px; height: 32px; }
.ch-row .locst { font-size: .72rem; white-space: nowrap; }
.ch-row .locst.err { flex: 1 0 100%; white-space: normal; order: 5; }   /* the only second line: an error, while it lasts */
.ch-row .rng { padding: 2px 8px; }
.ch-row .rng .rin { width: 46px; }
.ch-row .qchips { flex: 1 1 96px; min-width: 0; order: 0; padding: 0 22px 0 0; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); }   /* on the same line as the pill whenever 96px are left; otherwise (a long label on a 320px phone) it drops to its own line, never cutting the label; scrolls sideways, fades at the edge so a cut chip reads as "more" */
.ch-row .qchips button { height: 32px; padding: 0 12px; }
@media (pointer: coarse) { .ch-row .ch-pill, .ch-row .qchips button, .ch-row .locedit { height: 40px; } .ch-row .locedit { width: 40px; } }
.qchips button { padding: 5px 11px; }
@media (pointer: coarse) { .qchips button { padding: 7px 12px; } }
@media (pointer: coarse) { .composer:has(textarea:focus) .qchips { display: none; } }   /* typing on a phone: the chips step aside (more room above the keyboard); on a desktop the box is focused when the panel opens and a keyboard takes no room, so they stay */
.chat-head .t small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.chat-disc { padding: 4px 12px; font-size: .72rem; font-weight: 600; line-height: 1.3; }
.chat-foot { margin: 4px 14px 8px; }

/* Compact v2: range + location settings in a popover, one-line place cards, smaller start screen on phones */
.composer { position: relative; }
.ch-row .locsw { gap: 5px; }
.ch-row .locsw .icon { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ch-row .locsw span { white-space: nowrap; }
.locpop { position: absolute; left: 8px; bottom: calc(100% + 8px); width: min(280px, calc(100% - 16px)); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 12px; display: flex; flex-direction: column; gap: 10px; z-index: 30; font-size: .88rem; }
.locpop[hidden] { display: none; }
.lp-r { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lp-in { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.lp-in .rin { width: 70px; border: 1px solid var(--border); background: var(--surface2); color: var(--text); border-radius: 8px; padding: 5px 8px; font: inherit; text-align: right; }
.lp-n { margin: 0; color: var(--muted); font-size: .76rem; }
.lp-sw { width: 40px; height: 24px; border-radius: 99px; border: 0; background: var(--border); position: relative; padding: 0; cursor: pointer; flex: none; }
.lp-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.lp-sw[aria-checked="true"] { background: var(--ok); }
.lp-sw[aria-checked="true"]::after { transform: translateX(16px); }
@media (prefers-reduced-motion: reduce) { .lp-sw::after { transition: none; } }
.pcard { align-items: center; padding: 6px 10px; }
.pcard .pb { gap: 1px; }
.pcard .pb b { font-size: .92rem; }
.pcard .pn { flex-direction: row; gap: 4px; }
.pcard .pn a { padding: 3px 8px; }
.pcards { gap: 6px; }
@media (max-width: 700px) {
  .welcome { padding: 4px 0 2px; }   /* centered: mascot, name, text (never cut off); the mascot is smaller on phones to leave room */
  .welcome img, .welcome.expert img { width: 96px; height: 96px; object-fit: contain; }
  .welcome.expert img { object-fit: cover; }
  .welcome h3 { margin: 4px 0 0; font-size: 1.1rem; }
  .welcome .role { margin: 0 0 2px; font-size: .8rem; }
  .welcome p { margin: 4px 6px 0; max-width: none; font-size: .86rem; }
  .sugg-title { text-align: center; }
  .sugg { justify-content: center; }
  .sugg-title { margin: 8px 0 4px; }
  .sugg { display: flex; flex-wrap: wrap; gap: 6px; }
  .sugg button { padding: 7px 12px; border-radius: 99px; font-size: .84rem; }
}

/* location strip (address + coordinates while sharing is on) */
.lp-where { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 0 0 6px; border-bottom: 1px solid var(--border); margin-bottom: 4px; font-size: .86rem; }
.lp-where[hidden] { display: none; }
.lp-where .lw-a { font-weight: 700; }
.lp-where .lw-r { color: var(--muted); }
.lp-where .lw-c { flex-basis: 100%; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .76rem; }
.lp-copy { border: 1px solid var(--border); background: none; color: var(--primary); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: .8rem; cursor: pointer; }
.lp-copy[hidden] { display: none; }
/* first-launch guide for the Location pill (shown once per device) */
.loccoach { position: absolute; inset: 0; z-index: 30; }
.loccoach .spot { position: absolute; border-radius: 99px; border: 2px solid #fff; box-shadow: 0 0 0 999px rgba(6, 14, 32, .62); animation: lcpulse 1.6s ease-out infinite; }
@keyframes lcpulse { 0% { outline: 2px solid rgba(255, 255, 255, .7); outline-offset: 0; } 100% { outline: 2px solid rgba(255, 255, 255, 0); outline-offset: 12px; } }
.loccoach .tip { position: absolute; left: 14px; right: 14px; max-width: 340px; background: var(--surface); color: var(--text); border-radius: 14px; padding: 11px 13px; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
.loccoach .tip::after { content: ""; position: absolute; left: var(--ax, 40px); bottom: -7px; width: 14px; height: 14px; background: var(--surface); transform: rotate(45deg); }
.loccoach .tip b { display: block; font-size: .95rem; margin-bottom: 2px; }
.loccoach .tip p { margin: 0; font-size: .85rem; color: var(--muted); }
.loccoach .tip .act { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: .8rem; color: var(--muted); }
.loccoach .tip .act button { background: none; border: 0; color: var(--muted); text-decoration: underline; font: inherit; cursor: pointer; padding: 6px 0; }
@media (prefers-reduced-motion: reduce) { .loccoach .spot { animation: none; } }

/* scrolling: the message list owns vertical swipes; the page behind never moves while the chat sheet is open on a phone */
.chat-scroll { overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; }
.qchips { overscroll-behavior-x: contain; }
@media (max-width: 1099px) {
  body.panel-open { overflow: hidden; overscroll-behavior: none; }
  .panel { height: 100dvh; overscroll-behavior: contain; }
}

/* set a place by hand */
.locedit { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--border); background: none; color: var(--muted); border-radius: 50%; cursor: pointer; flex: none; padding: 0; }
.locedit[hidden] { display: none; }
.locedit .icon { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lp-sep { height: 1px; background: var(--border); margin: 2px 0; }
.lp-sl { font-size: .75rem; font-weight: 700; color: var(--muted); }
.lp-q { width: 100%; border: 1px solid var(--border); background: var(--surface-2, var(--primary-soft)); color: var(--text); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: .9rem; }
.lp-q:focus { border-color: var(--primary); outline: 0; background: var(--surface); }
.lp-res { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.lp-res[hidden] { display: none; }
.lp-res button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; border: 0; border-top: 1px solid var(--border); background: none; color: var(--text); padding: 8px 10px; font: inherit; font-size: .85rem; cursor: pointer; }
.lp-res button:first-child { border-top: 0; background: var(--primary-soft); }
.lp-res button:hover { background: var(--primary-soft); }
.lp-res small { color: var(--muted); font-size: .72rem; }
.lp-m { padding: 8px 10px; font-size: .8rem; color: var(--muted); }
.lp-qn { margin: 0; font-size: .72rem; color: var(--muted); }
.lp-setbtn { margin-left: 8px; border: 1px solid var(--primary); background: var(--primary-soft); color: var(--primary); border-radius: 99px; padding: 4px 12px; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }

/* share: confirmation toast */
.toast { position: absolute; left: 50%; transform: translateX(-50%); bottom: 120px; background: #0b1b3a; color: #fff; border-radius: 99px; padding: 8px 16px; font-size: .85rem; z-index: 40; box-shadow: 0 8px 20px rgba(0,0,0,.3); }
@media (max-width: 700px) { .chat-head .btn.round { width: 34px; height: 34px; } .chat-head .row, .chat-head .acts { gap: 2px; } }
.chat-limit.gate { background: var(--primary-soft); border-color: var(--border); color: var(--text); }

/* header menu: wide screens keep the icons; phones keep New chat, More and Close */
.chat-head { position: relative; }
.chat-head .hmore { display: none; }
.hmenu { position: absolute; top: calc(100% - 4px); right: 8px; width: 244px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 5px; z-index: 35; }
.hmenu[hidden] { display: none; }
.hmenu .mi { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 0 10px; border: 0; background: none; color: var(--text); border-radius: 10px; font: inherit; font-size: .92rem; text-align: left; cursor: pointer; }
.hmenu .mi:hover, .hmenu .mi:focus-visible { background: var(--primary-soft); outline: 0; }
.hmenu .mi .icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); flex: none; }
.hmenu .mi em { margin-left: auto; font-style: normal; font-size: .76rem; font-weight: 700; color: var(--muted); }
.hmenu .mi em.on { color: var(--ok); }
.hmenu .mi .d { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.hmenu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 6px; }
@media (max-width: 700px) {
  .chat-head .hmore { display: inline-grid; }
  .chat-head [data-act="resp"], .chat-head [data-act="speak"], .chat-head [data-act="full"], .chat-head [data-act="share"], .chat-head [data-act="help"] { display: none; }
  .chat-head .hmore .dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
  .chat-head .hmore .dot[hidden] { display: none; }
}
/* the docked panel on desktop is only 420px wide whatever the screen is: same header as a phone (name, More, New chat, Close), or the name wraps onto 3 lines and the icons overlap it */
@media (min-width: 1100px) {
  .panel .chat-head .hmore { display: inline-grid; }
  .panel .chat-head [data-act="resp"], .panel .chat-head [data-act="speak"], .panel .chat-head [data-act="full"], .panel .chat-head [data-act="share"], .panel .chat-head [data-act="help"] { display: none; }
  .panel .chat-head .hmore .dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
  .panel .chat-head .hmore .dot[hidden] { display: none; }
}

/* prompts button, "what can I do" link, prompt sheet and help sheet */
.pbtn { color: var(--primary); }
.whelp { display: block; margin: 4px auto 0; background: none; border: 0; color: var(--primary); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; padding: 4px 8px; }
.whint { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.psheet-wrap { position: absolute; inset: 0; z-index: 36; display: flex; flex-direction: column; justify-content: flex-end; }
.pscrim { position: absolute; inset: 0; background: rgba(6, 14, 32, .4); }
.psheet { position: relative; max-height: 78%; display: flex; flex-direction: column; gap: 6px; background: var(--surface); border-top: 1px solid var(--border); border-radius: 18px 18px 0 0; padding: 8px 14px 12px; box-shadow: 0 -10px 30px rgba(0,0,0,.22); }
.psheet .grab { width: 36px; height: 4px; border-radius: 2px; background: var(--border); margin: 0 auto 4px; }
.psheet h4 { margin: 0; font-size: 1rem; display: flex; justify-content: space-between; align-items: center; }
.psheet h4 span { font-weight: 500; color: var(--muted); font-size: .78rem; }
.psq { width: 100%; border: 1px solid var(--border); background: var(--surface-2, var(--primary-soft)); color: var(--text); border-radius: 10px; padding: 9px 11px; font: inherit; font-size: .92rem; }
.psq:focus { outline: 2px solid var(--primary); outline-offset: 0; }
.pslist { overflow-y: auto; overscroll-behavior: contain; }
.psg { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 10px 0 2px; }
.psr { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; background: none; border: 0; border-bottom: 1px solid var(--border); color: var(--text); font: inherit; font-size: .92rem; text-align: left; cursor: pointer; padding: 4px 2px; }
.psr:hover, .psr:focus-visible { background: var(--primary-soft); outline: 0; }
.psr .icon { width: 16px; height: 16px; color: var(--primary); flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.psr em { margin-left: auto; font-style: normal; font-size: .68rem; color: var(--muted); border: 1px solid var(--border); border-radius: 99px; padding: 1px 8px; white-space: nowrap; flex: none; }
.psn { color: var(--muted); font-size: .88rem; margin: 12px 2px; }
@media (min-width: 701px) { .psheet { max-width: 560px; margin: 0 auto; width: 100%; border-radius: 18px 18px 0 0; } }
.hsheet { position: absolute; inset: 0; z-index: 37; background: var(--surface); display: flex; flex-direction: column; }
.hst { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.hst .icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--primary); }
.hsx { margin-left: auto; background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 6px; }
.hsb { overflow-y: auto; overscroll-behavior: contain; padding: 6px 16px 18px; max-width: 640px; width: 100%; margin: 0 auto; }
.hsb h5 { margin: 16px 0 6px; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hrow { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; font-size: .92rem; }
.hrow .icon { width: 18px; height: 18px; flex: none; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; color: var(--primary); }
.hrow small { display: block; color: var(--muted); font-size: .8rem; }
.htry { display: flex; flex-wrap: wrap; gap: 6px; }
.htry button { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 99px; padding: 8px 13px; font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; }
.htry button:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

/* shared agent link (/agent/<id>/): the chat full screen, a slim top bar, no agent list */
body[data-focus] { --head-h: 48px; }
body[data-focus] .head { height: 48px; padding: 0 12px; gap: 8px; }
body[data-focus] .head #btn-menu, body[data-focus] .head .nav { display: none; }
body[data-focus] .head.head-nav { display: flex; }   /* its menu is hidden here: back to a plain row so the buttons stay on the right */
body[data-focus] .agents-strip, body[data-focus] .side { display: none; }
body[data-focus] .chat-page { grid-template-columns: 1fr; }

/* shared link on a phone: no site bar at all, the chat is the whole screen; its header gets a close button and the More menu holds language, theme and account */
.chat-head .hexit { display: none; }
@media (max-width: 700px) {
  body[data-focus] .head { display: none; }
  body[data-focus] { --head-h: 0px; }
  body[data-focus] .chat-head .hexit { display: inline-grid; }
}

/* iPhone Safari zooms the page when a field under 16px gets focus: keep every field at 16px on touch screens */
@media (pointer: coarse) { input, textarea, select, .psq, .lp-q, .rin { font-size: 16px !important; } }

/* Agent card skeleton (2026-11-20): fixed rows so every card lines up.
   avatar top-left | name 1 line | role 1 line | description 3 lines | button pinned to the bottom, full card width */
.agent.agent { --jl: 1.45; display: grid; grid-template-columns: 80px minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; align-content: stretch; align-items: start; justify-items: start; text-align: left; row-gap: 3px; column-gap: 12px; padding: 12px; }
.agent .av { grid-row: 1 / 4; grid-column: 1; position: relative; align-self: start; width: 80px; height: 80px; }
.agent .av img { width: 80px; height: 80px; display: block; }
.agent .ai { position: absolute; right: -4px; bottom: -4px; font-size: .66rem; font-weight: 800; line-height: 1; padding: 3px 6px; border-radius: 99px; color: var(--primary-ink, #fff); background: var(--ac, var(--primary)); border: 2px solid var(--surface); letter-spacing: .02em; }
.agent .n, .agent .r { grid-column: 2; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent .n { grid-row: 1; font-size: 1.15rem; }
.agent .r { grid-row: 2; font-size: .8rem; }
.agent .j { grid-column: 2; grid-row: 3; align-self: start; max-width: 100%; font-size: .85rem; line-height: var(--jl); min-height: calc(3 * var(--jl) * 1em); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.agent .go, .agent.soon .go { grid-column: 1 / -1; grid-row: 4; align-self: end; justify-self: start; margin-top: 8px; }
@media (max-width: 719px) {
  .agent.agent { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto 1fr auto; justify-items: center; text-align: center; row-gap: 4px; padding: 14px 12px; }
  .agent .av, .agent .n, .agent .r, .agent .j, .agent .go, .agent.soon .go { grid-column: 1; }
  .agent .av { grid-row: 1; width: 88px; height: 88px; } .agent .av img { width: 88px; height: 88px; }
  .agent.agent .go { white-space: nowrap; font-size: .78rem; padding: 6px 10px; gap: 5px; max-width: 100%; }
  .agent .n { grid-row: 2; } .agent .r { grid-row: 3; } .agent .j { grid-row: 4; } .agent .go, .agent.soon .go { grid-row: 5; justify-self: center; }
}

/* ===== Home page round (2026-11-20) ===== */
:root { --sec-gap: 48px; }
@media (max-width: 719px) { :root { --sec-gap: 36px; } }
/* one vertical rhythm between sections */
main > section.wrap:not(.hero) { margin-top: var(--sec-gap); padding-top: 0; padding-bottom: 0; }
main > section.wrap#what { margin-top: 28px; }
.section-title { margin: 0 0 14px; }
.sec h2 { margin: 0 0 14px; }
.early { margin: 0; }
.sitefoot { margin-top: var(--sec-gap); padding-bottom: 40px; }

/* hero: bigger lead + two clear actions */
.hero p { font-size: 1.15rem; line-height: 1.55; }
.hero-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.hbtn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 24px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; font-size: 1rem; text-decoration: none; }
.hbtn:hover { background: var(--primary-soft); }
.hbtn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.hbtn.primary:hover { filter: brightness(1.08); background: var(--primary); }

/* value strip (was "What TARAA is", moved up under the hero) */
.vstrip { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .vstrip { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.vstrip .vi { display: flex; gap: 12px; align-items: flex-start; }
.vstrip svg { flex: none; width: 40px; height: 40px; padding: 9px; box-sizing: border-box; border-radius: 12px; background: var(--primary-soft); color: var(--primary); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vstrip b { display: block; font-family: var(--font-head); font-size: 1.1rem; line-height: 1.3; }
.vstrip span { color: var(--muted); font-size: .95rem; line-height: 1.5; }

/* one Sign in bar instead of a Sign in button on every card */
.signin-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; margin: 0 0 14px; border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border)); border-radius: var(--radius-sm); background: var(--primary-soft); }
.signin-bar[hidden] { display: none; }
.signin-bar span { flex: 1; min-width: 200px; font-weight: 600; }
.signin-bar button { height: 36px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--primary); color: var(--primary-ink); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.signin-bar button:hover { filter: brightness(1.08); }

/* demo cards have no role line: they reserve 2 lines of description, not 3 */
.agent:not(.pro) .j { -webkit-line-clamp: 2; min-height: calc(2 * var(--jl, 1.45) * 1em); }

/* experts: one row of vertical cards (avatar on top), centred when it wraps */
.xrow { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.xrow .agent { flex: 0 0 calc((100% - 12px) / 2); min-width: 0; }
@media (min-width: 720px) { .xrow .agent { flex-basis: calc((100% - 24px) / 3); } }
@media (min-width: 1100px) { .xrow .agent { flex-basis: calc((100% - 12px * (var(--xn, 5) - 1)) / var(--xn, 5)); } }
.xrow .agent.agent { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto 1fr auto; justify-items: center; text-align: center; row-gap: 4px; padding: 16px 12px 14px; }
.xrow .agent .av, .xrow .agent .n, .xrow .agent .r, .xrow .agent .j, .xrow .agent .go { grid-column: 1; }
.xrow .agent .av { grid-row: 1; width: 104px; height: 104px; margin-bottom: 4px; }
.xrow .agent .av img { width: 104px; height: 104px; }
.xrow .agent .n { grid-row: 2; } .xrow .agent .r { grid-row: 3; } .xrow .agent .j { grid-row: 4; } .xrow .agent .go { grid-row: 5; justify-self: center; }
.xrow .agent .j { text-align: center; }

/* how it works: a stepper, not three boxes */
.steps { gap: 0; }
.steps li { background: none; border: 0; box-shadow: none; border-radius: 0; padding: 4px 0 20px 52px; min-height: 40px; }
.steps li::before { left: 0; top: 0; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 42px; bottom: 4px; width: 2px; background: var(--border); }
@media (min-width: 800px) {
  .steps li { padding: 48px 20px 0 0; }
  .steps li:not(:last-child)::after { left: 48px; right: 12px; top: 17px; bottom: auto; width: auto; height: 2px; }
}

/* trust: four compact cards */
.checks { grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .checks { grid-template-columns: repeat(2, 1fr); } }
.checks li { padding: 14px 16px 14px 52px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.checks li::before { left: 16px; top: 16px; }

/* phones: the 2-column cards are narrow, so long names and descriptions wrap instead of being cut (any language) */
@media (max-width: 719px) {
  .agent .n, .agent .r { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
  .agent .j, .agent:not(.pro) .j { -webkit-line-clamp: 6; }
}

/* production: the mock bar is never shown */
body[data-mode="prod"] .mockbar { display: none !important; }
.doc { max-width: 760px; margin: 0 auto; padding: 36px 0 24px; }
.doc h1 { margin: 0 0 6px; font-size: clamp(2rem, 5vw, 2.8rem); }
.doc h2 { margin: 28px 0 8px; font-size: 1.35rem; }
.doc p, .doc li { color: var(--muted); }
.doc li { margin: 6px 0; }
.doc strong { color: var(--text); }
.doc-meta { font-size: .9rem; }
.ssobox { max-width: 460px; margin: 18vh auto 0; padding: 28px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.ssobox img { height: 64px; width: auto; margin: 0 auto 12px; }
.ssobox .actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
