/* Current product layer: predictable stacking, a compact shell and one icon family. */
:root { --sidebar:272px; --sidebar-compact:76px; --ow-border:#e0e9ee; --ow-surface:#f6f9fb; --ow-primary:#087f8b; }
html { scrollbar-gutter:stable; }
body[data-booting] .app-shell {visibility:hidden;}
#bootStatus {position:fixed;inset:0;display:grid;place-content:center;gap:12px;text-align:center;color:#61808e;background:#f8fbfc;font-size:13px;}
#bootStatus b {font-size:24px;color:#087f8b;}
body.ow-overlay-open {overflow:hidden;}
body, button, input, select, textarea { font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif !important; }
body { color:#203b50; font-size:14px; -webkit-font-smoothing:antialiased; }
button { box-shadow:none; }
.ow-icon { width:20px; height:20px; flex:0 0 20px; vertical-align:middle; }
.spec-icon .ow-icon {width:30px;height:30px;flex-basis:30px;}
#profileMore,#topMoreBtn,#sendPrompt,#sendFollowup,.library-nav-expander {display:inline-grid;place-items:center;}
#profileMore .ow-icon,#topMoreBtn .ow-icon {width:20px;height:20px;flex-basis:20px;}
#sendPrompt .ow-icon,#sendFollowup .ow-icon {width:23px;height:23px;flex-basis:23px;}
.model-status-picker > summary.ow-has-chevron::after {content:none!important;}
.model-status-picker > summary > .ow-icon,.model-picker > summary > .ow-icon {width:15px;height:15px;flex:0 0 15px;transition:transform .18s ease;}
.model-status-picker[open] > summary > .ow-icon,.model-picker[open] > summary > .ow-icon {transform:rotate(180deg);}
.model-picker > summary > .ow-icon {margin-left:2px;color:#0f8fa2;}
.library-nav-expander .ow-icon {width:16px;height:16px;flex-basis:16px;}
#libraryReset {display:inline-flex;align-items:center;gap:5px;}
#libraryReset .ow-icon {width:14px;height:14px;flex-basis:14px;}
.sidebar-toggle,.modal-close,.library-dialog-close,#inboxPanel [data-close-inbox] {display:inline-grid;place-items:center;}
#sidebar { z-index:100 !important; background:#fbfdfe !important; box-shadow:none !important; border-right:1px solid var(--ow-border) !important; }
#sidebar .library-navigation { overflow:visible !important; max-height:none !important; flex-shrink:0; }
#sidebar .library-sidebar, #sidebar .chat-sidebar { overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#c7d4dc transparent; }
#sidebar .library-nav-item { min-height:43px; font-size:13px; border-radius:8px; gap:12px; }
#sidebar .library-nav-symbol { display:grid;place-items:center;font-size:0;width:22px; }
#sidebar .library-nav-item.is-selected { background:#e8f3f4; color:#087f8b; }
#sidebar .library-subnav button { font-size:12px; min-height:36px; }
#sidebar .side-top, #sidebar .workspace-modes, #sidebar .profile { flex-shrink:0; }
#sidebar .profile { padding:10px; border:1px solid var(--ow-border); border-radius:12px; box-shadow:none; }
.profile-text { min-width:0; } .profile-text b, .profile-text span { overflow:hidden; text-overflow:ellipsis;white-space:nowrap;display:block; }
#sidebar .profile-text b {font-size:13px;} #sidebar .profile-text span {font-size:11px;color:#748694;}
.profile-menu { z-index:120 !important; box-shadow:0 12px 36px #17384a15 !important; border-radius:10px !important; }
.profile-menu button {font-size:13px!important;padding:10px 16px!important;}
.library-page { max-width:1520px; padding:24px clamp(24px,3.2vw,56px) 32px; }
.library-masthead { gap:32px; padding-block:24px 30px; align-items:end; }
.library-masthead h1 {font-size:clamp(30px,3.2vw,46px)!important;line-height:1.2!important;letter-spacing:-1.5px!important;}
.library-intro { font-size:13px!important;line-height:1.8; }
.library-eyebrow { font-size:10px;letter-spacing:.16em; }
.library-search {min-width:0;max-width:440px;}
.library-search input {font-size:13px;}
.library-fields { border-top:1px solid #b6cbd6!important;min-height:54px; }
.library-fields button {font-size:12px;}
.ow-demo-note { background:#f6f9fa; border-left:2px solid #96b7c3;color:#637985;font-size:11px;padding:10px 14px;margin-bottom:24px; }
.library-section-intro {margin-block:24px;}
.library-section-intro h2 { font-size:clamp(23px,2.2vw,32px)!important;line-height:1.45!important; }
.library-section-intro p {font-size:13px!important;line-height:1.9!important;}
.collection-source-image { max-height:none; }
.library-section-heading h2 {font-size:23px;}
.library-spotlight h2 {line-height:1.5!important;}
.topbar {height:66px!important;min-height:66px;box-shadow:none!important;background:#ffffffed!important;}
.top-icon {width:38px!important;height:38px!important;border-radius:10px!important;box-shadow:none!important;}
#inboxBtn span:empty {display:none;}
.account-entry {white-space:nowrap;min-height:38px;padding:0 14px;border-radius:10px;}
.model-status-picker {font-size:11px;max-width:320px;}
.model-status-picker summary {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.model-status-picker .answer-model-menu {width:340px;max-width:calc(100vw - 32px);}
.model-status-picker .answer-model-menu b {font-size:11px;overflow-wrap:anywhere;}
#syncStatus {position:fixed;bottom:16px;right:20px;z-index:80;padding:7px 12px;border:1px solid #dce7eb;border-radius:20px;background:#fffffff2;font-size:11px;color:#637c88;box-shadow:0 3px 15px #183b4c08;}
#syncStatus.sync-error {color:#9b4a2c;border-color:#e9b698;}
.guest-chat-note {position:relative;z-index:1;max-width:680px;margin:8px 0 0;color:#637c88;font-size:12px;line-height:1.6;}
.settings-modal, .modal {z-index:1000!important;position:fixed!important;inset:0!important;}
.settings-modal .modal-backdrop,.modal .modal-backdrop {position:absolute;inset:0;background:#122f4766;backdrop-filter:blur(3px);}
.settings-card {position:relative!important;z-index:1!important;left:auto!important;top:auto!important;transform:none!important;width:min(940px,calc(100vw - 48px))!important;height:min(780px,calc(100dvh - 64px))!important;max-height:calc(100dvh - 64px)!important;margin:32px auto!important;display:grid!important;grid-template-columns:200px minmax(0,1fr)!important;border-radius:20px!important;overflow:hidden!important;box-shadow:0 24px 90px #16314730!important;}
.settings-nav {padding:28px 16px!important;background:#f3f8fa!important;border-right:1px solid var(--ow-border);min-width:0;}
.settings-nav h2 {font-size:20px!important;margin:0 12px 24px!important;}
.settings-nav button {font-size:13px!important;padding:12px!important;border-radius:8px!important;}
.settings-body {min-width:0;overflow-y:auto!important;padding:32px 36px!important;}
.settings-body h3 {font-size:23px!important;margin:0 0 10px!important;}
.settings-heading p {color:#748694;line-height:1.8;font-size:12px;}
.settings-card .modal-close {top:16px!important;right:16px!important;width:34px!important;height:34px!important;border-radius:8px!important;z-index:5!important;box-shadow:none!important;}
.account-profile-form,.editor-form-grid {display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:26px;align-items:start;}
.profile-avatar {grid-column:1/-1;width:54px;height:54px;border-radius:16px;background:#e4f3f3;color:#087f8b;display:grid;place-items:center;font-size:24px;}
.account-profile-form label,.password-section label,.editor-form-grid label {display:grid;gap:8px;font-size:12px;color:#637985;min-width:0;}
.account-profile-form input,.password-section input,.editor-form-grid input,.editor-form-grid select,.editor-form-grid textarea {box-sizing:border-box;min-width:0;width:100%;border:1px solid #d4e2e9;border-radius:8px;padding:11px 12px;font-size:13px;color:#203b50;background:white;}
.account-profile-form input[readonly] {background:#f5f8fa;}
.full-width {grid-column:1/-1;}
.settings-actions {display:flex;gap:10px;flex-wrap:wrap;margin:0!important;}
.primary-btn,.outline-btn {border-radius:9px!important;font-size:13px!important;min-height:40px!important;padding:10px 17px!important;box-shadow:none!important;}
.primary-btn {background:#087f8b!important;color:white!important;}
button:disabled {opacity:.5;cursor:not-allowed!important;}
body[data-production=true] [hidden],body[data-production=true] #sidebar [hidden] {display:none!important;}
.password-section {border-top:1px solid var(--ow-border);margin-top:25px;padding-top:16px;}
.password-section h4 {font-size:14px;}
.password-section form {display:grid;gap:14px;}
.account-security-note {padding:14px;background:#f6f9fb;color:#687f8c;font-size:11px;line-height:1.9;border-radius:8px;margin-top:20px;}
.text-danger {border:0;background:transparent;color:#9c4a46;padding:10px 0;font-size:12px;}
.form-message {color:#087f8b;font-size:12px;line-height:1.7;margin:0;}
.source-scope {font-size:11px;line-height:1.9;color:#78909d;}.sources-panel .source-item a{display:block;font-size:11px;margin-top:10px;color:#087f8b;}.sources-panel .source-item b{font-size:12px;line-height:1.7;}
.inbox-panel {position:fixed!important;z-index:400!important;top:70px!important;right:24px!important;width:min(360px,calc(100vw - 32px))!important;max-height:calc(100dvh - 96px)!important;overflow-y:auto;padding:20px!important;border:1px solid var(--ow-border)!important;box-shadow:0 20px 55px #17394b24!important;border-radius:16px!important;}
.inbox-panel h3 {font-size:18px!important;}
.inbox-panel article {background:#f7fafb!important;border:1px solid #e5edf1!important;border-radius:10px!important;padding:14px!important;}
.inbox-panel article b {font-size:13px!important;}.inbox-panel article p {font-size:12px!important;line-height:1.8!important;}.inbox-panel time {font-size:10px;color:#8a9da8;}
.inbox-empty,.sidebar-empty {color:#8193a0;font-size:12px;line-height:1.8;padding:12px;}
.conversation-link {display:flex;gap:8px;width:100%;text-align:left;border:0;background:transparent;padding:10px 8px;color:#526b7b;border-radius:8px;align-items:center;}
.conversation-link span {white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:12px;}.conversation-link .ow-icon {width:16px;height:16px;flex-basis:16px;}
.conversation-link:hover {background:#eaf2f5;}
.account-dialog {width:min(430px,calc(100vw - 32px));max-height:calc(100dvh - 40px);overflow:auto;padding:32px;border:1px solid var(--ow-border);border-radius:20px;box-sizing:border-box;color:#203b50;box-shadow:0 24px 100px #122d4933;}
.account-dialog::backdrop {background:#142f4766;backdrop-filter:blur(4px);}
.account-close {position:absolute;top:14px;right:14px;display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:9px;background:#f1f6f8;color:#466a78;cursor:pointer;}
.account-close .ow-icon {width:18px;height:18px;flex-basis:18px;}
.account-brand {display:flex;gap:9px;align-items:center;color:#087f8b;font-size:13px;font-weight:700;}
.account-brand .ow-icon {width:24px;height:24px;flex-basis:24px;stroke-width:2.6;}
.account-dialog h2 {font-size:26px;margin:24px 0 12px;letter-spacing:-.5px;}
.account-intro {font-size:12px;color:#7c909d;line-height:1.8;margin:0 0 24px;}
.account-dialog form {display:grid;gap:16px;}.account-dialog label {display:grid;gap:7px;font-size:12px;color:#597180;}
.account-dialog input:not([type=checkbox]) {width:100%;box-sizing:border-box;min-width:0;padding:12px;border:1px solid #d6e3e9;border-radius:9px;color:#203b50;font-size:13px;background:white;}
.account-dialog .account-consent {display:flex;gap:8px;font-size:11px;line-height:1.8;align-items:start;}.account-consent input {margin-top:4px;}.account-consent a {color:#087f8b;}
.account-switch {display:flex;justify-content:space-between;gap:12px;margin-top:18px;}.account-switch button {border:0;background:none;color:#087f8b;font-size:12px;padding:0;}
.account-error {font-size:12px;color:#a14c3a;line-height:1.8;margin:0;}
.account-footnote {font-size:10px;color:#8da0ac;line-height:1.8;margin-top:24px;}
.policy-dialog {width:min(680px,calc(100vw - 32px));}.policy-dialog p {font-size:13px;line-height:1.9;color:#68808e;}.policy-dialog h3 {font-size:16px;}
.account-eyebrow {font-size:10px;color:#6e94a4;letter-spacing:.13em;}
.production-editor-head {display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:30px;}
.production-editor-head h1 {font-size:32px;margin:8px 0;}.production-editor-head p {font-size:13px;color:#7b8f9b;}
.production-editor-layout {display:grid;grid-template-columns:260px minmax(0,1fr);gap:28px;}
.production-editor-list {max-height:650px;overflow-y:auto;border:1px solid var(--ow-border);border-radius:12px;}
.production-editor-list button {display:grid;gap:8px;text-align:left;padding:15px;width:100%;border:0;border-bottom:1px solid var(--ow-border);background:white;color:#526d7d;}.production-editor-list button.selected {background:#eaf6f6;}.production-editor-list small {font-size:10px;color:#7a96a4;}.production-editor-list b {font-size:12px;line-height:1.6;}
.editor-form-grid {margin-top:0;}.editor-actions {display:flex;flex-wrap:wrap;gap:10px;margin-block:20px;}
.editor-checklist {margin:22px 0;border:1px solid var(--ow-border);border-radius:10px;padding:16px;display:grid;gap:12px;font-size:12px;color:#687f8d;}.editor-checklist label {display:flex;gap:8px;}
.stage-brand strong {font-size:48px!important;}.composer {border-radius:16px!important;box-shadow:0 6px 30px #123d4b08!important;}
body[data-production=true] .sponsor-section,body[data-production=true] .rwd-story,body[data-production=true] .side-card,body[data-production=true] .composer-tools [data-tool-toggle],body[data-production=true] .composer-tools .attach-menu {display:none!important;}
body[data-production=true] .brand-story {max-width:760px;margin-inline:auto;text-align:center;}
body[data-production=true] .brand-story h1 {font-size:32px!important;line-height:1.5!important;}
body[data-production=true] .view[data-view=data],body[data-production=true] #view-data,body[data-production=true] #view-network {display:none!important;}
@media (max-width:960px){.production-editor-layout{grid-template-columns:1fr;}.production-editor-list{max-height:220px;}.library-masthead{align-items:start;}}
@media (max-width:768px){
  .settings-card{width:calc(100vw - 24px)!important;height:calc(100dvh - 24px)!important;max-height:calc(100dvh - 24px)!important;margin:12px!important;grid-template-columns:1fr!important;grid-template-rows:auto minmax(0,1fr)!important;border-radius:16px!important;}
  .settings-nav{padding:16px!important;display:flex!important;gap:8px;overflow-x:auto;border-right:0;border-bottom:1px solid var(--ow-border);align-items:center;}.settings-nav h2{font-size:16px!important;margin:0 6px 0 0!important;white-space:nowrap;}.settings-nav button{white-space:nowrap;padding:8px 10px!important;font-size:12px!important;}.settings-nav button:last-child{margin-right:25px;}
  .settings-body{padding:24px 20px!important;}.settings-card .modal-close{top:10px!important;right:8px!important;width:28px!important;height:28px!important;}
  .account-profile-form,.editor-form-grid{grid-template-columns:1fr;}.full-width{grid-column:auto;}.library-page{padding-inline:20px;}.library-masthead h1{font-size:32px!important;}.library-masthead{padding-block:22px;gap:24px;}.ow-demo-note{font-size:10px;}.library-section-intro h2{font-size:23px!important;}.library-section-intro{margin-block:18px;}.inbox-panel{right:12px!important;top:64px!important;}
  #syncStatus{bottom:10px;right:10px;max-width:calc(100vw - 100px);font-size:10px;}.production-editor-head{align-items:start;}.production-editor-head h1{font-size:26px;}.stage-brand strong{font-size:36px!important;}.model-status-picker{max-width:220px;}.account-dialog{padding:26px;}
}
body[data-theme=dark] .settings-card,body[data-theme=dark] .account-dialog,body[data-theme=dark] .inbox-panel {background:#102b3e;color:#e1edf3;}
body[data-theme=dark] .settings-nav,body[data-theme=dark] .account-security-note {background:#153448!important;}
body[data-theme=dark] #sidebar {background:#102839!important;}
body[data-theme=dark] .account-profile-form input,body[data-theme=dark] .password-section input {background:#17394b;color:#e7f0f5;border-color:#315466;}

@media (max-width: 768px) {
  body[data-mode="library"] .library-page { padding-top: 88px; }
  .topbar { left: 68px !important; width: calc(100vw - 68px) !important; padding-left: 0 !important; }
}

/* Chat reading surface: keep controls in the document flow and constrain line length. */
body[data-production="true"][data-mode="chat"]:not([data-view="assistant"])::before { display:none !important; }
body[data-production="true"][data-mode="chat"]:not([data-view="assistant"]) .topbar {
  position:sticky !important;
  inset:auto !important;
  top:0 !important;
  z-index:90 !important;
  box-sizing:border-box !important;
  width:100% !important;
  height:64px !important;
  min-height:64px !important;
  padding:10px clamp(18px,3vw,36px) !important;
  border-bottom:1px solid var(--ow-border);
  background:#fff !important;
  backdrop-filter:none !important;
}
body[data-production="true"][data-mode="chat"]:not([data-view="assistant"]) .topbar .crumb {
  display:flex;
  align-items:center;
  margin-right:auto;
  white-space:nowrap;
}
body[data-production="true"][data-mode="chat"]:not([data-view="assistant"]) .topbar .crumb b {font-size:14px;}
body[data-production="true"][data-mode="chat"]:not([data-view="assistant"]) .topbar .crumb span {display:none;}
body[data-production="true"][data-view="answer"] .topbar .crumb::after {content:"/ 对话";margin-left:10px;color:#7b929f;font-size:12px;}
body[data-production="true"][data-view="evidence"] .topbar .crumb::after {content:"/ 循证检索";margin-left:10px;color:#7b929f;font-size:12px;}
body[data-production="true"][data-view="calculators"] .topbar .crumb::after {content:"/ 量表演示";margin-left:10px;color:#7b929f;font-size:12px;}
body[data-production="true"][data-mode="chat"]:not([data-view="assistant"]) .view:not(#view-assistant),
body[data-production="true"][data-mode="chat"] #answerView {padding-top:24px !important;}

body[data-production="true"][data-mode="chat"] #answerView {
  box-sizing:border-box;
  padding:24px clamp(16px,3vw,40px) 56px !important;
}
body[data-production="true"][data-mode="chat"] #answerView .answer-top,
body[data-production="true"][data-mode="chat"] #answerView .question-card,
body[data-production="true"][data-mode="chat"] #answerView .answer-layout {max-width:1160px;}
body[data-production="true"][data-mode="chat"] #answerView .answer-top {margin-bottom:14px;}
body[data-production="true"][data-mode="chat"] #answerView .answer-top button {
  border-radius:9px;
  padding:8px 12px;
  font-size:12px;
  box-shadow:none;
}
body[data-production="true"][data-mode="chat"] #answerView .question-card {
  margin-bottom:16px;
  padding:18px 22px;
  border-radius:14px;
  border-color:#d8e9ed;
  border-left:3px solid #1ba8b3;
  background:#f8fbfc;
  box-shadow:none;
}
body[data-production="true"][data-mode="chat"] #answerView .question-card span {font-size:11px;color:#087f8b;}
body[data-production="true"][data-mode="chat"] #answerView .question-card h2 {
  margin:7px 0;
  font-size:clamp(19px,1.55vw,25px);
  line-height:1.45;
  overflow-wrap:anywhere;
}
body[data-production="true"][data-mode="chat"] #answerView .question-card small {font-size:11px;line-height:1.6;}
body[data-production="true"][data-mode="chat"] #answerView .answer-layout {
  grid-template-columns:minmax(0,1fr) 264px;
  gap:20px;
  align-items:start;
}
body[data-production="true"][data-mode="chat"] #answerView .answer-main,
body[data-production="true"][data-mode="chat"] #answerView .sources-panel {
  min-width:0;
  border-radius:16px;
  border-color:#dce9ed;
  background:#fff;
  box-shadow:none;
}
body[data-production="true"][data-mode="chat"] #answerView .answer-main {padding:clamp(20px,2.4vw,32px);}
body[data-production="true"][data-mode="chat"] #answerView .ai-head {
  margin-bottom:16px;
  padding-bottom:16px;
  border-bottom:1px solid #e6eff2;
}
body[data-production="true"][data-mode="chat"] #answerView .ai-orb {width:36px;height:36px;border-radius:11px;font-size:14px;}
body[data-production="true"][data-mode="chat"] #answerView .ai-head b {display:block;font-size:13px;}
body[data-production="true"][data-mode="chat"] #answerView .ai-head span {display:block;font-size:11px;line-height:1.6;}
body[data-production="true"][data-mode="chat"] #answerView .answer-context-note {
  margin:0 0 20px;
  padding:9px 12px;
  border-left:3px solid #3baebb;
  border-radius:0 7px 7px 0;
  background:#f3f9fa;
  color:#526f7d;
  font-size:12px;
  line-height:1.7;
}
body[data-production="true"][data-mode="chat"] #answerView .model-answer {
  color:#233e50;
  font-size:15px;
  line-height:1.85;
  overflow-wrap:anywhere;
}
body[data-production="true"][data-mode="chat"] #answerView .model-answer p {margin:0 0 15px;}
body[data-production="true"][data-mode="chat"] #answerView .model-answer h2,
body[data-production="true"][data-mode="chat"] #answerView .model-answer h3,
body[data-production="true"][data-mode="chat"] #answerView .model-answer h4 {margin:22px 0 9px;line-height:1.45;}
body[data-production="true"][data-mode="chat"] #answerView .model-answer ol,
body[data-production="true"][data-mode="chat"] #answerView .model-answer ul {padding-left:1.5em;margin:10px 0 18px;}
body[data-production="true"][data-mode="chat"] #answerView .model-answer li {padding-left:.2em;margin:0 0 8px;}
body[data-production="true"][data-mode="chat"] #answerView .answer-provenance {
  display:inline-flex;
  margin:0 0 16px;
  padding:5px 10px;
  border:1px solid #c8e7e8;
  border-radius:999px;
  background:#eef8f8;
  color:#087f8b;
  font-size:11px;
  font-weight:700;
  line-height:1.4;
}
body[data-production="true"][data-mode="chat"] #answerView .chat-turn + .chat-turn {
  margin-top:24px;
  padding-top:24px;
  border-top:1px solid #e5eef1;
}
body[data-production="true"][data-mode="chat"] #answerView .chat-turn-question {
  margin:0 0 16px;
  padding:11px 13px;
  border-radius:10px;
  background:#f3f8fa;
  color:#284c60;
  font-size:14px;
  font-weight:650;
  line-height:1.65;
  overflow-wrap:anywhere;
}
body[data-production="true"][data-mode="chat"] #answerView .chat-turn-label {
  display:block;
  margin:0 0 6px;
  color:#698593;
  font-size:11px;
  font-weight:700;
  line-height:1.5;
}
body[data-production="true"][data-mode="chat"] #answerView .chat-turn-user {margin:0 0 15px;}
body[data-production="true"][data-mode="chat"] #answerView .chat-turn-body {min-width:0;}
body[data-production="true"][data-mode="chat"] #answerView .chat-turn-answer {min-width:0;}
body[data-production="true"][data-mode="chat"] #answerView .chat-request-error {
  margin:10px 0;
  padding:10px 12px;
  border:1px solid #efd6c8;
  border-radius:9px;
  background:#fff7f3;
  color:#954a31;
  font-size:12px;
  line-height:1.7;
}
body[data-production="true"][data-mode="chat"] #answerView .thinking {align-items:center;margin:12px 0;color:#587a88;font-size:12px;}
body[data-production="true"][data-mode="chat"] #answerView .notice {
  margin-top:24px;
  padding:13px 15px;
  border-radius:10px;
  background:#fffaf2;
  color:#765235;
  font-size:12px;
  line-height:1.7;
}
body[data-production="true"][data-mode="chat"] #answerView .notice p {margin:5px 0 0;}
body[data-production="true"][data-mode="chat"] #answerView .followup {
  align-items:center;
  grid-template-columns:minmax(0,1fr) 44px;
  margin-top:22px;
  padding:8px 9px 8px 14px;
  border-radius:12px;
  background:#fbfdfe;
}
body[data-production="true"][data-mode="chat"] #answerView .followup textarea {min-width:0;min-height:42px;max-height:180px;font-size:14px;line-height:1.6;}
body[data-production="true"][data-mode="chat"] #answerView .followup button {width:42px;height:42px;border-radius:10px;}
body[data-production="true"][data-mode="chat"] #answerView .sources-panel {
  position:sticky;
  top:84px;
  align-self:start;
  max-height:calc(100dvh - 100px);
  overflow-y:auto;
  padding:18px;
}
body[data-production="true"][data-mode="chat"] #answerView .sources-panel .panel-head {align-items:flex-start;flex-wrap:wrap;gap:6px;}
body[data-production="true"][data-mode="chat"] #answerView .sources-panel .panel-head h3 {margin:0;font-size:15px;color:#1f3f53;}
body[data-production="true"][data-mode="chat"] #answerView .sources-panel .panel-head span {color:#087f8b;font-size:11px;line-height:1.5;}
body[data-production="true"][data-mode="chat"] #answerView .source-scope {margin:14px 0;color:#506b79;font-size:13px;line-height:1.75;}
body[data-production="true"][data-mode="chat"] #answerView .source-item {align-items:flex-start;padding:13px 0;}
body[data-production="true"][data-mode="chat"] #answerView .source-item > span {flex:0 0 32px;width:32px;height:32px;border-radius:9px;font-size:11px;}
body[data-production="true"][data-mode="chat"] #answerView .source-item > div {min-width:0;}
body[data-production="true"][data-mode="chat"] #answerView .source-item b {display:block;color:#29485a;font-size:13px;line-height:1.6;overflow-wrap:anywhere;}
body[data-production="true"][data-mode="chat"] #answerView .source-item small {display:block;color:#667e8a;font-size:12px;line-height:1.65;overflow-wrap:anywhere;}
body[data-production="true"][data-mode="chat"] #answerView .source-privacy-note {margin:13px 0 2px;color:#667e8a;font-size:12px;line-height:1.7;}
body[data-production="true"][data-mode="chat"] #answerView .sources-panel .full-source {
  display:inline-flex;
  margin-top:14px;
  padding:0;
  background:transparent;
  color:#087f8b;
  font-size:12px;
  text-align:left;
  cursor:pointer;
}

@media (max-width:1360px) {
  body[data-production="true"][data-mode="chat"] #answerView .answer-layout {grid-template-columns:minmax(0,1fr);}
  body[data-production="true"][data-mode="chat"] #answerView .sources-panel {position:static;max-height:none;}
}
@media (max-width:768px) {
  html:has(body[data-production="true"][data-mode="library"]),
  html:has(body[data-production="true"][data-mode="chat"]:not([data-view="assistant"])) {
    overflow-x:clip !important;
    overflow-y:visible !important;
  }
  body[data-production="true"][data-mode="library"]:not(.ow-overlay-open),
  body[data-production="true"][data-mode="chat"]:not([data-view="assistant"]):not(.ow-overlay-open) {
    overflow-x:clip !important;
    overflow-y:visible !important;
  }
  body[data-production="true"][data-mode="library"] .main,
  body[data-production="true"][data-mode="chat"]:not([data-view="assistant"]) .main {
    overflow-x:clip !important;
    overflow-y:visible !important;
  }
  body[data-production="true"][data-mode="chat"]:not([data-view="assistant"]) .topbar {
    left:0 !important;
    right:0 !important;
    width:100% !important;
    min-height:62px !important;
    height:62px !important;
    padding:10px 12px 10px 66px !important;
  }
  body[data-production="true"][data-mode="chat"]:not([data-view="assistant"]) .topbar .crumb {display:none;}
  body[data-production="true"][data-mode="chat"] #answerView {padding:18px 12px 36px !important;}
  body[data-production="true"][data-mode="chat"] #answerView .question-card {padding:15px 17px;}
  body[data-production="true"][data-mode="chat"] #answerView .answer-main {padding:18px;}
  body[data-production="true"][data-mode="chat"] #answerView .model-answer {font-size:14px;line-height:1.8;}
  body[data-production="true"][data-mode="chat"]:not([data-view="assistant"]) .top-actions {gap:4px !important;}
  body[data-production="true"][data-mode="chat"]:not([data-view="assistant"]) .top-actions .model-status-picker {flex:0 1 104px !important;max-width:104px !important;}
  body[data-production="true"][data-mode="chat"]:not([data-view="assistant"]) .model-status-picker > summary {padding:6px !important;gap:4px !important;}
  body[data-production="true"][data-mode="chat"]:not([data-view="assistant"]) .model-status-picker > summary span {max-width:62px !important;font-size:11px !important;}
  body[data-production="true"][data-mode="chat"]:not([data-view="assistant"]) .model-status-picker > summary b {display:none !important;}
  body[data-production="true"][data-mode="chat"]:not([data-view="assistant"]) #accountEntry {min-height:36px !important;padding:6px 8px !important;font-size:11px !important;}
  body[data-production="true"][data-mode="chat"]:not([data-view="assistant"]) .top-icon {width:36px !important;height:36px !important;}
}
body[data-theme="dark"][data-production="true"][data-mode="chat"]:not([data-view="assistant"]) .topbar,
body[data-theme="dark"][data-production="true"][data-mode="chat"] #answerView .answer-main,
body[data-theme="dark"][data-production="true"][data-mode="chat"] #answerView .sources-panel {background:#102b3e !important;border-color:#315466;}
body[data-theme="dark"][data-production="true"][data-mode="chat"] #answerView .question-card,
body[data-theme="dark"][data-production="true"][data-mode="chat"] #answerView .answer-context-note,
body[data-theme="dark"][data-production="true"][data-mode="chat"] #answerView .chat-turn-question,
body[data-theme="dark"][data-production="true"][data-mode="chat"] #answerView .followup {background:#17394b;color:#e1edf3;border-color:#315466;}
body[data-theme="dark"][data-production="true"][data-mode="chat"] #answerView .model-answer,
body[data-theme="dark"][data-production="true"][data-mode="chat"] #answerView .sources-panel .panel-head h3,
body[data-theme="dark"][data-production="true"][data-mode="chat"] #answerView .source-item b {color:#e1edf3;}
body[data-theme="dark"][data-production="true"][data-mode="chat"]:not([data-view="assistant"]) .topbar .crumb b,
body[data-theme="dark"][data-production="true"][data-mode="chat"] #answerView .question-card h2 {color:#e1edf3;}
body[data-theme="dark"][data-production="true"][data-mode="chat"] #answerView .answer-context-note,
body[data-theme="dark"][data-production="true"][data-mode="chat"] #answerView .source-scope,
body[data-theme="dark"][data-production="true"][data-mode="chat"] #answerView .source-privacy-note {color:#b8cdd7;}
body[data-theme="dark"][data-production="true"][data-mode="chat"] #answerView .notice {background:#2c261c;color:#f2d7a4;border-color:#67553c;}
body[data-theme="dark"][data-production="true"][data-mode="chat"] #answerView .answer-provenance {background:#17424a;color:#9be0e0;border-color:#2f737b;}
body[data-theme="dark"][data-production="true"][data-mode="chat"] #answerView .chat-turn-label {color:#a8c1cb;}
body[data-theme="dark"][data-production="true"][data-mode="chat"] #answerView .chat-request-error {background:#3a2726;color:#f0b5a4;border-color:#77514a;}

/* Library controls share the same non-overlapping header as the answer view. */
body[data-production="true"][data-mode="library"]::before {display:none !important;}
body[data-production="true"][data-mode="library"] .topbar {
  position:sticky !important;
  inset:auto !important;
  top:0 !important;
  z-index:90 !important;
  box-sizing:border-box !important;
  width:100% !important;
  height:64px !important;
  min-height:64px !important;
  padding:10px clamp(18px,3vw,36px) !important;
  border-bottom:1px solid var(--ow-border);
  background:#fff !important;
  backdrop-filter:none !important;
}
body[data-production="true"][data-mode="library"] .topbar .crumb {display:flex;align-items:center;margin-right:auto;}
body[data-production="true"][data-mode="library"] .topbar .crumb b {font-size:14px;}
body[data-production="true"][data-mode="library"] .topbar .crumb span {display:none;}
body[data-production="true"][data-mode="library"] .library-page {padding-top:20px;}
@media (max-width:768px) {
  body[data-production="true"][data-mode="library"] .topbar {
    left:0 !important;
    right:0 !important;
    width:100% !important;
    height:62px !important;
    min-height:62px !important;
    padding:10px 12px 10px 66px !important;
  }
  body[data-production="true"][data-mode="library"] .topbar .crumb {display:none;}
  body[data-production="true"][data-mode="library"] .library-page {padding-top:18px !important;}
  body[data-production="true"][data-mode="library"] .library-experience[data-kind="reading"] {padding-top:18px !important;}
  body[data-production="true"][data-mode="library"] .ow-workspace {padding-top:18px !important;}
  body[data-production="true"][data-mode="library"] .top-actions {gap:4px !important;}
  body[data-production="true"][data-mode="library"] #accountEntry {min-height:36px !important;padding:6px 8px !important;font-size:11px !important;}
  body[data-production="true"][data-mode="library"] .top-icon {width:36px !important;height:36px !important;}
}
@media (max-width:360px) {
  body[data-production="true"][data-mode="chat"] .top-actions .model-status-picker {flex:0 0 38px !important;width:38px !important;max-width:38px !important;}
  body[data-production="true"][data-mode="chat"] .model-status-picker > summary {width:38px !important;min-width:38px !important;padding:6px !important;gap:4px !important;}
  body[data-production="true"][data-mode="chat"] #selectedAnswerModel,
  body[data-production="true"][data-mode="chat"] #modelProviderState,
  body[data-production="true"][data-mode="chat"] .model-status-picker > summary > .ow-icon {display:none !important;}
  body[data-production="true"][data-mode="chat"] .model-status-picker > summary::before {content:"AI";order:1;color:#087f8b;font-size:11px;font-weight:700;}
}
@media (max-width:768px) {
  body[data-production="true"][data-mode="library"] .library-feature.has-source-media {display:flex;flex-direction:column;}
  body[data-production="true"][data-mode="library"] .library-feature.has-source-media .library-feature-copy {order:1;padding:0 0 15px;}
  body[data-production="true"][data-mode="library"] .library-feature.has-source-media .feature-source-image {order:2;}
  body[data-production="true"][data-mode="library"] .library-feature.has-source-media .feature-source-image img {max-height:220px;object-fit:contain;object-position:left top;}
}
body[data-theme="dark"][data-production="true"][data-mode="library"] .topbar {background:#102b3e !important;border-color:#315466;}
body[data-theme="dark"][data-production="true"][data-mode="library"] .topbar .crumb b {color:#e1edf3;}
