/* NeoAI app — v4. Quiet, warm, simple (Krater / ChatGPT inspired). */
@font-face { font-family: "Geist"; src: url("/web/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/web/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --shell: #f6f6f4; --panel: #ffffff; --soft: #f5f5f3; --soft-2: #efefec; --line: #ebebe8; --line-2: #deded9;
  --fg: #181816; --fg-2: #3d3d3a; --muted: #75756f; --faint: #a6a6a0;
  --dark: #141413; --on-dark: #fff; --blue: #2563eb; --blue-soft: #eaf1fe; --ok: #16a34a; --bad: #dc2626; --gold: #d4a017;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 28px rgba(0,0,0,.06);
  --shadow-lg: 0 24px 70px rgba(0,0,0,.18);
  --r: 16px; --font: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif; --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.22,.8,.2,1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --shell: #0f0f0e; --panel: #1a1a19; --soft: #232322; --soft-2: #2b2b29; --line: #2c2c2a; --line-2: #3a3a37;
  --fg: #f2f2ef; --fg-2: #d4d4cf; --muted: #9a9a93; --faint: #6b6b65; --dark: #f2f2ef; --on-dark: #141413; --blue-soft: #1c2a44;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.4); color-scheme: dark;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --shell: #0f0f0e; --panel: #1a1a19; --soft: #232322; --soft-2: #2b2b29; --line: #2c2c2a; --line-2: #3a3a37;
  --fg: #f2f2ef; --fg-2: #d4d4cf; --muted: #9a9a93; --faint: #6b6b65; --dark: #f2f2ef; --on-dark: #141413; --blue-soft: #1c2a44;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.4); color-scheme: dark; } }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--shell); color: var(--fg); font: 15.5px/1.55 var(--font); letter-spacing: -.006em; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
[data-icon] { display: inline-flex; flex: none; }
[data-icon] svg { width: 18px; height: 18px; }
.mark { width: 1em; height: 1em; display: block; }
.muted { color: var(--muted); } .small { font-size: 13px; }
kbd { font: 11.5px var(--mono); color: var(--faint); }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -.02em; }

/* ============ shell ============ */
.shell { display: grid; grid-template-columns: 248px 1fr; height: 100%; transition: grid-template-columns .35s var(--ease); }
.side-mini .shell { grid-template-columns: 68px 1fr; }
.side { display: flex; flex-direction: column; min-height: 0; padding: 14px 10px 10px; gap: 2px; overflow: hidden; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 18px; }
.logo { width: 34px; height: 34px; display: grid; place-items: center; }
.logo .mark { width: 32px; height: 32px; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--fg-2); transition: background .2s, color .2s; cursor: pointer; }
.icon-btn:hover { background: var(--soft-2); color: var(--fg); }
.side-nav { display: grid; gap: 2px; }
.side-nav a, .side-nav button { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 12px; font-size: 15.5px; color: var(--fg); white-space: nowrap; transition: background .2s; text-align: left; }
.side-nav a:hover, .side-nav button:hover { background: var(--soft-2); }
.side-nav a.on { background: var(--soft-2); }
.side-nav [data-icon] svg { width: 20px; height: 20px; }
.side-nav em, .side-sec em { font-style: normal; }
.side-nav kbd { margin-left: auto; opacity: 0; transition: opacity .2s; }
.side-nav button:hover kbd { opacity: 1; }
.side-sec { display: flex; align-items: center; gap: 6px; margin: 22px 0 4px; padding: 0 12px; height: 28px; font-size: 13.5px; color: var(--muted); }
.side-sec [data-icon] svg { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.side-sec[aria-expanded="true"] [data-icon] svg { transform: rotate(90deg); }
.side-chats { flex: 1; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 1px; margin: 0 -2px; padding: 0 2px; scrollbar-width: thin; }
.side-chats.closed { display: none; }
.conv { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 6px 0 12px; border-radius: 10px; font-size: 14px; color: var(--fg-2); cursor: pointer; transition: background .15s; }
.conv > span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.conv:hover, .conv.on { background: var(--soft-2); color: var(--fg); }
.conv .dots { opacity: 0; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.conv:hover .dots, .conv .dots.open { opacity: 1; }
.conv .dots:hover { background: var(--line-2); }
.conv .dots svg { width: 16px; height: 16px; }
.side-empty { font-size: 13px; color: var(--faint); padding: 4px 12px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; margin-top: 8px; border-radius: 14px; text-align: left; transition: background .2s; min-width: 0; }
.me:hover { background: var(--soft-2); }
.avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 15px; font-weight: 500; color: #fff; background: #8a94a6; }
.avatar.big { width: 64px; height: 64px; font-size: 26px; }
.me-txt { min-width: 0; flex: 1; display: grid; line-height: 1.25; }
.me-txt b { font-weight: 500; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-txt small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.me-txt small svg { width: 13px; height: 13px; color: var(--gold); }
.me-go svg { width: 16px; height: 16px; color: var(--faint); }
.side-mini .side-nav em, .side-mini .side-nav kbd, .side-mini .side-sec, .side-mini .side-chats, .side-mini .me-txt, .side-mini .me-go { display: none; }
.side-mini .side-top { flex-direction: column; gap: 10px; padding-bottom: 12px; }
.side-mini .side-nav a, .side-mini .side-nav button { justify-content: center; padding: 0; }
.side-mini .me { margin-top: auto; justify-content: center; }
.scrim, .menu-btn { display: none; }

.panel { position: relative; margin: 8px 8px 8px 0; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: viewIn .4s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ buttons, fields ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 999px; font-size: 15px; font-weight: 500; white-space: nowrap; transition: opacity .2s, background .2s, transform .15s, border-color .2s; }
.btn:active { transform: scale(.98); }
.btn svg { width: 16px; height: 16px; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-dark { background: var(--dark); color: var(--on-dark); } .btn-dark:hover { opacity: .86; }
.btn-dark:disabled { background: #a3a39e; opacity: 1; cursor: default; transform: none; }
.btn-line { border: 1px solid var(--line-2); background: var(--panel); } .btn-line:hover { border-color: var(--fg); }
.btn-danger { background: rgba(220,38,38,.1); color: var(--bad); } .btn-danger:hover { background: rgba(220,38,38,.16); }
.field { width: 100%; height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); outline: none; font-size: 15px; transition: border-color .2s, background .2s; }
textarea.field { height: auto; padding: 12px 16px; resize: vertical; line-height: 1.5; }
.field:focus { border-color: var(--line-2); background: var(--panel); }
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.form-msg { font-size: 13px; color: var(--muted); } .form-msg.ok { color: var(--ok); } .form-msg.bad { color: var(--bad); }
.row-gap { display: flex; align-items: center; gap: 8px; }
.soft-tag { font-size: 12.5px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--soft-2); color: var(--muted); }

/* menus */
.menu { position: absolute; z-index: 30; min-width: 230px; padding: 6px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 14px 44px rgba(0,0,0,.14);
  opacity: 0; visibility: hidden; transform: translateY(6px) scale(.98); transition: opacity .18s, transform .22s var(--ease), visibility .18s; }
.menu.up { bottom: calc(100% + 10px); left: 0; transform-origin: bottom left; }
.menu.right { left: auto; right: 0; transform-origin: bottom right; }
.menu.down { top: calc(100% + 6px); right: 0; transform-origin: top right; }
.open > .menu, .menu.open { opacity: 1; visibility: visible; transform: none; }
.mi { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 8px 12px; border-radius: 10px; font-size: 14.5px; text-align: left; cursor: pointer; transition: background .15s; }
.mi:hover { background: var(--soft); }
.mi [data-icon] svg { width: 18px; height: 18px; color: var(--fg-2); }
.mi.two { justify-content: space-between; }
.mi.two b { display: block; font-weight: 500; }
.mi.two small { color: var(--muted); font-size: 12.5px; }
.mi .ok { opacity: 0; } .mi.on .ok { opacity: 1; }
.mi.danger { color: var(--bad); } .mi.danger svg { color: var(--bad) !important; }
.sw { margin-left: auto; width: 32px; height: 20px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .2s; flex: none; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .25s var(--ease); }
.sw.on { background: var(--ok); } .sw.on::after { transform: translateX(12px); }

/* ============ chat ============ */
.chat-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px 0; min-height: 56px; flex: none; }
.model-pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--soft); font-size: 15px; font-weight: 500; transition: background .2s; max-width: 60vw; }
.model-pill:hover { background: var(--soft-2); }
.mp-ic { width: 22px; height: 22px; display: grid; place-items: center; }
.mp-ic svg, .mp-ic .mark { width: 18px; height: 18px; }
#mpName { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-chev svg { width: 14px; height: 14px; color: var(--muted); }
.proj-tag { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13.5px; color: var(--fg-2); background: var(--soft); }
.proj-tag svg { width: 15px; height: 15px; }
.chat-title { margin-left: auto; font-size: 14px; color: var(--muted); max-width: 40%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.thread-wrap { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 24px 24px; scroll-behavior: smooth; }
.thread { max-width: 760px; margin: 0 auto; display: grid; gap: 32px; }
.hello { text-align: center; }
.hello h1 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 500; letter-spacing: -.04em; line-height: 1.1; animation: rise .8s var(--ease); }
.keybanner { max-width: 720px; margin: 0 auto 26px; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: #fef8e8; color: #6e5006; font-size: 14px; }
.keybanner > div { flex: 1; }
.keybanner a { color: inherit; font-weight: 600; text-decoration: underline; }
.keybanner .kb-raw, .err-admin { margin-top: 6px; font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; opacity: .8; overflow-wrap: anywhere; }
.err-admin { padding: 0 14px; color: var(--fg-2); }
:root[data-theme="dark"] .keybanner { background: #2a2414; color: #f1d27a; }

/* empty state layout: greeting + composer centred */
#view-chat:not(.has-msgs) .thread-wrap { flex: 0 0 auto; overflow: visible; padding-top: max(10vh, 40px); padding-bottom: 30px; }
#view-chat:not(.has-msgs) .dock { flex: 1 1 auto; }
#view-chat.has-msgs .hello, #view-chat.has-msgs .chips-run, #view-chat.has-msgs .inspire-bar, #view-chat.has-msgs .inspire { display: none; }

.dock { padding: 0 24px 16px; flex: none; }
.composer { position: relative; max-width: 760px; margin: 0 auto; border: 1px solid var(--line); border-radius: 30px; background: var(--panel); padding: 7px; box-shadow: 0 2px 16px rgba(0,0,0,.05); transition: box-shadow .3s var(--ease), border-color .3s; }
.composer:focus-within { border-color: var(--line-2); box-shadow: 0 6px 26px rgba(0,0,0,.08); }
.c-line { display: flex; align-items: flex-end; gap: 4px; }
.c-btn { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--fg); cursor: pointer; transition: background .2s, color .2s; }
.c-btn:hover { background: var(--soft); }
.c-btn svg { width: 21px; height: 21px; }
.plus-wrap, .lvl { position: relative; flex: none; }
.input-wrap { position: relative; flex: 1; min-width: 0; }
.composer textarea { display: block; width: 100%; border: 0; outline: 0; resize: none; background: transparent; font-size: 16.5px; line-height: 1.5; padding: 9px 6px; min-height: 42px; max-height: 240px; }
.ph { position: absolute; left: 6px; top: 9px; right: 6px; color: var(--muted); font-size: 16.5px; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .35s, transform .35s var(--ease); }
.ph.out { opacity: 0; transform: translateY(-6px); }
.input-wrap.typing .ph { display: none; }
.web-pill { align-self: center; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 6px 0 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 13px; font-weight: 500; flex: none; }
.web-pill svg { width: 14px; height: 14px; }
.web-pill button { width: 20px; height: 20px; border-radius: 50%; font-size: 15px; line-height: 1; color: inherit; }
.lvl-btn { height: 42px; display: inline-flex; align-items: center; gap: 4px; padding: 0 10px; border-radius: 999px; color: var(--muted); font-size: 15px; transition: background .2s, color .2s; }
.lvl-btn:hover { background: var(--soft); color: var(--fg); }
.lvl-btn svg { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.lvl.open .lvl-btn svg { transform: rotate(180deg); }
.c-btn.rec { color: #fff; background: #ef4444; animation: recp 1.4s infinite; }
.c-btn.busy svg { animation: spin 1s linear infinite; }
@keyframes recp { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.45); } 100% { box-shadow: 0 0 0 12px rgba(239,68,68,0); } }
.send { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--dark); color: var(--on-dark); transition: transform .2s var(--ease), opacity .2s; }
.send:hover { transform: scale(1.05); }
.send svg { width: 20px; height: 20px; }
.send.stop svg { width: 14px; height: 14px; }
.attach-row { display: flex; gap: 8px; padding: 6px 8px 4px; flex-wrap: wrap; }
.att { position: relative; }
.att img { width: 58px; height: 58px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); display: block; }
.att button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--dark); color: var(--on-dark); font-size: 12px; line-height: 20px; }
.file-chip { position: relative; display: inline-flex; align-items: center; gap: 10px; max-width: 260px; height: 58px; padding: 0 14px 0 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); text-align: left; }
.file-chip .fc-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--soft); color: var(--muted); }
.file-chip .fc-ic svg { width: 18px; height: 18px; }
.file-chip .fc-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.file-chip b { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-chip small { font-size: 11.5px; color: var(--muted); }
.att-file.up .fc-ic { animation: fcPulse 1.1s ease-in-out infinite; }
@keyframes fcPulse { 50% { opacity: .45; } }
.file-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.msg.user .file-chip { background: var(--card, var(--bg)); }
.aud-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; background: var(--soft); font-size: 13.5px; }
.aud-chip svg { width: 15px; height: 15px; }

