:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:15px;color-scheme:light;--bg:#fcfcfc;--surface:#fff;--soft:#f3f3f3;--bubble:#e9eaeb;--user:#b8dbfe;--text:#161617;--muted:#77797e;--line:#e5e5e7;--accent:#0783fa;--shadow:0 2px 12px #0000000d}
:root[data-theme=dark]{color-scheme:dark;--bg:#181819;--surface:#242425;--soft:#242425;--bubble:#303031;--user:#173b62;--text:#f5f5f6;--muted:#a1a1a7;--line:#343435;--accent:#4b9eff;--shadow:0 2px 12px #0003}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]){color-scheme:dark;--bg:#181819;--surface:#242425;--soft:#242425;--bubble:#303031;--user:#173b62;--text:#f5f5f6;--muted:#a1a1a7;--line:#343435;--accent:#4b9eff;--shadow:0 2px 12px #0003}}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}button,input,textarea,select{font:inherit;color:inherit}button{cursor:pointer;border:0;border-radius:10px;padding:9px 14px;background:var(--soft)}button:hover{filter:brightness(.96)}button:disabled{cursor:default;opacity:.45}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}[hidden]{display:none!important}svg{width:22px;height:22px;flex:none;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}.icon-button{width:36px;height:36px;padding:7px;display:inline-grid;place-items:center;background:transparent;flex:none}.primary{background:var(--accent);color:#fff}.muted,.hint{color:var(--muted)}h1,h2,h3,p{overflow-wrap:anywhere}h1{font-size:32px;font-weight:600;letter-spacing:-.7px}h2{font-size:18px;font-weight:550}h3{font-size:16px;font-weight:550}p{line-height:1.55}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
#shell{display:flex;height:100dvh;overflow:hidden}.rail{width:72px;flex:none;border-right:1px solid var(--line);display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;padding-bottom:100px}.rail nav{display:flex;flex-direction:column;gap:12px}.rail button{width:44px;height:44px;background:transparent;border-radius:50%;padding:11px}.rail button[aria-current=true]{background:var(--soft)}.rail button span{display:none}.rail-bottom{position:absolute;bottom:16px;display:flex;flex-direction:column;gap:12px}#sidebar{width:240px;flex:none;border-right:1px solid var(--line);padding:12px;overflow:auto;display:flex;flex-direction:column}.sidebar-top{display:flex;align-items:center;gap:4px}.search-field{display:flex;gap:8px;align-items:center;min-width:0;border:1px solid var(--line);border-radius:24px;padding:8px 12px;background:var(--surface)}.search-field svg{width:17px;height:17px;color:var(--muted)}.search-field input{min-width:0;width:100%;border:0;background:transparent;font-size:14px;outline:none}.side-heading{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:14px;padding:4px 4px 4px 8px}.side-heading button{background:transparent;color:var(--muted);width:25px;height:25px;padding:4px}.side-heading button:hover{background:var(--soft)}.side-heading svg{width:16px;height:16px}#thread-filter{color:var(--muted)}.thread-row{display:flex;align-items:center;margin:1px 0;border-radius:8px;min-width:0}.thread-row.current{background:var(--soft)}.thread-select{background:transparent;text-align:left;font-size:14px;line-height:20px;padding:8px 12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1}.thread-row .icon-button{width:26px;height:28px;padding:4px;opacity:0}.thread-row:hover .icon-button,.thread-row:focus-within .icon-button{opacity:1}#main-thread-row{margin:12px 0 2px;flex:none}#thread-filters{display:flex;flex-wrap:wrap;gap:4px;margin-top:8px}#thread-filters button{font-size:12px;padding:6px 9px}#thread-filters button[aria-current=true]{color:var(--accent)}.sidebar-footer{margin-top:auto;padding:24px 8px 0;font-size:11px;color:var(--muted);display:grid;gap:4px}
main{flex:1;min-width:0;position:relative;display:flex;flex-direction:column}#chat-header{height:80px;flex:none;display:flex;justify-content:center;align-items:center;position:relative}#chat-header h1{position:absolute;left:24px;font-size:14px;font-weight:500;letter-spacing:0;color:var(--muted);max-width:65%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-title-pill{display:contents}#sidebar-toggle{display:none}.avatar{width:46px;height:46px;border-radius:50%;display:inline-grid;place-items:center;font:30px Georgia,serif;color:#4c6280;background:radial-gradient(circle at 35% 25%,#f6f0ff,#d4e5f7 65%,#b9c9e8);box-shadow:inset 0 0 0 1px #d5dfec}.avatar.large{width:104px;height:104px;font-size:66px}#error{margin:0 24px;color:#d95858;font-size:13px;white-space:pre-wrap}#error:empty{display:none}#chat-view{display:flex;flex-direction:column;flex:1;min-height:0}#chat-scroll{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;padding:8px max(24px,calc((100% - 780px)/2)) 20px}#transcript{min-height:100px}.empty-chat{min-height:45vh;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;color:var(--muted)}.empty-chat h2{font-size:25px;color:var(--text);font-weight:500;letter-spacing:-.6px}.empty-chat p{max-width:330px;font-size:14px}.message{margin:6px 0 22px;display:flex;flex-direction:column;align-items:flex-start;position:relative}.message.user{align-items:flex-end}.bubble{max-width:88%;background:var(--bubble);border-radius:22px;padding:14px 16px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:22px}.user .bubble{background:var(--user)}.message-tools{display:flex;gap:1px;margin:5px 8px 0;color:var(--muted);align-items:center}.message-tools button{padding:4px;width:26px;height:26px;background:transparent}.message-tools svg{width:16px;height:16px}.message-tools .reaction{width:auto;min-width:26px;background:var(--soft);font-size:12px}.reaction-tray{display:flex;background:var(--surface);box-shadow:var(--shadow);padding:5px;border-radius:18px;border:1px solid var(--line);gap:3px}.reaction-tray button{padding:6px;background:transparent}.quoted{margin:0 0 10px;border-left:3px solid var(--accent);padding-left:9px;max-height:80px;overflow:hidden;font-size:13px;color:var(--muted)}.file-chip{display:block;border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin-top:10px;font-size:13px;background:var(--surface);text-align:left}.card{border:1px solid var(--line);background:var(--surface);border-radius:18px;padding:18px;margin:12px 0;overflow-wrap:anywhere}.card p{margin:8px 0}.card pre{white-space:pre-wrap;font:inherit;font-size:13px;max-height:240px;overflow:auto}.card button{margin:8px 8px 0 0}.approve{background:var(--accent);color:#fff}.card small{color:var(--muted);display:block}#turn-state{font-size:12px;color:var(--muted);padding:8px 0;overflow-wrap:anywhere}.composer-dock{padding:10px 16px 8px;margin:0 auto;width:100%;max-width:900px}#composer{display:flex;align-items:flex-end;gap:10px;padding:11px 12px;border-radius:32px;background:var(--surface);box-shadow:0 2px 14px #00000012;border:1px solid var(--line)}#message{display:block;resize:none;min-height:36px;max-height:180px;width:100%;border:0;background:none;line-height:1.5;padding:7px 0;outline:none}#message::placeholder{color:var(--muted)}.attach{position:relative;cursor:pointer}.attach input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.hint{font-size:11px;text-align:center;margin:8px 0 0}.hint button{font-size:11px;border:0;padding:0;background:none;text-decoration:underline}#file-names{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:7px;font-size:12px;color:var(--muted)}#file-names:empty{display:none}#reply-preview{display:flex;justify-content:space-between;align-items:center;padding:8px 14px;background:var(--soft);border-radius:12px;margin-bottom:8px;font-size:13px}#reply-preview span{max-height:48px;overflow:hidden}
.page-view{overflow-y:auto;flex:1;padding:16px 32px 48px;width:100%;max-width:832px;margin:auto}.page-view h1{margin:26px 0 12px}.page-view>p{margin-bottom:28px}.page-view #preview:empty{display:none}#preview{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--soft);border-radius:12px;padding:20px}#gaps li{line-height:1.6;margin:16px 0}.file-card{display:flex;gap:14px;align-items:center}.file-card>svg{width:36px;height:36px;color:var(--muted)}.file-card p{font-size:12px;color:var(--muted)}.file-card .file-info{flex:1;min-width:0}.file-card button{margin:0}.page-mode #sidebar,.page-mode #chat-header{display:none}#activity-panel{width:340px;flex:none;border-left:1px solid var(--line);padding:28px 16px;position:relative;overflow:auto}#activity-panel .panel-close{position:absolute;right:12px;top:12px}.identity{text-align:center;padding:40px 0 32px}.identity h2{font-size:24px;margin-bottom:4px}.identity p{font-size:13px;margin-top:4px}.activity-item{padding:12px 4px;border-bottom:1px solid var(--line);font-size:14px}.activity-item small{display:block;color:var(--muted);margin-top:6px}.activity-item button{text-align:left;width:100%;background:transparent;padding:0}
dialog{border:1px solid var(--line);border-radius:22px;padding:24px;max-width:600px;width:calc(100% - 32px);max-height:85dvh;background:var(--bg);color:var(--text);box-shadow:0 20px 80px #0003}dialog::backdrop{background:#0006;backdrop-filter:blur(3px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.dialog-heading h2{margin:0;font-size:22px}.dialog-heading .search-field{flex:1}.settings-body h3{margin-top:24px}.settings-body select{display:block;width:100%;padding:12px;margin-top:10px;background:var(--surface);border:1px solid var(--line);border-radius:10px}dialog input{width:100%;border:1px solid var(--line);border-radius:10px;background:var(--surface);padding:12px}#thread-edit label{display:block;margin-bottom:8px}#thread-edit button{margin-top:12px}.thread-actions{display:flex;gap:10px;margin-top:24px}.danger{color:#d95858}#search-results button{display:block;width:100%;text-align:left;background:transparent;margin:4px 0;padding:12px}#search-results small{display:block;color:var(--muted);margin-top:6px}#search-results{max-height:55vh;overflow:auto}.login{max-width:420px;margin:15vh auto;padding:24px}.login h1{font-size:28px;margin-top:24px}.login p{color:var(--muted)}.login label{display:block;margin:24px 0 8px}.login input{width:100%;border:1px solid var(--line);background:var(--surface);padding:12px;border-radius:9px;margin-bottom:14px}.login button{width:100%}
@media(max-width:1100px){#activity-panel{position:absolute;right:0;top:0;bottom:0;z-index:5;background:var(--bg);box-shadow:var(--shadow)}}
@media(max-width:700px){#shell{--tabbar:56px;--tabbar-space:calc(var(--tabbar) + env(safe-area-inset-bottom,0px));padding-bottom:var(--tabbar-space)}.rail{position:fixed;bottom:0;left:0;right:0;height:var(--tabbar-space);width:100%;z-index:10;flex-direction:row;background:var(--bg);border-top:1px solid var(--line);border-right:0;padding:0 env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);justify-content:space-around}.rail nav,.rail-bottom{position:static;display:contents}.rail button{width:auto;min-width:46px;height:44px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:5px;border-radius:10px}.rail button span{display:none}.rail svg{width:21px;height:21px}#sidebar{display:none;position:absolute;top:0;bottom:var(--tabbar-space);left:0;width:min(310px,90vw);background:var(--bg);z-index:6;box-shadow:12px 0 40px #0002}#shell.show-sidebar #sidebar{display:flex}.thread-row .icon-button{opacity:1}#chat-header{height:64px;justify-content:flex-end;gap:12px;padding:0 16px}#chat-header .avatar{width:36px;height:36px;font-size:24px;flex:none}.chat-title-pill{display:flex;align-items:center;gap:5px;height:36px;min-width:0;margin-right:auto;padding:0 14px 0 7px;border-radius:18px;background:var(--surface);box-shadow:var(--shadow)}#chat-header .chat-title-pill h1{position:static;flex:0 1 auto;min-width:0;max-width:none;margin:0;padding:0;font-size:16px;line-height:22px;font-weight:500;color:var(--text)}#sidebar-toggle{display:inline-grid;width:28px;height:36px;padding:8px 4px;border-radius:14px}#sidebar-toggle svg{width:20px;height:20px}#chat-scroll{padding:8px 16px 12px}.bubble{max-width:94%;padding:12px 15px}.composer-dock{padding:8px 12px}.hint{font-size:9px}#composer{padding:9px 10px;gap:6px}.page-view{padding:16px 22px 30px}.page-view h1{margin-top:14px}.file-card{flex-wrap:wrap}#activity-panel{bottom:var(--tabbar-space);width:min(360px,100%)}#error{margin:0 16px}dialog{padding:20px}.empty-chat{min-height:35vh}}
@media(prefers-reduced-motion:no-preference){dialog[open]{animation:appear .12s ease-out}@keyframes appear{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}}
.page-heading{display:flex;align-items:center;justify-content:space-between;gap:18px}.page-heading h1{flex:1}.quiet-button,.back-link{background:transparent;color:var(--muted)}.back-link{padding:8px 0;font-size:14px}.tracking{color:#56ac67;font-size:15px;font-weight:500}.goal-row{display:flex;gap:14px;align-items:center;padding:13px 0}.goal-check{flex:none;width:20px;height:20px;border:1.5px solid var(--muted);border-radius:5px;padding:0;background:transparent;font-size:14px}.goal-check[aria-pressed=true]{background:#56ac67;border-color:#56ac67;color:white}.goal-summary{text-align:left;flex:1;min-width:0;background:transparent;padding:0}.goal-summary strong{font-size:16px;font-weight:500;display:block;overflow-wrap:anywhere}.goal-summary span{display:block;font-size:14px;color:var(--muted);margin-top:5px;overflow-wrap:anywhere}.create-goal-title{margin-top:34px}.goal-category{display:flex;align-items:center;gap:18px;background:transparent;width:100%;padding:17px 0;text-align:left;font-size:16px}.category-symbol{width:24px;text-align:center;font-size:23px}.chevron{margin-left:auto;color:var(--muted);font-size:24px}.goal-description{font-size:16px;color:var(--muted);line-height:1.7}.goal-pulse{padding:8px 0 14px}.goal-pulse p{margin-top:8px}.subgoal-heading{display:flex;align-items:center;justify-content:space-between;margin-top:34px}.goal-entry{padding:12px 0 18px 20px;border-left:2px solid var(--line);margin-left:4px}.goal-entry small{font-size:12px;color:var(--muted)}.goal-entry h3{margin:8px 0}.goal-entry p{color:var(--muted);margin:6px 0}#goal-context{display:flex;align-items:center;justify-content:space-between;background:var(--soft);border-radius:12px;padding:6px 14px;margin-bottom:8px;font-size:13px}#goal-rename label{display:block;margin-bottom:8px}#goal-rename button{margin-top:12px}
/* Goals list switch, completed months and Reactivate. Local spacing/geometry, not measured native values. */
.goals-view-switch{flex:none;min-height:36px;font-size:14px;white-space:nowrap}
.goals-view-switch.back-link{min-height:44px}
.goal-month{margin:28px 0 2px;font-size:14px;font-weight:550;color:var(--muted)}
.goal-check:not(.goal-reactivate){position:relative}
.goal-check:not(.goal-reactivate)::after{content:'';position:absolute;top:50%;left:50%;width:44px;height:44px;transform:translate(-50%,-50%)}
.goal-check.goal-reactivate{width:auto;height:auto;min-height:36px;padding:0 14px;border:0;border-radius:10px;background:var(--soft);color:var(--text);font-size:14px;white-space:nowrap}
@media(max-width:700px){.goals-view-switch,.goal-check.goal-reactivate{min-height:44px}}
/* Manual goal ordering controls */
.goal-order-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.goal-sort-toggle{display:inline-flex;align-items:center;gap:8px;min-height:36px;font-size:14px;color:var(--muted);white-space:nowrap;cursor:pointer}
.goal-sort-toggle input{width:16px;height:16px;margin:0;accent-color:#56ac67;cursor:inherit}
.goal-order-status{margin:0;font-size:13px;color:var(--muted)}
.goal-order-status:not(:empty){margin:2px 0 6px}
.goal-move{display:flex;flex:none;gap:2px}
.goal-move button{width:28px;height:28px;padding:0;border-radius:8px;background:transparent;color:var(--muted);font-size:15px;line-height:1}
.goal-move button:hover:not(:disabled){background:var(--soft);color:var(--text)}
.goal-move button:disabled{opacity:.3;cursor:default}
.goal-move button:focus-visible,.goal-sort-toggle input:focus-visible{outline:2px solid var(--text);outline-offset:2px}
.goal-move button[aria-disabled=true],.goal-sort-toggle input[aria-disabled=true]{opacity:.45;cursor:progress}
@media(hover:hover) and (pointer:fine){.goal-move{opacity:0}.goal-row:hover .goal-move,.goal-row:focus-within .goal-move{opacity:1}}
@media(pointer:coarse),(max-width:700px){.goal-move button{width:44px;height:44px}.goal-sort-toggle{min-height:44px}}
.goal-drag-handle{flex:none;color:var(--muted);cursor:grab;user-select:none}
.goal-drag-handle[aria-disabled=true]{cursor:progress;opacity:.45}
.goal-dragging .goal-drag-handle{cursor:grabbing}
@media(pointer:coarse),(max-width:700px){.goal-drag-handle{display:none}}
@media(max-width:700px){.goal-row[data-order-index]{gap:8px}.goal-row .goal-move{opacity:1}}
.goal-row.goal-dragging{opacity:.5}
.goal-row[data-drop=before]{box-shadow:inset 0 2px 0 var(--text)}
.goal-row[data-drop=after]{box-shadow:inset 0 -2px 0 var(--text)}
.feed-prompt-card{border-radius:18px;background:var(--soft);padding:22px;margin:24px 0 32px}.feed-prompt-card small{font-size:11px;letter-spacing:.08em;color:var(--muted)}.feed-prompt-card p{font-size:16px;line-height:1.6;margin:12px 0}.feed-prompt-controls{display:flex;justify-content:flex-end;gap:8px}.feed-post{padding:28px 0;border-bottom:1px solid var(--line)}.feed-author{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--muted);margin-bottom:18px}.feed-author .icon-button{margin-left:auto}.avatar.mini{width:28px;height:28px;font-size:18px}.feed-kicker{color:var(--muted);font-size:12px}.feed-post h2{font-size:22px;line-height:1.35;font-weight:550;margin:10px 0 16px}.feed-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}.feed-actions{display:flex;gap:8px;margin-top:16px}.feed-actions button{font-size:14px;padding:7px 10px}.feed-actions button[aria-pressed=true]{color:#ed6390}.feed-status{font-size:13px}.ideas-intro{color:var(--muted);line-height:1.6;margin-bottom:36px}.idea-row{display:flex;align-items:center;gap:12px;margin:22px 0}.idea-summary{display:flex;align-items:flex-start;gap:18px;flex:1;text-align:left;background:transparent;padding:0;min-width:0}.idea-icon{display:grid;place-items:center;width:42px;height:42px;background:var(--soft);border-radius:12px;flex:none;font-size:27px;color:#c7a45a}.idea-summary strong{display:block;font-size:16px;font-weight:500;line-height:1.45}.idea-summary span span{display:block;color:var(--muted);font-size:14px;line-height:1.5;margin-top:5px}#ideas-content h2{margin-top:36px;font-size:18px}#surface-dialog-content p{white-space:pre-wrap}#feed-prompt{width:100%;min-height:180px;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:14px;line-height:1.5;margin:12px 0;resize:vertical}#surface-dialog-actions{display:flex;gap:8px;flex-wrap:wrap}.context-chip{display:flex;align-items:center;justify-content:space-between;background:var(--soft);border-radius:12px;padding:6px 14px;font-size:13px;margin-bottom:8px}
@media(max-width:700px){.rail{overflow-x:auto;justify-content:flex-start;gap:5px}.rail button{min-width:46px;flex-shrink:0}.feed-post h2{font-size:21px}.idea-summary{gap:12px}.idea-icon{width:36px;height:36px}.feed-prompt-card{padding:18px}}
.mobile-only{display:none!important}.more-actions{display:grid;gap:8px}.more-actions button{text-align:left;padding:14px}
@media(max-width:700px){.desktop-only{display:none!important}.mobile-only{display:flex!important}.rail{overflow:visible;justify-content:space-around;gap:0}.rail button{min-width:44px}}
.markdown{white-space:normal;overflow-wrap:anywhere;line-height:1.65;min-width:0}.markdown>:first-child{margin-top:0}.markdown>:last-child{margin-bottom:0}.markdown p{margin:0 0 1em}.markdown h1,.markdown h2,.markdown h3{line-height:1.3;margin:1.2em 0 .6em;font-weight:600}.markdown h1{font-size:1.65em}.markdown h2{font-size:1.4em}.markdown h3{font-size:1.2em}.markdown ul,.markdown ol{padding-left:1.6em;margin:.6em 0 1em}.markdown li{margin:.3em 0}.markdown li>p{margin:.3em 0}.markdown a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}.markdown blockquote{border-left:3px solid var(--line);color:var(--muted);margin:1em 0;padding-left:1em}.markdown code{font: .88em ui-monospace,SFMono-Regular,Consolas,monospace;background:var(--soft);border-radius:4px;padding:.12em .3em}.markdown pre{position:relative;max-width:100%;overflow:auto;background:var(--soft);border:1px solid var(--line);border-radius:12px;padding:42px 16px 16px;white-space:pre}.markdown pre code{padding:0;background:none;font-size:13px}.markdown .code-copy{position:absolute;right:8px;top:8px;font:12px system-ui;padding:5px 9px;background:var(--surface);border:1px solid var(--line)}.markdown table{display:block;max-width:100%;overflow:auto;border-collapse:collapse;font-size:14px;margin:1em 0}.markdown th,.markdown td{border:1px solid var(--line);padding:8px 12px;text-align:left;min-width:80px}.markdown th{background:var(--soft)}.markdown hr{border:0;border-top:1px solid var(--line);margin:1.5em 0}.document-chip{display:flex;align-items:center;gap:12px;min-width:220px}.document-chip svg{flex:none;width:28px;height:28px}.document-chip strong,.document-chip small{display:block}.document-chip small{color:var(--muted);margin-top:5px;font-size:12px}
#library-view{display:flex;flex:1;min-height:0;overflow:hidden}.library-sidebar{width:210px;flex:none;padding:22px 18px;border-right:1px solid var(--line);overflow:auto}.library-sidebar h2{font-size:22px;margin:8px 0 28px}.library-sidebar small{display:block;color:var(--muted);font-size:10px;letter-spacing:.06em;margin:24px 8px 10px}.library-sidebar button{display:block;width:100%;background:transparent;text-align:left;font-size:14px;margin:3px 0}.library-sidebar button[aria-current=true]{background:var(--soft)}.library-main{padding:22px 32px;overflow:auto;flex:1;min-width:0}.library-main h1{font-size:26px;overflow-wrap:anywhere}.library-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:18px 0 26px}.library-toolbar input{flex:1;min-width:130px;padding:10px;background:var(--surface);border:1px solid var(--line);border-radius:10px}.library-toolbar select{padding:9px;background:var(--surface);border:1px solid var(--line);border-radius:9px;max-width:140px}.library-toolbar button{font-size:12px;padding:9px}.library-items.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(185px,1fr));gap:16px}.library-card{position:relative;border:1px solid var(--line);border-radius:14px;min-width:0;overflow:hidden}.library-card>.icon-button{position:absolute;right:7px;top:7px;background:var(--bg)}.library-file-open{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:14px;padding:24px 16px;width:100%;height:100%;background:var(--surface)}.library-file-open svg{width:42px;height:42px;margin-bottom:20px;color:var(--muted)}.library-file-open strong{font-size:14px;font-weight:500;overflow-wrap:anywhere;max-width:100%}.library-file-open small{font-size:11px;color:var(--muted);overflow-wrap:anywhere;max-width:100%}.pin-label{font-size:10px;color:var(--muted)}.library-items.list .library-card{margin:8px 0}.library-items.list .library-file-open{flex-direction:row;align-items:center;padding:16px 52px 16px 16px}.library-items.list .library-file-open svg{width:24px;height:24px;margin:0;flex:none}.library-items.list .library-file-open strong{flex:1}.file-select{position:absolute;top:8px;left:8px;z-index:1}.file-select input{width:18px;height:18px}.file-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.file-toolbar h1{flex:1;font-size:20px;min-width:150px}.file-toolbar button{font-size:12px}.library-empty{grid-column:1/-1;padding:60px 0;text-align:center}#preview{white-space:normal;background:transparent;padding:22px 0;border-top:1px solid var(--line);border-radius:0}#preview>pre{white-space:pre-wrap;overflow-wrap:anywhere}#file-editor{width:100%;min-height:60dvh;resize:vertical;padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:10px;font:14px/1.7 ui-monospace,SFMono-Regular,monospace}#file-status{font-size:13px;color:var(--muted)}#file-version{font-size:12px}
@media(max-width:900px){.library-sidebar{width:165px;padding:16px 10px}.library-main{padding:16px 20px}}@media(max-width:700px){#library-view{flex-direction:column}.library-sidebar{width:100%;display:flex;overflow:auto;border-right:0;border-bottom:1px solid var(--line);gap:6px;padding:8px 12px;flex:none}.library-sidebar h2,.library-sidebar small{display:none}.library-sidebar button{width:auto;white-space:nowrap;font-size:12px}.library-main{padding:14px 16px}.library-main h1{font-size:24px}.library-items.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.library-file-open{padding:24px 12px 16px}.library-file-open strong{font-size:13px}.library-items.list .library-file-open{flex-wrap:wrap}.library-toolbar{gap:6px}.library-toolbar input{width:100%;flex-basis:100%}.file-toolbar h1{order:-1;flex-basis:100%;margin:8px 0}.markdown table{font-size:12px}.markdown th,.markdown td{padding:6px 8px}.markdown pre code{font-size:12px}}
.schedule-run{display:grid;gap:7px;padding:16px 0;border-bottom:1px solid var(--line)}.schedule-run small,#panel-schedules small,#schedules small{display:block;color:var(--muted)}#schedule-detail{display:grid;gap:16px;padding:20px}#schedule-detail details{padding:12px;border:1px solid var(--line);border-radius:12px}#schedule-detail summary{cursor:pointer}#timezone-form{display:grid;gap:8px}
/* Scheduled task detail */
#schedule-dialog{--schedule-success:#56ac67;width:min(420px,calc(100vw - 32px))}
#schedule-dialog .dialog-heading{align-items:flex-start;margin-bottom:16px}
#schedule-dialog .schedule-heading{min-width:0}
#schedule-dialog .schedule-kicker{margin:0 0 2px;font-size:12px;line-height:16px;color:var(--muted)}
#schedule-dialog #schedule-cadence{margin:4px 0 0;font-size:13px;line-height:18px;color:var(--muted)}
#schedule-dialog #schedule-cadence:empty{display:none}
#schedule-dialog .dialog-heading>[data-close]{flex:none;width:32px;height:32px;padding:0;border-radius:50%;font-size:20px;line-height:1}
#schedule-dialog #schedule-detail{gap:12px;padding:0;overflow-wrap:anywhere}
#schedule-detail>p{margin:0}
#schedule-detail>button{justify-self:start}
#schedule-detail .schedule-history,#schedule-detail .schedule-run-details{padding:0;border:0;border-radius:0}
#schedule-detail .schedule-history>summary,#schedule-detail .schedule-run-details>summary{display:flex;align-items:center;min-height:28px;list-style:none}
#schedule-detail .schedule-history>summary::-webkit-details-marker,#schedule-detail .schedule-run-details>summary::-webkit-details-marker{display:none}
#schedule-detail .schedule-history>summary:focus-visible,#schedule-detail .schedule-run-details>summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}
#schedule-detail .schedule-history>summary{gap:8px;font-weight:550}
#schedule-detail .schedule-history>summary::after{content:'';width:6px;height:6px;margin-top:-2px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(-45deg)}
#schedule-detail .schedule-history[open]>summary::after{margin-top:-4px;transform:rotate(45deg)}
#schedule-detail .schedule-run{display:block;padding:0;border:0}
#schedule-detail .schedule-run-details>summary{flex-wrap:wrap;column-gap:8px;padding:4px 0;font-size:13px;line-height:20px}
#schedule-detail .schedule-run-dot{flex:none;width:8px;height:8px;border-radius:50%;background:var(--muted)}
#schedule-detail .schedule-run[data-run-status=complete] .schedule-run-dot{background:var(--schedule-success)}
#schedule-detail .schedule-run-label{flex:1 1 auto;min-width:0;overflow-wrap:anywhere}
#schedule-detail .schedule-run-label::first-letter{text-transform:uppercase}
#schedule-detail .schedule-run-time{margin-left:auto;color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}
#schedule-detail .schedule-run-body{display:grid;gap:4px;padding:0 0 10px 16px;font-size:13px;overflow-wrap:anywhere}
#schedule-detail .schedule-run-body p{margin:0}
#schedule-detail .schedule-run>button{margin:0 0 8px 16px;padding:5px 12px;font-size:13px}
#schedule-detail .schedule-more{display:block;margin:4px auto 0;padding:6px 12px;background:transparent;color:var(--muted);font-size:13px}
#schedule-detail .schedule-actions{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:8px}

.document-preview-note{padding:12px 16px;border-radius:12px;background:var(--surface-2);color:var(--muted);font-size:13px;line-height:1.5}
.document-toolbar{display:flex;gap:12px;align-items:center;margin-bottom:16px;overflow:auto;flex-wrap:wrap}
.document-toolbar [aria-selected=true]{font-weight:700;background:var(--surface-2)}
.pdf-page,.document-paper,.slide-preview{box-shadow:0 2px 12px #0002;margin:16px auto;background:white;color:#172534;max-width:100%}
.pdf-page{display:block}.document-paper{padding:40px;min-height:500px;line-height:1.6;overflow-wrap:anywhere}
.document-table{border-collapse:collapse;width:100%;font-size:14px}.document-table th,.document-table td{padding:8px 12px;border:1px solid #ccd4dc;text-align:left;white-space:pre-wrap;overflow-wrap:anywhere}.document-table th{background:#eaf0f5;color:#172534}
.spreadsheet-preview{overflow:auto;max-height:70vh}.spreadsheet-preview .document-table td{min-width:130px;max-width:400px;white-space:pre}
.slide-preview{position:relative;width:960px;container-type:inline-size;overflow:hidden;background:#f7f9fc}.slide-layer{position:absolute;padding:.5%;overflow:hidden}.slide-layer p{margin:0 0 1.4cqw;white-space:pre-wrap;line-height:1.2}.slide-layer .document-table{font-size:1.5cqw}
.image-preview{max-width:100%;max-height:75vh;object-fit:contain;display:block;margin:auto}
@media(max-width:650px){.document-paper{padding:20px}.document-toolbar{gap:6px}}

.slide-preview.editing {overflow:visible;margin:34px 0;}
.slide-preview.editing .slide-layer {overflow:visible;border:1px dashed var(--muted,#687581);}
.slide-text-editor {white-space:pre-wrap;width:100%;height:100%;overflow:auto;outline:none;cursor:text;line-height:1.2;}
.slide-layer .slide-move,.slide-layer .slide-resize {position:absolute;font-size:11px;padding:3px 7px;line-height:1.2;background:var(--surface,#fff);color:var(--text,#172534);border:1px solid #8b98a4;z-index:2;touch-action:none;}
.slide-move {top:-24px;left:0;cursor:move;}
.slide-resize {bottom:-24px;right:0;cursor:nwse-resize;}
.slide-layer .slide-move,.slide-layer .slide-resize {width:max-content;white-space:nowrap;}
.slide-preview.editing .slide-layer:not(:focus-within):not(:hover) button {opacity:0;pointer-events:none;}
.slide-preview.editing .slide-layer:focus-within {border-color:var(--accent);}
#space-shortcuts{display:contents}#space-chat{display:flex}#space-chat #chat-view{min-width:0;width:100%}#space-chat #chat-scroll{padding:12px}#space-chat .hint{display:none}.space-placeholder{padding:40px;color:var(--muted)}#space-viewer.maximized{position:fixed;inset:0;z-index:15;background:var(--bg)}
#library-view.space-open .library-sidebar{display:none}#library-view.space-open .library-main{padding:0;height:100%;overflow:hidden}#space-viewer{--space-column:1;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(60px,auto) auto minmax(0,1fr);height:100%}#space-viewer.with-chat{--space-column:2;grid-template-columns:410px minmax(0,1fr)}#space-viewer>.file-toolbar{grid-column:var(--space-column);padding:10px 20px;border-bottom:1px solid var(--line);margin:0}#space-viewer>.file-toolbar h1{font-size:16px}#space-status{grid-column:var(--space-column);margin:8px 20px;font-size:12px;color:var(--muted)}#space-stage{display:contents}#space-frame-host{grid-column:var(--space-column);grid-row:3;min-width:0;height:100%;background:white;overflow:hidden}#space-frame-host iframe{display:block;border:0;width:100%;height:100%;background:white}#space-chat{grid-column:1;grid-row:1/4;min-width:0;height:100%;border-right:1px solid var(--line)}#space-chat .composer-dock{padding:12px}
@media(max-width:900px){#space-viewer.with-chat{grid-template-columns:320px minmax(0,1fr)}#space-shortcuts{display:none}#space-viewer .file-toolbar{flex-wrap:wrap;gap:8px}#space-viewer .file-toolbar h1{flex-basis:70%}}
@media(max-width:680px){#space-viewer.with-chat{display:flex;flex-direction:column;height:auto;min-height:100%}#space-viewer.with-chat #space-chat{order:4;height:50vh;flex:none;border:0;border-top:1px solid var(--line)}#space-viewer.with-chat #space-frame-host{height:40vh;flex:none}#space-viewer.with-chat iframe{height:40vh}#space-viewer>.file-toolbar{padding:8px}.space-open .library-main{overflow:auto!important}}
#space-status:empty{margin:0}
.space-opening-centered{display:none}
@media(min-width:901px){
  #space-viewer.with-chat:not(.maximized)>#space-status[data-steady]{position:absolute;width:1px;height:1px;margin:0;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
  #space-viewer.with-chat:not(.maximized)>#space-status[data-opening]{
    grid-row:3;place-self:center;z-index:1;margin:0;color:var(--text);pointer-events:none
  }
  #space-viewer.with-chat:not(.maximized)>#space-status[data-opening] .space-opening-inline{display:none}
  #space-viewer.with-chat:not(.maximized)>#space-status[data-opening] .space-opening-centered{
    display:grid;justify-items:center;gap:6px;padding:4px 8px;border-radius:8px;
    background:var(--surface);font-size:14px;font-weight:500;line-height:20px;text-align:center
  }
  .space-opening-spinner{width:12px;height:12px;border:2px solid var(--line);border-top-color:var(--muted);border-radius:50%}
}
@media(min-width:901px) and (prefers-reduced-motion:no-preference){
  .space-opening-spinner{animation:space-opening-spin .9s linear infinite}
  @keyframes space-opening-spin{to{transform:rotate(1turn)}}
}
/* Toolbar artwork for the measured wide split Space view. */
:is(#space-options,#space-close)>svg{display:none}
@media(min-width:1101px){
  #space-viewer.with-chat:not(.maximized)>.file-toolbar{padding-inline-end:12px}
  #space-viewer.with-chat:not(.maximized)>.file-toolbar>:is(#space-options,#space-close){
    width:36px;
    height:36px;
    padding:0;
    display:inline-grid;
    place-items:center;
    flex:none;
    background:transparent;
    color:var(--muted);
  }
  #space-viewer.with-chat:not(.maximized)>.file-toolbar>:is(#space-options,#space-close):hover:not(:disabled){background:var(--soft)}
  #space-viewer.with-chat:not(.maximized)>.file-toolbar>:is(#space-options,#space-close)>svg{display:block}
  #space-viewer.with-chat:not(.maximized)>.file-toolbar>:is(#space-options,#space-close)>.space-glyph-fallback{display:none}
}

.space-menu-actions{display:flex;flex-direction:column;gap:8px}#space-share-content{display:flex;flex-direction:column;gap:10px;max-width:520px}#space-share-content p{margin:4px 0}#space-share-content input{width:100%;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--bg)}.space-publication-error{color:#ef8888}#space-version-list{max-height:55vh;overflow:auto}

/* Private media gallery and native playback. */
.media-thumbnail{width:100%;aspect-ratio:1;display:grid;place-items:center;overflow:hidden;border-radius:10px;background:var(--soft);margin-bottom:12px}
.media-thumbnail img,.media-thumbnail video{width:100%;height:100%;object-fit:cover;pointer-events:none}
.media-preview{display:block;max-width:100%;max-height:70vh;margin:12px auto;border-radius:12px}
.media-job{display:grid;gap:8px;max-width:420px;padding:18px;border:1px solid var(--line);border-radius:16px}
.media-job-status{text-transform:capitalize}.media-provenance{display:block;color:var(--muted);font-size:12px;line-height:1.5}
.library-items.list .media-thumbnail{width:100px;flex-shrink:0;margin:0 16px 0 0}
/* Focused stage for a generated image opened from ordinary Main or Side chat. Original replica
   chrome from existing tokens; spacing is local, not measured from another interface. The normal
   document chrome hides only while the stage element exists, so disposal or a missing image
   restores the regular viewer header and status line without script. */
#file-viewer:has(#preview>.chat-image-stage)>#file-chat,#file-viewer:has(#preview>.chat-image-stage)>#file-chat-resize,
#file-viewer:has(#preview>.chat-image-stage) #file-document>.document-heading,#file-viewer:has(#preview>.chat-image-stage) .document-status,
#file-viewer:has(#preview>.chat-image-stage) #file-preamble{display:none}
#file-viewer:has(#preview>.chat-image-stage) .document-scroll{display:flex;flex-direction:column;overflow:hidden;overscroll-behavior:contain}
#file-viewer:has(#preview>.chat-image-stage) .document-body{flex:1;min-height:0;display:flex;flex-direction:column;width:100%;max-width:none;margin:0;padding:0}
#file-viewer:has(#preview>.chat-image-stage) #preview{flex:1;min-height:0;min-width:0;display:flex;flex-direction:column;padding:0;border:0;outline:0}
.chat-image-stage{--stage-gap:clamp(12px,3vw,32px);--stage-dim:light-dark(color-mix(in srgb,var(--bg) 86%,var(--text)),color-mix(in srgb,var(--bg) 55%,#000));--stage-ink:color-mix(in srgb,var(--text) 80%,var(--stage-dim));flex:1;min-height:0;min-width:0;display:grid;grid-template-rows:auto minmax(160px,1fr) auto;background:var(--stage-dim);color:var(--text);outline:0}
.chat-image-stage-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.chat-image-stage-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:12px 20px;border-bottom:1px solid color-mix(in srgb,var(--line) 60%,transparent)}
.chat-image-stage-title{flex:1 1 160px;min-width:0;margin:0;font-size:15px;font-weight:550;line-height:22px;letter-spacing:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;overflow-wrap:normal}
.chat-image-stage-actions{display:flex;flex-wrap:wrap;gap:8px;margin-left:auto}
.chat-image-stage-action{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:8px 14px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--text);font-size:14px;line-height:20px;white-space:nowrap}
.chat-image-stage-action svg{width:18px;height:18px}
.chat-image-stage-action[aria-disabled=true]{opacity:.6;cursor:progress}
.chat-image-stage-frame{position:relative;min-width:0;min-height:0;margin:0;overflow:hidden}
/* Absolute + auto margins centre the bitmap and keep its aspect ratio; it never upscales or overflows. */
.chat-image-stage-image{position:absolute;inset:var(--stage-gap);margin:auto;width:auto;height:auto;max-width:calc(100% - 2*var(--stage-gap));max-height:calc(100% - 2*var(--stage-gap));object-fit:contain;border-radius:12px;background:var(--surface);box-shadow:0 6px 28px #0000002e}
.chat-image-stage-status{position:absolute;inset:0;display:grid;place-items:center;margin:0;font-size:13px;color:var(--stage-ink)}
.chat-image-stage-note{margin:0;padding:10px 20px 14px;text-align:center;font-size:12px;line-height:1.5;color:var(--stage-ink)}
@media(prefers-reduced-motion:no-preference){.chat-image-stage-image{animation:chat-image-stage-in .18s ease-out}@keyframes chat-image-stage-in{from{opacity:0}to{opacity:1}}}
@media(max-width:700px){.chat-image-stage{--stage-gap:12px}.chat-image-stage-bar{padding:8px 12px;gap:6px 8px}.chat-image-stage-title{flex-basis:100%;font-size:14px}.chat-image-stage-actions{gap:6px}.chat-image-stage-action{min-height:44px;padding:8px 12px;font-size:13px}.chat-image-stage-note{padding:8px 12px 10px}}

.media-card .library-file-open{gap:8px;padding:12px}.media-card .media-thumbnail{margin-bottom:4px}

#memory-import-dialog{width:min(600px,94vw)}#memory-import-dialog textarea{display:block;width:100%;margin:10px 0;padding:12px;resize:vertical;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text)}#memory-import-dialog label{display:block;margin-top:18px}
#search-dialog{padding:18px;width:min(680px,calc(100vw - 24px));max-width:680px}
#search-dialog>.dialog-heading{margin-bottom:12px}.search-field{display:flex;align-items:center;gap:12px;min-width:0}.search-field input{min-width:0;border:0;background:transparent;padding:10px 0;outline-offset:1px}#search-scope{font-size:12px;margin:8px 12px 14px}
#search-results{max-height:min(52dvh,480px);overflow:auto;scroll-padding:8px}#search-results .search-group{margin:16px 12px 5px;font-size:11px;font-weight:600;letter-spacing:.04em;color:var(--muted);text-transform:uppercase}#search-results .search-result{width:100%;border-radius:12px;padding:12px;text-align:left;background:transparent;white-space:normal;overflow-wrap:anywhere}#search-results .search-result[aria-selected=true]{background:var(--soft);box-shadow:inset 0 0 0 1px var(--line)}#search-results .search-result span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:14px}#search-results .search-result small{font-size:12px;margin-top:5px}
.search-footer{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:14px 12px 0;border-top:1px solid var(--line);margin-top:12px;color:var(--muted);font-size:12px}.search-footer small{margin-left:auto}.search-footer button{font-size:12px}.search-highlight>.bubble{outline:2px solid var(--accent);outline-offset:4px}.shortcut-list{display:grid;grid-template-columns:1fr auto;gap:18px 16px;align-items:center}.shortcut-list dd{margin:0}.shortcut-list kbd{display:inline-block;font:12px ui-monospace,monospace;background:var(--soft);padding:5px 8px;border:1px solid var(--line);border-radius:6px}
@media(max-width:650px){#search-dialog{padding:14px}#search-results{max-height:49dvh}.search-footer small{width:100%;margin-left:0}.shortcut-list{font-size:13px;gap:16px 10px}.shortcut-list kbd{font-size:11px}}
/* Account palettes use independent readable accents and soft chat bubbles. */
:root[data-color]{--palette-light:#086dcc;--palette-dark:#8fc6ff;--palette-bubble-light:#b8dbfe;--palette-bubble-dark:#173b62;--accent:var(--palette-light);--user:var(--palette-bubble-light);--on-accent:#fff}
:root[data-color=avatar]{--palette-light:#4c6280;--palette-dark:#b9c9e8;--palette-bubble-light:#e7edf5;--palette-bubble-dark:#303e51}
:root[data-color=blue]{--palette-bubble-light:#cee6ff;--palette-bubble-dark:#163e70}
:root[data-color=purple]{--palette-light:#7344bd;--palette-dark:#c7a6ff;--palette-bubble-light:#eee2ff;--palette-bubble-dark:#42305d}
:root[data-color=pink]{--palette-light:#ac3272;--palette-dark:#ffacd5;--palette-bubble-light:#fbe1ee;--palette-bubble-dark:#592c43}
:root[data-color=orange]{--palette-light:#9c5100;--palette-dark:#ffc082;--palette-bubble-light:#ffead6;--palette-bubble-dark:#533922}
:root[data-color=green]{--palette-light:#287741;--palette-dark:#9bd7ac;--palette-bubble-light:#e0f1e4;--palette-bubble-dark:#284734}
:root[data-color=beige]{--palette-light:#786042;--palette-dark:#d8c4a6;--palette-bubble-light:#eee8de;--palette-bubble-dark:#474035}
:root[data-color=monochrome]{--palette-light:#454545;--palette-dark:#d2d2d5;--palette-bubble-light:#e7e7e9;--palette-bubble-dark:#3a3a3e}
:root[data-color][data-theme=dark]{--accent:var(--palette-dark);--user:var(--palette-bubble-dark);--on-accent:#181819}
@media(prefers-color-scheme:dark){:root[data-color]:not([data-theme=light]){--accent:var(--palette-dark);--user:var(--palette-bubble-dark);--on-accent:#181819}}
.primary,.approve{color:var(--on-accent,#fff)}
/* Settings keeps the current product page behind a two-column modal. */
#settings-dialog{width:min(790px,calc(100vw - 32px));max-width:790px;padding:0;border-radius:28px}
.settings-layout{display:grid;grid-template-columns:220px 1fr;height:min(720px,85dvh);min-height:0}
.settings-nav{padding:24px 16px;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:12px;overflow:auto}
.settings-nav h2{padding:0 8px;margin:0 0 8px}.settings-nav nav{display:flex;flex-direction:column;gap:5px;flex:1}.settings-nav nav button{text-align:left;background:transparent;border:0;border-radius:10px;padding:10px 12px}.settings-nav nav button[aria-selected=true]{background:var(--soft)}
.settings-nav #identity{font-size:12px;overflow-wrap:anywhere}.settings-main{min-width:0;overflow:auto}.settings-main>.dialog-heading{padding:16px 24px;position:sticky;top:0;background:var(--bg);z-index:1}.settings-main .settings-body{padding:0 24px 24px}
.usage-card,.appearance-card{padding:16px 18px;background:var(--soft);border-radius:18px}
.usage-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:13px}.usage-card progress{display:block;width:100%;height:6px;margin:18px 0;accent-color:var(--accent);border:0;border-radius:10px;overflow:hidden;background:var(--line)}.usage-card progress::-webkit-progress-bar{background:var(--line)}.usage-card progress::-webkit-progress-value{background:var(--accent)}.usage-card progress::-moz-progress-bar{background:var(--accent)}.usage-card p{font-size:13px;margin:8px 0}.usage-card small{font-size:11px;line-height:1.5;display:block}
.appearance-row{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:40px;font-size:14px}.appearance-row+.appearance-row{border-top:1px solid var(--line);margin-top:12px;padding-top:12px}.appearance-modes{display:flex;gap:2px}.appearance-modes button{display:grid;place-items:center;width:32px;height:32px;padding:6px;border-radius:50%;background:transparent;color:var(--muted)}.appearance-modes svg{width:18px;height:18px}.appearance-modes [aria-pressed=true]{color:var(--text);background:var(--surface);box-shadow:var(--shadow)}
.theme-colors{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}.theme-choice{position:relative;display:grid;place-items:center;width:25px;height:25px;cursor:pointer}.theme-choice input{position:absolute;inset:0;opacity:0;width:100%;height:100%;margin:0;padding:0;cursor:pointer}.theme-swatch{display:grid;place-items:center;width:22px;height:22px;border:1px solid #0002;border-radius:50%;background:#b6dbff;pointer-events:none}.theme-choice input:checked+.theme-swatch{outline:2px solid var(--text);outline-offset:2px}.theme-choice input:focus-visible+.theme-swatch{outline:2px solid var(--accent);outline-offset:3px}.theme-choice input:disabled+.theme-swatch{opacity:.5}.theme-swatch[data-swatch=default]{background:#b8dbfe}.theme-swatch[data-swatch=purple]{background:#d9b9fa}.theme-swatch[data-swatch=pink]{background:#f2b9d6}.theme-swatch[data-swatch=orange]{background:#f4cfac}.theme-swatch[data-swatch=green]{background:#cee7c8}.theme-swatch[data-swatch=beige]{background:#e3ded6}.theme-swatch[data-swatch=monochrome]{background:#383838}.theme-swatch[data-swatch=avatar]{background:radial-gradient(circle at 35% 25%,#f6f0ff,#d4e5f7 65%,#b9c9e8);font:17px Georgia;color:#4c6280}
#appearance-status{font-size:12px;color:var(--muted);min-height:1.5em;margin:8px 0}
@media(max-width:650px){.theme-row{align-items:flex-start;flex-direction:column}.theme-colors{justify-content:flex-start;gap:7px}.usage-heading{flex-wrap:wrap}.usage-card,.appearance-card{padding:14px}}
.permission-row{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 0;border-bottom:1px solid var(--line)}.permission-row select{max-width:190px}.permission-radio{display:flex;gap:10px;align-items:center;padding:9px 0}.permission-radio input{width:auto;margin:0}.settings-body fieldset{border:0;padding:10px 0;margin:0}.settings-body legend{font-weight:600}.permission-grant{padding:16px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}#permission-history details{padding:12px 0;border-bottom:1px solid var(--line)}#permission-history pre{white-space:pre-wrap;overflow-wrap:anywhere}#permission-error{color:#b33}
@media(max-width:650px){#settings-dialog{width:calc(100vw - 20px)}.settings-layout{grid-template-columns:1fr;max-height:88vh;min-height:0}.settings-nav{padding:16px;border-right:0;border-bottom:1px solid var(--line)}.settings-nav nav{flex-direction:row;overflow:auto;flex:none}.settings-nav nav button{white-space:nowrap}.settings-nav #identity{display:none}.settings-nav #disconnect{align-self:flex-start}.settings-main .settings-body{padding:0 16px 20px}.settings-main>.dialog-heading{padding:12px 16px}}

.data-privacy-card,.data-actions{background:var(--surface);border-radius:16px;padding:18px;margin:0 0 24px}.data-privacy-card strong{font-size:14px;font-weight:500}.data-privacy-card p{font-size:12px;line-height:1.5;color:var(--muted);margin:5px 0}.data-privacy-card .text-button{padding:0;color:var(--accent);background:none;font-size:12px}.data-actions{padding:5px 18px}.data-actions button{display:flex;justify-content:space-between;width:100%;padding:16px 0;text-align:left;background:none;border-radius:0;font-size:14px}.data-actions button+button{border-top:1px solid var(--line)}.data-actions span{font-size:20px;color:var(--muted)}#data-export-dialog{width:410px;border-radius:28px;max-width:calc(100vw - 32px)}#data-export-dialog h2{font-size:18px}#data-export-dialog p{font-size:14px;line-height:1.5;color:var(--muted)}#data-export-dialog .thread-actions button{flex:1;border-radius:10px}#data-export-status:empty{display:none}
#data-export-dialog::backdrop,#data-privacy-dialog::backdrop{background:#0002;backdrop-filter:none}
/* Export confirmation spacing and Close target */
#data-export-dialog .dialog-heading{margin-bottom:8px}
#data-export-dialog p{margin:0}
#data-export-dialog .thread-actions{margin-top:16px}
#data-export-dialog .dialog-heading .icon-button{position:relative;width:28px;height:28px;padding:0;border-radius:50%;background:var(--soft)}
#data-export-dialog .dialog-heading .icon-button svg{width:16px;height:16px}
#data-export-dialog .dialog-heading .icon-button::after{content:'';position:absolute;inset:-4px}
@media(max-width:700px){#data-export-dialog .dialog-heading .icon-button::after{inset:-8px}}
/* The live status shares the export action’s card and left inset. */
.data-actions #data-export-open:has(+ #data-export-status:not(:empty)){padding-bottom:4px}
#data-export-status{margin:0 0 12px;font-size:12px;line-height:1.5;color:var(--muted)}
.chat-import-row{border:1px solid var(--line);border-radius:14px;padding:14px;margin-top:12px}.chat-import-row p{margin:8px 0}.chat-import-row small{display:block;margin-top:6px;color:var(--muted)}#memory-import-dialog hr{border:0;border-top:1px solid var(--line);margin:20px 0}.chat-import-picker{display:flex;align-items:center;gap:12px}.chat-import-picker input{max-width:100%}#memory-import-dialog{max-height:85dvh;overflow:auto}
.message-menu{position:absolute;right:0;bottom:28px;z-index:4;min-width:150px;padding:6px;border:1px solid var(--line);border-radius:12px;background:var(--bg);box-shadow:0 8px 30px #0002}.message-menu button{display:block;width:100%;text-align:left;padding:10px 14px;background:transparent}.message-menu button:hover,.message-menu button:focus-visible{background:var(--surface)}#delete-message-dialog{width:410px;max-width:calc(100vw - 32px)}#delete-message-dialog p{font-size:14px;line-height:1.5}#delete-message-dialog .thread-actions button{flex:1}#delete-message-error:empty{display:none}
#sources-dialog{width:min(720px,calc(100vw - 24px));max-height:85dvh;overflow:auto}.source-row{display:flex;flex-direction:column;width:100%;text-align:left;gap:5px;margin-bottom:10px;overflow-wrap:anywhere}.source-row small,.source-url{color:var(--muted);font-size:12px}.source-row[aria-pressed=true]{outline:2px solid var(--accent);outline-offset:-2px}#source-content pre{white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.65 ui-monospace,monospace}#source-error:empty{display:none}

/* Persistent browser work and question cards. */
.browser-task-card{display:flex;flex-direction:column;align-items:flex-start;gap:8px;text-align:left;padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--surface);max-width:100%;min-width:min(280px,100%);margin:8px 0;overflow-wrap:anywhere}
.browser-task-card small{color:var(--muted)}
.browser-task-status{font-size:13px;color:var(--muted)}
#browser-task-dialog{width:min(680px,calc(100vw - 32px));overflow-wrap:anywhere}
.browser-question{display:flex;flex-direction:column;gap:12px;margin:24px 0;padding:18px;border:1px solid var(--line);border-radius:16px}
.browser-question button{text-align:left}

.browser-transfer{display:grid;gap:8px;border:1px solid var(--line);border-radius:14px;padding:16px;margin:12px 0}.browser-transfer p{margin:0}.transfer-hash{display:block;overflow-wrap:anywhere;font-family:ui-monospace,monospace;font-size:11px;color:var(--muted)}

/* Settings geometry measured from the production web surface, November 22. */
#settings-dialog{--settings-bg:var(--surface);--settings-group:var(--soft);width:min(800px,calc(100vw - 32px));max-width:800px;max-height:calc(100dvh - 32px);border:0;border-radius:40px;background:var(--settings-bg);font-size:14px}
:root[data-theme=dark] #settings-dialog{--settings-bg:#28292b;--settings-group:#424345;--line:#ffffff14;--muted:#f2f7ff87}
#settings-dialog::backdrop{background:#0008;backdrop-filter:none}
#settings-dialog .settings-layout{height:min(600px,calc(100dvh - 32px));grid-template-columns:225px minmax(0,1fr)}
#settings-dialog .settings-nav{padding:16px;gap:16px;overflow:auto}
#settings-dialog .settings-nav h2{font-size:18px;line-height:26px;font-weight:600;margin:0;padding:0 8px}
#settings-dialog .settings-nav nav{gap:4px;flex:1;overflow:auto}
#settings-dialog .settings-nav nav button{height:32px;min-height:32px;display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:12px;font-size:14px;line-height:20px;font-weight:400}
#settings-dialog .settings-nav nav button svg{width:16px;height:16px}
#settings-dialog .settings-nav nav button[aria-selected=true]{background:var(--settings-group)}
#settings-dialog .settings-nav nav button:disabled{opacity:.45}
#settings-dialog #identity{display:none}
#settings-dialog #disconnect{display:flex;align-items:center;gap:10px;background:none;padding:6px 8px;text-align:left;font-size:14px}
#settings-dialog #disconnect svg{width:16px;height:16px}
#settings-dialog .settings-main{overflow:auto;background:var(--settings-bg)}
#settings-dialog .settings-main>.dialog-heading{height:60px;min-height:60px;padding:0 24px;margin:0;background:var(--settings-bg)}
#settings-dialog .dialog-heading h2{font-size:18px;line-height:26px;font-weight:600}
#settings-dialog .dialog-heading .icon-button{width:28px;height:28px;padding:6px;background:var(--settings-group);border-radius:50%}
#settings-dialog .settings-body{padding:8px 24px 24px}
#settings-dialog .permission-group{margin:0 0 24px}
#settings-dialog .permission-group h3{font-size:14px;line-height:20px;font-weight:600;color:var(--muted);padding:0 18px;margin:0 0 6px}
#settings-dialog .permission-group-box{border-radius:20px;background:var(--settings-group);padding:10px 18px}
#settings-dialog .permission-row{padding:10px 0;min-height:40px;font-size:14px;line-height:20px}
#settings-dialog .permission-row:last-child{border-bottom:0}
#settings-dialog .permission-row label{flex:1;min-width:0}
#settings-dialog .permission-row select{display:block;flex:none;width:auto;max-width:180px;padding:0 3px;margin:0;border:0;background:transparent;font-size:14px;line-height:20px;text-align:right}
#settings-dialog .permission-row select option{background:var(--settings-bg);text-align:left}
#settings-dialog .settings-reset{display:block;margin-left:auto;color:#fa4758;background:none;border-radius:24px;padding:8px 14px}
.settings-fidelity-note{color:var(--muted);font-size:12px;line-height:1.5;margin-top:28px}
#settings-dialog .permission-radio{background:var(--settings-group);padding:16px 18px;margin:0;border-radius:0;gap:14px}
#settings-dialog .permission-radio:first-of-type{border-radius:16px 16px 0 0}#settings-dialog .permission-radio:last-child{border-radius:0 0 16px 16px}
.permission-radio-copy{display:flex;flex-direction:column;gap:4px}.permission-radio-copy strong{font-weight:500}.permission-radio-copy small{font-size:12px;color:var(--muted)}
#settings-dialog fieldset legend{font-size:14px;color:var(--muted);padding:0 18px;margin-bottom:8px}
.settings-list-row{display:flex;justify-content:space-between;gap:12px;text-align:left;width:100%;margin:6px 0;padding:16px 18px;background:var(--settings-group);border-radius:16px}.task-permissions{margin-top:28px}
@media(max-width:650px){#settings-dialog{border-radius:28px;width:calc(100vw - 20px)}#settings-dialog .settings-layout{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);height:calc(100dvh - 40px)}#settings-dialog .settings-nav{gap:10px;padding:14px 16px;max-height:180px}#settings-dialog .settings-nav nav{flex-direction:row;flex:initial;overflow:auto}#settings-dialog .settings-nav nav button{white-space:nowrap;flex:none}#settings-dialog #disconnect{position:absolute;right:16px;top:12px}#settings-dialog .settings-main>.dialog-heading{padding:0 16px}#settings-dialog .settings-body{padding:8px 16px 20px}#settings-dialog .permission-row select{max-width:145px}}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]) #settings-dialog{--settings-bg:#28292b;--settings-group:#424345;--line:#ffffff14;--muted:#f2f7ff87}}
#settings-dialog .permission-group-box{padding:6px 18px}
#settings-dialog .permission-row{padding:14px 0;min-height:48px}
#browser-permissions>.permission-group:last-of-type{margin-bottom:12px}
#settings-dialog #settings-page-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}
.forget-review-counts{display:flex;flex-wrap:wrap;gap:4px 12px;margin:8px 0;padding:0;list-style:none}
.forget-review-counts li{white-space:nowrap}
#settings-dialog #settings-back{font-size:28px;line-height:20px;background:none;margin-right:8px;padding:0}
#settings-dialog .settings-list-row{margin:0;border-radius:0;padding:14px 0;min-height:48px;background:transparent;align-items:center;border-bottom:1px solid var(--line)}
#settings-dialog .settings-list-row:last-child{border-bottom:0}
#settings-dialog .settings-list-row>span:first-child{min-width:0;overflow-wrap:anywhere}
.settings-row-trailing{display:flex;align-items:center;gap:12px;flex:none;color:var(--muted)}.settings-row-count{font-size:13px;color:var(--muted)}
#settings-dialog .task-permissions{margin-top:0}.permission-scope{font-size:13px;color:var(--muted);margin:0 0 20px}
#settings-dialog .permission-history-link{margin-top:18px;font-size:13px;color:var(--muted)}
#settings-dialog .permission-grants{border-radius:20px;background:var(--settings-group);padding:6px 18px}
#settings-dialog .permission-grant{display:flex;align-items:center;gap:18px;padding:14px 0}
#settings-dialog .permission-grant:last-child{border:0}#settings-dialog .permission-grant>div{flex:1;min-width:0}
#settings-dialog .permission-grant strong{font-size:14px;font-weight:500}#settings-dialog .permission-grant p{font-size:12px;color:var(--muted);margin:4px 0 0}
#settings-dialog .permission-revoke{background:none;color:#fa4758;padding:6px 0;flex:none}
.settings-empty{color:var(--muted);text-align:center;font-size:14px;padding:36px 12px}
#permission-status{font-size:12px;color:var(--muted)}#permission-status:empty,#permission-error:empty{display:none}
#settings-dialog .permission-row select{text-align-last:right}
/* Saved-login values stay in this short-lived user dialog, never transcript cards. */
#vault-dialog{width:min(440px,calc(100vw - 32px))}
#vault-form{display:grid;gap:10px}
#vault-form input:not([type=checkbox]),#vault-permission{width:100%;min-width:0;box-sizing:border-box}
#vault-permission-row{display:grid;gap:8px}
#vault-items{margin-top:16px}
#vault-items .settings-list-row span:first-child{overflow-wrap:anywhere;min-width:0}
#vault-form label:has(#vault-show){display:flex;align-items:center;gap:8px}
#vault-show{width:auto;margin:0}

.credential-card{display:flex;flex-direction:column;gap:10px;border:1px solid var(--line);border-radius:16px;padding:18px;margin:10px 0;max-width:440px}.credential-card p{margin:0;overflow-wrap:anywhere}#capture-dialog{width:440px;max-width:calc(100vw - 32px)}#capture-site{overflow-wrap:anywhere}#capture-form{display:grid;gap:10px}#capture-username-row,#capture-save-row{display:contents}#capture-api-details dd{margin:0;overflow-wrap:anywhere}#capture-form input:not([type=checkbox]){width:100%;box-sizing:border-box}.capture-checkbox{display:flex;align-items:center;gap:8px}.capture-checkbox input{width:auto}
/* Avatar selection remains a chat action; previews never activate a candidate. */
.avatar[data-avatar-face]{overflow:hidden;padding:0;display:inline-flex;align-items:center;justify-content:center}.avatar[data-avatar-face] img{width:100%;height:100%;object-fit:cover}.avatar-identity{border-bottom:1px solid var(--line);padding:8px 0 18px}.avatar-identity button{display:block;margin-top:6px}.avatar-settings{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.avatar-settings p{width:100%;color:var(--muted)}.avatar-card{border:1px solid var(--line);padding:18px;border-radius:20px;margin:12px 0;max-width:600px}.avatar-candidate-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.avatar-candidate{min-width:0;display:flex;flex-direction:column;gap:8px}.avatar-candidate-image{aspect-ratio:1;display:flex;align-items:center;justify-content:center;background:#fff;border-radius:16px;overflow:hidden;color:#777}.avatar-candidate-image img{width:100%;height:100%;object-fit:contain}.avatar-candidate button{width:100%}.avatar-candidate small{font-size:11px;line-height:1.4}.avatar-card p{font-size:13px;color:var(--muted)}#avatar-context{margin-bottom:8px}@media(max-width:500px){.avatar-card{padding:12px}.avatar-candidate-grid{gap:8px}}

#activity-panel{padding:16px;width:380px}.status-heading{display:flex;align-items:center;justify-content:space-between;padding:2px 4px 16px}.status-heading h2{font-size:20px;overflow-wrap:anywhere;margin:0;padding-right:34px}.status-tabs{display:flex;border-bottom:1px solid var(--line);gap:2px;margin-bottom:12px}.status-tabs button{flex:1;min-width:0;padding:10px 4px;font-size:12px;background:transparent;border-radius:0;color:var(--muted);border-bottom:2px solid transparent}.status-tabs button[aria-selected=true]{color:var(--text);border-bottom-color:var(--text)}.status-tabs button:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.status-work{position:relative;padding:14px 62px 14px 4px}.activity-item .status-work-open{overflow-wrap:anywhere}.activity-item .status-work-stop{position:absolute;right:4px;top:12px;width:auto;padding:5px 8px;border-radius:8px;background:var(--soft);opacity:0}.status-work:hover .status-work-stop,.status-work:focus-within .status-work-stop{opacity:1}#status-approvals-open{font-size:12px;margin:6px 0;background:var(--soft)}@media(hover:none){.activity-item .status-work-stop{opacity:1}}@media(max-width:700px){#activity-panel{width:min(380px,100%)}}

.dictation-panel{padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--surface);margin-top:8px}.dictation-panel textarea{display:block;width:100%;min-height:90px}.dictation-panel button{margin:4px}.message audio{display:block;max-width:100%;width:300px;margin:8px 0}.voice-transcript{margin-top:8px;font-size:14px}.voice-transcript p{white-space:pre-wrap}
.audio-player{display:flex;align-items:center;gap:9px;width:280px;max-width:100%;min-height:50px;box-sizing:border-box;padding:8px 10px;border-radius:28px;background:var(--soft,#f1f1f1);margin:8px 0;color:var(--text,#222)}
.audio-player audio[hidden]{display:none!important}.audio-player button{flex-shrink:0;border:0;padding:0;color:inherit;background:transparent;cursor:pointer}.audio-player button:disabled{opacity:.4;cursor:default}.audio-player .audio-play{width:32px;height:32px;border-radius:50%;background:var(--bg,#fff);font-size:13px}.audio-player .audio-options{font-size:22px;width:24px;height:30px;border-radius:50%}.audio-track{position:relative;flex:1;min-width:40px;height:28px}.audio-bars{height:100%;display:flex;gap:1px;align-items:center;pointer-events:none}.audio-bars span{height:2px;flex:1;background:#b6b6b6;border-radius:2px}.audio-bars .played{background:#1888ee}.audio-track input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}.audio-track:focus-within{outline:2px solid #1888ee;outline-offset:3px;border-radius:3px}.audio-elapsed{font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}.audio-menu{padding:16px;border:1px solid var(--border,#ddd);border-radius:16px;background:var(--bg,#fff);color:var(--text,#222);box-shadow:0 8px 30px #0002}.audio-menu label{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.audio-menu button{padding:6px 12px;border:1px solid var(--border,#ddd);border-radius:8px}.audio-player button:focus-visible{outline:2px solid #1888ee;outline-offset:2px}

/* Ideas measurements from the production web view; local font/artwork remain approximations. */
#ideas-content h1{font-size:34px;font-weight:600;line-height:40px}
#ideas-content .ideas-intro{font-size:18px;line-height:26px;color:var(--text);margin:0 0 42px}
#ideas-content h2{font-size:18px;font-weight:600;line-height:26px;margin:44px 0 20px}
#ideas-content h2.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#ideas-content .idea-row{align-items:flex-start;gap:8px;margin:0 0 24px}
#ideas-content .idea-summary{gap:16px}
#ideas-content .idea-icon{width:40px;height:40px}
#ideas-content .idea-summary strong{font-size:16px;font-weight:500;line-height:22px}
#ideas-content .idea-summary span span{line-height:20px;margin-top:2px}
#surface-dialog.idea-detail{border:0;border-radius:32px;padding:24px;box-shadow:0 8px 24px #0003}
#surface-dialog.idea-detail::backdrop{background:#0002;backdrop-filter:none}
.idea-detail .dialog-heading{align-items:flex-start;margin-bottom:18px}
.idea-detail .dialog-heading h2{font-size:18px;font-weight:600;line-height:24px}
.idea-detail #surface-dialog-content>p,.idea-pack>p{font-size:16px;line-height:22px;color:var(--muted);margin:0 0 20px}
.idea-pack h3{font-size:16px;line-height:22px;font-weight:600;margin:24px 0 8px}
.idea-deliverable{display:flex;align-items:center;gap:12px;padding:10px 0;cursor:pointer;border-bottom:1px solid var(--line)}
.idea-deliverable:last-of-type{border-bottom:0}
.idea-deliverable-icon{display:grid;place-items:center;flex:none;background:var(--soft);width:44px;height:44px;border-radius:50%}
.idea-deliverable-icon svg{width:22px;height:22px}
.idea-deliverable>span:nth-child(2){flex:1;min-width:0}
.idea-deliverable strong,.idea-deliverable small{display:block;font-size:14px;line-height:20px;font-weight:500;overflow-wrap:anywhere}
.idea-deliverable small{font-weight:400;color:var(--muted);margin-top:2px}
.idea-deliverable input{width:18px;height:18px;padding:0;margin:0;flex:none;accent-color:#3c7c2f}
.idea-rationale{font-size:14px;color:var(--muted);margin:16px 0}
.idea-rationale summary{cursor:pointer}
.idea-detail #surface-dialog-actions{flex-wrap:nowrap;margin-top:24px}
.idea-detail #idea-launch{flex:1;border-radius:24px;min-height:44px}
@media(max-width:700px){#ideas-content .ideas-intro{font-size:16px;line-height:24px}.idea-detail .dialog-heading h2{font-size:18px}.idea-deliverable{gap:8px}}

.idea-detail .dialog-heading>.icon-button{width:32px;height:32px;min-width:32px;border-radius:50%;box-shadow:0 2px 9px #0001}
.idea-detail #surface-dialog-actions>.icon-button{border-radius:50%;width:44px;height:44px;box-shadow:0 2px 9px #0001}
.idea-deliverable input{appearance:none;border:1px solid var(--muted);border-radius:50%;background:transparent;display:grid;place-content:center}
.idea-deliverable input:checked{background:#3c7c2f;border-color:#3c7c2f}
.idea-deliverable input:checked::after{content:'✓';color:white;font-size:13px;line-height:16px}
.idea-deliverable input:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(min-width:701px){#surface-dialog.idea-detail{transform:translateX(36px);max-width:min(600px,calc(100vw - 104px))}}

/* Status layout measured from the current web product. */
#activity-panel{width:360px;padding:12px 16px 24px;overflow-y:auto}
.status-heading{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:38px 0 24px;gap:10px}
#activity-panel .status-heading .panel-close{position:absolute;right:-4px;top:0;width:36px;height:36px}
.status-heading h2{font-size:24px;line-height:30px;font-weight:550;padding:0;text-align:center;margin:2px 0 0}
.status-avatar{position:relative;width:128px;height:128px;margin:0 0 4px}
.status-avatar .avatar.large{width:128px;height:128px;font-size:72px}
.status-avatar #avatar-options{position:absolute;right:0;bottom:0;width:32px;height:32px;background:var(--surface);border:1px solid var(--line);border-radius:50%;box-shadow:0 1px 4px #0001}
.status-avatar #avatar-options svg{width:16px;height:16px}
.status-connection{font-size:12px;line-height:18px;margin:0;color:var(--muted);display:flex;align-items:center;gap:5px}
.status-connection::before{content:'';width:7px;height:7px;background:var(--muted);border-radius:50%}.status-connection[data-connected=true]::before{background:#389c61}
.status-tabs{gap:2px;background:var(--soft);padding:4px;border:0;border-radius:14px;margin-bottom:20px}
.status-tabs button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:8px 2px;font-size:11px;line-height:14px;border:0;border-radius:10px}
.status-tabs button svg{width:18px;height:18px}.status-tabs button[aria-selected=true]{background:var(--surface);box-shadow:0 1px 3px #0001;border:0}
[data-status-panel]>h3{font-size:16px;font-weight:500;margin:12px 0 20px}
#status-scheduled{border-bottom:1px solid var(--line);padding:0 0 16px;margin-bottom:16px}#status-scheduled>summary,.status-day>summary{font-size:13px;font-weight:500;cursor:pointer;padding:8px 0;list-style-position:inside}
.status-scheduled-row{padding:9px 0 9px 14px}.status-scheduled-row button{display:block;background:transparent;padding:0;font-size:13px;text-align:left;overflow-wrap:anywhere}.status-scheduled-row small{display:block;font-size:12px;color:var(--muted);margin-top:4px}
#status-schedules-all{font-size:12px;background:transparent;color:var(--muted);padding:10px 0 0 14px}
.status-scheduled-tile{display:none}
@media (min-width:1101px){
  #activity-panel .status-scheduled-row{
    position:relative;
    min-height:56px;
    padding:8px 0;
    padding-inline-start:48px;
  }
  #activity-panel .status-scheduled-tile{
    position:absolute;
    inset-inline-start:0;
    top:8px;
    display:grid;
    place-items:center;
    width:40px;
    height:40px;
    border-radius:10px;
    background:var(--soft);
    color:var(--muted);
    pointer-events:none;
  }
  #activity-panel .status-scheduled-tile>.widget-glyph{width:20px;height:20px}
}
.status-day{margin-bottom:12px}.status-day>summary{color:var(--muted);font-weight:400}
/* End-align the disclosure markers in the wide docked Activity pane. */
@media (min-width:1101px) and (forced-colors:none){
  #status-scheduled>summary,#panel-tasks>.status-day>summary{
    position:relative;
    list-style-type:none;
    padding-inline-end:20px;
  }
  #status-scheduled>summary::-webkit-details-marker,#panel-tasks>.status-day>summary::-webkit-details-marker{display:none}
  #status-scheduled>summary::after,#panel-tasks>.status-day>summary::after{
    content:'';
    position:absolute;
    inset-inline-end:4px;
    top:50%;
    width:11px;
    height:6px;
    margin-top:-3px;
    background:currentColor;
    clip-path:polygon(0 1px,1px 0,5.5px 4.1px,10px 0,11px 1px,5.5px 6px);
    pointer-events:none;
  }
  #status-scheduled:not([open])>summary::after,#panel-tasks>.status-day:not([open])>summary::after{transform:rotate(-90deg)}
}
.status-work{display:grid;grid-template-columns:40px minmax(0,1fr) auto;column-gap:12px;align-items:start;padding:12px 4px;border:0}
.status-work-tile{display:grid;place-items:center;width:40px;height:40px;border-radius:10px;background:var(--soft);color:var(--muted);font-size:16px;line-height:1}.status-work-tile::before{content:'○'}.status-work[data-work-status=complete] .status-work-tile::before,.status-work[data-work-status=succeeded] .status-work-tile::before{content:'✓'}.status-work[data-work-status=failed] .status-work-tile::before{content:'!'}
.status-work-text{min-width:0;padding-top:1px}.activity-item .status-work-open{display:block;width:100%;font-size:14px;line-height:20px;font-weight:500;padding:0;background:transparent;text-align:left}.status-work small{display:block;overflow-wrap:anywhere}.status-work .status-work-summary{font-size:13px;line-height:18px;margin-top:2px}.status-work .status-work-meta{font-size:12px;line-height:16px;margin-top:4px;color:var(--muted)}
.activity-item.status-work .status-work-stop{position:static;align-self:start;white-space:nowrap}
.activity-item .status-work-details{display:block;margin-top:6px;min-height:24px;font-size:13px;line-height:24px;text-decoration:underline}
.feed-run-ledger{white-space:pre-wrap;overflow-wrap:anywhere}
.status-identity-name{display:flex;justify-content:space-between;align-items:center;margin:16px 0 24px;gap:12px}.status-identity-name h3{font-size:16px;font-weight:500;margin:0;overflow-wrap:anywhere}.status-identity-name button{background:var(--soft);font-size:12px;padding:6px 12px}
.status-root-file{display:block;width:100%;padding:14px;margin:0 0 12px;background:transparent;border:1px solid var(--line);border-radius:12px;text-align:left}.status-root-heading{display:flex;align-items:center;gap:8px}.status-root-heading svg{width:18px;height:18px}.status-root-heading strong{font-size:12px;font-weight:500}.status-care{margin-left:auto;font-size:8px;letter-spacing:.7px;color:var(--muted)}.status-root-file>small{display:block;color:var(--muted);font-size:11px;margin-top:12px}
.status-approval{padding:14px 0;border-bottom:1px solid var(--line);font-size:13px;line-height:19px}.status-approval>summary{font-weight:500;cursor:pointer;overflow-wrap:anywhere}.status-approval-outcome{display:block;color:var(--muted);font-size:11px;font-weight:400;margin-top:6px}.status-approval>p{color:var(--muted);font-size:12px}.status-approval details>summary{cursor:pointer;font-size:12px}.status-approval pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;max-height:240px;overflow-y:auto;background:var(--soft);padding:12px;border-radius:8px}.status-approval>button{font-size:12px;margin-top:12px;background:var(--soft)}
@media(max-width:700px){#activity-panel{width:min(360px,100%)}.status-heading{padding-top:30px}}

/* Match the wide docked avatar and tab paint while retaining full tab targets. */
@media (min-width:1101px){
  #activity-panel .status-heading{padding:58px 0 42px;gap:2px}
  #activity-panel .status-tabs{
    position:relative;
    isolation:isolate;
    gap:2px;
    padding:0 4px;
    margin-bottom:15px;
    background:transparent;
  }
  #activity-panel .status-tabs::before{
    content:'';
    position:absolute;
    inset:4px 0;
    z-index:-1;
    background:var(--soft);
    border-radius:999px;
    pointer-events:none;
  }
  #activity-panel .status-tabs button{
    position:relative;
    isolation:isolate;
    height:44px;
    padding:0;
    gap:0;
  }
  #activity-panel .status-tabs button[aria-selected=true]{
    background:transparent;
    box-shadow:none;
  }
  #activity-panel .status-tabs button[aria-selected=true]::before{
    content:'';
    position:absolute;
    inset:8px 0;
    z-index:-1;
    background:var(--surface);
    box-shadow:0 1px 3px #0001;
    border-radius:999px;
    pointer-events:none;
  }
  #activity-panel .status-tabs button+button::after{
    content:'';
    position:absolute;
    left:-1px;
    top:14px;
    width:1px;
    height:16px;
    background:var(--line);
    pointer-events:none;
  }
  #activity-panel .status-tabs .status-tab-label{
    position:absolute;
    width:1px;
    height:1px;
    margin:-1px;
    padding:0;
    border:0;
    overflow:hidden;
    clip:rect(0 0 0 0);
    clip-path:inset(50%);
    white-space:nowrap;
  }
}

@media(min-width:701px){#chat-header h1{max-width:calc(50% - 64px)}}
.native-mail-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.native-mail-heading h3{font-size:16px;font-weight:500;margin:0;line-height:22px}.native-mail-empty{display:flex;flex-direction:column;align-items:center;text-align:center;padding:110px 4px 30px;gap:12px}.native-mail-empty>svg{width:30px;height:30px;color:var(--muted)}.native-mail-empty h4{font-size:15px;font-weight:500;line-height:20px;margin:0}.native-mail-empty p{color:var(--muted);font-size:13px;line-height:19px;margin:0}.native-mail-empty button{margin-top:6px;font-size:13px;background:var(--text);color:var(--surface);padding:10px 18px}.native-mail-empty small{font-size:10px;margin-top:12px}.native-mail-address{font-size:12px;overflow-wrap:anywhere;color:var(--muted)}.native-mail-folders{display:flex;gap:5px;border-bottom:1px solid var(--line);padding-bottom:10px}.native-mail-folders button{font-size:12px;background:transparent}.native-mail-folders [aria-pressed=true]{background:var(--soft)}.native-mail-row{border-bottom:1px solid var(--line);padding:12px 0}.native-mail-open{display:block;text-align:left;width:100%;background:transparent;padding:0}.native-mail-open strong,.native-mail-open span,.native-mail-open small{display:block;font-size:12px;overflow-wrap:anywhere;line-height:18px}.native-mail-open strong{font-weight:500}.native-mail-open small,.native-mail-notice{font-size:11px;color:var(--muted);margin-top:6px}.native-mail-no-messages{padding:80px 0;text-align:center;font-size:13px;color:var(--muted)}#native-mail-form{display:grid;gap:18px;margin:24px 0}#native-mail-form label{display:grid;gap:8px;font-size:13px}#native-mail-form input{width:100%;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text)}#native-mail-error{color:var(--danger,#b42318);font-size:13px}.native-mail-body{white-space:pre-wrap;overflow-wrap:anywhere;font-family:inherit;line-height:1.6;max-height:50vh;overflow:auto}.native-mail-trust{font-size:12px;background:var(--soft);padding:12px;border-radius:10px}#native-mail-subject{overflow-wrap:anywhere}#native-mail-status{font-size:12px;color:var(--muted)}

.native-mail-heading{margin-top:-5px;margin-right:-8px}.native-mail-heading h3{flex:1}.native-mail-empty{padding-top:113px}.native-mail-empty h4{letter-spacing:-.18px}.native-mail-settings-card{margin:0 0 28px;padding:18px;border:1px solid var(--line);border-radius:12px}.native-mail-settings-card h3{margin-top:0}.native-mail-settings-card p{font-size:13px;color:var(--muted)}

#native-mail-owners{margin-top:24px;border-top:1px solid var(--line);padding-top:16px}#native-mail-owners form{display:grid;gap:8px;margin:16px 0}.native-owner-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:12px 0;border-bottom:1px solid var(--line)}.native-owner-row strong{flex:1 1 100%;overflow-wrap:anywhere}.native-owner-row small{flex:1}.native-owner-row button{font-size:12px}#native-owner-code{font-variant-numeric:tabular-nums;letter-spacing:.18em}#native-mail-setup-dialog{max-height:90dvh;overflow-y:auto}

.chat-widget{width:100%;max-width:640px;margin:12px 0;border:1px solid var(--line);border-radius:16px;padding:16px;overflow:hidden}.chat-widget h3{margin:0 0 8px;font-size:17px}.chat-widget ul{list-style:none;margin:0;padding:0}.chat-widget li{display:flex;flex-direction:column;gap:4px;padding:12px 0;border-top:1px solid var(--line)}.chat-widget li:first-child{border-top:0}.chat-widget li button{text-align:left;align-self:flex-start}.chat-widget iframe{display:block;width:100%;height:260px;border:0;border-radius:12px;background:transparent}.chat-widget>p[role=status]{margin:4px 0}
.chat-widget .widget-glyph{width:20px;height:20px;flex:none;stroke:currentColor;fill:none;stroke-width:1.6;vertical-align:middle;margin-right:8px}.chat-widget li:has(>.widget-glyph){position:relative;padding-left:32px}.chat-widget li>.widget-glyph{position:absolute;left:0;top:14px}.chat-widget [data-glyph=warning]{color:var(--accent)}.chat-widget .flight-widget-card{padding:18px 0;gap:12px}.flight-facts{display:grid;gap:5px}.flight-facts p{margin:0!important;font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.flight-facts p:first-child{font-weight:600}.flight-choice{background:var(--user);align-self:flex-start}.widget-see-all,.flight-fares{padding-top:12px}.widget-see-all>summary,.flight-fares>summary{cursor:pointer;font-weight:600;padding:8px 0}.widget-see-all>ul,.flight-fares>ul{margin-top:8px}.markdown>.chat-widget{margin:16px 0}.chat-widget li>strong{line-height:1.5}

.chat-widget li button{max-width:100%;overflow-wrap:anywhere}
/* Navigation cards open supported destinations inside the app. */
.chat-widget.navigation-widget{max-width:440px;padding:6px;background:var(--surface)}
.navigation-widget .widget-nav-open{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;min-height:44px;margin:0;padding:10px 12px;border-radius:11px;background:transparent;color:var(--text);text-align:left;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.navigation-widget .widget-nav-open:hover{filter:none;background:var(--soft)}
.navigation-widget .widget-nav-open:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.navigation-widget .widget-nav-open[aria-busy=true]{cursor:progress;opacity:.7}
.navigation-widget .widget-nav-open>.widget-glyph{margin:0;color:var(--accent)}
.navigation-widget .widget-nav-text{display:flex;flex-direction:column;gap:2px;min-width:0;overflow-wrap:anywhere}
.navigation-widget .widget-nav-text strong{font-weight:550;line-height:1.4}
.navigation-widget .widget-nav-detail{font-size:13px;line-height:1.45;color:var(--muted)}
.navigation-widget .widget-nav-forward{width:18px;height:18px;color:var(--muted);fill:none;stroke:currentColor;stroke-width:1.6}
.navigation-widget .widget-nav-status{margin:0 12px;font-size:13px;line-height:1.45;color:var(--muted)}
.navigation-widget .widget-nav-status:not(:empty){margin:2px 12px 8px}
.shopping-cart-widget{overflow-wrap:anywhere}.shopping-cart-widget .cart-subtotal{font-weight:600}.shopping-cart-widget .cart-open{margin:8px 0}.shopping-cart-widget .cart-current{border-top:1px solid var(--line);margin-top:8px;padding-top:12px}.shopping-cart-widget h4{margin:0 0 8px}.shopping-cart-widget [role=status]:empty{display:none}
.chat-widget.avatar-share-widget{position:relative;display:grid;justify-items:start;gap:4px;max-width:400px;min-width:0;padding:14px;border-radius:12px;background:var(--surface);overflow-wrap:anywhere}
.avatar-share-widget .avatar-share-title{margin:0;font-size:16px;font-weight:600;line-height:1.35}
.avatar-share-widget :is(.avatar-share-subtitle,.avatar-share-fallback,.avatar-share-status){margin:0;color:var(--muted);font-size:14px;line-height:1.45}
.avatar-share-widget :is(.avatar-share-fallback,.avatar-share-status[data-fallback]){width:100%;margin-top:8px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:var(--soft);white-space:pre-wrap}
.avatar-share-widget .avatar-share-status:not(:empty){margin-top:8px}
.avatar-share-widget .avatar-share-action{max-width:100%;min-height:44px;margin-top:8px;border:1px solid var(--line);text-align:center;white-space:normal;overflow-wrap:anywhere}
.avatar-share-widget .avatar-share-action[aria-disabled=true]{color:var(--muted);cursor:progress}
.avatar-share-widget .avatar-share-status:empty{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}
.avatar-share-interactive .avatar-share-fallback,.page-mode .avatar-share-interactive :is(.avatar-share-action,.avatar-share-status){display:none}
.page-mode .avatar-share-interactive .avatar-share-fallback{display:block}
@media(max-width:600px){.avatar-share-widget .avatar-share-action{width:100%}}
@media(forced-colors:active){.navigation-widget .widget-nav-open{border:1px solid ButtonText}.navigation-widget .widget-nav-open:focus-visible{outline-color:Highlight}}
.chat-widget .rental-card-open{display:flex;flex-direction:column;gap:6px;width:100%;padding:12px;background:var(--soft);border-radius:12px}.rental-card-open>.widget-image{width:100%;height:150px}.rental-card-open strong{font-size:16px}.rental-card-open>span{font-size:13px}#surface-dialog-content[data-rental-detail]{overflow-wrap:anywhere}#surface-dialog-content[data-rental-detail]>.widget-image{width:100%;height:180px}
.chat-widget li.widget-row-image{position:relative;padding-right:112px;min-height:96px}.widget-image{display:inline-flex;align-items:center;justify-content:center;width:96px;height:72px;border-radius:10px;overflow:hidden;background:var(--soft);font-size:11px;color:var(--muted);text-align:center}.widget-row-image>.widget-image{position:absolute;right:0;top:12px}.widget-image img{width:100%;height:100%;object-fit:cover}.widget-row-icons{display:flex;gap:6px;flex-wrap:wrap}.widget-image-icon{width:24px;height:24px;border-radius:5px;font-size:8px}.widget-image-icon img{object-fit:contain}

/* Native geographic widgets: every image is an authenticated account fixture. */
.map-widget{min-width:0;width:100%;max-width:680px}.widget-map-viewport{height:340px;min-height:240px;width:100%;border-radius:12px;isolation:isolate;z-index:0;background:var(--soft)}.widget-map-notice,.widget-map-attribution{font-size:12px;color:var(--muted);display:block;margin:8px 0}.widget-map-toolbar{display:flex;justify-content:flex-end;margin:8px 0}.widget-map-choices{display:flex;gap:8px;overflow-x:auto;padding:4px 0 10px}.widget-map-choices button{white-space:nowrap}.widget-map-choices [aria-pressed=true]{outline:2px solid var(--accent);outline-offset:-2px}.widget-map-details{min-height:70px;overflow:auto;border-top:1px solid var(--line);padding:12px 0}.widget-map-details p{margin:5px 0}.widget-map-details .widget-image{float:right;width:112px;height:84px;margin:0 0 8px 12px}.widget-map-pin{background:var(--surface);color:var(--text);border:2px solid var(--accent);border-radius:50% 50% 50% 4px;box-shadow:0 2px 5px #0005;display:grid!important;place-items:center;font-weight:700}.widget-map-pin.selected{background:var(--accent);color:var(--map-pin-on-accent,var(--text));outline:3px solid var(--surface)}.map-widget .leaflet-bar a{background:var(--surface);color:var(--text);text-decoration:none}.map-widget .leaflet-control-scale-line{color:#142a24;background:#fffd}.widget-map-viewport:focus-visible{outline:2px solid var(--accent);outline-offset:2px}@media(max-width:650px){.widget-map-viewport{height:280px}.widget-map-details .widget-image{width:84px;height:64px}}

/* Compact navigation follows the captured 390 × 844 More sheet. */
#more-dialog{position:fixed;inset:auto 0 0;margin:0 auto;width:min(440px,100%);max-width:100%;max-height:calc(100dvh - 24px);padding:26px 28px max(40px,env(safe-area-inset-bottom));border:0;border-radius:24px 24px 0 0;background:var(--bg);box-shadow:0 -6px 32px #00000012;overflow-y:auto;overscroll-behavior:contain;font-size:16px}
#more-dialog::backdrop{background:#00000008;backdrop-filter:blur(1px)}
#more-dialog .sheet-handle{position:absolute;top:0;left:calc(50% - 32px);width:64px;height:26px;padding:0;background:transparent;display:grid;place-items:center}
#more-dialog .sheet-handle span{width:44px;height:4px;border-radius:3px;background:var(--line)}
#more-dialog h3{font-size:13px;line-height:18px;font-weight:500;color:var(--muted);margin:14px 0 6px}
#more-dialog .more-row{display:flex;align-items:center;min-height:44px}
#more-dialog .more-link{display:flex;align-items:center;gap:12px;min-width:0;width:100%;height:44px;padding:0 4px;background:transparent;text-align:left;font-weight:400}
#more-dialog .more-link>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#more-dialog svg{width:20px;height:20px;stroke-width:1.5}
#more-dialog .more-row>.icon-button{flex:none;width:32px;height:40px;padding:7px 0 7px 12px}
#more-dialog .more-row>.icon-button svg{width:18px;height:18px}
#more-dialog [aria-current=true]{color:var(--accent)}
#more-dialog hr{border:0;border-top:1px solid var(--line);margin:12px 0 11px}
#navigation-gap-dialog{max-width:calc(100vw - 32px);width:440px}
#navigation-gap-description{line-height:1.6}
/* Desktop ≡ menu: labels and order from November 23 production AX; geometry estimated from the
   November 21 test-VM capture (225 px wide, 36 px rows, 4 px right of the rail). Glyphs, shadow and animation are approximate. */
#settings-menu{position:fixed;inset:auto;margin:0;width:225px;max-height:calc(100dvh - 16px);overflow-y:auto;padding:6px;border:0;border-radius:14px;background:var(--surface);color:var(--text);box-shadow:var(--shadow),0 8px 28px #0000001f;outline:1px solid transparent}
#settings-menu::before{content:"";display:block;height:1px;margin:7px 7px 6px;background:var(--line)}
#settings-menu hr{border:0;border-top:1px solid var(--line);margin:5px 7px 6px}
#settings-menu [role=menuitem]{display:flex;align-items:center;gap:9px;width:100%;height:36px;padding:0 8px 0 13px;border-radius:8px;background:transparent;font-size:14px;line-height:20px;text-align:left;white-space:nowrap}
#settings-menu [role=menuitem]:hover,#settings-menu [role=menuitem]:focus{background:color-mix(in srgb,var(--text) 7%,transparent);filter:none;outline:none}
#settings-menu [role=menuitem]:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
#settings-menu svg{width:16px;height:16px}
#settings-menu kbd{margin-left:auto;padding:0;background:none;font:inherit;font-size:11px;color:var(--muted)}
@media(prefers-reduced-motion:no-preference){#settings-menu:popover-open{animation:settings-menu-in .12s ease-out}@keyframes settings-menu-in{from{opacity:0}to{opacity:1}}}
@media(max-width:700px){#space-shortcuts{display:none}}
/* Conversation sidebar search and desktop rail grouping, compared with November 21 test-VM captures. */
#sidebar .search-field{height:36px;padding:0 12px;gap:8px}
#sidebar .search-field>span{display:flex}
#sidebar .search-field svg{width:16px;height:16px}
#sidebar .search-field input{padding:0;font-size:14px;line-height:20px}
#sidebar .search-field:focus-within{outline:2px solid var(--accent);outline-offset:2px}
@media(min-width:701px){.rail nav>[data-view=library]{position:relative;margin-top:16px}.rail nav>[data-view=library]::before{content:"";position:absolute;top:-14px;left:8px;right:8px;height:1px;background:var(--line);pointer-events:none}}

#issue-dialog{width:600px;max-width:calc(100vw - 24px);max-height:90dvh;border:0;border-radius:40px;padding:24px;background:var(--surface);overflow-y:auto}
.issue-heading{position:relative;text-align:center;margin:0 0 20px}.issue-heading h2{font-size:17px;line-height:24px;margin:0;font-weight:600}.issue-heading .icon-button{position:absolute;right:-10px;top:-8px;border-radius:50%;background:var(--soft);width:30px;height:30px}
#issue-description{display:block;width:100%;height:240px;resize:vertical;border:0;border-radius:16px;background:var(--soft);padding:12px;font-size:16px;line-height:24px}
.issue-media-actions{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.issue-media-actions button{display:flex;align-items:center;gap:8px;white-space:nowrap;border-radius:24px;font-size:14px;padding:8px 14px}.issue-media-actions svg{width:16px;height:16px}
#issue-form>label[for=issue-category]{font-size:14px;display:block;margin-bottom:8px}#issue-category{width:100%;height:38px;border:0;border-radius:24px;padding:0 16px;background:var(--bg);font-size:14px}
.issue-diagnostics-choice{display:flex;align-items:flex-start;gap:10px;font-size:16px;line-height:22px;margin:24px 0}.issue-diagnostics-choice input{width:16px;height:16px;flex:none;padding:0;margin-top:4px}
#issue-submit{width:100%;border-radius:24px;min-height:38px}#issue-status,#issue-error{font-size:13px;line-height:1.5}#issue-status:empty,#issue-error:empty{display:none}#issue-error{color:#d95858}.issue-fixture-note{display:block;text-align:center;font-size:11px;color:var(--muted);margin-top:12px}
#issue-diagnostics-details{font-size:13px;line-height:1.5;margin-bottom:16px}#issue-dialog pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}#issue-receipt{overflow-wrap:anywhere}#issue-receipt button{display:block;margin:12px 0}.issue-report-description{white-space:pre-wrap}
.issue-attachment{display:flex;align-items:center;gap:8px;font-size:12px;margin-top:10px}.issue-attachment img,.issue-attachment video{width:72px;max-height:64px;object-fit:contain;flex:none;border-radius:8px}.issue-attachment span{flex:1;overflow-wrap:anywhere}.issue-attachment button{flex:none}#issue-history button{display:block;width:100%;text-align:left;margin:8px 0;font-size:13px}
@media(max-width:700px){#issue-dialog{max-width:100vw;width:390px;padding:24px;border-radius:40px}.issue-media-actions button{font-size:12px;padding:8px 10px;gap:6px}}
#issue-dialog{--issue-input:var(--soft)}#issue-description{background:var(--issue-input);resize:none}.issue-media-actions button{background:var(--issue-input)}
:root[data-theme=dark] #issue-dialog{background:#28292b;--issue-input:#424345}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]) #issue-dialog{background:#28292b;--issue-input:#424345}}

#network-dialog{width:680px;max-width:calc(100vw - 24px);max-height:90dvh;overflow-y:auto;border-radius:28px;padding:24px}#network-dialog>p{line-height:1.5}.network-input-row{display:flex;gap:10px;margin:8px 0 20px}.network-input-row input{min-width:0;flex:1}#network-dialog details{margin:16px 0}#network-join textarea,#network-invitation textarea{width:100%;min-height:80px;resize:vertical;overflow-wrap:anywhere;font-size:13px}#network-list{display:grid;gap:8px;margin:20px 0}.network-person{display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:12px;border-radius:16px;background:var(--soft)}.network-person strong{flex:1;overflow-wrap:anywhere}.network-person small{color:var(--muted)}#network-detail{border-top:1px solid var(--line);padding-top:12px}#network-detail:empty{display:none}#network-detail button{margin:6px 8px 6px 0}.network-rule{padding:12px;background:var(--soft);border-radius:14px;margin:12px 0}.network-rule p{white-space:pre-wrap;overflow-wrap:anywhere}#network-error{color:#d95858}#network-rule-form{display:grid;gap:10px}#network-rule-description{min-height:140px;resize:vertical}#network-rule-dialog{width:540px;max-width:calc(100vw - 24px)}@media(max-width:700px){#network-dialog{width:100%;max-width:100vw;max-height:94dvh}.network-input-row{flex-wrap:wrap}.network-input-row button{flex-shrink:0}.network-person{flex-wrap:wrap}}
/* Local Network review: distinct from the sender's private chat. */
#network-draft{display:grid;gap:10px;margin:16px 0}#network-draft textarea{min-height:86px}#network-draft select{min-width:0;max-width:100%}.network-message{display:grid;gap:5px;width:100%;text-align:left;margin:6px 0;overflow-wrap:anywhere}.network-message-text{white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%;font:inherit}#network-review:not(:empty){border-top:1px solid var(--line);margin-top:16px;padding-top:12px}#network-review button{margin:8px 8px 8px 0}

#network-draft textarea,#network-draft select{box-sizing:border-box;width:100%;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text);font:inherit}#network-draft textarea{resize:vertical}

#workflow-editor{width:min(760px,94vw)}#workflow-editor label{display:grid;gap:8px;margin:12px 0}#workflow-script,#workflow-args{font-family:monospace;min-width:0;width:100%;box-sizing:border-box}#workflow-detail pre{white-space:pre-wrap;overflow-wrap:anywhere}#workflow-detail small{display:block;margin:6px 0}

/* Existing briefing Letters; populated native typography remains uncalibrated. */
.letter-card{display:flex;flex-direction:column;gap:14px;text-align:left;width:min(100%,360px);padding:24px;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:18px;box-shadow:0 3px 12px #00000008;margin:10px 0;cursor:pointer}
.letter-card strong{font:600 23px/1.3 Georgia,serif}.letter-card small{color:var(--muted);font-size:12px}.letter-excerpt{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap;font-size:14px;line-height:1.5}.letter-document{max-width:680px;margin:auto;padding:24px 12px;line-height:1.7}.letter-document h2{font-family:Georgia,serif;font-size:30px}.letter-note{border-top:1px solid var(--line);padding-top:20px}.chat-widget:has(>.letter-card){padding:0;border:0;background:transparent}
.letter-document .letter-source{display:inline;padding:0;border:0;background:none;font:inherit;color:var(--accent);text-decoration:underline;text-underline-offset:2px}
.chat-widget.hotel-results-widget{width:345px;max-width:100%;border:0;padding:12px;border-radius:6px 22px 22px 6px;background:var(--soft);display:flex;flex-direction:column;gap:16px;font-size:13px;line-height:18px}.hotel-provider{display:flex;align-items:center;gap:6px;color:var(--muted);margin-bottom:8px;height:18px}.hotel-provider-mark{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;width:16px;height:16px;background:#ffdf00;color:#191919;font-size:17px}.hotel-heading{font-size:15px;line-height:20px}.hotel-dates{line-height:18px}.hotel-occupancy{line-height:18px}.hotel-results-widget>ul,.hotel-search-list{display:flex;flex-direction:column;gap:16px;list-style:none;margin:0;padding:0}.chat-widget li.hotel-result,.hotel-search-list li.hotel-result{border:0;padding:0;display:block}.hotel-result-open{display:flex;align-items:center;gap:10px;width:100%;background:transparent;padding:0;text-align:left;border-radius:12px;color:inherit}.hotel-result-open>.widget-image{flex:none;width:80px;height:80px;border-radius:12px}.hotel-result-words{display:flex;min-width:0;flex-direction:column;gap:0;font-size:13px;line-height:18px}.hotel-result-words>strong{font-size:15px;line-height:20px;font-weight:400}.hotel-result-words>span,.hotel-result-words>strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hotel-view-all{border-radius:24px;background:var(--bubble);width:100%;height:36px;padding:0;font-size:14px}.hotel-view-all:hover,.hotel-result-open:hover{background:var(--line)}#surface-dialog-content[data-hotel-detail]>.widget-image{width:100%;height:220px}#surface-dialog-content[data-hotel-detail]{overflow-wrap:anywhere}.chat-widget li.hotel-result .hotel-result-open{align-self:auto;text-align:left}.hotel-search-list{margin-top:16px}
.chat-widget li.hotel-result,.hotel-search-list li.hotel-result{margin:0}.bubble:has(.hotel-results-widget){background:transparent;padding:0;width:100%;max-width:100%}:root[data-theme=dark] .hotel-results-widget{background:#1f1f20;--muted:rgba(242,247,255,.53)}:root[data-theme=dark] .hotel-view-all{background:#282829}@media(prefers-color-scheme:dark){:root:not([data-theme=light]) .hotel-results-widget{background:#1f1f20;--muted:rgba(242,247,255,.53)}:root:not([data-theme=light]) .hotel-view-all{background:#282829}}
@media(max-width:600px){.chat-widget.hotel-results-widget{width:min(345px,calc(100% - 64px))}}
.hotel-reader{width:440px;flex:none;position:relative;display:flex;flex-direction:column;border-left:1px solid var(--line);background:var(--bg);min-height:0}.hotel-reader-heading{height:60px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:10px 12px;gap:8px}.hotel-reader-heading h2{font-size:16px;font-weight:400;margin:0;line-height:22px}.hotel-reader-heading .muted{font-size:13px;line-height:18px}.hotel-reader-body{flex:1;min-height:0;overflow:auto;padding:16px;scrollbar-width:thin}.hotel-result-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.hotel-grid-item{padding:0;text-align:left;background:transparent;display:flex;flex-direction:column;align-items:stretch;min-width:0;font-size:13px;line-height:18px}.hotel-grid-item>.widget-image{width:100%;height:auto;aspect-ratio:1;border-radius:12px;margin-bottom:8px}.hotel-grid-item strong{font-size:14px;font-weight:400}.hotel-grid-item strong,.hotel-grid-item>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hotel-reader-modes{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);padding:3px;border:1px solid var(--line);border-radius:24px;background:var(--bg);display:flex}.hotel-reader-modes button{width:30px;height:30px;padding:6px;border-radius:50%;background:transparent}.hotel-reader-modes button[aria-pressed=true]{background:var(--bubble)}.hotel-reader-modes svg{width:18px;height:18px}.hotel-results-count{font-size:12px;margin-bottom:60px}.hotel-locations{height:70vh;min-height:260px;background:var(--soft)}.hotel-gallery{position:relative;margin:0 -16px 16px}.hotel-gallery-track{display:flex;gap:8px;padding:0 16px;overflow:auto;scroll-snap-type:x mandatory;scrollbar-width:none}.hotel-gallery-track>.widget-image{width:72%;height:auto;aspect-ratio:.8;flex:none;border-radius:20px;scroll-snap-align:center}.hotel-photo-controls{display:flex;position:absolute;right:16px;bottom:12px;background:#0007;border-radius:24px;color:white}.hotel-photo-controls button{background:transparent;width:32px;height:32px}.hotel-detail-info h2{font-size:18px;font-weight:400;margin:12px 0 2px}.hotel-detail-info>.muted{font-size:13px;line-height:20px;margin:0}.hotel-detail-info>p{margin:12px 0 0}.hotel-detail-section{margin-top:24px}.hotel-detail-section h3{font-size:18px;font-weight:400;margin:0 0 12px}.hotel-detail-section p{margin:3px 0}.hotel-detail-section>button{width:100%;border-radius:24px;height:36px;padding:0;margin-top:16px;background:var(--bubble);font-size:14px}.hotel-dates-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.hotel-dates-grid .muted{font-size:13px}.hotel-price-line{display:flex;justify-content:space-between;gap:16px;font-size:14px;margin:10px 0}.hotel-price-line small{display:block;font-size:12px}.hotel-policy{margin-top:18px;font-size:14px;overflow-wrap:anywhere}.hotel-policy summary{cursor:pointer}.hotel-policy p{line-height:1.5}.hotel-reader-actions{border-top:1px solid var(--line);padding:16px;flex:none}.hotel-reader-actions>button{width:100%;border-radius:24px;height:36px;padding:0;font-size:14px}.hotel-reader-body[data-hotel-detail]{padding-top:0;padding-bottom:24px;overflow-wrap:anywhere}@media(max-width:700px){.hotel-reader{position:fixed;inset:0;width:100%;height:100dvh;z-index:130;border:0;border-radius:24px 24px 0 0;padding-top:20px}.hotel-reader:before{content:'';position:absolute;top:12px;left:calc(50% - 24px);width:48px;height:4px;border-radius:4px;background:var(--muted);opacity:.6}.hotel-reader-heading{height:60px}.hotel-reader-actions{padding:16px 16px max(16px,env(safe-area-inset-bottom))}.hotel-gallery-track>.widget-image{width:72%;aspect-ratio:.8}}
.hotel-rating::first-letter{color:#ffdf00}.hotel-detail-section a{color:inherit;text-decoration:none}.hotel-detail-section a:hover{text-decoration:underline}

/* Observed voice settings: search, pill filters and independently selectable rows. */
.voice-search-wrap{display:flex;align-items:center;border-radius:24px;background:var(--voice-surface);padding:0 12px;margin-bottom:18px}.voice-search-wrap input{background:transparent;border:0;box-shadow:none;min-width:0;width:100%;padding:12px 4px}.voice-filters{display:flex;gap:8px;margin-bottom:12px;flex-wrap:wrap}.voice-filters select{width:auto;border-radius:22px;padding:8px 12px;max-width:180px;background:var(--voice-surface);border:0}#voice-list{border-radius:16px;background:var(--voice-surface);padding:8px 16px}.voice-row{display:flex;align-items:center;border-bottom:1px solid var(--line);gap:8px}.voice-row:last-child{border-bottom:0}.voice-preview{border:0;background:transparent;padding:8px;font-size:13px;opacity:.45}.voice-select{display:flex;align-items:center;justify-content:space-between;gap:16px;text-align:left;border:0;background:transparent;flex:1;min-width:0;padding:10px 0}.voice-labels{display:flex;flex-direction:column;gap:5px}.voice-labels small{color:var(--muted,#a3a3a3);font-size:12px}.voice-check{width:20px;flex-shrink:0}.voice-name{overflow-wrap:anywhere}#voice-more{margin:12px auto;display:block}#voice-more[hidden]{display:none}#voice-status:empty{display:none}@media(max-width:600px){.voice-filters select{max-width:calc(50% - 8px)}#voice-list{padding:6px 10px}}

#voice-chooser{--voice-surface:color-mix(in srgb,var(--surface) 88%,var(--text) 12%)}
/* Provider-aware catalogue label, availability notice and saved-but-unavailable choice. */
.voice-detail{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;margin:10px 0 0;color:var(--muted);font-size:12px;line-height:1.5;overflow-wrap:anywhere}.voice-source{flex:none;color:var(--text);font-weight:500}#voice-chooser .voice-detail{margin:0 0 14px}
.voice-tag{display:inline-block;align-self:flex-start;border:1px solid var(--line);border-radius:10px;padding:0 8px;font-size:11px;line-height:18px;color:var(--muted);white-space:nowrap}
.voice-saved{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;border-radius:16px;background:var(--voice-surface);padding:12px 16px;margin-bottom:14px}.voice-saved-label{flex-basis:100%;color:var(--muted);font-size:12px}.voice-saved small{flex:1;min-width:0;color:var(--muted);font-size:12px}
@media(max-width:600px){.voice-saved{padding:10px 12px}}

.podcast-card .library-file-info{display:flex;flex-direction:column;gap:6px;align-items:flex-start}.podcast-card strong{white-space:normal}#podcast-dialog{width:min(560px,calc(100vw - 24px));max-height:90dvh;overflow:auto}#podcast-cover{display:grid;place-items:center;width:240px;max-width:100%;aspect-ratio:1;border-radius:20px;margin:12px auto;overflow:hidden}#podcast-cover img{display:block;width:100%;height:100%;object-fit:cover}#podcast-details{font-size:13px;overflow-wrap:anywhere;color:var(--muted)}#podcast-files{display:flex;gap:8px;flex-wrap:wrap}#podcast-description{white-space:pre-wrap}
#device-settings h3{font-size:14px;font-weight:400;color:var(--muted);margin:18px 0 8px}
#device-settings .device-label{display:flex;flex-direction:column;gap:4px}
#device-settings .device-list-row{min-height:64px}
#device-settings .device-inactive{justify-content:flex-start;gap:6px}
#device-settings .device-inactive>span{color:var(--accent)}
#device-settings .device-detail{margin-top:0;border-radius:16px}
#settings-dialog .settings-body:has([data-settings-panel="devices"]:not([hidden])){padding-top:0}
#settings-dialog #device-settings .device-detail .settings-list-row{min-height:44px;padding:12px 0}
#settings-dialog:has([data-settings-panel="devices"]:not([hidden])) #settings-back{background:var(--settings-group);margin-left:-8px;margin-right:0;font-size:20px}
#settings-dialog:has([data-settings-panel="devices"]:not([hidden])) [data-close="settings-dialog"]{margin-right:-8px}
#device-settings .device-detail .settings-row-count{max-width:65%;overflow-wrap:anywhere;text-align:right}

.checkout-cart { overflow-wrap:anywhere; }
.checkout-cart dt { font-weight:600; margin-top:10px; }
.checkout-cart dd { margin:2px 0 0; }
#checkout-dialog { max-width:620px; width:calc(100vw - 32px); max-height:min(880px,calc(100dvh - 32px)); }
#checkout-dialog[open] { display:flex; flex-direction:column; overflow-y:auto; }
#checkout-dialog .dialog-heading { align-items:flex-start; flex:none; margin-bottom:4px; }
#checkout-title { overflow-wrap:anywhere; }
#checkout-dialog [data-close] { flex:none; width:36px; height:36px; padding:0; border-radius:50%; }
#checkout-content { flex:1 1 auto; min-height:0; display:flex; flex-direction:column; }
#checkout-error { flex:none; margin:10px 0 0; color:#d95858; }
#checkout-error:empty { margin:0; }
.checkout-review { flex:1 1 auto; min-height:7em; overflow-y:auto; overscroll-behavior:contain; overflow-wrap:anywhere; margin:0 -8px; padding:2px 8px 14px; border-radius:12px; }
.checkout-review:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
.checkout-url { margin:0; font-size:13px; }
.checkout-instruction { margin:8px 0 0; line-height:1.4; }
.checkout-disclosure { margin:10px 0 0; padding:8px 12px; border-radius:12px; background:var(--soft); font-size:13px; line-height:1.45; }
.checkout-group { margin:12px 0 0; padding:14px 16px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.checkout-group h3, #checkout-content legend { margin:0 0 4px; padding:0; font-size:14px; font-weight:600; }
.checkout-group p { margin:0 0 6px; }
.checkout-items { list-style:none; margin:0; padding:0; }
.checkout-items li, .checkout-breakdown div { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 12px; }
.checkout-items li { padding:8px 0; border-bottom:1px solid var(--line); }
.checkout-item-name, .checkout-method-label { font-weight:550; }
.checkout-item-price, .checkout-breakdown dd { margin:0; text-align:right; }
.checkout-item-meta, .checkout-note, .checkout-method-provider, .checkout-method-reason, .checkout-details dt { grid-column:1/-1; color:var(--muted); font-size:13px; }
.checkout-breakdown { margin:6px 0 0; }
.checkout-breakdown div { padding:3px 0; }
.checkout-breakdown .checkout-note { text-align:left; }
.checkout-details { margin:0; }
.checkout-details dt:not(:first-child) { margin-top:8px; }
.checkout-details dd { margin:2px 0 0; }
.checkout-terms { margin:0; padding-left:18px; line-height:1.5; }
#checkout-content fieldset { border:0; margin:12px 0 0; padding:0; min-width:0; }
.checkout-method { position:relative; display:flex; align-items:flex-start; gap:12px; margin:6px 0 0; padding:9px 12px; border:1px solid var(--line); border-radius:14px; background:var(--surface); cursor:pointer; }
.checkout-method:has(input:checked) { border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
.checkout-method.unavailable { background:var(--soft); border-style:dashed; cursor:default; }
.checkout-method input { width:18px; height:18px; flex:none; margin:2px 0 0; padding:0; accent-color:var(--accent); }
.checkout-method-text { display:flex; flex-direction:column; gap:2px; min-width:0; }
.checkout-decision { flex:none; padding-top:14px; border-top:1px solid var(--line); }
.checkout-total { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:baseline; gap:4px 12px; margin:0 0 12px; font-weight:550; }
.checkout-total strong { font-size:24px; font-weight:600; letter-spacing:-.3px; }
.checkout-decision > p:not(.checkout-total) { margin:0 0 12px; font-size:14px; }
.checkout-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.checkout-actions button { min-height:46px; margin:0; padding:8px 10px; border-radius:999px; font-size:14px; font-weight:550; }
#checkout-deny { border:1px solid var(--line); background:var(--surface); }
@media(min-width:701px){ .checkout-delivery-and-terms { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:12px; } }
@media(max-width:700px){ .checkout-group { padding:12px 14px; } .checkout-total strong { font-size:22px; } }

/* Transcript rhythm and composer, compared with the November 21 1440 × 1000 panel-open
   captures: 22 px line pitch, 8 px paragraph gaps, 16 px between messages, width caps and a
   58 px composer 16 px above the bottom edge. Font and colours remain approximate. */
.markdown:where(.bubble>*){line-height:22px}.markdown:where(.bubble>*) p{margin:0 0 8px;line-height:inherit}

.chat-document-card{max-width:100%}
.chat-document-card[data-preview-state=unavailable] .chat-document-miniature,
.chat-document-card[data-preview-state=unavailable] .chat-document-type{display:none}
.chat-document-card[data-preview-state=unavailable]>.document-chip{
  min-width:min(220px,100%);
  max-width:100%;
}
.chat-document-card .chat-document-label{min-width:0;overflow-wrap:anywhere}
.chat-document-card:not([data-preview-state=unavailable]){
  position:relative;
  isolation:isolate;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  width:min(320px,100%);
  margin:4px 0 6px;
  padding:3px 3px 0;
  border:1px solid var(--line);
  border-radius:20px;
  background:var(--bubble);
}
.chat-document-card:not([data-preview-state=unavailable]):hover{border-color:var(--muted)}
.chat-document-miniature{
  min-height:0;
  aspect-ratio:16/9;
  overflow:hidden;
  contain:layout paint;
  container-type:inline-size;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--surface);
  pointer-events:none;
  user-select:none;
}
.chat-document-card[data-preview-state=loading] .chat-document-miniature{
  background-image:linear-gradient(var(--line),var(--line)),linear-gradient(var(--line),var(--line)),
    linear-gradient(var(--line),var(--line));
  background-repeat:no-repeat;
  background-size:42% 8px,66% 4px,52% 4px;
  background-position:13px 14px,13px 34px,13px 44px;
}
.chat-document-excerpt{
  padding:1.6em 1.5em;
  font-size:clamp(6px,2.4cqi,7.5px);
  line-height:1.4;
  overflow-wrap:anywhere;
}
.chat-document-miniature .chat-document-excerpt :is(h1,h2,h3,h4,h5,h6){
  margin:0 0 .5em;
  font-size:1.4em;
  font-weight:600;
  line-height:1.2;
  letter-spacing:normal;
}
.chat-document-miniature .chat-document-excerpt h1{font-size:1.75em}
.chat-document-excerpt :is(p,ul,ol,blockquote,pre,table){margin:0 0 .65em;line-height:inherit}
.chat-document-excerpt :is(ul,ol){padding-inline-start:1.5em}
.chat-document-excerpt :is(blockquote,pre){padding:.4em .6em;background:var(--soft)}
.chat-document-excerpt pre{white-space:pre-wrap}
.chat-document-excerpt table{border-collapse:collapse}
.chat-document-excerpt :is(th,td){padding:.2em .4em;border:1px solid var(--line)}

.chat-document-card:not([data-preview-state=unavailable])>.document-chip{
  position:static;
  min-width:0;
  height:63px;
  margin:0;
  padding:0 12px;
  border:0;
  background:transparent;
  filter:none;
}
/* The opener covers the inset page and footer without adding a second tab stop. */
.chat-document-card:not([data-preview-state=unavailable])>.document-chip::after{
  content:'';
  position:absolute;
  inset:-1px;
  border-radius:20px;
}
.chat-document-card:not([data-preview-state=unavailable])>.document-chip:focus-visible{outline:none}
.chat-document-card:not([data-preview-state=unavailable])>.document-chip:focus-visible::after{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.chat-document-card:not([data-preview-state=unavailable]) .document-chip strong{
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.chat-document-card:not([data-preview-state=unavailable]) .chat-document-version{
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}
.chat-document-card .chat-document-type{margin-top:2px}

@media(min-width:701px){
  :where(.message)>.bubble{max-width:min(88%,612px)}
  :where(.message.user)>.bubble{max-width:min(88%,520px)}
  .composer-dock{padding:10px 16px 16px;max-width:828px}
  #composer{padding:10px 12px}
  #message{line-height:22px}
}
/* Fine pointers reveal message actions on hover or keyboard focus without reserving a row.
   The gap belongs to the message, so pointing at a hidden action reveals it before the click;
   reaction chips and status labels stay visible. Touch and compact layouts keep the action row. */
@media(min-width:701px) and (hover:hover) and (pointer:fine){
  .message{margin:0;padding-bottom:16px}
  .message-tools{position:relative;z-index:1;height:0;margin:0 8px;transform:translateY(-6px);align-items:flex-start}
  .message-tools>.icon-button{opacity:0;pointer-events:none}
  .message:hover>.message-tools>.icon-button,.message:focus-within>.message-tools>.icon-button,.message:has(>.reaction-tray,>.message-menu)>.message-tools>.icon-button{opacity:1;pointer-events:auto}
  .message-tools:has(>.reaction){height:auto;margin-bottom:-6px}
  .message:has(>.reaction-tray)>.message-tools,.message-tools:has(>small,>.quiet-button){height:auto;margin-top:5px;margin-bottom:0;transform:none;align-items:center}
}
@media(min-width:701px) and (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){.message-tools>.icon-button{transition:opacity .12s ease-out}}
/* An empty composer offers attach and dictation only; text or a selected file shows Send.
   Script still hides Send during active work without a draft, and Stop is unaffected. */
.composer-dock:has(#file-names:empty) #composer:has(#message:placeholder-shown) #send{display:none}
/* The 44px target surrounds a 32px painted pill. The inset and dock padding
   together give 16px of clearance above the composer in ordinary chat. */
.composer-dock{position:relative}
#jump-latest{
  position:absolute;
  bottom:100%;
  left:50%;
  z-index:2;
  isolation:isolate;
  width:110px;
  height:44px;
  margin-left:-55px;
  padding:0 9px;
  border-radius:22px;
  background:transparent;
  color:var(--text);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  font-size:12px;
  font-weight:500;
  line-height:1;
  white-space:nowrap;
}
#jump-latest::before{
  content:'';
  position:absolute;
  inset:6px 0;
  z-index:-1;
  border-radius:16px;
  background:var(--user);
  box-shadow:var(--shadow);
  pointer-events:none;
}
#jump-latest::after{
  content:'';
  flex:none;
  width:5px;
  height:5px;
  margin-top:-3px;
  border-right:1.5px solid currentColor;
  border-bottom:1.5px solid currentColor;
  transform:rotate(45deg);
}
#jump-latest:focus-visible{outline-offset:0}
@media(max-width:700px){#jump-latest{bottom:calc(100% + 2px)}}
/* Both November 21 desktop references show no chat header while the side-by-side status panel
   is open. The panel's own close button and Escape stay available; overlay widths keep the header. */
@media(width>1100px){
 #shell:has(#activity-panel:not([hidden])) #chat-header{height:0}
 #shell:has(#activity-panel:not([hidden])) #chat-header h1{width:1px;height:1px;padding:0;margin:0;overflow:hidden;clip:rect(0,0,0,0)}
 #shell:has(#activity-panel:not([hidden])) #activity-toggle{display:none}
}
/* The replica disclosure and demo prompt live with the documented approximations. */
#fidelity-view .hint{font-size:14px;line-height:1.55;text-align:left}#fidelity-view .hint button{font-size:inherit}
/* Messaging channels reuse the settings group/row vocabulary. Native geometry and copy are
   unverified; the transport is simulated and labelled as such. aria-disabled keeps focus. */
#channel-settings button[aria-disabled=true],#channel-console button[aria-disabled=true]{cursor:default;opacity:.45;filter:none}
.channel-intro{font-size:14px;color:var(--muted);margin:4px 0 16px}
#settings-dialog .channel-provider-row{gap:16px}
.channel-provider{display:flex;flex-direction:column;gap:2px;min-width:0}
.channel-provider small{font-size:12px;line-height:17px;color:var(--muted)}
.channel-state{display:inline-flex;align-items:center;gap:6px;flex:none;font-size:13px;color:var(--muted)}
.channel-state::before{content:'';width:8px;height:8px;border-radius:50%;background:currentColor}
.channel-state[data-tone=ok]{color:light-dark(#236b38,#8fdda3)}.channel-state[data-tone=warn]{color:light-dark(#8b4d00,#f3bd71)}.channel-state[data-tone=pending]{color:var(--accent)}
.channel-note{margin:16px 0 0;padding:0 2px;font-size:14px}.channel-note strong{display:block;font-weight:550}.channel-note p{margin:4px 0 0;color:var(--muted)}
.channel-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.channel-actions button{border-radius:20px;padding:9px 16px}
#settings-dialog .channel-actions button:not(.primary){background:var(--settings-group)}
.channel-pending{margin-top:16px;padding:12px 16px;border-radius:16px;background:var(--settings-group);font-size:13px}.channel-pending p{margin:0 0 6px}.channel-pending button{margin-top:4px;border-radius:20px;background:var(--settings-bg)}
.channel-status{font-size:13px;color:var(--muted);margin:12px 2px 0}.channel-status:empty{display:none}
.channel-console{margin:28px 0 0;padding:18px;border:1px solid var(--line);border-radius:12px}.channel-console h3{margin-top:0}.channel-console>p{font-size:13px;margin:6px 0}
.channel-console-summary{color:var(--text)}
#channel-console-settings{font-size:13px;margin:0 0 6px}
#channel-console-form{margin-top:12px}#channel-console-form label{display:block;font-size:13px;margin-bottom:6px}
.channel-console-row{display:flex;gap:8px}.channel-console-row input{flex:1;min-width:0;width:auto}.channel-console-row button{flex:none}
#channel-console-status:empty,#channel-console-delivery:empty{display:none}
.channel-console-actions{display:flex;flex-wrap:wrap;gap:8px}.channel-console-actions:not(:has(button:not([hidden]))){display:none}
@media(max-width:650px){.channel-console{padding:14px}.channel-console-row{flex-direction:column}.channel-console-row button{width:100%}}
/* A channel-owned chat keeps its transcript, approvals and Stop; new input belongs to the channel. */
.composer-dock.channel-locked{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.composer-dock.channel-locked>:not(#jump-latest,#channel-composer-note,#composer){flex-basis:100%}
.composer-dock.channel-locked #composer{flex:none;padding:0;border:0;background:none;box-shadow:none}
.composer-dock.channel-locked #composer>:not(#stop){display:none!important}
.composer-dock.channel-locked #stop{width:44px;height:44px;border:1px solid var(--line);border-radius:50%;background:var(--surface)}
.channel-composer-note{flex:1;min-width:0;display:flex;align-items:center;gap:12px;padding:10px 10px 10px 20px;border-radius:28px;background:var(--surface);border:1px solid var(--line);box-shadow:0 2px 14px #00000012}
.channel-composer-note>div{flex:1;min-width:0}.channel-composer-note p{margin:0;font-size:14px;line-height:20px}.channel-composer-note small{display:block;font-size:12px;line-height:17px;margin-top:2px}
.channel-composer-note button{flex:none;border-radius:20px;font-size:13px}
@media(max-width:700px){.channel-composer-note{flex-wrap:wrap;padding:12px 14px;border-radius:20px}.channel-composer-note button{width:100%}}
/* Compact side chat separates the Back target from the conversation switcher. */
#chat-back{display:none}
@media(max-width:700px){
 #chat-header.side-chat{padding-left:6px}
 #chat-header.side-chat :is(#chat-back,.chat-title-pill){transform:translateY(-2px)}
 #chat-header.side-chat #chat-back{display:inline-grid;width:44px;height:44px;margin-right:-10px;padding:0;border-radius:50%;color:var(--text)}
 #chat-back svg{width:32px;height:32px;padding:7px;border-radius:50%;background:var(--surface);box-shadow:var(--shadow);transform:rotate(90deg)}
 #chat-back:focus-visible{outline-offset:-4px}
 #chat-header.side-chat .chat-title-pill{position:relative}
 #chat-header.side-chat #sidebar-toggle::after{content:'';position:absolute;inset:-4px 0;border-radius:22px}
 #chat-header.side-chat #sidebar-toggle:hover{filter:none}/* a filter would re-anchor the stretched target */
 #chat-header.side-chat #sidebar-toggle:focus-visible{outline:none}
 #chat-header.side-chat #sidebar-toggle:focus-visible::after{outline:2px solid var(--accent);outline-offset:0}
}

/* Fade the clipped edge of ordinary desktop chat history without moving it. */
@media(min-width:1101px) and (forced-colors:none){
  @media not all and (prefers-contrast:more){
    #shell:not(.page-mode)>main>#chat-view.chat-history-top-fade:not(:has(#chat-scroll:focus-within))::before{
      content:"";
      flex:none;
      align-self:center;
      width:min(calc(100% - 48px),780px);
      height:110px;
      margin-bottom:-110px;
      z-index:1;
      pointer-events:none;
      background:linear-gradient(to bottom,var(--bg),transparent);
    }
  }
}
