/* Product-only arrangements. Tokens and components come from design-system/;
   anything more than one screen uses belongs there, not here. */

body { margin: 0; }

/* The magnifier submits the top bar's search, so it is a button styled as the design system's link. */
button.qims-topbar__go { border: 0; background: none; padding: 0; cursor: pointer; }

/* ------------------------------------------------------------------- home */

/* Home is built from the design system's work-and-reference layout
 * (components.css, design/14 §14.8). What stays here is the one thing no other
 * screen has: the organisation's chart, small in the reference column.
 */

/* Small in the rail, and whole when opened. */
.qims-home__chart { margin-bottom: var(--qims-space-1); }
.qims-home__chart > img {
  display: block;
  max-width: 100%;
  max-height: 10rem;
  height: auto;
  object-fit: contain;
  background: var(--qims-surface);
  border: 1px solid var(--qims-border);
  border-radius: var(--qims-radius-md);
}
/* When the bytes do not arrive, the rail's version of the card's placeholder
   (components.css): a dashed frame captioned by the image's alt. The frame is
   the wrapper and the image leaves layout, because a failed image that stays in
   layout still has Chrome's broken-image glyph drawn inside it, and every CSS
   way of pushing the glyph out made the image wider than its box.
   image-fallback.js sets the marker. */
.qims-home__chart:has(> img[data-qims-failed]) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.5rem;
  padding: var(--qims-space-3);
  text-align: center;
  font-size: var(--qims-text-xs);
  color: var(--qims-text-secondary);
  background: var(--qims-surface-raised);
  border: 1px dashed var(--qims-border-strong);
  border-radius: var(--qims-radius-md);
}
.qims-home__chart:has(> img[data-qims-failed])::after { content: attr(data-alt); }
.qims-home__chart > img[data-qims-failed] { display: none; }
