/* /edge/top-gear/ — what this console needs on top of the shared publish styles.

   ../3d/publish.css already carries the drop zone, the message strip, the
   publish button and the numbered steps; those are the console pattern and are
   deliberately shared rather than restyled per app.

   Everything here is about mounting the app INSIDE a console page, which is a
   thing the app was never built for: on its own host it owns the viewport. */

/* The app assumes it is the page and sizes its table to the viewport. In a
   console it is one block among several, so give it a bounded, scrollable
   height rather than letting a 250-row table push the Publish button off the
   bottom of the document — the button being reachable matters more than the
   table being whole, and the table scrolls. */
#npb-app.topgear{
  border:1px solid var(--line);
  border-radius:var(--r-panel);
  overflow:hidden;
  background:var(--surface);
}
/* .main is flex:1 in core, which resolves to zero height outside the full-height
   flex column the app has on its own host — and .view inside it is absolutely
   positioned to inset:0, so the whole table collapses to nothing while still
   reporting 252 rows in the DOM. An explicit height is what a mounting host
   owes it; max-height alone leaves flex:1 resolving to 0. */
#npb-app.topgear .main{
  height:min(70vh,720px);
  overflow:hidden;
}

/* The toolbar is sticky against the app's own scroller, not the page. */
#npb-app.topgear .toolbar{
  position:sticky;
  top:0;
  z-index:3;
  background:var(--surface);
}

/* The preview is for reading numbers, not for driving the app: a factsheet
   opened here would cover the console, and the Publish button with it. The
   icon stays hidden rather than removed, so the same renderers serve both. */
#npb-app.topgear .fsbtn{display:none}

.pubpreview .pubnote{
  margin:0 0 10px;
  font-size:12.5px;
  color:var(--ink-3);
  line-height:1.5;
}

/* ../3d/publish.css sets .pub{max-width:44rem}, which is right for that console:
   it is a drop zone, a message and a report, and 44rem is a comfortable measure
   for reading prose.

   This console's preview is a 250-row table with two dozen columns, and the
   reason it exists is so somebody can look across those columns and notice a
   number in the wrong place. Clipping it to 44rem defeats the one job it has.
   The prose blocks keep the narrow measure; the preview gets the page. */
.pub{max-width:none}
.pub .pubdrop,.pub .pubmsg,.pub .pubsteps{max-width:44rem}
