/* PaperPico: styles. Tokens measured from the reference product (see docs/ui_diff.md). */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(/static/fonts/plex-400.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(/static/fonts/plex-500.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(/static/fonts/plex-600.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-display: swap; src: url(/static/fonts/plex-700.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Serif"; font-weight: 400; font-display: swap; src: url(/static/fonts/plexserif-400.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Serif"; font-weight: 600; font-display: swap; src: url(/static/fonts/plexserif-600.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Serif"; font-weight: 700; font-display: swap; src: url(/static/fonts/plexserif-700.woff2) format("woff2"); }

:root {
  --ink: #13161b; --navy: #051e57; --mut: #5d6a81; --mut2: #7d8aa1; --blue: #0054f1; --blue2: #1c4dc0; --blue3: #0062ff;
  --line: #e4eaf7; --line2: #d8e0ee; --surf: #f8f9fd; --surf-blue: #f5f8ff; --sel: #e6ecfa; --tile: #eef2fc;
  --purple: #650fba; --red: #cc244b; --ins: #c4f0cb; --del: #fdd3dc; --green: #3aa655; --rail: #051e57; --rail-on: #042b7f;
  --shadow-btn: 0 4px 12px -6px rgba(46, 85, 158, .25);
  --sans: "IBM Plex Sans", Arial, "Segoe UI", Tahoma, sans-serif;
  --side-w: 282px;
}
* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body { font: 400 16px/24px var(--sans); color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
.ic { flex: none; vertical-align: middle; }
.spacer { flex: 1; }
.muted { color: var(--mut); }
.err { color: var(--red); }
.pad { padding: 12px 16px; }
[hidden] { display: none !important; }
.icon-btn { border: 0; background: transparent; border-radius: 6px; padding: 4px 6px; color: var(--mut2); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover:not(:disabled) { background: var(--surf); color: var(--mut); }
.icon-btn.sm { padding: 2px 4px; }
.btn-outline { border: 1px solid var(--blue); color: var(--blue); background: #fff; border-radius: 6px; padding: 4px 8px; font-size: 12px; font-weight: 500; line-height: 18px; box-shadow: var(--shadow-btn); display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.btn-outline:hover { background: var(--surf-blue); }
.btn-outline.sm { font-size: 12px; }
.btn-primary { background: var(--blue3); color: #fff; border: 0; border-radius: 6px; padding: 8px 24px; font-weight: 500; }
.btn-primary:hover { background: #0054f1; }
.btn-primary:disabled { background: #7faefe; cursor: default; }
.btn-big { height: 42px; border-radius: 6px; font-weight: 500; padding: 8px 24px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-ghost { background: #fff; color: var(--blue3); border: 1px solid var(--blue3); }
.link { border: 0; background: none; color: var(--blue); font-weight: 600; padding: 0; font-size: 12.5px; }
.link:hover { text-decoration: underline; }
.chip { border: 1px solid var(--line2); background: #fff; border-radius: 6px; padding: 6px 14px; font-weight: 500; font-size: 14px; color: var(--navy); }
.chip:hover { background: var(--surf-blue); }
.chip.sm { padding: 0 8px; font-size: 12px; background: var(--surf); border-radius: 999px; border-color: var(--line); color: var(--mut); }

/* ============ shell + sidebar ============ */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; height: 100%; }
.shell.collapsed { grid-template-columns: 52px 1fr; }
.shell.collapsed .sidebar { display: none; }
/* a folded sidebar leaves a slim rail with the button that opens it again (the editor has its own toggle, so no rail there) */
.side-rail { display: none; }
.shell.collapsed .side-rail { display: flex; flex-direction: column; align-items: center; padding-top: 10px; border-right: 1px solid var(--line); background: #fff; }
.side-rail .icon-btn { color: var(--mut); padding: 6px; }
.shell.collapsed.no-rail { grid-template-columns: 1fr; }
.shell.collapsed.no-rail .side-rail { display: none; }
.sidebar { border-right: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; overflow: hidden; color: var(--navy); }
.side-top { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--line); flex: none; }
.logo { text-decoration: none; display: inline-flex; align-items: center; }
.side-top .icon-btn { color: var(--mut); padding: 6px; }
.side-nav { padding: 8px 8px 12px; flex: none; border-bottom: 1px solid var(--line); }
.nav-i { display: flex; gap: 8px; align-items: center; width: 100%; height: 36px; padding: 9px 8px; border-radius: 6px; color: var(--ink); text-decoration: none; border: 0; background: none; text-align: left; font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.nav-i:hover { background: var(--surf); }
.nav-i.on { background: var(--sel); color: var(--blue2); }
.nav-i.primary { color: var(--blue2); }
.nav-i.dim { color: var(--mut); }
.nav-i .ic { color: currentColor; }
.nav-i .chev { margin-left: auto; color: var(--ink); }
.nav-i .app-badges { display: inline-flex; gap: 2px; margin-left: 2px; }
.nav-i em { font-style: normal; font-size: 9px; font-weight: 600; background: #ffeba3; color: #6f5325; border-radius: 25px; padding: 0 6px; line-height: 14px; letter-spacing: .3px; }
.nav-sub { padding: 0 0 4px 32px; display: flex; flex-direction: column; }
.nav-sub .nav-i { height: 32px; font-weight: 400; color: var(--mut); }
.nav-sub .nav-i.on { color: var(--blue2); font-weight: 500; }
.nav-sub .note { font-size: 11px; color: var(--mut2); padding: 2px 8px; }
.recent { display: flex; flex-direction: column; min-height: 0; flex: 1; padding-top: 12px; }
.recent-head { display: flex; justify-content: space-between; align-items: center; color: var(--mut); font-size: 12px; padding: 0 16px 8px; }
.recent-head span { font-weight: 600; letter-spacing: .3px; }
.recent-head .icon-btn { color: var(--ink); }
.recent-search { margin: 0 12px 8px; padding: 5px 8px; border: 1px solid var(--line2); border-radius: 6px; font-size: 12px; outline: 0; }
.recent-list { list-style: none; margin: 0; padding: 0 8px; overflow: auto; flex: 1; }
.recent-list li { display: flex; align-items: center; border-radius: 6px; position: relative; }
.recent-list li:hover { background: var(--surf); }
.recent-list li.on { background: var(--sel); }
.recent-list a { flex: 1; min-width: 0; padding: 8px; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 500; line-height: 16px; }
.row-menu { visibility: hidden; margin-right: 2px; } .recent-list li:hover .row-menu, .recent-list li.menu-open .row-menu { visibility: visible; }
.row-pop { position: absolute; right: 4px; top: 30px; z-index: 40; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(20, 30, 70, .14); min-width: 140px; padding: 4px; }
.row-pop button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 6px 8px; border-radius: 6px; font-size: 13px; text-align: left; }
.row-pop button:hover { background: var(--surf); } .row-pop .del { color: var(--red); }
.user-card { border-top: 1px solid var(--line); padding: 14px 16px; display: flex; align-items: center; gap: 10px; flex: none; position: relative; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; }
.user-card:hover { background: var(--surf); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #3f9a4d; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 500; flex: none; }
.user-card .who { flex: 1; min-width: 0; line-height: 16px; } .user-card b { display: block; font-size: 12px; font-weight: 500; color: var(--navy); } .user-card .plan { display: block; font-size: 12px; font-weight: 600; color: var(--purple); }
.user-pop { position: absolute; bottom: 62px; left: 12px; right: 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(20, 30, 70, .14); padding: 10px 12px; font-size: 12px; color: var(--mut); z-index: 40; }
.main { min-width: 0; display: flex; flex-direction: column; height: 100%; overflow: hidden; background: #fff; }

/* ============ Agents page ============ */
.chat-head { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--line); flex: none; }
.chat-head .title { font-weight: 500; font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.chat-head .ic { color: var(--mut2); }
.btn-doc { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 1px solid var(--line2); border-radius: 6px; background: #fff; font-size: 13px; font-weight: 500; color: var(--ink); }
.btn-doc:hover { background: var(--surf); }
.chat-host.full { flex: 1; min-height: 0; }
.chat { display: flex; flex-direction: column; height: 100%; position: relative; background: #fff; }
.chat-scroll { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.chat-col { max-width: 768px; margin: 0 auto; padding: 0 16px; width: 100%; }
.chat-scroll .chat-col { flex: 1 0 auto; display: flex; flex-direction: column; }
.chat-panel .chat-col { padding: 0 14px; }
.empty { margin-top: auto; padding: 32px 0 40px; }
.empty h2 { margin: 0 0 4px; font-size: 32px; line-height: 32px; font-weight: 600; background: linear-gradient(90deg, #1a56e8 0%, #5b3fd6 60%, #7b2fd0 100%); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.empty p { margin: 0 0 24px; font-size: 14px; line-height: 20px; color: var(--ink); }
.suggs { display: flex; flex-direction: column; gap: 8px; }
.sugg { display: flex; align-items: center; gap: 12px; width: 100%; height: 66px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; font-size: 14px; font-weight: 600; color: var(--ink); }
.sugg:hover { background: var(--surf-blue); border-color: #c9d6f3; }
.sugg .tile { width: 48px; height: 48px; border-radius: 8px; background: var(--tile); display: grid; place-items: center; color: #3d63d8; flex: none; }
.sugg span.t { flex: 1; } .sugg .ic.go { color: #6f93ea; }
.chat-panel .empty h2 { font-size: 24px; line-height: 28px; } .chat-panel .sugg { height: 56px; } .chat-panel .sugg .tile { width: 38px; height: 38px; }
.msgs { padding: 24px 0 24px; }
.user-msg { display: flex; justify-content: flex-end; align-items: flex-start; gap: 4px; margin: 0 0 28px; }
.user-msg .bubble { background: var(--surf); border-radius: 12px; padding: 12px 16px 8px; max-width: 86%; position: relative; color: var(--navy); font-size: 14px; font-weight: 600; line-height: 20px; }
.bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.clamp p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; -webkit-mask-image: linear-gradient(#000 55%, rgba(0, 0, 0, .35)); mask-image: linear-gradient(#000 55%, rgba(0, 0, 0, .35)); }
.bubble .more { border: 0; background: none; color: #4b5563; font-size: 12px; font-weight: 500; display: inline-flex; gap: 4px; align-items: center; margin-top: 6px; padding: 0; }
.user-msg > .icon-btn { opacity: 0; } .user-msg:hover > .icon-btn { opacity: 1; }
.asst-msg { margin: 0 0 32px; }
.research-toggle { border: 0; background: none; color: var(--blue2); display: flex; gap: 8px; align-items: center; padding: 4px 4px 4px 0; font-size: 14px; line-height: 21px; }
.chev { display: inline-flex; color: var(--mut); transition: transform .15s; } .chev.open { transform: rotate(180deg); }
.timeline { margin: 8px 0 12px; }
.step { display: flex; gap: 12px; position: relative; padding-bottom: 8px; }
.step::before { content: ""; position: absolute; left: 4px; top: 22px; bottom: -4px; width: 2px; background: #dfe6f6; border-radius: 2px; }
.step:last-child::before { display: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #c8d0e4; margin-top: 18px; flex: none; z-index: 1; }
.dot.done { background: var(--green); } .dot.run { background: var(--blue); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.step-body { flex: 1; min-width: 0; } .step-body.compile { padding-top: 10px; font-size: 14px; line-height: 21px; display: flex; gap: 8px; align-items: center; margin-left: -4px; }
.step-body.compile .ic { color: var(--navy); }
.card { background: var(--surf); border-radius: 12px; padding: 10px; }
.card.pad { padding: 12px; margin-top: 10px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-toggle { border: 0; background: none; display: flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 700; padding: 0; line-height: 18px; color: var(--ink); }
.card-head .link { font-size: 12px; font-weight: 700; color: var(--blue); }
.card-body { padding: 8px 0 0 0; } .note { margin: 0 0 6px; font-size: 12px; line-height: 18px; color: var(--mut); }
.q-row { display: flex; gap: 8px; align-items: center; padding: 4px 0; font-size: 12px; line-height: 18px; font-style: italic; color: var(--mut); } .q-text { flex: 1; }
.q-row .ic { color: #3d63d8; } .q-row .link { font-style: normal; font-size: 12px; }
.q-row.plain { font-style: normal; color: var(--ink); }
.filters { padding: 6px 0 0 24px; display: flex; gap: 6px; flex-wrap: wrap; }
.rank-card { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 336px; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; box-shadow: 0 1px 3px rgba(20, 30, 70, .06); }
.rank-card .tile { width: 36px; height: 36px; border-radius: 8px; background: var(--tile); color: #3d63d8; display: grid; place-items: center; flex: none; }
.rank-card b { display: block; font-size: 13px; font-weight: 600; color: var(--navy); line-height: 18px; } .rank-card small { display: block; color: var(--mut); font-size: 12px; }
.rank-card .ic.go { margin-left: auto; color: var(--mut2); }
.answer { overflow-wrap: anywhere; font-size: 14px; line-height: 21.7px; color: var(--navy); }
.answer p { margin: 12px 0 0; } .answer > :first-child { margin-top: 0; }
.answer h1, .answer h2, .answer h3 { margin: 12px 0 0; font-size: 18px; line-height: 24.75px; font-weight: 600; color: var(--navy); }
.answer ul, .answer ol { margin: 12px 0 0; padding-left: 22px; } .answer li { margin: 2px 0; }
.answer a { color: var(--blue); }
.answer table { border-collapse: collapse; margin-top: 12px; font-size: 13px; } .answer td, .answer th { border: 1px solid var(--line); padding: 6px 8px; }
.pp-cite { color: var(--blue); font-weight: 500; cursor: pointer; } .pp-cite:hover { text-decoration: underline; }
.caret { display: inline-block; width: 7px; height: 14px; background: var(--blue); margin-left: 2px; vertical-align: middle; animation: pulse 1s infinite; }
.actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.actions .btn-outline { padding: 4px 8px; }
.actions .btn-style { border-color: var(--blue2); color: var(--blue2); border-radius: 4px; padding: 6px 12px; line-height: 16px; }
.actions .icon-btn { padding: 8px; border-radius: 4px; }
.style-wrap { position: relative; }
.menu { position: absolute; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(20, 30, 70, .14); min-width: 220px; padding: 4px; display: flex; flex-direction: column; }
.menu button { border: 0; background: none; text-align: left; padding: 6px 10px; border-radius: 6px; font-size: 13px; } .menu button:hover { background: var(--surf); } .menu button.sel { font-weight: 600; color: var(--blue); }
.menu-group { color: var(--mut); font-size: 11.5px; padding: 6px 10px 2px; font-weight: 600; } .menu hr { border: 0; border-top: 1px solid var(--line); width: 100%; }
.style-menu { top: 36px; left: 0; }
.followups { margin-top: 20px; }
.fu-head { display: flex; align-items: center; gap: 6px; color: var(--mut); font-size: 13px; margin-bottom: 8px; } .fu-head .hint { margin-left: auto; font-size: 11px; color: var(--mut2); }
.followup { display: flex; width: 100%; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 9px 12px; margin-bottom: 6px; color: var(--navy); font-size: 14px; line-height: 20px; }
.followup:hover { background: var(--surf-blue); } .followup .ic:first-child { color: var(--blue); } .followup .go { margin-left: auto; color: var(--mut2); } .followup span:not(.go) { flex: 1; }
.composer-wrap { padding: 16px 0 4px; background: #fff; flex: none; }
.composer { border: 1px solid #96b6f2; border-radius: 12px; padding: 12px 12px 8px; background: #fff; min-height: 110px; display: flex; flex-direction: column; }
.composer:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 84, 241, .08); }
.composer textarea { width: 100%; border: 0; outline: 0; resize: none; background: transparent; max-height: 180px; font-size: 14px; line-height: 21px; padding: 0 4px; flex: 1; min-height: 42px; }
.composer textarea::placeholder { color: #b9c3dc; }
.composer-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; position: relative; }
.plus { width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 6px; background: #fff; display: grid; place-items: center; color: var(--ink); padding: 0; }
.plus { cursor: pointer; } .plus:hover { background: var(--surf); } .plus:disabled { cursor: progress; opacity: .6; }
.attach-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 0 4px 6px; }
.attach-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 240px; border: 1px solid var(--line); background: var(--surf); border-radius: 999px; padding: 3px 6px 3px 10px; font-size: 12px; line-height: 16px; color: var(--navy); }
.attach-chip .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-chip .x { border: 0; background: none; padding: 2px; display: grid; place-items: center; color: var(--mut); border-radius: 50%; cursor: pointer; } .attach-chip .x:hover { background: var(--line); color: var(--ink); }
.attach-err { font-size: 12px; color: var(--red); }
.pill { border: 1px solid transparent; border-radius: 12px; background: var(--surf-blue); padding: 6px 12px; font-size: 12px; font-weight: 500; line-height: 16px; display: inline-flex; gap: 5px; align-items: center; color: var(--blue); }
.pill:hover { background: #e9f0ff; }
.pill.web { color: var(--mut); background: #fff; border-color: var(--line); cursor: pointer; user-select: none; } .pill.web.on { color: var(--blue); background: var(--surf-blue); border-color: #c9d9fb; } .pill.web input { display: none; }
.qa-wrap { position: relative; } .qa-menu { bottom: 36px; left: 0; width: 340px; max-height: 340px; overflow: auto; }
.send { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--blue); color: #fff; display: grid; place-items: center; padding: 0; } .send:disabled { background: #b7cdf8; cursor: default; }
.disclaimer { text-align: center; color: var(--mut); font-size: 12px; line-height: 16px; margin: 14px 0 12px; display: flex; gap: 6px; justify-content: center; align-items: center; }
.mock-pill { background: #fff4d6; color: #8a6200; border-radius: 999px; padding: 0 8px; margin-left: 2px; }
.scroll-bottom { position: absolute; bottom: 150px; left: 50%; transform: translateX(-50%); width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; color: #374151; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 4px 12px rgba(0, 0, 0, .12); display: grid; place-items: center; z-index: 5; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #fff; border-left: 1px solid var(--line); box-shadow: -6px 0 24px rgba(20, 24, 50, .08); display: flex; flex-direction: column; z-index: 30; overflow: auto; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 600; color: var(--navy); }
.drawer-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px; align-items: center; }
.plist { padding: 4px 16px 16px; } .paper { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 19px; } .paper a { text-decoration: none; color: var(--navy); }
.codeblock { border: 1px solid var(--line); border-radius: 8px; margin: 12px 0 0; overflow: hidden; background: #fff; }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 10px; background: var(--surf); font-size: 12px; color: var(--mut); }
.codeblock pre { margin: 0; padding: 10px 12px; overflow: auto; max-height: 460px; font: 12px/1.5 ui-monospace, Menlo, monospace; white-space: pre; color: var(--navy); }

/* ============ Home ============ */
.page-scroll { overflow: auto; flex: 1; }
.home { padding: 40px 16px 48px; max-width: 828px; margin: 0 auto; }
.home h2 { font: 600 24px/36px "IBM Plex Serif", Georgia, serif; color: var(--blue2); margin: 0 0 24px; }
.home-card { border-radius: 12px; box-shadow: 0 4px 16px rgba(30, 50, 110, .12); padding: 20px; background: #fff; }
.tabs-row { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.tab-chip { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line2); background: #fff; font-weight: 500; font-size: 15px; color: var(--navy); position: relative; }
.tab-chip.on { background: var(--sel); border-color: transparent; color: var(--blue2); }
.tab-chip small { position: absolute; top: -8px; right: -2px; font-size: 8px; font-weight: 700; background: #1d4d33; color: #fff; padding: 0 4px; border-radius: 3px; }
.dz { border: 1px dashed #8896b6; border-radius: 12px; min-height: 214px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px; text-align: center; color: var(--mut); font-size: 14px; }
.dz .upload { display: inline-flex; align-items: center; gap: 8px; background: var(--blue3); color: #fff; border: 0; border-radius: 6px; padding: 8px 24px; font-weight: 500; }
.dz .checks-row { display: flex; gap: 16px; align-items: center; margin-top: 12px; color: var(--ink); font-size: 14px; } .dz .checks-row label { display: inline-flex; gap: 6px; font-weight: 600; align-items: center; } .dz .checks-row input { accent-color: var(--blue3); width: 16px; height: 16px; }
.promo-strip { margin: 56px 0 40px; border-radius: 12px; background: linear-gradient(90deg, #f1f5ff, #eaf0fe); padding: 24px 20px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.promo-strip b { font-size: 18px; color: var(--ink); display: block; font-weight: 600; } .promo-strip small { font-size: 14px; color: var(--navy); font-weight: 500; }
.promo-strip .tiles2 { margin-left: auto; display: flex; gap: 16px; }
.mini { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; width: 190px; font-size: 14px; color: var(--ink); font-weight: 600; line-height: 20px; display: flex; gap: 10px; align-items: flex-start; }
.mini small { display: block; font-weight: 400; font-size: 12px; color: var(--mut); line-height: 17px; }
.home h1 { font-size: 20px; font-weight: 500; color: var(--navy); margin: 0 0 12px; }
.seg { display: flex; gap: 8px; margin-bottom: 20px; align-items: center; }
.seg .s { height: 40px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line2); background: #fff; font-weight: 500; color: var(--navy); }
.seg .s.on { background: var(--surf-blue); border-color: var(--blue2); color: var(--blue2); }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.doc-card { border: 1px solid var(--line2); border-radius: 12px; padding: 16px; min-height: 180px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--navy); background: #fff; }
.doc-card:hover { box-shadow: 0 4px 16px rgba(30, 50, 110, .1); }
.doc-card.new { background: var(--surf); border-color: transparent; font-style: italic; color: var(--mut); }
.doc-card.new .btn-new { font-style: normal; border: 1px solid var(--blue2); color: var(--blue2); background: #fff; border-radius: 6px; padding: 8px; font-weight: 500; display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: auto; }
.doc-card .when { font-style: italic; color: var(--mut); font-size: 13px; } .doc-card .name { font-weight: 600; font-size: 15px; } .doc-card .ico { width: 44px; height: 44px; border-radius: 8px; background: #fdf0d2; display: grid; place-items: center; color: #b97d10; margin-top: 8px; }
.page-pad { padding: 28px 36px; max-width: 900px; overflow: auto; }
.page-pad h1 { font-size: 22px; font-weight: 600; color: var(--navy); margin: 0 0 12px; }
.tbl { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; } .tbl td, .tbl th { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.st { border-radius: 999px; padding: 1px 8px; font-size: 12px; background: var(--surf); } .st-verified { background: #dff3e6; color: #17623a; } .st-mock, .st-partial { background: #fff4d6; color: #8a6200; } .st-unverified, .st-mismatch, .st-error, .st-missing, .st-unresolved { background: #fde4e1; color: #8c2a1e; } .st-cannot_judge { background: #ececf1; color: #4a4a5a; } .st-arxiv { background: #e6eefc; color: #1d4ea8; }
textarea.ck-in, textarea.ck-bib, textarea.ck-tex { width: 100%; border: 1px solid var(--line2); border-radius: 8px; padding: 8px; margin: 6px 0; font-size: 13px; }

/* ============ Editor ============ */
.editor-wrap { display: flex; flex-direction: column; height: 100%; background: #fff; }
.ed-left { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ed-top { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 16px 0 30px; flex: none; position: relative; }
.ed-top .icon-btn { color: var(--mut); padding: 2px; }
.doc-title { border: 0; font: 500 16px/24px var(--sans); color: var(--mut); outline: 0; width: 160px; background: transparent; }
.doc-title:focus { color: var(--navy); }
.ed-top .shield { color: var(--mut); }
.save-state { font-size: 12px; color: var(--mut2); }
.sugg-pill { margin-left: auto; margin-right: 56px; border: 1px solid transparent; background: #0062ff; color: #fff; border-radius: 20px; padding: 8px 14px; font-weight: 500; box-shadow: 0 4px 12px -6px rgba(0, 78, 223, .41); font-size: 14px; line-height: 20px; }
.sugg-pill b { font-weight: 700; }
.ed-body { flex: 1; min-height: 0; display: flex; position: relative; --panel-w: clamp(300px, 29vw, 440px); --rail-w: 70px; }
.ed-body.closed { --panel-w: 0px; --rail-w: 44px; }
.page-area { flex: 1; min-width: 0; overflow: auto; position: relative; min-height: 0; }
.banner { background: var(--navy); color: #fff; margin: 12px auto 20px; max-width: 896px; height: 56px; border-radius: 6px 6px 0 0; display: flex; align-items: center; gap: 10px; padding: 0 16px 0 24px; font-size: 14px; overflow: hidden; position: relative; }
.banner::before { content: ""; position: absolute; left: 0; top: 0; width: 44px; height: 56px; background: #2547c4; border-radius: 0 40px 0 0; }
.banner > * { position: relative; }
.banner .try { margin-left: auto; border: 1px solid #f0b400; color: #f5b800; background: transparent; border-radius: 6px; padding: 7px 12px; font-weight: 500; display: inline-flex; gap: 8px; align-items: center; font-size: 14px; }
.doc-card-wrap { max-width: 896px; margin: 0 auto; border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0; background: #fff; min-height: calc(100% - 100px); box-shadow: 0 0 0 1px #f2f5fc; }
.doc-meta { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--mut); font-size: 12px; }
.doc-meta .ava { width: 22px; height: 22px; border-radius: 50%; background: #f3b36a; color: #fff; display: grid; place-items: center; font-size: 10px; margin-left: 4px; }
.doc-meta .tools { margin-left: auto; display: flex; gap: 8px; }
.doc-meta .tb { height: 32px; min-width: 32px; padding: 0 8px; background: var(--surf); border: 0; border-radius: 6px; display: inline-flex; gap: 6px; align-items: center; color: var(--mut); font-size: 12px; font-weight: 500; }
.doc-meta .tb.apps { color: var(--navy); }
.fmt { display: flex; gap: 2px; padding: 6px 16px; border-bottom: 1px solid var(--line); } .fmt button { border: 0; background: none; border-radius: 4px; padding: 3px 9px; color: var(--navy); font-size: 13px; } .fmt button:hover { background: var(--surf); }
.doc { padding: 48px 24px 262px; min-height: 480px; outline: 0; font: 400 16px/24px var(--sans); color: var(--navy); }
.doc p { margin: 0; } .doc h1 { font-size: 26px; line-height: 34px; margin: 0 0 8px; } .doc h2 { font-size: 20px; line-height: 28px; margin: 16px 0 4px; }
.doc .issue { text-decoration: underline wavy #e3436f; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.handle { position: absolute; top: 17px; z-index: 6; width: 38px; height: 34px; border: 0; background: var(--navy); color: #fbfcff; border-radius: 24px 0 0 24px; display: grid; place-items: center; box-shadow: var(--shadow-btn); padding: 0; right: calc(var(--rail-w) + var(--panel-w)); }
.panel { flex: none; width: var(--panel-w); border-left: 1px solid var(--line); min-width: 0; overflow: hidden; background: #fff; display: flex; flex-direction: column; position: relative; color: var(--navy); }
.panel .pane { display: flex; flex-direction: column; min-height: 0; flex: 1; overflow: auto; }
.panel .chat-host { height: 100%; }
.ed-body.closed .panel { display: none; }
.p-head { height: 48px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-bottom: 1px solid var(--line); background: #fff; }
.p-head h3 { margin: 0; font-size: 16px; font-weight: 500; color: var(--navy); line-height: 24px; }
.p-head .help { color: var(--navy); display: inline-flex; }
.p-head .hb { width: 38px; height: 34px; border: 1px solid var(--line2); border-radius: 8px; background: #fff; display: grid; place-items: center; color: var(--navy); padding: 0; }
.p-head .hb:hover { background: var(--surf); }
.p-head .back { border: 0; background: none; color: var(--navy); padding: 0; display: inline-flex; }
.p-body { padding: 0 16px 16px; flex: 1; overflow: auto; min-height: 0; }
.rail { flex: none; width: var(--rail-w); background: var(--rail); display: flex; flex-direction: column; padding: 14px 0; overflow: auto; }
.rail-btn { border: 0; background: none; border-radius: 2px; padding: 8px 2px 6px; display: flex; flex-direction: column; align-items: center; font-size: 12px; line-height: 16px; color: #fff; position: relative; text-align: center; width: 100%; margin-bottom: 0; gap: 2px; min-height: 48px; justify-content: center; }
.rail-btn .ri { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; position: relative; }
.rail-btn:hover { background: rgba(255, 255, 255, .08); }
.rail-btn.on { background: var(--rail-on); color: #e1ebff; font-weight: 500; }
.rail-btn.on .ri { background: #e1ebff; color: var(--blue); border-radius: 50%; width: 22px; height: 22px; }
.rail-btn.agents .lab { color: #eba800; } .rail-btn.agents .ri { color: #eba800; }
.rail-btn em { position: absolute; top: 4px; right: 2px; font-style: normal; font-size: 8px; line-height: 12px; background: #ffeba3; color: #6f5325; border-radius: 25px; padding: 0 5px; font-weight: 500; }
.rail-btn .cnt { position: absolute; top: -6px; right: -8px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--red); color: #fff; font-size: 10px; line-height: 16px; font-weight: 600; text-align: center; padding: 0 3px; }
.ed-body.closed .rail-btn .lab, .ed-body.closed .rail-btn em { display: none; } .ed-body.closed .rail-btn { min-height: 38px; }
.rail .rail-sp { flex: 1; } .rail .rail-foot { display: grid; place-items: center; height: 32px; color: #fff; opacity: .9; }

/* Edit panel */
.tabs2 { display: flex; gap: 16px; padding: 8px 16px 0; border-bottom: 1px solid var(--line); flex: none; }
.tabs2 button { border: 0; background: none; padding: 0 0 6px; line-height: 24px; color: var(--navy); font-size: 16px; position: relative; display: inline-flex; gap: 6px; align-items: center; }
.tabs2 button.on { color: var(--blue3); } .tabs2 button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--blue3); }
.tabs2 .star { width: 14px; height: 14px; background: #f5c542; border-radius: 3px; display: inline-block; opacity: .8; }
.sum-row { display: flex; align-items: center; gap: 8px; padding: 16px 0 14px; border-bottom: 1px solid var(--line); }
.sum-row .num { width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 600; flex: none; }
.sum-row .txt { font-size: 14px; font-weight: 500; line-height: 21px; flex: 1; color: var(--navy); }
.sum-row .btn-outline { height: 42px; font-size: 16px; padding: 8px 14px; border-radius: 8px; border-color: var(--blue); }
.find-link { display: block; font-size: 12px; color: var(--mut); text-decoration: underline; padding: 12px 0 8px; border: 0; background: none; line-height: 16px; }
.s-card { padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.s-card .tags { display: flex; gap: 8px; align-items: flex-start; color: var(--blue2); font-weight: 500; font-size: 16px; line-height: 20px; margin-bottom: 8px; }
.s-card .tags .ic { color: #6f93ea; margin-top: 1px; }
.s-card .prev { color: var(--mut); font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 26px; line-height: 24px; }
.s-card.open { cursor: default; }
.tracked { font-size: 16px; line-height: 24px; margin: 0 0 12px; }
.tracked ins { background: var(--ins); text-decoration: none; padding: 0 1px; } .tracked del { background: var(--del); text-decoration: line-through; }
.hint-line { display: flex; gap: 8px; align-items: center; color: var(--mut); font-size: 12px; margin: 4px 0 12px; } .hint-line .ic { color: #f0b400; }
.acc-row { display: flex; gap: 8px; }
.acc-row .btn-big { flex: 1; white-space: nowrap; padding: 8px 12px; } .btn-acc { background: var(--blue3); color: #fff; border: 0; } .btn-acc:hover { background: var(--blue); }
.btn-acc .n { background: #fff; color: var(--blue); border-radius: 10px; font-size: 10px; font-weight: 700; min-width: 20px; height: 20px; display: inline-grid; place-items: center; }
.s-card .extra { margin-top: 10px; display: flex; gap: 12px; }
.s-card .extra .link { font-size: 12px; font-weight: 500; color: var(--mut); text-decoration: underline; }
.empty-note { text-align: center; color: var(--mut); padding: 40px 12px; font-size: 14px; } .empty-note .ic { color: #6f93ea; margin-bottom: 8px; }

/* Rewrite panel */
.rw-list { padding: 0 16px; }
.rw-item { display: flex; gap: 10px; align-items: center; width: 100%; padding: 22px 8px; border: 0; background: none; border-bottom: 1px solid var(--line); text-align: left; color: var(--blue2); font-size: 16px; font-weight: 500; }
.rw-item .ic { color: #8aa6e6; } .rw-item:hover { background: var(--surf-blue); }
.rw-item.on { background: #eef3ff; border-radius: 8px; }
.rw-note { margin: 12px 16px 0; font-size: 13px; color: var(--mut); }
.promo { margin: 12px 16px 16px; padding: 16px; background: var(--surf); border-radius: 12px; position: relative; overflow: hidden; }
.promo .x { position: absolute; top: 12px; right: 12px; color: #9aa6bf; border: 0; background: #e6eaf3; border-radius: 50%; width: 18px; height: 18px; display: grid; place-items: center; padding: 0; }
.promo .new { display: inline-flex; gap: 6px; align-items: center; background: #e9efff; color: var(--blue); font-weight: 700; font-size: 11px; padding: 6px 10px; border-radius: 6px; letter-spacing: .3px; }
.promo.green .new { background: #e3f3e6; color: #2f8a45; }
.promo h4 { margin: 14px 0 8px; font-size: 18px; line-height: 24px; font-weight: 600; color: var(--navy); }
.promo p { margin: 0 0 14px; font-size: 14px; line-height: 21px; color: var(--navy); max-width: 78%; }
.promo .go { width: 100%; height: 48px; border: 0; border-radius: 6px; background: var(--blue3); color: #fff; font-weight: 500; display: inline-flex; gap: 8px; align-items: center; justify-content: center; }
.promo.green .go { background: #3e8f3f; }
.rw-top { display: flex; align-items: center; gap: 8px; padding: 10px 16px 6px; }
.rw-top h3 { margin: 0; font-size: 16px; font-weight: 500; line-height: 20px; }
.switch { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 500; border: 1px solid var(--line2); border-radius: 8px; padding: 6px 8px; background: #fff; }
.switch i { width: 36px; height: 20px; border-radius: 10px; background: #dfe7fb; display: inline-block; position: relative; transition: background .15s; }
.switch i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch.on i { background: var(--blue3); } .switch.on i::after { left: 18px; }
.rw-result { background: #e8ecfa; margin: 8px 0 0; padding: 12px 16px; font-size: 16px; line-height: 24px; color: var(--navy); white-space: pre-wrap; }
.rw-actions { display: flex; gap: 8px; align-items: center; padding: 8px 16px; }
.rw-actions .btn-big { height: 48px; } .rw-actions .icon-btn { padding: 8px; }
.rw-others { margin-top: 12px; padding: 16px; border-radius: 16px 16px 0 0; box-shadow: 0 -4px 16px rgba(30, 50, 110, .08); text-align: center; }
.rw-others b { display: block; font-size: 16px; font-weight: 500; margin-bottom: 12px; }
.rw-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.rw-chips .chip { height: 36px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--navy); color: var(--navy); font-weight: 500; font-size: 14px; }
.rw-chips .chip.on { border-color: var(--blue); color: var(--blue); background: var(--surf-blue); }
.syn-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; }
.ai-note { text-align: center; font-size: 12px; color: var(--mut); display: flex; gap: 6px; justify-content: center; align-items: center; margin: 4px 0 8px; }
.tone-sel { padding: 0 16px; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Write / Research / Checks / Templates */
.ideas { padding: 0 16px; }
.ideas h4 { margin: 16px 0 4px; color: var(--blue2); font-size: 16px; font-weight: 600; line-height: 24px; }
.ideas > p { margin: 0 0 12px; color: var(--mut); font-size: 14px; }
.idea { display: flex; gap: 8px; align-items: center; width: 100%; border: 0; background: none; padding: 10px 2px; text-align: left; font-size: 12px; font-weight: 500; color: var(--navy); }
.idea:hover { color: var(--blue); } .idea .ic { color: #8aa6e6; }
.mini-composer { margin: 8px 12px 6px; border: 1px solid var(--line2); border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.mini-composer textarea { border: 0; outline: 0; resize: none; font-size: 16px; line-height: 24px; min-height: 52px; } .mini-composer textarea::placeholder { color: #b0b9cd; }
.doc-chip { align-self: flex-start; display: inline-flex; gap: 10px; align-items: center; border: 1px solid var(--line2); border-radius: 6px; font-size: 12px; padding: 6px 8px; color: var(--navy); }
.mini-composer .row2 { display: flex; align-items: center; justify-content: space-between; }
.rc-intro { text-align: center; padding: 14px 16px 10px; font-size: 14px; color: var(--navy); line-height: 21px; } .rc-intro b { color: var(--blue); font-weight: 500; }
.segs { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 12px; border: 1px solid var(--line2); border-radius: 6px; overflow: hidden; }
.segs button { border: 0; border-right: 1px solid var(--line2); background: #fff; min-height: 56px; font-weight: 500; font-size: 16px; line-height: 24px; color: var(--navy); } .segs button:last-child { border-right: 0; }
.segs button.on { background: #2459d6; color: #fff; }
.q-box { margin: 12px 12px 0; border: 1px solid var(--blue); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; min-height: 220px; }
.q-box textarea { flex: 1; border: 0; outline: 0; resize: none; font-size: 16px; line-height: 24px; } .q-box textarea::placeholder { color: #8b96ad; }
.q-box .qrow { display: flex; justify-content: space-between; align-items: center; }
.q-box .filter { border: 0; background: var(--surf); border-radius: 6px; padding: 6px 10px; color: var(--mut); display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.q-box .go { width: 34px; height: 34px; border-radius: 6px; border: 0; background: #7fa9fb; color: #fff; display: grid; place-items: center; } .q-box .go.ready { background: var(--blue3); }
.ex-q { margin: 14px 12px 0; } .ex-q small { font-size: 11px; font-weight: 600; color: var(--mut); } .ex-q button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 12px 8px; color: var(--mut); font-size: 14px; line-height: 20px; }
.ex-q button:hover { color: var(--blue2); background: var(--surf-blue); }
.chk-intro { padding: 16px; } .chk-intro h4 { margin: 0 0 14px; font-size: 16px; font-weight: 500; color: var(--mut); display: flex; gap: 8px; align-items: center; } .chk-intro h4 .new { background: #dff3e6; color: #2f8a45; font-size: 10px; padding: 0 6px; border-radius: 3px; font-weight: 600; }
.chk-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chk-card { border: 1px solid var(--line2); border-radius: 12px; padding: 20px 12px 14px; background: #fff; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; min-height: 266px; font-weight: 600; font-size: 16px; line-height: 24px; color: var(--navy); }
.chk-card .circ { width: 56px; height: 56px; border-radius: 50%; background: #eaf0ff; color: var(--blue); display: grid; place-items: center; }
.chk-card .cont { margin-top: auto; color: var(--blue); font-weight: 500; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; border: 0; background: none; }
.chk-list { padding: 4px 16px 16px; } .chk-list > small { display: block; font-weight: 600; font-size: 12px; color: var(--mut); padding: 12px 0; border-top: 1px solid var(--line); }
.chk-i { display: block; width: 100%; text-align: left; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; } .chk-i b { display: flex; gap: 6px; align-items: center; font-weight: 500; font-size: 16px; color: var(--navy); } .chk-i span { display: block; color: var(--mut); font-size: 16px; line-height: 24px; margin-top: 8px; }
.chk-i.off { opacity: .75; cursor: default; } .chk-i .pill2 { font-size: 10px; padding: 0 6px; border-radius: 3px; background: #eef1f8; color: var(--mut); font-weight: 600; margin-left: 4px; }
.tpl { display: block; width: 100%; text-align: left; border: 1px solid var(--line2); background: #fff; border-radius: 8px; padding: 12px; margin: 8px 0; font-weight: 500; color: var(--navy); } .tpl:hover { background: var(--surf-blue); }
.not-impl { margin: 24px 16px; padding: 24px 16px; border: 1px dashed var(--line2); border-radius: 12px; text-align: center; color: var(--mut); font-size: 14px; line-height: 21px; } .not-impl .ic { color: #8aa6e6; margin-bottom: 8px; }
.r-res { padding: 0 16px; }
.row { display: flex; gap: 6px; align-items: center; }

/* New-document wizard */
.wizard-wrap { position: absolute; inset: 58px var(--rail-w) 0 0; background: #fff; z-index: 8; overflow: auto; padding: 32px 16px 40px; }
.wiz { max-width: 640px; margin: 0 auto; }
.wiz-card { border: 1px solid var(--line2); border-radius: 16px; padding: 24px; box-shadow: 0 4px 16px rgba(30, 50, 110, .06); }
.wiz h3 { margin: 0 0 16px; display: flex; gap: 12px; align-items: center; font-size: 16px; font-weight: 600; color: #000; }
.wiz h3 .circ { width: 32px; height: 32px; border-radius: 50%; background: #eaf0ff; color: var(--blue); display: grid; place-items: center; }
.wiz .modes { display: flex; gap: 12px; margin-bottom: 14px; }
.wiz .modes button { height: 46px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line2); background: var(--surf); font-weight: 500; font-size: 14px; color: #000; } .wiz .modes button.on { background: #e1ebff; border-color: var(--blue2); }
.wiz .box { border: 1px solid #8fa8ea; border-radius: 8px; min-height: 100px; padding: 12px; display: flex; flex-direction: column; } .wiz .box textarea { flex: 1; border: 0; outline: 0; resize: none; font-size: 14px; } .wiz .box textarea::placeholder { color: #b9c3dc; }
.wiz .or { display: flex; align-items: center; gap: 14px; color: var(--mut); font-size: 13px; margin: 18px 0; } .wiz .or::before, .wiz .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.wiz .imp { display: flex; gap: 16px; align-items: center; border: 1px solid var(--line2); border-radius: 8px; padding: 18px 16px; width: 100%; background: #fff; text-align: left; } .wiz .imp b { font-size: 14px; font-weight: 500; display: block; color: #000; } .wiz .imp small { font-size: 12px; color: var(--mut); }
.wiz .foot { display: flex; justify-content: flex-end; gap: 12px; margin-top: 16px; }
.wiz .foot button { height: 32px; border-radius: 6px; padding: 0 16px; font-size: 13px; font-weight: 500; }
.wiz .skip { text-align: center; margin: 22px 0 40px; color: var(--mut); font-weight: 500; border: 0; background: none; display: block; width: 100%; font-size: 15px; }
.wiz .try { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line2); border-radius: 12px; padding: 20px; width: 100%; background: #fff; text-align: left; } .wiz .try b { display: block; font-size: 15px; font-weight: 600; color: #000; } .wiz .try small { color: var(--mut); font-size: 12px; } .wiz .try > .ic:last-child { margin-left: auto; color: var(--blue2); }
.wiz .try .sq { width: 32px; height: 32px; border-radius: 8px; background: var(--surf); display: grid; place-items: center; color: var(--mut); }

@media (max-width: 900px) { :root { --side-w: 0px; } .sidebar { display: none; } .shell, .shell.collapsed { grid-template-columns: 1fr; } .shell.collapsed .side-rail { display: none; } }   /* the hidden sidebar left main in a 0px column: blank app */
@media (max-width: 1180px) { .banner { margin-left: 12px; margin-right: 12px; } }

::highlight(pp-issue) { text-decoration: underline wavy #e3436f; text-decoration-thickness: 1px; }
.pop { position: absolute; z-index: 40; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(20, 30, 70, .14); min-width: 180px; padding: 4px; }
.pop button, .pop label { display: flex; gap: 8px; align-items: center; width: 100%; border: 0; background: none; padding: 8px 10px; border-radius: 6px; font-size: 13px; text-align: left; cursor: pointer; } .pop button:hover, .pop label:hover { background: var(--surf); }
.pop .nt { padding: 8px 10px; font-size: 12px; color: var(--mut); }
.rail-foot { --q: #051e57; }

.tabs-row { gap: 8px; flex-wrap: nowrap; } .tab-chip { padding: 0 12px; font-size: 14px; gap: 8px; flex: none; }
.user-card { margin-top: auto; } .recent:not([hidden]) + .user-card { margin-top: 0; }
.p-head h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.switch { white-space: nowrap; }

.panel > .chat-host { flex: 1; min-height: 0; height: auto; }
.chat-panel .disclaimer { white-space: nowrap; font-size: 11px; } .chat-panel .mock-pill { display: none; }
.chat-panel .composer-wrap { padding-top: 8px; }

/* Shared notifications menu. */
[data-test-id="sidebar-notification"] { position: relative; }
.notification-badge { position: absolute; top: -5px; right: -7px; min-width: 17px; padding: 0 4px; border-radius: 10px; background: var(--red); color: #fff; font-size: 10px; line-height: 17px; }
.rail button.rail-foot { border: 0; background: transparent; width: 100%; padding: 0; }
.notification-menu { position: fixed; z-index: 100; width: min(380px, calc(100vw - 16px)); max-height: min(480px, calc(100vh - 80px)); overflow: auto; border: 1px solid var(--line2); border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(20, 30, 70, .14); }
.notification-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.notification-head .link:disabled { color: var(--mut2); cursor: default; text-decoration: none; }
.notification-item { display: flex; width: 100%; gap: 9px; text-align: left; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line); background: #fff; }
.notification-item:hover, .notification-item:focus-visible { background: var(--surf-blue); }
.notification-dot { flex: none; width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: var(--blue); }
.notification-dot.read { visibility: hidden; }
.notification-copy { min-width: 0; display: grid; gap: 3px; font-size: 13px; line-height: 19px; }
.notification-copy b { font-weight: 500; }
.notification-summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mut); }
.notification-copy time { font-size: 11px; color: var(--mut2); }
.notification-empty { padding: 16px; margin: 0; font-size: 13px; }

/* Manuscript check results, shared with the editor Checks panel. */
.review-section { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 12px; }
.review-label { display: block; margin: 12px 0; color: var(--mut); font-size: 13px; }
.review-label[hidden] { display: none; }
.review-label textarea, .review-label select { display: block; width: 100%; margin-top: 6px; padding: 8px; border: 1px solid var(--line2); border-radius: 8px; background: #fff; font: inherit; color: var(--navy); }
.review-result { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.review-result h3 { margin: 18px 0 8px; font-size: 15px; }
.review-counts { display: flex; flex-wrap: wrap; gap: 12px; }
.review-counts > div { flex: 1; min-width: 180px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.review-counts p, .review-rules p { margin: 4px 0 0; color: var(--mut); }
.review-rules { list-style: none; padding: 0; margin: 0; }
.review-rules li, .review-finding { padding: 12px 0; border-bottom: 1px solid var(--line); }
.review-rules li > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.review-pass { background: #dff3e6; color: #17623a; }
.review-warn { background: #fff4d6; color: #8a6200; }
.review-fail { background: #fde4e1; color: #8c2a1e; }
.review-na { background: var(--surf); color: var(--mut); }
.review-finding blockquote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--line2); background: var(--surf); white-space: pre-wrap; }
.review-text { white-space: pre-wrap; }
.lang-btn{width:auto;min-width:28px;padding:0 7px;font-size:12px;font-weight:600;line-height:1}
/* deep mode (web/js/deep.js) */
.pill.deep.on { color: #fff; background: var(--blue); border-color: var(--blue); }
.deep-hint { font-size: 12px; color: var(--blue2); }
.followup.deep-fu { border-color: #b9cdf7; background: var(--surf-blue); }
.followup .tag { margin-left: auto; font-size: 11px; color: var(--blue2); background: #fff; border: 1px solid #c9d9fb; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.deep-msg { margin: 0 0 28px; }
.dcard { border: 1px solid var(--line2); border-radius: 14px; background: #fff; overflow: hidden; box-shadow: 0 6px 18px -12px rgba(5, 30, 87, .25); }
.dhead { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surf-blue); border-bottom: 1px solid var(--line); }
.dbadge { font-size: 11px; font-weight: 700; color: #fff; background: var(--blue); border-radius: 6px; padding: 2px 7px; }
.dtitle { font-weight: 600; color: var(--navy); flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsub { font-size: 12px; color: var(--mut); white-space: nowrap; }
.dbody { padding: 14px 16px; font-size: 14px; }
.dgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.dfield { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--mut); }
.dfield.full { grid-column: 1 / -1; }
.dfield input, .dfield select { border: 1px solid var(--line2); border-radius: 8px; padding: 7px 10px; font-size: 14px; color: var(--navy); background: #fff; }
.dnote { font-size: 13px; color: var(--mut2); padding: 7px 0; }
.dchk { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--navy); margin-top: 12px; }
.dest { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; padding: 9px 12px; background: var(--surf); border-radius: 10px; font-size: 13px; color: var(--mut); }
.dest b { color: var(--navy); }
.dactions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.btn-ghost { border: 0; background: none; color: var(--mut); padding: 7px 12px; border-radius: 8px; }
.dcard .tl { margin-top: 2px; }
.dcard .st { display: flex; gap: 12px; position: relative; padding-bottom: 12px; }
.dcard .st::before { content: ""; position: absolute; left: 5px; top: 18px; bottom: -2px; width: 2px; background: #dfe6f6; }
.dcard .st:last-child::before { display: none; }
.dcard .d { width: 12px; height: 12px; border-radius: 50%; background: #c8d0e4; margin-top: 5px; flex: none; z-index: 1; }
.dcard .d.done { background: var(--green); } .dcard .d.run { background: var(--blue); animation: pulse 1s infinite; } .dcard .d.fail { background: var(--red); }
.dcard .stb { flex: 1; min-width: 0; }
.dcard .name { font-weight: 600; color: var(--navy); } .dcard .name.dim { color: var(--mut2); font-weight: 500; }
.dcard .meta { font-size: 12px; color: var(--mut); }
.dcard .act { margin-top: 6px; background: var(--surf); border-radius: 8px; padding: 7px 10px; font-size: 12px; color: var(--mut); }
.dcard .act div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leave { font-size: 12px; color: var(--mut); background: var(--surf); border-radius: 8px; padding: 8px 10px; margin-top: 4px; display: flex; gap: 8px; align-items: center; }
.dres { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: start; }
.dpaper { height: 150px; border: 1px solid var(--line2); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--navy); text-decoration: none; font-size: 12px; background: var(--surf); }
.dpaper.nopdf { color: var(--muted, #8a8f98); border-style: dashed; }
.dcard .checks { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 4px; font-size: 13px; }
.dcard .ok { color: var(--green); font-weight: 700; } .dcard .warn { color: #b7791f; font-weight: 700; }
.dcard .row { display: flex; gap: 8px; flex-wrap: wrap; }
.dcard .files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dcard .file { border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; font-size: 12px; color: var(--navy); text-decoration: none; }
.dsum { margin-top: 12px; font-size: 13px; } .dsum summary { cursor: pointer; color: var(--blue2); }
.recent-list .spin { width: 12px; height: 12px; border: 2px solid #c9d6f5; border-top-color: var(--blue); border-radius: 50%; animation: rot .9s linear infinite; flex: none; margin-left: 6px; }
@keyframes rot { to { transform: rotate(360deg); } }
@media (max-width: 640px) { .dgrid, .dres { grid-template-columns: 1fr; } }
.dcard a.btn-primary { text-decoration: none; display: inline-flex; align-items: center; padding: 6px 16px; }
.dpolish textarea { border: 1px solid var(--line2); border-radius: 8px; padding: 8px 10px; font-size: 13px; resize: vertical; }
.drevise { display: flex; gap: 8px; margin-top: 14px; }
.drevise input { flex: 1; border: 1px solid var(--line2); border-radius: 8px; padding: 7px 10px; font-size: 13px; }
button.file { background: #fff; cursor: pointer; }
.drawer.wide { width: min(760px, 100%); }
.deditor { flex: 1; min-height: 60vh; margin: 0 16px 16px; border: 1px solid var(--line2); border-radius: 8px; padding: 10px; font: 12px/18px ui-monospace, Menlo, monospace; resize: none; }
.dmsg { font-size: 12px; margin-left: 6px; }

/* ============ Claim check (deep-mode delivery and Checks page) ============ */
.ccheck h5 { margin: 0 0 6px; font-size: 13px; color: var(--navy); font-weight: 600; }
.ccheck .cc-line { margin: 0 0 6px; font-size: 13px; } .ccheck .cc-note { margin: 4px 0; font-size: 12px; color: var(--mut); }
.cc-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; font-size: 13px; }
.cc-list li { border-top: 1px solid var(--line); padding-top: 8px; }
.cc-where { margin-left: 6px; font-size: 12px; color: var(--mut); font-family: var(--mono, monospace); }
.cc-claim { margin: 4px 0 2px; color: var(--ink); } .cc-why { color: var(--mut); } .cc-do { color: var(--ink); margin-top: 2px; }
.st-cc-needs_fix, .st-cc-unsupported { background: #fde4e1; color: #8c2a1e; } .st-cc-author_check { background: #fff4d6; color: #8a6200; } .st-cc-cannot_judge { background: #ececf1; color: #4a4a5a; }
.st-cc-verified { background: #dff3e6; color: #17623a; }
.ccnote { margin: 8px 0 0; font-size: 12px; } .ccnote.muted { color: var(--mut); }
.cc-quote { margin: 2px 0; padding-left: 8px; border-left: 2px solid var(--line2); color: var(--ink); font-style: italic; }
/* claim check by sentence (server/claimcheck/group.py) */
.cc-points { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.cc-points li { border-top: 0; padding: 0 0 0 9px; border-left: 2px solid var(--line); }
.cc-point + .cc-point { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.cc-fold { margin-top: 10px; } .cc-fold > summary, .cc-claims > summary { cursor: pointer; font-size: 13px; color: var(--navy); }
.cc-claims { margin-top: 6px; } .cc-claims .cc-list { margin-top: 4px; }
