/* nucare_html -- the NuCare shell's own rules.
 *
 * .nc-screen-root is the wrapping form root and its rule is the BARE root
 * rule, so it outranks the scoped reset. It carries display: block and nothing
 * else, so .nc-dashboard's height: 100% and overflow: hidden resolve against
 * an auto height and the scrollbar stays on the shell's content port rather
 * than .nc-tables-container.
 *
 * Every other rule is scoped :where(.nc-screen-root), which adds zero
 * specificity. The dark restatement keeps [data-theme="dark"] OUTSIDE the
 * scope: that attribute sits on <html>, an ancestor of this root.
 *
 * The slotted child's flex sizing is carried by .nc-table-slot-mount below
 * plus the leaf's own min-height: 0, because the <anvil-dropzone> around the
 * child computes display: contents and a child combinator cannot reach it.
 *
 * No .px-* class is declared here, so there is no head-link-order tie.
 *
 * DESIGNER GATE: none. #nc-load-error ships with the `hidden` attribute and
 * the loading overlay ships `active`, so the canvas shows what the browser
 * shows before any script.
 */

.nc-screen-root {
  display: block;
}

:where(.nc-screen-root) .nc-dashboard {
  --accent: #f59e0b; --accent-text: #422006;
  --accent-hover: #d97706;
  --accent-subtle: rgba(245,158,11,0.12);
  --px-loading-accent: #f59e0b;

  font-family: var(--px-font);
  color: var(--px-text-primary);
  background: var(--px-bg-deep);
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  z-index: 0;
}

[data-theme="dark"] :where(.nc-screen-root) .nc-dashboard,
:where(.nc-screen-root) .nc-dashboard[data-theme="dark"] {
  --accent: #fbbf24; --accent-text: #422006;
  --accent-hover: #f59e0b;
  --accent-subtle: rgba(251,191,36,0.15);
}

:where(.nc-screen-root) .nc-table-slot-mount {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

:where(.nc-screen-root) .nc-content {
  width: 100%;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  overflow: hidden;
}

:where(.nc-screen-root) .nc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

:where(.nc-screen-root) .nc-title-block {
  display: flex;
  flex-direction: column;
}

@media (max-width: 900px) {
  :where(.nc-screen-root) .nc-content { padding: 16px; }
}
@media (max-width: 600px) {
  :where(.nc-screen-root) .nc-content { padding: 12px 8px; }
}
