:root {
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #1d1d1f16;
  --accent: #0069da;
  --sidebar-width: 280px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; }
html, body { height:100%; margin:0; }
body { font-family:var(--sans); color:var(--ink); font-size:16px; -webkit-font-smoothing:antialiased; color-scheme:light; overflow:hidden; background:linear-gradient(125deg,#e7e7eb,#f5f5f7 55%,#eeeef1); }
[hidden] { display:none!important; }
button, input, select, textarea { font:inherit; color:inherit; -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; border:0; background:none; touch-action:manipulation; }
button:disabled { opacity:.45; cursor:not-allowed; }
a { color:inherit; }
button, a, input, select, textarea, summary { outline-offset:4px; }
:focus-visible { outline:3px solid #007aff85; }
h1, h2, h3, p { margin-top:0; }
h1, h2, h3 { letter-spacing:-.025em; }
h3 { font-size:15px; font-weight:600; color:var(--muted); }
svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
.icon-definitions { position:absolute; width:0; height:0; overflow:hidden; }
label { display:block; font-size:16px; line-height:1.6; }
input, select, textarea { width:100%; min-width:0; border:1px solid #22304720; border-radius:11px; background:#ffffff68; min-height:44px; padding:10px 12px; }
input:focus, select:focus { border-color:#007aff80; }
input::placeholder, textarea::placeholder { color:#6b717a; opacity:1; }
label input, label select { margin-top:7px; }
select { cursor:pointer; }
textarea { resize:none; line-height:1.75; }
hr { border:0; border-top:1px solid var(--line); margin:25px 0; }
.small { font-size:15px; line-height:1.75; }
.muted { color:var(--muted); }
.error { color:#ab2821; font-size:16px; line-height:1.75; }
/* Transparent controls sit over the scrolling content, rather than an opaque footer. */
.glass {
  background:linear-gradient(135deg,#ffffffbc,#ffffff85 55%,#fafafa90);
  border:1px solid #ffffffd9;
  box-shadow:inset 0 1px 1px #fff, inset 0 -1px 1px #ffffff60, 0 0 0 1px #2b3b500b, 0 10px 32px #26384d14;
  backdrop-filter:blur(22px) saturate(155%);
  -webkit-backdrop-filter:blur(22px) saturate(155%);
}
.primary, .secondary, .new-chat { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; border-radius:12px; padding:10px 19px; font-size:16px; font-weight:500; transition:background .18s,box-shadow .18s,transform .18s; }
.primary { color:white; background:#0071e3; box-shadow:inset 0 1px 0 #ffffff40,0 3px 8px #0055b626; }
.primary:hover { background:#0077ed; box-shadow:inset 0 1px 0 #ffffff40,0 5px 15px #0055b635; }
.primary:active, .secondary:active, .new-chat:active { transform:scale(.97); }
.primary svg, .secondary svg { width:17px; height:17px; }
.secondary { background:#ffffff65; border:1px solid #ffffffc7; box-shadow:0 0 0 1px #1f31400c,inset 0 1px 0 #fff; }
.secondary:hover { background:#ffffffad; }
.icon-button { display:inline-flex; align-items:center; justify-content:center; width:40px; min-width:40px; height:40px; padding:8px; border-radius:50%; color:#41464f; font-size:26px; transition:background .18s; }
.icon-button:hover { background:#596a8212; }
.text-button { font-size:15px; color:var(--muted); padding:8px 0; }
.text-button:hover { color:var(--accent); }
.brand { display:inline-flex; align-items:center; gap:10px; font-size:18px; font-weight:600; text-decoration:none; letter-spacing:-.04em; white-space:nowrap; }
.brand-icon { width:25px; height:25px; stroke-width:1.5; }
.workspace { height:100dvh; display:flex; gap:12px; padding:12px; --composer-height:165px; }
.sidebar { width:var(--sidebar-width); flex:0 0 var(--sidebar-width); border-radius:24px; padding:25px 20px 18px; display:flex; flex-direction:column; overflow:auto; z-index:30; transition:margin-left .3s var(--ease),transform .3s var(--ease),opacity .2s; }
.sidebar>* { flex-shrink:0; }
.sidebar-brand { display:flex; align-items:center; justify-content:space-between; margin:0 0 27px; }
#sidebar-close { display:none; }
.new-chat { justify-content:flex-start; width:100%; border-radius:12px; background:#ffffff75; border:1px solid #ffffffa6; padding:10px 13px; margin-bottom:29px; }
.new-chat:hover { background:#ffffffb8; }
.filters { margin-bottom:20px; }
.filters h3 { margin-bottom:17px; }
.filters label { font-size:15px; color:#535961; margin-bottom:17px; }
.filters input, .filters select { font-size:15px; min-height:42px; padding:9px 11px; }
.filters input { margin-bottom:2px; }
.library-status { margin-top:11px; font-size:14px; color:var(--muted); }
summary { cursor:pointer; min-height:32px; line-height:1.75; }
.library-status p { margin:10px 0 0; }
.service-note { font-size:14px; line-height:1.7; }
.history { flex:1; flex-shrink:1; min-height:90px; overflow:auto; border-top:1px solid var(--line); padding-top:20px; scrollbar-width:thin; scrollbar-color:#7f8b9b44 transparent; }
.history h3 { margin-bottom:10px; }
.history-row { display:flex; align-items:center; border-radius:9px; margin:2px 0; }
.history-row:hover { background:#ffffff52; }
.history-row.active { background:#ffffff85; }
.history-item { flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-align:left; padding:11px 7px; font-size:15px; line-height:1.55; color:#424953; }
.history-delete { opacity:0; flex:0 0 24px; min-height:34px; padding:0; font-size:20px; color:#717982; }
.history-row:hover .history-delete, .history-delete:focus-visible { opacity:1; }
.empty-history { font-size:15px; color:var(--muted); padding:7px; }
.sidebar-bottom { border-top:1px solid var(--line); padding-top:16px; margin-top:18px; }
.account-button { display:flex; align-items:center; gap:10px; width:100%; min-height:40px; padding:0; text-align:left; font-size:15px; }
#account-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.account-button svg { width:18px; height:18px; color:#646d78; }
.avatar { display:grid; place-items:center; width:32px; min-width:32px; height:32px; border-radius:50%; background:#ffffff90; border:1px solid #fff; font-size:14px; color:#525d6c; }
.account-links { display:flex; gap:22px; margin-top:4px; }
.sidebar-hidden .sidebar { margin-left:calc(-1 * var(--sidebar-width) - 12px); opacity:0; }
.main { min-width:0; flex:1; position:relative; border-radius:27px; overflow:hidden; background:#fafafbd6; }
.topbar { position:absolute; left:24px; right:24px; top:16px; z-index:15; display:flex; align-items:center; justify-content:space-between; gap:12px; pointer-events:none; }
.topbar>* { pointer-events:auto; }
.topbar-left { display:flex; align-items:center; gap:5px; padding:4px 17px 4px 4px; border-radius:999px; }
#view-title { font-size:15px; font-weight:500; }
#evidence-toggle { min-height:48px; font-size:15px; padding:10px 16px; }
.main-grid { display:flex; height:100%; min-height:0; }
.conversation-pane { position:relative; display:flex; flex-direction:column; flex:1; min-width:0; min-height:0; }
.conversation-scroll { flex:1; min-height:0; overflow:auto; overflow-x:hidden; padding:102px 44px 0; scrollbar-width:thin; scrollbar-color:#8f9dab44 transparent; overscroll-behavior:contain; scroll-padding-top:100px; scroll-padding-bottom:calc(var(--composer-height) + 42px); }
.welcome { max-width:800px; margin:0 auto; padding-top:clamp(24px,8vh,100px); text-align:center; }
.welcome h1 { font-size:clamp(40px,4.2vw,52px); font-weight:600; line-height:1.2; letter-spacing:-.045em; margin:0 0 21px; }
.library-numbers { display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:12px; font-size:17px; color:#606773; line-height:1.7; margin:0; }
.library-numbers strong { font-weight:500; color:#444d58; font-variant-numeric:tabular-nums; }
.number-divider { color:#8b939d; }
.workspace[data-view="home"] .conversation-scroll { flex:0 0 auto; overflow:visible; }
.workspace[data-view="home"] #messages { display:none; }
.workspace[data-view="home"] .composer-wrap { position:relative; left:auto; right:auto; bottom:auto; width:calc(100% - 88px); max-width:800px; margin:35px auto auto; }
.composer-wrap { position:absolute; left:30px; right:30px; bottom:22px; z-index:12; max-width:890px; margin:0 auto; pointer-events:none; }
.composer-wrap>* { pointer-events:auto; }
.composer { position:relative; border-radius:28px; padding:16px 16px 14px; box-shadow:inset 0 1px 1px #fff,inset 0 -1px 1px #ffffff70,0 0 0 1px #26374a0e,0 12px 42px #2233481c; transition:box-shadow .2s; }
.composer:focus-within { box-shadow:inset 0 1px 1px #fff,0 0 0 2px #007aff4d,0 16px 40px #22334820; }
.composer textarea { display:block; background:none; border:0; border-radius:12px; min-height:70px; max-height:160px; font-size:18px; padding:5px 10px; outline:none; field-sizing:content; }
.composer-bottom { display:flex; justify-content:space-between; align-items:center; gap:10px; padding-top:10px; }
.model-label { min-width:0; }
.model-label select { border:0; background:none; border-radius:999px; margin:0; min-height:40px; font-size:15px; width:190px; max-width:100%; padding:7px 23px 7px 10px; color:#414a57; }
.composer-actions { display:flex; align-items:center; gap:9px; flex-shrink:0; }
.composer-actions button { font-size:16px; }
.request-status { display:table; margin:0 0 10px 4px; padding:8px 15px; border-radius:999px; font-size:14px; }
#messages { max-width:880px; margin:0 auto; padding-bottom:calc(var(--composer-height) + 64px); }
.message { padding:22px 4px 26px; font-size:19px; line-height:1.95; }
.message-role { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.message.user { font-size:27px; font-weight:600; line-height:1.65; padding-top:4px; padding-bottom:24px; letter-spacing:-.02em; }
.message.user p { margin:0; }
.message-body { overflow-wrap:anywhere; }
.message-body>p { margin:0 0 24px; }
.message-body>p:last-child { margin-bottom:0; }
.message.assistant .message-body>p { font-size:19px; line-height:1.95; }
.retrieval-queries { font-size:15px; line-height:1.9; margin:0 0 24px; color:#56606d; }
.retrieval-queries summary { font-size:14px; }
.retrieval-queries p { white-space:pre-wrap; margin:12px 0; }
.citation-button { display:inline-grid; place-items:center; width:29px; height:28px; font-size:14px; line-height:1; vertical-align:super; color:#0063c9; background:#007aff10; border:1px solid #007aff20; border-radius:8px; margin:0 4px; }
.citation-button:hover { background:#007aff22; }
.limitations { border-left:2px solid #b8c3d2; padding-left:18px; margin:28px 0; font-size:16px; line-height:1.85; color:#59616d; }
.limitations strong { display:block; font-size:16px; font-weight:600; margin-bottom:10px; }
.limitations p { margin:9px 0; }
.search-heading { display:flex; align-items:baseline; justify-content:space-between; gap:18px; margin-bottom:15px; }
.search-heading h2 { font-size:30px; font-weight:600; line-height:1.35; margin:0; }
.search-count { font-size:14px; color:var(--muted); white-space:nowrap; }
.message.assistant .message-body>.search-question { font-size:19px; color:#414a57; line-height:1.75; margin-bottom:21px; }
.search-paper { border-top:1px solid var(--line); padding:27px 0; }
.paper-overline { display:flex; flex-wrap:wrap; align-items:center; gap:10px; font-size:14px; line-height:1.6; color:#606977; margin-bottom:12px; }
.paper-language { font-size:13px; border:1px solid #5e71852b; border-radius:6px; padding:2px 6px; flex-shrink:0; }
.paper-title-button { display:block; padding:0; text-align:left; font-size:23px; font-weight:550; line-height:1.55; letter-spacing:-.02em; }
.paper-title-button:hover { color:var(--accent); }
.paper-authors { font-size:15px; line-height:1.8; color:#606773; margin:11px 0; }
.search-excerpt { color:#454e5a; font-size:17px; line-height:1.85; margin:14px 0 17px; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.paper-citations { display:flex; flex-wrap:wrap; gap:9px; }
.paper-citations button { color:#005fbf; background:#007aff0c; border:1px solid #007aff16; padding:8px 12px; font-size:15px; min-height:40px; border-radius:999px; }
.paper-citations button:hover { background:#007aff1a; }
.status { display:flex; align-items:center; gap:10px; font-size:17px; color:#596472; }
.loading-dot { width:7px; height:7px; border-radius:50%; background:#007aff; animation:breathe 1.2s infinite; }
/* Related papers share the same glass surface as the navigation. */
.evidence-pane { display:none; width:340px; flex:0 0 340px; border-radius:23px; margin:86px 16px 18px 0; padding:23px; overflow:auto; scrollbar-width:thin; scrollbar-color:#8a98aa44 transparent; }
.evidence-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:14px; }
.evidence-heading h2 { font-size:22px; font-weight:600; margin:0; }
.evidence-heading h2 span { font-size:15px; font-weight:400; color:#616a77; margin-left:8px; }
.evidence-heading .icon-button { width:34px; min-width:34px; height:34px; }
.retrieval-detail { font-size:14px; color:var(--muted); margin-bottom:10px; }
.retrieval-detail p { margin:10px 0; }
#evidence-list>.retrieval-queries { margin-top:10px; }
.paper-card { border-bottom:1px solid var(--line); padding:23px 0; }
.paper-card .paper-number { font-size:13px; color:#636d7a; margin-bottom:9px; }
.paper-card h3 { color:var(--ink); font-size:19px; font-weight:550; line-height:1.6; letter-spacing:-.01em; margin-bottom:11px; }
.paper-card .paper-meta { font-size:14px; line-height:1.85; color:#636b77; }
.paper-card .paper-excerpt { font-size:17px; line-height:1.85; color:#454e5a; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.paper-card>button { color:var(--accent); min-height:42px; padding:7px 10px 7px 0; font-size:15px; }
.empty-evidence { font-size:16px; color:var(--muted); line-height:1.8; }
.panel-scrim { position:fixed; inset:0; z-index:25; background:#1c2c461c; backdrop-filter:blur(2px); -webkit-backdrop-filter:blur(2px); cursor:default; }
.workspace.evidence-open .evidence-pane { display:block; position:fixed; z-index:35; inset:14px 14px 14px auto; margin:0; width:min(420px,calc(100vw - 28px)); background:#ffffff8a; backdrop-filter:blur(32px) saturate(150%); -webkit-backdrop-filter:blur(32px) saturate(150%); box-shadow:inset 0 1px 1px #fff,0 18px 60px #1d2d432b; animation:panel-arrive .25s var(--ease); }
/* Native dialogs retain a readable surface while the page remains visible beneath. */
dialog { color:var(--ink); background:#ffffffb3; border:1px solid #ffffffe8; border-radius:28px; padding:30px; max-width:calc(100vw - 28px); max-height:90dvh; box-shadow:inset 0 1px 1px #fff,0 0 0 1px #1d2e430d,0 25px 85px #1c2f493d; backdrop-filter:blur(32px) saturate(150%); -webkit-backdrop-filter:blur(32px) saturate(150%); }
dialog[open] { animation:dialog-arrive .22s var(--ease); }
dialog::backdrop { background:#14233820; backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px); }
.dialog-top { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:20px; }
.dialog-top h2 { font-size:24px; font-weight:600; margin:0; }
.dialog-label { font-size:15px; font-weight:500; color:#535c68; }
.citation-dialog { width:min(790px,94vw); padding:26px 36px; }
.citation-dialog h2 { font-size:26px; font-weight:600; line-height:1.55; margin-bottom:15px; }
.section-name { margin:22px 0 0; border-top:1px solid var(--line); padding-top:16px; font-size:15px; line-height:1.8; color:#58616e; }
.citation-dialog blockquote { margin:15px 0 27px; border-left:3px solid #007aff50; padding:14px 18px; background:#ffffff57; font-size:19px; line-height:1.95; overflow-wrap:anywhere; border-radius:0 12px 12px 0; }
.citation-dialog blockquote h1, .citation-dialog blockquote h2 { font-size:23px; line-height:1.7; }
.citation-dialog blockquote p:last-child { margin-bottom:0; }
.citation-dialog blockquote pre, .citation-dialog blockquote table { max-width:100%; overflow:auto; display:block; }
.document-dialog { width:min(1100px,96vw); height:94dvh; max-height:94dvh; padding:0; background:#fafbfcf5; overflow:auto; scrollbar-width:thin; }
.document-toolbar { display:flex; align-items:flex-start; gap:20px; position:sticky; top:0; padding:24px 35px; z-index:2; background:#f3f6fa9c; border-bottom:1px solid #fff; backdrop-filter:blur(26px) saturate(150%); -webkit-backdrop-filter:blur(26px) saturate(150%); }
.document-toolbar>div { flex:1; min-width:0; }
.document-toolbar h2 { font-size:23px; font-weight:600; line-height:1.55; margin:0 0 10px; }
.document-toolbar p { margin:0; }
.document-body { max-width:900px; margin:auto; padding:38px 52px 65px; font-size:20px; line-height:1.95; overflow-wrap:anywhere; }
.document-block { padding:1px 14px; margin:0 -14px; border-left:3px solid transparent; scroll-margin-top:210px; }
.document-block.highlight { background:#e4efff; border-left-color:#3489ec; border-radius:3px; }
.document-body h1 { font-size:30px; }.document-body h2 { font-size:26px; }.document-body h3 { font-size:22px; color:var(--ink); }
.document-body table { display:block; max-width:100%; overflow:auto; font-size:15px; }
.document-body th, .document-body td { border:1px solid #cad1dc; padding:8px; min-width:60px; }
.document-body pre { overflow:auto; background:#e9edf3; font-size:15px; border-radius:10px; padding:17px; }
.version-note { padding:12px 35px; font-size:15px; color:#635823; background:#f6f0d8; }
.account-dialog { width:min(450px,94vw); }.account-dialog label { margin:18px 0; }
.account-dialog input { font-size:17px; min-height:48px; }
.admin-dialog { width:min(1050px,96vw); }.table-scroll { overflow:auto; }
table { width:100%; border-collapse:collapse; font-size:15px; }td, th { padding:11px; text-align:left; border-bottom:1px solid var(--line); }td button { font-size:14px; margin-right:7px; }
#admin-status { white-space:pre-wrap; overflow-wrap:anywhere; font-size:16px; line-height:1.8; }
#toast { position:fixed; z-index:1000; bottom:25px; left:50%; transform:translateX(-50%); background:#263141ec; color:white; font-size:16px; line-height:1.65; max-width:90vw; border-radius:18px; padding:13px 22px; box-shadow:0 10px 35px #1c2f4524; }
.login-layout { min-height:100dvh; height:100dvh; overflow:auto; display:grid; place-items:center; padding:32px 20px; }
.login-card { width:min(440px,100%); border-radius:30px; padding:38px; }
.login-card .brand { font-size:20px; }.login-card .brand-icon { width:30px; height:30px; }
.login-card h1 { font-size:30px; font-weight:600; margin:34px 0 24px; }
.login-card label { margin:18px 0; }.login-card input { font-size:18px; min-height:49px; background:#ffffff70; }
.login-card .primary { width:100%; margin-top:12px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@keyframes breathe { 50% { opacity:.25; } }
@keyframes panel-arrive { from { opacity:0; transform:translateX(12px); } to { opacity:1; transform:translateX(0); } }
@keyframes dialog-arrive { from { opacity:0; transform:translateY(8px) scale(.99); } to { opacity:1; transform:translateY(0) scale(1); } }
@media(min-width:1300px) { .workspace[data-view="conversation"].has-evidence:not(.evidence-collapsed) .evidence-pane { display:block; } .workspace[data-view="conversation"].has-evidence .conversation-scroll { padding-left:32px; padding-right:32px; } .workspace[data-view="conversation"].has-evidence .composer-wrap { left:23px; right:23px; } }
@media(max-width:1100px) and (min-width:721px) { :root { --sidebar-width:250px; }.sidebar { padding-left:16px; padding-right:16px; }.brand { font-size:17px; }.conversation-scroll { padding-left:30px; padding-right:30px; }.composer-wrap { left:20px; right:20px; }.composer-bottom { flex-wrap:wrap; }.composer-actions { margin-left:auto; }.model-label select { width:178px; }.workspace[data-view="home"] .composer-wrap { width:calc(100% - 60px); } }
@media(max-width:720px) {
  .workspace { padding:0; gap:0; }.main { border-radius:0; background:#ffffff42; }
  .sidebar { position:fixed; top:9px; left:9px; bottom:9px; margin:0; width:292px; max-width:calc(100vw - 44px); padding:23px 21px; transform:translateX(calc(-100% - 20px)); background:#ffffffa6; }
  .sidebar.open { transform:translateX(0); }.sidebar-hidden .sidebar { margin-left:0; opacity:1; }#sidebar-close { display:flex; width:30px; min-width:30px; height:34px; padding:6px; }
  .sidebar-brand { gap:7px; }.sidebar .brand { font-size:17px; gap:7px; }.sidebar .brand-icon { width:23px; height:23px; }
  .filters input, .filters select { font-size:16px; }.history-delete { opacity:.7; }
  .topbar { left:16px; right:16px; top:14px; gap:8px; }.topbar-left { padding-right:13px; }#view-title { font-size:15px; }#evidence-toggle { min-height:48px; font-size:15px; padding:10px 14px; }
  .conversation-scroll { padding:100px 24px 0; }.welcome { padding-top:clamp(28px,11vh,100px); }.welcome h1 { font-size:46px; margin-bottom:18px; }
  .library-numbers { font-size:16px; gap:9px; }.workspace[data-view="home"] .composer-wrap { width:calc(100% - 32px); margin-top:29px; }
  .composer-wrap { left:12px; right:12px; bottom:max(12px,env(safe-area-inset-bottom)); }.composer { padding:12px; border-radius:25px; }
  .composer textarea { font-size:18px; min-height:67px; padding:7px; }.composer-bottom { gap:8px; flex-wrap:wrap; padding-top:6px; }.model-label select { width:185px; font-size:16px; padding-left:7px; }
  .composer-actions { margin-left:auto; gap:7px; }.composer-actions button { font-size:16px; padding:10px 15px; }.composer-actions .secondary svg { display:none; }
  .message { padding-left:0; padding-right:0; }.message.user { font-size:25px; }.message.assistant .message-body>p { font-size:19px; }
  .search-heading { flex-wrap:wrap; gap:10px; }.search-heading h2 { font-size:28px; }.search-count { font-size:14px; }.paper-title-button { font-size:22px; }.paper-overline { font-size:14px; }.paper-citations button { min-height:44px; }
  .evidence-pane { padding:23px; }.evidence-heading .icon-button { min-width:40px; height:40px; }.paper-card h3 { font-size:20px; }
  .citation-dialog { padding:23px; max-height:90dvh; }.citation-dialog h2 { font-size:24px; }.citation-dialog blockquote { font-size:19px; padding:12px 15px; }
  .document-dialog { width:calc(100vw - 12px); max-width:calc(100vw - 12px); height:96dvh; max-height:96dvh; border-radius:22px; }.document-toolbar { padding:21px 23px; gap:10px; }.document-toolbar h2 { font-size:21px; }.document-body { padding:28px 26px 55px; font-size:19px; }.document-block { scroll-margin-top:240px; }
  .login-layout { padding:24px 19px; }.login-card { padding:31px 27px; }
}
@media(max-width:450px) { .composer-bottom { display:grid; grid-template-columns:1fr; gap:3px; }.model-label select { width:100%; max-width:225px; }.composer-actions { justify-content:space-between; width:100%; margin:0; }.composer-actions .secondary { background:#ffffff4d; padding:9px 17px; }.composer-actions .primary { padding:10px 21px; }#evidence-toggle svg { display:none; }.number-divider { display:none; }.library-numbers { gap:6px 15px; }.request-status { font-size:14px; } }
@media(max-height:650px) { .welcome { padding-top:20px; }.workspace[data-view="home"] .conversation-pane { overflow:auto; }.workspace[data-view="home"] .composer-wrap { margin-bottom:25px; flex-shrink:0; } }
@media(prefers-reduced-motion:reduce) { *, *:before, *:after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) { .glass, .workspace.evidence-open .evidence-pane, dialog, .document-toolbar { background:#f4f6fa; } }

/* Scope controls share the sidebar and floating input's glass surfaces. */
.year-range { display:grid; grid-template-columns:minmax(0,1fr) 12px minmax(0,1fr); gap:7px; align-items:center; }
.year-range label { min-width:0; margin-bottom:6px; }
.year-range>span { padding-top:20px; color:var(--muted); }
.year-range select { padding-left:9px; padding-right:5px; }
#reset-scope { font-size:15px; min-height:38px; padding-left:0; }
.scope-button { display:flex; width:fit-content; max-width:100%; gap:9px; margin:0 0 10px 4px; padding:9px 15px; min-height:42px; border-radius:18px; text-align:left; font-size:15px; line-height:1.6; color:#434e5d; }
.scope-button svg { width:17px; height:17px; flex-shrink:0; }
.scope-button span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.answer-scope { font-size:15px; line-height:1.8; color:#556170; margin:0 0 14px; }

/* Shared controls, neutral materials and consistent journal cards. */
input { background:#ffffffa8; border-color:#1d1d1f1c; }
.filters h3 { font-size:15px; margin-bottom:18px; }
.filters label, .field-label { color:#626267; font-size:15px; }
.filters label { margin-bottom:18px; }
.field-label { display:block; margin-bottom:7px; line-height:1.6; }
.journal-field { margin-bottom:18px; }
.field-trigger, .select-trigger { display:flex; width:100%; align-items:center; justify-content:space-between; gap:8px; min-height:44px; padding:10px 12px; border:1px solid #1d1d1f1c; border-radius:10px; background:#ffffffa8; font-size:16px; font-weight:400; line-height:22px; text-align:left; box-shadow:0 1px 2px #00000003; transition:border-color .15s,background .15s; }
.field-trigger:hover, .select-trigger:hover { border-color:#1d1d1f38; background:#fff; }
.field-trigger>span, .select-trigger>span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.field-trigger svg, .select-trigger svg { width:18px; height:18px; color:#737378; }
.select-control { display:block; position:relative; min-width:0; }
label>.select-control { margin-top:7px; }
.select-menu { position:fixed; inset:auto; margin:0; padding:5px; border:1px solid #00000016; border-radius:12px; background:#fffffff5; color:var(--ink); box-shadow:0 10px 40px #00000024,0 2px 6px #0000000a; backdrop-filter:blur(24px); -webkit-backdrop-filter:blur(24px); overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; max-height:300px; }
.select-menu:popover-open { display:block; }
.select-option { display:block; position:relative; width:100%; min-height:42px; padding:9px 33px 9px 11px; border-radius:7px; font-size:16px; line-height:24px; text-align:left; white-space:nowrap; }
.select-option[aria-selected="true"] { color:#0066cc; background:#007aff0b; }
.select-option[aria-selected="true"]:after { content:'✓'; position:absolute; right:11px; font-size:16px; }
.select-option:focus-visible, .select-option:hover { outline:none; background:#007aff12; }
.select-option:disabled { color:var(--muted); }
.year-range { grid-template-columns:minmax(0,1fr) 10px minmax(0,1fr); gap:8px; align-items:end; }
.year-range>span { padding:0 0 17px; text-align:center; }
.year-range label { margin-bottom:0; }
.year-range .select-trigger { padding:10px; }
#reset-scope { margin-top:9px; min-height:34px; }
.library-status { margin-top:8px; }
.selected-journals { display:flex; flex-direction:column; gap:4px; max-height:146px; overflow:auto; margin-top:8px; scrollbar-width:thin; }
.selected-journal { display:flex; align-items:center; gap:4px; padding:4px 5px 4px 9px; border-radius:7px; background:#007aff08; border:1px solid #007aff14; font-size:14px; line-height:1.55; }
.selected-journal>span { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.remove-journal { display:grid; place-items:center; width:30px; min-width:30px; height:30px; padding:6px; border-radius:6px; color:#626267; }
.remove-journal svg { width:14px; height:14px; }.remove-journal:hover { background:#00000008; }
.model-label .select-control { margin:0; width:205px; max-width:100%; }
.model-label .select-trigger { background:transparent; border-color:transparent; box-shadow:none; padding-left:10px; }
.model-label .select-trigger:hover { background:#00000004; }
.composer { border-radius:22px; box-shadow:inset 0 1px 0 #fff,0 0 0 1px #0000000a,0 12px 32px #0000000a; }
.composer textarea { font-size:19px; }
.composer-bottom { gap:12px; }
.scope-button { margin-left:0; border-radius:12px; background:transparent; box-shadow:none; border-color:transparent; padding-left:0; color:#6e6e73; }
.scope-button:hover { color:var(--accent); }
.workspace[data-view="home"] .conversation-pane { overflow:auto; }
.workspace[data-view="home"] .welcome { padding-top:clamp(20px,4vh,48px); }
.workspace[data-view="home"] .composer-wrap { margin-top:26px; margin-bottom:0; flex-shrink:0; }
.journal-shelf { max-width:800px; width:calc(100% - 88px); margin:38px auto 40px; flex-shrink:0; }
.shelf-heading { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.shelf-heading h2 { font-size:18px; font-weight:600; margin:0; }.shelf-heading button { color:#6e6e73; }
.journal-shelf-list { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:18px; align-items:start; }
.journal-cover-choice { display:flex; flex-direction:column; width:100%; gap:12px; padding:0; text-align:left; border-radius:8px; }
.journal-cover-stage { position:relative; display:flex; align-items:center; justify-content:center; width:100%; height:170px; padding:10px; border:1px solid #1d1d1f0b; border-radius:10px; background:#ededf080; transition:background .15s,border-color .15s; }
.journal-cover-image { display:block; width:100%; height:100%; overflow:hidden; }
.journal-cover-image img { display:block; width:100%; height:100%; object-fit:contain; filter:drop-shadow(0 3px 3px #00000012); }
.journal-cover-image.publisher-margins { clip-path:inset(0); }
.journal-cover-image.publisher-margins img { transform:scale(1.55) translateY(-2.3%); filter:none; }
.journal-cover-choice:hover .journal-cover-stage { background:#e6e6eb; border-color:#1d1d1f24; }
.journal-check { position:absolute; top:7px; right:7px; display:grid; place-items:center; width:22px; height:22px; border-radius:50%; background:#ffffffed; border:1px solid #00000020; box-shadow:0 1px 3px #0000000c; }
.journal-check svg { width:14px; height:14px; opacity:0; stroke-width:2.5; }
.journal-cover-choice[aria-pressed="true"] .journal-check, .journal-cover-choice[aria-checked="true"] .journal-check { background:#0071e3; border-color:#0071e3; color:#fff; }
.journal-cover-choice[aria-pressed="true"] .journal-check svg, .journal-cover-choice[aria-checked="true"] .journal-check svg { opacity:1; }
.journal-cover-choice[aria-pressed="true"] .journal-cover-stage, .journal-cover-choice[aria-checked="true"] .journal-cover-stage { border-color:#0071e399; background:#007aff0b; }
.journal-cover-title { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; font-size:15px; line-height:1.5; height:4.5em; width:100%; overflow-wrap:normal; }
.journal-cover-count, .cover-unavailable { color:var(--muted); font-size:14px; }
.workspace:not([data-view="home"]) .journal-shelf { display:none; }
.journal-dialog { width:min(1060px,94vw); max-height:min(88dvh,900px); padding:0; overflow:visible; background:#fafafaf5; border-radius:24px; }
.journal-dialog[open] { display:flex; flex-direction:column; }
.journal-dialog .dialog-top { flex-shrink:0; margin:0; padding:24px 28px 15px; align-items:center; }
.journal-dialog h2 { font-size:24px; margin:0; font-weight:600; }
.journal-picker-tools { display:flex; align-items:center; gap:12px; padding:0 28px; flex-shrink:0; }
.picker-search { position:relative; flex:1; min-width:0; }
.picker-search>svg { position:absolute; top:13px; left:14px; width:18px; height:18px; color:#737378; }
.picker-search input { display:block; min-height:46px; padding-left:42px; font-size:16px; border-radius:10px; }
.journal-picker-tools>.select-control { width:150px; flex-shrink:0; }.journal-picker-tools .select-trigger { min-height:46px; }
.picker-selection { display:flex; justify-content:space-between; align-items:center; padding:12px 28px 10px; color:var(--muted); font-size:14px; flex-shrink:0; }
.picker-selection button { padding:5px 0; font-size:14px; color:#0066cc; }
.journal-cover-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:28px 22px; padding:4px 28px 28px; overflow:auto; min-height:0; overscroll-behavior:contain; scrollbar-width:thin; align-content:start; }
.journal-tile { min-width:0; }.journal-tile .journal-cover-stage { height:198px; padding:12px; }
.journal-tile .journal-cover-title { font-size:16px; line-height:1.5; }
.journal-card-meta { display:flex; align-items:center; justify-content:space-between; gap:4px; color:var(--muted); margin-top:6px; font-size:14px; line-height:22px; }
.cover-source { color:#6e6e73; text-decoration:none; font-size:13px; }.cover-source:hover { color:var(--accent); text-decoration:underline; }
.cover-placeholder { display:flex; flex-direction:column; gap:12px; align-items:center; justify-content:center; color:#939398; font-size:14px; }
.cover-placeholder svg { width:34px; height:34px; stroke-width:1; }
.journal-picker-footer { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:16px 28px; background:#f9f9facf; backdrop-filter:blur(24px); -webkit-backdrop-filter:blur(24px); border-top:1px solid var(--line); border-radius:0 0 24px 24px; flex-shrink:0; }
.picker-summary { display:flex; align-items:center; gap:18px; min-width:0; font-size:16px; }.picker-summary .text-button { color:#0066cc; }
.picker-actions { display:flex; gap:10px; flex-shrink:0; }.picker-actions button { min-width:80px; }
.picker-empty { grid-column:1/-1; text-align:center; padding:45px 0; color:var(--muted); }
@media(max-width:1100px) {
  .journal-shelf { width:calc(100% - 60px); }.journal-shelf-list { overflow-x:auto; grid-template-columns:repeat(6,116px); gap:18px; padding:2px 2px 12px; }
  .journal-cover-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media(max-width:720px) {
  .main { background:#fafafbd6; }.sidebar { background:#f5f5f7da; }
  .workspace[data-view="home"] .welcome { padding-top:30px; }.welcome h1 { font-size:40px; }
  .workspace[data-view="home"] .composer-wrap { margin-top:22px; }
  .composer { border-radius:20px; }.composer-bottom { display:flex; flex-wrap:wrap; gap:8px; }.model-label .select-control { width:192px; }.composer-actions { margin-left:auto; width:auto; gap:8px; }
  .journal-shelf { width:calc(100% - 40px); margin-top:30px; }.journal-shelf-list { grid-template-columns:repeat(6,118px); gap:16px; }.journal-cover-title { font-size:16px; }
  .journal-dialog { width:calc(100vw - 20px); max-width:calc(100vw - 20px); max-height:92dvh; border-radius:20px; }
  .journal-dialog .dialog-top { padding:18px 18px 12px; }.journal-dialog h2 { font-size:22px; }
  .journal-picker-tools { padding:0 18px; gap:8px; }.journal-picker-tools>.select-control { width:116px; }.journal-picker-tools .select-trigger { font-size:15px; padding:10px; }
  .picker-search input { padding-left:34px; }.picker-search>svg { left:10px; width:16px; }
  .picker-selection { padding:12px 18px 10px; font-size:13px; }.picker-selection button { font-size:13px; }
  .journal-cover-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 16px; padding:4px 18px 22px; }.journal-tile .journal-cover-stage { height:180px; }
  .journal-picker-footer { padding:12px 18px; gap:10px; border-radius:0 0 20px 20px; }.picker-summary { flex-direction:column; align-items:flex-start; gap:0; font-size:14px; }.picker-summary .text-button { font-size:13px; padding:4px 0; }.picker-actions { gap:7px; }.picker-actions button { min-width:62px; padding:10px 14px; }
}
@media(max-width:450px) { .model-label { flex-basis:100%; }.model-label .select-control { width:195px; }.composer-actions { width:100%; justify-content:flex-end; }.composer-actions button { min-height:42px; }.composer-actions .secondary { margin-right:auto; } }

.startup-card { text-align:center; padding:32px; color:var(--muted); }
.startup-card>.brand-icon { width:34px; height:34px; margin-bottom:14px; }
.startup-card h1 { font-size:26px; font-weight:600; color:var(--ink); margin-bottom:16px; }
.startup-card p { font-size:17px; line-height:1.7; }

/* Academic answers share the reading surface; structure comes from type and spacing. */
.academic-report { font-size:19px; line-height:1.95; }
.academic-report .answer-title { font-size:30px; line-height:1.5; font-weight:650; letter-spacing:-.02em; margin:8px 0 28px; }
.answer-abstract { padding:0 0 24px; margin:0 0 30px; border-bottom:1px solid var(--line); color:#424650; }
.answer-abstract h3 { font-size:17px; font-weight:650; margin:0 0 12px; }
.answer-abstract p { margin:0 0 14px; }
.answer-section { margin:32px 0; }
.answer-section h3,.answer-references>h3 { font-size:24px; line-height:1.55; font-weight:600; margin:0 0 18px; }
.answer-section p { margin:0 0 22px; white-space:pre-line; }
.answer-table-scroll { max-width:100%; overflow-x:auto; margin:26px 0; border-radius:8px; }
.answer-table { border-collapse:collapse; width:100%; font-size:17px; line-height:1.75; text-align:left; }
.answer-table caption { text-align:left; font-size:17px; font-weight:600; color:#41454e; margin:0 0 12px; }
.answer-table th { padding:14px 16px; font-weight:600; background:#f1f2f4; border-top:1px solid #aeb2bb; border-bottom:1px solid #aeb2bb; }
.answer-table td { vertical-align:top; padding:16px; border-bottom:1px solid #dce0e5; min-width:130px; }
.answer-table .citation-button { width:25px; height:25px; font-size:13px; }
.answer-references { margin:38px 0 24px; padding-top:28px; border-top:1px solid var(--line); font-size:17px; line-height:1.85; }
.answer-reference { padding:0 0 24px; margin:0 0 24px; border-bottom:1px solid var(--line); }
.reference-entry { margin:0 0 10px; }
.reference-evidence summary { cursor:pointer; font-size:16px; color:#566170; padding:6px 0; }
.reference-excerpt { margin:18px 0 8px; }
.reference-quote { margin:0; padding:0 0 0 16px; border-left:2px solid #c7ccd3; font-size:17px; color:#4c535f; line-height:1.85; white-space:pre-wrap; }
.reference-quote strong { color:#222731; font-weight:650; }
.reference-translation { font-size:17px; color:#3e4652; line-height:1.85; margin:14px 0 8px; }
.reference-label { color:#747b85; }
.reference-source-button { color:var(--accent); font-size:15px; padding:9px 0; }
.answer-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:24px; }
.answer-actions .secondary { font-size:15px; padding:10px 14px; }
@media(max-width:700px) { .academic-report .answer-title { font-size:26px; }.answer-section h3,.answer-references>h3 { font-size:22px; }.answer-table { font-size:16px; }.answer-table td,.answer-table th { padding:12px; } }
.message { scroll-margin-top:110px; }

.scope-presets { margin:0 0 18px; }
.preset-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; padding:4px; border:1px solid #d6d9df80; border-radius:12px; background:#dfe2e85c; }
.preset-tabs button { min-height:38px; padding:6px 2px; border:0; border-radius:9px; background:transparent; color:var(--muted); font-size:15px; font-weight:550; white-space:nowrap; }
.preset-tabs button[aria-pressed="true"] { color:var(--ink); background:#fffffff0; box-shadow:0 1px 4px #17203317,0 0 0 1px #ffffffb3 inset; }
.preset-tabs button.has-preset::after { content:''; display:inline-block; width:4px; height:4px; margin:0 0 2px 5px; border-radius:50%; background:currentColor; opacity:.6; }
.preset-meta { min-height:30px; display:flex; justify-content:space-between; align-items:center; gap:8px; padding:5px 3px 0; font-size:13px; color:var(--muted); }
.preset-meta .text-button { font-size:13px; padding:3px 0; }
.save-preset { width:100%; min-height:40px; margin:12px 0 4px; padding:9px 12px; border:1px solid #cdd6e3; border-radius:11px; background:#ffffffa8; color:#2863a3; font-size:15px; font-weight:550; }
.save-preset:hover:not(:disabled) { background:#fff; border-color:#aebdd0; }
.save-preset:disabled { opacity:.45; cursor:default; }
.model-label .select-control { min-width:224px; }
@media(max-width:450px) { .model-label .select-control { width:242px; } }

/* Author-year text remains on the reading line; only the source number is raised. */
.citation-inline { white-space:normal; }
.citation-inline sup { vertical-align:super; font-size:.72em; line-height:0; }
.citation-inline .citation-button,.answer-table .citation-inline .citation-button { display:inline; width:auto; height:auto; min-height:0; padding:2px 3px; margin:0 1px; border:0; border-radius:3px; background:transparent; font:inherit; line-height:1; vertical-align:baseline; color:#1260af; }
.citation-inline .citation-button:hover,.citation-inline .citation-button:focus-visible { background:#dcecff; outline:1px solid #9fc4eb; }
.citation-tooltip { position:fixed; z-index:10000; width:max-content; max-width:min(480px,calc(100vw - 24px)); padding:15px 18px; border:1px solid #d5dbe4; border-radius:12px; background:#fffffff5; color:#27303d; box-shadow:0 8px 32px #14253a25; backdrop-filter:blur(20px); font-size:16px; line-height:1.7; overflow-wrap:anywhere; pointer-events:none; }
.reference-entry { overflow-wrap:anywhere; }
.document-source-text { white-space:pre-wrap; overflow-wrap:anywhere; }
.citation-highlight { background:#ffe7a1; color:inherit; box-decoration-break:clone; -webkit-box-decoration-break:clone; }
.citation-dialog .reference-quote { margin-bottom:16px; }

.citation-content { font-size:19px; line-height:1.95; overflow-wrap:anywhere; }
.citation-dialog #open-document { position:sticky; bottom:0; z-index:1; box-shadow:0 0 0 6px #f7f9fce8; }

.answer-scope summary { cursor:pointer; }
.scope-journal-list { margin:10px 0; line-height:1.8; }
.empty-answer { font-size:18px; line-height:1.8; color:#525c6b; margin:20px 0; }
.page-update-notice { position:fixed; z-index:1000; top:20px; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:18px; max-width:calc(100vw - 32px); padding:12px 18px; border:1px solid #d5dbe4; border-radius:16px; background:#fffffff5; color:#27303d; box-shadow:0 8px 32px #14253a25; font-size:16px; }
.page-update-notice[hidden] { display:none; }
.page-update-notice button { white-space:nowrap; }
