:root {
  color-scheme: light;
  font-family: "Inter", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --bg: #f5f7fb;
  --ink: #17243d;
  --muted: #64738d;
  --border: #e3e9f3;
  --primary: #435cf3;
  --nav: #111b31;
  --nav-size: 236px;
  --base-radius: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--bg); min-width: 0; font-size: .875rem; }
a { color: #3e55d5; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
button { background: none; border: 0; }
:focus-visible { outline: 3px solid #5f87fd; outline-offset: 2px; }
#content:focus { outline: none; }
.sr-only, .skip:not(:focus) { position: absolute; height: 1px; width: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip:focus { z-index: 20; position: fixed; top: 10px; left: 10px; padding: 12px; background: white; border-radius: 8px; }
h1,h2,h3,p { margin: 0; }
h1 { font-size: clamp(1.65rem,2.5vw,2.15rem); font-weight: 760; letter-spacing: -.035em; }
h2 { font-size: 1.1rem; font-weight: 720; letter-spacing: -.02em; }
h3 { font-size: .95rem; }
small { font-size: .76rem; }
svg { flex-shrink: 0; vertical-align: middle; }
.layout { display: grid; grid-template-columns: var(--nav-size) minmax(0,1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100dvh; min-height: 0; overflow-y: auto; padding: 25px 16px 17px; background: var(--nav); color: #e8eefc; }
.brand { display: flex; align-items: center; gap: 11px; color: #fff; padding: 1px 6px 25px; }
.brand:hover, .nav-link:hover { text-decoration: none; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; display: inline-grid; place-items: center; color: white; background: linear-gradient(145deg,#6b7dff,#3e51ec); box-shadow: 0 4px 16px #3f53fd47; flex: none; }
.brand strong { display: block; font-size: 1.01rem; letter-spacing: .065em; }
.brand small { display: block; margin-top: 3px; color: #a8b5cf; font-size: .64rem; font-weight: 540; letter-spacing: .005em; }
.workspace { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid #303d57; border-radius: 10px; background:#1c2941; min-width: 0; }
.workspace-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: #293953; color:#c4d1ee; flex: none; }
.workspace strong,.workspace small,.account strong,.account small { display: block; overflow-wrap: anywhere; }
.workspace strong { font-size: .79rem; }
.workspace small,.account small { margin-top: 2px; color: #aab8d1; font-size: .68rem; }
.nav-title { color: #92a3c1; font-size: .69rem; font-weight: 650; margin: 28px 11px 10px; letter-spacing: .13em; }
.nav-link { display: flex; align-items: center; gap: 11px; min-height: 44px; margin: 3px 0; padding: 8px 10px; border-radius: 8px; color: #bac7dd; font-size: .85rem; font-weight: 550; }
.nav-link:hover { background:#263753; color:#fff; }
.nav-link.active { background:#2b3d7c; color: #f3f6ff; box-shadow: inset 3px 0 #8697ff; }
.nav-link.active svg { color:#c5d0fe; }
.nav-count { margin-left: auto; min-width: 21px; padding: 2px 5px; text-align: center; border-radius: 7px; color: #ffdfa4; background:#483b33; font-size: .69rem; }
.sidebar-foot { margin-top: auto; padding-top: 30px; }
.side-status { margin: 0 8px 15px; font-size: .71rem; color:#aab8d1; display: flex; gap: 7px; align-items: center; }
.side-status i, .hero-status i, .sandbox-chip i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #36c99e; }
.account { width: 100%; min-height: 53px; border: 1px solid #2c3b54; border-radius: 9px; padding: 8px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; text-align: left; color: #e8eefc; }
.account:hover { background: #24344d; }
.account strong { font-size: .76rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-size: .78rem; font-weight: 730; }
.side-avatar { background:#353e71; color:#dbdfff; }
.tone-0 { background:#e8eafe; color:#485ac3; }
.tone-1 { background:#def5ee; color:#138070; }
.tone-2 { background:#fff0dd; color:#aa6422; }
.tone-3 { background:#e3efff; color:#3669b5; }
.topbar { height: 64px; display:flex; align-items:center; justify-content: space-between; gap: 12px; background: white; border-bottom: 1px solid var(--border); padding: 0 clamp(16px,3vw,38px); }
.breadcrumbs,.top-actions { display: flex; min-width:0; align-items: center; gap: 11px; color: var(--muted); }
.breadcrumbs strong { color:var(--ink); font-size: .82rem; }
.breadcrumbs span { font-size: .81rem; }
.slash { color: #a1acc0; }
.sandbox-chip { display: inline-flex; gap: 6px; align-items:center; color:#5d617e; background:#f2f2f9; padding: 6px 10px; border: 1px solid #e9eaf3; border-radius: 20px; font-size: .71rem; white-space: nowrap; }
.sandbox-chip i { height:6px; width:6px; background:#7a6cdc; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; color:#596783; border-radius: 8px; position: relative; }
.icon-btn:hover { background:#edf1fb; color:#4054b4; }
.bell i { position:absolute; width: 7px; height: 7px; background:#f29d52; border-radius: 50%; right: 7px; top: 7px; outline: 2px solid white; }
.menu-btn,.mobile-back,.overlay { display: none; }
#content { max-width: 1580px; margin: 0 auto; padding: 28px clamp(16px,3vw,38px) 38px; }
.page-heading { display:flex; align-items:center; justify-content:space-between; gap: 16px; margin-bottom: 22px; }
.page-heading p, .panel-head p { margin-top: 6px; color:var(--muted); line-height: 1.48; }
.heading-actions { display:flex; align-items:center; gap: 9px; flex-wrap:wrap; flex: none; }
.button { display: inline-flex; justify-content: center; align-items:center; gap: 8px; min-height: 40px; padding: 8px 13px; font-weight: 640; text-align:center; line-height: 1.3; border-radius: 8px; border: 1px solid #dce4f0; background:#fff; color:var(--ink); white-space: nowrap; }
.button:hover { background:#f2f5ff; text-decoration:none; }
.button:disabled { cursor: wait; opacity:.62; }
.button.primary { background:var(--primary); border-color:var(--primary); color:white; box-shadow: 0 3px 6px #405af025; }
.button.primary:hover { background:#334bcc; }
.button.small { min-height: 34px; padding: 6px 10px; font-size: .78rem; }
.select-button { padding: 0 11px; }
select { max-width: 100%; }
.select-button select { width: auto; padding: 9px 0; border:0; background:transparent; appearance:none; font-weight: 630; }
.hero { display: flex; align-items:center; position:relative; isolation:isolate; min-height: 137px; overflow:hidden; background:linear-gradient(110deg,#e9eeff 0%,#ebf1ff 53%,#e8edff 100%); border:1px solid #dfe6fb; border-radius:var(--base-radius); padding:22px 25px; margin-bottom:18px; }
.hero>div:first-child { z-index:1; }
.hero h2 { margin:8px 0 4px; color:#233577; font-size:1.45rem; letter-spacing:-.035em; }
.hero p { color:#505f85; line-height:1.6; }
.hero-status { color:#2a5b69; font-size:.7rem; font-weight:650; display:inline-flex; align-items:center; gap:6px; }
.hero-status .off { background:#f49b53; }
.hero-art { width:265px; height:137px; position:absolute; top:50%; transform:translateY(-50%); right:6%; }
.orbit { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%) rotate(-15deg); border-radius:50%; border:1px solid #b4c2f7; width:240px; height:80px; }
.o2 { height:124px; width:270px; border-color:#c4cef8; }
.o3 { height:165px; width:300px; border-color:#d0d9f9; }
.hero-art span { position:absolute; display:grid; place-items:center; box-shadow:0 8px 19px #4a61ad2c; }
.art-main { width:74px;height:74px; left:37%; top:21%; transform:rotate(-11deg); border-radius:22px; color:white; background:linear-gradient(145deg,#7890ff,#5065f5); }
.art-star { top:7%; left:73%; width:40px;height:40px; border-radius:12px; background:white; color:#676efa; transform:rotate(11deg); }
.art-tick { top:61%; left:15%; width:35px;height:35px; border-radius:10px; background:#d4fbf0; color:#218371; transform:rotate(8deg); }
.metrics { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:13px; margin-bottom:18px; }
.metric { min-width:0; padding:13px 13px 12px; background:white; border:1px solid var(--border); border-radius:12px; box-shadow:0 2px 5px #23346404; }
.metric>div { display:flex; justify-content:space-between; gap:5px; align-items:center; color:#54637d; font-size:.77rem; font-weight:650; }
.metric-icon { display:inline-grid; place-items:center; border-radius:9px; width:33px; height:33px; flex:none; }
.indigo { background:#eceeff;color:#4b5cf1; }.teal { background:#e4f8f4;color:#078476; }.amber{background:#fff2de;color:#a6661a;}.green{background:#e4f7eb;color:#167e51;}.blue{background:#e8f1ff;color:#2d64c1;}.slate{background:#eaf0f8;color:#526891;}
.metric>strong { display:block; font-size:clamp(1.23rem, 2vw, 1.7rem); margin:6px 0 3px; line-height:1.25; letter-spacing:-.04em; white-space:normal; overflow-wrap:anywhere; }
.metric small { font-size:.69rem; color:var(--muted); line-height:1.45; display:block; overflow-wrap:anywhere; }
.metric em { font-style:normal; color:#178963; font-weight:700; }
.dashboard-grid { display:grid; grid-template-columns:minmax(0,1.8fr) minmax(0,1fr); gap:16px; }
.panel { background:white; border:1px solid var(--border); border-radius:var(--base-radius); min-width:0; box-shadow:0 2px 5px #23346404; }
.panel-head { padding:17px 17px 11px; display:flex; justify-content:space-between; gap:12px; align-items:center; }
.panel-head p { margin-top:4px; font-size:.76rem; }
.panel-body { padding:13px 17px 18px; min-width: 0; }
.chart-key { display:flex; gap:15px; justify-content:flex-end; margin:0 19px 5px; color:var(--muted); font-size:.69rem; }
.chart-key span { display:flex; align-items:center; gap:5px; }
.chart-key i { width:14px; height:3px; border-radius:3px; background:#506afb; }
.chart-key span+span i { background:#25bfa6; }
.line-chart { display:block; width:calc(100% - 26px); margin:0 13px 12px; max-height:240px; overflow:visible; }
.line-chart text { fill:#63708a; font-size:12px; }
.gridline { stroke:#e5ebf5;stroke-width:1;stroke-dasharray:4 4; }
.donut-layout { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:4px 18px 14px; gap:10px; }
.donut { background:var(--chart); border-radius:50%; width:128px; height:128px; display:grid; place-items:center; }
.donut>div { display:grid; align-content:center; text-align:center; width:100px;height:100px;border-radius:50%;background:white; }
.donut b { font-size:1.31rem; letter-spacing:-.04em; }.donut span{font-size:.65rem;color:var(--muted);}
.donut-legend { list-style:none;margin:0;padding:0;width:100%;max-width:290px; }
.donut-legend li { display:grid;grid-template-columns:1fr auto 37px; gap:12px;align-items:center; padding:4px 1px; font-size:.78rem; }
.donut-legend li span,.channel-label { display:inline-flex;align-items:center;gap:7px; }
.donut-legend li i,.channel-label i { height:8px;width:8px;border-radius:50%;background:var(--dot);flex:none; }
.donut-legend li small { color:var(--muted); font-size:.69rem; text-align:right; }
.latest,.channel-health,.settings-grid { margin-top:16px; }
.quiet-link { display:inline-flex;align-items:center;gap:6px;font-size:.78rem;font-weight:670;white-space:nowrap; }
.table-scroll { overflow:auto; }
table { border-collapse:collapse; width:100%; line-height:1.45; }
th,td { padding:10px 17px;text-align:left;border-bottom:1px solid #edf1f7; }
th { color:#536279;background:#f8faff;font-size:.74rem;white-space:nowrap;font-weight:650; }
td { font-size:.8rem; }
tr:last-child td { border-bottom:0; }
td.ellipsis { max-width:26ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.person { display:inline-flex;align-items:center;gap:8px;color:var(--ink);white-space:nowrap; }
.pill { display:inline-flex;align-items:center;gap:5px; padding:4px 8px;border-radius:14px;white-space:nowrap;font-size:.7rem;line-height:1.2;background:#edf0f6;color:#54637a;font-weight:650; }
.pill i { width:6px;height:6px;border-radius:50%;background:currentColor; }
.status-ai { background:#e9edff;color:#414db2; }.status-human,.status-paid,.status-service,.status-marketing { background:#e2f6ed;color:#157254; }
.status-waiting,.status-pending { background:#fff0d9;color:#915716; }.status-error,.status-refunded,.status-withdrawn { background:#fce9e9;color:#993d49; }
.inbox-grid { display:grid;grid-template-columns:minmax(230px,.84fr) minmax(0,2.8fr);gap:13px; }
.inbox-detail { display:grid;grid-template-columns:minmax(0,1fr) minmax(173px,.47fr);gap:13px;min-width:0; }
.inbox-list { overflow:hidden; }
.search-box { display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid #dbe3f0;border-radius:8px;background:white;color:#66748c;min-width:0; }
.search-box input { border:0;outline:none;padding:5px 0;width:100%;min-width:0;background:transparent; }
.search-box:focus-within { outline:2px solid #6680ef; }
.inbox-list .search-box { margin:12px 12px 8px; }.list-filters { display:flex;gap:6px;padding:0 12px 10px; }
.list-filters select { min-width:0;width:50%;padding:6px 3px;font-size:.73rem; }
.conversation-list { max-height:599px;overflow:auto; }
.conversation-row { position:relative;display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;padding:11px;color:var(--ink);border-top:1px solid #eef1f7; }
.conversation-row.selected { background:#eef2ff;box-shadow:inset 3px 0 #526ef5; }
.conversation-row:hover { background:#f0f4ff;text-decoration:none; }
.conversation-row strong,.conversation-row small { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.conversation-row strong { padding-right:35px;font-size:.81rem; }.conversation-row small { color:var(--muted);margin:4px 0; }
.conversation-row time { position:absolute;top:12px;right:9px;font-size:.65rem;color:var(--muted); }
.list-meta { display:flex;align-items:center;gap:6px; flex-wrap:wrap;color:#657389;font-size:.65rem; }
.list-meta .pill { font-size:.64rem;padding:3px 5px; }
.inbox-empty { display:grid;place-content:center;justify-items:center;min-height:370px;text-align:center;gap:9px;padding:18px;color:var(--muted); }
.inbox-empty h2 { color:var(--ink); }.inbox-empty .metric-icon { width:52px;height:52px;border-radius:15px; }
.chat { display:flex;flex-direction:column;min-height:480px;max-height:688px; }
.chat-head { display:flex;align-items:center;gap:10px;padding:14px 14px 10px;border-bottom:1px solid var(--border); }
.chat-head>div { min-width:0; flex:1; }.chat-head>div>span { color:var(--muted);font-size:.73rem; }
.chat-head h2 { overflow-wrap:anywhere; }.chat-actions { display:flex;flex-wrap:wrap;gap:5px;padding:8px 10px;border-bottom:1px solid var(--border); }
.chat-history { overflow:auto; flex:1; min-height:180px; padding:13px;background:#f8faff; scroll-padding:15px; }
.message { margin-bottom:13px;display:grid;justify-items:start; }.message.ai,.message.human{justify-items:end;}
.message-meta { font-size:.66rem;color:#5e6e86;margin:0 1px 4px; }.message-meta time { margin-left:4px; }
.bubble { padding:8px 11px;border:1px solid #e4ebf5;border-radius:3px 11px 11px 11px;background:white;max-width:92%;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6; }
.ai .bubble,.human .bubble { background:#e9eeff;border-color:#e0e6fb;border-radius:11px 3px 11px 11px; }
.note .bubble { background:#fff3df;border-color:#fae7ca; }
.message details { margin-top:5px; color:var(--muted);font-size:.72rem;max-width:100%;overflow-wrap:anywhere; }
.message-cards { display:grid;gap:5px;max-width:100%;min-width:0; }.message-cards:empty { display:none; }
.product-mini { display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:7px;margin:5px 0 0;padding:6px 9px;border:1px solid var(--border);background:white;border-radius:8px;overflow-wrap:anywhere; }
.mini-art,.product-mini img { display:grid;place-items:center;border-radius:6px;width:40px;height:40px;background:#e9efff;color:var(--primary);object-fit:cover; }
.product-mini small,.product-mini strong {display:block;}.product-mini small{font-size:.68rem;color:var(--muted);}
.sales-cards { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,215px),1fr));gap:10px;margin-block:10px;max-width:620px; }
.sales-cards .product-mini { display:block;margin:0;padding:10px; }
.sales-cards .product-mini img,.sales-cards .mini-art { width:100%;height:auto;aspect-ratio:4/3;object-position:center 30%;margin-bottom:8px; }
.sales-cards .product-mini small { margin-top:3px; }
.sale-card-price { display:block;margin-block:5px 2px; }
.sales-offer { padding:10px 12px;border:1px solid var(--border);border-radius:8px;background:#f8faff;max-width:620px; }
.sales-subtotal { display:flex;justify-content:space-between;align-items:baseline;gap:10px; flex-wrap:wrap; }
.sales-offer small { color:var(--muted); }
.sales-action { margin:10px 0; }
.text-btn,.product-mini a { color:#3b53cf;padding:1px 0;font-size:.72rem;font-weight:650; }.text-btn:hover{text-decoration:underline;}
.composer { display:flex;align-items:end;gap:7px;padding:10px;border-top:1px solid var(--border); }
.composer textarea { flex:1;min-width:0; }.composer-info { padding:12px;color:var(--muted);font-size:.76rem;display:flex;gap:7px;align-items:start; }
.context { padding-bottom:13px; align-self:start; }.context dl,.context details,.context>.button { margin:0 12px 10px; }.context dd { overflow-wrap:anywhere; }
.context dt,.definitions dt { font-weight:670;font-size:.77rem;margin:0 0 4px; }.context dd,.definitions dd{ margin:0 0 12px; color:var(--muted);line-height:1.55;white-space:pre-line;overflow-wrap:anywhere; }
.log,.table-note { display:block;font-size:.72rem;color:var(--muted);margin:5px 0 0;overflow-wrap:anywhere; }
.split { display:grid;grid-template-columns: minmax(0,1fr) minmax(0,1fr);gap:15px;align-items:start; }
.field { display:grid;gap:6px;font-weight:620;font-size:.81rem;margin-bottom:13px;color:#3b4963; }
input,select,textarea { min-width:0;max-width:100%;border:1px solid #dbe3f0;border-radius:8px;background:#fff;padding:9px 10px; }
textarea { resize:vertical;line-height:1.5; }
.field :is(input,select,textarea) { width:100%; }
.field.inline { display:flex;align-items:center;gap:7px;margin:0; }
.field-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }
.panel-body h3 { margin:15px 0 8px; }.skills { display:flex;flex-wrap:wrap;gap:7px; }
.skills span { display:inline-flex;align-items:center;gap:4px;background:#edf2ff;color:#4052a2;border-radius:7px;padding:6px;font-size:.75rem; }
.rules { margin:0;padding-left:18px;line-height:1.75;color:var(--muted); }
.result { margin-top:11px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65; }.muted {color:var(--muted); }
.toolbar { display:flex;gap:12px;justify-content:space-between;margin-bottom:14px; }.toolbar .search-box { width: min(100%,450px); }
.callout { display:flex;align-items:center;gap:9px;border:1px solid #dbe6fb;background:#eef3ff;color:#394f85;padding:10px;border-radius:8px;margin:0 0 13px;line-height:1.5; }
.products,.connections { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px; }.products {grid-template-columns:repeat(3,minmax(0,1fr));}
.product { overflow:hidden; }.product-image { width:100%;height:174px;display:grid;place-items:center; }.product-image img{width:100%;height:100%;object-fit:cover;}
.product-info { padding:14px; }.product-info h2 { margin:6px 0 3px;overflow-wrap:anywhere; }.sku {color:var(--muted);font-size:.75rem;overflow-wrap:anywhere;}
.price-row { display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin:10px 0; }.price-row span { color:var(--muted);font-size:.75rem; }
.connection { padding:13px; }.connection-head { display:flex;align-items:center;gap:8px;margin-bottom:9px; }.connection-head h2{font-size:.92rem;overflow-wrap:anywhere;}.connection-head small{color:var(--muted);}
.channel-icon { display:grid;place-items:center;width:37px;height:37px;border-radius:9px;background:color-mix(in srgb,var(--channel) 16%,white);color:#28374e;font-size:.75rem;font-weight:800;flex:none; }
.connection p { color:var(--muted);line-height:1.5;margin:8px 0 12px;overflow-wrap:anywhere; }
.funnel { display:grid;gap:13px; }.funnel-label { display:flex;justify-content:space-between;gap:10px;font-size:.8rem;margin-bottom:5px; }.funnel-label small{margin-left:6px;color:var(--muted); }
.funnel-bar { background:#eef2fa;height:10px;border-radius:6px;overflow:hidden; }.funnel-bar i { display:block;height:100%;width:var(--bar);background:hsl(calc(232 - var(--step)*7) 74% calc(57% + var(--step)*2%));border-radius:6px;}
.empty,.loading { padding:28px;text-align:center;color:var(--muted);line-height:1.7; }.empty>h2,.empty .button {margin-top:8px;}
dialog { width:min(470px,calc(100vw - 28px));max-height:calc(100dvh - 30px);border:1px solid var(--border);border-radius:15px;background:white;color:var(--ink);padding:17px;box-shadow:0 16px 80px #0d164867; }
dialog::backdrop { background:#131c39a0; } .dialog-top { display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:12px; }.dialog-top h2{overflow-wrap:anywhere;}
dialog p { margin:0 0 12px;line-height:1.55; }.dialog-actions { display:flex;gap:7px;justify-content:flex-end;flex-wrap:wrap; }
.notice-list { display:grid;gap:4px; }.notice-list a{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--ink);border-top:1px solid var(--border);padding:9px 2px;}
.notice-list small { display:block;color:var(--muted);margin-top:3px; }
#toast { position:fixed;inset:auto 17px 17px auto;z-index:12;display:none;align-items:center;gap:8px;max-width: min(440px,calc(100vw - 34px));padding:11px 14px;background:#183e36;color:white;border-radius:9px;box-shadow:0 5px 18px #0a254c35; }
#toast.visible { display:flex; }#toast.failure{background:#883a46;}
.login { min-height:100dvh;display:grid;place-items:center;padding:20px; }.login .panel { width:min(100%,388px);padding:25px; }.login h1{margin:9px 0 4px;}.login p{color:var(--muted);margin-bottom:17px;}
@media(max-width:1240px) {
  :root{--nav-size:205px;}
  .metric{padding:11px 10px;}.metrics{gap:9px;}
  .inbox-detail { grid-template-columns: minmax(0,1fr); }.inbox-detail .context{grid-column:1;}
}
@media(max-width:1040px) {
  .metrics{grid-template-columns:repeat(3,minmax(0,1fr));}
  .connections{grid-template-columns:repeat(2,minmax(0,1fr));}
  .hero-art{right:2%;}
}
@media(max-width:790px) {
  .layout{display:block;}.menu-btn{display:inline-grid;}
  .sidebar{position:fixed;inset:0 auto 0 0;width:min(270px,85vw);z-index:8;visibility:hidden;transform:translateX(-100%);}
  .sidebar.open{visibility:visible;transform:translateX(0);}
  .overlay:not([hidden]){display:block;position:fixed;inset:0;z-index:7;background:#131b3790;}
  .topbar{height:55px;}
  #content{padding-top:19px;}
  .page-heading{margin-bottom:14px;}
  .inbox-grid{grid-template-columns:minmax(210px,.85fr) minmax(0,1.65fr);}
}
@media(max-width:580px) {
  .breadcrumbs{gap:6px;}.breadcrumbs>span{display:none;}.top-actions{gap:3px;}
  .page-heading{align-items:flex-start;flex-direction:column;gap:10px;}.heading-actions{max-width:100%;flex:none;}
  .hero{padding:15px;min-height:117px;}.hero h2{font-size:1.17rem;}.hero p{font-size:.79rem;max-width:70%;}
  .hero-art{transform:translateY(-50%) scale(.50); transform-origin:right center;right:2px;opacity:.7;}
  .metrics{grid-template-columns:repeat(2,minmax(0,1fr));}
  .dashboard-grid,.split{grid-template-columns:minmax(0,1fr);gap:12px;}
  .donut-layout{flex-direction:row;justify-content:flex-start;gap:15px;}.donut{flex:none;width:100px;height:100px;}.donut>div{width:77px;height:77px;}
  .inbox-grid{grid-template-columns:minmax(0,1fr);}.inbox-grid.has-selected .inbox-list{display:none;}.inbox-empty{display:none;}
  .mobile-back.button{display:inline-flex;}.chat-head{flex-wrap:wrap;}.chat-head .mobile-back{flex-basis:100%;justify-content:flex-start;margin-bottom:2px;}
  .chat{min-height:440px;max-height:min(730px,85dvh);}.chat-history{min-height:140px;}
  .toolbar{flex-wrap:wrap;}.toolbar .search-box { width:100%; }.products {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
  .product-image{height:115px;}.product-info{padding:9px;}.product-info h2{font-size:.87rem;}.product-info .button{white-space:normal;}
  .connection{padding:10px;}.connections{gap:8px;}.connection-head{align-items:start;}.connection-head h2{font-size:.78rem;}
  th,td{padding:8px 11px;}
}
@media(max-width:355px) {
  .donut-layout{flex-direction:column;}
  .heading-actions .button{white-space:normal;}
}

.model-panel .panel-body { padding-top:.2rem; }
.model-panel .panel-head p { margin:.3rem 0 .15rem; }
.model-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.65rem; margin:0 0 1.1rem; }
.model-tabs button { display:flex; text-align:left; align-items:center; gap:.65rem; background:var(--paper,#fff);
  border:1px solid var(--line,#dce3ed); border-radius:10px; padding:.64rem .65rem; min-width:0; color:inherit; }
.model-tabs button:hover,.model-tabs button[aria-pressed="true"] { border-color:#5470ee; background:#eef2ff; }
.model-tabs button>span:last-child { min-width:0; }
.model-tabs strong,.model-tabs small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.model-tabs small { color:#546483; margin-top:.15rem; }
.model-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:1.15rem; }
.model-editor,.model-usage { min-width:0; border:1px solid var(--line,#dce3ed); border-radius:12px; padding:.95rem; }
.model-title,.model-usage-head { display:flex; justify-content:space-between; align-items:flex-start; gap:.55rem; flex-wrap:wrap; }
.model-title h3,.model-usage h3 { margin:0 0 .25rem; font-size:1rem; }
.model-title p { margin:.22rem 0 .8rem; }
.model-checkbox { display:flex; align-items:center; gap:.5rem; margin:.55rem 0; }
.model-checkbox input { width:auto; margin:0; accent-color:#475ee9; }
.model-actions,.model-period { display:flex; flex-wrap:wrap; align-items:center; gap:.45rem; }
.model-actions { margin:.9rem 0 .35rem; }
.model-period .button[aria-pressed="true"] { background:#e9eeff; border-color:#7589ea; }
.model-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.55rem; margin:.85rem 0; }
.model-metrics div { background:#f3f6fb; border-radius:8px; padding:.55rem; min-width:0; }
.model-metrics dt { color:#536482; font-size:.78rem; }
.model-metrics dd { margin:.23rem 0 0; overflow-wrap:anywhere; font-weight:650; }
.model-metrics small { font-weight:400; }
.model-usage td,.model-usage th { padding:.6rem .4rem; overflow-wrap:anywhere; }
.model-usage td small { color:#516280; }
.model-errors { margin:.7rem 0 0; font-size:.88rem; }
.model-errors p,.model-note { margin:.4rem 0; overflow-wrap:anywhere; }
.advisor-test-controls { display:flex;align-items:center;gap:10px;flex-wrap:wrap; }
.advisor-test-controls .field { min-width:0;flex:1 1 16rem;margin:0; }
.advisor-test-controls select { max-width:100%; }
.advisor-test-history { max-height:36rem;margin-top:12px;border:1px solid var(--border);border-radius:10px; }
.test-evidence { width:min(100%,42rem);font-size:.8rem;margin:6px 0 0;color:var(--muted);overflow-wrap:anywhere; }
.test-evidence details,.test-evidence ul { margin:5px 0 5px 12px; }
.test-evidence pre { white-space:pre-wrap;overflow-wrap:anywhere;margin:0; }
#brand-persona { margin:12px 0; }
#brand-persona>summary { font-weight:650; }
@media(max-width:950px) { .model-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:680px) { .model-grid { grid-template-columns:minmax(0,1fr); } }
@media(max-width:360px) { .model-tabs { grid-template-columns:minmax(0,1fr); } }
.channel-vault { margin-bottom: 1rem; }
.channel-vault-clear { display: flex; gap: .45rem; align-items: center; margin: -.3rem 0 .85rem; }
.channel-vault-clear input { inline-size: auto; }
