/* Linda styles on top of tokens.css + app.css; light and dark follow the QLX AI Hub */
.nav-item img{width:17px;height:17px}
.nav-item .badge{margin-left:auto}
.send-btn{width:40px;height:40px;flex:none;border:0;border-radius:var(--r-md);background:var(--accent);display:flex;align-items:center;justify-content:center;cursor:pointer}
.send-btn img{filter:invert(1)}
.btn:disabled{opacity:.55;cursor:default}
.btn{cursor:pointer}
.tabs{display:flex;gap:6px;flex-wrap:wrap;margin:18px 0 14px}
.stack{display:flex;flex-direction:column;gap:14px}
.row{display:flex;gap:14px;flex-wrap:wrap;align-items:flex-start}
.row>*{flex:1;min-width:0}
.muted{color:var(--muted)}
.label{font:600 11px var(--font-ui);letter-spacing:.06em;color:var(--muted);text-transform:uppercase;margin-bottom:6px}
.big-title{font:400 34px/1.1 var(--font-display);color:var(--ink);margin:0}
.idea{width:100%;min-height:130px;border:1px solid var(--border-strong);border-radius:var(--r-md);padding:14px;font:400 16px/1.5 var(--font-ui);color:var(--ink);background:var(--card);resize:vertical}
.steps{display:flex;gap:8px;flex-wrap:wrap}
.step{display:inline-flex;align-items:center;gap:6px;font:500 12px var(--font-ui);padding:4px 10px;border-radius:999px;border:1px solid var(--border);background:var(--bg2);color:var(--muted)}
.step.running{background:var(--accent-wash);border-color:var(--accent-border);color:var(--accent-deep)}
.step.done{background:var(--ok-wash);border-color:#bfe0d2;color:var(--ok)}
.step.failed,.step.skipped{background:var(--warn-wash);color:var(--warn)}
.spin{width:10px;height:10px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.frame{width:100%;height:720px;border:1px solid var(--border);border-radius:var(--r-md);background:#fff}
table.t{width:100%;border-collapse:collapse;font-size:13px}
table.t th{text-align:left;font:600 11px var(--font-ui);letter-spacing:.05em;color:var(--muted);text-transform:uppercase;border-bottom:1px solid var(--border);padding:8px 6px}
table.t td{border-bottom:1px solid var(--row);padding:8px 6px;vertical-align:top}
.count{font:500 11px var(--font-mono);color:var(--muted)}
.count.over{color:var(--bad)}
pre.code{background:#131311;color:#E4E8FB;border-radius:var(--r-md);padding:14px;font:400 12px/1.5 var(--font-mono);overflow:auto;white-space:pre-wrap;margin:0}
.social-text{white-space:pre-wrap;font-size:14px;line-height:1.55;color:var(--ink2)}
.thumb{width:100%;aspect-ratio:3/2;object-fit:cover;border-radius:var(--r-md);border:1px solid var(--border);background:var(--row)}
.camp-card{cursor:pointer;display:flex;flex-direction:column;gap:10px;text-decoration:none;color:inherit}
.camp-card:hover{border-color:var(--accent-border)}
.grid3{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
.ok-note{background:var(--ok-wash);color:var(--ok);border-radius:var(--r-md);padding:10px 12px;font-size:13px}
.err-note{background:var(--bad-wash);color:var(--bad);border-radius:var(--r-md);padding:10px 12px;font-size:13px}
.signin{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;background:var(--paper)}
.signin .card{width:100%;max-width:420px;padding:28px}
.signin input{width:100%;min-height:42px;border:1px solid var(--border-strong);border-radius:var(--r-md);padding:0 12px;font:400 14px var(--font-ui);margin-top:6px;background:var(--bg2)}
.chips-ex{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}

/* ---- chat home ---- */
body.chat-mode .shell{grid-template-columns:232px 1fr}
body.chat-mode .shell>aside{display:none}
body.chat-mode .shell>main{padding:0;display:flex;flex-direction:column;min-height:0;overflow:hidden}
.chat-list{display:flex;flex-direction:column;gap:2px;max-height:38vh;overflow:auto}
.chat-link{display:block;padding:7px 10px;border-radius:var(--r-md);font-size:13px;color:var(--ink2);text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:1px solid transparent}
.chat-link.active,.chat-link:hover{background:var(--accent-wash);border-color:var(--accent-border);color:var(--accent-deep)}
.chat-scroll{flex:1;overflow:auto;padding:28px 24px}
.chat-col{max-width:820px;margin:0 auto;display:flex;flex-direction:column;gap:16px}
.bubble-me{align-self:flex-end;max-width:78%;background:var(--accent-wash);border:1px solid var(--accent-border);color:var(--ink);border-radius:14px 14px 4px 14px;padding:10px 14px;white-space:pre-wrap;font-size:15px;line-height:1.5}
.bot{display:flex;gap:12px;align-items:flex-start}
.bot-avatar{width:30px;height:30px;flex:none;border-radius:8px;background:var(--card);border:1px solid var(--border);display:flex;align-items:center;justify-content:center}
.bot-avatar img{width:22px;height:auto}
.md{font-size:15px;line-height:1.6;color:var(--ink2);min-width:0}
.md p{margin:0 0 10px}.md p:last-child{margin-bottom:0}
.md ul{margin:4px 0 10px;padding-left:20px}.md li{margin:3px 0}
.md code{font:400 13px var(--font-mono);background:var(--bg2);border:1px solid var(--border);border-radius:4px;padding:1px 5px}
.md a{color:var(--accent);word-break:break-all}
.tool{border:1px solid var(--border);background:var(--card);border-radius:var(--r-lg);padding:12px 14px;font-size:14px;display:flex;flex-direction:column;gap:10px}
.tool-head{display:flex;align-items:center;gap:10px}
.tool-head img{width:16px;height:16px}
.tool.done{border-color:#bfe0d2}
.tool.error{border-color:#eab5aa;background:var(--bad-wash)}
.tool-links{display:flex;gap:14px;flex-wrap:wrap;align-items:center;line-height:1.4;margin-top:2px}
.tool-links a{font-size:13px;line-height:1.4;display:inline-flex;align-items:center}
.tool-camp{display:flex;gap:14px;align-items:flex-start}
.tool-camp img.thumb{width:180px;flex:none}
.composer{border-top:1px solid var(--border);background:var(--card);padding:14px 24px 18px}
.composer-row{max-width:820px;margin:0 auto;display:flex;gap:10px;align-items:flex-end}
.composer textarea{flex:1;min-height:48px;max-height:220px;resize:none;border:1px solid var(--border-strong);border-radius:12px;padding:13px 14px;font:400 15px/1.45 var(--font-ui);color:var(--ink);background:var(--bg2)}
.composer .send-btn,.composer .attach-btn{width:48px;height:48px;border-radius:12px}
.composer-note{max-width:820px;margin:8px auto 0;font-size:11px;color:var(--muted)}
.empty{max-width:820px;margin:8vh auto 0;display:flex;flex-direction:column;gap:14px}
.suggest{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.suggest button{text-align:left;background:var(--card);border:1px solid var(--border);border-radius:var(--r-lg);padding:12px 14px;font:400 14px/1.45 var(--font-ui);color:var(--ink2);cursor:pointer}
.suggest button:hover{border-color:var(--accent-border);background:var(--accent-wash)}
.gbtn{min-height:44px;margin-top:6px}
@media (max-width:900px){body.chat-mode .shell{grid-template-columns:1fr}.suggest{grid-template-columns:1fr}.tool-camp{flex-direction:column}.tool-camp img.thumb{width:100%}}

/* ---- launch card ---- */
.pick-list{display:flex;flex-direction:column;gap:8px}
.pick-row{display:flex;gap:10px;align-items:flex-start;font-size:14px;line-height:1.4;cursor:pointer}
.pick-row input,.pick-chans input{width:16px;height:16px;margin-top:2px;accent-color:var(--accent)}
.pick-sub{display:flex;gap:12px;align-items:center;flex-wrap:wrap;font-size:13px}
.pick-chans{display:flex;gap:14px;flex-wrap:wrap}
.pick-chans label{display:flex;gap:6px;align-items:center;cursor:pointer}
.pick-sub input[type=number]{border:1px solid var(--border-strong);border-radius:6px;padding:5px 8px;font:400 13px var(--font-ui)}

/* the right-hand edit panel only makes sense on a campaign */
body.no-aside .shell{grid-template-columns:232px 1fr}
body.no-aside .shell>aside{display:none}
@media (max-width:900px){body.no-aside .shell{grid-template-columns:1fr}}

/* ⋯ menus on chats and campaigns */
.chat-item{position:relative;display:flex;align-items:center;border-radius:var(--r-md);border:1px solid transparent}
.chat-item .chat-link{flex:1;min-width:0;border:0}
.chat-item.active,.chat-item:hover{background:var(--accent-wash);border-color:var(--accent-border)}
.chat-item.active .chat-link,.chat-item:hover .chat-link{background:none;color:var(--accent-deep)}
.dots{position:relative;flex:none}
.dots-btn{border:0;background:none;cursor:pointer;font-size:16px;line-height:1;padding:4px 7px;border-radius:6px;color:var(--muted)}
.dots-btn:hover{background:var(--bg2);color:var(--ink)}
.chat-item .dots-btn{opacity:0}.chat-item:hover .dots-btn,.chat-item.active .dots-btn{opacity:1}
.dots-menu{position:fixed;z-index:200;flex-direction:column;min-width:130px;background:var(--card);border:1px solid var(--border);border-radius:var(--r-md);box-shadow:var(--shadow);padding:4px}
.dots-menu button{border:0;background:none;text-align:left;padding:8px 10px;font:400 13px var(--font-ui);color:var(--ink2);border-radius:6px;cursor:pointer}
.dots-menu button:hover{background:var(--bg2)}
.dots-menu button.danger{color:var(--bad)}

/* post editor */
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(380px,1fr));gap:14px}
@media (max-width:560px){.grid2{grid-template-columns:1fr}}

/* calendar (Social Hub design: chips show time, channel dots, status by border) */
.cal-wrap{display:flex;gap:16px;align-items:flex-start}
.cal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px}
.cal-head{font:500 12px var(--font-ui);color:var(--muted);padding:0 2px}
.cal-cell{background:var(--card);border:1px solid var(--border);border-radius:6px;min-height:106px;padding:6px;display:flex;flex-direction:column;gap:4px;min-width:0}
.cal-cell.wknd{background:var(--bg2)}
.cal-cell.out{opacity:.45}
.cal-cell.today{border:1.5px solid var(--accent)}
.cal-date{font:400 11px var(--font-mono);color:var(--muted)}
.cal-chip{display:flex;align-items:center;gap:5px;background:var(--bg2);border:1px solid var(--border);border-radius:4px;padding:3px 5px;font-size:11px;color:var(--ink2);text-decoration:none;min-width:0}
.cal-chip .cal-t{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cal-chip.scheduled{border-color:var(--accent-border);background:var(--accent-wash)}
.cal-chip.failed{border-color:var(--bad);background:var(--bad-wash)}
.cal-chip.approved{border-style:dashed}
.cal-chip:hover{border-color:var(--accent)}
.cal-dots{display:flex;gap:2px;flex:none}.cal-dots .dot{width:6px;height:6px}
.cal-side{width:260px;flex:none}
.cal-pending{display:flex;gap:8px;align-items:flex-start;text-decoration:none;color:inherit;padding:6px;border-radius:6px;border:1px dashed var(--border-strong)}
.cal-pending:hover{background:var(--bg2)}
.cal-pending img{width:56px;aspect-ratio:3/2;object-fit:cover;border-radius:4px;flex:none}
.cal-pt{font-size:13px;color:var(--ink);font-weight:600;overflow:hidden;text-overflow:ellipsis}
@media (max-width:1000px){.cal-wrap{flex-direction:column}.cal-side{width:100%}}
/* post view: tabs, copy, platform preview */
.pv-cols{display:flex;gap:14px;flex-wrap:wrap;align-items:flex-start}
.pv-ask{flex:1;min-width:260px;min-height:38px;border:1px solid var(--border-strong);border-radius:8px;padding:0 12px;font:400 14px var(--font-ui);background:var(--bg2)}
.pv-when{min-height:36px;border:1px solid var(--border-strong);border-radius:8px;padding:0 8px;font:400 13px var(--font-ui);background:var(--bg2)}
.pp{background:#fff;border:1px solid #e0e0e0;border-radius:8px;overflow:hidden;font:400 14px/1.45 -apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:#191919}
.pp-head{display:flex;gap:9px;align-items:flex-start;padding:10px 12px}
.pp-av{width:38px;height:38px;border-radius:6px;object-fit:contain;background:#f3f2ef;border:1px solid #e0e0e0;flex:none;padding:4px}
.pp-av.round{border-radius:50%}
.pp-name{font-weight:600;font-size:14px}.pp-sub{font-weight:400;font-size:12px;color:#666}
.pp-text{padding:0 12px 10px;white-space:pre-wrap;word-break:break-word}
.pp-img{display:block;width:100%;height:auto;max-height:none;object-fit:contain;background:#f3f2ef}.pp-img.square{aspect-ratio:auto}  /* whole image, like the platforms */
.pp-bar{display:flex;justify-content:space-around;border-top:1px solid #e8e8e8;padding:8px 6px;font-size:13px;color:#555}
.pp-x .pp-head{padding-bottom:4px}.pp-x .pp-text{padding:4px 0 8px}.pp-x .pp-img{border-radius:14px;border:1px solid #e1e8ed}
.pp-ig .pp-text{padding:0 12px 12px}.pp-ig .pp-bar{justify-content:flex-start;gap:14px;border:0;padding:8px 12px;font-size:17px}
.cal-cell.drop{outline:2px dashed var(--accent);outline-offset:-2px}
.cal-chip[draggable=true]{cursor:grab}
.bot{position:relative}
.copy-btn{align-self:flex-start;border:1px solid var(--border);background:var(--card);border-radius:6px;font:400 11px var(--font-ui);color:var(--muted);padding:2px 7px;cursor:pointer;opacity:0}
.bot:hover .copy-btn{opacity:1}

/* post view: edit column scrolls on the left, preview fills the right */
body:has(.pv-page:not(.pv-embed)) .shell>main{padding:0;overflow:hidden}
.pv-page{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,40%);height:calc(100vh - 60px)}
.pv-main{overflow-y:auto;padding:20px 24px 32px;min-width:0}
.pv-side{border-radius:0;border-width:0 0 0 1px;overflow-y:auto;padding:18px 20px;gap:10px;background:var(--bg2)}
.pv-side .pp{box-shadow:0 1px 3px rgba(0,0,0,.06)}
.pv-copy{min-height:clamp(220px,42vh,560px);font-size:14px;line-height:1.55}
@media (max-width:1000px){.pv-page{grid-template-columns:1fr;height:auto}.pv-side{border-width:1px 0 0}body:has(.pv-page) .shell>main{overflow:auto}}
.pp-tag{color:#0a66c2}.pp-ig .pp-tag{color:#00376b}.pp-x .pp-tag{color:#1d9bf0}
.pp-head.ig{align-items:center;padding:10px 12px}.pp-head.ig .pp-av{width:32px;height:32px}
.ig-icons{display:flex;gap:16px;align-items:center;padding:10px 12px 6px;font-size:22px;line-height:1;color:#262626}
/* X and Instagram previews in dark mode, as they appear for QLX */
.pp.dark{background:#000;border-color:#2f3336;color:#e7e9ea}
.pp.dark .pp-sub,.pp.dark .muted{color:#71767b}
.pp.dark .pp-bar{border-color:#2f3336;color:#71767b}
.pp.dark .pp-av{background:#fff;border-color:#2f3336}
.pp-x .pp-head{padding:12px 14px 6px}.pp-x .pp-name{font-weight:700;font-size:15px}
.pp-x .pp-text{padding:4px 14px 12px;font-size:16px;line-height:1.35}
.pp-x .pp-img{border-radius:16px;border:1px solid #2f3336;margin:0 14px;width:calc(100% - 28px)}
.pp-ig.dark .ig-icons{color:#f5f5f5}.pp-ig.dark .pp-tag{color:#e0f1ff}.pp-ig.dark .pp-sub[style*="border-top"]{border-color:#262626!important}
/* Facebook: page header, blue links and hashtags, image letterboxed on dark */
.pp-fb .pp-tag{color:#0064d1}.pp-fb .pp-name{font-size:15px}
.fb-media{background:#0b1a33;display:flex;justify-content:center}.fb-media .pp-img{width:auto;max-width:100%;max-height:520px}
/* versions + team mail modal */
.ver-row{border-top:1px solid var(--row);padding-top:8px;font-size:13px}.ver-row:first-child{border-top:0;padding-top:0}
.diff-del{color:var(--muted)}.diff-add{background:var(--accent-border);padding:0 2px;border-radius:3px}
.modal-wrap{position:fixed;inset:0;z-index:100;background:rgba(17,17,17,.45);display:flex;align-items:center;justify-content:center;padding:20px}
.modal-card{background:var(--card);border-radius:12px;box-shadow:var(--shadow);width:min(760px,100%);max-height:94vh;overflow:auto;padding:18px}
.pager{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-top:10px}
.chip.on{background:var(--ink);color:var(--card);border-color:var(--ink)}
.chip:disabled{opacity:.4;cursor:default}
.suggest button{display:flex;flex-direction:column;gap:4px}.suggest button b{color:var(--ink);font-weight:600}.suggest button span{font-size:13px}
.suggest .cap-main{grid-column:1/-1;border-color:var(--accent-border);background:var(--accent-wash)}
.tool-camp .muted{line-height:1.45}
.tool-head.clickable{cursor:pointer;border-radius:6px}.tool-head.clickable:hover b{text-decoration:underline}
.tool-open{margin-left:auto;font-size:12px;color:var(--accent);white-space:nowrap}
#assistant-log [style*="margin-left:42px"]{margin-left:0!important}#assistant-log .bubble-me{max-width:92%}#assistant-log .bot{gap:8px}
#assistant-log{overflow-x:hidden!important}#assistant-log>*,#assistant-log .bot>*,#assistant-log .stack>*{min-width:0}#assistant-log .bot div,#assistant-log .bubble-me{overflow-wrap:anywhere}
#assistant-log .tool{padding:10px 12px}#assistant-log .tool-camp{display:block}#assistant-log .tool-camp img.thumb{display:none}#assistant-log .tool-camp .stack{gap:4px}#assistant-log .tool-open{display:none}
.t.compact td{padding:5px 6px;font-size:13px}
.pp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:16px;align-items:start}
.topic-chips{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 0 42px}.topic-chips .chip{font-size:13px;padding:8px 12px;text-align:left}
@media (max-width:640px){.topic-chips{margin-left:0}.topic-chips .chip{width:100%}}
.ads-live{margin-top:14px;border-top:1px solid var(--border);padding-top:12px}.stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px}.stat-v{font:600 18px var(--font-ui);color:var(--ink)}.stat-k{font-size:12px;color:var(--muted)}
.pv-embed{height:auto;border:1px solid var(--border);border-radius:var(--r-lg);background:var(--card)}
.pv-embed{height:auto}.pv-embed .pv-main,.pv-embed .pv-side{overflow:visible}
@media (min-width:1001px){.pv-embed{grid-template-columns:minmax(0,1fr) minmax(320px,42%)}.pv-embed .pv-side{position:sticky;top:0;align-self:start;max-height:calc(100vh - 80px);overflow-y:auto}}
.camp-card{display:flex;flex-direction:column;gap:10px}.camp-head{display:flex;gap:6px;align-items:flex-start}
.camp-title{flex:1;min-width:0;font:600 15px/1.3 var(--font-ui);color:var(--ink);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.6em}
.camp-meta{display:flex;gap:6px;align-items:center;margin-top:auto;white-space:nowrap;overflow:hidden;font-size:12px}.camp-meta .badge.type{background:var(--bg2);color:var(--ink2)}.camp-date{margin-left:auto}
/* pages that fill the window and scroll inside (Leads), like EMU home */
body:has(.fill-page) .shell>main{overflow:hidden}.fill-page{height:100%;display:flex;flex-direction:column;min-height:0}.fill-page>.fill,.fill-page .fill{flex:1;min-height:0;display:flex;flex-direction:column}.fill-scroll{flex:1;min-height:0;overflow:auto;border:1px solid var(--border);border-radius:var(--r-md)}
.t.sticky-head th{position:sticky;top:0;background:var(--card);z-index:1}
/* dark mode (AI Hub look): sidebar like the Hub's, light icons, white logo, sans headings */
html[data-theme="dark"] body{background:var(--paper)}
html[data-theme="dark"] .shell>nav{background:#11121A;border-color:rgba(255,255,255,.06)}
html[data-theme="dark"] img[src*="lucide-static"]{filter:invert(.9)}
html[data-theme="dark"] :not(.pp-head)>img[src*="qlx-mark"],html[data-theme="dark"] :not(.pp-head)>img[src*="qlx-logo"]{filter:brightness(0) invert(1)}
html[data-theme="dark"] .big-title{font-weight:700;letter-spacing:-.02em}
html[data-theme="dark"] .frame{background:#fff}
#theme-toggle{border:0;background:none;cursor:pointer;padding:6px;border-radius:8px}#theme-toggle:hover{background:var(--bg2)}
/* Google search ad preview (Google's own light look in both themes) */
.gad{background:#fff;border:1px solid #dadce0;border-radius:12px;padding:16px 18px;max-width:640px;font-family:Arial,Helvetica,sans-serif;color:#202124}
.gad-top{display:flex;gap:10px;align-items:center}.gad-fav{width:26px;height:26px;border-radius:50%;background:#e8f0fe;color:#1a73e8;display:grid;place-items:center;font:700 13px Arial}
.gad-name{font-size:14px;color:#202124}.gad-url{font-size:12px;color:#4d5156}
.gad-sp{font:700 12px Arial;color:#202124;margin:8px 0 2px}
.gad-title{font-size:20px;line-height:26px;color:#1a0dab;margin:2px 0 4px}.gad-desc{font-size:14px;line-height:22px;color:#4d5156}
/* dark mode: LinkedIn and Facebook previews in their own dark themes (X and Instagram already are) */
html[data-theme="dark"] .pp-li{background:#1B1F23;border-color:#38434F;color:rgba(255,255,255,.9)}
html[data-theme="dark"] .pp-li .pp-sub,html[data-theme="dark"] .pp-li .muted{color:rgba(255,255,255,.6)}
html[data-theme="dark"] .pp-li .pp-bar{border-color:#38434F;color:rgba(255,255,255,.6)}
html[data-theme="dark"] .pp-li .pp-tag{color:#71B7FB}
html[data-theme="dark"] .pp-fb{background:#242526;border-color:#3E4042;color:#E4E6EB}
html[data-theme="dark"] .pp-fb .pp-sub,html[data-theme="dark"] .pp-fb .muted{color:#B0B3B8}
html[data-theme="dark"] .pp-fb .pp-bar{border-color:#3E4042;color:#B0B3B8}
html[data-theme="dark"] .pp-fb .pp-tag{color:#4599FF}
html[data-theme="dark"] .pp-li .pp-av,html[data-theme="dark"] .pp-fb .pp-av{background:#fff}
/* phones and tablets (Clive at G2E on an iPhone or iPad) */
@media (max-width:760px){
  .t{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .topbar .badge.info{display:none}
  .shell>main{padding:14px}
  .big-title{font-size:30px}
  .tabs{overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch}.tabs .chip{flex:none}
  .gad{padding:12px 14px}.gad-title{font-size:18px;line-height:24px}
  .pv-main{padding:14px}
}
.input{height:36px;padding:0 10px;border:1px solid var(--border-strong);border-radius:var(--r-md);background:var(--card);color:var(--ink);font:400 14px var(--font-ui)}
@media (max-width:760px){
  .crumb{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1}
  .t.sticky-head th:nth-child(5),.t.sticky-head td:nth-child(5){display:none}
  .t td,.t th{white-space:nowrap}
  .input{flex:1;min-width:0}
}
@media (max-width:760px){
  .tabs{align-items:center;scrollbar-width:none}.tabs::-webkit-scrollbar{display:none}
  .tabs>span.muted{display:none}
}
.chip,.btn{white-space:nowrap}
/* iOS: 100vh is taller than what Safari shows; dvh is the visible height */
.shell{height:100dvh}.signin{min-height:100dvh}
.pv-page{height:calc(100dvh - 60px)}
@media (max-width:1000px){.pv-page{height:auto}}
/* Embedded in the QLX AI Hub (?embed=1): the Hub gives the chrome; Linda keeps a compact menu and her side panel */
.embed-nav{display:none;gap:2px;margin-left:8px}.embed-nav a{padding:6px 10px;border-radius:8px;font-size:13px;color:var(--ink2);text-decoration:none}.embed-nav a:hover{background:var(--bg2)}
body.embed .embed-nav{display:flex}
body.embed .shell>nav,body.embed #open-nav,body.embed .topbar .badge.info{display:none!important}
body.embed .shell{grid-template-columns:minmax(0,1fr) 320px}
body.embed.chat-mode .shell,body.embed.no-aside .shell{grid-template-columns:minmax(0,1fr)}
body.embed .topbar,body.embed .shell>main{grid-column:1}
body.embed .shell>aside{grid-column:2;grid-row:1/3}
@media (max-width:900px){body.embed .shell{grid-template-columns:minmax(0,1fr)}body.embed .embed-nav a{padding:6px 7px}}
body.embed .crumb{display:none}
.gad-body{display:flex;gap:14px;align-items:flex-start}.gad-body>div{flex:1;min-width:0}.gad-img{width:92px;height:92px;object-fit:cover;border-radius:8px;flex:none}
.attach-btn{border:1px solid var(--border-strong);background:var(--bg2);border-radius:var(--r-md);width:40px;height:40px;display:grid;place-items:center;cursor:pointer;flex:none}.attach-btn img{opacity:.7}.attach-chips{display:flex;gap:6px;flex-wrap:wrap}.attach-chips:not(:has(.chip)){display:none}.composer>.attach-chips{max-width:820px;margin:0 auto 8px}.bubble-me .attach-chips{margin-top:6px}.chip-x{border:0;background:none;cursor:pointer;font-size:14px;line-height:1;padding:0 0 0 4px;color:var(--muted)}

/* Linda widget (2026-09-26): the assistant floats over every page but Chat instead of taking a column */
.linda-fab{position:fixed;right:22px;bottom:22px;z-index:61;width:58px;height:58px;border-radius:50%;border:0;padding:0;cursor:pointer;
  background:var(--accent,#1a56db);box-shadow:0 6px 20px rgba(0,0,0,.22);display:grid;place-items:center;overflow:hidden}
.linda-fab img{filter:invert(1)}
body.signed-out .linda-fab,body.chat-mode .linda-fab,body.widget-open .linda-fab{display:none}
body.widget-open:not(.chat-mode):not(.signed-out) .shell>aside{display:flex!important;position:fixed;right:22px;bottom:22px;top:auto;left:auto;
  width:380px;height:min(560px,calc(100vh - 44px));z-index:62;border:1px solid var(--border);border-radius:16px;box-shadow:0 12px 40px rgba(0,0,0,.25);
  transform:none!important;visibility:visible!important;grid-column:auto;grid-row:auto;padding:14px 14px 12px}
body:not(.chat-mode) .shell>main{padding-bottom:96px}
#open-aside{display:none!important}
@media (max-width:900px){
  body.widget-open:not(.chat-mode):not(.signed-out) .shell>aside{left:0;right:0;bottom:0;width:auto;height:85vh;border-radius:16px 16px 0 0}
  .linda-fab{right:16px;bottom:16px;width:54px;height:54px}
  #assistant-input,.composer textarea{font-size:16px!important}   /* under 16px iPhone Safari zooms in on tap */
}
.spend-bar{height:8px;border-radius:4px;background:var(--bg2);overflow:hidden}.spend-bar>span{display:block;height:100%;background:var(--accent,#1a56db);border-radius:4px}

/* Light mode = the QLX AI Hub's light theme (QlxAI frontend/src/styles/themes.scss and the MUI theme in App.tsx):
   Inter, blue #3B82F6, white cards on a light gray page, gray borders. Linda reads as part of the Hub (2026-09-26). */
:root{
  --paper:#F3F4F6; --card:#FFFFFF; --bg2:#F9FAFB;
  --border:#E5E7EB; --border-strong:#D1D5DB; --row:#F3F4F6;
  --ink:#111827; --ink2:#374151; --muted:#6B7280;
  --accent:#3B82F6; --accent-deep:#2563EB; --accent-wash:#EFF6FF; --accent-border:#BFDBFE;
  --ok:#059669; --ok-wash:#ECFDF5; --warn:#D97706; --warn-wash:#FFFBEB; --bad:#DC2626; --bad-wash:#FEF2F2;
  --font-display:'Inter',system-ui,sans-serif; --font-ui:'Inter',system-ui,sans-serif;
  --r-lg:12px; --r-xl:16px;
  --shadow:0 10px 25px rgba(17,24,39,.08);
}
.big-title,.h-display{font-weight:700;letter-spacing:-.02em}
.crumb{font-family:var(--font-ui);font-size:13px}
textarea:focus,input:focus,select:focus{outline:none;border-color:var(--accent)!important;box-shadow:0 0 0 3px rgba(59,130,246,.2)}
/* iPhone Safari let the page scroll a little past the app (2026-09-26): Home opened with the top bar and its menu
   button above the screen. Every screen scrolls inside main, so on phones the app is pinned to the screen. */
@media (max-width:900px){.shell{position:fixed;inset:0;height:auto}}