/* chips carousel (Krater) */
.chips-run { max-width: 760px; margin: 22px auto 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.chips-track { display: flex; gap: 10px; width: max-content; animation: chips 42s linear infinite; }
.chips-run:hover .chips-track { animation-play-state: paused; }
@keyframes chips { to { transform: translateX(-50%); } }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 999px; font-size: 15px; font-weight: 500; white-space: nowrap; transition: transform .25s var(--ease), filter .25s; }
.chip svg { width: 17px; height: 17px; }
.chip:hover { transform: translateY(-2px); filter: saturate(1.3); }
.k1 { background: #fdeef6; color: #d23f93; } .k2 { background: #fdeeee; color: #de4747; } .k3 { background: #fef1ea; color: #e06426; }
.k4 { background: #fef6e4; color: #c48609; } .k5 { background: #f2f8e6; color: #5c9a17; } .k6 { background: #e9f7f1; color: #1c9670; }
.k7 { background: #e9f5fa; color: #1a88ae; } .k8 { background: #ecf2fe; color: #3a6fdc; } .k9 { background: #f0effe; color: #6352df; } .k10 { background: #f6edfd; color: #9947d6; }
:root[data-theme="dark"] .chip { background: var(--soft); }
.hint { max-width: 760px; margin: 10px auto 0; text-align: center; font-size: 12.5px; color: var(--faint); min-height: 18px; }

/* inspiration */
.inspire-bar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(760px, calc(100% - 48px)); display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 20px; border-radius: 16px 16px 0 0; background: var(--soft); color: var(--muted); font-size: 14.5px; transition: background .2s; }
.inspire-bar:hover { background: var(--soft-2); }
.inspire-bar svg { width: 17px; height: 17px; }
.ib-r { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.inspire { display: none; }
#view-chat.insp-open .inspire { display: block; position: absolute; inset: auto 0 0 0; height: 62%; overflow-y: auto; background: var(--panel); border-top: 1px solid var(--line); padding: 26px 24px 40px; animation: sheet .45s var(--ease); z-index: 5; }
#view-chat.insp-open .inspire-bar { bottom: 62%; border-radius: 16px 16px 0 0; z-index: 6; }
#view-chat.insp-open .ib-r svg { transform: rotate(180deg); }
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
.insp-grid { max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.insp { text-align: left; padding: 18px; border-radius: 16px; background: var(--soft); display: grid; gap: 10px; transition: transform .3s var(--ease), background .2s; }
.insp:hover { transform: translateY(-3px); background: var(--soft-2); }
.insp .ii { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.insp .ii svg { width: 19px; height: 19px; }
.insp b { font-weight: 500; }
.insp span.d { font-size: 13.5px; color: var(--muted); }

/* messages */
.msg { animation: rise .45s var(--ease); }
.msg.user { display: flex; justify-content: flex-end; }
.msg.user .bubble { max-width: 78%; background: var(--soft); padding: 10px 18px; border-radius: 22px; white-space: pre-wrap; word-wrap: break-word; }
.bubble img { max-width: 220px; border-radius: 12px; margin-bottom: 6px; display: block; }
.ai-body { min-width: 0; }
.think { margin-bottom: 8px; }
.think-head { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); padding: 4px 8px 4px 0; max-width: 100%; }
.think-head:hover { color: var(--fg); }
.think-head .logo-s { width: 24px; height: 24px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; flex: none; }
.think-head .logo-s svg { width: 14px; height: 14px; }
.think-head b { color: var(--fg); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.think-head > span { white-space: nowrap; }
.think-head .cr { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.think-head .cr svg { width: 13px; height: 13px; color: var(--gold); }
.think-head .chev svg { width: 13px; height: 13px; transition: transform .25s var(--ease); }
.think.open .chev svg { transform: rotate(180deg); }
.pulse-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--fg); animation: breathe 1.2s infinite; flex: none; margin: 0 7px; }
@keyframes breathe { 0%,100% { transform: scale(.6); opacity: .45; } 50% { transform: scale(1); opacity: 1; } }
.think-steps { display: none; margin: 8px 0 6px 11px; padding-left: 16px; border-left: 1px solid var(--line-2); font-size: 13.5px; color: var(--muted); }
.think.open .think-steps { display: grid; gap: 6px; animation: rise .3s var(--ease); }
.think-steps div { display: flex; gap: 8px; } .think-steps b { color: var(--fg-2); font-weight: 500; }
.tier-pill { font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--fg-2); text-transform: capitalize; }
.tier-pill.low { color: #0f766e; background: rgba(20,184,166,.12); } .tier-pill.medium { color: #4338ca; background: rgba(99,102,241,.12); } .tier-pill.high { color: #b45309; background: rgba(245,158,11,.14); }

.md { overflow-wrap: anywhere; font-size: 16px; line-height: 1.7; }
.md > *:first-child { margin-top: 0; } .md > *:last-child { margin-bottom: 0; }
.md p { margin: 0 0 14px; }
.md h2 { font-size: 20px; margin: 24px 0 8px; font-weight: 600; } .md h3 { font-size: 17px; margin: 18px 0 6px; font-weight: 600; }
.md ul, .md ol { margin: 0 0 14px; padding-left: 22px; } .md li { margin: 4px 0; }
.md a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.md code { font: 13.5px var(--mono); background: var(--soft); padding: 2px 6px; border-radius: 6px; }
.md blockquote { margin: 0 0 14px; padding: 10px 14px; border-left: 3px solid var(--line-2); background: var(--soft); border-radius: 0 12px 12px 0; color: var(--fg-2); font-size: 14.5px; }
.md table { border-collapse: collapse; margin: 0 0 14px; font-size: 14.5px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line-2); padding: 7px 11px; text-align: left; } .md th { background: var(--soft); font-weight: 600; }
.codeblock { margin: 0 0 14px; border-radius: 14px; overflow: hidden; background: #111110; color: #e9e9e4; }
.cb-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px 14px; font: 12px var(--mono); color: #9a9a93; border-bottom: 1px solid rgba(255,255,255,.07); }
.cb-head button { font-size: 12px; padding: 4px 8px; border-radius: 6px; color: #9a9a93; } .cb-head button:hover { background: rgba(255,255,255,.08); color: #fff; }
.codeblock pre { margin: 0; padding: 14px; overflow-x: auto; font: 13px/1.6 var(--mono); }
.caret::after { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--fg); margin-left: 4px; vertical-align: 1px; animation: breathe 1s infinite; }
.cites { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.cite { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; height: 30px; padding: 0 10px; border-radius: 999px; background: var(--soft); font-size: 12.5px; color: var(--fg-2); }
.cite img { width: 14px; height: 14px; border-radius: 3px; }
.cite span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actions { display: flex; gap: 2px; margin-top: 8px; opacity: 0; transition: opacity .2s; }
.msg.ai:hover .actions, .msg.ai.last .actions { opacity: 1; }
.actions button { height: 32px; min-width: 32px; padding: 0 8px; border-radius: 9px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.actions button svg { width: 16px; height: 16px; }
.actions button:hover { background: var(--soft); color: var(--fg); }
.actions button.on { color: var(--blue); }
.err { margin-top: 8px; padding: 10px 14px; border-radius: 12px; background: rgba(220,38,38,.08); color: var(--bad); font-size: 14px; }

.arts { display: grid; gap: 10px; margin: 12px 0 4px; }
.art { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center; padding: 8px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; transition: border-color .2s, transform .25s var(--ease), box-shadow .25s; animation: rise .5s var(--ease); max-width: 560px; }
.art:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.art .thumb { width: 76px; height: 60px; border-radius: 12px; overflow: hidden; background: var(--soft); display: grid; place-items: center; color: var(--muted); position: relative; }
.art .thumb img { width: 100%; height: 100%; object-fit: cover; }
.art .thumb svg { width: 24px; height: 24px; }
.art .thumb iframe { width: 400%; height: 400%; transform: scale(.25); transform-origin: 0 0; border: 0; pointer-events: none; position: absolute; inset: 0; background: #fff; }
.art b { display: block; font-weight: 500; font-size: 14.5px; } .art small { color: var(--muted); font-size: 12.5px; }
.art.image-big { grid-template-columns: 1fr; padding: 6px; max-width: 460px; } .art.image-big .thumb { width: 100%; height: auto; aspect-ratio: 1; } .art.image-big .meta { display: none; }
.art.media-big { display: block; padding: 6px; max-width: 560px; cursor: default; }
.art.media-big video { width: 100%; border-radius: 12px; display: block; background: #000; }
.media-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 6px 2px; font-size: 13px; color: var(--muted); }
.art.audio-card { cursor: default; } .art.audio-card audio { width: 100%; max-width: 360px; margin-top: 6px; height: 34px; }
.dl { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); } .dl:hover { background: var(--soft); color: var(--fg); } .dl svg { width: 17px; height: 17px; }
.confirm { margin: 12px 0; padding: 14px; border-radius: 16px; background: #fef8e8; font-size: 14px; animation: rise .4s var(--ease); }
.confirm pre { font: 12px var(--mono); background: rgba(0,0,0,.04); padding: 8px 10px; border-radius: 8px; overflow-x: auto; max-height: 160px; margin: 8px 0; }
.confirm .row { display: flex; gap: 8px; }

/* ============ pages ============ */
.page { overflow-y: auto; padding: 36px clamp(20px, 3.4vw, 44px) 60px; }
.pg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.pg-head h1 { font-size: clamp(30px, 3vw, 40px); letter-spacing: -.04em; line-height: 1.1; }
.pg-head p { margin: 8px 0 0; color: var(--muted); font-size: 16px; max-width: 64ch; }
.pg-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; flex-wrap: wrap; }
.pg-tools { display: flex; align-items: center; gap: 6px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs button { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 18px; border-radius: 999px; background: var(--soft); font-size: 15px; transition: background .2s, color .2s; }
.tabs button svg { width: 16px; height: 16px; }
.tabs button:hover { background: var(--soft-2); }
.tabs button.on { background: var(--dark); color: var(--on-dark); }
.tabs.soft { gap: 2px; }
.tabs.soft button { background: none; height: 38px; padding: 0 14px; color: var(--muted); }
.tabs.soft button:hover { color: var(--fg); background: none; }
.tabs.soft button.on { background: var(--blue-soft); color: var(--blue); }
.tool-search { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 10px; color: var(--muted); transition: background .2s; }
.tool-search:focus-within, .tool-search:hover { background: var(--soft); }
.tool-search input { width: 0; border: 0; outline: 0; background: none; font-size: 14px; transition: width .3s var(--ease); }
.tool-search:focus-within input, .tool-search input:not(:placeholder-shown) { width: 150px; }
.seg-mini { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--soft); gap: 2px; }
.seg-mini button { height: 30px; min-width: 32px; padding: 0 10px; border-radius: 9px; color: var(--muted); display: grid; place-items: center; font-size: 13.5px; transition: background .2s, color .2s; }
.seg-mini button.on { background: var(--panel); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.seg-mini button svg { width: 16px; height: 16px; }
.seg-mini.wide button { min-width: 88px; }
.sec { font-size: 14px; font-weight: 500; color: var(--muted); margin: 34px 0 12px; }

.empty-state { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 70px 20px; animation: rise .6s var(--ease); }
.es-ic { width: 60px; height: 60px; border-radius: 18px; background: var(--soft); display: grid; place-items: center; color: var(--muted); margin-bottom: 8px; }
.es-ic svg { width: 26px; height: 26px; }
.empty-state h3 { font-size: 21px; }
.empty-state p { margin: 0 0 12px; color: var(--muted); max-width: 44ch; }

/* library */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.lib-card { position: relative; border-radius: 18px; background: var(--soft); overflow: hidden; cursor: pointer; transition: transform .3s var(--ease), box-shadow .3s; animation: rise .5s var(--ease) both; }
.lib-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.lib-thumb { aspect-ratio: 4 / 3; margin: 6px 6px 0; border-radius: 13px; background: var(--panel); position: relative; overflow: hidden; display: grid; place-items: center; color: var(--muted); }
.lib-thumb > svg, .lib-thumb > [data-icon] svg { width: 30px; height: 30px; }
.lib-thumb img, .lib-thumb video { width: 100%; height: 100%; object-fit: cover; }
.lib-thumb iframe { position: absolute; inset: 0; width: 400%; height: 400%; transform: scale(.25); transform-origin: 0 0; border: 0; pointer-events: none; background: #fff; }
.lib-thumb .pdfprev { position: absolute; inset: 0; object-position: top center; background: #fff; }
.thumb-wait { position: absolute; inset: 0; background: linear-gradient(100deg, var(--soft) 30%, var(--soft-2) 50%, var(--soft) 70%); background-size: 300% 100%; animation: thumbShimmer 1.4s ease-in-out infinite; }
@keyframes thumbShimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.textprev { position: absolute; inset: 12px 16px 0; background: #fff; color: #333; border-radius: 6px 6px 0 0; padding: 10px 12px; box-shadow: 0 4px 14px rgba(0,0,0,.08); overflow: hidden; text-align: left; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.textprev pre { margin: 0; font: 7.5px/1.5 var(--font); white-space: pre-wrap; word-break: break-word; }
.textprev.code { background: #fbfbfa; } .textprev.code pre { font-family: var(--mono); font-size: 7px; color: #2f3640; }
.filetile { display: grid; justify-items: center; gap: 8px; color: var(--muted); }
.filetile svg { width: 30px; height: 30px; }
.filetile span { font: 600 10.5px/1 var(--mono); letter-spacing: .06em; padding: 4px 7px; border-radius: 6px; background: var(--soft); color: var(--fg-2); }
.audprev { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 3px; padding: 0 22px; background: linear-gradient(135deg, var(--soft), var(--soft-2)); }
.audprev i { flex: 1; max-width: 4px; border-radius: 3px; background: var(--fg-2); opacity: .55; }
.lib-row .li video, .lib-row .li .pdfprev { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.lib-row .li { position: relative; }
.docprev { position: absolute; inset: 12px 16px; background: #fff; color: #222; border-radius: 6px; padding: 12px; font-size: 7px; line-height: 1.5; box-shadow: 0 4px 14px rgba(0,0,0,.08); overflow: hidden; text-align: left; }
.docprev b { font-size: 10px; display: block; margin-bottom: 4px; }
.sheetprev { position: absolute; inset: 12px; background: #fff; border-radius: 6px; overflow: hidden; font-size: 8px; color: #222; }
.sheetprev table { border-collapse: collapse; width: 100%; } .sheetprev td { border: 1px solid #e5e5ea; padding: 2px 4px; white-space: nowrap; overflow: hidden; max-width: 60px; }
.sheetprev tr:first-child td { background: #f0f0f4; font-weight: 600; }
.lib-meta { padding: 10px 14px 12px; }
.lib-meta b { display: block; font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-meta small { color: var(--muted); font-size: 12.5px; }
.lib-acts { position: absolute; top: 12px; right: 12px; display: flex; gap: 4px; opacity: 0; transition: opacity .2s; }
.lib-card:hover .lib-acts, .lib-acts .on { opacity: 1; }
.lib-acts button, .lib-acts a { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.92); color: #333; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.lib-acts svg { width: 15px; height: 15px; }
.lib-acts .star.on { color: #e0a100; opacity: 1; }
.lib-card:has(.star.on) .lib-acts { opacity: 1; }
.lib-list { display: grid; }
.lib-row { display: grid; grid-template-columns: 44px 1fr 140px 120px 90px; align-items: center; gap: 14px; padding: 8px 10px; border-radius: 12px; cursor: pointer; font-size: 14px; }
.lib-row:hover { background: var(--soft); }
.lib-row .li { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; background: var(--soft); display: grid; place-items: center; color: var(--muted); }
.lib-row .li img { width: 100%; height: 100%; object-fit: cover; }
.lib-row .li svg { width: 20px; height: 20px; }
.lib-row b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-row span { color: var(--muted); }
.drop { outline: 2px dashed var(--blue); outline-offset: -10px; }

/* connectors */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.app { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 26px 18px 18px; border-radius: 20px; background: var(--soft); border: 1px solid transparent; transition: transform .3s var(--ease), box-shadow .3s, border-color .2s; animation: rise .5s var(--ease) both; }
.app:hover { transform: translateY(-3px); box-shadow: var(--shadow); background: var(--panel); border-color: var(--line); }
.app-logo { width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 8px; }
.app-logo svg { width: 46px; height: 46px; }
.app-logo.letter { border-radius: 14px; background: var(--dark); color: var(--on-dark); font-size: 22px; font-weight: 600; width: 48px; height: 48px; }
.app.is-soon { opacity: .62; }
.app.is-soon:hover { transform: none; box-shadow: none; }
.app h3 { font-size: 17px; font-weight: 500; }
.app p { margin: 0 0 12px; font-size: 13.5px; color: var(--muted); line-height: 1.45; min-height: 40px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app .btn { width: 100%; height: 42px; margin-top: auto; }
.app .btn svg { width: 15px; height: 15px; }
.app .btn-soon { background: var(--soft-2); color: var(--muted); cursor: default; }
.app .btn-connected { background: rgba(22,163,74,.1); color: var(--ok); }
.app .app-sub { font-size: 12px; color: var(--faint); margin-top: -2px; }
.app.is-on { background: var(--panel); border-color: var(--line); }
.cm-head { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.cm-head .app-logo { margin: 0; width: 48px; height: 48px; }
.cm-head .app-logo svg { width: 40px; height: 40px; }

/* tasks */
.t-list { display: grid; gap: 10px; }
.t-row { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 18px; background: var(--soft); animation: rise .5s var(--ease) both; }
.t-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--panel); display: grid; place-items: center; flex: none; }
.t-ic svg { width: 20px; height: 20px; }
.t-main { flex: 1; min-width: 0; }
.t-main b { font-weight: 500; display: block; }
.t-main small { color: var(--muted); font-size: 13px; }
.t-run { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.toggle { width: 42px; height: 26px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .25s; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .3s var(--ease); }
.toggle.on { background: var(--ok); } .toggle.on::after { transform: translateX(16px); }
.status { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
.status.done { background: var(--ok); } .status.failed { background: var(--bad); } .status.running { background: var(--blue); animation: breathe 1.2s infinite; }
.suggest { margin-top: 42px; }
.sec-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--muted); margin-bottom: 14px; }
.sec-toggle svg { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.sec-toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }
.sec-toggle[aria-expanded="false"] + .sug-grid { display: none; }
.sug-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sug { display: flex; gap: 16px; text-align: left; padding: 20px; border-radius: 18px; border: 1px solid var(--line); transition: background .2s, transform .3s var(--ease); }
.sug:hover { background: var(--soft); transform: translateY(-2px); }
.sug [data-icon] svg, .sug > svg { width: 22px; height: 22px; color: var(--fg-2); }
.sug b { display: block; font-weight: 500; margin-bottom: 4px; }
.sug span.d { font-size: 13.5px; color: var(--muted); }

/* projects */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.proj { display: grid; gap: 4px; text-align: left; padding: 22px; border-radius: 20px; background: var(--soft); transition: transform .3s var(--ease), box-shadow .3s; animation: rise .5s var(--ease) both; }
.proj:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.p-emb { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; }
.p-emb svg { width: 22px; height: 22px; }
.proj b { font-weight: 500; font-size: 16.5px; }
.proj small { color: var(--muted); }
.proj.new { border: 1.5px dashed var(--line-2); background: none; place-content: center; justify-items: center; color: var(--muted); min-height: 150px; }
.ph-title { display: flex; gap: 16px; align-items: center; }
.ph-title .p-emb { margin: 0; width: 54px; height: 54px; }
.composer-proj { margin: 0 0 18px; max-width: none; }
.p-instr { padding: 14px 18px; border-radius: 16px; background: var(--soft); font-size: 14px; color: var(--fg-2); white-space: pre-wrap; }
.p-chats { display: grid; grid-template-columns: minmax(0, 1fr); }
.p-chat { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 6px; border-bottom: 1px solid var(--line); cursor: pointer; }
.p-chat:hover b { text-decoration: underline; text-underline-offset: 3px; }
.p-chat b { font-weight: 500; }
.p-chat small { color: var(--muted); white-space: nowrap; }
.e-violet { background: #f1ecfe; color: #7c4ddb; } .e-green { background: #e8f7ee; color: #1f9a55; } .e-blue { background: #e9f1fe; color: #2f6fe0; }
.e-pink { background: #fdecf1; color: #d63d6c; } .e-orange { background: #fef0e6; color: #e26a1c; } .e-teal { background: #e6f6f5; color: #149088; } .e-gray { background: var(--soft-2); color: var(--fg-2); }

/* ============ modals ============ */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(20,20,18,.36); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: grid; place-items: start center; padding: 12vh 16px 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.card { background: var(--panel); border-radius: 26px; box-shadow: var(--shadow-lg); animation: pop .35s var(--ease); }
.picker-card { width: min(720px, 100%); max-height: 76vh; display: flex; flex-direction: column; padding: 16px 16px 0; }
.picker-card > * { flex: none; }
.picker-card > .m-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 0 10px; margin: 0 -4px; overscroll-behavior: contain; }
.p-search { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 20px; border: 1px solid var(--line-2); border-radius: 999px; }
.p-search svg { width: 19px; height: 19px; color: var(--muted); }
.p-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16.5px; }
.p-count { color: var(--muted); font-size: 13.5px; }
.p-row { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 12px 2px 0; }
.p-row::-webkit-scrollbar { display: none; }
.p-row button { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 999px; font-size: 14.5px; white-space: nowrap; transition: background .15s; }
.p-row button:hover { background: var(--soft); }
.p-row button.on { background: var(--dark); color: var(--on-dark); }
.p-row svg { width: 15px; height: 15px; }
.p-caps { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.p-caps button { color: var(--muted); } .p-caps button.on { color: var(--on-dark); }
.p-sep { flex: 1; }
#mRefresh.spin svg { animation: spin 1s linear infinite; }
.p-sec { display: flex; align-items: center; gap: 6px; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 16px 16px 6px; }
.p-sec svg { width: 13px; height: 13px; }
.p-item { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 16px; cursor: pointer; transition: background .15s; }
.p-item:hover, .p-item.sel { background: var(--soft); }
.p-ic { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--soft); font-weight: 600; font-size: 14px; }
.p-item:hover .p-ic, .p-item.sel .p-ic { background: var(--panel); }
.p-ic svg, .p-ic .mark { width: 20px; height: 20px; }
.p-txt { flex: 1; min-width: 0; display: grid; }
.p-name { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; }
.p-desc { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14.5px; }
.cost { letter-spacing: .05em; color: var(--fg); font-variant-numeric: tabular-nums; } .cost i { font-style: normal; color: var(--line-2); }
.fast svg { width: 15px; height: 15px; color: #22c55e; } .fast.mid svg { color: #f59e0b; }
.tick svg { width: 16px; height: 16px; color: var(--fg); }
.p-test { font-size: 12px; color: var(--muted); text-decoration: underline; }
.badge { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; }
.badge svg { width: 12px; height: 12px; }
.b-image { background: #fdeef6; color: #d23f93; } .b-video { background: #fdeeee; color: #de4747; } .b-voice { background: #e9f5fa; color: #1a88ae; }
.b-stt { background: #ecf2fe; color: #3a6fdc; } .b-auto { background: #ecf2fe; color: #3a6fdc; } .b-agent { background: #e9f7f1; color: #1c9670; }
.p-empty { padding: 40px 20px; text-align: center; color: var(--muted); }

.search-card { width: min(640px, 100%); max-height: 70vh; display: flex; flex-direction: column; padding: 14px; }
.s-list { overflow-y: auto; margin-top: 8px; }
.s-item { display: grid; gap: 2px; padding: 10px 14px; border-radius: 14px; cursor: pointer; }
.s-item:hover, .s-item.sel { background: var(--soft); }
.s-item b { font-weight: 500; }
.s-item small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-item mark { background: #fff1b8; color: inherit; border-radius: 3px; }

.small-card { width: min(560px, 100%); padding: 28px; display: grid; gap: 14px; margin-top: 8vh; }
.small-card h2 { font-size: 21px; margin-bottom: 4px; }
.field-ic { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--soft); }
.field-ic .fi { width: 40px; height: 40px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; }
.field-ic .fi svg { width: 19px; height: 19px; }
.field-ic input { flex: 1; border: 0; outline: 0; background: none; font-size: 16px; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -28px; padding: 14px 28px; scrollbar-width: none; }
.chip-row button { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14.5px; transition: background .2s, border-color .2s; }
.chip-row button:hover { background: var(--soft); }
.chip-row button.on { border-color: var(--fg); }
.chip-row svg { width: 16px; height: 16px; }
.instr-d summary { cursor: pointer; font-size: 14.5px; color: var(--fg-2); margin-bottom: 10px; }
.instr-d summary small { color: var(--faint); }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.t-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.t-grid label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.check-row input { width: 18px; height: 18px; accent-color: var(--fg); }

.settings-card { width: min(1000px, 100%); height: min(760px, 84vh); display: grid; grid-template-columns: 270px 1fr; overflow: hidden; margin-top: -4vh; }
.set-nav { background: var(--soft); padding: 28px 16px; display: grid; align-content: start; gap: 2px; }
.set-nav h2 { font-size: 22px; padding: 0 12px 18px; }
.set-nav button { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 14px; border-radius: 12px; font-size: 15.5px; text-align: left; transition: background .2s; }
.set-nav button:hover { background: var(--soft-2); }
.set-nav button.on { background: var(--panel); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.set-nav svg { width: 19px; height: 19px; }
.set-body { position: relative; overflow-y: auto; padding: 34px 44px 44px; }
.set-x { position: absolute; top: 16px; right: 16px; }
.set-page { animation: rise .35s var(--ease); max-width: 680px; }
.set-page h4 { display: flex; align-items: center; gap: 8px; font-size: 12.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 26px 0 12px; }
.set-page h4:first-child { margin-top: 0; }
.set-page h4 svg { width: 16px; height: 16px; }
.group { border: 1px solid var(--line); border-radius: 18px; background: var(--soft); overflow: hidden; }
.g-row { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-top: 1px solid var(--line); }
.g-row:first-child { border-top: 0; }
.g-row.col { flex-direction: column; align-items: stretch; gap: 8px; }
.g-row.col label { font-weight: 500; font-size: 15px; }
.g-row.between { justify-content: space-between; }
.g-row b { display: block; font-weight: 500; }
.g-row small { display: block; }
.g-row .field { background: var(--panel); }
.dot-state { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); }
.dot-state.on { background: var(--ok); box-shadow: 0 0 0 4px rgba(22,163,74,.15); }
.mem-add { display: flex; gap: 8px; margin: 12px 0; }
.mem-list { display: grid; gap: 6px; margin-bottom: 18px; }
.mem { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--soft); animation: rise .4s var(--ease) both; }
.mem span { flex: 1; } .mem small { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.imp summary { padding: 14px 20px; cursor: pointer; font-weight: 500; }
.imp .field { margin: 0 20px; width: calc(100% - 40px); background: var(--panel); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.kpi { padding: 16px; border-radius: 16px; background: var(--soft); }
.kpi small { color: var(--muted); font-size: 12.5px; } .kpi b { display: block; font-size: 24px; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--soft); white-space: nowrap; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.sig { font-size: 11.5px; padding: 2px 7px; border-radius: 999px; background: var(--soft-2); }
.sig.pos { color: var(--ok); background: rgba(22,163,74,.1); } .sig.neg { color: var(--bad); background: rgba(220,38,38,.08); }

.viewer-card { width: min(1100px, 100%); height: calc(100vh - 60px); display: flex; flex-direction: column; overflow: hidden; margin-top: -8vh; }
.v-head { display: flex; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.v-head h3 { font-size: 17px; font-weight: 500; }
.v-body { flex: 1; overflow: auto; background: var(--soft); }
.v-body iframe { width: 100%; height: 100%; border: 0; background: #fff; display: block; }
.v-body img { max-width: 100%; max-height: 100%; margin: auto; display: block; }
.v-center { min-height: 100%; display: grid; place-items: center; padding: 20px; }
.paper { max-width: 800px; margin: 28px auto; background: #fff; color: #1b1b1f; padding: 64px 72px; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.08); }
.paper h1 { font-size: 28px; margin: 0 0 20px; } .paper h2 { font-size: 19px; margin: 24px 0 8px; } .paper p, .paper li { font-size: 14.5px; line-height: 1.6; }
.sheet-view { padding: 20px; }
.sheet-view table { border-collapse: collapse; background: #fff; color: #1b1b1f; font-size: 13px; }
.sheet-view td, .sheet-view th { border: 1px solid #dcdce2; padding: 6px 10px; min-width: 80px; }
.sheet-view th { background: #f0f0f4; font-weight: 600; text-align: left; } .sheet-view .rn { background: #f6f6f8; color: #888; text-align: center; min-width: 36px; }
.sheet-tabs { display: flex; gap: 4px; margin-bottom: 10px; } .sheet-tabs button { padding: 5px 12px; border-radius: 8px; font-size: 13px; background: #e9e9e6; color: #222; } .sheet-tabs button.on { background: #141413; color: #fff; }
.transcript .ts { font: 12px var(--mono); color: #888; margin-right: 10px; } .transcript p { margin: 0 0 10px; }
.tr-actions { display: flex; gap: 8px; margin-bottom: 18px; }
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: var(--dark); color: var(--on-dark); padding: 11px 20px; border-radius: 999px; font-size: 14px; z-index: 90; animation: pop .25s var(--ease); box-shadow: var(--shadow-lg); }

/* ============ responsive ============ */
@media (max-width: 1100px) { .sug-grid { grid-template-columns: repeat(2, 1fr); } .insp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .shell, .side-mini .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 50; background: var(--shell); transform: translateX(-100%); transition: transform .35s var(--ease); }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .side-mini .side-nav em, .side-mini .side-sec, .side-mini .side-chats, .side-mini .me-txt { display: revert; }
  #collapseBtn { display: none; }
  .scrim.open { display: block; position: fixed; inset: 0; z-index: 49; background: rgba(0,0,0,.3); animation: fade .2s; }
  .panel { margin: 0; border-radius: 0; border: 0; }
  .menu-btn { display: grid; position: absolute; top: 12px; left: 10px; z-index: 4; }
  .chat-top { padding-left: 54px; }
  .page { padding-top: 64px; }
  .settings-card { grid-template-columns: 1fr; height: 88vh; }
  .set-nav { display: flex; overflow-x: auto; padding: 14px; gap: 4px; } .set-nav h2 { display: none; } .set-nav button { flex: none; height: 38px; }
  .set-body { padding: 24px 20px; }
}
@media (max-width: 640px) {
  .thread-wrap, .dock { padding-left: 14px; padding-right: 14px; }
  #micBtn, .chat-title { display: none; }
  .lvl-btn { padding: 0 6px; font-size: 14px; }
  .sug-grid, .insp-grid, .t-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .lib-row { grid-template-columns: 44px 1fr 80px; } .lib-row .hide-s { display: none; }
  .p-caps { flex-wrap: nowrap; } .p-test, .p-sep { display: none; }
  .inspire-bar { display: none; }
  .modal { padding-top: 6vh; }
  .small-card { padding: 22px; } .chip-row { margin: 0 -22px; padding: 12px 22px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
.icon-btn svg { width: 18px; height: 18px; }
.proj.new svg, #pFiles label svg { width: 22px; height: 22px; }
#view-chat:not(.has-msgs) { justify-content: center; padding-bottom: 9vh; }
#view-chat:not(.has-msgs) .thread-wrap { padding-top: 0; }
#view-chat:not(.has-msgs) .dock { flex: 0 0 auto; }
#view-chat:not(.has-msgs) .chat-top { position: absolute; top: 0; left: 0; right: 0; }
@media (max-width: 640px) { .apps { grid-template-columns: repeat(2, 1fr); gap: 10px; } .app { padding: 18px 12px 12px; } .app .btn { height: 38px; font-size: 13.5px; padding: 0 10px; } .app-logo svg { width: 36px; height: 36px; } .pg-head h1 { font-size: 30px; } }

/* API keys */
.api-intro { margin: -4px 0 14px; }
.api-intro code, .g-row code { font-family: "Geist Mono", ui-monospace, monospace; font-size: 12.5px; }
.api-new { border: 0; padding: 14px 0 0; }
.api-new .field { flex: 1; }
.new-key { margin-top: 12px; padding: 16px 18px; border-radius: 16px; background: color-mix(in srgb, #22c55e 9%, var(--bg)); border: 1px solid color-mix(in srgb, #22c55e 30%, transparent); }
.new-key b, .new-key small { display: block; }
.nk-row { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.nk-row code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font: 12.5px "Geist Mono", ui-monospace, monospace; padding: 9px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.api-snip { margin: 0; padding: 16px 18px; border-radius: 16px; background: #0e0e10; color: #e6e6ea; font: 12.5px/1.7 "Geist Mono", ui-monospace, monospace; overflow-x: auto; white-space: pre; }

/* =====================================================================
   Chat skin v5 — ChatGPT-like: system type, flat canvas, clean composer
   ===================================================================== */
:root {
  --font: ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif;
  --shell: #f9f9f9; --panel: #ffffff; --soft: #f4f4f4; --soft-2: #ececec; --line: #e5e5e5; --line-2: #d9d9d9;
  --fg: #0d0d0d; --fg-2: #2f2f2f; --muted: #5d5d5d; --faint: #8f8f8f;
}
:root[data-theme="dark"] { --shell: #181818; --panel: #212121; --soft: #303030; --soft-2: #2a2a2a; --line: #333; --line-2: #444; --fg: #ececec; --fg-2: #d1d1d1; --muted: #afafaf; --faint: #8a8a8a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --shell: #181818; --panel: #212121; --soft: #303030; --soft-2: #2a2a2a; --line: #333; --line-2: #444; --fg: #ececec; --fg-2: #d1d1d1; --muted: #afafaf; --faint: #8a8a8a; } }
body { font: 16px/1.5 var(--font); letter-spacing: normal; }
h1, h2, h3, h4 { letter-spacing: normal; font-weight: 600; }

/* shell: sidebar + flat main, no floating card */
/* (desktop sidebar width lives in the min-width: 901px rule below; an unconditional width here gave phones a 260px column + an empty 130px one) */
.side { background: var(--shell); padding: 8px 8px 8px; border-right: 0; }
.side-top { padding: 4px 6px 10px; }
.side-nav a, .side-nav button { height: 36px; padding: 0 10px; border-radius: 10px; font-size: 14px; gap: 10px; }
.side-nav [data-icon] svg { width: 18px; height: 18px; }
.side-sec { margin: 18px 0 2px; font-size: 14px; color: var(--faint); padding: 0 10px; }
.side-chats a, .side-chats button { font-size: 14px; }
.panel { margin: 0; border: 0; border-radius: 0; background: var(--panel); }

/* top bar */
.chat-top { padding: 8px 12px 0; min-height: 52px; }
@media (max-width: 900px) { .chat-top { padding-left: 54px; } }  /* keep clear of the phone menu button */
.model-pill { background: transparent; height: 36px; padding: 0 10px; border-radius: 10px; font-size: 18px; font-weight: 400; gap: 6px; }
.model-pill:hover { background: var(--soft); }
.model-pill .mp-ic { display: none; }
.model-pill .mp-chev svg { width: 16px; height: 16px; color: var(--faint); }

/* empty state: greeting + composer centred, nothing else */
#view-chat .chips-run, #view-chat .inspire-bar, #view-chat .inspire, #view-chat .hint:empty { display: none !important; }
.hello h1 { font-size: 28px; font-weight: 400; letter-spacing: -.01em; line-height: 1.25; }
#view-chat:not(.has-msgs) .hello { margin-bottom: 26px; }

/* thread column: 768px like ChatGPT */
.thread, .composer, .hint { max-width: 768px; }
.thread { gap: 24px; }
.msg.user .bubble { background: var(--soft); border-radius: 22px; padding: 10px 16px; max-width: 70%; font-size: 16px; line-height: 1.5; }
.md { font-size: 16px; line-height: 1.75; }
.md p { margin: 0 0 16px; }
.md h1, .md h2 { font-size: 20px; font-weight: 600; margin: 28px 0 10px; }
.md h3 { font-size: 17px; font-weight: 600; margin: 22px 0 8px; }
.md li { margin: 6px 0; }
.md pre { border-radius: 16px; }
.think-head { font-size: 13px; }

/* composer: ChatGPT pill */
.dock { padding: 0 16px 14px; }
.composer { border: 0; border-radius: 28px; padding: 10px 10px 10px 12px; background: var(--panel);
  box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04), 0 4px 80px 8px rgba(0,0,0,.025); }
.composer:focus-within { box-shadow: 0 0 0 1px rgba(0,0,0,.09), 0 2px 10px rgba(0,0,0,.06), 0 4px 80px 8px rgba(0,0,0,.03); }
:root[data-theme="dark"] .composer { background: #303030; box-shadow: none; }
.composer textarea, .ph { font-size: 16px; }
.c-btn { width: 36px; height: 36px; color: var(--fg-2); }
.c-btn svg { width: 20px; height: 20px; }
.send { width: 36px; height: 36px; background: var(--fg); color: var(--panel); }
.send svg { width: 18px; height: 18px; }
.lvl-btn { height: 36px; font-size: 14px; padding: 0 10px; border-radius: 18px; }
.hint { font-size: 12px; color: var(--faint); margin-top: 8px; }
.side-chats a, .side-chats button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
#view-chat.has-msgs .dock::after { content: "Neo can make mistakes. Check important info."; display: block; text-align: center; font-size: 12px; color: var(--faint); margin-top: 8px; }

/* ===== v6: Krater-like pages, one type system ===== */
button, input, textarea, select, kbd { font-family: var(--font); }
.side-top-r { display: flex; gap: 2px; }
.brand-pill #mpName { font-weight: 600; font-size: 18px; }
.brand-pill .mp-ic { display: inline-grid !important; width: 22px; height: 22px; place-items: center; }
.brand-pill .mp-ic .mark, .brand-pill .mp-ic svg { width: 22px; height: 22px; }

/* page headers */
.page { padding: 28px 36px 40px; }
.pg-head h1 { font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.pg-head p { color: var(--muted); font-size: 15px; margin: 4px 0 0; }
.pg-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 8px; flex-wrap: wrap; }
.pill-tabs { display: flex; gap: 4px; flex-wrap: wrap; border: 0; background: none; padding: 0; }
.pill-tabs button { height: 36px; padding: 0 14px; border-radius: 999px; font-size: 15px; color: var(--muted); background: none; display: inline-flex; align-items: center; gap: 6px; transition: background .2s, color .2s; }
.pill-tabs button:hover { color: var(--fg); background: var(--soft); }
.pill-tabs button.on { background: #e8f1fe; color: #1a6ce8; }
.pill-tabs.dark-on button { background: var(--soft); color: var(--fg); }
.pill-tabs.dark-on button.on { background: var(--fg); color: var(--panel); }
.pg-tools { display: flex; align-items: center; gap: 6px; }
.tool-search.collapsible { width: 36px; height: 36px; padding: 0; border-radius: 10px; overflow: hidden; display: flex; align-items: center; gap: 6px; border: 1px solid transparent; transition: width .3s var(--ease), border-color .2s; cursor: pointer; }
.tool-search.collapsible [data-icon] { flex: none; width: 36px; display: grid; place-items: center; }
.tool-search.collapsible input { border: 0; outline: 0; background: none; width: 100%; font-size: 14px; }
.tool-search.collapsible:focus-within, .tool-search.collapsible:has(input:not(:placeholder-shown)) { width: 220px; border-color: var(--line); }
.seg-mini { background: var(--soft); border-radius: 10px; padding: 2px; }
.seg-mini button { width: 32px; height: 32px; border-radius: 8px; }
.seg-mini button.on { background: var(--panel); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* empty states */
.empty-state { text-align: center; padding: 14vh 20px 10vh; }
.empty-state .es-ic { width: 60px; height: 60px; border-radius: 18px; background: var(--soft); display: inline-grid; place-items: center; margin-bottom: 18px; color: var(--fg-2); }
.empty-state .es-ic svg { width: 26px; height: 26px; }
.empty-state h3 { font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.empty-state p { color: var(--muted); max-width: 380px; margin: 0 auto 22px; font-size: 15px; line-height: 1.5; }
.empty-state .btn { border-radius: 999px; height: 44px; padding: 0 22px; font-size: 15px; }

/* connectors: Krater-style cards */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 12px; }
.app { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 14px 14px; border-radius: 16px; background: var(--soft); border: 0; min-height: 0; animation: none; }
.app .app-logo { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 10px; background: none; }
.app .app-logo img { width: 36px; height: 36px; object-fit: contain; }
.app .app-logo svg { width: 34px; height: 34px; display: block; }
@media (max-width: 640px) { .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .app { padding: 16px 10px 10px; } }
.t-tz { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; } .t-tz svg { width: 13px; height: 13px; }
#cmLogo svg { width: 40px; height: 40px; }
/* near-black brand marks (GitHub, Wix, Sentry, Prisma...) follow the text colour in dark mode */
:root[data-theme="dark"] .app-logo svg.ink { color: var(--fg) !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .app-logo svg.ink { color: var(--fg) !important; } }
.app h3 { font-size: 15px; font-weight: 600; margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.app p { font-size: 12.5px; color: var(--muted); line-height: 1.35; margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 34px; }
.app .btn { width: 100%; height: 34px; border-radius: 10px; font-size: 13.5px; justify-content: center; gap: 6px; }
.app .btn svg { width: 14px; height: 14px; }
#cmLogo img { width: 40px; height: 40px; object-fit: contain; }

/* tasks: suggested grid */
.suggest { margin-top: 20px; }
.sug-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.sug { display: flex; align-items: flex-start; gap: 16px; text-align: left; padding: 22px 22px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); transition: background .2s, border-color .2s; }
.sug:hover { background: var(--soft); }
.sug > [data-icon], .sug > svg { width: 24px; height: 24px; color: var(--fg-2); flex: none; margin-top: 2px; }
.sug b { display: block; font-weight: 500; font-size: 16px; margin-bottom: 4px; }
.sug .d { font-size: 14px; color: var(--muted); line-height: 1.45; }
.sec-toggle { font-size: 14px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 1100px) { .sug-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .sug-grid { grid-template-columns: 1fr; } .page { padding: 64px 16px 20px; } }

/* library cards */
.lib-grid { gap: 14px; }
.lib-card { border-radius: 16px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.lib-meta b { font-weight: 500; }

/* model picker: minimal, like Krater */
.picker-card { max-width: 660px; padding: 14px 12px 8px; border-radius: 24px; }
.p-search { height: 50px; border-radius: 999px; border: 1px solid var(--line-2); padding: 0 18px; font-size: 16px; box-shadow: inset 0 1px 2px rgba(0,0,0,.03); }
.p-search input { font-size: 16px; }
.p-row { gap: 4px; padding: 10px 4px 2px; }
.p-row button { height: 34px; padding: 0 10px; border-radius: 10px; font-size: 14.5px; color: var(--fg-2); gap: 7px; background: none; border: 0; }
.p-row button:hover, .p-row button.on { background: var(--soft); color: var(--fg); }
.p-row button svg { width: 16px; height: 16px; }
.p-caps { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.p-sec { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 16px 12px 8px; display: flex; align-items: center; gap: 6px; }
.p-sec svg { width: 14px; height: 14px; }
.p-item { display: flex; align-items: center; gap: 14px; padding: 9px 12px; border-radius: 14px; cursor: pointer; }
.p-item:hover, .p-item.sel { background: var(--soft); }
.p-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--soft); display: grid; place-items: center; flex: none; }
.p-item:hover .p-ic, .p-item.sel .p-ic { background: var(--panel); }
.p-ic svg, .p-ic .mark { width: 20px; height: 20px; }
.p-name { font-size: 15.5px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.p-desc { font-size: 13.5px; color: var(--muted); }
.p-name .badge { font-size: 11.5px; font-weight: 500; padding: 1px 7px; border-radius: 999px; display: inline-flex; align-items: center; gap: 3px; }
.p-name .badge svg { width: 11px; height: 11px; }
.b-music { background: #f1ecfe; color: #7c3aed; } .badge.b-music { background: #f1ecfe; color: #7c3aed; }
.badge.b-image { background: #fbeafd; color: #c026d3; } .badge.b-video { background: #fde8ef; color: #e11d48; } .badge.b-voice { background: #e8f4fd; color: #0284c7; } .badge.b-stt { background: #eef2ff; color: #4f46e5; }
.p-meta { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.p-meta .cost { font-size: 14px; letter-spacing: .5px; color: var(--fg-2); } .p-meta .cost i { display: none; }
.p-meta .fast svg { width: 16px; height: 16px; } .p-meta .fast.c1 { color: #10b981; } .p-meta .fast.c2, .p-meta .fast.c3 { color: #f59e0b; }
.p-meta .tick svg { width: 16px; height: 16px; }
.app.is-on { background: var(--soft); }
.app .app-logo.letter { background: var(--dark); color: var(--on-dark); font-size: 17px; font-weight: 600; width: 34px; height: 34px; border-radius: 8.5px; margin: 3px 3px 13px; }  /* same footprint as the built-in marks */
.app .btn.is-on, .app .btn-on { height: 36px; }
.p-row .nm { display: inline-grid; place-items: center; }
.p-row .nm svg { width: 16px; height: 16px; }
.p-row button.on { background: var(--soft); color: var(--fg); }

/* ===== v9: settings (Claude × ChatGPT), usage bar, Chat/NeoBot, temporary chat ===== */
:root { --accent: var(--fg); --on-accent: var(--panel); }
:root[data-accent="blue"] { --accent: #2f7cf6; --on-accent: #fff; }
:root[data-accent="green"] { --accent: #16a34a; --on-accent: #fff; }
:root[data-accent="purple"] { --accent: #8b5cf6; --on-accent: #fff; }
:root[data-accent="orange"] { --accent: #f97316; --on-accent: #fff; }
:root[data-accent="pink"] { --accent: #ec4899; --on-accent: #fff; }
:root[data-font="serif"] .md, :root[data-font="serif"] .bubble { font-family: ui-serif, Georgia, "Times New Roman", serif; }
:root[data-font="mono"] .md, :root[data-font="mono"] .bubble { font-family: var(--mono); font-size: 14.5px; }
:root[data-font="system"] .md, :root[data-font="system"] .bubble { font-family: system-ui, sans-serif; }
:root[data-motion="reduced"] *, :root[data-motion="reduced"] *::before, :root[data-motion="reduced"] *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
.send { background: var(--accent); color: var(--on-accent); }

/* settings shell */
.settings-card { width: min(1040px, 100%); height: min(720px, 86vh); grid-template-columns: 236px 1fr; border-radius: 22px; margin-top: 0; }
.set-nav { background: var(--panel); border-right: 1px solid var(--line); padding: 14px 10px; gap: 1px; overflow-y: auto; }
.set-nav h2 { display: none; }
.set-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; margin: 0 2px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.set-search:focus-within { border-color: var(--line-2); }
.set-search svg { width: 16px; height: 16px; flex: none; }
.set-search input { border: 0; outline: 0; background: none; width: 100%; font-size: 14px; color: var(--fg); }
.set-grp { display: block; font-size: 12px; color: var(--faint); padding: 12px 12px 6px; }
.set-grp:first-of-type { padding-top: 4px; }
.set-nav button { height: 34px; padding: 0 10px; gap: 10px; border-radius: 8px; font-size: 14px; color: var(--fg-2); }
.set-nav button:hover { background: var(--soft); }
.set-nav button.on { background: var(--soft-2); box-shadow: none; color: var(--fg); font-weight: 500; }
.set-nav svg { width: 17px; height: 17px; color: var(--muted); }
.set-nav button.on svg { color: var(--fg); }
.set-body { padding: 30px 40px 48px; }
.set-x { top: 14px; right: 14px; }
.set-page { max-width: 640px; }
.set-page h2 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 18px; display: flex; align-items: center; gap: 10px; }
.set-page h3 { font-size: 15px; font-weight: 600; margin: 30px 0 4px; }
.set-page h2 + h3 { margin-top: 6px; }
.s-rows { display: grid; }
.s-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 58px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.s-row:last-child { border-bottom: 0; }
.s-row b { display: block; font-weight: 500; }
.s-row small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; line-height: 1.4; }
.s-row.col { flex-direction: column; align-items: stretch; gap: 8px; }
.s-row.col label { font-weight: 500; }
.s-row .field { height: 42px; border-radius: 10px; background: var(--panel); font-size: 14.5px; }
.s-row kbd { font-size: 12.5px; color: var(--muted); background: var(--soft); border-radius: 6px; padding: 3px 8px; }
.s-row .form-msg { margin-left: 10px; }
.s-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.s-note { color: var(--muted); font-size: 13px; margin: 14px 0 0; line-height: 1.5; }
.s-select { appearance: none; border: 0; background: transparent; font-size: 14px; color: var(--fg); padding: 6px 22px 6px 8px; border-radius: 8px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 11px) 14px, calc(100% - 7px) 14px; background-size: 4px 4px; background-repeat: no-repeat; }
.s-select:hover { background-color: var(--soft); }
.seg-mini { background: var(--soft); border-radius: 10px; }
.seg-mini button { height: 30px; font-size: 13px; border-radius: 8px; }
.seg-mini.ic button { width: 34px; min-width: 0; padding: 0; }
.accents { display: flex; gap: 8px; }
.accents button { width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(0,0,0,.08) inset; transition: transform .15s; }
.accents button:hover { transform: scale(1.1); }
.accents button.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--c); }
:root[data-theme="dark"] .accents button[data-a="default"] { --c: #ececec !important; }
.tgl { position: relative; flex: none; width: 40px; height: 24px; cursor: pointer; }
.tgl input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tgl i { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: background .2s; pointer-events: none; }
.tgl i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.tgl input:checked + i { background: var(--accent); }
.tgl input:checked + i::after { transform: translateX(16px); }
.tgl input:disabled + i { opacity: .5; }
.acc-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: var(--soft); }
.acc-card b { display: block; font-weight: 600; } .acc-card small { font-size: 13px; }
.s-details { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.s-details summary { cursor: pointer; font-size: 14.5px; font-weight: 500; list-style: none; display: flex; align-items: center; gap: 8px; }
.s-details summary::-webkit-details-marker { display: none; }
.s-details summary::before { content: "›"; color: var(--muted); transition: transform .2s; display: inline-block; }
.s-details[open] summary::before { transform: rotate(90deg); }
.s-details > *:not(summary) { margin-top: 12px; }
.s-empty { padding: 22px; text-align: center; color: var(--muted); font-size: 14px; border: 1px dashed var(--line-2); border-radius: 14px; margin-top: 8px; }
.mem-list { margin-top: 10px; }

/* usage */
.plan-badge { font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 99px; background: var(--soft); color: var(--fg-2); letter-spacing: 0; }
.u-head { font-size: 19px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 8px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.u-bars { display: grid; }
.u-bar { display: grid; grid-template-columns: 190px 1fr 112px; align-items: center; gap: 18px; padding: 14px 0; }
.u-bar b { display: block; font-weight: 500; font-size: 14.5px; }
.u-bar small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.u-bar > span { text-align: right; font-size: 13.5px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 99px; background: var(--soft-2); overflow: hidden; }
.bar i, .um-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--blue); transition: width .6s var(--ease); }
.bar i.warn, .um-bar i.warn { background: #f59e0b; }
.bar i.crit, .um-bar i.crit { background: var(--bad); }
.u-credits { display: flex; align-items: center; gap: 22px; padding: 16px 18px; border-radius: 16px; background: var(--soft); margin-top: 10px; flex-wrap: wrap; }
.u-credits > div:first-child b { font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.u-credits > div:first-child small { display: block; color: var(--muted); font-size: 12.5px; }
.u-buckets { display: flex; gap: 16px; flex: 1; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.u-buckets span { display: inline-flex; align-items: center; gap: 6px; }
.u-buckets b { color: var(--fg); font-weight: 500; font-variant-numeric: tabular-nums; }
.u-buckets i { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.u-buckets i.b-packs { background: #8b5cf6; } .u-buckets i.b-trial { background: #f59e0b; }
.u-chart { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; height: 170px; margin-top: 12px; padding: 0 2px; }
.uc-col { display: grid; grid-template-rows: 18px 1fr 20px; align-items: end; justify-items: center; }
.uc-v { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.uc-bar { width: 100%; max-width: 44px; height: 100%; display: flex; align-items: flex-end; border-radius: 8px; background: var(--soft); overflow: hidden; }
.uc-bar i { display: block; width: 100%; background: var(--line-2); border-radius: 8px 8px 0 0; }
.uc-col.today .uc-bar i { background: var(--blue); }
.uc-col small { font-size: 12px; color: var(--muted); }
.uc-col.today small { color: var(--fg); font-weight: 500; }
.uc-limit { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line-2); pointer-events: none; display: none; }
.plan-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); flex-wrap: wrap; }
.plan-card b { display: block; font-weight: 600; font-size: 16px; } .plan-card small { color: var(--muted); font-size: 13px; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.pack { display: grid; gap: 2px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); text-align: left; transition: border-color .2s, background .2s; }
.pack:hover { border-color: var(--line-2); background: var(--soft); }
.pack b { font-size: 20px; font-weight: 600; letter-spacing: -.02em; } .pack small { color: var(--muted); font-size: 12.5px; } .pack span { margin-top: 8px; font-weight: 500; }
.pack.best { border-color: var(--fg); }
.tbl { font-size: 13px; }

/* sidebar usage — always visible */
.u-mini { display: grid; gap: 5px; margin: auto 4px 4px; padding: 10px 12px 12px; border-radius: 12px; text-align: left; transition: background .2s; }
.u-mini:hover { background: var(--soft-2); }
.um-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.um-row b { font-weight: 500; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.um-row + .um-bar { margin-bottom: 4px; }
.um-bar { display: block; height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.side-chats { flex: 1 1 auto; }
.um-sub { font-size: 11.5px; color: var(--muted); margin-top: -1px; }
.u-extra { flex: 1; min-width: 200px; }
.u-credits > div.u-extra b { display: block; font-size: 15px; font-weight: 500; letter-spacing: 0; }
.u-extra small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.limit-bar { max-width: 760px; margin: 0 auto 10px; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); font-size: 14px; line-height: 1.4; }
.limit-bar[hidden] { display: none; }
.limit-bar p { margin: 0; flex: 1; min-width: 0; }
.limit-bar .lb-when { color: var(--muted); white-space: nowrap; }
.limit-bar > [data-icon] { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--bg, #fff); display: grid; place-items: center; }
.limit-bar > [data-icon] svg { width: 15px; height: 15px; }
.limit-bar .btn { flex: none; }
@media (max-width: 560px) { .limit-bar { flex-wrap: wrap; } .limit-bar .btn { width: 100%; } }
.pl-admin { display: block; margin-top: 10px; font-size: 12px; line-height: 1.5; color: var(--muted); font-variant-numeric: tabular-nums; white-space: pre-line; }
.pl-admin[hidden] { display: none; }
.limit-note { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); margin: 6px 0 2px; font-size: 14px; line-height: 1.45; }
.limit-note p { margin: 0; flex: 1; min-width: 220px; }
.u-mini + .me { margin-top: 0; }
.side-mini .u-mini { display: none; }

/* composer: input on top, tools below */
.composer { padding: 8px 10px 10px; border-radius: 26px; }
.c-input { padding: 4px 8px 2px; }
.c-input .input-wrap { flex: none; }
.composer textarea { min-height: 44px; padding: 10px 0 6px; }
.c-input .ph { left: 0; top: 10px; }
.c-line { align-items: center; gap: 6px; }
.c-sp { flex: 1; }
.mode-seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--soft); }
.mode-seg button { height: 30px; padding: 0 12px; border-radius: 9px; font-size: 14px; color: var(--muted); transition: background .2s, color .2s; }
.mode-seg button.on { background: var(--panel); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
:root[data-theme="dark"] .mode-seg { background: #262626; } :root[data-theme="dark"] .mode-seg button.on { background: #3a3a3a; }
.bot-on .composer { box-shadow: 0 0 0 1px rgba(139,92,246,.35), 0 2px 10px rgba(139,92,246,.08), 0 4px 80px 8px rgba(139,92,246,.05); }
.bot-on .mode-seg button.on { color: #7c3aed; }

/* temporary chat */
.top-r { margin-left: auto; display: flex; gap: 4px; }
.temp-btn svg { width: 20px; height: 20px; }
.temp-btn[aria-pressed="true"] { background: var(--fg); color: var(--panel); }
.hello-sub { color: var(--muted); font-size: 15px; margin: 10px 0 0; text-align: center; max-width: 460px; }
.hello { display: grid; justify-items: center; }
.temp-on #view-chat { background: var(--shell); }
.temp-on .composer { box-shadow: 0 0 0 1px var(--line-2); }

/* tasks: keep suggestions in view */
#view-tasks .empty-state { padding: 5vh 20px 3vh; }
#view-tasks .empty-state .es-ic { margin-bottom: 12px; }
#view-tasks .suggest { margin-top: 12px; }

@media (max-width: 760px) {
  .settings-card { grid-template-columns: 1fr; height: 90vh; }
  .set-nav { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; }
  .set-search, .set-grp { display: none; }
  .set-nav button { flex: none; }
  .set-body { padding: 22px 18px 36px; }
  .u-bar { grid-template-columns: 1fr 64px; } .u-bar .bar { grid-column: 1 / -1; grid-row: 2; }
  .packs { grid-template-columns: 1fr; }
}
#motionSeg button, #defTier button { width: auto; min-width: 0; padding: 0 12px; }
.u-bar { grid-template-columns: 250px 1fr 74px; }
#view-tasks .empty-state { padding: 16px 20px 8px; }
#view-tasks .empty-state .es-ic { width: 48px; height: 48px; border-radius: 14px; margin-bottom: 10px; }
#view-tasks .empty-state .es-ic svg { width: 22px; height: 22px; }
#view-tasks .empty-state h3 { font-size: 17px; margin-bottom: 4px; }
#view-tasks .empty-state p { margin-bottom: 14px; font-size: 14px; }
#view-tasks .empty-state .btn { height: 38px; font-size: 14px; padding: 0 18px; }
#view-tasks .suggest { margin-top: 4px; }

/* v10: collapsed sidebar like ChatGPT — logo turns into the expand button on hover, no search */
.side-mini .side-top { position: relative; flex-direction: row; justify-content: center; padding: 4px 0 12px; }
.side-mini #searchBtn { display: none; }
.side-mini .side-top-r { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); opacity: 0; transition: opacity .15s; }
.side-mini .side-top-r .icon-btn { width: 40px; height: 40px; }
.side-mini .side-top:hover .side-top-r { opacity: 1; }
.side-mini .side-top:hover .logo { opacity: 0; }
.side-mini .logo { transition: opacity .15s; }
.side-mini .side-nav a { width: 40px; height: 40px; margin: 0 auto; border-radius: 10px; }
.side-mini .side-nav svg { width: 20px; height: 20px; }
.side-mini .u-mini + .me, .side-mini .me { margin-top: auto; }
.side-nav svg { width: 19px; height: 19px; }

/* thinking: live reasoning like Claude */
.think.live .think-head { cursor: default; }
.shimmer { background: linear-gradient(90deg, var(--muted) 0%, var(--muted) 40%, var(--fg) 50%, var(--muted) 60%, var(--muted) 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: shimmer 2.2s linear infinite; font-weight: 400 !important; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.think-head .t-sum { color: var(--muted); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 46ch; }
.think-head .t-sum::before { content: "·"; margin-right: 8px; color: var(--faint); }
.think-body { display: none; margin: 6px 0 8px 11px; padding-left: 16px; border-left: 1px solid var(--line-2); }
.think.open .think-body { display: block; animation: rise .3s var(--ease); }
.think.open .think-steps { display: grid; margin: 0 0 8px; padding: 0; border: 0; animation: none; }
.think-text { font-size: 13.5px; line-height: 1.6; color: var(--muted); max-height: 260px; overflow-y: auto; scrollbar-width: thin; }
.think-text p, .think-text ul, .think-text ol { margin: 0 0 6px; } .think-text ul, .think-text ol { padding-left: 18px; }
.think-text h2, .think-text h3 { font-size: inherit; font-weight: 600; margin: 6px 0 2px; color: var(--fg-2); }
.think-text strong, .think-text b { color: var(--fg-2); font-weight: 600; }
.think.live .think-text { max-height: 180px; }
/* fade the top edge only once older reasoning scrolls away (a short thought stays fully readable) */
.think.live .think-text.fade { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 28px); mask-image: linear-gradient(to bottom, transparent 0, #000 28px); }
.think-text[hidden] { display: none; }
/* Chat | NeoBot: equal, centred segments */
.mode-seg { display: inline-grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 0; height: 36px; padding: 3px; box-sizing: border-box; border-radius: 11px; flex: none; }
.mode-seg button { display: grid; place-items: center; height: 30px; min-width: 0; width: auto; margin: 0; padding: 0 14px; border-radius: 8px; line-height: 1; font-size: 14px; }
.mode-seg button.on { box-shadow: 0 0 0 .5px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.08); }
/* narrower sidebar */
@media (min-width: 901px) { .shell { grid-template-columns: 232px 1fr; } .side-mini .shell { grid-template-columns: 68px 1fr; } }
.side-nav a { height: 38px; font-size: 14.5px; }
.side-chats a, .side-chats button { font-size: 14px; }

/* model pill shows the chosen model(s) */
.brand-pill .mp-ic svg, .brand-pill .mp-ic img { width: 20px; height: 20px; }
.brand-pill.multi .mp-ic { width: auto !important; }
.stack { display: inline-flex; }
.stack i { width: 24px; height: 24px; border-radius: 50%; background: var(--panel); box-shadow: 0 0 0 2px var(--panel); display: grid; place-items: center; margin-left: -7px; }
.stack i:first-child { margin-left: 0; }
.stack i svg { width: 15px !important; height: 15px !important; }
/* multi-select in the picker */
.p-add { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line-2); opacity: 0; transition: opacity .15s, background .15s; flex: none; }
.p-item:hover .p-add, .p-add.on { opacity: 1; }
.p-add:hover { background: var(--soft-2); color: var(--fg); }
.p-add.on { background: var(--fg); border-color: var(--fg); color: var(--panel); }
.p-add svg { width: 14px; height: 14px; }
.p-multi { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 8px 4px 2px; border-radius: 16px; background: var(--soft); }
.p-multi[hidden] { display: none; }
.pm-logos { display: inline-flex; }
.pm-logos i { width: 30px; height: 30px; border-radius: 50%; background: var(--panel); box-shadow: 0 0 0 2px var(--soft); display: grid; place-items: center; margin-left: -8px; }
.pm-logos i:first-child { margin-left: 0; }
.pm-logos svg { width: 17px; height: 17px; }
.pm-txt { flex: 1; min-width: 0; display: grid; }
.pm-txt b { font-weight: 600; font-size: 14px; } .pm-txt small { color: var(--muted); font-size: 12.5px; }
#pmUse:disabled { opacity: .4; cursor: default; }
.brand-pill .stack i { margin-left: -5px; }
.brand-pill .stack i:first-child { margin-left: 0; }
.p-multi { margin-bottom: 14px; }

/* settings: centred on screen */
#settingsModal { place-items: center; padding: 16px; }
#settingsModal .settings-card { height: min(760px, 88vh); }

/* memory */
.mem-hero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.mh-stat { padding: 16px; border-radius: 16px; background: var(--soft); }
.mh-stat b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mh-stat small { color: var(--muted); font-size: 12.5px; }
.mem-intro { margin: 0 0 8px; }
.mem-tools { display: flex; gap: 10px; align-items: center; margin: 12px 0 6px; }
.mem-search { flex: 1; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.mem-search svg { width: 15px; height: 15px; }
.mem-search input { border: 0; outline: 0; background: none; width: 100%; font-size: 14px; color: var(--fg); }
#memFilter button { width: auto; padding: 0 12px; }
.mem-list { display: grid; gap: 0; margin-top: 4px; }
.mem { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); background: none; border-radius: 0; animation: rise .35s var(--ease) both; }
.mem .mem-f { grid-column: 1; font-size: 14.5px; line-height: 1.45; outline: none; border-radius: 6px; }
.mem.editing .mem-f { background: var(--soft); padding: 4px 6px; margin: -4px -6px; }
.mem .mem-src { grid-column: 1; color: var(--faint); font-size: 12px; margin-top: 3px; text-transform: none; letter-spacing: 0; }
.mem .mem-src a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.mem .mem-act { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 2px; align-self: center; opacity: 0; transition: opacity .15s; }
.mem:hover .mem-act, .mem:focus-within .mem-act { opacity: 1; }
@media (hover: none) { .mem .mem-act { opacity: 1; } }  /* phones and tablets have no hover: keep edit / delete visible */
.mem .mem-src .mem-meta { font-style: normal; }
.mem .mem-act .icon-btn { width: 30px; height: 30px; }
.mem .mem-act svg { width: 15px; height: 15px; }
.mem-danger { margin-top: 18px; }
@media (max-width: 760px) { .mem-hero { grid-template-columns: 1fr; } .mem-tools { flex-wrap: wrap; } .mem-search { flex: 1 1 100%; } }
.mem { display: block; position: relative; padding-right: 76px; }
.mem .mem-f, .mem .mem-src { display: block; }
.mem .mem-act { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }

/* v11: collapsed rail that doesn't depend on the column width (Safari), logo expands it */
.shell { transition: none; }
.side-mini .side { width: 68px; max-width: 68px; padding-left: 0; padding-right: 0; align-items: center; }
.side-mini .side-top, .side-mini .side-nav, .side-mini .me { width: 100%; }
.side-mini .side-nav { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.side-mini .side-nav a, .side-mini .side-nav button { flex: none; width: 40px; height: 40px; margin: 0; padding: 0; gap: 0; justify-content: center; }
.side-mini .side-nav a > em { display: none !important; }
.side-mini .logo { cursor: e-resize; }

/* v11: lower chat composer */
.composer { padding: 5px 8px 7px; }
.composer textarea { min-height: 34px; padding: 7px 0 3px; line-height: 1.5; }
.c-input .ph { left: 0; top: 7px; line-height: 1.5; }
.c-line { min-height: 36px; }
.c-btn { width: 32px; height: 32px; }
.mode-seg { height: 32px; padding: 2px; border-radius: 10px; }
.mode-seg button { height: 28px; padding: 0 12px; font-size: 13.5px; }
.lvl-btn { height: 32px; font-size: 13.5px; }
.send { width: 34px; height: 34px; }
.send svg { width: 17px; height: 17px; }

/* v11: smaller model pill in the header */
.model-pill { height: 32px; padding: 0 8px 0 8px; gap: 6px; font-size: 15px; border-radius: 9px; }
.brand-pill #mpName { font-size: 15px; font-weight: 600; }
.brand-pill .mp-ic, .brand-pill .mp-ic .mark, .brand-pill .mp-ic svg, .brand-pill .mp-ic img { width: 17px !important; height: 17px !important; }
.brand-pill.multi .mp-ic { width: auto !important; }
.model-pill .mp-chev svg { width: 14px; height: 14px; }

/* v12: collapsed rail like ChatGPT — narrow, hairline border, roomy icons */
@media (min-width: 901px) { .side-mini .shell { grid-template-columns: 52px 1fr; } }
.side-mini .side { width: 52px; max-width: 52px; padding: 8px 0 12px; gap: 0; border-right: 1px solid #ececec; }
:root[data-theme="dark"] .side-mini .side { border-right-color: #2a2a2a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .side-mini .side { border-right-color: #2a2a2a; } }
.side-mini .side-top { padding: 2px 0 18px; }
.side-mini .logo { width: 28px; height: 28px; }
.side-mini .logo svg, .side-mini .logo .mark { width: 28px; height: 28px; }
.side-mini .side-top-r { top: 2px; }
.side-mini .side-top-r .icon-btn { width: 36px; height: 36px; }
.side-mini .side-nav { gap: 0; }
.side-mini .side-nav a, .side-mini .side-nav button { width: 36px; height: 36px; border-radius: 10px; color: var(--fg); }
.side-mini .side-nav a:hover, .side-mini .side-nav a.on { background: #ececec; }
:root[data-theme="dark"] .side-mini .side-nav a:hover, :root[data-theme="dark"] .side-mini .side-nav a.on { background: #2a2a2a; }
.side-mini .side-nav svg, .side-mini .side-nav [data-icon] svg { width: 20px; height: 20px; stroke-width: 1.9; }
.side-mini .me { width: 36px; height: 36px; padding: 0; margin: auto auto 0; border-radius: 50%; }
.side-mini .me:hover { background: transparent; }
.side-mini .avatar { width: 28px; height: 28px; font-size: 11.5px; font-weight: 600; }
.avatar { background: #9b5fc0; }

/* v12: pinned chats section (like ChatGPT "Pinned") */
.side-sec-static { cursor: default; }
.side-pins { display: grid; gap: 1px; margin: 0 -2px; padding: 0 2px; flex: none; }
.conv.pinned { display: flex; align-items: center; gap: 8px; }
.conv .pin-ic { display: grid; place-items: center; flex: none; color: var(--muted); }
.conv .pin-ic svg { width: 15px; height: 15px; }
.conv.pinned > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-mini .side-pins, .side-mini #pinSec { display: none; }
@media (max-width: 900px) { .side-mini .side-pins:not([hidden]), .side-mini #pinSec:not([hidden]) { display: revert; } }

/* v13: level popover with a slider (like ChatGPT) */
.lvl-pop { width: 260px; min-width: 0; padding: 16px 18px 12px; }
.lvl-pop .lp-head { display: grid; gap: 2px; margin-bottom: 14px; }
.lvl-pop .lp-head b { font-size: 15px; font-weight: 600; }
.lvl-pop .lp-head small { font-size: 13px; color: var(--muted); }
.lvl-pop .lp-track { position: relative; height: 24px; border-radius: 999px; background: var(--soft-2, #ececec); cursor: pointer; touch-action: none; outline: none; --f: .5; }
.lvl-pop .lp-track:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #10a37f) 30%, transparent); }
.lvl-pop .lp-fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(24px + (100% - 24px) * var(--f)); border-radius: 999px; background: var(--accent, #0a0a0a); transition: width .25s cubic-bezier(.2,.8,.2,1); }
.lvl-pop .lp-stop { position: absolute; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: var(--faint, #b4b4b4); left: calc(12px + (100% - 24px) * var(--p)); pointer-events: none; }
.lvl-pop .lp-stop[data-i="0"] { --p: 0; } .lvl-pop .lp-stop[data-i="1"] { --p: .5; } .lvl-pop .lp-stop[data-i="2"] { --p: 1; }
.lvl-pop .lp-stop.on { background: rgba(255,255,255,.75); }
.lvl-pop .lp-knob { position: absolute; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.28); left: calc(2px + (100% - 24px) * var(--f)); transition: left .25s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.lvl-pop .lp-track.drag .lp-fill, .lvl-pop .lp-track.drag .lp-knob { transition: none; }
.lvl-pop .lp-ends { display: flex; justify-content: space-between; margin-top: 8px; }
.lvl-pop .lp-ends button { font-size: 12.5px; color: var(--muted); padding: 2px 4px; border-radius: 6px; }
.lvl-pop .lp-ends button:hover, .lvl-pop .lp-ends button.on { color: var(--fg); font-weight: 500; }

/* v13: calmer "working" state — no blinking dots; model mark with a thin spinner, shimmering label, timer */
.caret::after { content: none !important; }
.think-steps:empty { display: none; }
#view-chat.has-msgs .dock::after { content: none; }
.disclaim { display: none; text-align: center; font-size: 12px; color: var(--faint); margin: 8px 0 0; }
#view-chat.has-msgs .disclaim { display: block; }
.think-head .live-ic { position: relative; width: 22px; height: 22px; display: grid; place-items: center; flex: none; }
.think-head .live-ic svg, .think-head .live-ic .mark, .think-head .live-ic img { width: 14px; height: 14px; }
.think-head .live-ic::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1.5px solid transparent; border-top-color: var(--fg); border-right-color: color-mix(in srgb, var(--fg) 35%, transparent); animation: spin .9s linear infinite; }
.think-head .t-time { color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; margin-left: 2px; }
@media (prefers-reduced-motion: reduce) { .think-head .live-ic::after { animation: none; } }
/* voice answer player */
.art.audio-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px; max-width: 520px; }
.art.audio-card .meta { flex: 1; min-width: 0; }
.art.audio-card .meta b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-play { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--accent, var(--fg)); color: var(--on-accent, #fff); transition: transform .15s; }
.ap-play:hover { transform: scale(1.05); }
.ap-play svg { width: 18px; height: 18px; }
.ap-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.ap-bar { flex: 1; height: 4px; border-radius: 999px; background: var(--soft-2, #e5e5e5); cursor: pointer; position: relative; }
.ap-bar::before { content: ""; position: absolute; inset: -8px 0; }
.ap-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--fg); transition: width .2s linear; }
.ap-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 32px; text-align: right; }
.art.audio-card audio { display: none; }
.think-head .live-ic { width: 24px; height: 24px; border-radius: 50%; background: var(--soft); }
.think-head .live-ic::after { inset: 0; border-width: 1.5px; }

/* v14: mode is fixed once the chat starts; NeoBot bar (folder + approvals) */
#view-chat.has-msgs #modeSeg { display: none; }
.bot-bar { display: none; align-items: center; gap: 6px; max-width: 768px; margin: 8px auto 0; padding: 0 6px; }
.bot-on .bot-bar { display: flex; }
.bb-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 9px; font-size: 13px; color: var(--muted); cursor: pointer; background: transparent; transition: background .15s, color .15s; }
.bb-btn:hover, .bb-btn.on { background: var(--soft); color: var(--fg); }
.bb-btn svg { width: 15px; height: 15px; }
.bb-x { width: 22px; height: 22px; border-radius: 6px; color: var(--muted); font-size: 15px; line-height: 1; }
.bb-x:hover { background: var(--soft); color: var(--fg); }
.appr { position: relative; }
.appr.risky .bb-btn { color: #b45309; }
.appr-menu { width: 300px; left: 0; }
.appr-menu .mi { display: grid; grid-template-columns: 22px 1fr 18px; align-items: center; gap: 10px; }
.appr-menu .mi .ok { visibility: hidden; color: #3b82f6; }
.appr-menu .mi.on .ok { visibility: visible; }
.appr-note { margin: 4px 10px 8px; font-size: 12px; color: var(--muted); line-height: 1.4; }

/* v15: NeoBot bar as clean as Claude's — plain text controls, quiet menu */
.bot-bar { gap: 2px; margin-top: 10px; padding: 0 4px; }
.bb-btn { height: 30px; padding: 0 10px; border-radius: 8px; font-size: 14px; color: var(--muted); gap: 0; }
.bb-btn:hover, .appr.open .bb-btn, #folderBtn.on { background: var(--soft); color: var(--fg); }
.appr.risky .bb-btn { color: var(--muted); }
.bb-x { margin-left: -4px; font-size: 14px; }
.appr-menu { width: 260px; padding: 6px; border-radius: 16px; }
.appr-menu .mi { grid-template-columns: 22px 1fr 18px; height: 40px; padding: 0 12px; gap: 12px; font-size: 14.5px; border-radius: 10px; }
.appr-menu .mi svg { width: 18px; height: 18px; }
.appr-menu .mi .ok svg { width: 16px; height: 16px; }
.appr-note { display: none; }
.appr-menu { width: max-content; min-width: 260px; }
.appr-menu .mi span:nth-child(2) { white-space: nowrap; }
.appr-menu .mi .ok, .appr-menu .mi .ok svg { color: #3b82f6; }

/* ---- team mode: who does what ---- */
.team { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px 6px; margin: 2px 0 14px; background: var(--panel); max-width: 640px; }
.team-h { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); padding: 0 2px 8px; }
.team-h svg { width: 15px; height: 15px; }
.team-h span { color: var(--fg); font-weight: 600; }
.team-h em { font-style: normal; margin-left: auto; font-variant-numeric: tabular-nums; }
.team-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-top: 1px solid var(--line); font-size: 13.5px; }
.tr-logo { width: 26px; height: 26px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; flex: none; font-size: 11px; font-weight: 600; }
.tr-logo svg { width: 15px; height: 15px; }
.tr-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tr-main b { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tr-lead { font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--muted); background: var(--soft-2); border-radius: 999px; padding: 1px 7px; flex: none; }
.tr-job { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-thought { color: var(--faint); font-size: 12px; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.tr-job svg { width: 13px; height: 13px; flex: none; }
.tr-st { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; white-space: nowrap; flex: none; font-variant-numeric: tabular-nums; }
.tr-st svg { width: 14px; height: 14px; }
.team-row.done .tr-st { color: #16a34a; }
.team-row.failed .tr-st { color: #dc2626; }
.team-row.running .tr-st { color: var(--fg); }
.tr-spin { width: 11px; height: 11px; border-radius: 50%; border: 1.6px solid var(--line); border-top-color: var(--fg); animation: trspin .8s linear infinite; }
@keyframes trspin { to { transform: rotate(360deg); } }
@media (max-width: 560px) { .tr-job { white-space: normal; } }

/* ---- NeoBot jobs: live card ---- */
.job { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px 8px; background: var(--panel); max-width: 680px; }
.job-h { display: flex; align-items: center; gap: 9px; font-size: 14px; padding-bottom: 8px; flex-wrap: wrap; }
.job-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.job[data-tone="live"] .job-dot { background: #3b82f6; animation: jobpulse 1.6s ease-in-out infinite; }
.job[data-tone="ok"] .job-dot { background: #16a34a; }
.job[data-tone="warn"] .job-dot { background: #d97706; }
.job[data-tone="bad"] .job-dot { background: #dc2626; }
@keyframes jobpulse { 50% { opacity: .35; } }
.job-st { font-weight: 600; }
.job-meta { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.job-meta svg { width: 13px; height: 13px; color: var(--gold, #b8860b); }
.job-eng { border: 1px solid var(--line-2); border-radius: 999px; padding: 0 7px; font-size: 11px; cursor: help; }
.job-act { margin-left: auto; display: inline-flex; gap: 2px; }
.job-act button { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.job-act button:hover { background: var(--soft); color: var(--fg); }
.job-act svg { width: 13px; height: 13px; }
.job-team .team-row:first-child { border-top: 1px solid var(--line); }
/* a team organised like a company (25 Nov 2026): the reviewer of a piece sits under it; one line says how big the team is */
.job-org { font-size: 12px; color: var(--muted); padding: 2px 2px 8px; }
.team-row.sub { padding-left: 30px; border-top: 0; padding-top: 0; }
.team-row.sub .tr-logo { transform: scale(.82); opacity: .8; }
.job-wait { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; padding: 10px 2px; border-top: 1px solid var(--line); }
.job-rev:not(:empty) { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 2px; }
.rev { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 4px 2px; line-height: 1.45; }
.rev svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.rev b { color: var(--fg); font-weight: 550; }
.rev.ok svg { color: #16a34a; }
.ask { border: 1px solid #f3d19c; background: #fffaf0; border-radius: 12px; padding: 10px 12px; margin: 8px 0 4px; font-size: 13.5px; }
.ask > div:first-child { display: flex; align-items: center; gap: 6px; }
.ask svg { width: 15px; height: 15px; color: #d97706; }
.ask pre { margin: 6px 0; font-size: 11.5px; max-height: 120px; overflow: auto; white-space: pre-wrap; color: var(--muted); }
.ask-b { display: flex; justify-content: flex-end; gap: 6px; }
.ask-b button { height: 30px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-2); font-size: 13px; }
.ask-b button.pri { background: var(--fg); color: var(--panel); border-color: var(--fg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ask { background: #2a2214; border-color: #5a4720; } }
:root[data-theme="dark"] .ask { background: #2a2214; border-color: #5a4720; }
.job-msg .arts:not(:empty) { margin-top: 10px; }
.jt-menu { width: 300px; }
.jt-sec { font-size: 11.5px; color: var(--muted); padding: 8px 12px 4px; text-transform: uppercase; letter-spacing: .04em; }
.jt-cmd { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 4px 12px 8px 46px; cursor: pointer; }
.jt-cmd[hidden] { display: none; }
.jt-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 12px; font-size: 14px; }
.jt-row select { border: 1px solid var(--line-2); border-radius: 8px; height: 30px; padding: 0 8px; background: var(--panel); color: var(--fg); font-size: 13.5px; }
.job-ws:not(:empty) { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding: 8px 2px 4px; font-size: 12.5px; color: var(--muted); }
.job-ws svg { width: 14px; height: 14px; }
.job-ws a { margin-left: auto; color: var(--fg); font-weight: 550; text-decoration: none; border: 1px solid var(--line-2); border-radius: 8px; padding: 3px 10px; }
.job-ws a:hover { background: var(--soft); }

/* ================= Settings v3 — calmer cards, one "Plan & usage" page ================= */
.settings-card { height: min(780px, 88vh); }
.set-body { padding: 34px 44px 56px; }
.set-page { max-width: 660px; }
.set-page h2 { font-size: 24px; margin: 0 0 6px; }
.set-page h2 + h3, .set-page h2 + .s-rows, .set-page h2 + .acc-card, .set-page h2 + .mem-hero { margin-top: 22px; }
.set-page h3 { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .01em; margin: 30px 0 10px; }
.s-sub { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 22px; }
.s-sub.tight { margin: -4px 0 0; font-size: 13px; }
.set-page .s-rows { border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; background: var(--panel); }
.set-page .s-row { min-height: 60px; padding: 13px 0; }
.set-page .s-row.col { padding: 16px 0; }
.set-page .s-rows.mem-danger { margin-top: 22px; }
.kbd-rows .s-row { min-height: 48px; padding: 9px 0; }
.s-ok { color: var(--ok); display: grid; } .s-ok svg { width: 20px; height: 20px; }
.set-nav button[hidden], .set-grp[hidden] { display: none; }

/* account */
.acc-card { padding: 18px; border: 1px solid var(--line); background: var(--soft); }
.acc-card .acc-id { flex: 1; min-width: 0; }
.acc-card .acc-id small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-plan { cursor: pointer; border: 1px solid var(--line-2); background: var(--panel); height: 28px; padding: 0 12px; font-size: 12.5px; }
.acc-plan:hover { background: var(--soft-2); }

/* plan hero */
.pl-hero { border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px 24px; background: linear-gradient(160deg, var(--soft) 0%, var(--panel) 62%); }
.pl-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pl-k { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 500; }
.pl-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 4px; }
.pl-name b { font-size: 30px; font-weight: 650; letter-spacing: -.025em; line-height: 1.1; }
.pl-x, .pl-status { font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line-2); color: var(--fg-2); }
.pl-status { background: rgba(220,38,38,.08); border-color: rgba(220,38,38,.25); color: var(--bad); }
.pl-x[hidden], .pl-status[hidden], .pl-reset[hidden] { display: none; }
.pl-meta { display: block; color: var(--muted); font-size: 13.5px; }
.pl-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.pl-acts .btn[hidden] { display: none; }
.pl-meter { display: grid; grid-template-columns: 124px 1fr; gap: 24px; align-items: center; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.pl-ring { position: relative; width: 124px; height: 124px; --rc: var(--blue); }
.pl-ring.warn { --rc: #f59e0b; } .pl-ring.crit { --rc: var(--bad); }
.pl-ring.empty .rv { stroke-width: 0; }
.pl-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pl-ring circle { fill: none; stroke-width: 11; }
.pl-ring .rt { stroke: var(--soft-2); }
.pl-ring .rv { stroke: var(--rc); stroke-linecap: round; transition: stroke-dasharray .8s var(--ease), stroke .3s; }
.pl-ring-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.pl-ring-c b { font-size: 26px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.pl-ring-c small { font-size: 12px; color: var(--muted); margin-top: 4px; }
.pl-head { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.pl-sub { display: block; color: var(--muted); font-size: 13.5px; margin: 3px 0 14px; line-height: 1.45; }
.pl-bar { height: 8px; }
.pl-legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 10px; font-size: 13px; color: var(--muted); }
.pl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pl-legend b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.pl-legend i { width: 8px; height: 8px; border-radius: 50%; }
.pl-legend .dot-used { background: var(--blue); } .pl-legend .dot-left { background: var(--soft-2); box-shadow: 0 0 0 1px var(--line-2) inset; }
.pl-ring.warn ~ .pl-info .dot-used { background: #f59e0b; } .pl-ring.crit ~ .pl-info .dot-used { background: var(--bad); }
.pl-reset { margin-left: auto; color: var(--fg-2); }

/* extra usage */
.ex-chip { font-size: 12.5px; font-weight: 500; padding: 5px 11px; border-radius: 99px; background: rgba(22,163,74,.1); color: var(--ok); white-space: nowrap; }
.ex-chip[hidden] { display: none; }
.packs { margin-top: 12px; }
.pack { position: relative; padding: 16px 16px 14px; border-radius: 14px; background: var(--panel); cursor: pointer; }
.pack b { font-size: 22px; }
.pack small { min-height: 18px; }
.pack span { margin-top: 10px; font-size: 13px; color: var(--fg-2); }
.pack:hover span { color: var(--fg); }
.packs.off .pack { opacity: .55; cursor: not-allowed; }
.u-chart { height: 150px; margin-top: 14px; }

/* billing rows that only make sense with a subscription */
.s-row[hidden] { display: none; }

@media (max-width: 760px) {
  .set-body { padding: 22px 16px 40px; }
  .set-page .s-rows { padding: 0 14px; }
  .pl-hero { padding: 18px 16px; }
  .pl-meter { grid-template-columns: 96px 1fr; gap: 16px; }
  .pl-ring { width: 96px; height: 96px; } .pl-ring-c b { font-size: 21px; }
  .pl-name b { font-size: 26px; }
  .pl-acts { width: 100%; } .pl-acts .btn { flex: 1; }
  .pl-reset { margin-left: 0; width: 100%; }
  .acc-card { flex-wrap: wrap; }
  .set-page .s-row:has(.ex-chip:not([hidden])) { flex-wrap: wrap; gap: 10px; }
}

/* connector card with two actions (Google Drive: choose files + connected) */
.app .app-btns { display: flex; gap: 6px; width: 100%; margin-top: auto; }
.app .app-btns .btn { flex: 1; min-width: 0; }
.app .app-btns .btn-connected { flex: 0 0 auto; width: 44px; padding: 0; }

/* Cooperation panel (the model picker in team mode): who works together, each one's job, who builds the result */
.p-coop-head { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px 4px; }
.p-coop-head[hidden] { display: none; }
.p-coop-head > span:first-child { width: 30px; height: 30px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; flex: none; }
.p-coop-head > span:first-child svg { width: 16px; height: 16px; }
.p-coop-head b { display: block; font-weight: 600; font-size: 14px; }
.p-coop-head small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.picker-card.coop .p-add { opacity: 1; }
.p-roles { display: grid; gap: 6px; margin: 8px 4px 0; max-height: 34vh; overflow: auto; }
.p-roles[hidden] { display: none; }
.pr-row { display: grid; grid-template-columns: 28px minmax(80px, 150px) 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.pr-ic { width: 28px; height: 28px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; }
.pr-ic svg { width: 16px; height: 16px; }
.pr-nm { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-in { min-width: 0; height: 32px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 10px; background: var(--shell); color: var(--fg); font: inherit; font-size: 13px; }
.pr-in:focus { outline: none; border-color: var(--fg-2); }
.pr-lead { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.pr-lead input { accent-color: var(--fg); margin: 0; }
@media (max-width: 560px) {
  .pr-row { grid-template-columns: 28px 1fr auto; }
  .pr-in { grid-column: 1 / -1; }
}

/* Sidebar chats: date groups, a ⋯ menu you can always reach, rename in place, delete with a confirmation */
.cv-day { margin: 14px 0 2px; padding: 0 12px; font-size: 12px; font-weight: 500; color: var(--faint); letter-spacing: .01em; }
.side-chats .cv-day:first-child { margin-top: 2px; }
.conv { position: relative; transition: background .15s, opacity .18s, transform .18s; }
.conv:hover { background: transparent; color: var(--fg-2); }
@media (hover: hover) { .conv:hover { background: var(--soft-2); color: var(--fg); } }
.conv.on { background: var(--soft-2); color: var(--fg); }
.conv .dots { flex: none; }
.conv.on .dots { opacity: .7; }
@media (hover: none) { .conv .dots { opacity: .55; } }
.conv .dots.open { opacity: 1; background: var(--line-2); }
.conv.leaving { opacity: 0; transform: translateX(-10px); pointer-events: none; }
.cv-in { flex: 1; min-width: 0; height: 28px; margin-left: -6px; padding: 0 6px; border: 1px solid var(--fg-2); border-radius: 8px; background: var(--panel); color: var(--fg); font: inherit; font-size: 14px; }
.cv-in:focus { outline: none; box-shadow: 0 0 0 3px var(--soft-2); }
.conv-menu { min-width: 230px; }
.mi-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.cm-ask { display: grid; gap: 4px; padding: 10px 10px 8px; max-width: 250px; }
.cm-ask b { font-size: 14px; font-weight: 600; }
.cm-ask small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-ask-b { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
#chatTitle { cursor: pointer; border-radius: 8px; padding: 4px 8px; transition: background .15s; }
#chatTitle:empty { display: none; }
@media (hover: hover) { #chatTitle:hover { background: var(--soft-2); } }

/* phones/tablets: the sidebar is an off-canvas drawer, so the main column takes the whole width
   (".shell { grid-template-columns: 260px 1fr }" and ".side-mini .shell { 52px 1fr }" above are unconditional
   and overrode the max-width: 900px rule, squeezing the chat into a 260px / 52px column) */
@media (max-width: 900px) { .shell, .side-mini .shell { grid-template-columns: 1fr; } }
/* a long live label (the model's latest thought) must ellipsize, not widen the whole thread on a phone */
.msg.ai, .ai-body, .think { min-width: 0; max-width: 100%; }
.think-head { min-width: 0; }
.think-head b { min-width: 0; flex: 0 1 auto; }
.think-head .t-time, .think-head .live-ic { flex: none; }

/* Settings -> Notifications: why the switch is off */
.s-row small.n-hint { display: block; color: var(--bad); margin-top: 4px; }

/* "System" theme on a dark computer: the same tweaks as the explicit Dark theme */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .keybanner { background: #2a2414; color: #f1d27a; }
  :root:not([data-theme="light"]) .chip { background: var(--soft); }
  :root:not([data-theme="light"]) .composer { background: #303030; box-shadow: none; }
  :root:not([data-theme="light"]) .accents button[data-a="default"] { --c: #ececec !important; }
  :root:not([data-theme="light"]) .mode-seg { background: #262626; }
  :root:not([data-theme="light"]) .mode-seg button.on { background: #3a3a3a; }
  :root:not([data-theme="light"]) .side-mini .side { border-right-color: #2a2a2a; }
  :root:not([data-theme="light"]) .side-mini .side-nav a:hover, :root:not([data-theme="light"]) .side-mini .side-nav a.on { background: #2a2a2a; }
  :root:not([data-theme="light"]) .ask { background: #2a2214; border-color: #5a4720; }
}

/* Settings -> Billing */
.bl-card { border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; background: linear-gradient(160deg, var(--soft) 0%, var(--panel) 62%); margin-bottom: 14px; }
.bl-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.bl-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.bl-facts[hidden], .s-rows[hidden], .s-row[hidden] { display: none; }
.bl-facts small { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.bl-facts b { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.bl-inv td { vertical-align: middle; }
.bl-inv td:nth-child(2) { white-space: normal; min-width: 160px; }
.bl-inv td small { font-size: 12px; white-space: nowrap; }
.inv-st { font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--fg-2); white-space: nowrap; }
.inv-st.paid { color: #15803d; background: rgba(34,197,94,.12); }
.inv-st.open, .inv-st.uncollectible { color: #b45309; background: rgba(245,158,11,.14); }
.inv-links { white-space: nowrap; text-align: right; }
.inv-links a { margin-left: 10px; font-weight: 500; }
@media (max-width: 700px) {
  .bl-card { padding: 18px 16px; }
  .bl-facts { grid-template-columns: 1fr 1fr; }
  .bl-facts > div:last-child { grid-column: 1 / -1; }
  /* invoices as stacked cards on a phone: date + amount, description, status + links */
  .bl-inv { border: 0; overflow: visible; }
  .bl-inv .tbl, .bl-inv tbody { display: block; }
  .bl-inv tr:first-child:has(th) { display: none; }
  .bl-inv tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; }
  .bl-inv td { padding: 0; border: 0 !important; }
  .bl-inv td:nth-child(1) { color: var(--muted); }
  .bl-inv td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; min-width: 0; }
  .bl-inv td:nth-child(3) { grid-column: 2; grid-row: 1; font-weight: 600; text-align: right; }
  .bl-inv td:nth-child(4) { grid-row: 3; }
  .bl-inv td:nth-child(5) { grid-row: 3; grid-column: 2; }
  .bl-inv td.muted { grid-column: 1 / -1; }
  .bl-top .pl-acts { width: 100%; } .bl-top .pl-acts .btn { flex: 1; }
}  /* end of the phone layout for Billing: it was never closed, so on a computer the "out of usage" window below had no styles */
/* Out of usage: a plan or extra usage, never a dead end.
   One calm card: a ring that shows the usage is spent, a short title, three plan cards (the suggested one raised),
   usage picked with a segmented control, what every plan includes, then extra usage (paying customers only). */
.lm-modal { place-items: center; padding: 16px; background: rgba(16,16,14,.42); backdrop-filter: blur(6px) saturate(1.1); -webkit-backdrop-filter: blur(6px) saturate(1.1); }
.limit-card { position: relative; width: min(860px, 100%); padding: 34px 32px 22px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; border-radius: 28px; overscroll-behavior: contain; scrollbar-width: thin; }
.lm-x { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: background .15s, color .15s; z-index: 1; }
.lm-x:hover { background: var(--soft-2); color: var(--fg); }
.lm-x svg { width: 16px; height: 16px; }
.lm-hero { display: grid; justify-items: center; text-align: center; gap: 0; padding: 0 28px; }
.lm-ring { position: relative; width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 16px; }
.lm-ring > svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.lm-ring circle { fill: none; stroke-width: 3.2; }
.lm-ring-bg { stroke: var(--soft-2); }
.lm-ring-fg { stroke: var(--fg); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p, 100)); animation: lm-ring .9s var(--ease) both; }
@keyframes lm-ring { from { stroke-dashoffset: 100; } }
.lm-ring [data-icon] { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; }
.lm-ring [data-icon] svg { width: 19px; height: 19px; }
.lm-hero h2 { font-size: 24px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; margin: 0 0 8px; text-wrap: balance; }
.lm-hero p { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0; max-width: 480px; text-wrap: pretty; }
.lm-reset { margin-top: 12px; font-size: 12.5px; color: var(--fg-2); background: var(--soft); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; }
.lm-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; align-items: stretch; }
.lm-plans[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 580px; margin-left: auto; margin-right: auto; }
.lm-plans[data-n="1"] { grid-template-columns: minmax(0, 300px); justify-content: center; }
.lm-plan { position: relative; display: flex; flex-direction: column; gap: 0; padding: 20px 18px 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.lm-plan:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.lm-plan.rec { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg), var(--shadow); }
.lm-pn { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.lm-pn b { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.lm-badge { font-size: 11px; font-weight: 600; letter-spacing: .01em; padding: 3px 9px; border-radius: 99px; background: var(--dark); color: var(--on-dark); white-space: nowrap; }
.lm-tag { margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.4; min-height: 18px; }
.lm-price { display: flex; align-items: flex-end; gap: 6px; margin: 18px 0 14px; }
.lm-price i { font-style: normal; font-size: 34px; font-weight: 600; letter-spacing: -.035em; line-height: 1; color: var(--fg); font-variant-numeric: tabular-nums; }
.lm-price span { font-size: 11.5px; line-height: 1.25; color: var(--muted); padding-bottom: 2px; }
.lm-use { display: grid; gap: 8px; margin-bottom: 16px; }
.lm-x-lbl { font-size: 13px; font-weight: 500; color: var(--fg-2); }
.lm-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.lm-seg button { height: 30px; border-radius: 9px; font-size: 13px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; transition: background .15s, color .15s, box-shadow .15s; }
.lm-seg button:hover { color: var(--fg); }
.lm-seg button.on { background: var(--panel); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--line-2); }
.lm-go { margin-top: auto; width: 100%; height: 44px; justify-content: center; border-radius: 12px; font-size: 14.5px; font-weight: 500; }
.lm-go.busy { opacity: .6; pointer-events: none; }
.lm-feats { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 22px 0 0; padding: 0; font-size: 13px; color: var(--fg-2); }
.lm-feats li { display: inline-flex; align-items: center; gap: 6px; }
.lm-feats [data-icon] svg { width: 14px; height: 14px; color: var(--ok); }
.lm-extra { margin-top: 24px; }
.lm-or { display: flex; align-items: center; gap: 12px; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-bottom: 12px; }
.lm-or::before, .lm-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lm-packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lm-pack { display: grid; gap: 2px; text-align: left; padding: 13px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); transition: border-color .15s, background .15s, transform .15s var(--ease); }
.lm-pack:hover { border-color: var(--fg); background: var(--soft); }
.lm-pack:active { transform: scale(.98); }
.lm-pack b { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.lm-pack small { font-size: 12.5px; color: var(--muted); }
.lm-note { margin: 10px 0 0; text-align: center; font-size: 12px; color: var(--faint); }
.lm-none { color: var(--muted); font-size: 14px; margin: 0; text-align: center; grid-column: 1 / -1; }
.lm-foot { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.lm-foot [data-icon] svg { width: 14px; height: 14px; }
@media (max-width: 760px) {
  .lm-modal { place-items: end center; padding: 0; }
  .limit-card { width: 100%; border-radius: 26px 26px 0 0; padding: 30px 18px calc(16px + env(safe-area-inset-bottom)); max-height: 92vh; max-height: 92dvh; animation: lm-up .38s var(--ease); }
  @keyframes lm-up { from { transform: translateY(40px); opacity: 0; } }
  .lm-hero { padding: 0 20px; }
  .lm-hero h2 { font-size: 21px; }
  .lm-hero p { font-size: 14px; }
  .lm-ring { width: 48px; height: 48px; margin-bottom: 12px; }
  .lm-plans, .lm-plans[data-n="2"], .lm-plans[data-n="1"] { grid-template-columns: 1fr; gap: 10px; margin-top: 22px; max-width: none; }
  .lm-plan { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "n p" "t p" "u u" "g g"; column-gap: 12px; padding: 16px; }
  .lm-pn { grid-area: n; justify-content: flex-start; }
  .lm-tag { grid-area: t; margin-top: 2px; }
  .lm-price { grid-area: p; margin: 0; align-self: start; }
  .lm-price i { font-size: 28px; }
  .lm-use { grid-area: u; margin: 14px 0 12px; grid-template-columns: auto 1fr; align-items: center; gap: 12px; }
  .lm-go { grid-area: g; height: 42px; }
  .lm-feats { gap: 6px 14px; font-size: 12.5px; margin-top: 18px; }
  .lm-packs { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .lm-pack { padding: 11px 12px; }
  .lm-pack b { font-size: 16px; }
  .lm-pack small { font-size: 11.5px; }
}

/* Sidebar chat rows never grow wider than the sidebar: long titles end in "…" and the ⋯ button stays in view
   (before, a long title made the list scroll sideways and opening a chat's menu shifted every title out of view). */
.side-chats, .side-pins { grid-template-columns: minmax(0, 1fr); overflow-x: hidden; }
.conv { min-width: 0; }
.conv > span, .conv .cv-t { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.conv .cv-in { flex: 1 1 auto; min-width: 0; }

/* Free plan (no paid plan): level Low and $ models only. The rest is shown, locked, and opens the plans. */
.lp-up { display: none; }
#tiers.free .lp-up { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 10px; padding: 9px 10px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); font-size: 12.5px; line-height: 1.35; color: var(--muted); text-align: left; transition: border-color .15s, color .15s; }
#tiers.free .lp-up:hover { border-color: var(--fg-2); color: var(--fg-2); }
#tiers.free .lp-up b { color: var(--fg); font-weight: 600; }
#tiers.free .lp-up [data-icon] svg { width: 14px; height: 14px; }
#tiers.free .lp-ends [data-tier="medium"], #tiers.free .lp-ends [data-tier="high"] { opacity: .45; }
#tiers.free .lp-stop[data-i="1"], #tiers.free .lp-stop[data-i="2"] { opacity: .4; }
.p-item.locked { cursor: pointer; }
.p-item.locked .p-ic, .p-item.locked .p-txt { opacity: .5; }
.p-item.locked:hover .p-ic, .p-item.locked:hover .p-txt { opacity: .75; }
.p-lock { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 99px; background: var(--soft-2); color: var(--fg-2); font-size: 11.5px; font-weight: 500; }
.p-lock svg { width: 12px; height: 12px; }
.p-free { display: flex; align-items: center; gap: 12px; width: 100%; margin: 2px 0 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--soft); text-align: left; transition: border-color .15s; }
.p-free:hover { border-color: var(--fg-2); }
.pf-ic { width: 32px; height: 32px; border-radius: 10px; background: var(--panel); display: grid; place-items: center; flex: none; border: 1px solid var(--line); }
.pf-ic svg { width: 15px; height: 15px; }
.pf-t { display: grid; gap: 1px; flex: 1; min-width: 0; }
.pf-t b { font-size: 13.5px; font-weight: 600; }
.pf-t small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.pf-go { flex: none; height: 30px; padding: 0 12px; border-radius: 9px; background: var(--dark); color: var(--on-dark); font-size: 12.5px; font-weight: 500; display: inline-flex; align-items: center; }

/* the chat's title (a short summary, not the first words typed) sits in the middle of the top bar */
.chat-top { position: relative; }
.chat-title { position: absolute; left: 50%; transform: translateX(-50%); margin-left: 0; max-width: min(44%, 520px); text-align: center; }

/* nothing to show (NeoAI on Low answers straight away): no empty line under the header, no chevron */
.think.open .think-body:not(:has(.think-steps > *)):not(:has(.think-text:not([hidden]):not(:empty))) { display: none; }
.think:not(.live):not(:has(.think-steps > *)):not(:has(.think-text:not([hidden]):not(:empty))) .chev { display: none; }

/* Chat titles use the whole row, like Claude's list (20 Oct 2026): on a computer the ⋯ button floats over the end of
   the title, with a short fade, only while it shows (hover, open chat, open menu), instead of always keeping its own
   space. Touch screens keep it in the row. */
@media (hover: hover) {
  .conv { padding-right: 8px; }
  .conv .dots { position: absolute; right: 5px; top: 5px; background: var(--soft-2); }
  .conv .dots::before { content: ""; position: absolute; top: 0; bottom: 0; right: 100%; width: 20px; pointer-events: none;
    background: linear-gradient(to right, transparent, var(--soft-2)); }
  .conv .dots:hover, .conv .dots.open { background: var(--line-2); }
}

/* "GPT-6.1 Sol · image with GPT Image 2": who made the image a picked chat model asked for (20 Oct 2026) */
.think-head .h-media { font-weight: 400; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.think-head .h-media b { font-weight: 500; color: var(--fg-2); }

/* ===== 21 Oct 2026: scrollbars, moving between chats, "scroll to bottom" arrow ===== */
/* Scrollbars: one thin, quiet style everywhere (Safari, Chrome, Firefox), a little darker under the pointer,
   kept clear of rounded corners. They replace the thick dark system bar that sat on the Settings card's edge. */
:root { --sb: rgba(0,0,0,.16); --sb-hover: rgba(0,0,0,.34); }
:root[data-theme="dark"] { --sb: rgba(255,255,255,.17); --sb-hover: rgba(255,255,255,.36); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sb: rgba(255,255,255,.17); --sb-hover: rgba(255,255,255,.36); } }
@supports selector(::-webkit-scrollbar) {
  .side-chats, .think-text, .limit-card { scrollbar-width: auto; }  /* so Chrome uses the same style as Safari */
  ::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
  ::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
  ::-webkit-scrollbar-thumb { background-color: var(--sb); background-clip: padding-box; border: 3px solid transparent; border-radius: 999px; min-height: 40px; min-width: 40px; }
  ::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active { background-color: var(--sb-hover); border-width: 2px; }
  ::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
  /* inside rounded cards the bar starts and ends where the corners stop curving */
  .set-body::-webkit-scrollbar-track, .set-nav::-webkit-scrollbar-track { margin: 20px 0; }
  .limit-card::-webkit-scrollbar-track { margin: 26px 0; }
  .think-text::-webkit-scrollbar-track, .p-roles::-webkit-scrollbar-track, .s-list::-webkit-scrollbar-track { margin: 6px 0; }
  /* chat list: the bar lives in the sidebar's own margin, so rows keep their full width and line up with the menu above */
  @supports (scrollbar-gutter: stable) { .side-chats { margin-right: -8px; padding-right: 0; scrollbar-gutter: stable; } }
  .side-chats::-webkit-scrollbar { width: 8px; }
  .side-chats::-webkit-scrollbar-thumb { border-width: 2px; }
  /* the thread keeps the same centre whether or not it scrolls (no sideways nudge when a chat gets long) */
  #view-chat.has-msgs .thread-wrap { scrollbar-gutter: stable both-edges; }
  .p-row::-webkit-scrollbar, .chip-row::-webkit-scrollbar { display: none; }
  @media (max-width: 760px) { .set-nav::-webkit-scrollbar { display: none; } }
}
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: var(--sb) transparent; }
}

/* the thread scrolls itself (glides with easing in app.js); the browser's own smooth scroll fought every frame of it */
.thread-wrap { scroll-behavior: auto; overscroll-behavior-y: contain; }
/* a chat that opens appears in one piece (app.js fades the whole thread); only new messages rise in */
.msg.still, .art.still { animation: none; }
/* a slow chat load dims the chat you are leaving instead of freezing on it */
.thread-wrap .thread { transition: opacity .2s ease; }
.thread-wrap.switching .thread { opacity: .4; }
/* a new chat slides into the sidebar list */
.conv.enter { animation: convIn .32s var(--ease); }
@keyframes convIn { from { opacity: 0; transform: translateY(-6px); } }
.chat-title { transition: color .2s; }

/* "Scroll to bottom": a round arrow just above the box while you read higher up in a chat */
.dock { position: relative; }
.jump { position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 6; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: var(--fg); background: var(--panel); border: 1px solid var(--line-2);
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 18px rgba(0,0,0,.08); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translate(-50%, 8px) scale(.92); pointer-events: none;
  transition: opacity .2s ease, transform .28s var(--ease), visibility 0s linear .28s, background .15s, border-color .15s; }
.jump.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); pointer-events: auto;
  transition: opacity .2s ease, transform .28s var(--ease), visibility 0s, background .15s, border-color .15s; }
.jump:hover { background: var(--soft); }
.jump:active { transform: translate(-50%, 0) scale(.94); }
.jump:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.jump svg { width: 18px; height: 18px; }
:root[data-theme="dark"] .jump { background: #303030; border-color: #444; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
:root[data-theme="dark"] .jump:hover { background: #3a3a3a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .jump { background: #303030; border-color: #444; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
  :root:not([data-theme="light"]) .jump:hover { background: #3a3a3a; } }
#view-chat:not(.has-msgs) .jump { display: none; }
@media (max-width: 760px) { .jump { width: 38px; height: 38px; } }
/* text fades out just above the box instead of being cut by its edge (only the reading column, not the scrollbar) */
#view-chat { --chat-bg: var(--panel); }
.temp-on #view-chat { --chat-bg: var(--shell); }
#view-chat.has-msgs .dock::before { content: ""; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); width: min(816px, calc(100% - 24px));
  height: 22px; background: linear-gradient(to bottom, transparent, var(--chat-bg)); pointer-events: none; }

/* ===== a warmer chat (24 Oct): greeting with Neo's mark, ideas to start under the box, follow-up ideas under the latest answer ===== */
.hello-row { display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 100%; }
.hello-mark { width: 30px; height: 30px; flex: none; display: grid; place-items: center; color: var(--fg); animation: rise .8s var(--ease); }
.hello-mark .mark, .hello-mark svg { width: 28px; height: 28px; }
.hello-mark:empty { display: none; }
.temp-on .hello-mark { display: none; }
@media (max-width: 600px) { .hello-mark { width: 24px; height: 24px; } .hello-mark .mark, .hello-mark svg { width: 22px; height: 22px; } .hello h1 { font-size: 24px; } }

/* ideas to start: a quiet list under the box (like ChatGPT); typing hides it without moving the box */
.starters { max-width: 768px; margin: 6px auto 0; padding: 0 4px; display: grid; justify-items: start; gap: 2px;
  transition: opacity .2s ease, visibility 0s linear 0s; }
#view-chat.has-msgs .starters { display: none; }
#view-chat:has(.input-wrap.typing) .starters, #view-chat:has(.attach-row:not([hidden])) .starters { opacity: 0; visibility: hidden; transition: opacity .15s ease, visibility 0s linear .15s; }
.st { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; min-height: 42px; padding: 0 14px; border-radius: 12px;
  color: var(--muted); font-size: 15px; text-align: left; transition: background .18s, color .18s; }
.st svg { width: 18px; height: 18px; flex: none; }
.st span { white-space: nowrap; }
.st:hover, .st:focus-visible { background: var(--soft); color: var(--fg); }
.st-back em { font-style: normal; color: var(--faint); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: -6px; }
.st-back em::before { content: "· "; }
.st-back:hover em { color: var(--muted); }
@media (max-width: 600px) { .st { min-height: 40px; font-size: 14.5px; padding: 0 12px; } }
@media (max-height: 640px) { .st-back { display: none; } }

/* follow-up ideas: two or three soft chips under the latest answer, one tap sends them */
.follow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.fu { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 36px; padding: 7px 14px 7px 11px; border-radius: 18px;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--fg-2); font-size: 14px; line-height: 1.35; text-align: left;
  transition: background .18s, color .18s, border-color .18s, transform .18s var(--ease);
  animation: fuIn .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 60ms); }
.fu svg { width: 15px; height: 15px; flex: none; color: var(--faint); transition: color .18s; }
.fu:hover { background: var(--soft); color: var(--fg); }
.fu:hover svg { color: var(--fg-2); }
.fu:active { transform: scale(.98); }
.follow.still .fu { animation: none; }
@keyframes fuIn { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .fu, .hello-mark { animation: none; } }
:root[data-theme="dark"] .fu { background: transparent; border-color: #3a3a37; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fu { background: transparent; border-color: #3a3a37; } }

/* ===== Settings, fuller (24 Oct): text size, personality, devices, your data ===== */
#sizeSeg button, #lenSeg button { width: auto; min-width: 0; padding: 0 12px; }
:root[data-size="small"] .md, :root[data-size="small"] .msg.user .bubble { font-size: 14.5px; }
:root[data-size="large"] .md, :root[data-size="large"] .msg.user .bubble { font-size: 17.5px; }
:root[data-size="large"] .md { line-height: 1.7; }
.s-help { color: var(--faint); font-size: 12.5px; line-height: 1.4; }
.s-row.col .s-help { margin-top: -2px; }
textarea.field { height: auto; min-height: 96px; padding: 12px 16px; line-height: 1.5; resize: vertical; font: inherit; font-size: 15px; }
.acc-since { display: block; margin-top: 1px; }
.style-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.style-chips button { height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--line-2); color: var(--fg-2); font-size: 14px; transition: background .18s, border-color .18s, color .18s; }
.style-chips button:hover { background: var(--soft); }
.style-chips button.on { background: var(--fg); border-color: var(--fg); color: var(--panel); }
.sess-list { display: grid; gap: 2px; }
.sess { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.sess-ic { width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--soft); display: grid; place-items: center; color: var(--fg-2); }
.sess-ic svg { width: 17px; height: 17px; }
.sess-t { flex: 1; min-width: 0; display: grid; }
.sess-t b { font-weight: 500; font-size: 14.5px; }
.sess-t small { color: var(--muted); font-size: 12.5px; }
.sess-cur { color: var(--ok); font-weight: 500; }
.data-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 14px; }
.data-stats > div { padding: 14px 16px; border-radius: 16px; background: var(--soft); }
.data-stats b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.data-stats small { color: var(--muted); font-size: 12.5px; }
@media (max-width: 640px) { .data-stats { grid-template-columns: repeat(2, 1fr); } .style-chips button { height: 34px; padding: 0 12px; font-size: 13.5px; } }
/* an empty table's one line ("No invoices yet...") wraps on a phone instead of running off the edge */
.tbl td.tbl-empty { white-space: normal; line-height: 1.45; }
.acc-card .acc-id small.acc-since { white-space: normal; overflow: visible; text-overflow: clip; }

/* ===== memory you can see (24 Oct): "Memory updated" under an answer, kinds on the Memory page ===== */
.mem-note { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding: 8px 10px 8px 9px; max-width: 100%;
  border: 1px solid var(--line); border-radius: 12px; background: var(--soft); font-size: 13px; color: var(--muted); animation: fade .3s ease; }
.mem-note .mn-ic { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--panel); color: var(--fg-2); flex: none; }
.mem-note .mn-ic svg { width: 14px; height: 14px; }
.mem-note b { color: var(--fg-2); font-weight: 500; }
.mem-note .mn-f { flex: 1 1 200px; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mem-note .mn-go { font-size: 12.5px; color: var(--fg-2); padding: 3px 9px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); }
.mem-note .mn-go:hover { background: var(--soft-2); }
@media (max-width: 600px) { .mem-note .mn-f { white-space: normal; flex-basis: 100%; order: 3; } }
.mem-kind { font-style: normal; display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 6px; background: var(--soft); color: var(--fg-2); font-size: 11.5px; }
.mem-kind.k-taste { background: color-mix(in srgb, #ec4899 12%, var(--soft)); }
.mem-kind.k-style { background: color-mix(in srgb, #2f7cf6 12%, var(--soft)); }
.mem-kind.k-work { background: color-mix(in srgb, #16a34a 12%, var(--soft)); }
.mem-kind.k-plan { background: color-mix(in srgb, #f97316 12%, var(--soft)); }

/* ===== 28 Oct 2026: Claude's project features in NeoAI's own ChatGPT look (same type, colours and sizes as the rest) =====
   sidebar Projects section (New project, pinned and open projects with their chats), Search chats in the menu, projects
   list with search / sort / descriptions, a project page with four cards (Instructions, Files, Memory, Scheduled), the
   New project window with a description and files, tasks with their project, cleaner tables and code in answers. */

/* sidebar: everything under the menu scrolls as one list (Projects, Pinned, Chats) */
.side-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; margin: 0 -2px; padding: 0 2px; scrollbar-width: thin; }
.side-scroll .side-chats { flex: none; overflow: visible; margin: 0; padding: 0; min-height: auto; scrollbar-gutter: auto; }
.side-scroll .side-pins { margin: 0; padding: 0; }
.side-scroll > .side-sec { flex: none; }
.side-scroll > .side-sec:first-child { margin-top: 14px; }
@supports selector(::-webkit-scrollbar) {
  .side-scroll { scrollbar-width: auto; }
  @supports (scrollbar-gutter: stable) { .side-scroll { margin-right: -8px; padding-right: 0; scrollbar-gutter: stable; } }
  .side-scroll::-webkit-scrollbar { width: 8px; }
  .side-scroll::-webkit-scrollbar-thumb { border-width: 2px; }
}
.side-mini .side-scroll { display: none; }
@media (max-width: 900px) { .side-mini .side-scroll { display: flex; } }
.side-nav button kbd { margin-left: auto; opacity: 0; transition: opacity .2s; }
.side-nav button:hover kbd { opacity: 1; }
.side-mini #searchBtn { display: flex; }
.side-mini .side-nav button > em, .side-mini .side-nav button > kbd { display: none !important; }
/* Projects section */
.side-projs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; }
.side-projs.closed { display: none; }
.sp-new, .sp-more, .sp-row { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 6px 0 10px; border-radius: 10px; font-size: 14px; color: var(--fg-2); text-align: left; cursor: pointer; min-width: 0; transition: background .15s; }
.sp-new:hover, .sp-more:hover, .side-proj.on > .sp-row { background: var(--soft-2); color: var(--fg); }
@media (hover: hover) { .sp-row:hover { background: var(--soft-2); color: var(--fg); } }
.sp-new svg, .sp-more svg, .sp-ic svg { width: 18px; height: 18px; flex: none; }
.sp-ic { display: grid; place-items: center; flex: none; background: none !important; }
.sp-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sp-pin { display: grid; place-items: center; color: var(--faint); }
.sp-pin svg { width: 13px; height: 13px; }
.sp-tog, .sp-row .dots { flex: none; width: 26px; height: 26px; border-radius: 8px; display: none; place-items: center; color: var(--muted); transition: background .15s; }
.sp-row:hover .sp-tog, .sp-row:hover .dots, .sp-row .dots.open, .sp-row:focus-within .dots { display: grid; }
.sp-row:hover .sp-pin { display: none; }
@media (hover: none) { .sp-row .dots { display: grid; opacity: .55; } }
.sp-tog:hover, .sp-row .dots:hover { background: var(--line-2); }
.sp-tog svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.side-proj.open .sp-tog svg { transform: rotate(90deg); }
.sp-row .dots svg { width: 16px; height: 16px; }
.sp-chats { display: none; grid-template-columns: minmax(0, 1fr); gap: 1px; padding: 1px 0 4px 28px; }
.side-proj.open .sp-chats { display: grid; }
.sp-chats .conv { height: 32px; font-size: 13.5px; color: var(--muted); padding-left: 10px; }
.sp-chats .conv.on, .sp-chats .conv:hover { color: var(--fg); }
.sp-all { justify-self: start; height: 28px; padding: 0 10px; border-radius: 8px; font-size: 13px; color: var(--faint); }
.sp-all:hover { color: var(--fg); background: var(--soft-2); }

/* answers: tables with quiet row lines, dividers, code with a Copy button */
.md .tbl-wrap { overflow-x: auto; margin: 0 0 16px; scrollbar-width: thin; }
.md .tbl-wrap table { display: table; margin: 0; min-width: 60%; border-collapse: collapse; font-size: 14.5px; }
.md .tbl-wrap th, .md .tbl-wrap td { border: 0; border-bottom: 1px solid var(--line); padding: 8px 14px 8px 0; text-align: left; vertical-align: top; }
.md .tbl-wrap th { background: none; font-weight: 600; border-bottom-color: var(--line-2); white-space: nowrap; }
.md .tbl-wrap tr:last-child td { border-bottom: 0; }
.md hr { border: 0; height: 1px; background: var(--line); margin: 24px 0; }
.md pre code { font: inherit; padding: 0; border-radius: 0; background: none; color: inherit; }
.codeblock { background: #f9f9f9; color: #0d0d0d; border-radius: 16px; }
.cb-head { padding: 8px 10px 4px 16px; border-bottom: 0; font: 12px var(--font); color: #5d5d5d; }
.cb-head button { display: inline-flex; align-items: center; gap: 6px; font: 12px var(--font); color: #5d5d5d; padding: 4px 8px; border-radius: 8px; }
.cb-head button svg { width: 14px; height: 14px; }
.cb-head button:hover { background: rgba(0,0,0,.05); color: #0d0d0d; }
.codeblock pre { padding: 8px 16px 16px; }
:root[data-theme="dark"] .codeblock { background: #171717; color: #ececec; } :root[data-theme="dark"] .cb-head, :root[data-theme="dark"] .cb-head button { color: #afafaf; }
:root[data-theme="dark"] .cb-head button:hover { background: rgba(255,255,255,.08); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .codeblock { background: #171717; color: #ececec; }
  :root:not([data-theme="light"]) .cb-head, :root:not([data-theme="light"]) .cb-head button { color: #afafaf; }
  :root:not([data-theme="light"]) .cb-head button:hover { background: rgba(255,255,255,.08); color: #fff; } }

/* projects list */
.proj-bar { margin: 0 0 18px; justify-content: flex-start; }
.proj-search { display: flex; align-items: center; gap: 8px; flex: 1; max-width: 420px; min-width: 0; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.proj-search svg { width: 17px; height: 17px; flex: none; }
.proj-search input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: none; font-size: 15px; color: var(--fg); }
.proj { position: relative; }
.pc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.proj .pc-top .p-emb { margin: 0; }
.pc-pin { display: grid; place-items: center; color: var(--faint); }
.pc-pin svg { width: 15px; height: 15px; }
.proj .dots { margin-left: auto; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); opacity: 0; transition: opacity .15s, background .15s; }
.proj:hover .dots, .proj .dots.open { opacity: 1; }
@media (hover: none) { .proj .dots { opacity: .6; } }
.proj .dots:hover { background: var(--soft-2); color: var(--fg); }
.proj .dots svg { width: 17px; height: 17px; }
.pc-desc { margin: 0 0 2px; font-size: 14px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-none { color: var(--muted); font-size: 14.5px; padding: 10px 2px; grid-column: 1 / -1; }

/* one project: description, the box, four cards, chats, files */
.p-desc-txt { margin: -10px 0 20px 70px; max-width: 72ch; color: var(--muted); font-size: 15px; line-height: 1.55; white-space: pre-wrap; }
.p-desc-add { margin: -12px 0 18px 70px; font-size: 14px; color: var(--faint); }
.p-desc-add:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.composer-proj .c-line { align-items: center; }
.composer-proj label.c-btn { cursor: pointer; }
#pPin.on { color: var(--fg); background: var(--soft-2); }
#pPin.on svg { fill: currentColor; }
.p-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 6px; }
.p-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 16px 16px; border-radius: 18px; background: var(--soft); }
.pc-h { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.pc-h > [data-icon] svg { width: 17px; height: 17px; color: var(--fg-2); }
.pc-h b { font-weight: 500; font-size: 15px; }
.pc-h small { font-size: 12.5px; color: var(--muted); background: var(--panel); border-radius: 999px; padding: 0 7px; line-height: 20px; font-variant-numeric: tabular-nums; }
.pc-h small:empty { display: none; }
.pc-act { margin-left: auto; height: 30px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 999px; font-size: 13.5px; font-weight: 500; background: var(--panel); color: var(--fg); cursor: pointer; transition: background .15s; }
.pc-act:hover { background: var(--soft-2); }
.pc-help { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.p-card .p-instr { padding: 0; background: none; border-radius: 0; font-size: 13.5px; line-height: 1.45; color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pc-tasks { display: grid; gap: 2px; }
.pt { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: center; padding: 5px 6px; margin: 0 -6px; border-radius: 10px; text-align: left; }
.pt:hover { background: var(--soft-2); }
.pt .status { grid-row: span 2; width: 8px; height: 8px; }
.pt b { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-chat b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-chat .dots { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); opacity: 0; flex: none; }
.p-chat:hover .dots, .p-chat .dots.open { opacity: 1; }
@media (hover: none) { .p-chat .dots { opacity: .6; } }
.p-chat .dots:hover { background: var(--soft-2); }
.p-chat .dots svg { width: 16px; height: 16px; }
.add-tile { display: grid; place-items: center; min-height: 150px; color: var(--muted); cursor: pointer; }
.add-tile > span { display: grid; justify-items: center; gap: 6px; }
.add-tile svg { width: 22px; height: 22px; }
@media (max-width: 1100px) { .p-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .p-cards { grid-template-columns: minmax(0, 1fr); }
  .p-desc-txt, .p-desc-add { margin-left: 0; margin-top: -6px; }
  #view-project .pg-head { flex-wrap: wrap; gap: 10px; }
  #view-project .ph-title { flex: 1 1 100%; min-width: 0; }
  #view-project .ph-title .p-emb { width: 44px; height: 44px; }
  #view-project .ph-title h1 { font-size: 26px; overflow-wrap: break-word; }
}

/* windows: New project (description, files), instructions, project memory, task's project */
.p-desc-f { min-height: 66px; }
.ctx-blk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ctx-blk[hidden] { display: none; }
.ctx-files { display: flex; flex-wrap: wrap; gap: 6px; }
.ctx-files:empty { display: none; }
.ctx-f { display: inline-flex; align-items: center; gap: 7px; max-width: 240px; height: 34px; padding: 0 4px 0 10px; border-radius: 999px; background: var(--soft); font-size: 13.5px; }
.ctx-f svg { width: 14px; height: 14px; color: var(--muted); flex: none; }
.ctx-f b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-f button { width: 24px; height: 24px; border-radius: 50%; color: var(--muted); font-size: 15px; line-height: 1; }
.ctx-f button:hover { background: var(--soft-2); color: var(--fg); }
.ctx-add { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14.5px; color: var(--fg-2); cursor: pointer; transition: background .2s; }
.ctx-add:hover { background: var(--soft); }
.ctx-add svg { width: 16px; height: 16px; }
.ctx-add small { color: var(--faint); font-size: 12.5px; }
.m-sub { margin: -8px 0 2px; line-height: 1.5; }
.pm-list { display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; }
.pm-row .icon-btn { width: 32px; height: 32px; color: var(--muted); flex: none; }
.t-proj-tag { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--panel); font-size: 12px; color: var(--fg-2); vertical-align: 1px; max-width: 200px; }
.t-proj-tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-proj-tag svg { width: 12px; height: 12px; flex: none; }

/* dark mode: readable level pills and quieter project colours */
:root[data-theme="dark"] .tier-pill.low { color: #5eead4; } :root[data-theme="dark"] .tier-pill.medium { color: #a5b4fc; } :root[data-theme="dark"] .tier-pill.high { color: #fcd34d; }
:root[data-theme="dark"] .e-violet { background: rgba(124,77,219,.2); color: #b9a2f2; } :root[data-theme="dark"] .e-green { background: rgba(31,154,85,.18); color: #6fd59b; }
:root[data-theme="dark"] .e-blue { background: rgba(47,111,224,.2); color: #8fb4f5; } :root[data-theme="dark"] .e-pink { background: rgba(214,61,108,.18); color: #f093b0; }
:root[data-theme="dark"] .e-orange { background: rgba(226,106,28,.18); color: #f2a46d; } :root[data-theme="dark"] .e-teal { background: rgba(20,144,136,.2); color: #6fd3cb; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tier-pill.low { color: #5eead4; } :root:not([data-theme="light"]) .tier-pill.medium { color: #a5b4fc; } :root:not([data-theme="light"]) .tier-pill.high { color: #fcd34d; }
  :root:not([data-theme="light"]) .e-violet { background: rgba(124,77,219,.2); color: #b9a2f2; } :root:not([data-theme="light"]) .e-green { background: rgba(31,154,85,.18); color: #6fd59b; }
  :root:not([data-theme="light"]) .e-blue { background: rgba(47,111,224,.2); color: #8fb4f5; } :root:not([data-theme="light"]) .e-pink { background: rgba(214,61,108,.18); color: #f093b0; }
  :root:not([data-theme="light"]) .e-orange { background: rgba(226,106,28,.18); color: #f2a46d; } :root:not([data-theme="light"]) .e-teal { background: rgba(20,144,136,.2); color: #6fd3cb; } }
/* tasks on phones: the buttons go under the name instead of pushing the row wider than the screen */
@media (max-width: 640px) {
  .t-list .t-row { flex-wrap: wrap; gap: 10px 12px; }
  .t-list .t-row .t-main { flex: 1 1 calc(100% - 64px); }
  .t-list .t-row [data-run] { margin-left: 58px; }
  .t-list .t-row [data-open] { margin-left: 21px; }
  .t-proj-tag { margin: 4px 0 0; }
}
.t-main small + .t-proj-tag { vertical-align: 0; }

/* 29 Oct 2026: the Word preview shows the document's own font and colours */
.paper.has-font, .paper.has-font h1, .paper.has-font h2, .paper.has-font h3 { font-family: var(--doc-font); }
.paper h1 { color: var(--doc-main, inherit); }
.paper.has-color h1 { padding-bottom: 12px; border-bottom: 2px solid var(--doc-detail, var(--doc-main)); }
.paper h2 { color: var(--doc-main, inherit); }
.paper h3 { font-size: 16px; margin: 18px 0 6px; color: var(--doc-detail, var(--doc-main, inherit)); }
.paper .doc-sub { margin: -8px 0 24px; font-style: italic; font-size: 16px; color: var(--doc-detail, #6b6e7a); }
.paper .tbl-wrap { margin: 10px 0 18px; overflow-x: auto; }
.paper table.doc-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.paper .doc-tbl th, .paper .doc-tbl td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--doc-detail, #d9d9e3); }
.paper .doc-tbl th { background: #eef0fa; font-weight: 600; }
.paper.has-color .doc-tbl th { background: var(--doc-main, #eef0fa); color: #fff; }
.paper.has-color:not([style*="--doc-main"]) .doc-tbl th { background: #eef0fa; color: inherit; }
@media (max-width: 700px) { .paper { padding: 32px 22px; } }

/* 29 Oct 2026: "Projects" only once — the section in the sidebar; the menu row comes back only in the collapsed (icons) sidebar */
.side-nav a[data-nav="projects"] { display: none; }
.side-mini .side-nav a[data-nav="projects"] { display: flex; }
@media (max-width: 900px) { .side-mini .side-nav a[data-nav="projects"] { display: none; } }

/* Cooperation panel (29 Oct 2026): the model list on the left, the team on the right, both always in view.
   Picking models never squeezes the list; each side scrolls on its own. Phones: the list on top, the team under it. */
.picker-card.coop { width: min(1040px, 100%); max-width: none; height: min(740px, calc(100vh - 120px)); height: min(740px, calc(100dvh - 120px)); max-height: none;
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: auto auto auto auto minmax(0, 1fr) auto; column-gap: 16px; padding: 14px; }
.picker-card.coop > .p-coop-head { grid-column: 1 / -1; grid-row: 1; padding: 4px 6px 12px; }
.picker-card.coop > .p-search { grid-column: 1; grid-row: 2; }
.picker-card.coop > #mProv { grid-column: 1; grid-row: 3; }
.picker-card.coop > #mCaps { grid-column: 1; grid-row: 4; }
.picker-card.coop > .m-list { grid-column: 1; grid-row: 5 / 7; min-height: 0; overflow-y: auto; }
.picker-card.coop > .p-roles { grid-column: 2; grid-row: 2 / 6; min-height: 0; max-height: none; margin: 0; padding: 12px; gap: 8px; align-content: start; overflow-y: auto; background: var(--soft); border-radius: 18px 18px 0 0; }
.picker-card.coop > .p-multi { grid-column: 2; grid-row: 6; margin: 0; padding: 12px; flex-wrap: wrap; gap: 10px; border-radius: 0 0 18px 18px; border-top: 1px solid var(--line); }
.picker-card.coop .pm-logos { display: none; }
.picker-card.coop .pm-txt { flex: 1 1 100%; }
.picker-card.coop #pmClear { margin-left: auto; }
.picker-card.coop #pmSub { display: none; }  /* the header above already says how a team works */
.pr-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px 2px; }
.pr-head b { font-weight: 600; font-size: 14px; }
.pr-head span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.picker-card.coop .pr-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 8px 8px 8px 10px; border-radius: 14px; }
.pr-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pr-top .pr-nm { flex: 1; min-width: 0; }
.picker-card.coop .pr-ic { width: 26px; height: 26px; flex: none; }
.picker-card.coop .pr-in { width: 100%; height: 34px; grid-column: auto; }
.picker-card.coop .pr-lead { position: relative; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12px; transition: background .15s, color .15s, border-color .15s; }
.picker-card.coop .pr-lead input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.picker-card.coop .pr-lead:hover { color: var(--fg); }
.picker-card.coop .pr-lead:has(input:checked) { background: var(--fg); border-color: var(--fg); color: var(--panel); }
.picker-card.coop .pr-lead:has(input:focus-visible) { outline: 2px solid var(--fg-2); outline-offset: 2px; }
.pr-x { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; color: var(--muted); }
.pr-x:hover { background: var(--soft-2); color: var(--fg); }
.pr-x svg { width: 14px; height: 14px; }
.pr-empty { display: grid; justify-items: center; gap: 10px; padding: 28px 18px; border: 1px dashed var(--line-2); border-radius: 14px; text-align: center; font-size: 13px; line-height: 1.45; color: var(--muted); }
.pr-empty svg { width: 18px; height: 18px; }
@media (max-width: 760px) {  /* phones: the whole window scrolls; the list keeps its own height, the team follows, the buttons stay at the bottom */
  .picker-card.coop { display: flex; flex-direction: column; height: auto; max-height: calc(94vh - 24px); max-height: calc(94dvh - 24px); overflow-y: auto; padding: 12px 12px 0; }
  .picker-card.coop > .m-list { flex: none; height: 44vh; height: 44dvh; }
  .picker-card.coop > .p-roles { flex: none; max-height: none; overflow: visible; margin-top: 10px; }
  .picker-card.coop > .p-multi { position: sticky; bottom: 0; z-index: 2; margin: 0 0 12px; }
}

/* ---- live preview of code and sites (3 Nov 2026) ---- */
.cb-acts { display: inline-flex; gap: 2px; }
.cb-head button[data-preview] { color: var(--fg); font-weight: 500; }
.pv { display: flex; flex-direction: column; height: 100%; }
.pv-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.pv-bar .btn { display: inline-flex; align-items: center; gap: 6px; }
.pv-bar .btn svg { width: 14px; height: 14px; }
.pv-sp { flex: 1; }
.pv-seg { display: inline-flex; background: var(--soft-2); border-radius: 10px; padding: 2px; }
.pv-seg button { font-size: 13px; padding: 4px 10px; border-radius: 8px; color: var(--muted); }
.pv-seg button.on { background: var(--panel); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.pv-stage { flex: 1; min-height: 0; overflow: auto; display: flex; justify-content: center; background: var(--soft); }
.pv-frame { width: 100%; height: 100%; transition: width .25s var(--ease); }
.pv-frame.device { margin: 16px 0; height: calc(100% - 32px); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line-2); }
.pv-frame iframe { width: 100%; height: 100%; border: 0; background: #fff; display: block; }
.pv-code { align-self: stretch; width: 100%; margin: 0; padding: 16px; overflow: auto; font: 13px/1.6 var(--mono); background: var(--panel); color: var(--fg); white-space: pre; }
.pv-console { max-height: 34%; min-height: 90px; overflow: auto; border-top: 1px solid var(--line); background: var(--panel); font: 12.5px/1.5 var(--mono); }
.pv-chead { position: sticky; top: 0; display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--panel); border-bottom: 1px solid var(--line); font: 12px var(--font); color: var(--muted); }
.pv-chead button { margin-left: auto; font-size: 12px; color: var(--muted); padding: 2px 8px; border-radius: 6px; }
.pv-chead button:hover { background: var(--soft-2); color: var(--fg); }
.pv-count { background: var(--soft-2); border-radius: 999px; padding: 0 7px; font-size: 11px; }
.pv-log { padding: 3px 12px; white-space: pre-wrap; word-break: break-word; border-bottom: 1px solid var(--line); }
.pv-log.warn { background: rgba(212,160,23,.1); color: #8a6100; }
.pv-log.error { background: rgba(220,38,38,.08); color: var(--bad); }
:root[data-theme="dark"] .pv-log.warn { color: #f1d27a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pv-log.warn { color: #f1d27a; } }
@media (max-width: 640px) { .pv-bar .btn span { display: none; } .pv-seg button { padding: 4px 8px; } }
.pv.js .pv-stage { flex: 0 0 30%; } .pv.js .pv-console { flex: 1; max-height: none; }
/* See it and change it right there (25 Nov 2026): pages, "Edit text", the code with Save, and the box to ask Neo */
.pv-pages, .pv-files { height: 32px; max-width: 240px; padding: 0 28px 0 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); color: var(--fg); font: 13px var(--font); }
.pv-editbtn.on { background: var(--dark); color: var(--on-dark); border-color: var(--dark); }
.pv-editbtn:disabled { opacity: .5; cursor: default; }
.pv-hint { padding: 7px 14px; font-size: 13px; color: var(--fg); background: rgba(109,94,252,.10); border-bottom: 1px solid var(--line); }
.pv-code.pv-ed { display: flex; flex-direction: column; padding: 0; white-space: normal; overflow: hidden; }
.pv-code.pv-ed[hidden] { display: none; }
.pv-edbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.pv-edbar .btn-sm { height: 32px; }
.pv-src { flex: 1; min-height: 0; width: 100%; border: 0; outline: 0; resize: none; padding: 14px 16px; font: 13px/1.6 var(--mono); color: var(--fg); background: var(--panel); white-space: pre; overflow: auto; tab-size: 2; }
.pv-ask { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--panel); }
.pv-ask input { flex: 1; min-width: 180px; height: 38px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--soft); color: var(--fg); font: 14px var(--font); outline: 0; }
.pv-ask input:focus { border-color: var(--fg); background: var(--panel); }
.pv-ask input:disabled { opacity: .6; }
.pv-ask .btn svg { width: 14px; height: 14px; }
.pv-ask-st { flex-basis: 100%; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.pv-ask-st[hidden] { display: none; }
.pv-link { color: var(--fg); text-decoration: underline; font-size: 13px; }
.pv-bar.pv-live [data-reload] span, .pv-bar.pv-live [data-newtab] span { display: none; }
.pv-bar.pv-live [data-reload], .pv-bar.pv-live [data-newtab] { padding: 0 11px; }
.v-body.v-with-ask { display: flex; flex-direction: column; overflow: hidden; }
.v-body.v-with-ask .v-center { flex: 1; min-height: 0; overflow: auto; }
@media (max-width: 640px) { .pv-pages, .pv-files { max-width: 130px; } .pv-ask .btn span { display: inline; } }

/* ============ trying NeoAI without an account (9 Nov 2026) ============
   A guest sees only the chat: no history, library, connectors, tasks, projects, usage meter or settings; Log in /
   Sign up at the top, a card in the sidebar, the terms under the box, and one window to sign up. */
body.guest #searchBtn, body.guest .side-nav a[data-nav]:not(#newChat), body.guest #projSec, body.guest #projSide,
body.guest #pinSec, body.guest #pinList, body.guest #chatsToggle, body.guest #convList, body.guest #usageMini,
body.guest #meBtn, body.guest #tempBtn, body.guest .pr-in, body.guest .pr-lead, body.guest #researchToggle .sw { display: none !important; }
.guest-acts { display: inline-flex; align-items: center; gap: 8px; }
.guest-acts .btn-sm { height: 36px; padding: 0 16px; }
.guest-card { margin: 14px 4px 6px; padding: 16px 16px 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); display: grid; gap: 8px; }
.guest-card b { font-weight: 500; font-size: 15px; letter-spacing: -.01em; }
.guest-card p { margin: 0 0 6px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.guest-card .btn { width: 100%; }
.side-mini .guest-card { display: none; }
#view-chat .guest-terms { display: block; margin-top: 10px; }
.guest-terms a { text-decoration: underline; text-underline-offset: 2px; color: var(--muted); }
.guest-terms a:hover { color: var(--fg); }
.guest-terms b { font-weight: 500; color: var(--fg-2); }
.g-nudge { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 2px; padding: 12px 14px 12px 16px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); font-size: 14px; }
.g-nudge span { flex: 1; min-width: 180px; }
.gm-modal { place-items: center; padding: 16px; }
.gm-card { position: relative; width: min(440px, 100%); padding: 34px 30px 20px; text-align: center; border-radius: 28px; }
.gm-mark { width: 44px; height: 44px; margin: 0 auto 14px; display: grid; place-items: center; }
.gm-mark .mark { width: 40px; height: 40px; }
.gm-card h2 { font-size: 23px; line-height: 1.25; }
.gm-card > p { margin: 8px auto 0; max-width: 340px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.gm-feats { list-style: none; margin: 20px auto 22px; padding: 0; display: grid; gap: 9px; width: fit-content; text-align: left; font-size: 14.5px; color: var(--fg-2); }
.gm-feats li { display: flex; align-items: center; gap: 10px; }
.gm-feats [data-icon] svg { width: 16px; height: 16px; color: var(--ok); }
.gm-acts { display: grid; gap: 10px; }
.gm-acts .btn { width: 100%; }
.gm-later { margin-top: 12px; padding: 6px 10px; font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.gm-later:hover { color: var(--fg); }
@media (max-width: 560px) {
  .guest-acts .g-login { display: none; }
  .guest-acts .btn-sm { height: 34px; padding: 0 14px; font-size: 13.5px; }
  .gm-modal { place-items: end center; padding: 0; }
  .gm-card { width: 100%; border-radius: 26px 26px 0 0; padding: 30px 20px calc(16px + env(safe-area-inset-bottom)); }
}

/* ============ Cooperation, visible before the first message (9 Nov 2026) ============ */
.coop-card { max-width: 768px; margin: 10px auto 4px; padding: 0 4px; }
#view-chat.has-msgs .coop-card { display: none; }
.cc-btn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 12px 12px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel);
  text-align: left; transition: border-color .2s, background .2s, box-shadow .2s; }
.cc-btn:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.cc-logos { display: inline-flex; flex: none; padding-left: 8px; }
.cc-logos i { width: 32px; height: 32px; margin-left: -8px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); box-shadow: 0 0 0 1px var(--line), 0 0 0 3px var(--panel); }
.cc-logos svg { width: 17px; height: 17px; }
.cc-txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.cc-txt b { font-weight: 500; font-size: 15px; letter-spacing: -.01em; }
.cc-txt small { font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.cc-go { flex: none; height: 34px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--dark); color: var(--on-dark); font-size: 14px; font-weight: 500; }
.coop-card.on .cc-btn { border-color: var(--line-2); background: var(--soft); }
.coop-card.on .cc-go { background: var(--panel); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }
@media (max-width: 600px) {
  .cc-btn { gap: 12px; padding: 10px 10px 10px 14px; border-radius: 16px; }
  .cc-logos i { width: 28px; height: 28px; } .cc-logos svg { width: 15px; height: 15px; }
  .cc-txt b { font-size: 14.5px; } .cc-txt small { font-size: 12.5px; }
  .cc-go { height: 32px; padding: 0 13px; font-size: 13.5px; }
}

/* ============ your own messages: Copy and Edit (22 Oct 2026, in this version 9 Nov) ============ */
/* Your own messages: Copy and Edit under the bubble (on hover; on phones after a tap; always while Neo answers it).
   They sit in the gap below the bubble, so the thread keeps its spacing. Edit opens the message in place. */
.msg.user { position: relative; }
.u-acts { position: absolute; right: 0; top: 100%; margin-top: 1px; display: flex; gap: 2px; opacity: 0; pointer-events: none; transition: opacity .15s; }
.msg.user:hover .u-acts, .msg.user:focus-within .u-acts, .msg.user.acts-on .u-acts, .msg.user.answering .u-acts { opacity: 1; pointer-events: auto; }
.u-acts button { width: 28px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); transition: background .15s, color .15s; }
.u-acts button:hover { background: var(--soft); color: var(--fg); }
.u-acts button:focus-visible { outline: 2px solid var(--fg); outline-offset: 1px; }
.u-acts svg { width: 15px; height: 15px; }
.msg.user:not([data-mid]) [data-ua=edit], .msg.user[data-noedit] [data-ua=edit] { display: none; }
.msg.user.editing { justify-content: stretch; }
.msg.user.editing .bubble, .msg.user.editing .u-acts { display: none; }
.u-edit { width: 100%; background: var(--soft); border: 1px solid var(--line-2); border-radius: 22px; padding: 12px 12px 10px 18px; animation: fade .15s; }
.u-edit textarea { display: block; width: 100%; border: 0; outline: 0; resize: none; background: transparent; color: var(--fg); font: inherit; font-size: 16px; line-height: 1.5; max-height: 320px; padding: 0; }
.u-edit-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.u-edit-note { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
@media (max-width: 640px) {
  .u-edit { padding: 10px 10px 8px 14px; }
  .u-edit-row { flex-wrap: wrap; }
  .u-edit-note { flex-basis: 100%; }
  .u-edit-row .btn { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .u-edit { animation: none; } }

/* ============ versions of an answer and "Try again" with another model (9 Nov 2026) ============ */
.msg.ai:not(.last) .actions [data-a=regen] { display: none; }  /* the chat goes on from the latest answer: only it can be tried again */
.vnav { display: inline-flex; align-items: center; gap: 0; margin-right: 4px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vnav > span { min-width: 30px; text-align: center; }
.actions .vnav button { min-width: 26px; padding: 0 4px; }
.actions .vnav button:disabled { opacity: .35; cursor: default; background: none; }
.retry-menu { min-width: 236px; padding: 6px; }
.retry-menu .mi { display: flex; align-items: center; gap: 10px; }
.retry-menu .mi svg { width: 16px; height: 16px; }
.retry-menu .mi-h { padding: 6px 10px 4px; font-size: 12px; color: var(--muted); }
.rt-ic { width: 18px; height: 18px; display: grid; place-items: center; flex: none; }
.rt-ic svg, .rt-ic .mark { width: 16px; height: 16px; }

/* ============ Branch in new chat (9 Nov 2026) ============ */
.branch-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 6px auto 26px; padding: 10px 0; max-width: 768px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); }
.branch-note svg { width: 15px; height: 15px; }
.branch-note a { color: var(--fg-2); text-decoration: underline; text-underline-offset: 3px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.branch-note a:hover { color: var(--fg); }

/* ============ share a chat with a link (9 Nov 2026) ============ */
.share-btn { gap: 6px; height: 34px; padding: 0 14px; }
.share-btn [data-icon] svg { width: 16px; height: 16px; }
.sh-modal { place-items: center; padding: 16px; }
.sh-card { position: relative; width: min(520px, 100%); padding: 30px 28px 24px; border-radius: 26px; }
.sh-card h2 { font-size: 22px; }
.sh-sub { margin: 8px 0 18px; color: var(--muted); font-size: 14.5px; line-height: 1.5; padding-right: 20px; }
.sh-link { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--soft); }
.sh-link [data-icon] svg { width: 16px; height: 16px; color: var(--muted); }
.sh-link input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--fg-2); text-overflow: ellipsis; }
.sh-note { margin: 12px 2px 0; font-size: 13.5px; color: var(--fg-2); }
.sh-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.sh-acts #shDelete { margin-left: auto; }
.sh-acts #shCreate { width: 100%; }
.sh-list { display: grid; gap: 6px; width: 100%; margin-top: 10px; }
.sh-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border: 1px solid var(--line); border-radius: 12px; }
.sh-item a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.sh-item small { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
@media (max-width: 560px) { .sh-modal { place-items: end center; padding: 0; } .sh-card { width: 100%; border-radius: 26px 26px 0 0; padding: 28px 18px calc(18px + env(safe-area-inset-bottom)); } .share-btn span:last-child { display: none; } .share-btn { padding: 0 10px; } }

/* the shared chat (/s/<id>): read-only, full width */
body.share-view .shell { grid-template-columns: 1fr; }
body.share-view .side, body.share-view .scrim, body.share-view #menuBtn, body.share-view #modelPill, body.share-view #tempBtn, body.share-view #guestActs,
body.share-view #shareBtn, body.share-view #composer, body.share-view .chips-run, body.share-view #tierHint, body.share-view #coopCard, body.share-view #starters,
body.share-view #disclaim, body.share-view #guestTerms, body.share-view #limitBar, body.share-view #hello, body.share-view .actions [data-a]:not([data-a=copy]):not([data-a=speak]):not([data-a=more]),
body.share-view .vnav, body.share-view .follow, body.share-view .mem-note, body.share-view #jumpBtn, body.share-view .chat-title { display: none !important; }
body.share-view .chat-top { padding-left: 16px; }
.share-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: 16px; letter-spacing: -.01em; }
.sb-mark { width: 28px; height: 28px; display: grid; place-items: center; } .sb-mark .mark { width: 26px; height: 26px; }
.share-head { max-width: 768px; margin: 8px auto 30px; padding: 0 4px 22px; border-bottom: 1px solid var(--line); }
.share-head h1 { font-size: 28px; line-height: 1.25; letter-spacing: -.02em; }
.share-head p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.share-foot { max-width: 768px; margin: 0 auto; padding: 16px 18px; display: flex; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: var(--shadow); }
.share-foot div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.share-foot b { font-weight: 500; } .share-foot small { color: var(--muted); font-size: 13.5px; }
.share-gone { max-width: 520px; margin: 18vh auto 0; text-align: center; }
.share-gone b { font-size: 20px; font-weight: 500; } .share-gone p { color: var(--muted); }
@media (max-width: 560px) { .share-foot { flex-direction: column; align-items: stretch; text-align: center; } .share-head h1 { font-size: 23px; } }

/* =====================================================================
   Formulas and charts in answers (9 Nov 2026)
   Charts: the data-viz method's palette (8 hues in a fixed order, validated for colour blindness on NeoAI's own
   surfaces: #ffffff light, #212121 dark), thin marks, hairline grid. charts.js reads these variables when it draws.
   ===================================================================== */
.md .math-d { display: block; margin: 10px 0 16px; padding: 2px 0; overflow-x: auto; overflow-y: hidden; text-align: center; scrollbar-width: thin; }
.md .math-d .katex-display { margin: 0; }
.md .katex { font-size: 1.1em; }
.md .tex-wait { font-family: var(--mono); font-size: .9em; color: var(--muted); }
.md .math-d.tex-wait { text-align: left; white-space: pre-wrap; }
.nchart {
  --nc1: #2a78d6; --nc2: #eb6834; --nc3: #1baf7a; --nc4: #eda100; --nc5: #e87ba4; --nc6: #008300; --nc7: #6250d6; --nc8: #e34948;
  --nc-surface: var(--chat-bg, var(--panel)); --nc-ink: var(--fg); --nc-ink2: var(--fg-2); --nc-muted: var(--muted);
  --nc-grid: var(--line); --nc-axis: var(--line-2); --nc-band: rgba(0,0,0,.035);
  margin: 6px 0 18px; padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--nc-surface); min-width: 0;
}
:root[data-theme="dark"] .nchart { --nc1: #3987e5; --nc2: #d95926; --nc3: #199e70; --nc4: #c98500; --nc5: #d55181; --nc6: #008300; --nc7: #9085e9; --nc8: #e66767; --nc-band: rgba(255,255,255,.05); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nchart { --nc1: #3987e5; --nc2: #d95926; --nc3: #199e70; --nc4: #c98500; --nc5: #d55181; --nc6: #008300; --nc7: #9085e9; --nc8: #e66767; --nc-band: rgba(255,255,255,.05); } }
.nc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.nc-title { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--fg); padding-top: 3px; min-width: 0; }
.nc-acts { display: inline-flex; gap: 2px; margin: -3px -8px 0 auto; flex: none; }
.nc-acts button { display: inline-flex; align-items: center; gap: 6px; font: 12.5px var(--font); color: var(--muted); padding: 5px 8px; border-radius: 8px; }
.nc-acts button svg { width: 15px; height: 15px; }
.nc-acts button:hover, .nc-acts button[aria-pressed="true"] { background: var(--soft); color: var(--fg); }
.nc-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 12px; font-size: 13px; line-height: 1.4; color: var(--fg-2); }
.nc-legend span { display: inline-flex; align-items: center; gap: 7px; }
.nc-split + .nc-legend { margin: 12px 0 2px; }
.nc-key { display: inline-block; flex: none; }
.nc-key.box { width: 10px; height: 10px; border-radius: 3px; }
.nc-key.line { width: 14px; height: 2px; border-radius: 1px; }
.nc-key.dot { width: 8px; height: 8px; border-radius: 50%; }
.nc-more { color: var(--muted); }
.nc-plot { position: relative; outline: none; border-radius: 8px; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.nc-plot:focus-visible { box-shadow: 0 0 0 2px var(--line-2); }
.nc-plot svg { display: block; max-width: 100%; height: auto; overflow: visible; user-select: none; -webkit-user-select: none; }
.nc-split { margin: 2px 0 0; }
.nc-tip { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; min-width: 110px; max-width: 260px; padding: 8px 10px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(0,0,0,.12); font-size: 13px; line-height: 1.35; }
.nc-tip-h { color: var(--muted); font-size: 12px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nc-tip-r { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.nc-tip-r + .nc-tip-r { margin-top: 3px; }
.nc-tip-r i { width: 12px; height: 2px; border-radius: 1px; flex: none; }
.nc-tip-r b { font-weight: 600; color: var(--fg); }
.nc-tip-r span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.nc-stat { padding: 0 0 4px; }
.nc-stat-v { font-size: 36px; font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; color: var(--fg); }
.nc-stat-l { margin-top: 4px; font-size: 14px; color: var(--fg-2); }
.nchart.nc-t-stat [data-nc="table"] { display: none; }
.nc-body:empty { min-height: 200px; }
.nchart.nc-t-stat .nc-body:empty, .nchart.nc-t-pie .nc-body:empty { min-height: 60px; }
.nchart .nc-table { margin: 0; }
.nchart .nc-table table { min-width: 100%; }
.nchart .nc-table td { font-variant-numeric: tabular-nums; text-align: right; }
.nchart .nc-table thead th:not(:first-child) { text-align: right; }
.nchart .nc-table th, .nchart .nc-table td { padding: 8px 0 8px 16px; } .nchart .nc-table th:first-child { padding-left: 0; }
.nchart .nc-table tr:last-child th { border-bottom: 0; }
.nchart.wait { padding: 0; }
.nc-wait { display: flex; align-items: center; justify-content: center; gap: 10px; height: 250px; color: var(--muted); font-size: 14px; }
.nc-wait svg { width: 18px; height: 18px; animation: ncPulse 1.4s ease-in-out infinite; }
@keyframes ncPulse { 50% { opacity: .35; } }
@media (max-width: 560px) { .nchart { padding: 12px 12px 10px; border-radius: 14px; } .nc-acts button span { display: none; } }

/* Read aloud (9 Nov 2026): the speaker under an answer becomes a stop button while it reads */
.actions [data-a=speak].on { color: var(--fg); background: var(--soft); }
.actions [data-a=speak].on svg rect { fill: currentColor; }

/* =====================================================================
   Writing blocks and Full screen (9 Nov 2026)
   ===================================================================== */
.wblock { margin: 6px 0 18px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--chat-bg, var(--panel)); }
.wb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 8px 7px 14px; border-bottom: 1px solid var(--line); background: var(--soft); }
.wb-t { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; font-weight: 500; color: var(--fg-2); }
.wb-t svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.wb-t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-acts { display: inline-flex; gap: 2px; flex: none; }
.wb-acts button { display: inline-flex; align-items: center; gap: 6px; font: 12.5px var(--font); color: var(--muted); padding: 5px 8px; border-radius: 8px; }
.wb-acts button svg { width: 15px; height: 15px; }
.wb-acts button:hover { background: var(--panel); color: var(--fg); }
.wb-body { padding: 18px 22px 8px; font-size: 15.5px; line-height: 1.65; }
.wb-body > :first-child { margin-top: 0; }
.cb-head button[data-expand] { padding: 4px 6px; }
.reader { position: fixed; inset: 0; z-index: 140; background: var(--panel); display: flex; flex-direction: column; animation: rdIn .16s ease-out; }
@keyframes rdIn { from { opacity: 0; transform: scale(.985); } }
body.reading { overflow: hidden; }
.rd-bar { flex: none; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 14px 0 10px; border-bottom: 1px solid var(--line); }
.rd-title { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-acts { display: inline-flex; gap: 6px; flex: none; }
.rd-acts .btn { display: inline-flex; align-items: center; gap: 6px; }
.rd-acts .btn svg { width: 15px; height: 15px; }
.rd-acts .btn.on { border-color: var(--fg); }
.rd-body { flex: 1; overflow: auto; outline: none; }
.rd-doc { max-width: 760px; margin: 0 auto; padding: 48px 28px 120px; font-size: 17px; line-height: 1.75; }
.rd-doc h1, .rd-doc h2 { font-size: 26px; line-height: 1.3; margin: 0 0 18px; }
.rd-doc h3 { font-size: 20px; margin: 30px 0 10px; }
.rd-doc .wb-head { background: none; border: 0; padding: 0; margin: 0 0 14px; } .rd-doc .wb-acts, .rd-doc .wb-t svg { display: none; }
.rd-doc .wb-t { font-size: 24px; font-weight: 600; color: var(--fg); white-space: normal; } .rd-doc .wb-t span { white-space: normal; }
.rd-doc .wblock { border: 0; background: none; } .rd-doc .wb-body { padding: 0; font-size: inherit; }
.reader.code .rd-body { background: var(--soft); }
.rd-code { margin: 0; padding: 20px 0 80px; font: 13.5px/1.65 var(--mono); counter-reset: ln; min-width: max-content; }
.rd-code .ln { display: block; padding: 0 28px 0 0; white-space: pre; }
.rd-code .ln::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 52px; padding-right: 18px; text-align: right; color: var(--faint); user-select: none; -webkit-user-select: none; }
.reader.wrap .rd-code { min-width: 0; } .reader.wrap .rd-code .ln { white-space: pre-wrap; word-break: break-word; padding-left: 70px; text-indent: -70px; }
@media (max-width: 640px) {
  .rd-acts .btn span { display: none; } .rd-acts .btn { padding: 0 9px; }
  .rd-doc { padding: 28px 20px 100px; font-size: 16.5px; }
  .wb-body { padding: 16px 16px 6px; }
  .rd-code .ln::before { width: 38px; padding-right: 12px; }
}
@media print {
  body.reading > *:not(#reader) { display: none !important; }
  body.reading #reader { position: static; display: block; }
  body.reading .rd-bar { display: none; }
  body.reading .rd-body { overflow: visible; }
  body.reading .rd-doc { padding: 0; max-width: none; font-size: 12pt; }
}

/* =====================================================================
   Voice mode (9 Nov 2026): a spoken conversation, hands free
   ===================================================================== */
.vmode { position: fixed; inset: 0; z-index: 150; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: rdIn .18s ease-out; --lvl: 0; }
body.voicing { overflow: hidden; }
.vm-top { position: absolute; top: 18px; left: 0; right: 0; display: flex; justify-content: center; }
.vm-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 500; color: var(--fg-2); }
.vm-badge svg { width: 16px; height: 16px; }
.vm-orb { width: 168px; height: 168px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
.vm-core { width: 132px; height: 132px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #8fb8ff 0%, #2a78d6 45%, #1c3f86 100%);
  box-shadow: 0 18px 60px rgba(42,120,214,.35); transform: scale(calc(1 + var(--lvl) * .22)); transition: transform .08s linear; }
.vmode[data-phase="thinking"] .vm-core { animation: vmThink 1.6s ease-in-out infinite; }
.vmode[data-phase="speaking"] .vm-core { animation: vmSpeak 1.1s ease-in-out infinite; }
.vmode[data-phase="paused"] .vm-core, .vmode[data-phase="idle"] .vm-core { filter: grayscale(.85) brightness(1.05); opacity: .7; }
@keyframes vmThink { 50% { transform: scale(.9); opacity: .8; } }
@keyframes vmSpeak { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.08); } 60% { transform: scale(.97); } }
.vm-status { font-size: 16px; font-weight: 500; color: var(--fg); min-height: 24px; }
.vm-said { max-width: min(620px, 86vw); min-height: 44px; text-align: center; font-size: 15px; line-height: 1.5; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vm-bar { position: absolute; bottom: max(28px, env(safe-area-inset-bottom)); display: flex; gap: 18px; }
.vm-btn { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--fg); position: relative; }
.vm-btn svg { width: 22px; height: 22px; }
.vm-btn:hover { background: var(--soft-2); }
.vm-btn.on::after { content: ""; position: absolute; width: 26px; height: 2px; background: currentColor; transform: rotate(-45deg); border-radius: 1px; }
.vm-btn.end { background: #e5484d; color: #fff; } .vm-btn.end:hover { background: #d13d42; }
@media (prefers-reduced-motion: reduce) { .vm-core { animation: none !important; transition: none; } }
:root[data-motion="reduced"] .vm-core { animation: none !important; }

/* Library previews kept on the server (9 Nov 2026): a video card is a still frame with a play mark */
.lib-thumb .vplay { position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%; display: grid; place-items: center; background: rgba(10, 10, 11, .55); color: #fff; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); pointer-events: none; }
.lib-thumb .vplay svg { width: 18px; height: 18px; margin-left: 2px; }
.lib-row .li .vplay { display: none; }

/* ---------------------------------------------------------------- 9 Nov 2026: UI/UX review */
/* small grey text was at 3.2:1 on white ("Using NeoAI", ⌘K, dates); 4.5:1 is the least that reads well */
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --faint: #767676; } }
:root[data-theme="light"] { --faint: #767676; }
/* the starters can never be wider than the screen (on a phone the last one pushed the whole page sideways) */
.starters { grid-template-columns: minmax(0, 1fr); }
.st-back { min-width: 0; }
.st-back em { flex: 0 1 auto; }
/* the model menu's rows of filters fade where there is more to the right */
.p-row { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent); padding-right: 30px; }
/* an action that waits for the person's OK: what, where and with what, in plain lines */
.confirm p { margin: 4px 0 8px; color: var(--fg-2); }
.confirm .cf-what::first-letter { text-transform: uppercase; }
.cf-rows { display: grid; gap: 4px; margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.04); }
.cf-row { display: grid; grid-template-columns: minmax(70px, 22%) 1fr; gap: 10px; font-size: 13.5px; line-height: 1.4; }
.cf-row span { color: var(--muted); text-transform: capitalize; overflow: hidden; text-overflow: ellipsis; }
.cf-row b { font-weight: 500; white-space: pre-wrap; overflow-wrap: anywhere; }
.cf-raw { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }
.cf-raw summary { cursor: pointer; width: max-content; }
:root[data-theme="dark"] .confirm { background: #3a3320; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .confirm { background: #3a3320; } }
/* the reviewer's notes, folded */
.rev-fold summary { display: inline-flex; align-items: center; gap: 7px; padding: 4px 2px; font-size: 12.5px; color: var(--muted); cursor: pointer; list-style: none; }
.rev-fold summary::-webkit-details-marker { display: none; }
.rev-fold summary svg { width: 14px; height: 14px; }
.rev-fold summary svg:first-child { color: #16a34a; }
.rev-fold summary svg:last-child { transition: transform .2s; }
.rev-fold[open] summary svg:last-child { transform: rotate(180deg); }
/* "NeoAI is also in your language" (shown when the browser is translating the page) */
.lang-offer { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 95; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px);
  padding: 8px 8px 8px 16px; border-radius: 999px; background: var(--dark); color: var(--on-dark); font-size: 14px; box-shadow: var(--shadow); animation: pop .25s var(--ease); }
.lang-offer .lo-go { height: 32px; padding: 0 14px; border-radius: 999px; background: var(--on-dark); color: var(--dark); font-size: 13.5px; font-weight: 550; flex: none; }
.lang-offer .lo-x { width: 32px; height: 32px; border-radius: 50%; color: inherit; font-size: 18px; opacity: .7; flex: none; }
/* phones */
@media (max-width: 640px) {
  #micBtn { display: grid; }                      /* dictation is back: it is on a phone that people talk instead of typing */
  .dock .c-btn { width: 40px; height: 40px; }
  /* a field under 16px makes Safari zoom the whole page when it is tapped */
  input, textarea, select, .tool-search input, .field, .s-select, .set-body .field { font-size: 16px !important; }
  /* filters: one row that slides, instead of four rows before the first app */
  .pill-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -14px; padding-right: 26px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent); }
  .pill-tabs::-webkit-scrollbar { display: none; }
  .pill-tabs button { flex: none; height: 38px; padding: 0 15px; }
  /* the Library: two files per row (one per screen made 115 files a very long way down) */
  .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  /* things to tap are at least 40px */
  .actions { opacity: 1; gap: 0; }
  .actions button { height: 40px; min-width: 40px; }
  .conv .dots { opacity: 1; width: 36px; height: 36px; }
}

/* ---------------------------------------------------------------- 10 Nov 2026: what was left of the UI/UX review */
/* Library: several versions of one document are one card */
.lib-ver { position: absolute; top: 10px; left: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px;
  background: rgba(20,20,20,.78); color: #fff; font-size: 12.5px; font-weight: 550; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background .15s; }
.lib-ver:hover, .lib-ver.on { background: rgba(20,20,20,.95); }
.lib-ver svg { width: 13px; height: 13px; }
.lib-card.in-set { outline: 2px solid var(--line-2); outline-offset: -2px; }
@media (max-width: 640px) { .lib-ver { top: 6px; left: 6px; height: 30px; } }
/* model menu: a heading per lab, and what the marks mean */
.p-sec.p-sub { display: flex; align-items: center; gap: 7px; position: sticky; top: 0; z-index: 1; background: var(--panel); padding-top: 10px; padding-bottom: 6px; }
.p-sec.p-sub svg { width: 13px; height: 13px; }
.p-sec.p-sub i { font-style: normal; color: var(--faint); font-weight: 400; }
.p-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 14px 12px 10px; margin-top: 6px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.p-legend b { color: var(--fg-2); font-weight: 600; }
.p-legend .pl-fast { display: inline-flex; align-items: center; gap: 5px; }
.p-legend .fast svg { width: 14px; height: 14px; }
/* an app has to be connected again */
a[data-nav="connectors"].needs em::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; background: #f59e0b; vertical-align: middle; }
.toast.toast-link { cursor: pointer; text-decoration: none; }
.lib-row .lib-ver { position: static; height: 22px; margin-left: 10px; padding: 0 8px; vertical-align: middle; background: var(--soft-2); color: var(--fg-2); backdrop-filter: none; -webkit-backdrop-filter: none; }
.lib-row .lib-ver:hover, .lib-row .lib-ver.on { background: var(--line-2); }

/* ---------------------------------------------------------------- 10 Nov 2026: the model menu with the real catalogue */
.p-sec.p-sub .ps-ic { display: inline-grid; place-items: center; width: 16px; height: 16px; }
.p-sec.p-sub .ps-ic svg { width: 14px; height: 14px; }
.by-lab .p-desc { display: none; }                 /* the lab is the heading: no need to repeat it under every model */
.by-lab .p-item { padding-top: 7px; padding-bottom: 7px; }
.by-kind .p-name .badge { display: none; }         /* nor "Image" beside every model under "Image" */
.p-sec.p-kind { margin-top: 6px; }
.p-sec.p-kind svg { width: 14px; height: 14px; }
/* the menu was 660px wide on any screen (its rows of filters don't wrap and pushed it open): on a phone the prices and
   everything on the right were off the screen */
.picker-card { min-width: 0; max-width: min(660px, calc(100vw - 24px)); }
.picker-card > * { min-width: 0; }
.picker-card.coop { max-width: calc(100vw - 24px); }

/* Neo's orchestrator (11 Nov 2026): the level is optional - "Neo decides" sits above the slider, which then only sets a ceiling */
.lvl-pop .lp-auto { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 12px; padding: 8px 10px; border: 1px solid var(--line, #e5e5e5); border-radius: 10px; background: transparent; color: inherit; font: inherit; font-size: 13.5px; cursor: pointer; text-align: left; }
.lvl-pop .lp-auto:hover { background: var(--soft, #f4f4f4); }
.lvl-pop .lp-auto.on { border-color: var(--accent, #0a0a0a); background: var(--soft, #f4f4f4); font-weight: 600; }
.lvl-pop .lp-auto[hidden] { display: none; }
.lvl-pop .lp-track.auto .lp-fill { opacity: .25; }
.lvl-pop .lp-track.auto .lp-knob { opacity: 0; }

/* ---------------------------------------------------------------- 11 Nov 2026: Connectors — shelves of rows and a sheet per app
   Before: 52 identical cards and 40 black buttons. Now what you have comes first, the catalogue is a list you can scan,
   and the apps that can't be connected yet are small. Everything about one app is in its sheet. */
#view-connectors .pg-head { margin-bottom: 10px; }
.conn-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 22px; color: var(--muted); font-size: 14px; line-height: 1.45; max-width: 70ch; }
.conn-note [data-icon] { flex: none; display: grid; margin-top: 2px; color: var(--ok); }
.conn-note svg { width: 16px; height: 16px; }
.conn-top { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.conn-search { flex: 1; max-width: 440px; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 6px 0 12px; border-radius: 12px; background: var(--soft); border: 1px solid transparent; color: var(--muted); cursor: text; transition: background .2s, border-color .2s, box-shadow .2s; }
.conn-search:hover { background: var(--soft-2); }
.conn-search:focus-within { background: var(--panel); border-color: var(--line-2); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.conn-search [data-icon] { display: grid; flex: none; }
.conn-search svg { width: 17px; height: 17px; }
.conn-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 15px; color: var(--fg); }
.conn-search .cs-x { display: none; width: 30px; height: 30px; border-radius: 8px; place-items: center; color: var(--muted); cursor: pointer; }
.conn-search .cs-x:hover { background: var(--soft-2); color: var(--fg); }
.conn-search input:not(:placeholder-shown) ~ .cs-x { display: grid; }
.conn-add { margin-left: auto; height: 42px; padding: 0 16px 0 12px; border-radius: 12px; font-size: 14.5px; gap: 6px; }
.conn-add [data-icon] { display: grid; }
.conn-add svg { width: 17px; height: 17px; }
#connTabs { flex: none; margin-top: 0; margin-bottom: 0; min-height: 36px; }   /* a row that scrolls sideways must not be squeezed by the page column */
#connTabs .tab-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--ok); color: #fff; font-size: 11.5px; font-weight: 600; display: inline-grid; place-items: center; line-height: 1; }
#connTabs .tab-n[hidden] { display: none; }

#apps.conn { display: block; margin-top: 0; }
.conn-sec { margin-top: 24px; }
.conn-h { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px; font-size: 13.5px; font-weight: 600; color: var(--fg-2); letter-spacing: 0; }
.conn-h small { font-size: 12.5px; font-weight: 500; color: var(--faint); }
.conn-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }

#apps .app { display: flex; flex-direction: row; align-items: center; justify-items: stretch; text-align: left; gap: 14px; min-height: 72px; padding: 11px 14px 11px 16px; border-radius: 16px; background: var(--soft); border: 1px solid transparent; cursor: pointer; animation: none; opacity: 1; transition: background .2s, border-color .2s, box-shadow .2s; }
#apps .app:hover { background: var(--panel); border-color: var(--line-2); box-shadow: 0 2px 12px rgba(0,0,0,.05); transform: none; }
#apps .app:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
#apps .app .app-logo { flex: none; width: 40px; height: 40px; margin: 0; border-radius: 10px; }
#apps .app .app-logo.letter { width: 36px; height: 36px; margin: 2px; border-radius: 9px; font-size: 17px; }
#apps .app .app-tx { flex: 1; min-width: 0; display: grid; gap: 3px; }
#apps .app h3 { margin: 0; max-width: none; font-size: 15px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#apps .app p { margin: 0; min-height: 0; font-size: 13px; line-height: 1.35; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#apps .app .app-act { flex: none; display: flex; align-items: center; gap: 6px; }
#apps .app .btn.app-go { width: auto; height: 36px; margin: 0; padding: 0 16px; border-radius: 999px; font-size: 13.5px; gap: 6px; }
#apps .app .btn.app-go svg { width: 14px; height: 14px; }
#apps .app .btn-line.app-go { background: var(--panel); }
#apps .app:hover .btn-line.app-go[data-a="oauth"], #apps .app:hover .btn-line.app-go[data-a="connect"], #apps .app:hover .btn-line.app-go[data-a="setup"] { background: var(--dark); color: var(--on-dark); border-color: var(--dark); }
#apps .app .toggle { cursor: pointer; position: relative; }
#apps .app .toggle::before { content: ""; position: absolute; inset: -9px -4px; }   /* a finger-sized target around the switch */
#apps .app .toggle:disabled { opacity: .6; }
#apps .app .app-more { width: 32px; height: 36px; color: var(--faint); }
#apps .app .app-more svg { width: 16px; height: 16px; }
#apps .app:hover .app-more { color: var(--fg); }

/* your apps: what state each one is in instead of what it is (that is in its sheet) */
#apps .sec-mine .app { background: var(--panel); border-color: var(--line); }
#apps .sec-mine .app p { display: none; }
.app-st { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.app-st > span { overflow: hidden; text-overflow: ellipsis; }
.app-st i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.app-st .sep { color: var(--faint); }
.app-st.st-paused i { background: var(--faint); }
.app-st.st-expired { color: #b45309; font-weight: 500; }
.app-st.st-expired i { background: #f59e0b; }
#apps .app.needs { border-color: rgba(245,158,11,.55); background: rgba(245,158,11,.07); }
#apps .app.is-off .app-logo, #apps .app.is-off h3 { opacity: .55; }

/* coming soon: a name and a mark, no more */
#apps .sec-soon .conn-list { display: flex; flex-wrap: wrap; gap: 8px; }
#apps .app.is-soon { min-height: 40px; padding: 7px 14px 7px 9px; gap: 8px; border-radius: 999px; background: none; border: 1px solid var(--line); }
#apps .app.is-soon:hover { background: var(--soft); box-shadow: none; border-color: var(--line-2); }
#apps .app.is-soon .app-logo { width: 24px; height: 24px; border-radius: 6px; }
#apps .app.is-soon .app-logo svg, #apps .app.is-soon .app-logo img { width: 20px; height: 20px; }
#apps .app.is-soon .app-logo.letter { width: 22px; height: 22px; margin: 1px; border-radius: 6px; font-size: 12px; }
#apps .app.is-soon h3 { font-size: 13.5px; font-weight: 500; color: var(--fg-2); }
#apps .app.is-soon p, #apps .app.is-soon .app-act { display: none; }

#apps .empty-state { padding: 9vh 20px 6vh; }
#apps .empty-state .btn { height: 42px; gap: 6px; }
#apps .empty-state .btn svg { width: 16px; height: 16px; }

/* while the list loads */
#apps .app.sk { pointer-events: none; }
.sk-b { display: block; border-radius: 8px; background: var(--soft-2); animation: conn-sk 1s ease-in-out infinite alternate; }
.sk-b.sk-l { flex: none; width: 40px; height: 40px; border-radius: 10px; }
.sk-b.sk-1 { width: 42%; height: 13px; }
.sk-b.sk-2 { width: 78%; height: 11px; margin-top: 5px; }
@keyframes conn-sk { from { opacity: .45; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sk-b { animation: none; } }

/* the sheet of one app */
.app-sheet { position: relative; width: min(560px, 100%); max-height: min(84vh, 780px); margin-top: -4vh; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.as-x { position: absolute; top: 14px; right: 14px; z-index: 1; }
.as-head { display: flex; align-items: center; gap: 14px; padding: 26px 60px 14px 26px; }
.as-head .app-logo { flex: none; width: 52px; height: 52px; margin: 0; }
.as-head .app-logo svg, .as-head .app-logo img { width: 46px; height: 46px; }
.as-head .app-logo.letter { width: 46px; height: 46px; border-radius: 12px; font-size: 21px; }
.as-head h2 { margin: 0 0 3px; font-size: 21px; line-height: 1.2; }
.as-head p { margin: 0; }
.as-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 26px 20px; display: flex; flex-direction: column; gap: 14px; }
.as-body > * { flex: none; }
.as-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 26px 22px; border-top: 1px solid var(--line); }
.as-foot .btn { height: 42px; padding: 0 20px; font-size: 14.5px; }
.as-foot .btn svg { width: 15px; height: 15px; }
.as-banner { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--soft); font-size: 14px; line-height: 1.45; color: var(--fg-2); }
.as-banner svg { flex: none; width: 17px; height: 17px; margin-top: 2px; }
.as-banner.ok { background: rgba(22,163,74,.1); color: #166534; }
.as-banner.warn { background: rgba(245,158,11,.14); color: #92400e; }
.as-about { margin: 0; font-size: 15px; line-height: 1.5; color: var(--fg-2); overflow-wrap: anywhere; }
.as-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }
.as-row b { display: block; font-size: 14.5px; font-weight: 600; }
.as-row small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.as-row .toggle { cursor: pointer; }
.as-row .btn { flex: none; height: 38px; padding: 0 14px; font-size: 13.5px; gap: 6px; }
.as-row .btn svg { width: 14px; height: 14px; }
.as-h { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 -4px; font-size: 13.5px; font-weight: 600; color: var(--fg-2); }
.as-h small { font-size: 12.5px; font-weight: 500; color: var(--faint); }
.as-grp { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.as-grp-h { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--soft); font-size: 13.5px; font-weight: 600; }
.as-grp-h svg { flex: none; width: 15px; height: 15px; color: var(--muted); }
.as-grp-h small { font-size: 12.5px; font-weight: 500; color: var(--faint); }
.as-chip { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--muted); }
.as-chip svg { width: 13px; height: 13px; }
.as-tools { list-style: none; margin: 0; padding: 2px 14px; }
.as-tools li { padding: 9px 0; border-top: 1px solid var(--line); }
.as-tools li:first-child { border-top: 0; }
.as-tools li.more { display: none; }
.as-grp.open .as-tools li.more { display: block; }
.as-tools b { display: block; font-size: 14px; font-weight: 500; }
.as-tools span { display: block; margin-top: 1px; font-size: 13px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.as-more { display: block; width: 100%; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--fg-2); text-align: center; cursor: pointer; }
.as-more:hover { background: var(--soft); }
.as-grp.open .as-more { display: none; }
.as-how { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.as-how li { display: flex; align-items: flex-start; gap: 12px; font-size: 14.5px; line-height: 1.45; color: var(--fg-2); }
.as-how svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--muted); }
.btn-quiet { height: 42px; padding: 0 6px; font-size: 14px; color: var(--muted); cursor: pointer; }
.btn-quiet:hover { color: var(--bad); }
.btn-bad { background: var(--bad); color: #fff; }
.btn-bad:hover { opacity: .88; }
.as-ask { flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; }

:root[data-theme="dark"] .as-banner.ok { color: #86efac; } :root[data-theme="dark"] .as-banner.warn { color: #fcd34d; }
:root[data-theme="dark"] .app-st.st-expired { color: #fbbf24; }
:root[data-theme="dark"] #apps .app:hover { box-shadow: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .as-banner.ok { color: #86efac; } :root:not([data-theme="light"]) .as-banner.warn { color: #fcd34d; }
  :root:not([data-theme="light"]) .app-st.st-expired { color: #fbbf24; }
  :root:not([data-theme="light"]) #apps .app:hover { box-shadow: none; }
}

@media (max-width: 640px) {
  .conn-note { font-size: 13.5px; margin-bottom: 16px; }
  .conn-search { max-width: none; height: 44px; }
  .conn-add { flex: none; width: 44px; height: 44px; padding: 0; }
  .conn-add .ca-t { display: none; }
  .conn-sec { margin-top: 20px; }
  .conn-list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  #apps .app { gap: 12px; min-height: 72px; padding: 12px 12px 12px 14px; }
  #apps .app .btn.app-go { height: 40px; padding: 0 15px; }
  #apps .app .btn.app-go[data-a="pick"] { width: 40px; padding: 0; }
  #apps .app .btn.app-go[data-a="pick"] span { display: none; }
  #apps .app .app-more { width: 30px; height: 40px; }
  #apps .app.is-soon { min-height: 40px; }
  #appSheet { padding: 0; place-items: end center; }
  .app-sheet { width: 100%; max-height: 90vh; max-height: 90dvh; margin: 0; border-radius: 22px 22px 0 0; animation: conn-up .28s var(--ease); }
  .as-head { padding: 22px 56px 12px 20px; }
  .as-body { padding: 4px 20px 16px; }
  .as-foot { padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .as-foot .btn { height: 46px; }
  .as-foot .as-ask { flex: 1 0 100%; }
  .as-foot .as-ask ~ .btn { flex: 1; }
}
@keyframes conn-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------------------------------------------------------- Settings, 11 Nov 2026
   Appearance and Voice have their own pages; the mode is picked from three small previews; a wider chat and an
   easy-to-read font; archived chats; NeoAI's own "are you sure?"; the setting a search found is marked. */
@font-face { font-family: "OpenDyslexic"; src: url("/web/fonts/OpenDyslexic-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "OpenDyslexic"; src: url("/web/fonts/OpenDyslexic-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root[data-font="dyslexic"] .md, :root[data-font="dyslexic"] .bubble { font-family: "OpenDyslexic", "Comic Sans MS", system-ui, sans-serif; font-size: 15px; line-height: 1.75; letter-spacing: .01em; }
:root[data-font="dyslexic"][data-size="small"] .md, :root[data-font="dyslexic"][data-size="small"] .msg.user .bubble { font-size: 13.5px; }
:root[data-font="dyslexic"][data-size="large"] .md, :root[data-font="dyslexic"][data-size="large"] .msg.user .bubble { font-size: 16.5px; }
:root[data-width="wide"] #view-chat.has-msgs .thread, :root[data-width="wide"] #view-chat.has-msgs .composer, :root[data-width="wide"] #view-chat.has-msgs .hint,
:root[data-width="wide"] #view-chat.has-msgs .bot-bar, :root[data-width="wide"] #view-chat.has-msgs .limit-bar { max-width: 1080px; }

.modes { display: flex; gap: 8px; flex: none; }
.modes button { width: 62px; height: 44px; padding: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); background: none; transition: box-shadow .2s, border-color .2s, transform .15s; }
.modes button svg { display: block; width: 100%; height: 100%; }
.modes button:hover { transform: translateY(-1px); }
.modes button.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.modes button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.set-none { display: block; padding: 10px 12px; color: var(--muted); font-size: 13.5px; }
.set-none[hidden] { display: none; }
.set-page .s-hit { position: relative; }
.set-page .s-hit::before { content: ""; position: absolute; left: -11px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--accent); animation: fade .25s; }
.set-page .pack.s-hit::before, .set-page summary.s-hit::before { left: -8px; }

#voiceTry { gap: 6px; }
#voiceTry svg { width: 15px; height: 15px; }
#voiceTry.on { background: var(--soft-2); }
.s-row small.n-to { color: var(--fg-2); font-weight: 500; }
.data-stats small.ds-x { display: block; margin-top: 2px; color: var(--faint); }
.data-stats small.ds-x[hidden] { display: none; }
.ar-acts { display: flex; align-items: center; gap: 4px; flex: none; }
.ar-acts .ar-del { width: 32px; height: 32px; color: var(--muted); }
.ar-acts .ar-del:hover { color: var(--bad); }
.ar-acts .ar-del svg { width: 16px; height: 16px; }
#arList { max-height: 260px; overflow-y: auto; }

.cfm-modal { z-index: 70; place-items: center; padding: 16px; }
.cfm-card { width: min(430px, 100%); padding: 24px 24px 20px; border-radius: 20px; display: grid; gap: 8px; animation: pop .22s var(--ease); }
.cfm-card h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.cfm-card p { color: var(--fg-2); font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.cfm-type { display: grid; gap: 6px; margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.cfm-type[hidden] { display: none; }
.cfm-type .field { height: 42px; border-radius: 10px; font-size: 15px; letter-spacing: .04em; }
.cfm-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.cfm-acts .btn { min-width: 92px; height: 40px; justify-content: center; }
.cfm-acts .btn:disabled { opacity: .45; cursor: not-allowed; }
.cfm-acts .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.toast .toast-act { margin-left: 14px; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.seg-mini button { white-space: nowrap; }
.s-select { text-align: right; text-align-last: right; max-width: 230px; text-overflow: ellipsis; }
#widthSeg button, #emojiSeg button, #fmtSeg button, #lenSeg button, #sizeSeg button { width: auto; min-width: 0; padding: 0 12px; }

@media (max-width: 760px) {
  /* the menu is a strip on top: it keeps its own height, and a short page starts right under it (it used to float in the middle) */
  .settings-card { grid-template-rows: auto minmax(0, 1fr); }
  /* a row whose control doesn't fit beside its name puts the control on a line of its own, on the right (Catalan and German
     words are longer: "Llargada de les respostes" pushed the switch off the screen) */
  .set-page .s-row:not(.col) { flex-wrap: wrap; row-gap: 10px; }
  .set-page .s-row:not(.col) > div:first-child, .set-page .s-row:not(.col) > span:first-child { flex: 1 1 108px; min-width: 0; }
  .modes button { width: 52px; height: 37px; border-radius: 9px; }
  .set-page .s-row:not(.col) > .seg-mini, .set-page .s-row:not(.col) > .modes, .set-page .s-row:not(.col) > .accents, .set-page .s-row:not(.col) > .s-inline,
  .set-page .s-row:not(.col) > .s-select, .set-page .s-row:not(.col) > .tgl, .set-page .s-row:not(.col) > .btn, .set-page .s-row:not(.col) > kbd { margin-left: auto; }
  .set-page .s-row .s-select { max-width: 100%; }
  .sh-item { flex-wrap: wrap; } .sh-item a { flex: 1 1 100%; }
  .cfm-acts .btn { flex: 1; height: 44px; }
}


/* ---- 11 Nov 2026: the thinking panel is one timeline (steps with their icon, the reasoning cut into steps, "Done"),
   and the two notes about a model you picked: it could not answer (.down-card) / another one took its place (.swap-note) ---- */
.think-body { margin: 6px 0 10px; padding-left: 0; border-left: 0; }
.think.open .think-steps { display: block; margin: 0; padding: 0; border: 0; }
.think-steps > div, .think-text .tt, .think-end { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 10px; align-items: start; position: relative; padding-bottom: 10px; font-size: 13.5px; line-height: 22px; color: var(--muted); }
.think-steps > div::before, .think-text .tt::before { content: ""; position: absolute; left: 11.5px; top: 23px; bottom: 1px; width: 1px; background: var(--line-2); }
.ts-ic, .tt-dot { width: 24px; height: 22px; display: grid; place-items: center; color: var(--faint); flex: none; }
.ts-ic svg, .ts-ic img, .ts-ic .mark { width: 14px; height: 14px; }
.ts-ic svg { stroke-width: 1.7; }
.tt-dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--faint); }
.ts-t { min-width: 0; overflow-wrap: anywhere; } .ts-t b { color: var(--fg-2); font-weight: 500; }
.think-steps > div[data-stage="fallback"] .ts-ic { color: #c2410c; }
.think-text { line-height: 1.6; max-height: 360px; }
.think-text .tt { line-height: 1.6; }
.think-text .tt-c { min-width: 0; padding-top: 1px; }
.think-text .tt-h { color: var(--fg-2); font-weight: 550; line-height: 22px; }
.think-text .tt-b { color: var(--muted); } .think-text .tt-b > :last-child { margin-bottom: 0; }
.think-end { padding-bottom: 0; color: var(--muted); }
.think-end .ts-ic { color: #16a34a; }
.think.live .think-end .ts-ic svg, .think.live .think-end .te-t { display: none; }
.think.live .think-end .ts-ic::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--fg); animation: tlpulse 1.2s ease-in-out infinite; }
@keyframes tlpulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .think.live .think-end .ts-ic::before { animation: none; opacity: .7; } }

.swap-note { display: flex; align-items: flex-start; gap: 8px; margin: 2px 0 10px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, #f59e0b 12%, transparent); color: var(--fg-2); font-size: 13.5px; line-height: 1.45; width: fit-content; max-width: 100%; }
.swap-note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: #c2410c; }
.down-card { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 4px 12px; align-items: center; margin-top: 8px; padding: 14px 16px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); }
.down-card .dc-logo { width: 36px; height: 36px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 600; }
.down-card .dc-logo svg, .down-card .dc-logo img { width: 18px; height: 18px; }
.down-card .dc-t { display: grid; gap: 2px; min-width: 0; font-size: 14px; line-height: 1.45; }
.down-card .dc-t b { font-weight: 550; color: var(--fg); } .down-card .dc-t span { color: var(--muted); font-size: 13.5px; }
.down-card .dc-b { grid-column: 2; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.down-card .dc-neo { border: 1px solid var(--line-2); background: var(--panel); }
.down-card .dc-neo:hover { background: var(--soft-2); }
.down-card .err-admin { grid-column: 1 / -1; padding: 0; }
@media (max-width: 520px) { .down-card { grid-template-columns: minmax(0, 1fr); } .down-card .dc-logo { display: none; } .down-card .dc-b { grid-column: 1; } .down-card .dc-b .btn { flex: 1; } }
.msg.ai:has(.down-card):has(.md:empty) .actions { display: none; }  /* nothing was written: nothing to copy, read or rate */
/* NeoAI for Chrome (11 Nov 2026): the Chrome row in Connectors and its sheet (the linking code, the linked browsers) */
.app-st.st-offline i { background: var(--faint); }
#apps .app .app-logo.app-logo-ic, .as-head .app-logo.app-logo-ic { background: var(--soft); border-radius: 12px; color: var(--fg-2); }
#apps .app .app-logo.app-logo-ic svg { width: 22px; height: 22px; }
.as-head .app-logo.app-logo-ic svg { width: 28px; height: 28px; }
.ch-state b i { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--faint); vertical-align: 1px; }
.ch-state.on b i { background: var(--ok); }
.ch-steps { list-style: none; counter-reset: ch; margin: 0; padding: 0; display: grid; gap: 12px; }
.ch-steps li { counter-increment: ch; display: flex; align-items: flex-start; gap: 12px; font-size: 14.5px; line-height: 1.45; color: var(--fg-2); }
.ch-steps li::before { content: counter(ch); flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ch-steps small { display: block; margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
.ch-steps .btn { display: inline-flex; align-items: center; height: 36px; margin-top: 8px; padding: 0 14px; font-size: 13.5px; }
.ch-code { padding: 18px 16px; border: 1px solid var(--line); border-radius: 16px; text-align: center; }
.ch-code > small { display: block; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ch-code-n { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 8px 0 10px; }
.ch-code-n b { font: 700 34px/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .12em; user-select: all; }
.ch-code-n .btn { height: 34px; padding: 0 12px; font-size: 13px; gap: 6px; }
.ch-code-n .btn svg { width: 14px; height: 14px; }
.ch-code p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.ch-code .ch-wait { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; }
.ch-devs { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; }
.ch-devs li { display: flex; align-items: center; gap: 10px; padding: 11px 14px; font-size: 14px; }
.ch-devs li + li { border-top: 1px solid var(--line); }
.ch-devs svg { flex: none; width: 16px; height: 16px; color: var(--muted); }
.ch-devs span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-devs small { margin-left: auto; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ch-devs i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.ch-devs i.on { background: var(--ok); }
.as-more.ch-add { border: 1px dashed var(--line); border-radius: 14px; }
@media (max-width: 640px) { .ch-code-n b { font-size: 28px; } }
/* NeoAI for Chrome, phase 3 (12 Nov 2026): the recipes in the Chrome sheet */
.ch-rnote { margin: -4px 0 10px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.ch-recs { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; }
.ch-recs li { display: flex; align-items: center; gap: 12px; padding: 11px 10px 11px 14px; }
.ch-recs li + li { border-top: 1px solid var(--line); }
.ch-recs li > div { flex: 1; min-width: 0; }
.ch-recs b { display: block; font-size: 14.5px; font-weight: 600; }
.ch-recs li > div span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ch-recs small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.ch-alone { flex: none; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); cursor: pointer; }
.ch-recs .icon-btn { flex: none; width: 34px; height: 34px; color: var(--muted); }
.ch-recs .icon-btn svg { width: 16px; height: 16px; }
/* NeoAI for Chrome (12 Nov 2026, Marc: "que quedi estètic"): the Chrome row's own mark, a browser window on a dark tile,
   the same footprint as the other apps' marks */
#apps .app .app-logo.app-logo-ch svg { width: 34px; height: 34px; }
.as-head .app-logo.app-logo-ch svg { width: 46px; height: 46px; }

/* NeoAI for Chrome in the chat (12 Nov 2026): one card for what Neo does in the person's browser */
.chx { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); margin: 2px 0 14px; max-width: 640px; overflow: hidden; animation: rise .4s var(--ease); }
.chx-h { display: flex; align-items: center; gap: 11px; padding: 12px 14px 11px; }
.chx-mark { flex: none; width: 32px; height: 32px; display: grid; place-items: center; }
.chx-mark svg { width: 32px; height: 32px; display: block; }
.chx-t { min-width: 0; flex: 1; display: grid; gap: 1px; line-height: 1.25; }
.chx-t > b { font-size: 14px; font-weight: 600; }
.chx-page { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chx-page b { color: var(--fg-2); font-weight: 500; }
.chx-page span::before { content: " · "; }
.chx-st { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chx-st svg { width: 14px; height: 14px; }
.chx:not(.live) .chx-st svg { color: var(--ok); }
.chx.asking .chx-st { color: #9a6a00; }
.chx.off .chx-st svg { color: var(--gold); }
.chx-bar { display: block; height: 2px; background: var(--line); position: relative; overflow: hidden; }
.chx.live .chx-bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 34%; background: var(--fg); border-radius: 2px; animation: chxrun 1.25s var(--ease) infinite; }
.chx.asking .chx-bar::after { animation: none; width: 100%; background: var(--gold); }
@keyframes chxrun { from { transform: translateX(-110%); } to { transform: translateX(330%); } }
.chx-steps { list-style: none; margin: 0; padding: 6px 14px 8px; display: grid; }
.chx-steps:empty { display: none; }
.chx-steps li { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; font-size: 13.5px; line-height: 1.4; color: var(--muted); animation: rise .3s var(--ease); }
.chx-steps li + li { border-top: 1px solid var(--line); }
.chx-steps li.running { color: var(--fg); }
.chx-ic { flex: none; width: 18px; height: 20px; display: grid; place-items: center; color: var(--faint); }
.chx-ic svg { width: 15px; height: 15px; }
.chx-steps li.running .chx-ic { color: var(--fg); }
.chx-tx { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.chx-tx b { font-weight: 500; color: var(--fg-2); }
.chx-steps li.running .chx-tx b { color: var(--fg); }
.chx-s { flex: none; width: 16px; height: 20px; display: grid; place-items: center; }
.chx-s svg { width: 14px; height: 14px; color: var(--ok); }
.chx-steps li.failed .chx-s svg { color: var(--bad); }
.chx-steps li.failed .chx-tx { color: var(--fg-2); }
.chx-err { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.chx-shot { margin: 0 14px 12px; }
.chx-shot img { display: block; width: 100%; max-height: 260px; object-fit: cover; object-position: top; border-radius: 10px; border: 1px solid var(--line); }
.chx-shot small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.chx-ask:empty { display: none; }
.chx-ask { border-top: 1px solid var(--line); }
.chx .chx-cf { margin: 0; border-radius: 0; padding: 14px; animation: none; }
.chx-cf .cf-t b { font-weight: 600; }
.chx-cf p { margin: 3px 0 9px; }
.chx-on { color: var(--muted); white-space: nowrap; }
.chx-on::before { content: "· "; }
.chx-cf .cf-rows { background: rgba(0,0,0,.045); }
.chx-cf .cf-row span { text-transform: none; }
:root[data-theme="dark"] .chx .chx-cf { background: #2b2616; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chx .chx-cf { background: #2b2616; } }
@media (max-width: 640px) { .chx-h { padding: 11px 12px 10px; } .chx-steps { padding: 4px 12px 6px; } .chx-st span { display: none; } .chx.asking .chx-st span, .chx:not(.live) .chx-st span { display: inline; } }

/* NeoAI for Chrome (12 Nov 2026): linking with one click from Connectors */
.ch-one { display: grid; gap: 8px; justify-items: start; margin: 4px 0 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.ch-one b { font-size: 14.5px; }
.ch-one p { margin: 0; color: var(--fg-2); font-size: 13.5px; }
.ch-one .btn svg { width: 16px; height: 16px; }
.ch-alt { margin-top: 2px; }
.ch-alt > summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.ch-alt[open] > summary { margin-bottom: 8px; }

/* ---------------------------------------------------------------- 12 Nov 2026: Tasks — one list for everything Neo was asked to do
   Before: grey cards with four controls each, the results hidden in a second tab, six big suggestion cards under them.
   Now: a sentence at the top is done right away; below it one list by what it needs from you (to review, in progress,
   scheduled, done). One main action per row, the rest in its menu. The ideas are small and step aside once you have tasks. */
#view-tasks .pg-head { margin-bottom: 18px; }
.tk-new { display: flex; align-items: flex-end; gap: 8px; max-width: 860px; padding: 8px 8px 8px 18px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 6px 22px rgba(0,0,0,.05); transition: border-color .2s, box-shadow .2s; }
.tk-new:focus-within { border-color: var(--faint); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 28px rgba(0,0,0,.08); }
.tk-new textarea { flex: 1; min-width: 0; min-height: 40px; max-height: 180px; padding: 8px 0; border: 0; outline: 0; resize: none; background: none; font: inherit; font-size: 16px; line-height: 24px; color: var(--fg); }
.tk-new textarea::placeholder { color: var(--faint); }
.tk-new-acts { flex: none; display: flex; align-items: center; gap: 6px; height: 40px; }
.tk-sched { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; font-size: 14px; color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
.tk-sched:hover { background: var(--soft); color: var(--fg); }
.tk-sched [data-icon] { display: grid; } .tk-sched svg { width: 16px; height: 16px; }
.tk-new .send { cursor: pointer; opacity: .35; }
.tk-new.has-text .send { opacity: 1; }
.tk-new.sending .send { opacity: .5; pointer-events: none; }
.tk-new.sending textarea { opacity: .6; }

.tk-bar { margin: 26px 0 0; }
#taskTabs { gap: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; flex: none; min-height: 36px; max-width: 100%; }
#taskTabs::-webkit-scrollbar { display: none; }
#taskTabs button { flex: none; height: 34px; padding: 0 13px; font-size: 14.5px; background: none; color: var(--muted); white-space: nowrap; }
#taskTabs button:hover { background: var(--soft); color: var(--fg); }
#taskTabs button.on { background: var(--soft-2); color: var(--fg); font-weight: 500; }
#taskTabs .tab-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--soft-2); color: var(--fg-2); font-size: 11.5px; font-weight: 600; display: inline-grid; place-items: center; line-height: 1; }
#taskTabs button.on .tab-n { background: var(--panel); }
#taskTabs .tab-n.hot, #taskTabs button.on .tab-n.hot { background: var(--blue); color: #fff; }

.tk-sec { margin-top: 22px; max-width: 860px; }
.tk-h { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 8px; font-size: 13.5px; font-weight: 600; color: var(--fg-2); }
.tk-h small { font-size: 12.5px; font-weight: 500; color: var(--faint); }
.tk-link { margin: -8px 0 -8px auto; padding: 8px 0; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; }
.tk-link:hover { color: var(--fg); text-decoration: underline; }
.tk-list { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); overflow: hidden; }
.tk-row { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 12px 10px 14px; border-top: 1px solid var(--line); transition: background .15s, opacity .18s, transform .18s; }
.tk-row:first-child { border-top: 0; }
.tk-row[role="button"] { cursor: pointer; }
.tk-row[role="button"]:hover { background: var(--soft); }
.tk-row:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.tk-row.tk-out { opacity: 0; transform: translateX(10px); }
.tk-row.tk-in { animation: tkIn .5s var(--ease); }
@keyframes tkIn { from { background: var(--blue-soft); } to { background: transparent; } }
.tk-g { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.tk-g svg { width: 17px; height: 17px; }
.tk-g.g-new { background: var(--blue-soft); } .tk-g.g-new i { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.tk-g.g-work { background: var(--soft); }
.tk-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--fg); animation: spin .8s linear infinite; }
.tk-g.g-rep { background: var(--soft); color: var(--fg-2); }
.tk-g.g-off { background: var(--soft); color: var(--faint); }
.tk-g.g-done { border: 1px solid var(--line-2); color: var(--faint); }
.tk-g.g-bad { background: rgba(220,38,38,.1); color: var(--bad); }
.tk-g.g-ask { background: rgba(245,158,11,.14); color: #b45309; }
.tk-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tk-main b { font-weight: 500; font-size: 15px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-main small { font-size: 13px; line-height: 1.4; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-dot { margin: 0 6px; color: var(--faint); }
.tk-row.is-done .tk-main b { color: var(--fg-2); font-weight: 400; }
.tk-row.is-off .tk-main b { color: var(--muted); }
.tk-row.is-bad small { color: var(--bad); }
.tk-err { color: var(--muted); }
.tk-row.is-ask small { color: #b45309; font-weight: 500; }
.tk-err, .tk-now { font-size: 12.5px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-now { color: var(--fg-2); }
.tk-prog { display: block; height: 3px; max-width: 220px; margin-top: 5px; border-radius: 2px; background: var(--soft-2); overflow: hidden; }
.tk-prog i { display: block; height: 100%; border-radius: 2px; background: var(--fg); transition: width .6s var(--ease); }
.tk-main .t-proj-tag { justify-self: start; margin: 3px 0 0; background: var(--soft); }
.tk-acts { flex: none; display: flex; align-items: center; gap: 2px; }
.tk-acts .tk-b { height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; margin-right: 4px; }
.tk-acts .icon-btn { width: 32px; height: 32px; border-radius: 9px; color: var(--faint); }
.tk-acts .icon-btn svg { width: 17px; height: 17px; }
.tk-row:hover .tk-acts .icon-btn { color: var(--fg-2); }
.tk-acts .icon-btn:hover { background: var(--soft-2); color: var(--fg); }
.tk-acts .tk-ok:hover { background: rgba(22,163,74,.12); color: var(--ok); }
.tk-acts .toggle { cursor: pointer; margin: 0 6px 0 2px; }
.tk-acts .toggle::before { content: ""; position: absolute; inset: -9px -4px; }
.tk-row.is-done .tk-b, .tk-row.is-working .tk-b { background: none; }
.tk-row.is-review:hover .tk-b[data-open], .tk-row.is-review:focus-visible .tk-b[data-open] { background: var(--dark); color: var(--on-dark); border-color: var(--dark); }
.tk-all { display: inline-flex; align-items: center; min-height: 36px; margin: 4px 2px 0; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.tk-all:hover { color: var(--fg); text-decoration: underline; }

.tk-empty { max-width: 860px; margin-top: 8px; padding: 44px 20px 30px; text-align: center; animation: rise .5s var(--ease); }
.tk-empty .es-ic, .tk-none .es-ic { width: 52px; height: 52px; border-radius: 16px; background: var(--soft); display: inline-grid; place-items: center; color: var(--fg-2); margin-bottom: 14px; }
.tk-empty .es-ic svg, .tk-none .es-ic svg { width: 24px; height: 24px; }
.tk-empty h3 { font-size: 18px; font-weight: 600; margin: 0 0 6px; }
.tk-empty p { max-width: 46ch; margin: 0 auto 18px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.tk-ex { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tk-ex button { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; line-height: 1.35; color: var(--fg-2); text-align: left; cursor: pointer; transition: background .2s, border-color .2s; }
.tk-ex button:hover { background: var(--soft); border-color: var(--faint); }
.tk-none { max-width: 860px; margin-top: 22px; padding: 34px 20px; text-align: center; border: 1px dashed var(--line-2); border-radius: 16px; }
.tk-none .es-ic { width: 44px; height: 44px; border-radius: 14px; margin-bottom: 10px; }
.tk-none b { display: block; font-size: 15.5px; font-weight: 600; }
.tk-none p { max-width: 44ch; margin: 4px auto 0; color: var(--muted); font-size: 14px; }

/* ideas to schedule: small, and folded once something is scheduled */
#view-tasks .suggest { max-width: 860px; margin-top: 30px; }
#view-tasks .sec-toggle { min-height: 36px; margin: 0 2px; font-size: 13.5px; font-weight: 600; color: var(--fg-2); cursor: pointer; }
#view-tasks .sec-toggle svg { width: 14px; height: 14px; color: var(--faint); }
#view-tasks .sug-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
#view-tasks .sug { align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border-radius: 14px; cursor: pointer; }
#view-tasks .sug > svg { width: 20px; height: 20px; margin: 0; color: var(--muted); }
#view-tasks .sug b { font-size: 14.5px; margin: 0; }
#view-tasks .sug .d { display: block; font-size: 13px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#view-tasks .sug > span { min-width: 0; }

/* the sidebar: how many results wait for you */
.side-nav a[data-nav="tasks"] { position: relative; }
.tk-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--blue); color: #fff; font-size: 11.5px; font-weight: 600; font-style: normal; display: inline-grid; place-items: center; line-height: 1; }
.tk-badge[hidden] { display: none; }
.side-nav a.tk-busy::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: breathe 1.4s infinite; }
.side-mini .tk-badge { position: absolute; top: 4px; right: 4px; min-width: 9px; width: 9px; height: 9px; padding: 0; font-size: 0; border: 2px solid var(--shell); box-sizing: content-box; }
.side-mini .side-nav a.tk-busy::after { position: absolute; top: 6px; right: 6px; margin: 0; }

@media (max-width: 700px) {
  .tk-new { padding-left: 14px; border-radius: 20px; }
  .tk-sched span:last-child { display: none; }
  .tk-sched { padding: 0 9px; }
  .tk-bar { margin-top: 20px; }
  .tk-row { gap: 11px; padding: 10px 8px 10px 11px; }
  .tk-g { width: 32px; height: 32px; }
  .tk-main b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .tk-main small { white-space: normal; }
  .tk-err, .tk-now { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .tk-acts .tk-b { padding: 0 12px; margin-right: 0; }
  .tk-row.is-review .tk-ok { display: none; }   /* on a phone, opening it is what marks it done */
  .tk-row [data-again] { display: none; }        /* "Try again" is in its menu */
  #view-tasks .sug-grid { grid-template-columns: minmax(0, 1fr); }
  .tk-ex button { font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) { .tk-spin { animation-duration: 2.4s; } .tk-row.tk-in, .tk-empty { animation: none; } }

/* ============ Frontal net (16 Nov 2026) ============
   Marc: "més net i estètic en general: les lletres, la tipografia, el disseny". One layer over everything above:
   a new typeface (Instrument Sans, SIL Open Font License, files in /web/fonts), warm neutrals instead of cold greys,
   calmer shapes. Nothing here changes what the app does. To go back to the look of before: delete this block. */
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/web/fonts/InstrumentSans-Latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/web/fonts/InstrumentSans-LatinExt.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("/web/fonts/InstrumentSans-Italic-Latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("/web/fonts/InstrumentSans-Italic-LatinExt.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---- the palette: warm paper and ink ---- */
:root {
  --font: "Instrument Sans", "Geist", ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, Arial, "Apple Color Emoji", sans-serif;
  --shell: #f8f7f4; --panel: #ffffff; --soft: #f5f4f0; --soft-2: #edebe6; --line: #eceae5; --line-2: #dddad3;
  --fg: #1a1917; --fg-2: #3a3935; --muted: #6b6861; --faint: #9f9c94; --dark: #1a1917; --on-dark: #ffffff;
  --shadow: 0 1px 2px rgba(26,25,23,.04), 0 12px 32px -12px rgba(26,25,23,.12);
  --shadow-lg: 0 32px 80px -24px rgba(26,25,23,.30), 0 0 0 1px rgba(26,25,23,.05);
  --h1: #c026d3; --h2: #7c3aed; --h3: #2563eb; --h4: #d97706; --h5: #0d9488;
}
:root[data-theme="dark"] {
  --shell: #151412; --panel: #1c1b19; --soft: #282724; --soft-2: #32302d; --line: #2e2d2a; --line-2: #413f3b;
  --fg: #efeeea; --fg-2: #d3d1cb; --muted: #a6a39b; --faint: #7f7c75; --dark: #efeeea; --on-dark: #1a1917;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -12px rgba(0,0,0,.5);
  --shadow-lg: 0 32px 80px -24px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.06);
  --h1: #e879f9; --h2: #a78bfa; --h3: #60a5fa; --h4: #fbbf24; --h5: #2dd4bf;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --shell: #151412; --panel: #1c1b19; --soft: #282724; --soft-2: #32302d; --line: #2e2d2a; --line-2: #413f3b;
  --fg: #efeeea; --fg-2: #d3d1cb; --muted: #a6a39b; --faint: #7f7c75; --dark: #efeeea; --on-dark: #1a1917;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -12px rgba(0,0,0,.5);
  --shadow-lg: 0 32px 80px -24px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.06);
  --h1: #e879f9; --h2: #a78bfa; --h3: #60a5fa; --h4: #fbbf24; --h5: #2dd4bf;
} }

/* ---- type: one family, mostly at its regular weight (simple and light), tighter headings ---- */
body { font: 15.5px/1.55 var(--font); letter-spacing: -.003em; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3 { letter-spacing: -.02em; }
/* the greeting: fine letters (Marc, 16 Nov: "aquestes lletres més fines"), regular weight, not too big */
.hello h1 { font-size: clamp(25px, 2.2vw, 31px); font-weight: 400; letter-spacing: -.028em; line-height: 1.18; }
.hello-row { gap: 11px; }
.hello-mark, .hello-mark .mark, .hello-mark svg { width: 25px; height: 25px; }
#view-chat:not(.has-msgs) .hello { margin-bottom: 30px; }
.hello-sub { font-size: 14.5px; line-height: 1.5; }

/* ---- sidebar: quieter rows ---- */
.side-nav a, .side-nav button { height: 36px; padding: 0 10px; gap: 10px; border-radius: 10px; font-size: 14.5px; color: var(--fg-2); }
.side-nav a:hover, .side-nav button:hover, .side-nav a.on { color: var(--fg); }
.side-nav [data-icon] svg { width: 17px; height: 17px; }
.side-sec { font-size: 12.5px; color: var(--faint); letter-spacing: .01em; }

/* ---- the model, top left: a soft pill ---- */
.model-pill { height: 34px; padding: 0 10px 0 9px; gap: 7px; border-radius: 999px; background: var(--soft); font-size: 14.5px; font-weight: 450; letter-spacing: -.01em; }
.model-pill:hover { background: var(--soft-2); }
.brand-pill #mpName { font-size: 14.5px; font-weight: 450; }
.brand-pill .mp-ic, .brand-pill .mp-ic .mark, .brand-pill .mp-ic svg, .brand-pill .mp-ic img { width: 17px; height: 17px; }
.model-pill .mp-chev svg { width: 14px; height: 14px; color: var(--faint); }

/* ---- the box: flat and soft until you are in it ---- */
.composer { border: 1px solid transparent; border-radius: 26px; background: var(--soft); box-shadow: none; transition: background .2s, border-color .2s, box-shadow .3s var(--ease); }
.composer:focus-within { background: var(--panel); border-color: var(--line-2); box-shadow: var(--shadow); }
:root[data-theme="dark"] .composer { background: var(--soft); box-shadow: none; }
:root[data-theme="dark"] .composer:focus-within { background: var(--soft); border-color: var(--line-2); box-shadow: var(--shadow); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .composer { background: var(--soft); box-shadow: none; }
  :root:not([data-theme="light"]) .composer:focus-within { background: var(--soft); border-color: var(--line-2); box-shadow: var(--shadow); } }
.composer textarea, .ph { font-size: 15.5px; letter-spacing: -.003em; }
.ph { color: var(--faint); }
.lvl-btn { font-size: 13.5px; color: var(--muted); }
.hint { font-size: 12px; color: var(--faint); }

/* ---- the box, one fine line (Marc, 16 Nov: "la barra més fina, com ChatGPT") ----
   + · the text · level · dictate · send, all on one row. It opens into two rows, as before, when the text takes more
   than one line (the script adds .tall), when a file is attached, or when web search / deep research is switched on. */
.composer { display: grid; grid-template-columns: auto auto auto minmax(0, 1fr) auto auto auto; align-items: center; padding: 7px 8px; border-radius: 28px; }
.composer > .attach-row { grid-column: 1 / -1; grid-row: 1; }
.composer > .c-line { display: contents; }
.composer > .c-input { grid-column: 4; grid-row: 2; min-width: 0; padding: 0 8px 0 6px; }
.composer textarea { min-height: 36px; padding: 6px 0; }
.c-input .ph { top: 6px; }
.composer .c-line > * { grid-row: 2; }
.composer .c-line > .plus-wrap { grid-column: 1; }
.composer .c-line > #webPill { grid-column: 2; margin-left: 4px; }
.composer .c-line > #researchPill { grid-column: 3; margin-left: 4px; }
.composer .c-line > .c-sp { display: none; }
.composer .c-line > .lvl { grid-column: 5; }
.composer .c-line > #micBtn { grid-column: 6; }
.composer .c-line > .send { grid-column: 7; margin-left: 4px; }
.composer .c-btn, .composer .send { width: 36px; height: 36px; }
.composer .lvl-btn { height: 36px; }
.composer.tall, .composer:has(.attach-row:not([hidden])), .composer:has(.web-pill:not([hidden])) { padding: 8px 8px 7px; border-radius: 26px; }
.composer.tall > .c-input, .composer:has(.attach-row:not([hidden])) > .c-input, .composer:has(.web-pill:not([hidden])) > .c-input { grid-column: 1 / -1; padding: 0 8px 4px; }
.composer.tall .c-line > *, .composer:has(.attach-row:not([hidden])) .c-line > *, .composer:has(.web-pill:not([hidden])) .c-line > * { grid-row: 3; }

/* ---- ideas to start: small tinted pills in a row, centred under the box ---- */
#view-chat:not(.has-msgs) .dock { display: flex; flex-direction: column; }
#view-chat:not(.has-msgs) .dock > * { width: 100%; }
#view-chat:not(.has-msgs) .dock > .starters { order: 2; }
#view-chat:not(.has-msgs) .dock > .coop-card { order: 3; }
#view-chat:not(.has-msgs) .dock > .share-foot, #view-chat:not(.has-msgs) .dock > .disclaim { order: 4; }
.starters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 720px; margin: 18px auto 0; padding: 0; }
.starters .st { --h: var(--muted); min-height: 0; height: 34px; padding: 0 14px 0 11px; gap: 7px; border-radius: 999px; font-size: 14px; font-weight: 400; color: var(--fg-2);
  background: var(--soft); background: color-mix(in srgb, var(--h) 8%, transparent); transition: background .18s, color .18s, transform .18s var(--ease); }
.starters .st svg { width: 16px; height: 16px; color: var(--h); }
.starters .st:hover, .starters .st:focus-visible { color: var(--fg); background: var(--soft-2); background: color-mix(in srgb, var(--h) 15%, transparent); }
.starters .st:active { transform: scale(.98); }
.starters .st:nth-child(1) { --h: var(--h1); } .starters .st:nth-child(2) { --h: var(--h2); } .starters .st:nth-child(3) { --h: var(--h3); } .starters .st:nth-child(4) { --h: var(--h4); }
/* "pick up where you left off": on its own line under the pills, as plain text */
.starters::before { content: ""; order: 1; flex: 0 0 100%; height: 0; margin-top: -8px; }
.starters .st.st-back { --h: var(--faint); order: 2; flex: 0 1 auto; max-width: 100%; min-width: 0; margin-top: 2px; background: none; font-weight: 400; color: var(--muted); }
.starters .st.st-back:hover, .starters .st.st-back:focus-visible { background: var(--soft); color: var(--fg); }

/* ---- Cooperation, under the ideas: one quiet line ---- */
.coop-card { max-width: 620px; margin: 16px auto 0; padding: 0; }
.cc-btn { gap: 12px; padding: 9px 9px 9px 12px; border-radius: 18px; background: transparent; border-color: var(--line); }
.cc-btn:hover { border-color: var(--line-2); box-shadow: none; background: var(--soft); }
.cc-logos i { width: 28px; height: 28px; }
.cc-logos svg { width: 15px; height: 15px; }
.cc-txt b { font-size: 14px; font-weight: 450; }
.cc-txt small { font-size: 13px; line-height: 1.4; }
.cc-go { height: 30px; padding: 0 13px; font-size: 13.5px; font-weight: 400; background: var(--panel); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }
.cc-btn:hover .cc-go { background: var(--dark); color: var(--on-dark); box-shadow: none; }

/* ---- the model menu ---- */
.modal { background: rgba(26,25,23,.30); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.picker-card { padding: 12px 12px 6px; border-radius: 22px; max-width: min(680px, calc(100vw - 24px)); }
.p-search { height: 46px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--soft); box-shadow: none; transition: background .2s, box-shadow .2s; }
.p-search:focus-within { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2); }
.p-search input { font-size: 15.5px; }
.p-search svg { width: 17px; height: 17px; color: var(--faint); }
.p-row { gap: 2px; padding: 10px 2px 0; }
.p-row button { height: 32px; padding: 0 11px; border-radius: 999px; font-size: 13.5px; color: var(--fg-2); }
.p-row button svg, .p-row .nm svg { width: 15px; height: 15px; }
.p-row button:hover { background: var(--soft); color: var(--fg); }
.p-row button.on { background: var(--soft-2); color: var(--fg); }
.p-caps button { color: var(--muted); }
.p-caps button svg { color: var(--faint); }
.p-caps button.on svg { color: currentColor; }
.p-sec { font-size: 11.5px; letter-spacing: .06em; color: var(--faint); padding: 14px 10px 6px; }
.p-item { gap: 12px; padding: 8px 10px; border-radius: 12px; }
.p-ic { width: 36px; height: 36px; border-radius: 10px; }
.p-ic svg, .p-ic .mark { width: 19px; height: 19px; }
.p-name { font-size: 14.5px; font-weight: 450; letter-spacing: -.005em; }
.p-desc, .by-lab .p-desc { display: block; margin-top: 1px; font-size: 12.5px; color: var(--muted); }
.p-desc:empty { display: none; }
.by-lab .pd-lab { display: none; }                  /* under a lab's heading its name is not repeated (10 Nov): only what the model can read */
.pd-lab + .pd-ctx::before { content: "·"; margin: 0 5px; color: var(--faint); }
.by-lab .pd-ctx::before { content: none; }
.p-meta .cost { font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.p-legend { font-size: 12px; padding: 12px 10px 8px; }

/* ---- what Neo makes, in the conversation: one card for everything (image, video, sound, music, file, web) ----
   Same width, same frame, the name on the left and the actions on the right. (The "Open in Studio" link shares a class
   name with the ideas to start, ".st": here it is just one more action, the same size as "Download".) */
.art, .art.media-big, .art.audio-card { max-width: 480px; border-radius: 18px; }
.art b { font-weight: 450; font-size: 14px; }
.art small { font-size: 12.5px; }
.art .dl, .art .dl.st, .media-bar .dl, .media-bar .dl.st { display: grid; place-items: center; width: 32px; height: 32px; min-height: 0; padding: 0; gap: 0; border-radius: 10px; background: none; color: var(--muted); }
.art .dl:hover, .art .dl.st:hover, .media-bar .dl:hover { background: var(--soft); color: var(--fg); }
.art .dl svg, .art .dl.st svg { width: 16px; height: 16px; color: currentColor; }
.art.image-big { grid-template-columns: minmax(0, 1fr) auto auto; gap: 0 2px; padding: 6px; max-width: 420px; }
.art.image-big .thumb { grid-column: 1 / -1; border-radius: 12px; }
.art.image-big .meta { display: block; min-width: 0; padding: 8px 6px 2px; }
.art.image-big .meta b { font-size: 13px; font-weight: 400; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art.image-big .meta small { display: none; }
.art.image-big .dl { margin-top: 6px; }
.media-bar { font-size: 13px; color: var(--muted); padding: 8px 6px 2px; }

/* ---- the conversation ---- */
.msg.user .bubble { border-radius: 20px; padding: 9px 15px; font-size: 15.5px; }
.md { font-size: 15.5px; line-height: 1.7; }
.md h1, .md h2 { font-size: 19px; letter-spacing: -.02em; }
.md h3 { font-size: 16.5px; letter-spacing: -.015em; }
.btn { letter-spacing: -.005em; }

/* 17 Nov 2026: the Library's space against the plan (neo/storage.py) — a thin bar under "171 items · 495.5 MB / 10 GB" */
.lib-space { margin: 10px 0 0; max-width: 320px; }
.lib-space-bar { height: 4px; border-radius: 999px; background: var(--line, rgba(0,0,0,.08)); overflow: hidden; }
.lib-space-bar i { display: block; height: 100%; border-radius: inherit; background: var(--fg); opacity: .55; transition: width .3s ease; }
.lib-space.almost .lib-space-bar i { background: #c27c0e; opacity: 1; }
.lib-space.full .lib-space-bar i { background: #c0392b; opacity: 1; }
.lib-space-note { margin: 8px 0 0 !important; font-size: 13px !important; color: var(--muted); max-width: none !important; }
.lib-space.full .lib-space-note { color: #c0392b; }

/* One NeoAI (25 Nov 2026): no level to pick - Neo decides how hard each request is */
body.one-neo #lvl, body.one-neo #defTierRow { display: none !important; }

/* ======================================================================================================================
   The file panel and the file cards (26 Nov 2026, Marc: "com ho fa Claude") - a click on a file opens it in a panel on
   the right of the chat; the cards in the chat are small: pictures and videos as tiles, everything else one line.
   ====================================================================================================================== */
:root { --side-w: min(48vw, 820px, calc(100vw - 740px)); }
@keyframes sideIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* the panel */
#viewer .viewer-card { position: relative; display: flex; flex-direction: column; overflow: hidden; }
#viewer .v-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
#viewer .v-ttl { position: relative; min-width: 0; flex: 1; }
#viewer .v-switch { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 8px; margin-left: -8px; border-radius: 10px; cursor: pointer; color: var(--fg); }
#viewer .v-switch:hover, #viewer .v-switch[aria-expanded="true"] { background: var(--soft-2); }
#viewer .v-switch h3 { margin: 0; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#viewer .v-switch .v-chev svg { width: 15px; height: 15px; color: var(--muted); }
#viewer .v-ic { width: 26px; height: 26px; flex: none; border-radius: 7px; background: var(--soft); display: grid; place-items: center; color: var(--fg-2); overflow: hidden; }
#viewer .v-ic svg { width: 15px; height: 15px; }
#viewer .v-ic img { width: 100%; height: 100%; object-fit: cover; }
#viewer #vMeta { margin: 0 0 0 34px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#viewer .v-acts { display: flex; align-items: center; gap: 2px; flex: none; }
#viewer .v-acts .icon-btn { width: 34px; height: 34px; }
#viewer .v-acts .icon-btn svg { width: 17px; height: 17px; }
#viewer .v-menu { position: absolute; top: 42px; left: -6px; z-index: 5; width: min(380px, 80vw); max-height: 60vh; overflow: auto; padding: 6px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); animation: pop .18s var(--ease); }
#viewer .v-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 10px; text-align: left; cursor: pointer; color: var(--fg); }
#viewer .v-menu button:hover, #viewer .v-menu button.on { background: var(--soft); }
#viewer .v-menu .v-mt { min-width: 0; display: grid; }
#viewer .v-menu b { font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#viewer .v-menu small { color: var(--muted); font-size: 12px; }
#viewer .v-menu .v-empty { padding: 10px; color: var(--muted); font-size: 13px; }
#viewer .v-body { flex: 1; min-height: 0; }
.v-resize { display: none; }

@media (min-width: 1000px) {
  /* beside the chat: no veil, the chat stays readable and usable */
  #viewer.modal { inset: 8px 8px 8px auto; width: var(--side-w); padding: 0; display: block; background: none; backdrop-filter: none; -webkit-backdrop-filter: none;
    z-index: 40; animation: sideIn .3s var(--ease); }
  #viewer .viewer-card { width: 100%; height: 100%; margin: 0; border-radius: 18px; border: 1px solid var(--line); box-shadow: none; }
  html.side-open .panel { margin-right: calc(var(--side-w) + 16px); transition: margin-right .3s var(--ease); }
  html.side-drag .panel, html.side-drag #viewer.modal { transition: none; animation: none; }
  html.side-drag iframe { pointer-events: none; }
  .v-resize { display: block; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 6; }
  .v-resize::after { content: ""; position: absolute; left: 2px; top: 50%; width: 3px; height: 36px; margin-top: -18px; border-radius: 3px; background: var(--line-2); opacity: 0; transition: opacity .2s; }
  .v-resize:hover::after, html.side-drag .v-resize::after { opacity: 1; }
}
@media (max-width: 999px) {
  /* a phone or a small window: a sheet over the chat */
  #viewer.modal { padding: 0; display: block; background: rgba(20,20,18,.36); }
  #viewer .viewer-card { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border-radius: 0; animation: sheet .35s var(--ease); }
}

/* the cards in the chat */
.arts { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.art.file-row { display: flex; align-items: center; gap: 12px; width: min(420px, 100%); max-width: 420px; padding: 8px 8px 8px 8px; border-radius: 14px; transform: none; }
.art.file-row:hover { transform: none; box-shadow: none; border-color: var(--line-2); background: var(--soft); }
.art.file-row .thumb { width: 42px; height: 42px; flex: none; border-radius: 10px; background: var(--soft); color: var(--fg-2); display: grid; place-items: center; }
.art.file-row:hover .thumb { background: var(--panel); }
.art.file-row .thumb svg { width: 19px; height: 19px; }
.art.file-row .thumb.ft-webpage { color: #2563eb; } .art.file-row .thumb.ft-pdf { color: #dc2626; } .art.file-row .thumb.ft-spreadsheet { color: #16a34a; }
.art.file-row .thumb.ft-document { color: #2b579a; } .art.file-row .thumb.ft-presentation { color: #c2410c; }
.art.file-row .meta { flex: 1; min-width: 0; display: grid; }
.art.file-row .meta b { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art.file-row .meta small { font-size: 12.5px; color: var(--muted); }
.art.file-row .row-acts { flex: none; display: flex; }
.art.tile { position: relative; display: block; padding: 0; overflow: hidden; border-radius: 14px; background: var(--soft); width: 168px; aspect-ratio: 1; transform: none; }
.art.tile:hover { transform: none; box-shadow: var(--shadow); }
.art.img-tile.big { width: min(360px, 100%); }
.art.vid-tile { width: min(300px, 100%); aspect-ratio: 16 / 9; background: #000; }
.art.tile img, .art.tile video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.art.tile .tile-play { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.5); color: #fff; backdrop-filter: blur(4px); }
.art.tile .tile-play svg { width: 18px; height: 18px; margin-left: 2px; }
.art.tile .tile-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; font-size: 12.5px; line-height: 1.3; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.6)); opacity: 0; transition: opacity .2s; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art.tile .tile-acts { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .2s; }
.art.tile .tile-acts .dl { background: rgba(255,255,255,.92); color: #1a1a19; border-radius: 9px; width: 30px; height: 30px; }
.art.tile:hover .tile-cap, .art.tile:hover .tile-acts, .art.tile:focus-visible .tile-cap, .art.tile:focus-visible .tile-acts { opacity: 1; }
@media (hover: none) { .art.tile .tile-acts { opacity: 1; } }
.art:focus-visible { outline: 2px solid var(--accent, #2563eb); outline-offset: 2px; }
.arts .art.audio-card { width: min(520px, 100%); }
/* with the file panel open the chat is narrower: its title steps aside instead of running under the buttons */
@media (min-width: 1000px) { html.side-open .chat-title { max-width: 26%; } }
@media (min-width: 1000px) and (max-width: 1500px) { html.side-open .chat-title { display: none; } }
#viewer .v-head { position: relative; z-index: 3; }
/* a picture or a video in the panel fills the room it has, keeping its shape */
#vBody .v-center { display: flex; align-items: center; justify-content: center; min-height: 100%; height: 100%; padding: 20px; box-sizing: border-box; }
#vBody .v-center img, #vBody .v-center video { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
#vBody.v-with-ask .v-center { height: auto; }
