/* Research Lab = Concept B "Research Desk" (scoped copy of concepts/concept-b styles; section nav moved to app shell,
   experiment list kept as the workspace's own navigator column). */
.ws-research { display: grid; grid-template-columns: 188px minmax(0, 1fr) 316px; grid-template-rows: auto 1fr 212px;
  grid-template-areas: "exps study ledger" "exps chart ledger" "exps book ledger"; background: var(--bg-0); }
.ws-research.focus { grid-template-columns: 0 minmax(0, 1fr) 0; grid-template-rows: auto 1fr 0; }
.ws-research.focus .xnav, .ws-research.focus .ledger, .ws-research.focus .book { visibility: hidden; }
@media (max-height: 820px) { .ws-research:not(.focus) { grid-template-rows: auto 1fr 184px; } .ws-research .study h1 { font-size: 19px; } }
.ws-research .xnav { grid-area: exps; border-right: 1px solid var(--border-1); padding: 16px 10px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.ws-research .xnav h3 { margin: 0 6px 6px; font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.ws-research .xnav a { text-decoration: none; color: var(--text-2); font-size: 12px; padding: 6px 8px; border-radius: 4px; display: grid; gap: 2px; }
.ws-research .xnav a .row { display: flex; justify-content: space-between; align-items: center; }
.ws-research .xnav a small { color: var(--text-3); font-size: 11px; line-height: 1.3; }
.ws-research .xnav a:hover, .ws-research .xnav a[aria-current="true"] { color: var(--text-1); background: var(--bg-2); }
.ws-research .xnav a[aria-current="true"] { box-shadow: inset 2px 0 0 var(--gold-400); }
.ws-research .xnav .foot { margin-top: auto; display: grid; gap: 8px; padding: 0 4px; }
.ws-research .study { grid-area: study; padding: 14px 20px 10px; display: flex; gap: 16px; align-items: flex-start; border-bottom: 1px solid var(--border-1); }
.ws-research .study .q { flex: 1; min-width: 0; }
.ws-research .crumbs { font-size: 11px; color: var(--text-3); display: flex; gap: 8px; align-items: center; }
.ws-research .study h1 { font-family: var(--font-serif); font-weight: 500; font-size: 21px; margin: 4px 0 4px; line-height: 1.25; }
.ws-research .meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.ws-research .acts { display: flex; gap: 6px; flex-shrink: 0; }
.ws-research .chartcol { grid-area: chart; display: flex; flex-direction: column; min-height: 0; padding: 0 20px; }
.ws-research .ctrl { display: flex; align-items: center; gap: 8px; padding: 10px 0 8px; flex-wrap: wrap; }
.ws-research .ctrl label { font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.ws-research .ctrl .px { font-family: var(--font-mono); font-size: 16px; font-weight: 600; }
.ws-research .chart-wrap { flex: 1; position: relative; min-height: 0; border: 1px solid var(--border-1); border-radius: var(--r-2); background: var(--bg-1); overflow: hidden; }
.ws-research .chart-wrap .badges { position: absolute; left: 10px; top: 8px; z-index: 2; display: flex; gap: 6px; pointer-events: none; }
.ws-research .under { display: flex; gap: 12px; align-items: center; padding: 6px 0 10px; font-size: 11px; color: var(--text-3); }
.ws-research .book { grid-area: book; border-top: 1px solid var(--border-1); display: flex; flex-direction: column; min-height: 0; background: var(--bg-1); }
.ws-research .tabs { display: flex; align-items: center; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--border-1); }
.ws-research .tabs button { background: none; border: 0; padding: 9px 12px; color: var(--text-3); cursor: pointer; font-size: 12px; font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; flex-shrink: 0; }
.ws-research .tabs button[aria-selected="true"] { color: var(--text-1); border-bottom-color: var(--gold-400); }
.ws-research .tabs .grow { flex: 1; } .ws-research .tabs > span:last-child { min-width: 0; overflow: hidden; }
.ws-research .tabs .prov { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ws-research .tabpanel { flex: 1; min-height: 0; } .ws-research .tabpanel[hidden] { display: none; }
.ws-research .nb { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; padding: 12px 20px; height: 100%; }
.ws-research .nb h5 { margin: 0 0 4px; font-size: 11px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.ws-research .nb p { margin: 0 0 10px; font-size: 12.5px; }
.ws-research .nb textarea { width: 100%; height: calc(100% - 22px); min-height: 90px; resize: none; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--r-2); color: var(--text-1); font: 12.5px/1.5 var(--font-ui); padding: 8px 10px; }
.ws-research .nb textarea:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.ws-research .ledger { grid-area: ledger; border-left: 1px solid var(--border-1); display: flex; flex-direction: column; min-height: 0; background: var(--bg-1); }
.ws-research .ledger-head { padding: 14px 14px 10px; border-bottom: 1px solid var(--border-1); }
.ws-research .ledger-head h2 { margin: 0; font-size: 13px; font-weight: 600; } .ws-research .ledger-head p { margin: 3px 0 0; font-size: 11px; color: var(--text-3); }
.ws-research .ledger-body { flex: 1; padding: 10px 12px; }
.ws-research .grp { margin-bottom: 12px; }
.ws-research .grp > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ws-research .grp > header .n { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); }
.ws-research .item { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; padding: 7px 9px; border: 1px solid var(--border-1); border-radius: var(--r-2); background: var(--bg-2); margin-bottom: 4px; }
.ws-research .item .t { font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.ws-research .item .d { grid-column: 1 / -1; font-size: 11px; color: var(--text-3); }
.ws-research .item .ctl { display: flex; align-items: center; gap: 6px; }
.ws-research .sw-t { position: relative; width: 28px; height: 16px; border-radius: 99px; background: var(--bg-3); border: 1px solid var(--border-2); cursor: pointer; flex-shrink: 0; padding: 0; }
.ws-research .sw-t::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--text-3); transition: transform var(--dur-fast) var(--ease); }
.ws-research .sw-t[aria-pressed="true"] { background: var(--gold-900); border-color: var(--border-gold); }
.ws-research .sw-t[aria-pressed="true"]::after { transform: translateX(12px); background: var(--gold-400); }
.ws-research .empty { font-size: 11px; color: var(--text-3); border: 1px dashed var(--border-2); border-radius: var(--r-2); padding: 8px 10px; }
.ws-research .focus-exit { display: none; } .ws-research.focus .focus-exit { display: inline-flex; }
.ws-research .ledger-btn { display: none; }
@media (max-width: 1100px) {
  .ws-research { grid-template-columns: minmax(0, 1fr); grid-template-areas: "study" "chart" "book"; }
  .ws-research .xnav { display: none; }
  .ws-research .ledger { position: fixed; right: 0; top: 0; bottom: 0; width: 316px; z-index: 20; transform: translateX(100%); transition: transform var(--dur) var(--ease); box-shadow: var(--shadow-2); }
  .ws-research .ledger.open { transform: none; } .ws-research .ledger-btn { display: inline-flex; }
}
