/* Research uses the existing catalog and queue; command-deck height is unchanged. */
.production-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.catalog.research-catalog { grid-template-rows: 77px 77px auto 24px; }
.catalog-card .research-blueprint {
  position: relative;
  background: linear-gradient(90deg, #a3bad216 1px, transparent 1px), linear-gradient(#a3bad216 1px, transparent 1px), #343d49;
  background-size: 11px 11px;
  border-color: #9db4cc40;
}
.catalog-card .research-blueprint svg { width: 33px; height: 33px; color: #d9e8fa; filter: none; }
.research-level { position: absolute; right: 3px; bottom: 2px; background: #1d232de6; padding: 1px 3px; color: #f6dba5; font: 8px monospace; white-space: nowrap; }
.research-card .card-bottom > span { min-width: 0; max-width: 77%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.research-card.research-complete { border-color: #b89d6e; }
.research-card.research-complete .card-bottom > span { color: #b7d9ff; }
.research-inline-rule { grid-column: 1 / -1; margin: 0; padding: 5px 2px; color: #e5d1ab; font-size: 9px; line-height: 14px; }
.research-explainer { grid-column: 1 / -1; min-width: 0; height: 24px; padding: 3px 6px; background: linear-gradient(#494c53, #33363d); border: 1px solid #858b96; color: #e7e2d7; font-size: 9px; text-align: left; }
.research-explainer > span { float: right; color: #f1ce8c; }
.research-explainer:hover { background: #535863; border-color: #d8c194; }
#queue-drawer > summary { white-space: nowrap; }
#queue-summary { margin-left: 5px; color: #cdd1d7; font-size: 8px; letter-spacing: -.2px; }
.catalog-tooltip {
  position: fixed;
  z-index: 30;
  width: min(340px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  padding: 10px 12px;
  background: #292c33f7;
  border: 1px solid #d3ac76;
  box-shadow: 0 7px 24px #0008;
  color: #f1eadc;
  font-size: 11px;
  line-height: 18px;
  white-space: pre-line;
  overflow-wrap: anywhere;
  pointer-events: none;
}
#selection-panel .selection-meta:focus-visible { outline: 2px solid #ffe4a2; outline-offset: 1px; }
.research-rule { margin: 14px 0 18px; padding: 10px 12px; background: #51402e; border-left: 2px solid #ebc17e; color: #ffe0aa; font-size: 12px; line-height: 1.8; }
.research-reference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.research-reference { min-width: 0; padding: 12px; background: #292e36; border: 1px solid #778393; }
.research-reference h3 { margin: 0 0 8px; color: #f6dfb6; font-size: 13px; font-weight: 550; }
.research-reference h3 small { display: block; margin-top: 5px; color: #bfd8f5; font-size: 10px; line-height: 1.6; }
.research-reference p { margin: 0 0 10px; color: #c9ced7; font-size: 10px; line-height: 1.7; }
.research-reference ol { margin: 0; padding-left: 15px; color: #d4d9df; font-size: 10px; line-height: 1.7; }
.research-reference li + li { margin-top: 8px; }
.research-reference strong { display: block; color: #e9c88e; font-weight: 500; }
.research-reference li span { display: block; }
.equipment-description .equipment-effective { color: #c5ddf9; }
@media (max-width: 580px) {
  .production-tabs button { font-size: 9px; }
  .research-card .card-bottom small { font-size: 7px; }
  .research-inline-rule { font-size: 8px; }
  #queue-summary { margin-left: 3px; font-size: 7px; }
  .catalog-tooltip { font-size: 10px; line-height: 16px; padding: 8px; }
  .research-reference-grid { grid-template-columns: minmax(0, 1fr); }
}
