/* Veraa — shared design system for the product pages (light, monochrome). */
:root { --v-purple:#A455CE; --v-violet:#6363C6; --v-navy:#262B50; --v-plum:#452C28; --ink:#0d0d0d; --text:#141414; --muted:#6e6e73; --dim:#7a7a80; --soft:#f7f7f8; --soft2:#efeff2; --hair:#e6e6ea; --line:#e6e6ea;
        --ok:#1f8a4c; --warn:#8a5a12; --warn-fill:#b7791f; --err:#c0392b; --w:1240px; --r:14px; --nav:64px; }   /* --dim 4.6:1 and --warn 5.6:1 on white (text); --warn-fill keeps the amber for bars/tints (UX round 1) */
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { background:#fff; color:var(--text); font-family:Figtree,"Readex Pro",system-ui,sans-serif; line-height:1.5; -webkit-font-smoothing:antialiased; overflow-x:hidden; }
html[dir=rtl] body { line-height:1.75; }
a { color:inherit; text-decoration:none; }
img { max-width:100%; display:block; }
button { font:inherit; cursor:pointer; color:inherit; }
input, select, textarea { font:inherit; color:inherit; }
.wrap { max-width:var(--w); margin:0 auto; padding:0 2rem; }
.label { font-size:.82rem; color:var(--muted); font-weight:500; letter-spacing:.01em; }
h2 { font-size:clamp(2rem,4.2vw,3.4rem); font-weight:400; letter-spacing:-.03em; line-height:1.08; max-width:900px; }
html[dir=rtl] h2 { letter-spacing:0; line-height:1.3; font-weight:500; }
.sub { color:var(--muted); font-size:1.15rem; max-width:680px; margin-top:1rem; font-weight:400; }
.hint { font-size:.8rem; color:var(--dim); margin-top:.35rem; }

/* pills & buttons */
.pill { display:inline-flex; align-items:center; justify-content:center; height:46px; padding:0 1.35rem; border-radius:999px; font-weight:500; font-size:.95rem; border:1px solid transparent; transition:transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease; white-space:nowrap; background:none; }
.pill:hover { transform:translateY(-1px); }
.pill.black { background:var(--ink); color:#fff; }
.pill.black:hover { background:#333; }
.pill.white { background:#fff; color:var(--ink); }
.pill.line { border-color:var(--hair); color:var(--ink); }
.pill.line:hover { border-color:#bbb; }
.pill.lg { height:54px; padding:0 1.7rem; font-size:1.02rem; }
.btn { display:inline-flex; align-items:center; gap:.45rem; justify-content:center; padding:.6rem 1.05rem; border-radius:11px; border:1px solid var(--hair); background:#fff; color:var(--text); font-size:.92rem; transition:border-color .15s, background .15s; }
.btn:hover { border-color:#bdbdc4; background:var(--soft); }
.btn.primary, .btn.black { background:var(--ink); border-color:var(--ink); color:#fff; font-weight:500; }
.btn.primary:hover, .btn.black:hover { background:#2b2b2b; }
.btn.full { width:100%; }
.btn.sm { padding:.34rem .75rem; font-size:.83rem; border-radius:9px; }
.btn.danger { color:var(--err); }
.btn.ghost { border-color:transparent; background:transparent; }
.btn.ghost:hover { background:var(--soft); }
.btn:disabled { opacity:.5; cursor:not-allowed; }
.iconbtn { width:38px; height:38px; border-radius:999px; border:1px solid var(--hair); background:#fff; display:inline-flex; align-items:center; justify-content:center; position:relative; color:var(--ink); }
.iconbtn:hover { background:var(--soft); }
.iconbtn .cnt { position:absolute; top:-4px; inset-inline-end:-4px; background:var(--ink); color:#fff; font-size:.62rem; font-weight:700; border-radius:999px; min-width:17px; height:17px; padding:0 4px; display:none; align-items:center; justify-content:center; }
.iconbtn .cnt.on { display:inline-flex; }

/* nav */
nav.top { position:fixed; top:0; left:0; right:0; z-index:40; height:var(--nav); background:rgba(255,255,255,.86); backdrop-filter:blur(16px); color:var(--ink); border-bottom:1px solid var(--hair); }
nav.top .wrap { display:flex; align-items:center; justify-content:space-between; height:var(--nav); gap:1.5rem; max-width:none; }
nav.top .logo { font-weight:600; letter-spacing:-.02em; font-size:1.2rem; display:inline-flex; align-items:baseline; gap:.45rem; }
.logo-img { height:22px; width:auto; display:block; align-self:center; }
.avatar.brand img { width:15px; height:15px; display:block; }
nav.top .logo .by { font-size:.62rem; font-weight:500; letter-spacing:.02em; color:var(--dim); white-space:nowrap; }
@media (max-width:640px) { nav.top .logo .by { display:none; } }
nav.top .links { display:flex; gap:1.5rem; font-size:.93rem; }
nav.top .links a { color:var(--muted); }
nav.top .links a:hover, nav.top .links a.active { color:var(--ink); }
nav.top .acts { display:flex; align-items:center; gap:.5rem; flex-wrap:nowrap; }
nav.top .wrap { flex-wrap:nowrap; }
nav.top .lang { height:38px; padding:0 .8rem; border-radius:999px; border:1px solid var(--hair); background:#fff; font-size:.82rem; font-weight:600; }
nav.top .pill { height:38px; padding:0 1.05rem; font-size:.88rem; }
.burger { display:none; height:38px; width:38px; border-radius:999px; border:1px solid var(--hair); background:none; font-size:1.1rem; }
.mnav { display:none; position:fixed; top:calc(var(--nav) + var(--banner, 0px)); left:0; right:0; z-index:39; background:#fff; border-bottom:1px solid var(--hair); padding:.8rem 2rem 1.2rem; flex-direction:column; gap:.8rem; font-size:1.05rem; }
.mnav.on { display:flex; }
.userchip { display:inline-flex; align-items:center; gap:.5rem; height:38px; padding:0 .9rem 0 .35rem; border-radius:999px; border:1px solid var(--hair); background:#fff; font-size:.88rem; }
html[dir=rtl] .userchip { padding:0 .35rem 0 .9rem; }
.avatar { width:30px; height:30px; border-radius:50%; background:var(--ink); color:#fff; display:inline-flex; align-items:center; justify-content:center; font-size:.8rem; font-weight:600; flex-shrink:0; }
.avatar.soft { background:var(--soft2); color:var(--ink); }
.menu { position:absolute; top:46px; inset-inline-end:0; background:#fff; border:1px solid var(--hair); border-radius:14px; box-shadow:0 12px 40px rgba(0,0,0,.08); min-width:220px; padding:.4rem; display:none; z-index:50; }
.menu.on { display:block; }
.menu a, .menu button { display:flex; width:100%; text-align:start; padding:.55rem .75rem; border-radius:9px; font-size:.9rem; border:0; background:none; }
.menu a:hover, .menu button:hover { background:var(--soft); }
.menu .sep { height:1px; background:var(--hair); margin:.3rem 0; }
.menu .who { padding:.5rem .75rem .3rem; font-size:.78rem; color:var(--muted); }

/* app frame */
.app { display:flex; height:100vh; height:100dvh; overflow:hidden; box-sizing:border-box; padding-top:calc(var(--nav) + var(--banner, 0px)); }
html:has(.app), body:has(.app) { height:100%; overflow:hidden; overscroll-behavior:none; }   /* the page never scrolls: only the chat column and the rail do */
.app .main { flex:1; min-width:0; display:flex; flex-direction:column; min-height:0; }
.rail { width:290px; flex-shrink:0; background:var(--soft); border-inline-end:1px solid var(--hair); display:flex; flex-direction:column; min-height:0; }
.rail .rail-top { padding:.9rem .9rem .5rem; display:flex; gap:.5rem; align-items:center; }
.rail-backdrop { display:none; }
.rail .scroll { flex:1; overflow-y:auto; padding:.3rem .6rem 1rem; }
.rail .rail-bottom { padding:.7rem .9rem; border-top:1px solid var(--hair); }
.main { flex:1; min-width:0; display:flex; flex-direction:column; min-height:0; }
.search { display:flex; align-items:center; gap:.5rem; background:#fff; border:1px solid var(--hair); border-radius:11px; padding:.45rem .7rem; }
.search input { border:0; background:none; flex:1; font-size:.9rem; min-width:0; }   /* focus ring drawn on .search:focus-within (see the UX round 1 block) */
.group-label { font-size:.72rem; color:var(--dim); font-weight:600; letter-spacing:.04em; padding:.9rem .5rem .3rem; text-transform:uppercase; }

/* forms */
.field { margin-bottom:.85rem; }
.field label { display:block; font-size:.84rem; color:var(--muted); margin-bottom:.35rem; }
.field input, .field select, .field textarea { width:100%; padding:.62rem .8rem; background:#fff; border:1px solid var(--hair); border-radius:11px; font-size:.95rem; }
.field input:focus, .field select:focus, .field textarea:focus { border-color:#8a8a90; }   /* :focus-visible ring in the UX round 1 block */
.field textarea { resize:vertical; min-height:80px; }
.row { display:flex; gap:.65rem; align-items:center; flex-wrap:wrap; }
.row.between { justify-content:space-between; }
.switch { position:relative; width:44px; height:26px; display:inline-block; flex-shrink:0; }
.switch input { opacity:0; width:0; height:0; }
.switch span { position:absolute; inset:0; background:#d8d8de; border-radius:999px; transition:.2s; }
.switch span::before { content:""; position:absolute; width:20px; height:20px; left:3px; top:3px; background:#fff; border-radius:50%; transition:.2s; }
.switch input:checked + span { background:var(--ink); }
.switch input:checked + span::before { transform:translateX(18px); }
html[dir=rtl] .switch span::before { left:auto; right:3px; }
html[dir=rtl] .switch input:checked + span::before { transform:translateX(-18px); }
.seg { display:inline-flex; background:var(--soft2); border-radius:10px; padding:3px; gap:2px; }
.seg button { border:0; background:transparent; color:var(--muted); padding:.34rem .8rem; border-radius:8px; font-size:.84rem; }
.seg button.active { background:#fff; color:var(--ink); font-weight:600; box-shadow:0 1px 3px rgba(0,0,0,.08); }
.tabs { display:flex; gap:.2rem; border-bottom:1px solid var(--hair); margin-bottom:1.2rem; overflow-x:auto; }
.modal .tabs { flex-wrap:wrap; overflow:visible; }
.tabs button { border:0; background:none; padding:.7rem .9rem; color:var(--muted); font-size:.92rem; border-bottom:2px solid transparent; white-space:nowrap; margin-bottom:-1px; }
.tabs button.active { color:var(--ink); border-bottom-color:var(--ink); font-weight:600; }

/* surfaces */
.panel { background:#fff; border:1px solid var(--hair); border-radius:var(--r); padding:1.2rem 1.3rem; margin-bottom:1.1rem; }
.panel h3 { font-size:1.02rem; margin-bottom:.8rem; font-weight:600; }
.panel .desc, .desc { color:var(--muted); font-size:.9rem; line-height:1.7; }
.cards { display:grid; grid-template-columns:repeat(auto-fit, minmax(190px, 1fr)); gap:.9rem; margin-bottom:1.3rem; }
.card { background:var(--soft); border-radius:var(--r); padding:1rem 1.1rem; }
.card .k { color:var(--muted); font-size:.8rem; margin-bottom:.35rem; }
.card .v { font-size:1.5rem; font-weight:600; letter-spacing:-.01em; font-variant-numeric:tabular-nums; }
.card .v.sm { font-size:1rem; }
.badge { display:inline-block; padding:.17rem .6rem; border-radius:999px; font-size:.74rem; font-weight:600; white-space:nowrap; }
.badge.ok { background:rgba(31,138,76,.1); color:var(--ok); }
.badge.warn { background:rgba(183,121,31,.12); color:var(--warn); }
.badge.err { background:rgba(192,57,43,.1); color:var(--err); }
.badge.dim { background:var(--soft2); color:var(--muted); }
.empty { color:var(--dim); font-size:.88rem; padding:.6rem 0; }
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; font-size:.88rem; }
th, td { text-align:start; padding:.6rem .5rem; border-bottom:1px solid var(--hair); vertical-align:top; }
th { color:var(--muted); font-weight:500; font-size:.8rem; }
tr:last-child td { border-bottom:0; }
code, .mono { font-family:"IBM Plex Mono", ui-monospace, monospace; }
.kv { display:flex; justify-content:space-between; gap:1rem; padding:.55rem 0; border-bottom:1px solid var(--hair); font-size:.9rem; }
.kv:last-child { border-bottom:0; }
.kv b { font-weight:600; }
.lim { margin:.8rem 0; }
.lim-h { display:flex; justify-content:space-between; font-size:.86rem; margin-bottom:.35rem; }
.lim-h small { color:var(--dim); }
.bar { height:8px; background:var(--soft2); border-radius:999px; overflow:hidden; }
.bar i { display:block; height:100%; background:linear-gradient(90deg, var(--v-purple), var(--v-violet)); border-radius:999px; width:0; transition:width .4s; }
.bar i.warn { background:var(--warn); } .bar i.err { background:var(--err); }
.note { font-size:.82rem; color:var(--warn); }
.steps .step { display:flex; gap:.85rem; padding:.85rem 0; border-bottom:1px solid var(--hair); }
.steps .step:last-child { border-bottom:0; }
.steps .n { width:28px; height:28px; border-radius:50%; background:var(--ink); color:#fff; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:.85rem; }
.steps .b h4 { font-size:.95rem; margin-bottom:.25rem; }
.steps .b p { color:var(--muted); font-size:.87rem; line-height:1.65; }
.checks { display:flex; flex-direction:column; gap:.4rem; max-height:220px; overflow-y:auto; }
.chk { display:flex; align-items:center; gap:.5rem; font-size:.9rem; }
.error-box { display:none; background:rgba(192,57,43,.08); color:var(--err); border-radius:10px; padding:.6rem .8rem; font-size:.86rem; margin-bottom:.8rem; }

/* sign-up: terms checkbox + email OTP step (RTL-safe: flex start/end follow the document direction) */
.chk input { width:auto; flex:none; }   /* .field input {width:100%} must not stretch checkboxes */
.chk.terms { align-items:flex-start; font-size:.84rem; color:var(--muted); margin:.2rem 0 .9rem; cursor:pointer; }
.chk.terms input { margin-top:.3em; accent-color:var(--ink); }
.chk.terms a { color:var(--ink); text-decoration:underline; }
.field input.otp-in { direction:ltr; text-align:center; font-size:1.3rem; letter-spacing:.3em; padding:.7rem .8rem; }
.otp-links { display:flex; justify-content:space-between; gap:.6rem 1rem; flex-wrap:wrap; margin-top:.9rem; }
.otp-links a { color:var(--ink); text-decoration:underline; }
.otp-links a.dis { color:var(--dim); text-decoration:none; pointer-events:none; }

/* modal + toast */
.modal-bg { position:fixed; inset:0; background:rgba(13,13,13,.45); display:none; align-items:center; justify-content:center; z-index:60; padding:1rem; backdrop-filter:blur(4px); }
.modal-bg.on { display:flex; }
.modal { background:#fff; border-radius:20px; padding:1.6rem; width:100%; max-width:440px; max-height:88vh; overflow-y:auto; box-shadow:0 30px 80px rgba(0,0,0,.18); }
.modal h3 { margin-bottom:1rem; font-size:1.2rem; font-weight:600; }
.modal .tabs { margin-bottom:1rem; }
.toast { position:fixed; bottom:1.4rem; left:50%; transform:translateX(-50%); background:var(--ink); color:#fff; padding:.65rem 1.1rem; border-radius:999px; font-size:.88rem; display:none; z-index:100; box-shadow:0 10px 30px rgba(0,0,0,.2); max-width:90vw; }

/* Ask (ChatGPT-style) */
.conv-item { display:flex; align-items:center; gap:.5rem; width:100%; text-align:start; padding:.5rem .65rem; border-radius:10px; border:0; background:none; font-size:.88rem; color:var(--text); }
.conv-item:hover { background:#fff; }
.conv-item.active { background:#fff; font-weight:600; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.conv-item .t { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.conv-item .x { opacity:0; color:var(--dim); border:0; background:none; padding:0 .2rem; }
.conv-item:hover .x { opacity:1; }
.ask-head { display:flex; align-items:center; justify-content:space-between; gap:.6rem; padding:.7rem 1.2rem; border-bottom:1px solid var(--hair); }
.ask-head select { border:1px solid var(--hair); border-radius:999px; padding:.35rem .8rem; background:#fff; font-size:.86rem; }
.ask-msgs { flex:1; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; padding:1.4rem 1.2rem; }
.ask-col { max-width:780px; margin:0 auto; display:flex; flex-direction:column; gap:1.1rem; }
.msg { max-width:100%; }
.msg.me { align-self:flex-end; max-width:78%; }
.msg.me .bub { background:linear-gradient(135deg, rgba(164,85,206,.13), rgba(99,99,198,.13)); color:var(--ink); border-radius:18px; border-end-end-radius:6px; padding:.7rem 1rem; font-size:.96rem; white-space:pre-wrap; word-break:break-word; }
.msg.them { align-self:stretch; display:flex; gap:.8rem; }
.msg.them .who { flex-shrink:0; }
.msg.them .bub { font-size:.98rem; line-height:1.8; word-break:break-word; }
.msg .bub p { margin:0 0 .5rem; }
.msg .bub ul, .msg .bub ol, .cm .bub ul, .cm .bub ol { margin:.35rem 0 .5rem; padding-inline-start:1.2rem; }
.msg .bub li { margin:.2rem 0; }
.msg .bub strong { font-weight:600; }
.msg .bub code, .cm .bub code { background:var(--soft2); padding:.05rem .35rem; border-radius:5px; direction:ltr; unicode-bidi:embed; font-size:.86em; }
.msg .bub a { text-decoration:underline; text-underline-offset:3px; }
/* markdown blocks inside her bubbles (Ask + Chat): code fences, quotes, rules, tables — RTL-safe */
.msg .bub pre, .cm .bub pre { direction:ltr; text-align:left; overflow-x:auto; background:var(--soft2); border-radius:10px; padding:.6rem .8rem; margin:.4rem 0 .6rem; font-size:.85rem; line-height:1.55; }
.msg .bub pre code, .cm .bub pre code { background:none; padding:0; font-size:inherit; white-space:pre; }
.msg .bub blockquote, .cm .bub blockquote { border-inline-start:3px solid var(--hair); margin:.4rem 0 .6rem; padding-inline-start:.7rem; color:var(--muted); }
.msg .bub hr, .cm .bub hr { border:0; border-top:1px solid var(--hair); margin:.7rem 0; }
.msg .bub em, .cm .bub em { font-style:italic; }
.msg .bub .table-wrap, .cm .bub .table-wrap { overflow-x:auto; direction:inherit; margin:.5rem 0 .7rem; }
.msg .bub table, .cm .bub table { width:auto; min-width:min(100%, 320px); font-size:.88rem; }
.msg .bub th, .msg .bub td, .cm .bub th, .cm .bub td { text-align:start; direction:inherit; padding:.45rem .6rem; }
.msg .meta { font-size:.72rem; color:var(--dim); margin-top:.35rem; }
.msg .sources { font-size:.78rem; color:var(--muted); margin-top:.4rem; }
.msg .sources a { text-decoration:underline; direction:ltr; unicode-bidi:embed; }
.typing { color:var(--dim); }
.typing::before { display:none; content:""; width:15px; height:15px; border-radius:50%; border:2px solid var(--hair, #ddd); border-top-color:var(--ink, #111); animation:spin .8s linear infinite; vertical-align:-3px; margin-inline-end:.5rem; }
/* .typing::after "…" removed (UX round 1): the thinking text already ends with an ellipsis — the Ask page owns it */
@keyframes spin { to { transform:rotate(360deg); } }
.spin { display:inline-block; width:14px; height:14px; border-radius:50%; border:2px solid rgba(0,0,0,.15); border-top-color:currentColor; animation:spin .8s linear infinite; vertical-align:-2px; margin-inline-end:.4rem; }
.cbtn.busy svg { animation:pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }
.stage-bar { display:block; height:3px; border-radius:999px; background:var(--soft2, #eee); overflow:hidden; margin-top:.45rem; }
.v-loader { display:inline-block; width:20px; vertical-align:-4px; margin-inline-end:.45rem; color:var(--ink); }
.bub.typing { display:flex; align-items:center; flex-wrap:wrap; gap:.1rem .45rem; }
.bub.typing .stage-bar { flex-basis:100%; }
.bub.typing .v-loader { margin-inline-end:0; width:22px; }
.v-loader svg { width:100%; height:auto; display:block; }
.v-loader .a1,.v-loader .a2,.v-loader .a3,.v-loader .a4 { opacity:.14; animation:vload 1.8s cubic-bezier(.4,0,.2,1) infinite; }
.v-loader .a2 { animation-delay:.22s } .v-loader .a3 { animation-delay:.44s } .v-loader .a4 { animation-delay:.66s }
@keyframes vload { 0% { opacity:.14 } 8% { opacity:1 } 62% { opacity:1 } 75% { opacity:.14 } 100% { opacity:.14 } }
.stage-bar i { display:block; height:100%; width:35%; background:linear-gradient(90deg, var(--v-purple), var(--v-violet)); border-radius:999px; animation:slide 1.4s ease-in-out infinite; }
@keyframes slide { 0%{transform:translateX(-120%)} 100%{transform:translateX(320%)} }
[dir="rtl"] .stage-bar i { animation-name:slide-rtl; } @keyframes slide-rtl { 0%{transform:translateX(120%)} 100%{transform:translateX(-320%)} }
@keyframes dots { 0%{opacity:.2} 50%{opacity:1} 100%{opacity:.2} }
.speak-btn { background:none; border:0; color:var(--dim); padding:.1rem .25rem; vertical-align:-3px; cursor:pointer; }
.reply-chip { display:flex; align-items:center; gap:.5rem; font-size:.8rem; color:var(--dim); background:var(--panel, rgba(127,127,127,.08)); border-radius:.6rem; padding:.3rem .6rem; margin:0 0 .35rem; }
.reply-chip .rc-text { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.reply-chip .rc-x { background:none; border:0; color:var(--dim); cursor:pointer; font-size:.9rem; }
.reply-chip[hidden] { display:none !important; }
.speak-btn:hover, .speak-btn.playing { color:var(--ink); }
.speak-btn.loading { color:var(--ink); animation: speakpulse .9s ease-in-out infinite; }
@keyframes speakpulse { 0%,100% { opacity:.35 } 50% { opacity:1 } }
.hero-ask { text-align:center; padding:3rem 1rem 1rem; background:radial-gradient(60% 55% at 50% 0%, rgba(164,85,206,.13), rgba(99,99,198,.06) 45%, transparent 75%); }
.hero-ask h1 { font-size:clamp(1.7rem,3.5vw,2.6rem); font-weight:500; letter-spacing:-.02em; }
html[dir=rtl] .hero-ask h1 { letter-spacing:0; }
.hero-ask p { color:var(--muted); margin-top:.5rem; }
.suggest { display:flex; flex-wrap:wrap; gap:.5rem; justify-content:center; margin-top:1.4rem; }
.sugg { padding:.5rem .95rem; border-radius:999px; border:1px solid var(--hair); background:#fff; color:var(--muted); font-size:.86rem; }
.sugg:hover { border-color:#aaa; color:var(--ink); }
.composer-wrap { padding:.6rem 1.2rem 1.1rem; }
.composer { max-width:780px; margin:0 auto; border:1px solid var(--hair); border-radius:22px; background:#fff; box-shadow:0 6px 30px rgba(0,0,0,.05); padding:.6rem .7rem .5rem; }
.composer textarea { width:100%; border:0; resize:none; font-size:1rem; line-height:1.6; padding:.35rem .5rem; max-height:200px; background:none; }
.composer .bar { display:flex; align-items:center; gap:.35rem; background:none; height:auto; overflow:visible; }
.composer .bar .sp { flex:1; }
.cbtn { width:36px; height:36px; border-radius:999px; border:1px solid transparent; background:none; display:inline-flex; align-items:center; justify-content:center; color:var(--muted); }
.cbtn:hover { background:var(--soft); color:var(--ink); }
.cbtn.send { background:var(--ink); color:#fff; }
.cbtn.send:disabled { background:#cfcfd4; }
.cbtn.rec { background:var(--err); color:#fff; }
.cbtn.live { background:var(--ink); color:#fff; width:40px; height:40px; box-shadow:0 4px 14px rgba(0,0,0,.18); transition:transform .15s, background .15s; }
.cbtn.live:hover { background:#2b2b2b; color:#fff; transform:scale(1.06); }
.cbtn.live:active { transform:scale(.96); }
.files { display:flex; flex-wrap:nowrap; gap:.4rem; padding:0 .5rem .4rem; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; }   /* one scrollable row: never squeezes the chat */
.files .filechip { flex:0 0 auto; max-width:220px; }
.files .filechip > :not(button) { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.filechip { display:inline-flex; align-items:center; gap:.4rem; background:var(--soft); border-radius:999px; padding:.25rem .7rem; font-size:.8rem; }
.filechip button { border:0; background:none; color:var(--dim); }
.foot-note { text-align:center; font-size:.74rem; color:var(--dim); margin-top:.5rem; }

/* Chat (WhatsApp-style) */
.chat-item { display:flex; gap:.7rem; align-items:center; width:100%; text-align:start; padding:.6rem .65rem; border-radius:12px; border:0; background:none; }
.chat-item:hover { background:#fff; }
.chat-item.active { background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.chat-item.sub { padding-inline-start:2.4rem; }
.chat-item .ci { flex:1; min-width:0; }
.chat-item .cn { display:flex; justify-content:space-between; gap:.5rem; font-size:.92rem; font-weight:600; }
.chat-item .cn small { color:var(--dim); font-weight:400; font-size:.72rem; }
.chat-item .cl { color:var(--muted); font-size:.8rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-head { display:flex; align-items:center; justify-content:space-between; gap:.6rem; padding:.65rem 1.1rem; border-bottom:1px solid var(--hair); background:#fff; }
.chat-head .t { font-weight:600; }
.chat-head .s { color:var(--muted); font-size:.8rem; }
.msgs { flex:1; overflow-y:auto; padding:1rem 1.2rem; display:flex; flex-direction:column; gap:.45rem; background:var(--soft); }
.cm { max-width:70%; display:flex; flex-direction:column; }
.cm.me { align-self:flex-end; }
.cm.them { align-self:flex-start; }
.cm .who { font-size:.74rem; color:var(--muted); margin:0 .3rem .15rem; font-weight:600; }
.cm .bub { background:#fff; border-radius:14px; padding:.5rem .8rem; font-size:.92rem; line-height:1.6; white-space:pre-wrap; word-break:break-word; box-shadow:0 1px 1px rgba(0,0,0,.04); position:relative; }
.cm.me .bub { background:var(--ink); color:#fff; }
.cm.vera .bub { background:#fff; border:1px solid var(--hair); white-space:normal; }
.cm .tm { font-size:.66rem; color:var(--dim); margin:.15rem .4rem 0; align-self:flex-end; }
.cm.sys { align-self:center; max-width:90%; }
.cm.sys .bub { background:var(--soft2); color:var(--muted); font-size:.76rem; text-align:center; box-shadow:none; }
.cm.apr { align-self:center; max-width:92%; width:480px; }
.daysep { align-self:center; background:var(--soft2); color:var(--muted); font-size:.72rem; padding:.2rem .7rem; border-radius:999px; margin:.4rem 0; }
.chat-input { display:flex; gap:.5rem; padding:.7rem 1rem; border-top:1px solid var(--hair); background:#fff; }
.chat-input input { flex:1; padding:.65rem .9rem; border:1px solid var(--hair); border-radius:999px; font-size:.94rem; }
.chat-input input:focus { border-color:#8a8a90; }   /* :focus-visible ring in the UX round 1 block */
/* rail: collapsible root groups (caret sits in the row's start gutter), compact list view, read-only composer, member permission chips */
.chat-item { position:relative; }
.chat-item .caret { position:absolute; inset-inline-start:-.35rem; top:0; bottom:0; width:1.1rem; display:flex; align-items:center; justify-content:center; color:var(--dim); font-size:.72rem; line-height:1; transition:transform .15s, color .15s; }
.chat-item .caret::before { content:"▾"; }
.chat-item .caret.closed { transform:rotate(-90deg); }
html[dir=rtl] .chat-item .caret.closed { transform:rotate(90deg); }
.chat-item .caret:hover, .chat-item .caret.dot { color:var(--ink); }
.chat-item .caret.dot::after { content:""; position:absolute; width:5px; height:5px; border-radius:50%; background:var(--ink); top:.35rem; inset-inline-end:0; }   /* unread inside a collapsed group */
#chan-list.list .chat-item { padding:.33rem .65rem; gap:.5rem; border-radius:9px; }
#chan-list.list .chat-item .avatar { width:22px; height:22px; font-size:.6rem; }
#chan-list.list .chat-item .cl { display:none; }
#chan-list.list .chat-item .cn { font-size:.88rem; font-weight:500; }
#chan-list.list .chat-item.active .cn { font-weight:600; }
#chan-list.list .chat-item.sub { padding-inline-start:1.7rem; }
#chan-list.list .group-label { padding-top:.6rem; }
.iconbtn.xs { width:26px; height:26px; border-color:transparent; color:var(--dim); font-size:.82rem; flex-shrink:0; }
.iconbtn.xs:hover { color:var(--ink); }
.iconbtn:disabled { opacity:.5; cursor:not-allowed; }
.iconbtn:disabled:hover { background:#fff; }
.chat-input input:disabled { background:var(--soft); color:var(--muted); cursor:not-allowed; }
button.badge { border:0; font-family:inherit; }
.badge.tog { cursor:pointer; }
.badge.tog:hover { filter:brightness(.94); }

/* approvals & notifications */
.ap-list { display:grid; grid-template-columns:repeat(auto-fill, minmax(320px, 1fr)); gap:.9rem; }
.ap-card { background:#fff; border:1px solid var(--hair); border-radius:var(--r); padding:1rem 1.1rem; display:flex; flex-direction:column; gap:.5rem; text-align:start; }
.ap-card.pending { border-color:#c9c9cf; }
.ap-card .ap-h { display:flex; justify-content:space-between; align-items:flex-start; gap:.6rem; }
.ap-card h4 { font-size:.98rem; line-height:1.45; font-weight:600; }
.ap-card .ap-b { color:var(--muted); font-size:.86rem; line-height:1.65; white-space:pre-wrap; }
.ap-card .ap-m { display:flex; flex-wrap:wrap; gap:.3rem .9rem; font-size:.78rem; color:var(--dim); }
.ap-card .ap-m b { color:var(--text); font-weight:600; }
.ap-card .ap-amt { font-size:1.25rem; font-weight:600; font-variant-numeric:tabular-nums; }
.ap-card .ap-erp { font-size:.76rem; color:var(--muted); font-family:"IBM Plex Mono", monospace; direction:ltr; text-align:end; }
.ap-card .ap-act { display:flex; gap:.5rem; align-items:center; margin-top:.3rem; flex-wrap:wrap; }
.ap-card .ap-act input { flex:1; min-width:140px; padding:.45rem .7rem; border:1px solid var(--hair); border-radius:9px; font-size:.85rem; }
.ap-card .ap-res { font-size:.8rem; color:var(--muted); border-top:1px solid var(--hair); padding-top:.5rem; }
.notif { display:flex; gap:.8rem; padding:.8rem 0; border-bottom:1px solid var(--hair); cursor:pointer; align-items:flex-start; }
.notif:last-child { border-bottom:0; }
.notif .nd { width:8px; height:8px; border-radius:50%; background:var(--ink); margin-top:.5rem; flex-shrink:0; }
.notif.read .nd { background:var(--hair); }
.notif .nt { font-size:.92rem; font-weight:600; }
.notif.read .nt { font-weight:500; color:var(--muted); }
.notif .nb { color:var(--muted); font-size:.84rem; margin-top:.15rem; line-height:1.55; }
.notif .nw { color:var(--dim); font-size:.72rem; margin-top:.2rem; }

/* live voice overlay (kept dark: it is the orb screen) */
.voice-overlay { position:fixed; inset:0; z-index:200; background:#0a0a0b; color:#fff; display:none; flex-direction:column; align-items:center; overflow:hidden; }
.voice-overlay.on { display:flex; }
.vo-top { width:100%; display:flex; justify-content:space-between; padding:1.1rem 1.4rem; color:#9a9aa0; font-size:.85rem; font-variant-numeric:tabular-nums; }
.orb-wrap { flex:1; display:flex; align-items:center; justify-content:center; width:100%; min-height:0; }
#orb-canvas { width:100%; height:100%; display:block; }
.vo-caption { min-height:3.2rem; max-height:3.4rem; max-width:640px; padding:0 1.5rem; text-align:center; color:#a8a8ae; font-size:1rem; line-height:1.6; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.voice-bar { display:flex; align-items:center; gap:.75rem; background:#1d1d20; border-radius:999px; padding:.55rem; margin:0 0 2.6rem; }
.vb-btn { width:46px; height:46px; border-radius:50%; border:0; background:#2e2e33; color:#fff; display:flex; align-items:center; justify-content:center; transition:background .15s; }
.vb-btn:hover { background:#3a3a40; }
.vb-btn[hidden] { display:none !important; }
.vb-btn.muted { background:#fff; color:#111; }

/* guest / demo banners */
.banner { background:var(--ink); color:#fff; font-size:.85rem; padding:.55rem 1rem; display:flex; gap:.8rem; align-items:center; justify-content:center; flex-wrap:wrap; }
.banner a, .banner button { color:#fff; text-decoration:underline; text-underline-offset:3px; background:none; border:0; font-size:.85rem; }

/* page (settings / pricing) */
.page-wrap { max-width:1100px; margin:0 auto; padding:calc(var(--nav) + var(--banner, 0px) + 2rem) 2rem 4rem; }
.settings { display:grid; grid-template-columns:230px 1fr; gap:2rem; }
.snav { display:flex; flex-direction:column; gap:.15rem; position:sticky; top:calc(var(--nav) + var(--banner, 0px) + 1rem); align-self:start; }
.snav button { border:0; background:none; text-align:start; padding:.55rem .8rem; border-radius:10px; color:var(--muted); font-size:.92rem; display:flex; align-items:center; gap:.5rem; }
.snav button:hover { background:var(--soft); color:var(--ink); }
.snav button.active { background:var(--soft); color:var(--ink); font-weight:600; }
.snav .cnt { margin-inline-start:auto; background:var(--ink); color:#fff; border-radius:999px; font-size:.66rem; padding:.05rem .45rem; display:none; }
.snav .cnt.on { display:inline-block; }
.sect { display:none; }
.sect.on { display:block; }
.sect h2.t { font-size:1.6rem; margin-bottom:.3rem; }
.code-box { font-family:"IBM Plex Mono", monospace; direction:ltr; text-align:left; background:var(--soft); border:1px solid var(--hair); border-radius:10px; padding:.6rem .8rem; font-size:.85rem; word-break:break-all; }
.plans { display:grid; grid-template-columns:repeat(auto-fit, minmax(250px, 1fr)); gap:1.1rem; margin-top:2rem; }
.plan { border:1px solid var(--hair); border-radius:22px; padding:1.6rem; display:flex; flex-direction:column; gap:.7rem; background:#fff; }
.plan.hot { background:var(--ink); color:#fff; border-color:var(--ink); }
.plan .name { display:flex; justify-content:space-between; align-items:center; font-weight:600; font-size:1.05rem; }
.plan .tag { font-size:.7rem; background:#fff; color:var(--ink); border-radius:999px; padding:.15rem .6rem; }
.plan .price { font-size:2.1rem; font-weight:500; letter-spacing:-.02em; }
.plan .price small { font-size:.85rem; color:var(--muted); font-weight:400; }
.plan.hot .price small { color:#bbb; }
.plan .cr { color:var(--muted); font-size:.9rem; }
.plan.hot .cr { color:#ccc; }
.plan ul { list-style:none; display:flex; flex-direction:column; gap:.45rem; font-size:.9rem; margin:.4rem 0 .8rem; }
.plan li::before { content:"—"; margin-inline-end:.5rem; color:var(--dim); }
.plan .pill { margin-top:auto; }
.plan.hot .pill.white { background:#fff; color:var(--ink); }
.plan.cur { outline:2px solid var(--ink); }

@media (max-width: 900px) {
  nav.top .links, .hide-m { display:none; } .burger { display:inline-block; }
  nav.top .wrap { gap:.6rem; } nav.top .acts { gap:.35rem; flex-shrink:0; flex-wrap:nowrap; } nav.top .acts .pill { padding:0 .8rem; font-size:.82rem; white-space:nowrap; }
  .logo-img { height:19px; } nav.top .logo { gap:.3rem; }
  nav.top .lang { display:none; }
  nav.top .acts .pill.line { padding:0 .7rem; }
  nav.top .wrap { padding:0 1rem; gap:.6rem; }
  nav.top .acts { gap:.35rem; }
  nav.top .pill { padding:0 .8rem; font-size:.82rem; }
  .mnav .lang, .mnav .mact { align-self:flex-start; height:38px; padding:0 .9rem; border-radius:999px; border:1px solid var(--hair); background:#fff; font-size:.85rem; font-weight:600; }
  .mnav .mact { background:var(--ink); color:#fff; border-color:var(--ink); }
  .banner { font-size:.78rem; padding:.45rem .8rem; gap:.4rem; }
  .rail { position:fixed; top:calc(var(--nav) + var(--banner, 0px)); bottom:0; inset-inline-start:0; z-index:35; transform:translateX(110%); transition:transform .25s; width:min(320px, 88vw); }
  .rail-backdrop { position:fixed; inset:0; top:calc(var(--nav) + var(--banner, 0px)); z-index:34; background:rgba(13,13,13,.32); }
  .rail.open + .rail-backdrop { display:block; }
  html[dir=ltr] .rail { transform:translateX(-110%); }
  .rail.open { transform:none !important; }
  .settings { grid-template-columns:1fr; }
  .snav { position:static; flex-direction:row; overflow-x:auto; gap:.3rem; }
  .snav button { white-space:nowrap; }
  .composer textarea { max-height:120px; }
  .hero-ask { padding:1.2rem .4rem .4rem; }
  .hero-ask h1 { font-size:1.55rem; }
  .hero-ask p { font-size:.92rem; }
  .suggest { gap:.4rem; margin-top:1rem; }
  .sugg { font-size:.8rem; padding:.4rem .7rem; }
  .ask-head { padding:.5rem .8rem; }
  .ask-head select { font-size:.8rem; padding:.3rem .6rem; }
  .banner { font-size:.74rem; padding:.4rem .7rem; line-height:1.4; }
  .composer-wrap { padding:.4rem .6rem calc(.6rem + env(safe-area-inset-bottom)); }
  .ask-msgs { padding:1rem .8rem; }
  .cm { max-width:88%; }
  .msg.me { max-width:90%; }
  .wrap, .page-wrap { padding-left:1.1rem; padding-right:1.1rem; }
}

input[type=range] { accent-color: var(--ink); }

/* team: «خيارات متقدمة» disclosure under the invite form, and the Odoo-users picker modal */
details.adv > summary { cursor:pointer; color:var(--muted); font-size:.86rem; list-style:none; display:inline-flex; align-items:center; gap:.35rem; user-select:none; }
details.adv > summary::-webkit-details-marker { display:none; }
details.adv > summary::before { content:"▸"; font-size:.8rem; transition:transform .15s; }
html[dir=rtl] details.adv > summary::before { content:"◂"; }
details.adv[open] > summary::before { transform:rotate(90deg); }
html[dir=rtl] details.adv[open] > summary::before { transform:rotate(-90deg); }
.oi-list { max-height:48vh; overflow-y:auto; border:1px solid var(--hair); border-radius:12px; }
.oi-row { display:flex; align-items:center; gap:.6rem; padding:.5rem .7rem; border-bottom:1px solid var(--hair); cursor:pointer; font-size:.9rem; }
.oi-row:last-child { border-bottom:0; }
.oi-row:hover { background:var(--soft); }
.oi-row.dis { opacity:.55; cursor:default; }
.oi-row.dis:hover { background:none; }
.oi-row input { width:auto; flex:none; accent-color:var(--ink); }
.oi-row .oi-n { flex:1; min-width:0; display:flex; flex-direction:column; }
.oi-row .oi-n small { color:var(--muted); font-size:.76rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:start; }

/* phones: wide settings tables (members, invites) become stacked cards — each cell prints its data-label first.
   Desktop keeps the plain table: everything here lives under the media query. */
@media (max-width:700px) {
  table.cards-m, table.cards-m tbody, table.cards-m tr, table.cards-m td { display:block; width:100%; }
  table.cards-m thead { display:none; }
  table.cards-m tr { border:1px solid var(--hair); border-radius:12px; padding:.55rem .85rem .65rem; margin-bottom:.7rem; }
  table.cards-m tr:last-child { margin-bottom:0; }
  table.cards-m td { border-bottom:0; padding:.3rem 0; }
  table.cards-m td[data-label]::before { content:attr(data-label); display:block; font-size:.72rem; color:var(--dim); margin-bottom:.1rem; }
  table.cards-m td:first-child { padding-top:0; }
  table.cards-m td.acts { white-space:normal; padding-top:.5rem; display:flex; gap:.4rem; flex-wrap:wrap; }
  table.cards-m td.acts:empty { display:none; }
  table.cards-m td input[type=text], table.cards-m td input[type=number] { width:100% !important; max-width:260px; }
  table.cards-m td .row { gap:.3rem; }
}

/* phone chat header: one line, never wraps — name/subtitle truncate, buttons compact, sub-group creation stays in the rail's + menu */
@media (max-width: 900px) {
  .chat-head { padding:.5rem .7rem; gap:.4rem; flex-wrap:nowrap; }
  .chat-head > .row { flex-wrap:nowrap; }
  .chat-head > .row:first-child { flex:1; min-width:0; gap:.45rem; }
  .chat-head > .row:first-child > div { min-width:0; }
  .chat-head .t, .chat-head .s { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
  .chat-head .t { font-size:.95rem; }
  .chat-head > .row:last-child { flex-shrink:0; gap:.3rem; }
  .chat-head #ch-sub-btn { display:none !important; }
  .chat-head .btn.sm { padding:.3rem .55rem; font-size:.78rem; white-space:nowrap; }
  .chat-head .iconbtn { width:34px; height:34px; }
  .chat-head .avatar { width:30px; height:30px; font-size:.7rem; flex-shrink:0; }
}

/* phones: the app follows the visible viewport (--vvh set from visualViewport while the keyboard is open);
   16px inputs stop iOS Safari from zooming into the composer on focus */
@media (max-width: 900px) {
  .app { position:fixed; top:0; left:0; right:0; height:var(--vvh, 100dvh); will-change:transform; }   /* glued to the visual viewport (see chat.html) */
  html:has(.app) nav.top { will-change:transform; }
  .chat-input input, #chan-q, .search input { font-size:16px; }
  #aud-box .hint { font-size:.78rem; }
}

/* ================================================================================================
   UX round 1 (2026-10-03) — focus, contrast, tap targets, dialog helpers, chat/ask/settings hooks,
   motion + print. Everything below is additive and scoped; logical properties keep it RTL-safe.
   ================================================================================================ */

/* 1. focus — one visible ring everywhere; text fields draw it on their border instead of an outline */
:focus-visible { outline:2px solid var(--ink); outline-offset:2px; }
.field input:focus-visible, .field textarea:focus-visible, .chat-input input:focus-visible { outline:none; border-color:var(--ink); box-shadow:0 0 0 3px rgba(13,13,13,.12); }
.search:focus-within, .composer:focus-within { border-color:var(--ink); box-shadow:0 0 0 3px rgba(13,13,13,.12); }
.search input:focus-visible, .composer textarea:focus-visible { outline:none; }   /* the container shows the ring */
.modal-bg.on .modal { outline:none; }

/* 2. contrast — tokens changed in :root (--dim, --warn); the amber stays for fills and tints */
.bar i.warn { background:var(--warn-fill); }
.badge.warn { background:rgba(183,121,31,.14); color:var(--warn); }
.cm .tm { font-size:.72rem; color:var(--muted); }

/* 4. dialog / a11y helpers */
.modal { position:relative; }
.modal .mclose { position:absolute; top:.8rem; inset-inline-end:.8rem; width:36px; height:36px; border-radius:999px; border:0; background:var(--soft); color:var(--muted); display:inline-flex; align-items:center; justify-content:center; font-size:1.05rem; line-height:1; padding:0; }
.modal .mclose:hover { background:var(--soft2); color:var(--ink); }
.modal .mclose ~ h3, .modal h3:has(~ .mclose) { padding-inline-end:2.6rem; }   /* only when a × exists: the title never runs under it */
[inert] { pointer-events:none; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* 5. chat hooks */
.iconbtn { flex-shrink:0; }
.iconbtn.active { background:var(--ink); color:#fff; border-color:var(--ink); }
.iconbtn.active:hover { background:#2b2b2b; }
.rail .search { min-width:0; flex:1 1 auto; }
#list-seg { display:flex; width:100%; }
#list-seg button { flex:1; padding:.34rem .3rem; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-input { position:relative; }
.chat-input .iconbtn { flex-shrink:0; }
.chat-input input { min-width:0; }
.send-ico { width:44px; height:44px; flex-shrink:0; border-radius:999px; border:1px solid var(--ink); background:var(--ink); color:#fff; display:inline-flex; align-items:center; justify-content:center; padding:0; transition:background .15s, transform .15s; }
.send-ico:hover { background:#2b2b2b; }
.send-ico:active { transform:scale(.96); }
.send-ico:disabled { background:#cfcfd4; border-color:#cfcfd4; cursor:not-allowed; }
.send-ico svg { width:20px; height:20px; display:block; }
/* caret → 44px chevron button in the row's END gutter (room for a count); rotation logic kept on .closed, now on the glyph so the count stays upright */
.chat-item.root { padding-inline-end:2.9rem; }
.chat-item .caret { inset-inline-start:auto; inset-inline-end:.15rem; top:0; bottom:0; width:44px; height:auto; display:inline-flex; align-items:center; justify-content:center; gap:.15rem; border-radius:10px; color:var(--muted); font-size:.8rem; transition:background .15s, color .15s; transform:none; }
.chat-item .caret::before { content:"▾"; display:inline-block; transition:transform .15s; }
.chat-item .caret.closed, html[dir=rtl] .chat-item .caret.closed { transform:none; }
.chat-item .caret.closed::before { transform:rotate(-90deg); }
html[dir=rtl] .chat-item .caret.closed::before { transform:rotate(90deg); }
.chat-item .caret:hover { background:var(--soft2); color:var(--ink); }
.chat-item .caret .cnt { font-size:.68rem; font-weight:600; font-variant-numeric:tabular-nums; line-height:1; }
.chat-item .caret.dot::after { top:.5rem; inset-inline-end:.5rem; }
#chan-list.list .chat-item.root { padding-inline-end:2.9rem; }
.danger-zone { border:1px solid rgba(192,57,43,.25); border-radius:12px; padding:.8rem; margin-top:1rem; }
.danger-zone h4, .danger-zone .t { color:var(--err); font-size:.9rem; margin-bottom:.4rem; }
.danger-zone .row { gap:.5rem; }
.msg-pending { opacity:.6; }
.msg-failed .tm, .msg-failed .meta { color:var(--err); }
.composer-wrap { position:relative; }
.newmsg-pill { position:absolute; bottom:calc(100% + .6rem); left:0; right:0; margin:0 auto; width:max-content; max-width:80%; z-index:5; display:inline-flex; align-items:center; gap:.4rem; padding:.45rem .95rem; border-radius:999px; background:var(--ink); color:#fff; font-size:.82rem; font-weight:500; border:0; box-shadow:0 8px 24px rgba(0,0,0,.18); cursor:pointer; }
.newmsg-pill:hover { background:#2b2b2b; }
.newmsg-pill[hidden] { display:none !important; }
.empty-cta { display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:.55rem; padding:2rem 1rem; margin:auto; color:var(--muted); max-width:420px; }
.empty-cta .ico { width:56px; height:56px; border-radius:50%; background:var(--soft2); color:var(--ink); display:inline-flex; align-items:center; justify-content:center; font-size:1.4rem; margin-bottom:.2rem; }
.empty-cta .ico img, .empty-cta .ico svg { width:26px; height:26px; }
.empty-cta .ttl { color:var(--ink); font-weight:600; font-size:1rem; }
.empty-cta p { font-size:.9rem; line-height:1.7; }
.empty-cta .btn, .empty-cta .pill { margin-top:.35rem; }
.quote-card { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; background:var(--soft2); color:var(--muted); border-inline-start:3px solid #c9c9cf; border-radius:10px; padding:.4rem .7rem; margin:0 0 .4rem; font-size:.82rem; line-height:1.5; white-space:normal; word-break:break-word; }
.msg.me .bub .quote-card { background:rgba(13,13,13,.06); color:var(--muted); }
.cm.me .bub .quote-card { background:rgba(255,255,255,.14); color:rgba(255,255,255,.85); border-color:rgba(255,255,255,.4); }
.sugg-row { display:flex; flex-wrap:wrap; gap:.5rem; justify-content:center; margin-top:1.2rem; }
.sugg { display:inline-flex; align-items:center; white-space:normal; text-align:center; }

/* 6. Ask tables — cells never break mid-token; the wrapper scrolls, with an edge fade on phones */
.bub table th, .bub table td { word-break:keep-all; white-space:nowrap; }
.table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; font-variant-numeric:tabular-nums; }

/* 7. settings hooks */
.settings > div { min-width:0; }
.snav .grp { font-size:.68rem; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); padding:.9rem .8rem .3rem; }
.snav .grp:first-child { padding-top:.2rem; }
.snav-select { display:none; width:100%; padding:.62rem .8rem; background:#fff; border:1px solid var(--hair); border-radius:11px; font-size:16px; margin-bottom:1rem; }
.dropzone { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.3rem; text-align:center; min-height:84px; padding:1rem; border:1.5px dashed #c9c9cf; border-radius:12px; background:var(--soft); color:var(--muted); font-size:.88rem; cursor:pointer; transition:border-color .15s, background .15s, color .15s; }
.dropzone:hover, .dropzone.drag { border-color:var(--ink); background:var(--soft2); color:var(--ink); }
.dropzone:focus-within { border-color:var(--ink); box-shadow:0 0 0 3px rgba(13,13,13,.12); }
.dropzone.has-file { border-style:solid; border-color:#c9c9cf; }
.dropzone input[type=file] { position:absolute; width:1px; height:1px; opacity:0; overflow:hidden; pointer-events:none; }
.dropzone .fname { color:var(--ink); font-weight:600; font-size:.86rem; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; direction:ltr; unicode-bidi:isolate; }
.dropzone .fname:empty { display:none; }
@media (min-width:900px) { .cards-4 { grid-template-columns:repeat(4, 1fr); } }

/* 3 + 5/6/7 — phones (≤900px): 44px tap targets, headers that wrap or hide, menus that never clip, 16px inputs */
@media (max-width:900px) {
  .iconbtn, .cbtn, .burger, .lang, nav.top .lang { min-width:44px; min-height:44px; }
  .iconbtn.xs { min-width:34px; min-height:34px; }
  .seg button, .tabs button, .snav button, .ask-head select { min-height:44px; }
  .banner button { padding:.55rem .7rem; min-height:40px; }
  .filechip button { padding:.4rem; }
  .composer .bar { gap:.5rem; }
  .sugg-row { gap:.4rem; margin-top:1rem; }
  .sugg-row .sugg, .suggest .sugg { min-height:44px; }
  /* chat header variant that wraps: seg on its own row, buttons full-width */
  .chat-head.wrap { flex-wrap:wrap; }
  .chat-head.wrap > .row { flex-wrap:wrap; }
  .chat-head.wrap > .row:last-child { width:100%; flex-basis:100%; gap:.4rem; }
  .chat-head.wrap .seg { display:flex; width:100%; flex-basis:100%; }
  .chat-head.wrap .seg button { flex:1; min-width:0; padding:.34rem .3rem; }
  .chat-head.wrap > .row:last-child > .btn { flex:1 1 100%; justify-content:center; }
  /* dropdown menus become a sheet pinned under the nav, never clipped by the rail or the screen edge */
  .menu { position:fixed; inset-inline:1rem !important; top:calc(var(--nav) + var(--banner, 0px) + .4rem); bottom:auto; max-width:none; width:auto; max-height:calc(100dvh - var(--nav) - var(--banner, 0px) - 2rem); overflow-y:auto; }
  /* Ask: once a conversation is open the pulse strip and the title give the room back to the messages */
  body.in-conv #pulse, body.in-conv .pulse, body.in-conv #conv-title, body.in-conv .ask-title { display:none !important; }
  .ask-head { flex-wrap:nowrap; }
  .ask-head > .row { flex-wrap:nowrap; min-width:0; }
  .ask-head > .row:first-child { flex:1 1 auto; }
  .ask-head select { min-width:0; max-width:46vw; overflow:hidden; text-overflow:ellipsis; }
  /* wide answer tables: fade at the edges so the scroll is discoverable */
  .bub .table-wrap { -webkit-mask-image:linear-gradient(to right, transparent, #000 .7rem, #000 calc(100% - .9rem), transparent); mask-image:linear-gradient(to right, transparent, #000 .7rem, #000 calc(100% - .9rem), transparent); padding-inline:.15rem; }
  /* settings */
  .field input, .field select, .field textarea, table input { font-size:16px; }
  .snav .grp { display:none; }
  .snav-select { display:block; }
  .snav-select + .snav { display:none; }
}

/* 8. motion + print */
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition:none !important; scroll-behavior:auto !important; }
}
@media print {
  nav.top, .mnav, .banner, .toast, .modal-bg, .composer-wrap, .rail, .rail-backdrop, .chat-input, .newmsg-pill { display:none !important; }
  .app { position:static; height:auto; padding-top:0; overflow:visible; }
  html:has(.app), body:has(.app) { height:auto; overflow:visible; }
  .msgs, .ask-msgs { overflow:visible; }
  .page-wrap { padding-top:1rem; }
}

/* 9. company logo (2026-10-03) — a 20px tile before the company name in the user menu, the full avatar of the company
   channel in Chat (.colog.lg), and the 88px preview in Settings › بيانات الشركة (.logo-prev shows initials until a logo exists) */
.colog { width:20px; height:20px; border-radius:5px; object-fit:contain; background:#fff; border:1px solid var(--hair); vertical-align:middle; margin-inline-end:.35rem; }
.avatar .colog, .colog.lg { width:100%; height:100%; border-radius:inherit; margin:0; }
.logo-prev { width:88px; height:88px; border-radius:16px; border:1px solid var(--hair); background:#fff; display:flex; align-items:center; justify-content:center; overflow:hidden; font-weight:600; font-size:1.3rem; flex-shrink:0; }
.logo-prev img { max-width:100%; max-height:100%; object-fit:contain; }
