.research-views { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.research-lab.research-panel { display: block; padding: 34px 40px 25px; }
.research-lab.research-panel[hidden] { display: none; }
.lab-heading { display: flex; align-items: start; justify-content: space-between; gap: 35px; margin-bottom: 29px; }
.lab-heading h3 { font-size: 35px; font-weight: 550; letter-spacing: -.045em; line-height: 1.15; }
.lab-heading p:last-child { max-width: 390px; font-size: 13px; line-height: 1.85; color: #526078; }
.lab-layout { display: grid; grid-template-columns: .8fr 2fr; gap: 34px; align-items: start; }
.lab-controls { padding-right: 28px; border-right: 1px solid #e0e6ef; }
.lab-control-label { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 12px; font-weight: 550; margin-bottom: 10px; color: #253852; }
.lab-control-label > span { font-size: 9px; color: #62718a; letter-spacing: .09em; }
.lab-button-group { display: flex; gap: 5px; }
.lab-button-group button { flex: 1; min-height: 42px; padding: 8px 4px; border: 1px solid #b3bfd0; color: #435773; background: #f8fafd; border-radius: 5px; font-size: 11px; }
.lab-button-group button[aria-pressed=true] { background: #1c304e; color: white; border-color: #1c304e; }
.lab-button-group button:hover { border-color: #b93612; }
.lab-market-note { color: #5b6c83; font-size: 10px; line-height: 1.7; min-height: 34px; margin-top: 9px; }
.lab-field + .lab-field { margin-top: 21px; }
.lab-field > p { color: #526078; font-size: 10px; line-height: 1.8; margin-top: 5px; }
.lab-field output { font-variant-numeric: tabular-nums; font-size: 17px; letter-spacing: -.025em; color: #b93612; }
.lab-field input { width: 100%; display: block; accent-color: #b93612; height: 28px; }
.lab-actions { display: flex; gap: 14px; align-items: center; margin-top: 21px; }
.lab-remix { background: #1c304e; color: white; border: 1px solid #1c304e; border-radius: 5px; min-height: 44px; padding: 10px 14px; font-size: 11px; }
.lab-reset { border: 0; background: none; color: #526078; min-height: 44px; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.lab-visual { min-width: 0; }
.lab-plot-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 11px; color: #253852; margin-bottom: 13px; }
.lab-plot-heading span:last-child { font-size: 9px; color: #62718a; }
.lab-chart { display: block; width: 100%; background: #f8fafd; border: 1px solid #e4e9f1; border-radius: 8px; overflow: visible; }
.lab-chart text, .lab-window-chart text { font-family: Satoshi, Arial, sans-serif; fill: #526078; font-size: 12px; }
.lab-chart .lab-plot-title { fill: #2b3e58; font-size: 12px; font-weight: 600; }
.lab-price-path { stroke: #36547b; fill: none; stroke-width: 2; }
.lab-price-area { fill: url(#lab-price-fill); }
.lab-chart-grid { fill: none; stroke: #e0e7ef; }
#lab-equity-zero { stroke: #a8b6c9; stroke-dasharray: 4 5; }
.lab-signals { fill: #36547b; }
.lab-entry-point { fill: white; stroke: #36547b; stroke-width: 1.5; }
.lab-exit-point { fill: #b93612; stroke: white; stroke-width: 1.5; }
.lab-equity { fill: none; stroke-width: 1.5; opacity: .45; transition: opacity .18s ease; }
.lab-equity[data-lab-equity=tight] { stroke: #367f79; }
.lab-equity[data-lab-equity=base] { stroke: #b93612; }
.lab-equity[data-lab-equity=wide] { stroke: #5b61a1; }
.lab-equity.is-active { stroke-width: 3; opacity: 1; }
.lab-chart-key { display: flex; flex-wrap: wrap; gap: 14px; font-size: 9px; color: #526078; margin: 11px 0 19px; }
.lab-chart-key span { display: flex; gap: 5px; align-items: center; }
.lab-chart-key i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #36547b; }
.lab-chart-key .lab-buy-key { background: white; border: 1px solid #36547b; }
.lab-chart-key .lab-exit-key { background: #b93612; }
.lab-scenarios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lab-scenarios button { position: relative; min-width: 0; background: #f8fafd; border: 1px solid #bbc7d7; border-radius: 7px; padding: 12px 11px; text-align: left; color: #344863; }
.lab-scenarios button[aria-pressed=true] { background: #fff5ee; border-color: #b93612; box-shadow: inset 0 2px #b93612; }
.lab-scenarios button > span:first-child { font-size: 11px; display: block; }
.lab-scenarios button > strong { display: block; font-weight: 550; font-size: 25px; line-height: 1.4; letter-spacing: -.035em; margin: 4px 0; font-variant-numeric: tabular-nums; }
.lab-scenarios button > small { display: block; color: #526078; font-size: 9px; line-height: 1.65; }
.lab-active-detail { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 13px; font-size: 10px; color: #526078; }
.lab-active-detail strong { font-weight: 600; color: #253852; }
.lab-sensitivity { display: flex; align-items: start; gap: 14px; padding: 18px 0 0; margin-top: 20px; border-top: 1px solid #dce4ed; }
.lab-sensitivity > span { color: #b93612; font-size: 23px; }
.lab-sensitivity h4 { margin: 0; font-weight: 500; font-size: 13px; color: #253852; }
.lab-sensitivity h4 strong { font-weight: 600; white-space: nowrap; }
.lab-sensitivity p { color: #526078; font-size: 11px; line-height: 1.85; margin-top: 6px; }
.lab-window { border-top: 1px solid #dce4ed; padding-top: 26px; margin-top: 31px; }
.lab-window-heading { display: flex; gap: 30px; justify-content: space-between; align-items: end; margin-bottom: 15px; }
.lab-window-heading h4 { margin: 0; font-size: 24px; font-weight: 550; letter-spacing: -.04em; }
.lab-window-heading .research-kicker { color: #b93612; font-size: 9px; margin: 0 0 10px; }
.lab-window-heading p { font-size: 11px; color: #526078; max-width: 510px; line-height: 1.85; margin-top: 8px; }
.lab-window-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.lab-window-actions .lab-button-group { gap: 4px; }
.lab-window-actions .lab-button-group button { width: 37px; flex: none; }
.lab-next-window { border: 0; color: #b93612; background: none; font-size: 11px; min-height: 44px; padding: 6px 0; white-space: nowrap; }
.lab-window-chart { display: block; width: 100%; max-height: 170px; background: #f8fafd; border: 1px solid #e4e9f1; border-radius: 7px; }
#lab-window-figure { margin: 0; }
#lab-train-band { fill: #dce7f4; }
#lab-gap-band { fill: url(#lab-gap-fill); }
#lab-test-band { fill: #ffd5be; }
#lab-window-price { stroke: #456283; stroke-width: 1.6; fill: none; }
.lab-window-chart rect { transition: x .22s ease; }
.lab-window-legend { display: flex; gap: 22px; font-size: 10px; color: #435773; margin: 11px 0; }
.lab-window-legend span { display: flex; align-items: center; gap: 6px; }
.lab-window-legend i { width: 10px; height: 8px; border-radius: 2px; background: #c9d9ec; }
.lab-window-legend span:nth-child(2) i { background: #d9d2c9; }
.lab-window-legend span:nth-child(3) i { background: #ed9b6e; }
.lab-window-results { display: grid; grid-template-columns: 1fr 1fr 1.7fr; gap: 26px; align-items: center; margin-top: 18px; }
.lab-window-result > span { display: block; color: #526078; font-size: 10px; }
.lab-window-result strong { display: block; font-size: 25px; line-height: 1.4; font-weight: 550; letter-spacing: -.03em; margin-top: 4px; }
.lab-window-result small { display: block; font-size: 10px; color: #526078; margin-top: 3px; }
.lab-window-note { font-size: 11px; line-height: 1.85; color: #526078; }
.lab-source-notes { border-top: 1px solid #dce4ed; margin-top: 25px; padding-top: 12px; color: #526078; }
.lab-source-notes summary { font-size: 11px; cursor: pointer; padding-block: 8px; }
.lab-source-notes p { font-size: 11px; line-height: 1.85; margin-top: 10px; max-width: 870px; }
.lab-source-notes a { text-decoration: underline; text-underline-offset: 3px; color: #334e74; }
.lab-footnote { color: #5b6c83; font-size: 10px; line-height: 1.8; margin-top: 18px; }
.lab-status { color: #526078; font-size: 10px; margin-top: 12px; min-height: 16px; }
.research-lab:not(.is-ready) [data-lab-controls], .research-lab:not(.is-ready) .lab-dynamic, .research-lab:not(.is-ready) .lab-status { display: none; }
.research-story:not(.is-enhanced) .research-status { display: none; }
.research-lab.is-ready .lab-static { display: none; }
.lab-static { border: 1px solid #dce4ed; background: #f8fafd; border-radius: 8px; padding: 20px; }
.lab-static p { font-size: 13px; line-height: 1.9; color: #435773; margin-top: 12px; }
@media (max-width: 960px) {
  .research-lab.research-panel { padding: 27px; }
  .lab-heading { gap: 25px; }
  .lab-heading h3 { font-size: 30px; }
  .lab-heading p:last-child { max-width: 300px; font-size: 12px; }
  .lab-layout { display: block; }
  .lab-controls { padding: 0; border: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 25px; }
  .lab-field { min-width: 0; }
  .lab-field + .lab-field { margin: 0; }
  .lab-actions { grid-column: 1 / -1; margin: 0; }
  .lab-visual { margin-top: 25px; }
  .lab-button-group button { font-size: 10px; }
  .lab-scenarios { gap: 5px; }
  .lab-scenarios button { padding: 10px 7px; }
  .lab-scenarios button > strong { font-size: 23px; }
  .lab-scenarios button > small { font-size: 8px; }
  .lab-window-heading { display: block; }
  .lab-window-actions { margin-top: 14px; }
}
@media (max-width: 620px) {
  .research-views { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 10px; }
  .research-views button { display: flex; padding: 11px 7px; gap: 8px; text-align: left; min-height: 49px; }
  .research-views button > span { margin: 0; }
  .research-views strong { font-size: 11px; }
  .research-lab.research-panel { padding: 24px 18px 18px; }
  .lab-heading { display: block; margin-bottom: 23px; }
  .lab-heading h3 { font-size: 31px; }
  .lab-heading p:last-child { max-width: none; font-size: 13px; margin-top: 13px; }
  .lab-layout { display: block; }
  .lab-controls { padding: 0; border: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 15px; }
  .lab-field { min-width: 0; }
  .lab-field + .lab-field { margin-top: 0; }
  .lab-field:first-child, .lab-field:nth-child(2) { grid-column: 1 / -1; }
  .lab-button-group button { font-size: 12px; min-height: 44px; }
  .lab-market-note { min-height: 0; font-size: 11px; }
  .lab-control-label { font-size: 11px; }
  .lab-control-label > span { display: none; }
  .lab-field output { font-size: 17px; }
  .lab-field .lab-control-label { flex-wrap: wrap; }
  .lab-actions { grid-column: 1 / -1; margin: 0; }
  .lab-visual { margin-top: 26px; }
  .lab-plot-heading { display: block; }
  .lab-plot-heading span:last-child { display: block; margin-top: 5px; font-size: 10px; }
  .lab-chart { width: 100%; }
  .lab-chart text { font-size: 14px; }
  .lab-chart .lab-plot-title { font-size: 13px; }
  .lab-scenarios button > span:first-child { font-size: 10px; }
  .lab-scenarios button > strong { font-size: 21px; }
  .lab-scenarios button > small { font-size: 9px; }
  .lab-active-detail { font-size: 10px; gap: 9px 12px; }
  .lab-sensitivity h4 strong { display: block; margin-top: 4px; }
  .lab-window { margin-top: 26px; padding-top: 24px; }
  .lab-window-heading h4 { font-size: 26px; }
  .lab-window-heading p { font-size: 12px; }
  .lab-window-actions { justify-content: space-between; gap: 12px; }
  .lab-window-actions .lab-button-group button { width: 38px; }
  .lab-window-chart { min-height: 97px; }
  .lab-window-legend { gap: 17px; font-size: 10px; }
  .lab-window-results { grid-template-columns: 1fr 1fr; gap: 18px; }
  .lab-window-note { grid-column: 1 / -1; }
  .lab-window-result strong { font-size: 26px; }
  .lab-footnote { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .lab-equity, .lab-window-chart rect { transition: none; }
}
