:root {
  --ink: #19221e;
  --muted: #6f7772;
  --faint: #9da39f;
  --line: #dfe1db;
  --paper: #f4f4ef;
  --surface: #fbfbf7;
  --white: #fff;
  --forest: #18241f;
  --acid: #d8ff63;
  --acid-soft: #efffc2;
  --rust: #d86b42;
  --blue: #5987c5;
  --shadow: 0 18px 50px rgba(31, 42, 36, .08);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); font: 14px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; display: flex; flex-direction: column; padding: 25px 17px 18px; background: var(--forest); color: #e9ede9; z-index: 20; }
.brand { display: inline-flex; align-items: center; gap: 10px; padding: 0 8px 25px; font: 600 23px/1 Georgia, serif; letter-spacing: -.04em; }
.brand svg { width: 28px; height: 28px; fill: none; stroke: var(--acid); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.eyebrow { display: block; margin-bottom: 8px; color: #89938d; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.workspace-picker { padding: 0 3px 20px; }
.workspace-button { width: 100%; height: 44px; display: flex; align-items: center; gap: 10px; border: 1px solid #36423c; border-radius: 9px; padding: 0 9px; background: #202d27; color: #f5f7f5; cursor: pointer; text-align: left; }
.workspace-button:hover { border-color: #536059; }
.workspace-mark { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 6px; background: var(--acid); color: var(--forest); font: 700 12px Georgia, serif; }
.workspace-button > span:nth-child(2) { overflow: hidden; flex: 1; text-overflow: ellipsis; white-space: nowrap; }
.chevron { color: #8e9992; }
.primary-nav { display: grid; gap: 4px; }
.nav-item { width: 100%; height: 39px; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 7px; padding: 0 10px; background: transparent; color: #aeb7b1; cursor: pointer; text-align: left; }
.nav-item:hover { background: #23312a; color: #fff; }
.nav-item.active { background: #2a3831; color: #fff; }
.nav-icon { width: 18px; color: #c6cdc8; font-size: 17px; text-align: center; }
.nav-count { margin-left: auto; display: grid; place-items: center; min-width: 21px; height: 19px; padding: 0 6px; border-radius: 10px; background: #3a4741; color: #bec6c1; font-size: 11px; }
.soon { margin-left: auto; color: #748078; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.sidebar-section { margin-top: 27px; min-height: 0; overflow: hidden; padding: 0 3px; }
.project-shortcuts { display: grid; gap: 3px; }
.project-shortcut { display: flex; align-items: center; gap: 9px; overflow: hidden; padding: 7px; border-radius: 6px; color: #9da8a1; font-size: 12px; }
.project-shortcut:hover { background: #23312a; color: #fff; }
.project-dot { flex: 0 0 auto; width: 7px; height: 7px; border: 1px solid var(--acid); border-radius: 50%; }
.project-shortcut span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer { margin-top: auto; display: grid; gap: 8px; }
.identity-card { width: 100%; display: flex; align-items: center; gap: 9px; border: 1px solid #313e38; border-radius: 9px; padding: 9px; background: #1d2923; color: #e7ebe8; cursor: pointer; text-align: left; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: #e5efc5; color: #283126; font-weight: 800; }
.identity-copy { min-width: 0; flex: 1; display: grid; }
.identity-copy strong { font-size: 11px; }
.identity-copy small { overflow: hidden; color: #7e8982; font-size: 9px; text-overflow: ellipsis; }

.main-content { grid-column: 2; min-width: 0; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 0 clamp(22px, 4vw, 58px); background: rgba(244, 244, 239, .94); backdrop-filter: blur(12px); }
.status-chip { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.status-chip span { width: 7px; height: 7px; border-radius: 50%; background: #70a84e; box-shadow: 0 0 0 3px #dfecd7; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: transparent; cursor: pointer; font-size: 20px; }
.icon-button:hover { background: var(--white); }
.notification { position: relative; }
.notification::after { content: ""; position: absolute; top: 8px; right: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--rust); }
.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 7px; padding: 0 15px; cursor: pointer; font-size: 12px; font-weight: 650; }
.button-dark { background: var(--forest); color: #fff; }
.button-dark:hover { background: #2b3b33; }
.button-accent { background: var(--acid); color: var(--forest); }
.button-accent:hover { background: #c7f244; }
.button-plain { border: 1px solid var(--line); background: transparent; }
.button-plain:hover { background: #f1f1ec; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.mobile-only { display: none; }

.content-split { min-height: calc(100vh - 72px); display: grid; grid-template-columns: minmax(0, 1fr) 370px; }
.view { min-width: 0; max-width: 1200px; width: 100%; margin: 0 auto; padding: clamp(34px, 5vw, 66px) clamp(22px, 4vw, 58px) 80px; }
.page-loading { height: 60vh; display: flex; align-items: center; justify-content: center; gap: 7px; }
.page-loading span { width: 7px; height: 7px; border-radius: 50%; background: var(--forest); animation: bounce 1s infinite alternate; }
.page-loading span:nth-child(2) { animation-delay: .18s; }
.page-loading span:nth-child(3) { animation-delay: .36s; }
@keyframes bounce { to { opacity: .2; transform: translateY(-8px); } }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 30px; margin-bottom: 42px; }
.hero .eyebrow { color: #7a817c; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 11px; font: 400 clamp(35px, 5vw, 59px)/1.04 Georgia, "Times New Roman", serif; letter-spacing: -.045em; }
h1 em { color: var(--rust); font-weight: 400; }
.hero p { max-width: 590px; margin-bottom: 0; color: var(--muted); font-size: 14px; }
.date-block { padding-bottom: 4px; text-align: right; }
.date-block strong { display: block; font: 400 31px/1 Georgia, serif; }
.date-block span { color: var(--muted); font-size: 11px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 45px; background: rgba(255,255,255,.42); }
.stat { min-height: 112px; padding: 22px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.stat-value { font: 400 30px/1 Georgia, serif; }
.stat-note { margin-left: 5px; color: #7f8782; font: 400 10px Inter, sans-serif; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.section-heading h2 { margin: 0; font: 400 24px/1.1 Georgia, serif; letter-spacing: -.02em; }
.text-link { border: 0; padding: 0; background: none; color: var(--muted); cursor: pointer; font-size: 11px; }
.text-link:hover { color: var(--ink); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .7fr); gap: 28px; }
.project-list { border-top: 1px solid var(--ink); }
.project-row { width: 100%; display: grid; grid-template-columns: 42px minmax(0, 1fr) 120px 92px 18px; align-items: center; gap: 13px; border: 0; border-bottom: 1px solid var(--line); padding: 18px 5px; background: transparent; cursor: pointer; text-align: left; }
.project-row:hover { background: rgba(255,255,255,.45); }
.project-index { color: var(--faint); font: 400 12px Georgia, serif; }
.project-name { overflow: hidden; }
.project-name strong { display: block; overflow: hidden; font: 500 14px/1.3 Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.project-name small { color: var(--muted); font-size: 10px; }
.visibility { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; text-transform: capitalize; }
.visibility::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #a6aca8; }
.visibility.public::before { background: #71a954; }
.source-kind { color: var(--muted); font-size: 10px; }
.row-arrow { color: var(--faint); }
.insight-card { position: relative; overflow: hidden; min-height: 315px; border-radius: 10px; padding: 26px; background: var(--forest); color: #e9eee9; }
.insight-card::after { content: ""; position: absolute; right: -65px; bottom: -85px; width: 210px; height: 210px; border: 1px solid #536259; border-radius: 50%; box-shadow: 0 0 0 35px #26342d, 0 0 0 36px #46534c; }
.insight-card .eyebrow { color: #879289; }
.insight-card h3 { max-width: 230px; margin: 23px 0 12px; font: 400 27px/1.13 Georgia, serif; letter-spacing: -.025em; }
.insight-card p { max-width: 245px; color: #9ea9a1; font-size: 11px; }
.pulse-line { position: relative; z-index: 1; display: flex; align-items: end; gap: 6px; height: 70px; margin-top: 28px; }
.pulse-line i { width: 6px; border-radius: 4px 4px 0 0; background: var(--acid); opacity: .8; }
.empty-state { border: 1px dashed #cbd0c9; border-radius: 10px; padding: 52px 30px; text-align: center; }
.empty-symbol { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid #bdc4bd; border-radius: 50%; margin: 0 auto 18px; font: 28px Georgia, serif; }
.empty-state h3 { margin-bottom: 8px; font: 400 22px Georgia, serif; }
.empty-state p { max-width: 420px; margin: 0 auto 20px; color: var(--muted); font-size: 12px; }

.project-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.back-link { display: inline-flex; gap: 7px; margin-bottom: 24px; color: var(--muted); font-size: 11px; }
.project-header h1 { margin-bottom: 14px; font-size: clamp(34px, 4.2vw, 52px); }
.project-meta { display: flex; flex-wrap: wrap; gap: 9px 18px; color: var(--muted); font-size: 11px; }
.project-meta span { display: inline-flex; align-items: center; gap: 6px; }
.project-meta .repo-link { color: var(--ink); text-decoration: none; }
.project-meta .repo-link:hover { text-decoration: underline; }
.project-description { max-width: 640px; margin: -4px 0 14px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.project-actions { display: flex; align-items: end; gap: 8px; padding-bottom: 3px; }
.project-tabs { display: flex; gap: 29px; margin: 25px 0 31px; border-bottom: 1px solid var(--line); }
.tab { position: relative; border: 0; padding: 0 0 13px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 650; }
.tab.active { color: var(--ink); }
.tab.active::after { content: ""; position: absolute; inset: auto 0 -1px; height: 2px; background: var(--ink); }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .65fr); gap: 27px; }
.panel { border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.38); }
.panel-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 17px 20px; }
.panel-header h3 { margin: 0; font: 400 18px Georgia, serif; }
.claim-card { padding: 20px; border-bottom: 1px solid var(--line); }
.claim-card:last-child { border-bottom: 0; }
.claim-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 10px; }
.claim-state { border-radius: 20px; padding: 4px 8px; background: #eceee9; color: #69716c; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.claim-state.published { background: var(--acid-soft); color: #4f6813; }
.claim-card p { margin-bottom: 12px; font: 400 16px/1.45 Georgia, serif; }
.claim-foot { display: flex; flex-wrap: wrap; gap: 15px; color: var(--muted); font-size: 9px; }
.revision-stack { padding: 18px 20px; }
.revision { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding-bottom: 20px; }
.revision:last-child { padding-bottom: 0; }
.revision::before { content: ""; position: absolute; left: 5px; top: 12px; bottom: -2px; width: 1px; background: var(--line); }
.revision:last-child::before { display: none; }
.revision-dot { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 3px; border: 2px solid var(--surface); border-radius: 50%; background: var(--rust); box-shadow: 0 0 0 1px var(--rust); }
.revision strong { display: block; font-size: 11px; }
.revision small { color: var(--muted); font-size: 9px; }
.provenance-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.provenance-row:last-child { border-bottom: 0; }
.event-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: #e9ede7; font-size: 12px; }
.provenance-row strong { display: block; font-size: 11px; }
.provenance-row p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.provenance-row time { color: var(--faint); font-size: 9px; }
.code-fragment { overflow: hidden; color: var(--faint); font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }

.modal { width: min(560px, calc(100vw - 28px)); max-width: none; border: 0; border-radius: 12px; padding: 0; background: transparent; box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(20, 28, 24, .58); backdrop-filter: blur(3px); }
.modal-wide { width: min(680px, calc(100vw - 28px)); }
/* A wide form needs a dialog as wide as itself, or the dialog scrolls sideways. */
.modal:has(> .modal-wide) { width: min(680px, calc(100vw - 28px)); }
.modal-card { position: relative; display: grid; gap: 18px; margin: 0; border-radius: 12px; padding: 37px; background: var(--surface); }
.modal-card h2 { margin: -7px 0 -10px; font: 400 31px/1.1 Georgia, serif; letter-spacing: -.03em; }
.modal-card > p { margin-bottom: 3px; color: var(--muted); font-size: 12px; }
.modal-kicker { color: var(--rust); font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.modal-close { position: absolute; top: 15px; right: 16px; width: 29px; height: 29px; border: 0; border-radius: 50%; background: #ecece7; cursor: pointer; font-size: 18px; }
label { display: grid; gap: 7px; color: #58605b; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
input, select, textarea { width: 100%; border: 1px solid #d5d8d1; border-radius: 7px; outline: none; padding: 11px 12px; background: #fff; color: var(--ink); font-size: 12px; letter-spacing: 0; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #738074; box-shadow: 0 0 0 3px rgba(113,128,116,.1); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid .full { grid-column: 1 / -1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 5px; }
code { border-radius: 4px; padding: 2px 4px; background: #e8eae5; font-size: .9em; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: 380px; border-radius: 8px; padding: 12px 16px; background: var(--forest); color: #fff; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(12px); transition: .22s ease; font-size: 11px; }
.toast.show { opacity: 1; transform: translateY(0); }

.chat-panel { position: sticky; top: 0; height: calc(100vh - 72px); display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; border-left: 1px solid var(--line); background: #f9f9f5; }
.chat-header { display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); padding: 18px 19px 15px; }
.copilot-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--forest); color: var(--acid); font-size: 15px; }
.chat-header > div:nth-child(2) { min-width: 0; flex: 1; display: grid; }
.chat-header strong { font: 500 14px Georgia, serif; }
.chat-header span { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; }
.chat-header i { width: 5px; height: 5px; border-radius: 50%; background: #70a84e; }
.chat-clear { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.chat-clear:hover { background: #fff; color: var(--ink); }
.chat-scope { overflow: hidden; border-bottom: 1px solid var(--line); padding: 9px 19px; color: #707873; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.chat-scope::before { content: "⌁"; margin-right: 6px; color: var(--rust); }
.chat-messages { overflow-y: auto; padding: 20px 18px; scrollbar-width: thin; }
.message { display: grid; grid-template-columns: 27px minmax(0, 1fr); gap: 9px; margin-bottom: 17px; }
.message-avatar { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 7px; background: var(--forest); color: var(--acid); font: 700 10px Georgia, serif; }
.message p { margin: 0; border: 1px solid var(--line); border-radius: 3px 11px 11px 11px; padding: 11px 12px; background: #fff; color: #4d5650; font-size: 11px; line-height: 1.55; }
.message small { display: block; margin: 5px 4px 0; color: var(--faint); font-size: 8px; }
.user-message { grid-template-columns: minmax(0, 1fr); padding-left: 38px; }
.user-message p { border: 0; border-radius: 11px 3px 11px 11px; background: var(--forest); color: #edf0ee; }
.message-sources { display: flex; flex-wrap: wrap; gap: 5px; margin: 7px 2px 0; }
.message-sources a { max-width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; padding: 4px 8px; background: #f7f8f3; color: #5c655f; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin: 3px 0 19px 36px; }
.chat-suggestions button { border: 1px solid #d5d9d2; border-radius: 20px; padding: 6px 9px; background: transparent; color: #667069; cursor: pointer; font-size: 9px; }
.chat-suggestions button:hover { border-color: #8e9991; background: #fff; }
.typing p { display: flex; gap: 4px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: #8e9790; animation: bounce .7s infinite alternate; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
.chat-form { margin: 0 17px; border: 1px solid #ccd1c9; border-radius: 10px; background: #fff; box-shadow: 0 5px 18px rgba(31,42,36,.05); }
.chat-form textarea { max-height: 100px; border: 0; padding: 11px 12px 5px; box-shadow: none; resize: none; }
.chat-form textarea:focus { box-shadow: none; }
.chat-form-footer { display: flex; align-items: center; justify-content: space-between; padding: 3px 7px 7px 12px; }
.chat-form-footer span { color: #a0a6a1; font-size: 7px; }
.chat-form-footer button { width: 27px; height: 27px; border: 0; border-radius: 7px; background: var(--forest); color: #fff; cursor: pointer; }
.chat-form-footer button:disabled { opacity: .4; }
.chat-disclaimer { margin: 8px 18px 13px; color: #a1a6a2; font-size: 7px; text-align: center; }

@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .sidebar { width: 210px; }
  .main-content { grid-column: 2; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .dashboard-grid, .workspace-grid { grid-template-columns: 1fr; }
  .insight-card { min-height: 250px; }
  .content-split { grid-template-columns: minmax(0, 1fr) 320px; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { width: min(290px, 85vw); transform: translateX(-105%); transition: transform .25s ease; box-shadow: var(--shadow); }
  body.menu-open .sidebar { transform: translateX(0); }
  .main-content { margin: 0; }
  .topbar { height: 62px; padding: 0 16px; }
  .content-split { display: block; min-height: calc(100vh - 62px); }
  .chat-panel { position: static; height: 620px; border-top: 1px solid var(--line); border-left: 0; }
  .mobile-only { display: grid; }
  .status-chip, .top-actions .icon-button { display: none; }
  .view { padding: 33px 18px 60px; }
  .hero { grid-template-columns: 1fr; }
  .date-block { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat { min-height: 95px; padding: 18px; }
  .project-row { grid-template-columns: 28px minmax(0, 1fr) 18px; }
  .project-row .visibility, .project-row .source-kind { display: none; }
  .project-header { grid-template-columns: 1fr; }
  .project-actions { align-items: center; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .modal-card { padding: 31px 22px 23px; }
}

/* Research chat workspace */
body { background: #fff; color: #202633; }
.app-shell { grid-template-columns: 236px minmax(0, 1fr); }
.sidebar { width: 236px; padding: 18px 11px 14px; border-right: 1px solid #e6eaf0; background: #fbfcfe; color: #202633; }
.brand { padding: 0 10px 22px; color: #151a23; font-family: Inter, ui-sans-serif, sans-serif; font-size: 20px; font-weight: 750; letter-spacing: -.035em; }
.brand svg { width: 30px; height: 30px; stroke: #635bdf; stroke-width: 2.6; }
.primary-nav { gap: 2px; }
.nav-item { height: 39px; border-radius: 7px; color: #4f5969; font-size: 13px; font-weight: 520; }
.nav-item:hover { background: #f1f5fb; color: #216fea; }
.nav-item.active { background: #eaf3ff; color: #176ff2; }
.nav-icon { color: currentColor; font-size: 16px; }
.nav-count { background: #e7ebf1; color: #687486; }
.sidebar-section { margin-top: 26px; padding: 0 4px; }
.sidebar-section .eyebrow { margin-left: 8px; color: #8c96a5; font-size: 9px; }
.recent-section { flex: 1; overflow-y: auto; }
.workspace-line { width: 100%; height: 36px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 7px; padding: 0 9px; background: transparent; color: #505a69; cursor: pointer; text-align: left; font-size: 12px; }
.workspace-line:hover { background: #f1f5fb; }
.workspace-line.is-active { background: #eef3fa; color: #1f2733; font-weight: 600; }
.workspace-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-mark { width: 20px; height: 20px; border-radius: 6px; background: #39b979; color: #fff; font-family: Inter, sans-serif; font-size: 9px; }
.workspace-mark.secondary { background: #eef1f5; color: #6a7482; }
.project-shortcut { padding: 8px 9px; color: #5a6472; font-size: 11px; }
.project-shortcut:hover { background: #eef4fc; color: #176ff2; }
.project-dot { width: 14px; height: 14px; display: grid; place-items: center; border: 0; border-radius: 3px; background: #edf0f5; }
.project-dot::after { content: "▧"; color: #6b7687; font-size: 9px; }
.sidebar-footer .nav-item { display: none; }
.identity-card { border: 0; background: transparent; color: #2c3440; }
.identity-card:hover { background: #f1f5fb; }
.avatar { background: linear-gradient(145deg, #2d405a, #7ba7c9); color: #fff; }
.identity-copy small { color: #85909f; }
.main-content { background: #fff; }
.topbar { height: 58px; gap: 15px; border-bottom-color: #e5e9ef; padding: 0 16px 0 20px; background: rgba(255,255,255,.96); }
.research-title { min-width: 260px; display: flex; align-items: center; gap: 9px; }
.mini-brand { width: 25px; height: 25px; display: grid; place-items: center; color: #635bdf; }
.mini-brand svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.research-title > div { min-width: 0; display: grid; }
.research-title strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.research-title small { color: #788392; font-size: 9px; }
.research-title .chevron { color: #8e98a6; font-size: 11px; }
.research-tabs { height: 100%; display: flex; align-items: center; gap: 3px; margin: 0 auto; }
.research-tabs > * { display: inline-flex; align-items: center; height: 36px; border: 0; border-radius: 7px; padding: 0 14px; background: transparent; color: #667181; cursor: pointer; font-size: 10px; }
.research-tabs a:hover { background: #f5f7fa; }
.research-tabs .active { position: relative; background: #f8fbff; color: #176ff2; font-weight: 700; }
.research-tabs .active::after { content: ""; position: absolute; inset: auto 10px -11px; height: 2px; background: #4491ff; }
.top-actions { flex: 0 0 auto; }
.top-actions .button { height: 34px; padding: 0 13px; white-space: nowrap; }
.button-primary { background: #1473f6; color: #fff; box-shadow: 0 3px 9px rgba(20,115,246,.22); }
.button-primary:hover { background: #0865e2; }
.content-split { min-height: calc(100vh - 58px); }
.content-split.research-chat-layout { grid-template-columns: minmax(520px, 1fr) 384px; }
.content-split.dashboard-layout { display: block; }
.content-split.dashboard-layout .chat-panel { display: none; }
.content-split.dashboard-layout .view { max-width: 1360px; }
.content-split.research-chat-layout .view { max-width: none; height: calc(100vh - 58px); padding: 0; }

.chat-stage { height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; background: #fff; }
.main-chat-scroll { overflow-y: auto; padding: 28px clamp(32px, 6vw, 90px) 22px; scroll-behavior: smooth; }
.main-chat-inner { width: min(820px, 100%); margin: 0 auto; }
.chat-day { margin: 4px 0 24px; color: #9aa3b0; font-size: 9px; text-align: center; }
.main-message { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 13px; margin-bottom: 24px; }
.main-message.user { grid-template-columns: 32px minmax(0, 1fr); }
.main-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #2d405a, #7ba7c9); color: #fff; font-size: 10px; font-weight: 750; }
.main-avatar.ai { border-radius: 9px; background: #eeeaff; color: #6757dc; font: 700 15px Georgia, serif; }
.main-message-content { min-width: 0; }
.main-message.user .main-message-content { border-radius: 6px 15px 15px 15px; padding: 12px 15px; background: #f2f7fd; color: #354152; font-size: 12px; }
.main-message-content > p { margin: 0 0 11px; color: #465161; font-size: 12px; line-height: 1.6; }
.main-message-content > p:last-child { margin-bottom: 0; }
.answer-heading { margin: 4px 0 16px; color: #1e2733; font-size: 16px; font-weight: 720; }
.contribution-list { display: grid; gap: 15px; margin: 0 0 21px; }
.contribution-item { display: grid; grid-template-columns: 27px 1fr; gap: 11px; }
.number-badge { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #dcecff; color: #176ff2; font-size: 10px; font-weight: 750; }
.contribution-item strong { display: block; margin: 1px 0 2px; font-size: 12px; }
.contribution-item p { margin: 0; color: #596474; font-size: 11px; line-height: 1.5; }
.architecture-card { border: 1px solid #dde4ed; border-radius: 10px; padding: 18px; background: #fff; }
.architecture-card h3 { margin: 0 0 18px; font: 650 14px Inter, sans-serif; }
.architecture-flow { display: grid; grid-template-columns: 90px 22px 1fr 22px 90px; align-items: center; gap: 7px; }
.arch-box { min-height: 65px; display: grid; place-items: center; border: 1px solid #cfe0f5; border-radius: 8px; padding: 9px; background: #eff7ff; color: #31577f; font-size: 10px; font-weight: 650; text-align: center; }
.arch-box.purple { border-color: #d9cffb; background: #f2eeff; color: #6748b8; }
.arch-box.green { border-color: #caebdc; background: #edfbf4; color: #287657; }
.arch-core { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; border: 1px solid #cfe0f5; border-radius: 9px; padding: 12px; }
.arch-core > strong { grid-column: 1/-1; color: #435369; font-size: 9px; text-align: center; }
.arch-core .arch-box:first-of-type { border-color: #f2d0d4; background: #fff0f1; color: #9b4a53; }
.arch-core .arch-box:last-child { border-color: #f0dda8; background: #fff8df; color: #7e6728; }
.arch-arrow { color: #788696; text-align: center; }
.architecture-card > small { display: block; margin-top: 12px; color: #8b95a3; font-size: 8px; }
.answer-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.answer-actions button { border: 1px solid #e0e5ec; border-radius: 6px; padding: 7px 10px; background: #fff; color: #5f6b7b; cursor: pointer; font-size: 9px; }
.answer-actions button:hover { border-color: #a9c7ec; color: #176ff2; }
.main-composer-wrap { border-top: 1px solid #eef1f5; padding: 10px clamp(32px, 6vw, 90px) 16px; background: rgba(255,255,255,.97); }
.main-composer { width: min(820px, 100%); margin: 0 auto; border: 1px solid #d4dfed; border-radius: 11px; background: #fff; box-shadow: 0 4px 16px rgba(31,54,81,.06); }
.main-composer textarea { min-height: 45px; max-height: 110px; border: 0; padding: 12px 14px 5px; box-shadow: none; resize: none; font-size: 11px; }
.main-composer textarea:focus { box-shadow: none; }
.composer-controls { display: flex; align-items: center; gap: 7px; padding: 4px 7px 8px; }
.composer-tool { height: 29px; border: 1px solid #e2e7ed; border-radius: 6px; padding: 0 9px; background: #fff; color: #657180; cursor: pointer; font-size: 9px; }
.composer-spacer { flex: 1; }
.composer-send { width: 31px; height: 31px; border: 0; border-radius: 7px; background: #78aef7; color: #fff; cursor: pointer; font-size: 15px; }
.composer-note { margin: 6px 0 0; color: #a2a9b3; font-size: 7px; text-align: center; }
.empty-chat { min-height: 54vh; display: grid; place-items: center; text-align: center; }
.empty-chat-inner { max-width: 560px; }
.empty-chat-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; margin: 0 auto 18px; background: #eeeaff; color: #6557dc; font: 700 25px Georgia, serif; }
.empty-chat h1 { margin-bottom: 9px; font: 650 28px/1.2 Inter, sans-serif; letter-spacing: -.035em; }
.empty-chat p { color: #7a8492; font-size: 12px; }
.starter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 24px; }
.starter-grid button { min-height: 58px; border: 1px solid #e0e5ec; border-radius: 9px; padding: 10px 12px; background: #fff; color: #586474; cursor: pointer; font-size: 10px; text-align: left; }
.starter-grid button:hover { border-color: #a9c8ef; background: #f8fbff; color: #176ff2; }

.content-split.research-chat-layout .chat-panel { position: sticky; top: 0; height: calc(100vh - 58px); display: block; overflow-y: auto; border-left: 1px solid #e5e9ef; background: #fcfdff; }
.context-tabs { position: sticky; top: 0; z-index: 2; height: 45px; display: flex; border-bottom: 1px solid #e5e9ef; background: rgba(252,253,255,.96); }
.context-tabs > * { display: grid; place-items: center; flex: 1; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #778291; cursor: pointer; font-size: 9px; }
.context-tabs .active { border-bottom-color: #4a94fb; color: #176ff2; font-weight: 700; }
.context-body { padding: 17px 16px 30px; }
.context-section { margin-bottom: 24px; }
.context-section h3 { margin-bottom: 11px; font: 700 11px Inter, sans-serif; }
.paper-card { display: grid; grid-template-columns: 58px 1fr; gap: 11px; }
.paper-thumb { height: 73px; display: grid; place-items: center; border: 1px solid #e0e5eb; border-radius: 7px; background: #fff; color: #ea4f54; font: 700 9px Georgia, serif; box-shadow: 0 2px 7px rgba(31,42,54,.05); }
.paper-card strong { display: block; margin: 2px 0 3px; font-size: 11px; }
.paper-card p { margin: 0 0 7px; color: #7b8593; font-size: 9px; }
.context-badges { display: flex; gap: 5px; }
.context-badges span { border-radius: 12px; padding: 3px 7px; background: #eaf3ff; color: #3f77b6; font-size: 7px; }
.context-badges span:first-child { background: #fff1e4; color: #b56b2d; }
.related-list, .next-list { display: grid; gap: 5px; }
.related-item, .next-item { width: 100%; display: grid; grid-template-columns: 27px 1fr auto; align-items: center; gap: 9px; border: 0; border-radius: 7px; padding: 7px; background: transparent; color: #445061; cursor: pointer; text-align: left; }
.related-item:hover, .next-item:hover { background: #f2f6fb; }
.related-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 6px; background: #f0f3f7; color: #667486; }
.related-item strong { display: block; font-size: 10px; }
.related-item small { display: block; color: #9099a5; font-size: 8px; }
.related-item > span:last-child { color: #9aa3af; }
.source-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: start; padding: 7px 0; }
.source-number { width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; background: #f1f4f7; color: #687485; font-size: 8px; }
.source-row strong { display: block; font-size: 9px; }
.source-row small { color: #8a94a2; font-size: 8px; }
.source-type { border-radius: 10px; padding: 3px 7px; background: #ffe7e8; color: #ad5f63; font-size: 7px; }
.next-item { grid-template-columns: 26px 1fr; border: 1px solid #e4e8ee; padding: 8px 9px; color: #5b6676; font-size: 9px; }
.next-item .related-icon { width: 22px; height: 22px; background: transparent; color: #6f5ce7; }

@media (max-width: 1180px) {
  .research-tabs > * { padding: 0 8px; }
  .content-split.research-chat-layout { grid-template-columns: minmax(480px, 1fr) 320px; }
  .research-title { min-width: 200px; }
}

@media (max-width: 920px) {
  .app-shell { display: block; }
  .sidebar { width: min(290px, 85vw); transform: translateX(-105%); transition: transform .25s ease; box-shadow: var(--shadow); }
  body.menu-open .sidebar { transform: translateX(0); }
  .main-content { margin: 0; }
  .topbar { height: 58px; padding: 0 12px; }
  .research-tabs, .research-title small, .top-actions .button-plain { display: none; }
  .research-title { min-width: 0; flex: 1; }
  .mobile-only { display: grid; }
  .content-split.research-chat-layout { display: block; }
  .content-split.research-chat-layout .chat-panel { display: none; }
  .content-split.research-chat-layout .view { height: calc(100vh - 58px); }
}

@media (max-width: 620px) {
  .main-chat-scroll { padding: 23px 16px 18px; }
  .main-composer-wrap { padding: 8px 12px 12px; }
  .architecture-flow { grid-template-columns: 1fr; }
  .arch-arrow { transform: rotate(90deg); }
  .starter-grid { grid-template-columns: 1fr; }
  .deep-toggle, .composer-tool:nth-of-type(2) { display: none; }
  .top-actions .button-primary { padding: 0 9px; font-size: 9px; }
}

/* Grounded research answers */
.cite { display: inline-grid; place-items: center; min-width: 22px; height: 16px; margin: 0 2px; border: 1px solid #c9dbf2; border-radius: 4px; padding: 0 4px; background: #f2f7fd; color: #176ff2; cursor: pointer; font-size: 9px; font-weight: 700; vertical-align: 1px; }
.cite:hover { border-color: #176ff2; }
.cite-none { color: var(--faint); font-size: 10px; font-style: italic; }
.proposal-card { margin: 12px 0; border: 1px solid #e0e5ec; border-radius: 10px; padding: 13px 15px; background: #fff; }
.proposal-card.plan { border-left: 3px solid var(--blue); }
.proposal-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.proposal-kind { margin-right: 4px; color: var(--ink); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.basis, .uncertainty { border-radius: 999px; padding: 2px 8px; font-size: 9px; font-weight: 650; }
.basis.cited { background: #e5f4ea; color: #2f6b45; }
.basis.inference { background: #fff1d6; color: #8a5a00; }
.basis.human { background: #e3eefc; color: #1f5fb8; }
.uncertainty.low { background: #e5f4ea; color: #2f6b45; }
.uncertainty.medium { background: #eef1f5; color: #4d5866; }
.uncertainty.high { background: #fde8e1; color: #9b3d1f; }
.proposal-statement { margin: 0 0 6px; color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.45; }
.proposal-detail { margin: 0 0 6px; color: #596474; font-size: 11px; line-height: 1.55; }
.proposal-cites { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-top: 8px; color: var(--faint); font-size: 10px; }
.proposal-cites > span:first-child { margin-right: 4px; }
.proposal-status { margin-top: 10px; border-top: 1px solid #eef1f4; padding-top: 8px; color: var(--muted); font-size: 10px; }
.plan-steps { margin: 6px 0 8px; padding-left: 18px; color: #465161; font-size: 11px; line-height: 1.6; }
.plan-list { margin-bottom: 6px; color: #596474; font-size: 11px; }
.plan-list strong { color: var(--ink); font-size: 10px; }
.plan-list ul { margin: 2px 0 0; padding-left: 18px; }
.grounding-warnings { margin: 10px 0; border-radius: 8px; padding: 8px 11px; background: #fff7e6; color: #7a5200; font-size: 10px; }
.grounding-warnings p { margin: 0; }
.source-legend { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.source-legend button { max-width: 100%; overflow: hidden; border: 1px solid #e0e5ec; border-radius: 6px; padding: 5px 8px; background: #fff; color: #5f6b7b; cursor: pointer; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.source-legend button b { color: #176ff2; }
.ai-footnote { margin-top: 10px !important; color: var(--faint) !important; font-size: 10px !important; }

.proposal-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.proposal-actions { display: inline-flex; gap: 5px; }
.decide { border: 1px solid #e0e5ec; border-radius: 6px; padding: 5px 9px; background: #fff; color: #4d5866; cursor: pointer; font-size: 10px; font-weight: 600; }
.decide:hover { border-color: var(--ink); color: var(--ink); }
.decide.approve:hover { border-color: #2f6b45; color: #2f6b45; }
.decide.reject:hover { border-color: #9b3d1f; color: #9b3d1f; }
.proposal-status.decided b { text-transform: capitalize; }
.proposal-status.approved b { color: #2f6b45; }
.proposal-status.revised b { color: #176ff2; }
.proposal-status.rejected b { color: #9b3d1f; }
.decision-reason { flex-basis: 100%; color: #596474; font-style: italic; }
.revised-block { margin-top: 10px; border-left: 3px solid #176ff2; border-radius: 0 8px 8px 0; padding: 8px 11px; background: #f2f7fd; color: #354152; font-size: 11px; }
.revised-block p { margin: 0 0 4px; }
.revised-block ol { margin: 4px 0 0; padding-left: 18px; }
.proposal-list { padding: 16px 20px 8px; }
.panel-note { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
#decisionRevise label { margin-top: 12px; }

/* Contribution timeline */
.timeline { padding: 16px 20px 6px; }
.chain-banner { margin-bottom: 10px; border-radius: 8px; padding: 9px 12px; font-size: 12px; }
.chain-banner.valid { background: #e5f4ea; color: #2f6b45; }
.chain-banner.broken { background: #fde8e1; color: #9b3d1f; font-weight: 600; }
.timeline-event { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); transition: background .4s; }
.timeline-event:last-child { border-bottom: 0; }
.timeline-event.flash { background: var(--acid-soft); }
.timeline-dot { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #eef1f5; color: #4d5866; font-size: 12px; }
.timeline-event.agent .timeline-dot { background: #ede7ff; color: #6a4fd6; }
.timeline-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; font-size: 13px; }
.timeline-head strong { text-transform: capitalize; }
.timeline-head time { margin-left: auto; color: var(--faint); font-size: 11px; }
.timeline-seq { color: var(--faint); font-size: 11px; font-weight: 700; }
.timeline-target { color: var(--muted); font-size: 12px; }
.timeline-actor { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); font-size: 11px; }
.dot-sep { color: var(--faint); }
.actor-chip { border-radius: 999px; padding: 1px 8px; font-size: 10px; font-weight: 650; text-transform: capitalize; }
.actor-chip.human { background: #eef1f5; color: #354152; }
.actor-chip.agent { background: #ede7ff; color: #5a3fc4; }
.timeline-reason { margin: 8px 0 0; color: var(--ink); font-size: 12px; line-height: 1.5; }
.timeline-evidence { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 8px; color: var(--faint); font-size: 10px; }
.timeline-evidence > span:first-child { margin-right: 2px; }
.timeline-evidence.none { font-style: italic; }
.evidence-chip { max-width: 320px; overflow: hidden; border: 1px solid #e0e5ec; border-radius: 6px; padding: 3px 8px; background: #fff; color: #354152; cursor: pointer; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.evidence-chip:hover { border-color: #176ff2; color: #176ff2; }
.evidence-chip.plain { cursor: default; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.evidence-chip.plain:hover { border-color: #e0e5ec; color: var(--muted); }
.inline-link { border: 0; padding: 0; background: none; color: #176ff2; cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 2px; }
.timeline-link { margin-top: 8px; font-size: 11px; }
.timeline-link.corrects { color: #176ff2; }
.timeline-link.superseded-note { color: #8a5a00; }
.timeline-event.superseded .timeline-head strong, .timeline-event.superseded .timeline-reason { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(138, 90, 0, .45); }
.timeline-event.superseded .timeline-dot { opacity: .5; }
.timeline-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.timeline-foot .text-link { margin-left: auto; }

/* Paper diff */
.paper-diff-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 16px; }
.paper-diff-body { padding: 16px 20px; }
.version-list { display: grid; gap: 6px; margin-bottom: 14px; }
.version-row { display: grid; grid-template-columns: minmax(90px, auto) 1fr auto; gap: 4px 12px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: #fff; font-size: 11px; color: var(--muted); }
.version-row > span:nth-child(3) { grid-column: 2; }
.version-row .text-link { grid-column: 3; grid-row: 1 / span 2; }
.version-label { color: var(--ink); font-weight: 650; font-size: 12px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.inline-form label { display: grid; gap: 4px; flex: 1 1 160px; color: var(--muted); font-size: 11px; }
.inline-form input, .inline-form select { border: 1px solid var(--line); border-radius: 7px; padding: 8px 9px; background: #fff; color: var(--ink); font-size: 12px; }
.form-hint { margin: 8px 0 0; color: var(--faint); font-size: 11px; }
.saved-diffs { display: grid; gap: 6px; margin-top: 14px; }
.saved-diff { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; background: #fff; text-align: left; cursor: pointer; font-size: 11px; color: var(--muted); }
.saved-diff strong { color: var(--ink); font-size: 12px; }
.saved-diff:hover { border-color: var(--ink); }
.diff-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.diff-stats span { border-radius: 999px; padding: 4px 11px; background: #eef1f5; color: #4d5866; font-size: 11px; }
.diff-stats .added { background: #e5f4ea; color: #2f6b45; }
.diff-stats .removed { background: #fde8e1; color: #9b3d1f; }
.interpretation-panel { margin-bottom: 18px; border: 1px solid #d9d0fb; border-radius: 10px; padding: 14px 16px; background: #faf8ff; }
.interpretation-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.interpretation-model { margin-left: auto; color: var(--faint); font-size: 10px; }
.interpretation-overview { margin: 0 0 10px; color: var(--ink); font-size: 13px; line-height: 1.55; }
.interpretation-item { border-top: 1px solid #e8e2fd; padding: 10px 0 4px; }
.area-chip { border-radius: 999px; padding: 2px 8px; font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.area-chip.claims { background: #ede7ff; color: #5a3fc4; }
.area-chip.methods { background: #e3eefc; color: #1f5fb8; }
.area-chip.results { background: #fff1d6; color: #8a5a00; }
.area-chip.conclusions { background: #e5f4ea; color: #2f6b45; }
.area-chip.other { background: #eef1f5; color: #4d5866; }
.diff-section { margin-top: 16px; }
.diff-section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.section-status { border-radius: 999px; padding: 1px 8px; background: #eef1f5; color: #4d5866; font-size: 10px; }
.section-status.added { background: #e5f4ea; color: #2f6b45; }
.section-status.removed { background: #fde8e1; color: #9b3d1f; }
.section-renamed { color: var(--faint); font-size: 11px; }
.change-card { margin-bottom: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; transition: background .4s; }
.change-card.flash { background: var(--acid-soft); }
.change-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.change-id { color: var(--faint); font-size: 10px; font-weight: 700; }
.change-kind { border-radius: 999px; padding: 1px 8px; font-size: 9px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; background: #eef1f5; color: #4d5866; }
.change-kind.added { background: #e5f4ea; color: #2f6b45; }
.change-kind.removed { background: #fde8e1; color: #9b3d1f; }
.change-kind.editorial { background: #f4f4ef; color: var(--faint); }
.change-columns { display: grid; grid-template-columns: 1fr 1fr; }
.change-side { min-width: 0; padding: 10px 12px; }
.change-side + .change-side { border-left: 1px solid var(--line); }
.side-label { display: block; margin-bottom: 4px; color: var(--faint); font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.change-side p { margin: 0; color: #354152; font-size: 12px; line-height: 1.6; white-space: pre-line; }
.change-side .side-empty { color: var(--faint); font-style: italic; }
.change-card.added .after { background: #f5fbf7; }
.change-card.removed .before { background: #fdf6f3; }
mark.del { border-radius: 3px; background: #fbd5c8; color: #7a2a12; text-decoration: line-through; text-decoration-color: rgba(122, 42, 18, .5); }
mark.ins { border-radius: 3px; background: #cdeed8; color: #1d5434; }
@media (max-width: 760px) {
  .change-columns { grid-template-columns: 1fr; }
  .change-side + .change-side { border-left: 0; border-top: 1px solid var(--line); }
  .version-row { grid-template-columns: 1fr; }
  .version-row > span:nth-child(3), .version-row .text-link { grid-column: 1; grid-row: auto; }
}

/* Experiments */
.experiment-card { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fff; }
.experiment-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.experiment-head strong { display: block; font-size: 14px; }
.experiment-head span { color: var(--muted); font-size: 11px; }
.experiment-fields { display: grid; grid-template-columns: 90px 1fr; gap: 4px 10px; margin: 0; font-size: 11px; }
.experiment-fields dt { color: var(--faint); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; font-size: 9px; padding-top: 2px; }
.experiment-fields dd { margin: 0; color: #354152; white-space: pre-line; }
.comparability { margin-bottom: 14px; border-radius: 10px; padding: 12px 14px; font-size: 12px; }
.comparability strong { display: block; margin-bottom: 4px; font-size: 13px; }
.comparability ul { margin: 6px 0; padding-left: 18px; }
.comparability li { margin-bottom: 3px; }
.comparability li b { text-transform: capitalize; margin-right: 4px; }
.comparability.not_comparable { background: #fde8e1; color: #7a2a12; }
.comparability.limited { background: #fff1d6; color: #6b4600; }
.comparability.comparable { background: #e5f4ea; color: #2f6b45; }
.comparability li.info { opacity: .8; }
.rule-note { display: block; opacity: .75; font-size: 10px; }
.field-name { font-size: 12px; }
.field-explanation { margin: 0; padding: 8px 12px 0; color: #465161; font-size: 12px; }
.change-kind.changed { background: #e3eefc; color: #1f5fb8; }

/* Independent reproduction results and evidence-aware claim revisions */
.reproducibility-panel { margin-top: 22px; }
.reproducibility-panel .panel-header { align-items: flex-start; gap: 20px; }
.reproducibility-panel .panel-header p { max-width: 720px; margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.repro-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(360px, 1.2fr); gap: 0; }
.repro-layout > div { min-width: 0; padding: 20px; }
.repro-layout > div + div { border-left: 1px solid var(--line); }
.section-label { margin: 0 0 14px; color: var(--faint); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.reproduction-form { display: grid; gap: 14px; }
.repro-group { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 15px; background: #fff; }
.repro-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.repro-heading h4 { margin: 4px 0 0; font: 400 15px/1.4 Georgia, serif; }
.agreement { flex: 0 0 auto; border-radius: 999px; padding: 3px 8px; background: #eef1f5; color: #4d5866; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.agreement.consistent_support, .agreement.qualified_support { background: #e5f4ea; color: #2f6b45; }
.agreement.mixed, .agreement.consistent_non_support { background: #fde8e1; color: #8f392d; }
.repro-headline { margin: 10px 0 8px; color: #465161; font-size: 11px; }
.result-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.result-chip { display: inline-flex; width: fit-content; border-radius: 999px; padding: 2px 7px; background: #eef1f5; color: #4d5866; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.result-chip.supported, .result-chip.partially_reproduced { background: #e5f4ea; color: #2f6b45; }
.result-chip.not_reproduced, .result-chip.contradicted { background: #fde8e1; color: #8f392d; }
.submission-list { display: grid; gap: 7px; margin: 12px 0; padding: 0; list-style: none; }
.submission-list li { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 8px; border-top: 1px solid var(--line); padding-top: 7px; font-size: 10px; }
.submission-list small { grid-column: 2; overflow-wrap: anywhere; color: var(--muted); }
.revision-proposal { display: grid; gap: 10px; margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 14px; }
.repro-disclaimer { margin: 0; border-top: 1px solid var(--line); padding: 11px 20px; color: var(--faint); font-size: 9px; }
.claim-revision { display: grid; gap: 3px; margin: 8px 0; border-left: 2px solid var(--rust); padding-left: 10px; }
.claim-revision span { color: var(--faint); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.claim-revision p { margin: 0 0 5px; font: 400 12px/1.4 Georgia, serif; }
.submission-evidence { display: flex !important; align-items: center; gap: 6px; }
.repro-all { border-top: 1px solid var(--line); padding: 20px; }
.results-filters { align-items: end; margin-bottom: 10px; }
.table-scroll { overflow-x: auto; }
.results-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.results-table th, .results-table td { border-bottom: 1px solid var(--line); padding: 7px 8px; text-align: left; vertical-align: top; }
.results-table thead th { color: var(--faint); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.results-table tr[hidden] { display: none; }
.result-comparison { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.repro-findings { margin-top: 10px; font-size: 11px; }
.repro-findings summary { cursor: pointer; color: #465161; font-weight: 600; }
.finding-list { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.finding { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: baseline; font-size: 11px; }
.finding small { display: block; }
.finding-severity { border-radius: 999px; padding: 1px 7px; background: #eef1f5; color: #4d5866; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.finding.high .finding-severity { background: #fde8e1; color: #8f392d; }
.finding.medium .finding-severity { background: #fff3d6; color: #7a5410; }
@media (max-width: 900px) {
  .repro-layout { grid-template-columns: 1fr; }
  .repro-layout > div + div { border-top: 1px solid var(--line); border-left: 0; }
}

/* Paper explanations */
.arxiv-form { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.explain-panel, .paper-explanation { margin-bottom: 16px; }
.explain-points { list-style: none; padding-left: 0; }
.explain-points li { margin-bottom: 8px; }
.explain-points .area-chip { margin-right: 4px; }
.explain-heading { margin: 14px 0 6px; font: 400 15px Georgia, serif; }
.explain-glossary { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 6px 14px; margin: 0 0 12px; font-size: 12px; }
.explain-glossary dt { color: var(--ink); font-weight: 650; }
.explain-glossary dd { margin: 0; color: #354152; }
.explain-on-import { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 16px; }
.explain-on-import > label:not(.checkbox-label) { flex: 0 1 200px; }
.explain-on-import .checkbox-label { flex: 1 1 260px !important; font-weight: 500; letter-spacing: 0; }
.explain-on-import input[type="checkbox"] { width: auto; }
@media (max-width: 640px) { .explain-glossary { grid-template-columns: 1fr; } .explain-glossary dd { margin-bottom: 6px; } }
.change-kind.reworded { background: #f4f4ef; color: var(--faint); }

/* Research Passport */
.checkbox-label { display: flex !important; flex: 0 0 auto !important; align-items: center; gap: 6px; padding-bottom: 9px; color: var(--ink) !important; font-size: 12px !important; }
.passport-status { border-radius: 999px; padding: 2px 9px; background: #fff1d6; color: #8a5a00; font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.passport-status.approved { background: #e5f4ea; color: #2f6b45; }
.passport-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.passport-heading { margin: 18px 0 8px; font: 400 15px Georgia, serif; }
.passport-contributors { display: flex; flex-wrap: wrap; gap: 6px; }
.passport-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; border-bottom: 1px solid var(--line); padding: 7px 0; font-size: 12px; }
.passport-decision { color: var(--muted); font-size: 11px; white-space: nowrap; }
@media (max-width: 760px) { .passport-row { grid-template-columns: 1fr; } .passport-decision { white-space: normal; } }
.basis.rejected { background: #fde8e1; color: #9b3d1f; }
.interpretation-panel .proposal-status { margin-top: 12px; }
.experiment-head .button { flex: 0 0 auto; white-space: nowrap; }
.passport-contributors .actor-chip { text-transform: none; }

/* Unavailable features: visibly planned, never a dead click */
.is-disabled, .is-disabled:hover { opacity: .45; cursor: not-allowed; background: transparent !important; }
.nav-soon { margin-left: auto; border-radius: 999px; padding: 1px 6px; background: #eef1f5; color: #7a8492; font-size: 9px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
a.related-item { text-decoration: none; }

/* Version history */
.history-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 14px 20px 0; }
.history-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.filter-chip { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; background: #fff; color: #4d5866; cursor: pointer; font-size: 11px; }
.filter-chip span { margin-left: 3px; color: var(--faint); }
.filter-chip.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.filter-chip.active span { color: #c9cfcb; }
.filter-chip:disabled { opacity: .4; cursor: default; }
.compare-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 20px 0; border: 1px dashed #c9dbf2; border-radius: 8px; padding: 8px 12px; background: #f6faff; color: #4d5866; font-size: 12px; }
.compare-bar > span { flex: 1 1 240px; }
.history-list { padding: 4px 20px 12px; }
.history-day { margin: 18px 0 6px; color: var(--faint); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.history-item { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; border-bottom: 1px solid var(--line); padding: 11px 0; }
.history-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: #eef1f5; color: #4d5866; font-size: 13px; }
.history-item.agent .history-icon { background: #ede7ff; color: #6a4fd6; }
.history-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; font-size: 13px; }
.history-head time { margin-left: auto; color: var(--faint); font-size: 11px; }
.history-body p { margin: 3px 0 6px; color: #596474; font-size: 12px; line-height: 1.5; }
.history-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); font-size: 11px; }
.history-select { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: #1f5fb8; cursor: pointer; }
.history-status { border-radius: 999px; padding: 1px 8px; background: #eef1f5; color: #4d5866; font-size: 10px; text-transform: capitalize; }
.history-status.approved, .history-status.published, .history-status.approve, .history-status.merged, .history-status.supported { background: #e5f4ea; color: #2f6b45; }
.history-status.rejected, .history-status.reject, .history-status.contradicted, .history-status.not_reproduced { background: #fde8e1; color: #9b3d1f; }
.history-status.revise, .history-status.revised, .history-status.partially_reproduced { background: #e3eefc; color: #1f5fb8; }
.history-status.inconclusive, .history-status.unassessed { background: #eef1f5; color: #4d5866; }
.history-status.ai_generated, .history-status.proposed, .history-status.draft { background: #fff1d6; color: #8a5a00; }
@media (max-width: 760px) {
  .history-head time, .history-select { margin-left: 0; }
}
/* Eight project tabs do not fit a phone; scroll them sideways inside the row. */
.project-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.project-tabs::-webkit-scrollbar { display: none; }
.project-tabs .tab { flex: 0 0 auto; white-space: nowrap; }

/* Why This Changed */
.why-slot { border-top: 1px solid var(--line); padding: 8px 12px; }
.why-button { border: 0; padding: 0; background: none; color: #6a4fd6; cursor: pointer; font-size: 11px; font-weight: 650; }
.why-button:hover { text-decoration: underline; }
.why-button:disabled { color: var(--faint); cursor: progress; text-decoration: none; }
.why-box { border-radius: 8px; padding: 10px 12px; background: #faf8ff; }
.why-unexplained { margin: 4px 0 8px; border-radius: 6px; padding: 7px 10px; background: #fff1d6; color: #6b4600; font-size: 12px; font-weight: 600; }
.why-statements { margin: 4px 0 8px; padding-left: 18px; color: #354152; font-size: 12px; line-height: 1.6; }
.why-evidence { margin: 6px 0; color: #596474; font-size: 11px; }
.why-evidence summary { cursor: pointer; color: var(--muted); }
.why-evidence ol { margin: 6px 0 0; padding-left: 18px; }
.why-evidence li { margin-bottom: 4px; }
.why-evidence li span { color: #354152; }
.interpretation-panel + .why-slot { margin: -10px 0 16px; border: 1px solid #e8e2fd; border-top: 0; border-radius: 0 0 10px 10px; }

/* Learning pages */
.share-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; border-radius: 8px; padding: 10px 12px; background: #e5f4ea; color: #2f6b45; font-size: 12px; }
.share-box a { color: #1d5434; font-weight: 650; word-break: break-all; }
.learn-statements { margin: 0 0 8px; padding-left: 18px; color: #354152; font-size: 13px; line-height: 1.6; }
.learn-statements li { margin-bottom: 4px; }
.learn-edit-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; margin-bottom: 8px; }
.learn-edit-row textarea { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; font-size: 13px; line-height: 1.5; resize: vertical; }
.learn-edit-cites { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding-top: 6px; }
.learn-title { display: grid; gap: 4px; margin: 4px 0 10px; color: var(--muted); font-size: 11px; }
.learn-title input { border: 1px solid var(--line); border-radius: 7px; padding: 8px 9px; font-size: 14px; }
.learn-glossary dt { font-weight: 650; font-size: 13px; }
.learn-glossary dd { margin: 0 0 8px; color: #596474; font-size: 12px; }
@media (max-width: 760px) { .learn-edit-row { grid-template-columns: 1fr; } }

/* Claims, research PRs, team */
.claim-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.claim-actions:empty { display: none; }
.assessment-list { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.assessment-row { margin-bottom: 6px; font-size: 12px; color: #354152; }
.workspace-grid > aside { display: grid; gap: 16px; align-content: start; }
.pr-list { padding: 8px 16px 12px; }
.pr-row { display: grid; gap: 3px; border-bottom: 1px solid var(--line); padding: 10px 0; font-size: 12px; }
.pr-row:last-child { border-bottom: 0; }
.pr-row > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pr-row small { color: var(--muted); font-size: 11px; }
.pr-review.approve { color: #2f6b45; }
.pr-review.request_changes { color: #9b3d1f; }
.pr-row .proposal-actions { margin-top: 6px; }
.history-status.open { background: #fff1d6; color: #8a5a00; }
.team-list { margin: 8px 0 16px; padding: 0; list-style: none; }
.team-list li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 7px 0; font-size: 13px; }
#inviteForm[hidden] { display: none; }
#aiKeyForm .button[hidden], #aiKeyForm label[hidden] { display: none; }

.revision-comparison { margin-bottom: 18px; }
.revision-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.revision-list > li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.revision-evidence { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.revision-evidence p { margin: 4px 0 0; }
.version-picker { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; display: grid; gap: 8px; }
.version-picker legend { font-size: 12px; font-weight: 600; padding: 0 4px; }

/* Paper reducer */
.reduce-panel, .reduction-result { margin-bottom: 16px; }
.reduction-savings { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin: 0 0 8px; }
.reduction-savings span { color: var(--muted); font-size: 12px; }
.reduction-preserved { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.reduction-context { max-height: 420px; overflow: auto; margin: 0 0 8px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f4f4ef; font-size: 12px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Write: individual paper pipeline */
.write-panel, .manuscript, .ms-run { margin-bottom: 16px; }
.stepper { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 14px 20px 0; list-style: none; }
.stepper .stage { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px 4px 4px; color: var(--muted); font-size: 11px; }
.stepper .stage span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #efefe9; font-size: 10px; font-weight: 700; }
.stepper .stage.done { color: #2f6b45; }
.stepper .stage.done span { background: #e5f4ea; }
.stepper .stage.current { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.stepper .stage.current span { background: var(--ink); color: #fff; }
.stage-hint { margin: 10px 20px 0; color: var(--muted); font-size: 12px; }
.manuscript-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; padding: 16px 20px 20px; }
.ms-section { margin-bottom: 14px; }
.ms-section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ms-heading { flex: 1; border: 0; border-bottom: 1px solid var(--line); padding: 4px 0; background: transparent; font: 400 16px Georgia, serif; }
.ms-body, .ms-notes { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; font: inherit; font-size: 13px; line-height: 1.55; resize: vertical; }
.ms-notes { background: #fbfaf4; font-size: 12px; }
.ms-section details summary, .ms-custom summary, .ms-versions summary { cursor: pointer; color: var(--muted); font-size: 11px; }
.ms-save { margin-top: 6px; }
.ms-pipeline { border-left: 1px solid var(--line); padding-left: 16px; }
.skill-choice { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; font-size: 12px; cursor: pointer; }
.skill-choice span { display: grid; gap: 1px; }
.skill-choice small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.ms-select { display: grid; gap: 4px; margin: 8px 0; color: var(--muted); font-size: 11px; }
.ms-run-button { width: 100%; margin-top: 12px; }
.ms-reviewer-form { display: grid; gap: 8px; margin-top: 8px; }
.ms-reviewer-form label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.ms-runs { padding: 0 20px; }
.ms-items, .ms-issues { margin: 6px 0; padding-left: 18px; font-size: 12px; line-height: 1.5; }
.ms-items li, .ms-issue { margin-bottom: 8px; }
.ms-issue blockquote { margin: 4px 0; border-left: 3px solid var(--line); padding-left: 8px; color: #4d5866; }
.ms-respond textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 12px; }
.decide.chosen { border-color: var(--ink); color: var(--ink); background: #f1f1ec; }
.ms-versions { padding: 0 20px 18px; font-size: 12px; }
@media (max-width: 860px) { .manuscript-grid { grid-template-columns: 1fr; } .ms-pipeline { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 12px; } }
.skill-choice input[type="checkbox"] { flex: none; width: auto; margin: 2px 0 0; }
.skills-list { display: grid; gap: 2px; max-height: min(60vh, 520px); overflow-y: auto; margin: 12px 0; }
.skills-list .skill-choice { margin: 0; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.skills-list .skill-choice small { font-size: 11px; font-weight: 400; }
.skills-list .skill-choice.unavailable { cursor: default; opacity: .7; }
.skills-list .skill-source { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }
.skills-list .skill-source a { color: inherit; text-decoration: underline; }

/* Research workbenches: readable experiments and source-linked learning. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.research-workbench { --work-ink: #202b3b; --work-muted: #596779; --work-line: #dfe5ec; --work-tint: #f5f7fb; color: var(--work-ink); font-size: 16px; line-height: 1.65; }
.research-workbench [hidden] { display: none !important; }
.research-workbench :where(button, a, input, select, textarea, summary):focus-visible { outline: 3px solid #7568df; outline-offset: 4px; }
.research-workbench h2, .research-workbench h3, .research-workbench h4 { color: var(--work-ink); font-family: inherit; letter-spacing: -.025em; }
.workbench-heading { margin: 2px 0 32px; }
.workbench-heading h2 { margin: 0 0 10px; font-size: clamp(25px, 2.8vw, 34px); font-weight: 650; line-height: 1.25; }
.workbench-heading p { max-width: 68ch; margin: 0; color: var(--work-muted); font-size: 16px; }
.research-workbench .button { min-height: 44px; padding: 10px 18px; font-size: 14px; line-height: 1.4; }
.research-workbench .button-dark { background: #25344a; color: #fff; }
.research-workbench .button-dark:hover { background: #172338; }
.research-workbench .button-accent { background: #6255ce; color: #fff; }
.research-workbench .button-accent:hover { background: #5143bb; }
.research-workbench .button-plain { border: 1px solid var(--work-line); background: #fff; color: #3b485b; }
.research-workbench .button-plain:hover { border-color: #9ba8b9; background: var(--work-tint); }
.research-workbench .form-hint, .research-workbench .panel-note { color: var(--work-muted); font-size: 14px; line-height: 1.65; }
.research-workbench .eyebrow { margin-bottom: 6px; color: var(--work-muted); font-size: 13px; letter-spacing: 0; text-transform: none; }
.research-workbench .filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.research-workbench .filter-chip { min-height: 40px; padding: 8px 14px; font-size: 13px; line-height: 1.4; }
.research-workbench .filter-chip[aria-pressed="true"] { border-color: #6255ce; background: #efedfc; color: #5143bb; }
.research-workbench .filter-chip b { margin-left: 5px; font-weight: 600; }
.research-workbench .panel { overflow: clip; border-color: var(--work-line); box-shadow: none; }
.research-workbench .panel-header { padding: 26px 28px; gap: 20px; }
.research-workbench .panel-header h3, .exp-section-head h3, .exp-compare-row h3, .learn-create h3 { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.35; }
.research-workbench .panel-header p { margin: 8px 0 0; max-width: 68ch; color: var(--work-muted); font-size: 15px; line-height: 1.65; }
.research-workbench .soft-empty { display: grid; gap: 8px; padding: 36px; border: 1px dashed #cbd4df; border-radius: 12px; background: #fafbfd; }
.soft-empty strong { font-size: 18px; font-weight: 550; }
.soft-empty span { max-width: 65ch; color: var(--work-muted); font-size: 15px; }
.exp-overview { display: grid; grid-template-columns: 1fr 1fr 2fr 1fr; gap: 0; margin-bottom: 36px; padding: 24px 0; border-top: 1px solid var(--work-line); border-bottom: 1px solid var(--work-line); }
.stat-tile { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; justify-content: flex-start; padding: 0 22px; border-left: 1px solid var(--work-line); }
.stat-tile:first-child { padding-left: 0; border-left: 0; }
.stat-tile > span { font-size: 13px; color: var(--work-muted); }
.stat-tile > strong { margin: 6px 0 3px; font-size: 29px; line-height: 1.2; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-tile small { color: var(--work-muted); font-size: 12px; line-height: 1.6; }
.outcome-bar { width: 100%; display: flex; gap: 3px; height: 5px; margin: 16px 0 12px; overflow: hidden; border-radius: 5px; }
.outcome-bar i { min-width: 3px; background: #8a97aa; }
.outcome-bar .supported, .outcome-key.supported i { background: #378568; }
.outcome-bar .partially_reproduced, .outcome-key.partially_reproduced i { background: #557cc0; }
.outcome-bar .not_reproduced, .outcome-key.not_reproduced i { background: #bf8545; }
.outcome-bar .contradicted, .outcome-key.contradicted i { background: #bd6565; }
.outcome-keys { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.outcome-key { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0; border: 0; background: transparent; color: var(--work-muted); font-size: 12px; cursor: pointer; text-align: left; }
.outcome-key:hover { color: #5143bb; text-decoration: underline; text-underline-offset: 3px; }
.outcome-key i { width: 6px; height: 6px; border-radius: 50%; background: #8a97aa; }
.exp-section { margin-bottom: 32px; }
.exp-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 22px; }
.exp-section-head p, .exp-compare-row p { margin: 8px 0 0; max-width: 65ch; color: var(--work-muted); font-size: 15px; }
.exp-section-head > .button { flex: 0 0 auto; }
.experiment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.research-workbench .experiment-card { min-width: 0; margin: 0; padding: 26px; border-color: var(--work-line); border-radius: 12px; }
.research-workbench .experiment-head { flex-wrap: wrap; margin-bottom: 20px; gap: 14px; }
.research-workbench .experiment-head > div { min-width: 0; flex: 1 1 200px; }
.research-workbench .experiment-head strong { font-size: 19px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.research-workbench .experiment-head .experiment-meta { display: block; margin-top: 7px; color: var(--work-muted); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.version-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.version-pills button { min-width: 44px; min-height: 38px; border: 1px solid var(--work-line); border-radius: 7px; background: #fff; color: var(--work-muted); cursor: pointer; font-size: 13px; }
.version-pills [aria-pressed="true"] { background: #eef0f9; border-color: #b9b4e9; color: #5143bb; font-weight: 650; }
.research-workbench .experiment-fields { display: grid; grid-template-columns: 1fr; gap: 5px; font-size: 15px; line-height: 1.75; }
.research-workbench .experiment-fields dt { margin-top: 14px; color: var(--work-muted); text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; }
.research-workbench .experiment-fields dt:first-child { margin-top: 0; }
.research-workbench .experiment-fields dd { color: var(--work-ink); overflow-wrap: anywhere; }
.experiment-result { margin: 22px 0; border-left: 3px solid #8176d5; padding: 2px 0 2px 16px; }
.experiment-result > span { font-size: 13px; font-weight: 600; color: var(--work-muted); }
.experiment-result p { margin: 7px 0 0; font-size: 16px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.experiment-protocol { border-top: 1px solid var(--work-line); padding-top: 16px; }
.experiment-protocol summary { cursor: pointer; color: #44546a; font-size: 14px; font-weight: 600; }
.experiment-protocol summary small { margin-left: 6px; color: var(--work-muted); font-size: 12px; font-weight: 400; }
.experiment-protocol[open] .experiment-fields { margin-top: 18px; }
.experiment-note { margin: 18px 0 0; color: var(--work-muted); font-size: 13px; }
.exp-compare { margin: 0 0 32px; }
.exp-compare-row { display: grid; gap: 24px; padding: 28px; }
.research-workbench .compare-form { display: grid; grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr) auto; align-items: end; gap: 16px; margin: 0; }
.compare-arrow { align-self: end; padding-bottom: 10px; color: var(--work-muted); }
.research-workbench label, .research-workbench .field-label { color: #445267; font-size: 14px; font-weight: 500; }
.research-workbench :where(label:not(.checkbox-label, .outcome-option)) { display: grid; gap: 8px; min-width: 0; }
.research-workbench :where(input:not([type="checkbox"], [type="radio"]), select, textarea) { min-width: 0; width: 100%; border: 1px solid #cbd4df; border-radius: 8px; padding: 11px 13px; background: #fff; color: var(--work-ink); font-size: 16px; line-height: 1.5; }
.research-workbench :where(input, textarea)::placeholder { color: #798494; opacity: 1; }
.research-workbench .saved-comparisons { border-top: 1px solid var(--work-line); padding: 22px 28px; }
.research-workbench .saved-diff { padding: 16px 18px; gap: 8px; color: var(--work-muted); font-size: 13px; line-height: 1.6; }
.research-workbench .saved-diff strong { font-size: 15px; }
.comparability-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #378568; }
.comparability-dot.limited { background: #bf8545; }.comparability-dot.not_comparable { background: #bd6565; }
.research-workbench .reproducibility-panel { margin-top: 36px; }
.research-workbench .repro-body, .research-workbench .repro-all { padding: 28px; }
.research-workbench .section-title { margin: 0 0 22px; font-size: 19px; font-weight: 600; }
.research-workbench .repro-group { margin-bottom: 22px; padding: 24px; border-color: var(--work-line); }
.repro-group:last-child { margin-bottom: 0; }
.research-workbench .repro-heading { flex-wrap: wrap; gap: 12px; }
.research-workbench .repro-heading > div { flex: 1 1 300px; }
.research-workbench .repro-heading h4 { font-family: inherit; font-size: 18px; font-weight: 550; line-height: 1.6; }
.research-workbench .repro-headline { font-size: 15px; line-height: 1.7; margin: 18px 0 14px; }
.research-workbench .agreement, .research-workbench .result-chip { display: inline-flex; align-items: center; max-width: 100%; padding: 5px 10px; border-radius: 6px; font-size: 12px; line-height: 1.5; white-space: normal; }
.research-workbench .result-chips { gap: 8px; }
.research-workbench .submission-list { margin: 20px 0; }
.research-workbench .submission-list li { gap: 10px; padding: 12px 0; font-size: 14px; }
.research-workbench .submission-list small { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.research-workbench .repro-findings { margin-top: 20px; font-size: 14px; }
.research-workbench .repro-findings summary { min-height: 36px; }
.research-workbench .finding-list { font-size: 14px; line-height: 1.7; }
.research-workbench .finding { gap: 12px; padding: 12px 0; }
.research-workbench .finding-severity { font-size: 12px; }
.research-workbench .repro-hint { margin: 18px 0 0; padding: 14px 16px; background: var(--work-tint); color: var(--work-muted); border-radius: 8px; font-size: 14px; }
.research-workbench .revision-proposal { border-top: 1px solid var(--work-line); margin-top: 24px; padding-top: 24px; gap: 18px; }
.research-workbench .repro-disclaimer { padding: 18px 28px; color: var(--work-muted); font-size: 13px; line-height: 1.65; }
.repro-submit { border-bottom: 1px solid var(--work-line); background: #fafbfe; padding: 28px; scroll-margin-top: 80px; }
.repro-submit-intro { max-width: 65ch; margin-bottom: 28px; }
.repro-submit-intro h4 { margin: 0 0 8px; font-size: 21px; }
.repro-submit-intro p { margin: 0; color: var(--work-muted); font-size: 15px; }
.research-workbench .reproduction-form { gap: 28px; }
.reproduction-form fieldset { margin: 0; padding: 24px; border: 1px solid var(--work-line); border-radius: 10px; background: #fff; min-width: 0; }
.reproduction-form legend { padding: 0 8px; color: var(--work-ink); font-size: 17px; font-weight: 600; }
.step-number { display: inline-grid; place-items: center; width: 27px; height: 27px; margin-right: 8px; border: 1px solid #cbc6ef; border-radius: 50%; background: #f2f0fd; color: #6255ce; font-size: 13px; }
.research-workbench .form-grid { gap: 22px; }
.research-workbench .field-group { display: grid; gap: 10px; }
.research-workbench .req { color: #946044; }
.research-workbench .outcome-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.research-workbench .outcome-option { display: flex; gap: 8px; align-items: center; min-height: 44px; margin: 0; padding: 9px 13px; border: 1px solid var(--work-line); border-radius: 8px; cursor: pointer; font-size: 14px; }
.outcome-option:has(:checked) { border-color: #8276d8; background: #f1effc; }
.research-workbench :where(input[type="checkbox"], input[type="radio"]) { width: 18px; height: 18px; flex: 0 0 auto; accent-color: #6255ce; }
.research-workbench .json-status { min-height: 18px; color: #2e7859; font-size: 12px; font-weight: 400; }.research-workbench .json-status.is-invalid { color: #ad3d3d; }
.research-workbench [aria-invalid="true"] { border-color: #ad3d3d; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
.form-actions .form-hint { flex: 1 1 300px; margin: 0; }
.results-toolbar { display: grid; gap: 22px; }
.research-workbench .results-filters { gap: 16px; margin-bottom: 0; }
.research-workbench .results-filters label { flex: 1 1 180px; }
.research-workbench .results-hint { margin: 16px 0; }
.research-workbench .results-table { min-width: 680px; font-size: 14px; line-height: 1.6; }
.research-workbench .results-table :where(td, th) { padding: 18px 14px; }
.research-workbench .results-table thead th { color: var(--work-muted); font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 600; background: #f7f9fc; }
.research-workbench .results-table td small { display: block; color: var(--work-muted); margin-top: 5px; font-size: 13px; }
.research-workbench .results-table td strong { font-size: 14px; overflow-wrap: anywhere; }
.research-workbench .results-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.research-workbench .pick-cell { width: 38px; }
.research-workbench .results-table tbody tr:has(:checked) { background: #f5f3fe; }
.completeness { display: inline-block; min-width: 42px; padding-bottom: 5px; background: linear-gradient(to right,#8276d8 var(--done),#e6e8ef var(--done)) left bottom / 100% 3px no-repeat; }
.results-empty { padding: 24px; color: var(--work-muted); text-align: center; }
.research-workbench .result-comparison { padding: 24px; margin-top: 28px; }
.research-workbench .result-comparison .passport-heading { margin-top: 0; font-size: 18px; }
.research-workbench .paper-diff-body { padding: 28px; }
.research-workbench .interpretation-overview, .research-workbench .change-side p, .research-workbench .field-explanation { font-size: 16px; line-height: 1.75; }
.research-workbench .change-top, .research-workbench .change-side { padding: 18px; }
.research-workbench .proposal-detail, .research-workbench .comparability, .research-workbench .why-statements { font-size: 14px; line-height: 1.7; }
.research-workbench .interpretation-model, .research-workbench .side-label, .research-workbench .rule-note, .research-workbench .why-evidence { font-size: 12px; }
.research-workbench .why-button { font-size: 14px; min-height: 40px; }

/* Learn uses a generous reading column and a quiet, persistent section outline. */
.learn-create { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .85fr); margin-bottom: 40px; }
.learn-create-copy { padding: 32px; background: #f6f7fc; }
.workbench-symbol { display: inline-grid; place-items: center; width: 42px; height: 42px; margin-bottom: 18px; border: 1px solid #dedbf2; border-radius: 10px; color: #6255ce; font-size: 25px; }
.learn-create-copy p { max-width: 45ch; color: var(--work-muted); font-size: 15px; margin: 12px 0 24px; }
.learn-privacy-note { display: flex; align-items: center; gap: 8px; color: #536276; font-size: 13px; }
.learning-create-form { display: grid; align-content: center; gap: 22px; padding: 32px; }
.optional-label { display: inline; color: var(--work-muted); font-weight: 400; font-size: 12px; }
.research-workbench .checkbox-label { display: flex; align-items: flex-start; gap: 10px; }
.learning-create-form .checkbox-label input { margin-top: 4px; }
.learning-create-form .checkbox-label small { display: block; margin-top: 4px; font-size: 13px; color: var(--work-muted); font-weight: 400; }
.learning-create-form .button { justify-self: start; }
.learning-library { margin-bottom: 36px; }
.learning-library-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.learning-search { flex: 1 1 220px; max-width: 280px; }
.learning-page-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.learning-page-card { display: flex; gap: 14px; align-items: flex-start; min-width: 0; padding: 24px; border: 1px solid var(--work-line); border-radius: 10px; background: #fff; color: var(--work-ink); text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.learning-page-card:hover { border-color: #aaa3de; background: #fdfcff; }
.learning-page-icon { flex: 0 0 30px; color: #8176c7; font-size: 25px; }
.learning-page-copy { min-width: 0; display: grid; gap: 8px; flex: 1; }
.learning-page-copy strong { font-size: 17px; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.learning-page-copy > span, .learning-page-copy small { font-size: 13px; color: var(--work-muted); }
.learning-page-open { font-size: 18px; color: #7e8795; }
.research-workbench .passport-status { font-size: 12px; font-weight: 550; padding: 4px 9px; line-height: 1.5; }
.learning-filter-empty { padding: 28px; border: 1px dashed var(--work-line); color: var(--work-muted); text-align: center; }
.learning-document { margin-top: 36px; scroll-margin-top: 78px; }
.learning-document-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 32px; border-bottom: 1px solid var(--work-line); }
.learning-document-head > div { min-width: 0; flex: 1 1 300px; }
.learning-document-head h3 { margin: 16px 0 10px; font-size: clamp(24px,2.5vw,30px); line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; }
.learning-document-head p { margin: 0; color: var(--work-muted); font-size: 15px; }
.learning-document-layout { display: grid; grid-template-columns: 200px minmax(0,1fr); gap: 36px; padding: 32px; align-items: start; }
.learning-outline { position: sticky; top: 86px; display: grid; gap: 5px; }
.learning-outline > strong { margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--work-muted); }
.learning-outline button { padding: 11px 12px; min-height: 44px; border: 0; border-left: 2px solid transparent; background: transparent; text-align: left; color: var(--work-muted); font-size: 14px; line-height: 1.5; cursor: pointer; }
.learning-outline button:hover { color: #5143bb; background: #f8f7fe; }
.learning-outline [aria-current] { border-left-color: #8276d8; background: #f4f2fd; color: #5143bb; }
.learning-article { min-width: 0; max-width: 72ch; }
.learning-disclaimer { margin: 0 0 28px; padding: 0 0 22px; border-bottom: 1px solid var(--work-line); color: var(--work-muted); font-size: 14px; line-height: 1.75; }
.learning-review-notes { margin-bottom: 24px; font-size: 14px; color: #825e2d; }
.learning-review-notes summary { cursor: pointer; padding: 12px 16px; border-radius: 8px; background: #fcf6eb; }
.learning-section { margin: 0 0 36px; scroll-margin-top: 90px; }
.learning-section h4 { margin: 0 0 18px; font-size: 21px; font-weight: 600; line-height: 1.4; }
.research-workbench .learn-statements { margin: 0; padding-left: 22px; color: #354152; font-size: 17px; line-height: 1.85; }
.research-workbench .learn-statements li { margin-bottom: 18px; padding-left: 4px; }
.research-workbench .cite { display: inline-flex; justify-content: center; align-items: center; min-width: 30px; min-height: 28px; margin-left: 3px; padding: 1px 6px; border: 1px solid #ded9f4; border-radius: 5px; background: #f3f0fd; color: #6255ce; font-size: 12px; line-height: 1.5; }
.research-workbench .learn-title { gap: 9px; margin: 0 0 32px; color: #445267; font-size: 14px; }
.research-workbench .learn-edit-row { display: grid; grid-template-columns: 1fr; gap: 9px; margin-bottom: 20px; }
.research-workbench .learn-edit-row textarea { padding: 14px 16px; font-size: 16px; line-height: 1.8; min-height: 120px; resize: vertical; }
.research-workbench .learn-edit-cites { gap: 7px; padding: 0; }
.research-workbench .learn-edit-cites .text-link { margin-left: auto; font-size: 13px; padding: 5px 0; }
.research-workbench .learn-glossary dt { margin: 20px 0 6px; font-size: 16px; color: var(--work-ink); }
.research-workbench .learn-glossary dd { margin: 0; font-size: 16px; color: var(--work-muted); line-height: 1.8; }
.learning-sources { border-top: 1px solid var(--work-line); padding: 22px 0; color: var(--work-muted); font-size: 14px; }
.learning-sources summary { cursor: pointer; font-weight: 500; min-height: 30px; }
.learning-sources ol { padding-left: 20px; }.learning-sources li { margin: 20px 0; }.learning-sources p { margin: 6px 0; }
.learn-evidence-panel { margin-bottom: 28px; border: 1px solid #d5cef0; border-radius: 10px; background: #f8f6ff; padding: 20px; scroll-margin-top: 80px; }
.learn-evidence-panel > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; }
.learn-evidence-panel p { font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }.learn-evidence-panel .text-link { font-size: 13px; }
.learning-document-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: flex-end; border-top: 1px solid var(--work-line); padding: 22px 32px; background: #fafbfd; }
.learning-save-status { flex: 1 1 240px; color: var(--work-muted); font-size: 13px; }
.research-workbench .share-box { margin: 0; border-radius: 0; padding: 22px 32px; gap: 16px; font-size: 14px; }
.share-box > div { display: grid; flex: 1; gap: 6px; }.share-box strong { font-size: 15px; }
@media (min-width: 761px) { .view:has(.research-workbench) { max-width: 1500px; padding-left: clamp(24px,3vw,48px); padding-right: clamp(24px,3vw,48px); } }
@media (max-width: 1200px) {
  .experiment-grid, .learning-page-grid { grid-template-columns: 1fr; }
  .exp-overview { grid-template-columns: 1fr 1fr; gap: 24px 0; }.stat-tile:nth-child(3) { border-left: 0; padding-left: 0; }.stat-tile:nth-child(4) { border-left: 1px solid var(--work-line); }
  .learning-document-layout { grid-template-columns: 160px minmax(0,1fr); gap: 24px; }
  .learn-create { grid-template-columns: 1fr; }.learn-create-copy { border-bottom: 1px solid var(--work-line); }
}
@media (max-width: 760px) {
  .workbench-heading { margin-bottom: 24px; }.workbench-heading h2 { font-size: 26px; }
  .exp-section-head, .research-workbench .reproducibility-panel .panel-header { flex-direction: column; gap: 16px; }
  .research-workbench .experiment-card, .research-workbench .repro-group { padding: 22px; }
  .research-workbench .compare-form { grid-template-columns: 1fr; }.compare-arrow { display: none; }
  .research-workbench .panel-header, .exp-compare-row, .research-workbench .saved-comparisons, .research-workbench .repro-body, .research-workbench .repro-all, .repro-submit { padding: 22px; }
  .research-workbench .form-grid { grid-template-columns: 1fr; }.reproduction-form fieldset { padding: 20px 16px; }
  .research-workbench .repro-heading > div { flex-basis: auto; }.research-workbench .submission-list li { display: flex; flex-wrap: wrap; }
  .research-workbench .change-columns { grid-template-columns: 1fr; }.research-workbench .change-side + .change-side { border-left: 0; border-top: 1px solid var(--work-line); }
  .learning-document-layout { grid-template-columns: 1fr; gap: 28px; padding: 22px; }
  .learning-outline { position: static; display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--work-line); padding-bottom: 18px; }
  .learning-outline > strong { flex: 1 0 100%; margin: 0 0 6px; }.learning-outline button { border-left: 0; border-radius: 6px; padding: 8px 10px; font-size: 13px; }
  .learning-document-head, .learning-document-actions, .research-workbench .share-box, .learn-create-copy, .learning-create-form { padding: 24px; }
  .learning-page-card { padding: 20px; flex-wrap: wrap; gap: 10px; }.learning-page-icon { display: none; }.learning-page-copy { flex-basis: 70%; }
  .learning-search { max-width: none; }.learning-document-actions .button { flex: 1 1 160px; }
}
@media (prefers-reduced-motion: reduce) { .research-workbench *, .research-workbench *::before, .research-workbench *::after { scroll-behavior: auto !important; transition: none !important; } }

.research-workbench .table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.research-workbench .table-scroll-hint { display: none; }
.research-workbench .metric-cell { min-width: 150px; }
.research-workbench .results-table td:nth-child(2) { min-width: 160px; }
@media (max-width: 760px) { .research-workbench .table-scroll-hint { display: block; margin: 14px 0; color: var(--work-muted); font-size: 13px; } }

/* Account entry: production sessions replace developer identity switching. */
.signed-out .app-shell { grid-template-columns: 1fr; }
.signed-out .sidebar, .signed-out .topbar { display: none; }
.signed-out .main-content { grid-column: 1; }
.signed-out .view { max-width: 660px; }
.account-entry { margin: 35px auto; max-width: 460px; font-size: 16px; }
.account-brand { display: inline-block; font-size: 24px; font-weight: 700; margin-bottom: 32px; color: #635bdf; }
.account-entry h1 { font: 600 32px/1.25 inherit; font-family: inherit; }
.account-entry p { color: #596779; line-height: 1.7; }
.account-entry form { display: grid; gap: 20px; margin: 28px 0; }
.account-entry label { display: grid; gap: 8px; }
.account-entry input { width: 100%; border: 1px solid #cbd4df; padding: 12px; border-radius: 8px; font-size: 16px; }
.account-entry small { font-size: 13px; color: #596779; }
.account-entry .button { min-height: 46px; font-size: 15px; }
#accountError { margin: 0; color: #9f3333; }

/* v2.0: task board, conference intelligence, conference workspace */
.v2-pill { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; background: #fff; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.v2-pill.major, .v2-pill.fail, .v2-pill.ineligible { border-color: #e8b9a6; background: #fbebe4; color: #8f392d; }
.v2-pill.minor, .v2-pill.conditional, .v2-pill.unverified, .v2-pill.unknown, .v2-pill.stale, .v2-pill.experimental { border-color: #ecd9a2; background: #fbf4df; color: #7a5a12; }
.v2-pill.pass, .v2-pill.eligible, .v2-pill.verified, .v2-pill.validated { border-color: #c4dd8c; background: var(--acid-soft); color: var(--forest); }
.v2-pill.deterministic, .v2-pill.plan { border-color: #bcd0ea; background: #eef3fa; color: #2f5a92; }
.v2-pill.llm, .v2-pill.agent { border-color: #d5cdf0; background: #f2efff; color: #4b3c8f; }
.v2-pill.illustrative { border-color: #d5cdf0; background: #f2efff; color: #4b3c8f; }
.v2-refs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.v2-refs code { border-radius: 4px; padding: 1px 5px; background: #f1f1ec; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.v2-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 16px 0; }
.v2-column { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: rgba(255,255,255,.38); }
.v2-column h4 { display: flex; justify-content: space-between; margin: 0 0 10px; font-size: 12px; }
.v2-column h4 span { color: var(--faint); }
.v2-task { display: grid; gap: 6px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fff; font-size: 12px; }
.v2-task.overdue { border-color: #e8b9a6; }
.v2-task p { margin: 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.v2-task-meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 10px; }
.v2-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.v2-inline { display: inline-grid; gap: 4px; color: var(--muted); font-size: 11px; }
.v2-inline select { border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; background: #fff; font-size: 12px; }
.v2-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; }
.v2-banner { margin-bottom: 24px; }
.v2-score { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); gap: 20px; align-items: start; }
.v2-score > div:first-child { display: grid; gap: 4px; }
.v2-score > div:first-child strong { font: 400 44px/1 Georgia, serif; }
.v2-score > div:first-child strong small { color: var(--faint); font-size: 16px; }
.v2-score > div:first-child > span { color: var(--muted); font-size: 11px; }
.v2-dims { display: grid; gap: 6px; }
.v2-dim { display: grid; grid-template-columns: minmax(110px, 160px) minmax(60px, 1fr) 34px; gap: 4px 10px; align-items: center; font-size: 12px; }
.v2-dim small { color: var(--faint); }
.v2-dim > small { grid-column: 2 / 4; margin-top: -4px; }
.v2-bar { height: 7px; border-radius: 999px; background: #ecece6; overflow: hidden; }
.v2-bar i { display: block; height: 100%; background: var(--forest); }
.v2-findings, .v2-list { display: grid; gap: 8px; margin: 8px 0; padding: 0; list-style: none; }
.v2-finding { border-left: 3px solid var(--line); padding: 4px 10px; font-size: 12px; }
.v2-finding.major { border-left-color: var(--rust); }
.v2-finding p { margin: 4px 0; }
.v2-finding blockquote, .v2-list blockquote { margin: 4px 0; border-left: 2px solid var(--acid); padding-left: 8px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.v2-list li { font-size: 12px; overflow-wrap: anywhere; }
.v2-notice { border: 1px solid #d5cdf0; border-radius: 8px; padding: 8px 11px; background: #f2efff; color: #4b3c8f; font-size: 12px; }
.v2-recs { display: grid; gap: 6px; }
.v2-rec { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto 56px 72px; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; background: #fff; text-align: left; cursor: pointer; font-size: 12px; }
.v2-rec.active { border-color: var(--forest); box-shadow: inset 3px 0 0 var(--acid); }
.v2-rec small { display: block; color: var(--muted); font-size: 10px; }
.v2-rank { color: var(--faint); font: 400 14px Georgia, serif; }
.v2-metric { display: grid; text-align: right; }
.v2-metric strong { font-size: 15px; }
.v2-detail { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.v2-detail h4 { margin: 0 0 4px; }
.v2-detail h5 { margin: 14px 0 4px; font-size: 12px; }
.v2-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 10px 0; }
.v2-metrics span { display: grid; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; }
.v2-metrics small { color: var(--muted); font-size: 10px; }
.v2-metrics strong { font-size: 17px; }
.v2-submission { display: grid; gap: 6px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; font-size: 12px; }
.v2-review { border-left: 2px solid var(--line); padding-left: 10px; }
.v2-review p { margin: 4px 0; }
.v2-stack { display: grid; gap: 8px; }
.v2-stack label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.v2-stack textarea, .v2-submission textarea { min-height: 64px; border: 1px solid var(--line); border-radius: 7px; padding: 8px 9px; font: inherit; }
.saved-diff.active { border-color: var(--forest); }
@media (max-width: 720px) {
  .v2-score { grid-template-columns: 1fr; }
  .v2-rec { grid-template-columns: 22px minmax(0, 1fr) 48px 64px; }
  .v2-rec > .v2-pill { grid-column: 2 / 5; justify-self: start; }
}
.v2-stack .checkbox-label { justify-content: flex-start; padding-bottom: 0; }
#conferenceForm { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }

/* v2.1: one project page — chat on the left, a panel with Context, Workspace, History, and Learn on the right. */
.content-split.research-chat-layout.project-layout { grid-template-columns: minmax(340px, 1fr) var(--panel-width, minmax(460px, 50%)); }
.content-split.research-chat-layout.project-layout .chat-panel { position: sticky; display: flex; flex-direction: column; overflow: hidden; }
.project-layout .chat-panel > .page-loading { margin: 40px auto; }
.panel-resizer { position: absolute; z-index: 5; inset: 0 auto 0 -3px; width: 7px; cursor: col-resize; }
.panel-resizer:hover, .panel-resizer:focus-visible { outline: 0; background: linear-gradient(90deg, transparent 2px, #9cc3f7 2px, #9cc3f7 4px, transparent 4px); }
body.is-resizing { cursor: col-resize; user-select: none; }
.panel-sections { flex: 0 0 auto; position: static; }
.panel-sections .panel-section { padding: 0; font-size: 10px; font-weight: 600; }
.panel-sections .panel-section.active { font-weight: 700; }
.panel-sections .tab.active::after { display: none; }
.panel-sections span, .workspace-subnav span, .paper-views span { margin-left: 4px; color: #9aa3af; font-size: 9px; font-weight: 500; }
.workspace-subnav { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid #edf0f4; padding: 8px 14px; background: #fcfdff; }
.workspace-subnav[hidden], .paper-views[hidden] { display: none; }
.workspace-primary { display: flex; gap: 6px; }
.sub-section { height: 28px; border: 1px solid #e1e6ed; border-radius: 15px; padding: 0 12px; background: #fff; color: #5d6878; cursor: pointer; font-size: 10px; font-weight: 600; }
.sub-section.tab { padding: 0 12px; }
.sub-section.tab.active::after { display: none; }
.sub-section:hover { border-color: #b7cfee; color: #176ff2; }
.sub-section.active { border-color: #9cc3f7; background: #eef5ff; color: #176ff2; }
.paper-views { flex: 0 0 auto; display: flex; gap: 18px; border-bottom: 1px solid #edf0f4; padding: 9px 16px 0; background: #fff; }
.paper-views .tab { padding-bottom: 8px; font-size: 10px; }
.paper-views .tab.active { color: #176ff2; }
.paper-views .tab.active::after { background: #4a94fb; }
.project-pane { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 16px 18px 40px; background: #fff; }
.project-pane .context-body { padding: 0; }
.project-pane .panel { max-width: 100%; }
.project-pane img, .project-pane table { max-width: 100%; }
.project-pane .table-wrap, .project-pane .results-table { overflow-x: auto; }
.panel-project-header { grid-template-columns: 1fr; gap: 12px; margin-bottom: 20px; padding-bottom: 16px; }
.panel-project-header h1 { margin-bottom: 8px; font-size: 22px; line-height: 1.2; }
.panel-project-header .project-description { font-size: 12px; }
.panel-project-header .project-meta { gap: 6px 10px; font-size: 10px; }
.panel-project-header .project-actions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
.panel-project-header .project-actions .button { min-height: 32px; padding: 0 11px; font-size: 11px; }

@media (max-width: 920px) {
  .content-split.research-chat-layout.project-layout { display: block; }
  .content-split.research-chat-layout.project-layout .view { height: 65vh; }
  .content-split.research-chat-layout.project-layout .chat-panel { position: static; height: 85vh; display: flex; border-left: 0; border-top: 1px solid #e5e9ef; }
  .panel-resizer { display: none; }
  .project-pane { padding: 14px 16px 32px; }
}
.panel-sections .panel-section { display: flex; align-items: center; justify-content: center; gap: 0; }
.project-pane .research-workbench { font-size: 14px; }
.project-pane .workbench-heading { margin-bottom: 20px; }
.project-pane .workbench-heading h2 { font-size: 22px; }
.project-pane .workbench-heading p { font-size: 13px; }
.project-pane .research-workbench .button { min-height: 36px; padding: 7px 14px; font-size: 12px; }
.project-pane .experiment-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.pane-actions { display: flex; justify-content: flex-end; gap: 6px; margin-bottom: 12px; }
.pane-actions .button { min-height: 32px; padding: 0 12px; font-size: 11px; }
.topbar-spacer { flex: 1; }
.linked-view { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; border-bottom: 1px solid #edf0f4; padding-bottom: 10px; }
.linked-view strong { font-size: 14px; }

/* Publish a result to the public claim pages */
.publish-preview { display: grid; gap: 12px; }
.publish-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; font-size: 13px; }
.publish-lists ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
.publish-preview pre { max-height: 260px; overflow: auto; margin: 0; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--paper); font-size: 11px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.modal-actions .button[hidden], .publish-preview[hidden] { display: none; }

/* Sky background: a light sky with drifting clouds and birds, fixed behind every view.
   It never takes clicks or focus, and stays still for people who ask for reduced motion. */
html { background: #e6f1fc; }
.app-shell { position: relative; z-index: 1; }
/* The sky itself (gradient, clouds, birds) is in sky.css, shared with the admin board. */

/* Let the sky show through every part of the page. Side panels keep only a faint tint and a blur,
   so the sky reads as one continuous background and birds behind text soften into the sky. */
body, .main-content, .chat-stage { background: transparent; }
.sidebar, .topbar, .content-split.research-chat-layout .chat-panel, .context-tabs, .workspace-subnav, .paper-views, .project-pane, .learning-document-actions {
  background: rgba(255, 255, 255, .16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.context-tabs, .workspace-subnav, .paper-views, .project-pane, .learning-document-actions { backdrop-filter: none; -webkit-backdrop-filter: none; }
.sidebar { border-right-color: rgba(160, 190, 222, .35); }
.topbar { border-bottom-color: rgba(160, 190, 222, .35); }
.content-split.research-chat-layout .chat-panel { border-left-color: rgba(160, 190, 222, .35); }
.context-tabs, .workspace-subnav, .paper-views { border-bottom-color: rgba(160, 190, 222, .35); }
.main-composer-wrap { border-top-color: transparent; background: transparent; }
.main-composer { box-shadow: 0 8px 28px rgba(44, 84, 128, .10); }
.stats-grid, .panel, .v2-column, .empty-state { background: rgba(255, 255, 255, .84); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
@media (max-width: 820px) { .sidebar { background: rgba(255, 255, 255, .94); } }

/* On the light-blue sky, blue buttons and blue selected states blend in, so they use a light yellow instead. */
:root { --sun: #ffe999; --sun-hover: #ffde70; --sun-soft: #fff6cf; --sun-line: #efd277; --sun-ink: #5c4600; }
.button-primary { background: var(--sun); color: var(--sun-ink); box-shadow: 0 3px 10px rgba(176, 134, 0, .16); }
.button-primary:hover { background: var(--sun-hover); }
.composer-send { background: var(--sun); color: var(--sun-ink); }
.composer-send:hover { background: var(--sun-hover); }
.nav-item.active { background: var(--sun-soft); color: var(--sun-ink); }
.sub-section:hover { border-color: var(--sun-line); color: var(--sun-ink); }
.sub-section.active { border-color: var(--sun-line); background: var(--sun-soft); color: var(--sun-ink); }
.starter-grid button:hover { border-color: var(--sun-line); background: #fffbea; color: var(--sun-ink); }
.answer-actions button:hover { border-color: var(--sun-line); color: var(--sun-ink); }

/* The chat/panel divider must stay easy to find and grab on the sky. No blur on the panel itself:
   a backdrop filter there can break hit-testing and scrolling in Safari. */
.content-split.research-chat-layout .chat-panel { border-left: 1px solid rgba(110, 150, 196, .5); background: rgba(255, 255, 255, .24); backdrop-filter: none; -webkit-backdrop-filter: none; }
.panel-resizer { inset: 0 auto 0 0; width: 10px; touch-action: none; }
.panel-resizer::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: transparent; transition: background .15s; }
.panel-resizer:hover, .panel-resizer:focus-visible { background: none; }
.panel-resizer:hover::after, .panel-resizer:focus-visible::after, body.is-resizing .panel-resizer::after { background: var(--sun-hover); }
#accountError:empty { display: none; }
.account-entry .label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.account-entry .label-row .text-link { font-size: 14px; color: #1f5fb8; }
.account-entry .text-link { font-size: 14px; }
.account-entry .code-input { font: 600 24px/1 ui-monospace, "Geist Mono", monospace; letter-spacing: .4em; text-align: center; }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 4px 0 18px; color: #8a96a3; font-size: 14px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid #dfe4ea; }
.auth-alternatives { display: grid; gap: 10px; margin-bottom: 20px; }
.auth-alternatives .button { width: 100%; min-height: 46px; font-size: 15px; text-decoration: none; color: var(--ink); background: #fff; }
.google-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); color: #fff; font: 700 13px/1 Arial, sans-serif; }
.auth-notice { border-radius: 8px; padding: 10px 12px; background: #fde8e1; color: #7a2a12 !important; }
.auth-links { font-size: 14px; }

/* Evidence flow card: size to the chat column, not the window, so it stays inside the card while the divider is dragged. */
.architecture-card { container-type: inline-size; min-width: 0; max-width: 100%; box-sizing: border-box; }
.architecture-flow { grid-template-columns: minmax(64px, 1fr) 16px minmax(0, 2fr) 16px minmax(64px, 1fr); }
.architecture-flow > *, .arch-core > * { min-width: 0; }
.arch-box { overflow-wrap: break-word; }
@container (max-width: 460px) {
  .architecture-flow { grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
  .arch-box { min-height: 48px; }
  .arch-arrow { transform: rotate(90deg); justify-self: center; }
}
@container (max-width: 340px) {
  .arch-core { grid-template-columns: minmax(0, 1fr); }
}

.ms-run-evidence { margin-block: 1rem; }
.ms-source-records summary { cursor: pointer; padding-block: .75rem; }
.ms-source-records code { white-space: normal; overflow-wrap: anywhere; }
.ms-source-records blockquote { margin-inline: 0; }
