/* Research cards inherit the report palette; layout placement belongs to flex-layout. */
.research-widget { --rw-muted: var(--muted, #80716b); display: flex; flex-direction: column; min-width: 0; color: var(--ink, #352e2b); }
.research-widget .rw-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; min-height: 58px; flex-shrink: 0; }
.research-widget .rw-heading h2 { min-width: 0; font-size: 21px; line-height: 1.35; }
.research-widget .rw-status { flex-shrink: 0; display: inline-flex; padding: 3px 7px; border: 1px solid #dfd7d2; border-radius: 4px; background: #f7f4f1; color: #8a7770; font: 10px/1.5 var(--workbench-ui, sans-serif); white-space: nowrap; }
.research-widget .rw-status.is-ready { background: #f0f5ef; border-color: #dce6d8; color: #587250; }
.research-widget .rw-status.is-partial { background: #fff6e8; border-color: #edddbd; color: #93713f; }
.research-widget .rw-status.is-loading { background: #f4f2ef; color: #8a7770; }
.research-widget .rw-status.is-demo { border-color: #e8d7c6; background: #fcf5ec; color: #987747; }
.research-widget .rw-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 18px 8px; flex-shrink: 0; }
.research-widget .rw-toolbar label { flex: 1; min-width: 0; }
.research-widget .rw-toolbar select { width: 100%; min-width: 0; height: 33px; padding: 5px 28px 5px 9px; border: 1px solid var(--line, #e6dcd5); border-radius: 5px; background: var(--panel, #fff); color: var(--ink, #352e2b); font-size: 12px; text-overflow: ellipsis; }
.research-widget .rw-toolbar select:disabled { opacity: .65; }
.research-widget .rw-retry { font-size: 11px; flex-shrink: 0; }
.research-widget .rw-retry:disabled { cursor: default; opacity: .5; }
.research-widget .rw-description { flex-shrink: 0; padding: 0 18px 10px; color: var(--rw-muted); font: 11px/1.65 var(--workbench-ui, sans-serif); }
.research-widget .rw-content { flex: 1; min-height: 100px; min-width: 0; overflow: auto; overscroll-behavior: auto; padding: 0 15px 12px; scrollbar-width: thin; scrollbar-color: #cdbbb3 transparent; font-family: var(--workbench-ui, sans-serif); }
.research-widget .rw-footer { flex-shrink: 0; border-top: 1px solid var(--line, #e9ded8); background: #fcfaf8; padding: 9px 17px; font: 10px/1.6 var(--workbench-ui, sans-serif); color: var(--rw-muted); max-height: 33%; overflow: auto; scrollbar-width: thin; }
.research-widget .rw-source { display: flex; flex-wrap: wrap; gap: 2px 13px; align-items: baseline; }
.research-widget .rw-source a { text-decoration: none; color: #8f5147; }
.research-widget .rw-source a:hover { text-decoration: underline; }
.research-widget .rw-source-kind { color: #9c8d85; }
.research-widget .rw-notes { margin-top: 5px; }
.research-widget .rw-notes summary { cursor: pointer; color: #8d665a; width: fit-content; }
.research-widget .rw-notes ul { padding-left: 17px; margin: 7px 0 1px; }
.research-widget .rw-notes li + li { margin-top: 4px; }
.research-widget .rw-empty { min-height: 150px; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; text-align: center; padding: 18px 22px; color: #8b7a71; }
.research-widget .rw-empty-mark { display: grid; place-items: center; height: 40px; width: 44px; border: 1px solid #e9ded6; border-radius: 7px; color: #b59c8b; font-size: 24px; background: #fcf8f5; }
.research-widget .rw-empty strong { font-size: 13px; font-weight: 500; }
.research-widget .rw-empty p { margin: 0; max-width: 360px; font-size: 11px; line-height: 1.8; color: #a08d81; }
.research-widget .rw-partial-note { padding: 6px 9px; margin-bottom: 9px; border-left: 2px solid #cda56a; background: #fbf6ec; font-size: 10px; color: #9a7b4e; }
.research-widget .rw-chart-panel + .rw-chart-panel { padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line, #e9ded8); }
.research-widget .rw-chart-unit { margin: 2px 0 5px; padding-left: 3px; font-size: 10px; color: #97857b; }
.research-widget .rw-chart-scroll { min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.research-widget .rw-svg { display: block; width: 100%; min-width: 380px; height: auto; max-height: 280px; overflow: visible; font-family: var(--workbench-ui, sans-serif); }
.research-widget .rw-gridline { stroke: #eae3de; stroke-dasharray: 3 4; stroke-width: 1; }
.research-widget .rw-axis { fill: #99897f; font-size: 11px; font-variant-numeric: tabular-nums; }
.research-widget .rw-data-point { cursor: crosshair; stroke: #fff; stroke-width: 1; transition: stroke-width .12s; }
.research-widget .rw-data-point:hover, .research-widget .rw-data-point:focus { stroke: #cfaf8e; stroke-width: 3; outline: none; }
.research-widget .rw-legend { display: flex; flex-wrap: wrap; gap: 5px 14px; padding: 4px 7px 0; font-size: 10px; color: #786b63; }
.research-widget .rw-legend > span { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.research-widget .rw-legend i { height: 7px; width: 7px; border-radius: 50%; background: var(--rw-color); flex-shrink: 0; }
.research-widget .rw-legend b { font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; color: #5e4b41; }
.research-widget .rw-legend small { font-size: 9px; color: #998477; font-weight: 400; }
.research-widget .rw-method { font-size: 10px; color: #a08e82; margin: 9px 3px 0; line-height: 1.7; }
.research-widget .rw-data-details { margin-top: 12px; border-top: 1px solid #eee6df; padding-top: 8px; }
.research-widget .rw-data-details summary { cursor: pointer; font-size: 10px; color: #927464; width: fit-content; }
.research-widget .rw-data-details > .rw-table-scroll { max-height: 250px; margin-top: 8px; }
.research-widget .rw-table-scroll { overflow: auto; min-width: 0; scrollbar-width: thin; border: 1px solid #e8ded7; border-radius: 5px; }
.research-widget .rw-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 11px; line-height: 1.55; white-space: nowrap; }
.research-widget .rw-table th, .research-widget .rw-table td { padding: 9px 11px; text-align: left; border-bottom: 1px solid #eee6df; font-weight: 400; }
.research-widget .rw-table thead th { color: #84634f; background: #f8f0e9; position: sticky; top: 0; z-index: 2; font-weight: 500; }
.research-widget .rw-table thead th small { display: block; font-weight: 400; font-size: 9px; color: #a28e7e; }
.research-widget .rw-table tbody th { position: sticky; left: 0; z-index: 1; color: #705746; background: #fffdfb; border-right: 1px solid #eee6df; font-weight: 500; }
.research-widget .rw-table tbody tr:last-child > * { border-bottom: 0; }
.research-widget .rw-table tbody tr:nth-child(even) td { background: #fcfaf7; }
.research-widget .rw-table .rw-number { text-align: right; font-variant-numeric: tabular-nums; }
.research-widget .rw-table .rw-missing { color: #b9a99c; }
.research-widget .rw-matrix td { min-width: 76px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; }
.research-widget .rw-bars-panel + .rw-bars-panel { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line, #e9ded8); }
.research-widget .rw-bar-series + .rw-bar-series { margin-top: 15px; }
.research-widget .rw-bar-series h4 { font-weight: 500; font-size: 11px; color: #8b6855; margin: 3px 0 7px; }
.research-widget .rw-bar-row { display: grid; grid-template-columns: minmax(62px, 1fr) minmax(70px, 2.2fr) minmax(55px, auto); gap: 10px; align-items: center; padding: 7px 2px; font-size: 11px; }
.research-widget .rw-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #826d5e; }
.research-widget .rw-bar-track { height: 15px; background: #f3ede7; position: relative; display: block; border-radius: 2px; }
.research-widget .rw-bar-zero { position: absolute; z-index: 1; width: 1px; height: 21px; top: -3px; background: #c5b3a3; }
.research-widget .rw-bar-fill { position: absolute; height: 100%; background: var(--rw-color, #9a4d43); border-radius: 2px; opacity: .8; min-width: 0; }
.research-widget .rw-bar-fill.is-negative { background: #6b8782; }
.research-widget .rw-bar-na { position: absolute; inset: 0; font-size: 9px; text-align: center; color: #b4a18f; line-height: 15px; }
.research-widget .rw-bar-row b { font-weight: 500; color: #775e4a; font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }
.research-widget .rw-bar-row:focus { outline: 2px solid #d1a689; outline-offset: 1px; border-radius: 3px; }
.research-widget .rw-calendar { list-style: none; padding: 0; margin: 0; }
.research-widget .rw-calendar li { display: flex; gap: 14px; align-items: center; padding: 10px 9px; border-bottom: 1px solid #eee6df; }
.research-widget .rw-calendar li:last-child { border-bottom: 0; }
.research-widget .rw-calendar li.is-next { border: 1px solid #e5cbb6; border-left: 3px solid #b98b60; background: #fcf7ef; border-radius: 6px; }
.research-widget .rw-calendar li.is-past { opacity: .7; }
.research-widget .rw-calendar-date { width: 64px; flex-shrink: 0; text-align: center; padding: 5px 3px; border: 1px solid #eaded2; border-radius: 5px; background: #fffaf5; }
.research-widget .rw-calendar-date small { display: block; font-size: 9px; color: #a58d78; }
.research-widget .rw-calendar-date strong { font-size: 23px; font-weight: 500; line-height: 1.4; color: #9a6845; font-variant-numeric: tabular-nums; }
.research-widget .rw-calendar-detail { min-width: 0; }
.research-widget .rw-calendar-detail > div { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.research-widget .rw-calendar-detail strong { font-size: 12px; font-weight: 500; color: #75513c; }
.research-widget .rw-calendar-detail p { font-size: 10px; line-height: 1.8; color: #a18a77; margin: 4px 0 0; }
.research-widget .rw-event-tag { display: inline-flex; font-size: 9px; padding: 1px 6px; border-radius: 3px; background: #efe3d4; color: #98714e; }
.research-widget .rw-event-tag.is-projection { background: #f4e6e1; color: #a36a56; }
.rw-tooltip { position: fixed; z-index: 9999; pointer-events: none; max-width: min(320px, calc(100vw - 16px)); padding: 9px 12px; background: #4a382df2; border: 1px solid #6e5140; color: #fff9f1; border-radius: 5px; box-shadow: 0 4px 18px #3e271b24; font: 11px/1.7 var(--workbench-ui, sans-serif); white-space: pre-line; overflow-wrap: anywhere; }
.rw-sr-only { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; border: 0!important; }
@container (max-width: 460px) {
  .research-widget .rw-heading { padding-inline: 13px; gap: 7px; }
  .research-widget .rw-heading h2 { font-size: 19px; }
  .research-widget .rw-status { font-size: 9px; padding: 2px 4px; }
  .research-widget .rw-toolbar, .research-widget .rw-description { padding-inline: 12px; }
  .research-widget .rw-content { padding-inline: 9px; }
  .research-widget .rw-footer { padding-inline: 12px; }
}
@media (max-width: 760px) {
  .flex-dashboard > .research-widget { min-height: 420px; max-height: 760px; }
  .research-widget .rw-content { min-height: 210px; max-height: 520px; }
  .research-widget .rw-heading h2 { font-size: 19px; }
  .research-widget .rw-description { font-size: 10px; }
  .research-widget .rw-footer { max-height: 160px; }
}
